Feeding the Dragon ecosystem

A forum for members to discuss this site, offer suggestions for improvement etc.
User avatar
rolfmichelsen
Posts: 299
Joined: Wed Apr 08, 2009 8:43 pm
Location: Oslo, Norway
Contact:

Feeding the Dragon ecosystem

Post by rolfmichelsen »

Is it just me, or is some information vital to the well-being of the Dragon ecosystem missing from the site. I sometimes see requests for software that I know that I have lying around somewhere. I'd love to help, but it takes time to figure out how to convert the data to any of the formats supported by the emulators out there. It would be really great if someone with more knowledge than me both of current tools and the file formats could start a section on the wiki to collect the documentation for these things. I'll start reverse engineering the tools myself if that's what it takes. This is information that I strongly believe must be readily available to keep the community going.

Maybe the information already exists. Please feel free to point out my ignorance (as long as you also provide pointers...)

Regards,
-- Rolf
sixxie
Posts: 1348
Joined: Fri Jul 18, 2008 8:36 am
Location: Hertfordshire
Contact:

Re: Feeding the Dragon ecosystem

Post by sixxie »

Well for tapes, my general approach is to get a WAV sample of the tape, then load that WAV into a modified version of XRoar that intercepts the tape routines and writes out a copy of anything loaded to a CAS files (the one you specify with Ctrl+W).

For disks you'll need a drive and controller capable of double density. You can usually then setfdprm your drive device to the appropriate density/sides/tracks/etc. and dd off a .dsk image. I wouldn't know what to do under Windows, though.
User avatar
rolfmichelsen
Posts: 299
Joined: Wed Apr 08, 2009 8:43 pm
Location: Oslo, Norway
Contact:

Re: Feeding the Dragon ecosystem

Post by rolfmichelsen »

This is all good, but I had two cases in mind that will not be covered by this.

First, I have most of my Dragon software on old floppies. Reading these floppies on anything but my clunky Dragon will be a major undertaking. Getting hold of compatible/vintage drives, adapters and BIOS is getting increasinly difficult. It seems to me that it would be easier to read the floppies on the Dragon, dump the raw sectors over the RS232 interface, implement a simple tool on the other end to extract files from the DragonDOS image and finally dumping the files in an emulator-friendly format.

Even mor interesting perhaps, enabling creation of PC-based tools to create emulator-compatible files. Think about having a PC-based 6809 assembler writing CAS-files directly, or even a tiny C compiler. (gcc for Dragon, anyone?) Maybe nothing will happen, but it would be good to know that the knowledge and tools would be available to wannabe innovators. The emulators and the emulator-friendly file formats are the lifeblood of the Dragon community today.

Regards,
-- Rolf
Alastair
Posts: 669
Joined: Fri Jul 18, 2008 11:33 pm

Re: Feeding the Dragon ecosystem

Post by Alastair »

rolfmichelsen wrote:Even mor interesting perhaps, enabling creation of PC-based tools to create emulator-compatible files. Think about having a PC-based 6809 assembler writing CAS-files directly, or even a tiny C compiler. (gcc for Dragon, anyone?) Maybe nothing will happen, but it would be good to know that the knowledge and tools would be available to wannabe innovators. The emulators and the emulator-friendly file formats are the lifeblood of the Dragon community today.

Regards,
-- Rolf
There are various tools available on this site ( http://archive.worldofdragon.org/archiv ... dir=Tools/ ) the question being what do they all do?

DC.EXE is a DOS program that converts between wav files and cas files (either direction)

FIXCAS.EXE is a DOS program that fixes cas files created by older versions of DC (it increases the size of the leaders, the above DC does not truncate leaders so does not require FIXCAS)

VCOPY.EXE is a DOS program that apparently (I've never used it) creates virtual disks from real Dragon disks inserted into the PC's floppy drive (I assume it has to be a 5.25" drive, unless there are 3.5" Dragon disks out there), it can also copy a virtual disk to a real Dragon disk.

And off the top of my head that's all I know about the the programs available in that directory.
Last edited by Alastair on Tue Nov 10, 2009 10:50 pm, edited 1 time in total.
Alastair
Posts: 669
Joined: Fri Jul 18, 2008 11:33 pm

Re: Feeding the Dragon ecosystem

Post by Alastair »

A wiki entry is a good idea, however I will give a brief overview below as a wiki entry will require the filling of several gaps. My conversion experience is limited to cassettes so I cannot help you with the floppy disk issue, I have will have to leave it to others to fill the gaps on converting cartridges and disks.

Converting Cassettes to CAS Files

Hardware Set Up

Connect the audio out or earphone socket of a cassette player to the aux. input or microphone socket of your computer.


Software

Use an audio recording program of your choice to create a wav file, mono with a sampling rate of ~22 kHz should suffice.

There are two methods available to convert the wav file to a cas file, the first is by using an emulator that accepts wav files (such as recent versions of XRoar), the second is by using conversion software.


Emulator Method using XRoar

This is most suited for BASIC and non-autostarting machine code programs neither of which are multi-part.

Start up XRoar and make sure that Dragon DOS is not running (if it is, either remove the Dragon DOS ROM from the relevant XRoar directory and restart XRoar, or press Control+E then Control+Shift+R). Press Control+L and select the wav file, then CLOAD/CLOADM as appropriate. After the program has loaded press Control+W, type in a file name (including the .cas extension), and CSAVE/CSAVEM (remember to use the same name that was displayed during loading) to create the cas file. CSAVEM takes the form of CSAVEM"filename",[start],[end],[entry]

where (I believe)
[start] = PRINT PEEK(487)*256 + PEEK(488)
[end] = PRINT PEEK(126)*256 + PEEK(127) - 1
[entry] = PRINT PEEK(157)*256 + PEEK(158)

(Note. This is why Dragon DOS must be disabled as these PEEKed addresses change when DOS is running.)


Conversion Software using DC

There are other conversion programs available but most of these programs strip out the leaders (periods of silence before the program header) to create smaller cas files - not a problem for older emulators, but a problem for those emulators that better emulate the Dragon's tape loading routine. If you have created a cas file with one of these conversion programs you will have to pass this cas file through FIXCAS before you can load it in the most current emulators. To avoid this extra work you should instead use the version of DC.EXE available for download from this site.

Unlike XRoar (emulator method), conversion programs are suitable for autostarting and multi-part programs, they also overcome the need to find out a machine code programs start, end, and entry addresses.

Before using DC bear in mind that it is a DOS program that must be used from the command line. Being a DOS program means that the program follows the DOS filename restrictions (up to eight characters, a full stop, then an extension of up the three characters), so first rename your wav file to comply with these restrictions. For example, you could rename Crazy_Painter.wav to C_Paint.wav. After conversion you can always rename the relevant files with longer filenames.

As an aside, if you often use the command line in MS Windows you may find the Microsoft Powertoy "Open Command Window Here" of great use. The XP version is available from here http://www.microsoft.com/windowsxp/Down ... rtoys.mspx , other versions of Windows may have their own version (use a search engine to find the Powertoys page for your version of Windows, always use Powertoys designed for your version of Windows).

To use DC use the following construct:
DC filename.wav

The .wav extension is important. If all goes well DC will create a cas file, complete with a suitable name. More likely it will not go smoothly and you will be asked to enter values for wavelength and volume, it will take trial and error for each file to find values that work. Sometimes it may be easier to re-record the wav file, though one tip that I've found useful is to go back to the audio recording program, load the troublesome wav file, invert the wave form, and save the result, then use DC on the new wav file.


Conversion Software using Sixxie's XRoar-0.23pre3-tapemangle

Since I've only just downloaded it, it won't surprise you to learn that I have yet to use it. However on the face of it, it seems to overcome the problems of both DC and using the XRoar emulator approach.
sixxie
Posts: 1348
Joined: Fri Jul 18, 2008 8:36 am
Location: Hertfordshire
Contact:

Re: Feeding the Dragon ecosystem

Post by sixxie »

rolfmichelsen wrote:First, I have most of my Dragon software on old floppies. Reading these floppies on anything but my clunky Dragon will be a major undertaking. Getting hold of compatible/vintage drives, adapters and BIOS is getting increasinly difficult. It seems to me that it would be easier to read the floppies on the Dragon, dump the raw sectors over the RS232 interface, implement a simple tool on the other end to extract files from the DragonDOS image and finally dumping the files in an emulator-friendly format.
I've thought about this a few times, but as I do have an appropriate combination of PC bits right now, never got around to it. Shouldn't be too hard - just a little serial protocol where the PC can issue "read sector" commands and the like. Heh, in fact you could pretty much send the WD register updates over the wire and have the Dragon send back anything that was read in the process, that way you get to do pretty much anything to disks the Dragon can.
Even mor interesting perhaps, enabling creation of PC-based tools to create emulator-compatible files. Think about having a PC-based 6809 assembler writing CAS-files directly, or even a tiny C compiler. (gcc for Dragon, anyone?) Maybe nothing will happen, but it would be good to know that the knowledge and tools would be available to wannabe innovators. The emulators and the emulator-friendly file formats are the lifeblood of the Dragon community today.
Well GCC pretty much exists, and while it's CoCo-targetted, would probably work just fine for most stuff. My Perl 6809 assembler outputs to formats loadable by XRoar, though it's a very brute force assembler, I wouldn't really recommend it.
User avatar
rolfmichelsen
Posts: 299
Joined: Wed Apr 08, 2009 8:43 pm
Location: Oslo, Norway
Contact:

Re: Feeding the Dragon ecosystem

Post by rolfmichelsen »

Thanks! Lots of good stuff here already. I'm feeling an itch to start doing something about converting my floppy collection already :-)

-- Rolf
admin
Site Admin
Posts: 410
Joined: Thu Jul 17, 2008 10:22 pm

Re: Feeding the Dragon ecosystem

Post by admin »

Having converted quite a number of both tapes and disks I can provide the following:

1. Thank you Sixxie for the "tapemangle" version of XRoar - Before this, converting tapes by sampling them to WAV and then messing around with DC.EXE was a pain. Using the special version of XRoar has allowed for more accurate and easier conversions (the success rate with Xroar is much higher). DC.EXE still has its uses occasionally.

2. VCOPY under DOS running on an old 486 with a 5.25 inch drive will work, but struggles with anything other than standard formats. A much more flexible method using Linux on the same hardware was documented somewhere (I will dig it out) - used a number of definitions for different floppy formats and a simple dd to make a raw image of the disk..... to make it into VDK file a simple header was needed.

You should all be able to create new Wiki pages and edit them, so lets get some of this information sorted !
Simon Hardy
admin
Site Admin
Posts: 410
Joined: Thu Jul 17, 2008 10:22 pm

Re: Feeding the Dragon ecosystem

Post by admin »

I have created a new Tape/Disk preservation page (linked from sidebar in Wiki main page)... I have put some suggest headers and comments.... feel free to edit and add experiences.
Simon Hardy
User avatar
rolfmichelsen
Posts: 299
Joined: Wed Apr 08, 2009 8:43 pm
Location: Oslo, Norway
Contact:

Re: Feeding the Dragon ecosystem

Post by rolfmichelsen »

Great! I'll try to pitch in.

-- Rolf
Post Reply