[Coco] Reading/Writing Model I/III/4 Disks on a CoCo
Bob Devries
devries.bob at gmail.com
Thu Sep 5 18:05:08 EDT 2013
Here's the code I use to copy from a disk image to a real floppy. This works
for me on OS-9 disks, but may need changes for non-OS-9 disks.
DIM inpath, outpath:INTEGER
DIM sector(256):BYTE
OPEN #inpath,"image.dsk":READ
OPEN #outpath,"/D0@":WRITE
WHILE NOT(EOF(#inpath)) DO
GET #inpath,sector
PUT #outpath,sector
ENDWHILE
CLOSE #outpath
CLOSE #inpath
END
I have never seen any disk change error using this method, but the target
disk *MUST* be formatted to the parameters of the image.
I suspect that if you want to use Basic09 to copy DECB disks, then it may be
wise to start at sector 2 of track 0, and then copy the LSN sector last.
Regards, Bob Devries
Dalby, QLD, Australia
More information about the Coco
mailing list