[Coco] Reading floppies with CRC error?

Kandur k at qdv.pw
Tue Aug 19 22:43:38 EDT 2014


Thanks Tim.
Yes, the CRC error comes from the drive controller, not from the OS, it just passes it along. 
This 'read track' program could even show the address marks, pre- and post-gap etc.
Way back when, I used a CP/M or ML program, just to do that.
Two questions:
1)	What is the easiest way to xfer this code to the Coco?
2)	Where will this program write the recovered output?

Kandur

Tuesday, August 19, 2014, 7:14:41 PM, you wrote:
> On Tue, Aug 19, 2014 at 9:30 AM, Kandur <k at qdv.pw> wrote:

>> Reading floppies with CRC error?


> It is possible to patch RSDOS' DSKCON to do track reads instead of sector
> reads.

> A track read will decode data from index hole to index hole as the disk
> spins, it will not stop on CRC errors. If the MFM signal from the disk
> becomes corrupted it will continue reading. Depending on where the
> corruption is, this allows you to read partial sectors. It will also read
> non-corrupted sectors after a corrupted sector because it will
> resynchronize on valid ID address marks.


> 10 CLEAR 500, &H5FFF: ' RESERVE BUFFER FROM $6000-$6FFF
> 20 DV=PEEK(&HC006)*256+PEEK(&HC007): ' GET DSKCON TABLE ADDRESS
> 30 DC=PEEK(&HC004)*256+PEEK(&HC005): ' GET DSKCON EXECUTION ADDRESS
> 35 PRINT "THIS PROGRAM WILL DO A TRACK READ AND PUT THE DATA IN $6000 -
> $6FFF"
> 40 INPUT "DRIVE NUMBER TO READ";DR
> 40 INPUT "TRACK NUMBER TO READ";TR
> 50 POKE DV,0: ' SET DSKCON COMMAND TO TRACK SEEK
> 60 POKE DV+1,DR: ' SET DRIVE
> 70 POKE DV+2,TR: ' SET TRACK
> 80 EXEC DC: ' GO DO COMMAND
> 90 POKE DV,2: ' SET DSKCON COMMAND TO READ SECTOR
> 100 POKE DV+4,&H60
> 110 POKE DV+5,&H00: ' SET DSKCON BUFFER TO &H6000
> 120 POKE &HD7F9,&HE0: ' CHANGE READ SECTOR OPCODE TO READ TRACK OPCODE
> 130 POKE &HD856,&HE0: ' IN TWO PLACES
> 140 POKE &HD762,1: ' SET RETRY COUNT TO ONE
> 150 EXEC DC: ' GO DO COMMAND
> 160 POKE &HD7F9,&H80: ' CHANGE READ SECTOR OPCODE BACK
> 170 POKE &HD856,&H80: ' IN TWO PLACES
> 180 POKE &HD762, 5 : REM SET RETRY COUNT BACK TO 5
> 190 ' BUFFER AT $6000 CONTAINS RAW TRACK READ
> 200 END

> Note #1: The above program is untested, it was modified from something I'd
> written a long time ago: <http://tlindner.macmess.org/?page_id=92>
> Note #2: To interrupt the data from a track read command, you'll need to be
> familiar with the on-disk format described here: <
> http://bitsavers.trailing-edge.com/pdf/westernDigital/FD179X_Data_Sheets_May80.pdf

> -- 
> tim lindner


More information about the Coco mailing list