markusC64 / g64conv

converts between .g64 and textual representuation, simple d64 support is available
GNU General Public License v3.0
18 stars 2 forks source link

D64 files with sector errors: $02 when $03 expected #1

Open fabzzap opened 6 years ago

fabzzap commented 6 years ago

One variant of the D64 format is

Standard 35 track layout but with 683 error bytes added on to the end of the file. Each byte of the error info corresponds to a single sector stored in the D64, indicating if the sector on the original disk contained an error. The first byte is for track 1/0, and the last byte is for track 35/16.

according to Peter Schepers' document, https://ist.uwaterloo.ca/~schepers/formats/D64.TXT .

g64conv's g64tod64 functionality is able to create D64 files with such info. However, in a test the error info contained bytes $00 and $02, where the expected result was $01 and $03. The copy protection scheme on that file relied on the error byte being $03, so it was failing.

markusC64 commented 6 years ago

Thanks for your bug report. I'll look at it. And thanks for updating it. The original report did not tell me the necessary information.

Please note the remark from the document you linked:

Converting this error [03] to a D64 is very problematic because it depends on where the physical head is on the disk when a read attempt is made. If it is on valid header/sectors then it won't occur. If it happens over an area without SYNC marks, it will happen.

And I may add: If a real drive sees this error may in some cases depend on the actual rotating speed which has little tolerance.