[Coco] OS-9 and RS-DOS disk structures
Allen Huffman
alsplace at pobox.com
Wed Dec 31 00:18:12 EST 2014
> On Dec 30, 2014, at 9:50 PM, Robert Gault <robert.gault at att.net> wrote:
> The double sided OS-9 disks alternate tracks such that all the even tracks are on side one and all the odd tracks are on side two of a floppy. The default format for emulators is to alternate the "front" and "back" tracks which is easy to see if you examine the .dsk/.os9 images.
Hmmm. If I have a disk in my CoCo, and it is POKED to DRIVE 0 is the normal side of my bottom drive, and DRIVE 2 is the back side of the same drive, then I write
Track 0, sectors 1-18 with 0s...
Track 1, sectors 1-18 with 1s...
...
Track 34, sectors 1-18 with 34s...
Then I go to DRIVE 2 and do something like 100s, 101s, 102s, etc...
As OS-9 would read sectors, it would see track 1 be 0s, then track 2 be 100s, then track 3 be 1s, then track 4 be 101s? Am I seeing that properly?
Then if I was making a .DSK image file for OS-9, would I write it out that same way?
> Given that a Coco requires track34 to be the boot track for OS-9 which normally would be sector $264 on a single sided disk, a double sided OS-9 disk will display the boot track starting at sector $4C8. It's twice the sector value as OS-9 alternates between the front and back sides of the disk. That results in sector $4C8 being on the front side at track34.
>
> It is much easier to transfer files from Basic disks to OS-9 disks under OS-9 control than it is under Disk Basic. You mentioned RSDOS and I can supply you with an OS-9 program I wrote, HRSDOS, which reads Disk Basic directories and can transfer files in either direction.
I recall there was "rsdos" and "pcdos" that I *think* had the same command line options (same author?) and could dir, get, put files from OS-9 to RS-DOS or PC-DOS disks. I do not think I ever saw yours.
Right now, I am far from having OS-9 even bootable. Since my goal is to create .DSK image clones of all my disks, I was hoping I could do that all from OS-9 or from RS-DOS so all I had to do was insert disk, press ENTER.
The program I wrote tonight allows me to toggle a few basic settings under CoCoSDC DOS:
[I]nput Drive: 0-3 (physical floppy, DRIVE x,OFF)
[F]ormat: DECB or OS-9 (so I know how to handle double sided disks)
[S]ides: 1 or 2
[T]tracks: 35, 40, 42, etc.
[O]utput SDC#: (0 or 1, DRIVE x,"IMAGE",NEW)
For 35 track single-sided RS-DOS disks, my work is done. I just type in a name for the image ("UPGRAD39") and if it already exists, I get prompted to overwrite it or type a new name. Then it does a track by track backup.
But I want to make it also handle my OS-9 disks -- the downside is I have to know what they are before I insert them! I'm too lazy to parse LSN0, though I figure at some point, I will probe the disk and be able to determine if it looks like an OS-9 disk and see what values I can read that way :)
Thoughts?
(I will write up this project and post the code to my www.subethasoftware.com blog soon. I just want to polish it up a bit more than my first few hours of coding.)
--
Allen Huffman - PO Box 22031 - Clive IA 50325 - 515-999-0227 (vmail/TXT only)
Sub-Etha Software - http://www.subethasoftware.com - Established 1990!
Sent from my MacBook.
P.S. Since 4/15/14, I have earned OVER $600 in Amazon gift cards via Swagbucks! Use my link and I get credit:
http://swagbucks.com/refer/allenhuffman
More information about the Coco
mailing list