Posts: 2
Joined: Sat Apr 06, 2013 9:17 am

Raspberry Pi as a universal floppy disk drive emulator

Tue Oct 15, 2013 10:51 pm


This wasn’t specifically a Raspberry Pi project but since it works very well with this nice hardware it is worth to be presented here:


This a universal floppy disk drive emulator based on the old USB HxC Floppy Emulator. This board was designed in 2006. This is a specialized floppy data shifter/streamer (USB to Floppy interface). A PC was needed to constantly feed the board.

The Raspberry Pi is like miracle : The combination of the two devices make a very powerful standalone floppy emulator with network capabilities : wired and wireless :)

Here is some videos :

Web browser floppy image upload & control :

The first tries :

Regarding the machines and floppy formats supported, the emulator can support any computer using Shugart, PC, or similar floppy interface : Amiga, Atari ST, CPC, TRS80, PC, Keyboards, Samplers, CNC Tools…
The list of the tested devices can be found here : ... upport.htm

The list of the file floppy images format directly supported can be found at the end of this post.

The device also support floppy disk protections emulation : Variable bitrate, flakeybits and so on.

One major limitation of the actual hardware : It doesn’t support the write from the host computer !

To make the emulator working on the Raspberry Pi, just get the sources from the sourceforge repository :
and do a “make” into the “build” folder.

The USB interface use the libFTDI.
If you want to use the GUI, the X11 devel library will be needed (GUI based on FLTK).

All is working on the Raspbian distribution.

About the hardware you can found all you need to build it yourself there : ... yEmulator/
You can also buy it pre-made.

Next step of this project : Update the USB HxC Floppy Emulator hardware to add the write support and to use more modern parts ;).

Code: Select all

HxC Floppy Emulator : Floppy image file converter
Copyright (C) 2006-2013 Jean-Francois DEL NERO
This program comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions;

libhxcfe version :

-                   libhxcfe file type support list                       -
MODULE ID          ACCESS    DESCRIPTION                         Extension

KRYOFLUXSTREAM      (R ) :  KryoFlux Stream Loader                (*.raw)
AMIGA_DMS           (R ) :  AMIGA DMS Loader                      (*.dms)
AMIGA_ADZ           (R ) :  AMIGA ADZ Loader                      (*.adz)
AMIGA_EXTADF        (R ) :  AMIGA EXTENDED ADF Loader             (*.adf)
AMIGA_OLDEXTADF     (R ) :  AMIGA OLD EXTENDED ADF Loader         (*.adf)
ZXSPECTRUM_FDI      (R ) :  ZX SPECTRUM FDI Loader                (*.fdi)
AMIGA_ADF           (R ) :  AMIGA ADF Loader                      (*.adf)
ACORN_ADF           (R ) :  ACORN ADF Loader                      (*.adf)
AMSTRADCPC_DSK      (RW) :  Amstrad CPC DSK Loader                (*.dsk)
ATARIST_DIM         (R ) :  ATARI ST DIM Loader                   (*.dim)
ATARIST_STX         (R ) :  Atari ST STX/Pasti Loader             (*.stx)
ATARIST_STT         (R ) :  ATARI ST STT Loader                   (*.stt)
COPYQM              (R ) :  COPYQM IMG Loader                     (*.dsk)
TELEDISK_TD0        (R ) :  TELEDISK TD0 Loader                   (*.td0)
ATARIST_MSA         (RW) :  ATARI ST MSA Loader                   (*.msa)
RAW_IMZ             (R ) :  IBM PC IMZ Loader                     (*.imz)
HXCMFM_IMG          (RW) :  HXC MFM IMG Loader                    (*.mfm)
ORIC_DSK            (R ) :  ORIC DSK Loader                       (*.dsk)
ATARIST_ST          (R ) :  ATARI ST ST Loader                    (*.st)
ROLAND_W30          (R ) :  Roland W30 file Loader                (*.w30)
SPS_IPF             (R ) :  SPS IPF Loader                        (*.ipf)
TI994A_V9T9         (RW) :  TI99 4A V9T9 Loader                   (*.v9t9)
AMIGA_FS            (R ) :  AMIGA FS Loader                       (*.amigados)
PROPHET2000         (R ) :  PROPHET 2000 Loader                   (*.img)
RAW_IMG             (R ) :  IBM PC IMG Loader                     (*.img)
MSX_DSK             (R ) :  MSX DSK Loader                        (*.dsk)
FAT12FLOPPY         (R ) :  FAT12/MS DOS Loader                   (*.fat)
HXC_HFE             (RW) :  SD Card HxCFE HFE file Loader         (*.hfe)
HXC_EXTHFE          ( W) :  SD Card HxCFE EXTENDED HFE file Loader(*.hfe)
HXC_HDDD_A2_HFE     ( W) :  SD Card HxCFE HFE file Loader (HDDD A2 Support)(*.hfe)
VTR_IMG             (RW) :  VTR IMG Loader                        (*.vtr)
IMD_IMG             (RW) :  ImageDisk IMD file Loader             (*.imd)
HXC_AFI             (RW) :  HxC AFI file loader                   (*.afi)
C64_D64             (R ) :  C64 D64 file image loader             (*.d64)
C64_D81             (R ) :  C64 D81 Loader                        (*.d81)
ZXSPECTRUM_TRD      (R ) :  Zx Spectrum TRD Loader                (*.trd)
ZXSPECTRUM_SCL      (R ) :  ZX SPECTRUM SCL Loader                (*.scl)
THOMSONTO8D_SAP     (R ) :  THOMSON TO8D SAP Loader               (*.sap)
TRS80_JV1           (R ) :  TRS80 JV1 Loader                      (*.jv1)
TRS80_JV3           (RW) :  TRS80 JV3 Loader                      (*.jv3)
TRS80_JVC           (R ) :  TRS80 JVC Loader                      (*.jvc)
SVD                 (R ) :  SVD Loader                            (*.svd)
NEC_D88             (RW) :  NEC D88 Loader                        (*.d88)
X68000_HDM          (R ) :  X68000 HDM file Loader                (*.hdm)
RAW_LOADER          (RW) :  RAW Sector loader                     (*.img)
SNES_SMC            (R ) :  Super famicom SMC Loader              (*.smc)
VEGAS6809           (R ) :  VEGAS6809 image Loader                (*.veg)
TRS80_DMK           (RW) :  TRS80 DMK Loader                      (*.dmk)
TI994A_PC99         (R ) :  TI99 4A PC99 Loader                   (*.pc99)
APRIDISK            (R ) :  APRIDISK Loader                       (*.dsk)
ENSONIQ_EDE         (R ) :  ENSONIQ EDE Loader                    (*.ede)
FAT12FLOPPY         (R ) :  FAT12/MS DOS Loader                   (*.fat)
ENSONIQ_GKH         (R ) :  ENSONIQ GKH Loader                    (*.gkh)
THOMSON_FD          (R ) :  THOMSON FD Loader                     (*.fd)
CASIO_FZF           (R ) :  Casio FZF file Loader                 (*.fzf)
DRAGON3264_VDK      (R ) :  DRAGON32 & 64 VDK Loader              (*.vdk)
OBERHEIM_DPX        (R ) :  Oberheim DPX Loader                   (*.dpx)
ENSONIQ_EDM         (R ) :  Ensoniq mirage EDM Loader             (*.edm)
EMAX_EM             (R ) :  EMAX EM1 & EM2 Loader                 (*.em1)
SAMCOUPE_MGT        (R ) :  SAM COUPE MGT Loader                  (*.mgt)
SAMCOUPE_SAD        (R ) :  SAM COUPE SAD Loader                  (*.sad)
EMULATORII          (R ) :  E-mu Emulator II / SP1200 dsk Loader  (*.emuiifd)
EMULATORII_EMUII    (R ) :  E-mu Emulator II *.eii Loader         (*.eii)
EMULATORI           (R ) :  E-mu Emulator I dsk Loader            (*.emufd)
CAMPUTERSLYNX       (R ) :  CAMPUTERSLYNX Loader                  (*.ldf)
BBC_ADL             (R ) :  BBC ADL floppy image loader           (*.adl)
BBC_SSD_DSD         (R ) :  BBC SSD & DSD floppy image loader     (*.dsd)
FEI                 (R ) :  FEI Loader                            (*.fei)
SYSTEM_24           (R ) :  System 24 loader                      (*.s24)
APPLE2_NIB          (R ) :  Apple II NIB Loader                   (*.nib)
APPLE2_DO           (R ) :  Apple II DO Loader                    (*.do)
SPECCYDOS_SDD       (R ) :  Speccy DOS SDD File Loader            (*.sdd)
ARBURG_SD           (R ) :  ARBURG dsk Loader                     (*.arburgfd)

73 Loaders

Stopping HxCFloppyEmulator...

Posts: 7
Joined: Sun Nov 24, 2013 6:46 am

Re: Raspberry Pi as a universal floppy disk drive emulator

Sun Nov 24, 2013 8:03 pm

Nice solution! Difficult to understand the real need to have internet for old computers... but now we know it's possible! 8-)
This is another solution see here (( ... py#p458529) that REALLY use only the Raspberry PI to emulate a floppy disk drive, you only need a 5 euro of common components (perhaps you already have).

This is a bare metal solution, how to use a Raspberry PI for "everything" :D :D

Hope you enjoy 8-) 8-)

Posts: 2
Joined: Sat Apr 06, 2013 9:17 am

Re: Raspberry Pi as a universal floppy disk drive emulator

Mon Nov 25, 2013 8:51 pm

mram wrote:Nice solution! Difficult to understand the real need to have internet for old computers... but now we know it's possible! 8-)
Believe it or not but this is a true need and this is already used by some people.
By way this all is virtualized : Just send any image to the Raspberry Pi floppy emulator with any computer, laptop, tablets, smartphones :mrgreen: ... No physical media handling needed anymore !
The above video show the usage of the ethernet interface, but you can do exactly the same through Wifi by using a simple wifi usb interface on the Raspberry Pi.

Here is a concret example of usage: ... 277&p=8977
The goal of my project is to save the work of walking out to the shop with a floppy for each job. To this end I configured the raspberry pi with a Samba share. This will let the user dump their files to the share. A cron job is setup to run every minute. It detects if a change has been made to the files on the share, if so it will recreate the floppy image and then kill and restart hxcfloppyemulator so that the new image is available to the dos machine.

I had to modify the hxcfloppyemulator to autoload an image on start. The command line hxcfe would probably work too, but I wanted the user to be able to connect in via VNC to debug issues via the GUI.

Copy script follows. I would prefer to attach it, but the forum won't allow .sh or .conf files to be attached.

cd /root/cnc

touch md5old
cat data/* | md5sum >md5new
diff md5new md5old

if [ $? == 0 ]
echo "no changes1"
elif [ $? == 1 ]
echo "changes found"
#start with empty image
#cp empty.hfe disk.hfe
mformat -C -f 1440 -v WINVBLOCK -i disk.img ::
cd data
mcopy -n -i ../disk.img * ::
#for f in *
# echo "Adding file $f";
# hxcfe -finput:../disk.hfe -putfile:$f
cd ..
killall hxcfloppyemulator
export DISPLAY=:1
# hxcfe -finput:disk.img -usb:1
mv md5new md5old
echo "There was something wrong with the diff command"
Anyway nothing force you to use the network interface, you can use any USB key to store the floppy disk images.
But the Raspberry Pi was designed as an connected device so it would be shame to not use all the network possibilities of this computer! :D

Return to “Other projects”

Who is online

Users browsing this forum: Flip Schaumal and 12 guests