CoCoSDC for TRS-80 Color Computer part 2

In my previous article, I ran through a brief history of disk drives for the Radio Shack TRS-80 Color Computer (“CoCo”). This was intended to give a better understanding to the significance of Darren Atkinson’s CoCoSDC floppy drive replacement.

CoCoSDC was designed to fit in to the FD-502 disk drive cartridge enclosure, so it has mounting holes in the same locations as the original controller. For those who do not have a dead FD-502 controller (or, like me, do not want to gut a perfectly good one), Tim Lindner has produced the CoCoSDC enclosure, which is two pieces of cut plexiglass with some mounting screws and standoffs. I have received my CoCoSDC from Ed “Zippster” Snider, and the enclosure parts from Tim (see photo). Ed was offering the CoCoSDC assembled for $40, or $30 in a kit. The enclosure is $10 (or a few bucks more assembled). For a total of $50 plus shipping, it is a great value (SD card not included).

The CoCoSDC has some flash storage which appears to the CoCo as a ROM, the same as the original ROM chips on a real disk drive (or Program Pak) cartridge. Although CoCoSDC could run with the original Disk Extended Color BASIC ROM, it would be very limited since you would have to configure the SD card on a PC/Mac with to disk images that would appear as Drive 0 and Drive 1 to the CoCo. It would be like having a dual-drive floppy system that you couldn’t switch diskettes! Instead, Darren modified Disk BASIC so you could select which disk image should be used for either DRIVE 0 or DRIVE 1. (The CoCoSDC can only act like those two drives.)

New BASIC commands (or rather, additions to existing commands) allow you to mount existing images from the SD card (just like inserting a floppy disk) or create new ones. For most “normal” stuff, you use a .DSK image, which is basically just an image file containing a bunch of 256-byte sectors that match the normal sectors of a floppy disk.

The original 1981 CoCo floppy drive was a 35-track drive with 18 sectors per track. Each sector was 256-bytes. Thus, a disk image of an original 1981 disk would be about 160K (161,280 bytes = 256 * 18 * 35) and represent 630 sectors. A 40-track disk would be 180K (184,320 bytes = 256 * 18 *40). A double-sided 40-track disk would be 360K (368,640 bytes = 256 * 18 * 40 * 2) and a double-sided 80-track disk would be 720K (737,280 bytes = 256 * 18 * 80 * 2).

The size of the .DSK file on the SD card tells the CoCoSDC what to do with it. Basically, if the file you try to mount is 737,280 bytes or less, it treats it as a bunch of standard sectors. For software that used the standard disk format (256-byte sectors), this works fine.

However, not all software used the standard disk format. Some software chose to use non-standard sector sizes, which was useful for getting more user storage on a diskette or, more commonly, for copy protection. A programmer could have a portion of the disk in normal sector format so Disk BASIC could load some booter code, then that code could bypass Disk BASIC and talk to the drive controller chip directly to seek to other parts of the floppy disk and read tracks with non-standard sector sizes. This provided a simple method of copy protection since Disk BASIC did not handle non-standard sector sizes. Attempting to BACKUP one of these copy protected disks would fail in Disk BASIC.

Special programs, like The Defeater by Carl England, were written that could recreate the special sectors and make a clone of any copy protected disk. The Defeater has also been used to make virtual disk images of copy protected diskettes so they can be used in CoCo emulators and, now, with the CoCoSDC.

CoCoSDC calls these .SDF images and they contain much more than just a series of 256-byte sectors. A full description of the format is on Darren’s CoCoSDC page. SDF is basically an update to an earlier .DMK format created for use with CoCo emulators, but Darren restructured it so it could be implemented with the limited RAM on the CoCoSDC processor. Darren provides a “dmk2sdf” program you can use to convert emulator DMK files to SDF files that can be loaded on a CoCoSDC SD card.

For my project, my first goal is going to be to clone all my legacy floppy disks to a CoCoSDC SD card. Most all of my floppies are normal 35-track disks so they will end up as .DSK files. I also plan to use The Defeater to make images of all my copy protected CoCo software to .SDF files as well. (I’ll have to write a separate article on that. I have had The Defeater ever since Carl showed it to me at a CoCoFEST, but I have never actually used it.)

To do this, I will need both my floppy controller and CoCoSDC plugged in at the same time, which means I need to use a Multi-Pak. The software in CoCoSDC is able to access the real floppy drive interface, and mix real floppy drives with virtual SD floppy drive images.

By default, CoCoSDC boots with all the drives being virtual SD drives. For my situation, I want Drive 0 to be my real CoCo floppy drive, and Drive 1 to be a CoCoSDC virtual drive. I want to turn off the virtual drive 0:


The “DRIVE” command is part of Disk BASIC. Normally, it is used to set the default drive to use for commands like “DIR” and “LOAD”. If I ran to load a program from drive 2, I would have to type LOAD “PROGRAM.BAS:2”, but if I first type DRIVE 2, all future commands will assume drive 2, thus:


…could instead be done as:


Darren has expanded this command so you can put “,ON” or “,OFF” after it to toggle the status of a virtual disk. After typing “DRIVE 0,OFF”, if I type “DIR 0” I should see my physical floppy drive 0 be listed.

To set a virtual drive, Darren has expanded the command to look for a quote character and a filename on the SD card. If I have a pre-created .DSK image called “BASIC.DSK” on the SD card, I could mount it as drive 1 by typing:


From that moment on, doing any access to Drive 1 would show the content of the BASIC.DSK file. However, in my case, I do not yet have any disk images. I can create one by adding the “NEW” keyword:


This should create a new file called “BASIC.DSK” (a 35-track singled sided disk image) in the root directory of the SD card. I could then insert a real floppy in to drive 0 and back it up to the virtual disk:


When the BACKUP is complete, I can swap out my floppy disks and insert to the next one. To swap out the virtual drive, Darren added an “UNLOAD” option:


I could then create my next disk and do a backup.

If all I had were standard 35-track Disk BASIC disks, this would be fine (if a bit time consuming with all the typing). A small program could be written to help automate this. It might ask you to type a short name for the disk you are inserting (8 characters or less, to match the filename of the .DSK image file) and then have you press ENTER to begin doing the “BACKUP 0 TO 1”. I will be writing (and sharing) such a program, soon.

Up next: 40 track floppies and other issues to solve.

3 thoughts on “CoCoSDC for TRS-80 Color Computer part 2

  1. Pingback: CoCoSDC for TRS-80 Color Computer part 3 | Sub-Etha Software

  2. Pingback: CoCoSDC for TRS-80 Color Computer part 5 | Sub-Etha Software

  3. Pingback: CoCoSDC for TRS-80 Color Computer part 4 | Sub-Etha Software

Leave a Reply