Hi everybody,
I have some floppy disks (both 5.25" and 3.5") for an old Spectrum compatible computer that uses Spectrum Basic with floppy disks.
Anyway, these are 720K DD disks with 80 cylinders, 2 sides, 18 sectors per track per side and interleaved like this:
[UTILS1.TD0]
82 Cyls, 2 Heads:
250Kbps MFM, 18 sectors, 256 bytes/sector:
0.0 1 10 2 11 3 12 4 13 5 14 6 15 7 16 8 17 9 18
1.0 1 10 2 11 3 12 4 13 5 14 6 15 7 16 8 17 9 18
2.0 1 10 2 11 3 12 4 13 5 14 6 15 7 16 8 17 9 18
3.0 1 10 2 11 3 12 4 13 5 14 6 15 7 16 8 17 9 18
.............. and so on
I'm trying to find a way to copy these disks as raw image files in Linux, while preserving the physical order of sectors on the physical disk.
If I do:
setfdprm /dev/fd0 dd cyl=80 head=2 sect=18 ssize=256
and then:
dd if=/dev/fd0 of=/home/knoppix/none/disk.img
I get the raw image containing the sectors in the logical order (1 2 3 4 5 6 ... instead of 1 10 2 11 3 12 ...)
So the next thing I tried was to use fdrawcmd and send a raw command to the FDC.
The thing is, what I need is a READ TRACK command to 82072, which according to the data sheet would copy one side of a cylinder in the physical order of sectors, exactly as they are laid on disk.
I'm not sure why, but the READ TRACK command is not mentioned in the fdrawcmd documentation, only the READ command ... (???)
Also the need_seek parameter is not mentioned, nor the track= parameter...
I had to check the fdutils sources to figure out the actual argument to pass to fdrawcmd... (read_track)
So I tried this:
fdrawcmd read_track 0 0 0 1 1 0 0x1b 0xff rate=2 length=4608 need_seek track=0 > track.bin
but to my disappointment I still get the sectors in their logical order in the 4608 byte data chunk saved.
So bottom line, is there any way to save the sectors in their physical order using fdutils?
Or maybe I should change the sources and rebuild fdutils?
Thank you
Cristian