[Coco] Easy way to copy 40 track disks to the CoCoSDC?

Arthur Flexser flexser at fiu.edu
Sat Apr 25 15:27:33 EDT 2015


A way to do it without needing a program that copies ROM to RAM is by using
a simple Basic program that loads the DSKCON parameters at $EA to $EF for
each sector in turn for the 40 tracks and executes DSKCON, once for reading
each from the source disk and once for writing to the destination disk.
Basic does no check for maximum track number in this case.

$EA   operation code (2=read, 3=write)
$EB   drive number
$EC   track number
$ED   sector number
$EE-EF  address of the start of a 256-byte buffer for the sector to be read
to or written from.
$F0    error code, should be zero if the operation went okay

Off the top of my head, for a backup from Drive 0 to Drive 1:

10 EX=256*PEEK(&HCOO4) + PEEK(&HC005)  'get DSKCON address
20 POKE&HEE,6:POKE&HEF,0  'put buffer at $600
30 FOR TK = 0 TO 39
40 POKE &HEC, TK
50 FOR SC = 1 TO 18
60 POKE &HEA,2  'read sector command
70 POKE &HEB,0  'source drive = 0
80 POKE &HED, SC
90 EXEC EX  'read sector from source disk
100 POKE &HEA,3  'write sector command
110 POKE &HEB,1  'destination drive = 1
120 EXEC EX  'write sector to destination disk
130 NEXT:NEXT
140 PRINT "BACKUP COMPLETE"

This ignores the contents of $F0 and copies each sector regardless of any
error.

Art

On Sat, Apr 25, 2015 at 12:28 PM, Daniel Campos <daniel.campus at gmail.com>
wrote:

> Hello,
>
> I'm continuing on my efforts to recover the remaining disks, but some of
> them are 40 track disks and I think the BACKUP command on the SDC-DOS is
> not recognizing the sources as 40 tracks. There is some way to easily copy
> them to a .SDF file ?
>
> Daniel
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
>


More information about the Coco mailing list