Mbed as floppy drive emulator

20 Jul 2011

A quick question has anyone tried to emulate an fdd and store the data on a USB memory stick at all

This is To replace an fdd in an old lighting desk any pointers welcome

Many thanks Chris

20 Jul 2011

Wow FDD, that's a long time ago! If I remember correctly it was 34-wire flatcable with 5V open collector drivers. About 11 control and data lines and the rest n/c or ground. You would have to check if this would work with the 3.3V open drain of the mbed (it might actually). The software is more complicated, the commands are extremely low level, like make a step and motor on. The data is serial with a kind of pulse coding. The standard density disks had always a clock pulse and then a datapulse (for 1) or no datapulse for 0. With double density the clockpulse was sometimes suppressed to reduce the bandwidth (still 1 or 2MHz). Old FDCs had a hardware chip with PLL to decode this signal.

20 Jul 2011

Some useful info here maybe?

http://hxc2001.free.fr/floppy_drive_emulator/

Regards
Daniel

21 Jul 2011

Chris,

The HXC2001 project that Daniel cited is open source. If it is not what you want, you might use it as a basis with the mbed replacing the PIC processor, but keeping the CPLD. There is also the DiscFerret project www.discferret.com which uses a FPGA to read and write ST506 interface hard drives and floppy drives. Since it can both read and write, it might be amendable to conversion to a floppy emulator (again, with an mbed processor as the driver). Finally, there is the Kryoflux project www.kryoflux.com and it's predecessor the Cyclone20 http://docs.google.com/Doc?ocid=dgddtc7_102gbzr2mgr&hl=en, http://eab.abime.net/showthread.php?t=40959, http://sourceforge.net/projects/cyclone20/ which use just an ARM processor to read and write floppy drives. They are not open source, but their history has information that suggests to me that an mbed should be able to emulate a floppy drive with nothing more than some TTL interface buffer chips and the right software.

Say for example you only need to emulate a '360K' drive with read-only media. There are mbed libraries for file systems on a USB 'gum-stick' drive and a 2-line LCD + push-button menu interface to 'mount' different disc images from the drive. The 640x400 VGA driver project code shows how to create a repeating bit stream plus a sync-pulse. Use that technique to create a FM or MFM read-data signal with 2.0 us timing slots from either of 2 track/head buffers of 12500 bytes each. Writing could be added by having the write-data signal drive an external 'capture' pin that is set-up to grab a timer sample to a DMA buffer. A tight loop in the main() routine keeps up with the DMA samples, and updates the bits in the track buffer. Interrupts from the step signal cause the track buffers to be written and read from the active image file.

Larger discs (e.g. 1.44M) or 'fancy' data formats or speed variations may be beyond the mbed's capabilities, but I'll bet a Beagle Board could do those jobs with just some software :-).

Fred

21 Jul 2011

Hi

many thanks for your time for all your replies and suggestions

i think its now time to go and digest all the info and come up with a cunning plan and hopefully something will come of it

cheers

Chris

22 Jul 2011
09 Jun 2016

Floppy emulator with SD card.