fluxengine icon indicating copy to clipboard operation
fluxengine copied to clipboard

Headers of generated .scp files broken

Open markusC64 opened this issue 3 years ago • 0 comments

New sample file:

bsa-360.zip

fluxengine write ibm360 -i bsa-360k.img -d foo.scp --drive.rotational_period_ms 200

or

fluxengine write commodore1581 -i td1581.d81 -d foo.scp --drive.rotational_period_ms 200

(the sample file from #413 )has the following issue:

  • Header of generated .scp defective: end track (byte $7) and sides (byte $A) are wrong.

end track is $00 in the defective file. And sides should be "both".

This is the .scp spec: https://www.cbmstuff.com/downloads/scp/scp_image_specs.txt

I cite:

»BYTES 0x06 and 0x07 are the start track and end track bytes. Tracks are numbered 0-167, which is a maximum of 168 tracks (84 tracks with top/bottom). [...] BYTE 0x0A is the head number(s) contained in the image. This value is either 0, 1 or 2. If the value is 0 then both heads are contained in the image, which has always been the default for all SCP images (except C64). A value of 1 means just side 0 (bottom) is contained in the image, and a value of 2 means just side 1 (top) is contained in the image. NOTE: any program creating SCP image files should set this byte correctly.«

So in my example, byte $A should be $00, not $01. And byte $07 should be twice the number of the end track (+1 if side 1 is contained in the image), that is (if I haven't miscalulated) $9F for both the IBM360 image and for the 1581 image.

markusC64 avatar Sep 16 '22 07:09 markusC64