2024-03-02: The wiki ran out of disk space, so things were not working. This has been resolved by adding another 5GB of quota ;-) Thanks to Tim Lindner for reporting the issues. 2020-05-17: If a page gives you an error about some revision not being found, just EDIT the page and the old page should appear in the editor. If it does, just SAVE that and the page should be restored. OS-9 Al (talk) 12:22, 17 May 2020 (CDT)

Hacking Disk

From CoCopedia - The Tandy/Radio Shack Color Computer Wiki
Jump to navigation Jump to search
Looking for CoCo help? If you are trying to do something with your old Color Computer, read this quick reference. Want to contribute to this wiki? Be sure to read this first. This CoCo wiki project was started on October 29, 2004. --OS-9 Al

See Recent Changes. | About this site. | Join the E-Mail List or Facebook Group. | Contact me with updates/questions.

This page was last updated on 03/5/2024. Total Pages: 730. Total Files: 993.

Home / Hardware - Hacking Disk


Color Computer Floppy Drive Info

Go Back

Adding Floppy Drives

One of the coolest things about the CoCo (IMO) is that it can use standard PC floppy drives. Unfortunately, Disk Basic (RSDOS) only uses one side, and low density of course... 35 tracks, which yields 156K per floppy.

In this article I will attempt explain how to use both sides of your disks under RSDOS, as well as how to (and why you may not want to) use 40 or 80 tracks (up to 720K per disk!).

The original RS setup can have some issues... the Side-Select line is used as the fourth drive select line and not all drive select lines go through to all connectors (depending on your model).

RSDOS (Disk Extended Color Basic) is able to control up to four single sided 35 track floppy drives. Simply plug in a second floppy (and jumper it as D1) and you have another 35 track SS drive accessible as drive 1 (the first drive is drive 0). If we use the side-select line for it's intended purpose, we can select any four sides of six possible (3 double sided drives) to be used by RSDOS as drives 0 to 3. To make a sweet deal even sweeter, you can (with a few pokes) change drive designations on the fly. NOTE that this only applies to DECB (not OS-9 or others) and on a CoCo1 or 2 requires 64K in all RAM mode.

To add a 3�" floppy, you'll need to adapt:

1.) Power adapter. I cut one off an old PC power supply and soldered it into my FD-500 (cut off the old plug)... *or* you can buy adapters at nearly any computer store.

2.) 34 pin dual row plug. You can buy an adapter *or* crimp one (taken from a PC floppy cable, or buy new ones) right onto the CoCo's original disk cable, *or* you can use a PC floppy cable, which may be best if you plan to use double sided drives (more on this in the next section). If you use a PC cable, get one at least as long as the CoCo's original and remove the twist (you can simply cut off that end of the cable, or remove the connectors, untwist and replace connector), and change the controller-end connector to a 34 pin card-edge connector, ala CoCo.

VIOLA! Now you're ready to plug and play!

How can I use DOUBLE sided drives?

Before we go further, remember that this is only for Disk Basic. OS9 and I beleive all other CoCo OSes handle DS drives normally (and will not recognize these pokes).

To access SIDE 2 of your floppies under Disk Basic you must first make sure that all of the drive select lines (pins 10, 12 and14 and pin 32 which is actually the side select line) are connected to all the drives, and that the drives are properly jumpered as drive0, 1 or 2. Under Disk Basic, the way to use the other side is to identify it as a separate drive. This means the fourth drive select line is set at the same time as the drive select line for a given drive.

So we must patch the CoCo's drive access table. For RSDOS 1.0 the table begins at location 55210, and for RSDOS 1.1 it begins at 55453. The table consists of four bytes which correspond to the four drives.

NOTE: older 64K CoCo's must be put into all RAM mode before you can change these values.

Drive Location (1.1) Default Value binary (decimal) 0 55453 0000001 (1) 1 55454 0000010 (2) 2 55455 0000100 (3) 3 55456 1000000 (64)

The pattern of the default binary values is clear. The bits 0, 1, 2 and 6 correspond to the drive select lines (pins 10, 12, 14 and 32) from the controller. Bit 6 is actually the side select.

Now I'll use my own CoCo as an example:

I have the original 35 track single sided drive (it's actually a 40 track drive, but still only single sided) designated as drive 0. I have a 3�" floppy drive as drives 1 and 2. Since drives 0 and 1 are correctly mapped by default, the only change needed is to location 55455* (drive 2) to tell it to use drive 1, side 2 as follows: (Remember, for Disk Basic 1.0 the table location is different. see above)

Drive Location (1.1) Default Value binary (decimal) 0 55453 0000001 (1) 1 55454 0000010 (2) 2 55455 1000010 (66) 3 55456 1000000 (64)

So you would use POKE55455,66 to tell Disk Basic where DRIVE2 is. (in these examples I have left Drive 3 at its default setting since I don't use it.)

another example:

My system also includes a switch to swap the drive select lines 0 and 1. If I use this switch to make the 3� floppy Drive 0, the access table changes:

Drive Location (1.1) Default Value binary (decimal) 0 55453 0000001 (1) 1 55454 1000001 (65) 2 55455 0000010 (2) 3 55456 1000000 (64)

So I use POKE55454,65:POKE55455,2 (Again, remember to use the addresses for your version of Disk Basic)

This results in the 3�" floppy becoming drives 0 and 1, while the old 5� becomes drive 2 (btw, OS9 doesn't use this table and expects to be in drive 0 when booting from RSDOS). I also installed a switch to invert the SIDE SELECT line (this was an added bonus since I already had an available inverter from a previous project, a Disk Drive power light). With this setup I can backup a 2 disk (or 'flippy' disk) game onto both sides of a 3�" floppy, and when the game says to flip the disk or insert disk 2, I just flip the side-swap switch. :-)

40 and 80 track access: Pros and Cons

Okay, let me try to make a long story short... CoCo disk tracks are divided into two granules. There are 35 tracks, minus one for the directory (track 17). This gives us 68 granules on a newly formatted floppy, all kept track of in the GAT (Granule Allocation Table). Changing the number of tracks the CoCo uses means changing the size of the GAT. 40 or 80 track drives would have 78 or 158 granules, respectively.

Since RS-DOS is designed to handle up to 4 drives, there are 4 areas in RAM set aside for the 4 GATs. One byte per granule plus 6 bytes overhead per drive equals 74 bytes per drive, or 296 bytes total (for GAT storage). Some quick math shows us that only three 40 track or one (gasp!) 80 track can fit in the alloted space! (remember, in RS-DOS each side counts as a separate drive, so 2 double-sided drives equals 4 drives to RS-DOS.)

The good news...

The good news is that you can patch Disk Basic to relocate the GAT. The patch program 4080DSK.BAS and a 40 to 35 track disk fixer DFIX35.BAS are included on the Color FOG disk image. These programs originally appeared in The Rainbow, July 1985. Copyright 1985 Colin J. Stearman. Colin, I hope you see this and are amazed that someone still finds this stuff useful and/or interesting.

And the BAD news...

the bad news is that you lose compatibility. If you modify RS-DOS for 80 track drives, you will not be able to read or write your 35 or 40 track disks. A 40 track setup will read and write your 35 track disks. If you wish to use your 40 track formatted floppies in a 35 track system you should run the DFIX35.BAS program immediately after formatting a disk to prevent data being saved on the last 5 tracks or else the disks may contain data that cannot be read by a stock CoCo.

Download the disk