simonowen / samdisk

A portable disk image utility, specialising in copy-protected PC-compatible formats.
http://simonowen.com/samdisk
MIT License
86 stars 11 forks source link

Copying a disk with '-d' option enabled copies every fourth track to destination image #5

Closed shattered closed 6 years ago

shattered commented 6 years ago

How to demo:

samdisk convert test.raw test.dsk

80 Cyls 2 Heads: 500Kbps MFM, 15 sectors, 512 bytes/sector, gap3=80: 0.0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1.0 15 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2.0 14 15 1 2 3 4 5 6 7 8 9 10 11 12 13 3.0 13 14 15 1 2 3 4 5 6 7 8 9 10 11 12 <...>

samdisk copy test.dsk test-d.dsk -d

40 Cyls 2 Heads: 500Kbps MFM, 15 sectors, 512 bytes/sector, gap3=80: 0.0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 500Kbps MFM, 15 sectors, 512 bytes/sector, c=4, gap3=80: 1.0 12 13 14 15 1 2 3 4 5 6 7 8 9 10 11 500Kbps MFM, 15 sectors, 512 bytes/sector, c=8, gap3=80: 2.0 8 9 10 11 12 13 14 15 1 2 3 4 5 6 7 <...>

simonowen commented 6 years ago

This seems to be double-stepping the input and output, which isn't what v3 used to do. It might still make sense to split the options to give independent control of each. I'll experiment :)

shattered commented 6 years ago

Also, if EDSK is produced from SCP image and not from raw, "copy -d" triggers assertion failure:

include/Header.h:40: CylHead::CylHead(int, int): Assertion `cyl >= 0 && cyl < MAX_DISK_CYLS' failed.

simonowen commented 6 years ago

I hope this is now resolved by b2d921a872c495a9fc90a50bf23880f1fe0815ec.

shattered commented 6 years ago

It is. Thanks!

simonowen commented 6 years ago

Thanks for confirming :)