Dear fdutils experts,
A friend of mine recently asked me to help him backup some 3.5"
floppies for an ancient musical instrument, the Ensoniq Mirage. I've
found bits and pieces of information on the net and I've successfully
come up with a couple of utilities to dump/restore such floppies, using
fdrawcmd to read/write each track separately.
Unfortunately I also need to low-level format new floppies, because the
device itself can't do it without some long lost formatting software.
That's when I found this list and the recent posts about this very
issue!
To sum up, the floppies are SS DD, 80 tracks. Each track has 5 1KB
sectors + 1 512 byte sector. Tracks and secors are zero-based.
Here's a snippet from the 'dump' utility, which successfully reads a
Mirage floppy:
for ((t=0; t<80; t++)) do
fdrawcmd read 0 $t 0 0 3 6 0x1b 0xff \
length=5120 rate=2 need_seek track=$t
fdrawcmd read 0 $t 0 5 2 6 0x1b 0xff \
length=512 rate=2 need_seek track=$t
done
(Code based on GPL'd work by Jean Zundel.)
I need help with formatting. Here's what I've come up so far, merging
what I already knew with the recent posts on this list:
for ((t=0; t<80; t++)) do
tx=$(printf %02x $t)
echo -ne "\x$tx\x00\x00\x03\x$tx\x00\x99\x00"
echo -ne "\x$tx\x00\x01\x03\x$tx\x00\x99\x00"
echo -ne "\x$tx\x00\x02\x03\x$tx\x00\x99\x00"
echo -ne "\x$tx\x00\x03\x03\x$tx\x00\x99\x00"
echo -ne "\x$tx\x00\x04\x03\x$tx\x00\x99\x00"
echo -ne "\x$tx\x00\x05\x02"
done |
fdrawcmd format 0 2 11 0 0 rate=2
It's not working. I get an error "raw cmd: Input/output error".
Moreover, I'm not sure how to compute the fmt-gap parameter.
Am I missing some crucial information?
Do I need to inizialize the drive somehow?
Toby
--
«Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it.» -Brian W. Kernighan
_______________________________________________
fdutils mailing list
fdutils(a)tux.org
http://www.tux.org/mailman/listinfo/fdutils