HxC SD Floppy Emulator

Hardware Hacking, Programming and Game Solutions/Cheats
User avatar
Rolo
Posts: 228
Joined: Sun Feb 10, 2013 7:36 pm

HxC SD Floppy Emulator

Post by Rolo »

To me the floppy emulator seems to be an interesting topic. I think it's worth starting a new thread.

Well, since there seems to be no multi-cart for the Dragon, I bought one of LAFUMAT'S Dragon Disk controllers and the SD floppy emulator by LOTHAREK (http://www.lotharek.pl). Delivery took only a few days - the devices were packed thoroughly - everything perfect!
A photo of my setup:
CIMG4774.jpg
CIMG4774.jpg (115.24 KiB) Viewed 5438 times
The disk controller is delivered without housing, just the PCB. I attached it to an aluminum plate (2mm) with the help of four 2mm screws and 5mm spacer sleeves. That protects the circuitry and makes the "cartridge" fit perfectly into the cartridge port, without having all of the mechanical load being sustained by the connector. Additionally you'll need an old standard PC-floppy-cable (34 lines), a PC-floppy power cable (small connector) and a SD-card. I use a cheap universal power supply and built a little 5VDC stabilizer (just the usual 1 amp 7805) for powering up the floppy emulator. The emulator just needs the 5 volts, no 12 volts. I had to cut off the plastic nose on the floppy power plug. That's all.
The SD-card has to be prepared a little bit first:
-Format it on a windows PC (FAT32)
-Make a configuration file for the floppy emulator with the help of the downloadable configuration tool (Windows: HxCFloppyEmulator.exe). Copy the file (HXCSDFE.CFG) onto the SD-card.
-The emulator uses it's own "disk format" (.hfe). You cannot simply put *.vdk's onto the SD-card. But the emulator tool can convert vdk's to hfe's and copy them onto the SD-card. That's fast and easy.
-Those hfe-disk images take 1 megabyte each. They appear just like floppy disks on the emulator. They can be loaded, ejected, read and written. One image can hold quite a lot of games.

Unfortunately, I could not find too many vdk's. Most files seem to be cassette files.
I found the program "DUPLIDISK2" by Quickbeam right here in archive, which tries to read cassette-files and save them on floppy disk. For quite many programs it is working fine. You'll need a cassette recorder with remote control for splitted files.
CIMG4778.jpg
CIMG4778.jpg (76.72 KiB) Viewed 5438 times
For those splitted files the program offers several options for the conversion. Sometimes it works, sometimes not. Sometimes my D32 simply seems to run out of memory. The incoming data are corrupting DUPLIDISK itself. Sometimes the trick is to throw away the loader and just convert the program, load it directly and just EXEC it :D
Some of the posted wav-files are corrupted, which is clearly visible in "audacity" (open source sound tool). I had to convert them with DC.EXE from .cas to .wav first.
CIMG4773.jpg
CIMG4773.jpg (90.3 KiB) Viewed 5438 times
I'll probably expand my memory to 64kBytes for converting big programs. And I hope it is possible to convert cartridges into files and load the data into the proper memory position :?: .

All in all I think the emulator is a very good possibility to get rid of the annoying cassette handling and it's speeding up programme-loading immensely. Loading a game usually takes just 5 to 10 seconds :!: .
It' fast, seem's to be reliable and it's compact. I like it! (And you can use it with a lot of other old computers, too)
It's almost like a cartridge.

Well, since compiling those .hfe's is quite some work, I would like to propose to introduce a new section in the download area, just for hfe's. No point in everybody doing that all over again and again.
Since it does not make sense to use a separate hfe-image for each game, a kind of directory should be attached. Or maybe somebody has an idea how to arrange the files into a certain order or something like that :?:
Maybe the guys who run this page can make a statement?
User avatar
rolfmichelsen
Posts: 296
Joined: Wed Apr 08, 2009 8:43 pm
Location: Oslo, Norway
Contact:

Re: HxC SD Floppy Emulator

Post by rolfmichelsen »

Thanks for a really nice write-up. It's really nice to have these end-to-end how to get things to work posts.

Out of curiosity, anyone out there who knows the specs for the HFE format?

-- Rolf
User avatar
robcfg
Posts: 1529
Joined: Sat Apr 04, 2009 10:16 pm
Location: Stockholm, Sweden
Contact:

Re: HxC SD Floppy Emulator

Post by robcfg »

Sure!

Check here.
sixxie
Posts: 1346
Joined: Fri Jul 18, 2008 8:36 am
Location: Hertfordshire
Contact:

Re: HxC SD Floppy Emulator

Post by sixxie »

rolfmichelsen wrote: Out of curiosity, anyone out there who knows the specs for the HFE format?
(Oops, robcfg linked in the time it took me to compose this! Still, I think there's other useful info here, so...)

The format is described in this PDF. The track data is MFM or FM encoded and represented LSB-first (making it harder to "read" in a hex editor than it would be otherwise), a 1 indicates flux state transition, a 0 means no transition.

According to my notes, its MFM representation leads with data rather than clock (ie bit 0 is a data bit), meaning the last bit in each byte is a clock, which will depend on the next data bit, meaning you can't write out a byte in this format until you know what the next data bit will be. This might just be a bad decision by the writer of the conversion tool though, and is probably not necessary for the FDC emulator itself.
User avatar
rolfmichelsen
Posts: 296
Joined: Wed Apr 08, 2009 8:43 pm
Location: Oslo, Norway
Contact:

Re: HxC SD Floppy Emulator

Post by rolfmichelsen »

Thanks, guys. Anyone care to share a valid floppy image with a few files on it just for a bit of experimentation with the format?

-- Rolf
User avatar
robcfg
Posts: 1529
Joined: Sat Apr 04, 2009 10:16 pm
Location: Stockholm, Sweden
Contact:

Re: HxC SD Floppy Emulator

Post by robcfg »

I just sent you a couple of HFE images via email.

:mrgreen:
User avatar
rolfmichelsen
Posts: 296
Joined: Wed Apr 08, 2009 8:43 pm
Location: Oslo, Norway
Contact:

Re: HxC SD Floppy Emulator

Post by rolfmichelsen »

Great! Thanks, Rob.

-- Rolf
zephyr
Posts: 1474
Joined: Mon Jul 21, 2008 1:18 am

Re: HxC SD Floppy Emulator

Post by zephyr »

Rolo wrote: I'll probably expand my memory to 64kBytes for converting big programs. And I hope it is possible to convert cartridges into files and load the data into the proper memory position :?: .
Cartridges can easily be converted with Cartridge Convert.
Alastair
Posts: 669
Joined: Fri Jul 18, 2008 11:33 pm

Re: HxC SD Floppy Emulator

Post by Alastair »

Rolo wrote:Some of the posted wav-files are corrupted, which is clearly visible in "audacity" (open source sound tool). I had to convert them with DC.EXE from .cas to .wav first.
Did you keep a list of the problematic wave files and if so will you post that list? (It will probably be better to create a new thread for this in the "Software Requests" section.)
Rink
Posts: 236
Joined: Mon Sep 05, 2011 7:01 pm

Re: HxC SD Floppy Emulator

Post by Rink »

Always wanted one of those emulators - but can never justify the expense.

Maybe it's about time we created that SDcard/multicard thing?! - I think someone was threatening to work on it, so I stopped thinking about the project and started coming up far less useful ideas for Dragon hardware. :)
Post Reply