Hi, I've been trying to create a floppy image of an old DOS game (Return of Werdna) and been using fdutils (fdrawcmd) to attempt the creation. I am using the commands below to read each track from the floppy and write out the data to an image file.
The problem I'm having is that if I tell fdrawcmd the length to read is 4608 (9 sectors * 512 bytes), I get a full 720KB (737280 bytes) in my image file, however fdrawcmd tells me each read has "remaining=512". If I use length=4096, then I get "remaining=0" however my resulting image file is only 655360 bytes - a full 160 sectors shy of the entire disk.
It seems I'm missing an entire sector from each track and side of the disk. Any thoughts? The output may be helpful, but too long to include here so put it on pastebin (http://pastebin.com/EZEV8YeY).
--------------------------------------- #!/bin/bash TRACKS=80 OUT=/tmp/img
for ((i=0; i < $TRACKS; i++)) do phead=0 track=$i lcyl=$i rate=2 lhead=0 secnr=1 secsize=2 nrsect=0 length=4096
# first head fdrawcmd read $phead $lcyl $lhead $secnr $secsize $nrsect 0x1b 0xff length=$length rate=$rate need_seek track=$track >> $OUT
# second head phead=4 lhead=1 fdrawcmd read $phead $lcyl $lhead $secnr $secsize $nrsect 0x1b 0xff length=$length rate=$rate need_seek track=$track >> $OUT
done