Alain Knaff wrote:
> On Thursday 30 June 2005 12:02, Simon Owen wrote:
>
>
>> cat > track_data
>> 00 00 01 03
>> 00 00 99 00
>> 00 00 99 00
>> 00 00 99 00
>> 00 00 02 02
>> 00 00 99 00
>> 00 00 03 01
>> ^D
>>
>> fdrawcmd format 0 2 7 0x2b 0xf6 track=0 < track_data
>>
>
>
> Just pointing out a minor error: fdrawcmd takes binary input, not
> ASCII. So your track data file would need to be filled with binary
> charachers, as follows (where echo is bash's or zsh's builtin echo
> command):
>
>
> echo -ne '\x00\x00\x01\x03' >track_data
> echo -ne '\x00\x00\x99\x00' >>track_data
> echo -ne '\x00\x00\x99\x00' >>track_data
> echo -ne '\x00\x00\x99\x00' >>track_data
> echo -ne '\x00\x00\x02\x02' >>track_data
> echo -ne '\x00\x00\x99\x00' >>track_data
> echo -ne '\x00\x00\x03\x01' >>track_data
>
> fdrawcmd format 0 2 7 0x2b 0xf6 track=0 < track_data
>
>
>
> Regards,
>
> Alain
>
>
>
Hello Again,
First - thanks a lot for Alain and Owen for the replies. Next - an
answer the obvious question of "why". Many Mirages including my own are
now over 20 years old. The floppy disk drive is the thing that always
fails, usually by refusing to format disks. Thus I have decided to
write some public-domain utilities to format, read, and populate Mirage
floppies on Linux.
There is one other thing that I did not mention, which is that the
Mirage appears to need zero-based track and sector numbering.
I have taken your proposed solution, and expressed it in the form of the
following 2 scripts:
#!/bin/bash
echo -ne '\x00\x00\x00\x03' > track_data
echo -ne '\x00\x00\x99\x00' >> track_data
echo -ne '\x00\x00\x01\x03' >> track_data
echo -ne '\x00\x00\x99\x00' >> track_data
echo -ne '\x00\x00\x02\x03' >> track_data
echo -ne '\x00\x00\x99\x00' >> track_data
echo -ne '\x00\x00\x03\x03' >> track_data
echo -ne '\x00\x00\x99\x00' >> track_data
echo -ne '\x00\x00\x04\x03' >> track_data
echo -ne '\x00\x00\x99\x00' >> track_data
echo -ne '\x00\x00\x05\x02' >> track_data
This creates the track data file, with zero-based (I hope) sector
numbering. Then, the following one-liner does the formatting:
#!/bin/sh
for i in `seq 0 79`
do
fdrawcmd format 0 2 11 0x2b 0xf6 track=$i < track_data
done
I believe that this is what you suggested, right Owen? The floppy
appears to format, but the Mirage doesn't like it (I can't save to it).
So the next question is this: What kinds of things can I do using
fdutils to compare this "new" format to a real Mirage format? What
could I look at to begin to determine what is going wrong?
Please advise if possible.
Thanks a lot to all!!
craig vanderborgh
voxware incorporated
> _______________________________________________
> fdutils mailing list
> fdutils(a)tux.org
> http://www.tux.org/mailman/listinfo/fdutils
>
>
>
_______________________________________________
fdutils mailing list
fdutils(a)tux.org
http://www.tux.org/mailman/listinfo/fdutils
Hello,
I just joined the fdutils list, hoping to figure out how to make use of
fdutils to create a command-line utility to format, read, and write 3.5
DD disks for the Ensoniq Mirage on Linux. The Mirage is a strange,
wonderful instrument - it's an 8-bit sampler from the 80's cursed by a
limited amount of storage on a very strangely arranged 3.5" DD disk.
Mirage disks are formatted this quite weird way:
o single-sided
o 80 tracks
o each track contains five type 3 sectors (1024 b) + one type 2 sector
(512 b)
So the real problem here is that the each track contains 2 sector
types. I have successfully *read* these disks, by dumping out each
sector. Here is a bash loop that dumps out the Mirage disk data:
do
fdrawcmd read 0 $i 0 0 3 6 0x1b 0xff \
length=5120 rate=2 need_seek track=$i \
> $REPERTOIRE/d$i.dmp 2> /tmp/mirage-data.err
fdrawcmd read 0 $(($i)) 0 5 2 6 0x1b 0xff \
length=512 rate=2 need_seek track=$i \
> $REPERTOIRE/s$i.dmp 2> /tmp/mirage-small.err
cat /tmp/mirage-data.err | xargs echo
cat /tmp/mirage-small.err| xargs echo
done
So we have gotten to the point where we can use some rustic "fdrawcmd"
invocations in a script to dump out the sample data. I have examined
the results. THIS DOES WORK. So at least we understand the disk format
to the point where we can dump out the wavesamples and other data using
a script.
What I'd like to do now is to be able to read, write, and format these
disks (cp, fdformat, etc.). I understand that the out-of-the-box
fdutils will probably not do what is needed for this disk format that
has 2 sector sizes on each track.
The question is this - what is the best way for me to proceed? Do I
need to write a program that does "fdrawcmd"-type stuff, or can I do
some driver/kernel level work to accomodate the Mirage format, and then
use the standard Linux utilities??
Please advise - I am ready to do some hard work on this and just need
some direction.
Thanks in advance,
craig vanderborgh
_______________________________________________
fdutils mailing list
fdutils(a)tux.org
http://www.tux.org/mailman/listinfo/fdutils