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@tux.org http://www.tux.org/mailman/listinfo/fdutils
Hi,
Sorry, this might be a stupid question, but why can't you use the device to format the floppies? Once you've done that you can just use the dd command to bus the data to and from the floppy.
Or perhaps I'm missing something...
David. ----- Original Message ----- From: "Craig A. Vanderborgh" craigv@voxware.com To: fdutils@tux.org Sent: Wednesday, June 29, 2005 6:04 PM Subject: [fdutils] A Bizarre FD Format - the Ensoniq Mirage
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@tux.org http://www.tux.org/mailman/listinfo/fdutils
_______________________________________________ fdutils mailing list fdutils@tux.org http://www.tux.org/mailman/listinfo/fdutils
On Thu, 30 Jun 2005 00:26:54 +0100, David Carter-Hitchin david@carter-hitchin.clara.co.uk wrote:
Sorry, this might be a stupid question, but why can't you use the device to format the floppies? Once you've done that you can just use the dd command to bus the data to and from the floppy.
Having an Ensoniq sampler myself, and using Linux to interact with its disks, I can say that if you're doing file management on the PC, then it is far more convenient if the PC can write format the disks, too. But having said that, formatting them is usually last on the list - successfully reading them is usually the next task :-) And if making the PC format the disks is too hard, then using the sampler to do it is a fallback.
Oh, and congratulations, Craig on picking up the work on the Mirage. When I discovered it's strange disk format, I was glad I didn't need to attempt it...
Wade.
David. ----- Original Message ----- From: "Craig A. Vanderborgh" craigv@voxware.com To: fdutils@tux.org Sent: Wednesday, June 29, 2005 6:04 PM Subject: [fdutils] A Bizarre FD Format - the Ensoniq Mirage
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@tux.org http://www.tux.org/mailman/listinfo/fdutils
fdutils mailing list fdutils@tux.org http://www.tux.org/mailman/listinfo/fdutils
_______________________________________________ fdutils mailing list fdutils@tux.org http://www.tux.org/mailman/listinfo/fdutils
On 6/29/05, Craig A. Vanderborgh craigv@voxware.com wrote:
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.
You should be fine using overlapping sectors to set up the layout. For the format size code in the command, use the smallest sector you need on the track. For larger sectors pad out the size as multiples of this smallest sector size, using a valid header for the first sector, and dummy values for the padding.
i.e. to write a track containing 3 sectors of sizes 1024, 512 and 256, use (something roughly like):
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
The formatted track still contains 7 sectors at this point, but once you write data to each, the data from the larger sectors will overwrite the dummy headers leaving only the 3 sectors we want. You didn't mention the density or sectors sizes you need, so you'll need to tweak the above for your own requirements.
Simon Owen http://simonowen.com/
_______________________________________________ fdutils mailing list fdutils@tux.org http://www.tux.org/mailman/listinfo/fdutils
On 6/30/05, Simon Owen snowen@gmail.com wrote:
You didn't mention the density or sectors sizes you need, so you'll need to tweak the above for your own requirements.
Oops, yes you did! So using a base size of 512 bytes it'd be more like:
00 00 01 03 00 00 99 00 00 00 02 03 00 00 99 00 00 00 03 03 00 00 99 00 00 00 04 03 00 00 99 00 00 00 05 03 00 00 99 00 00 00 06 02
With the changing track number (and maybe skew), it might also be easier using the fdrawcmd interface directly with the device, rather than doing it all from the shell?
Simon Owen http://simonowen.com/
_______________________________________________ fdutils mailing list fdutils@tux.org http://www.tux.org/mailman/listinfo/fdutils
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