Page 1 of 3

Emulate Floppy with a Raspberry Pi ?

Posted: Mon Aug 19, 2013 5:22 pm
by jedie
Im not really a hardcore-hardware-hacker... So just a idea:

Is it possible to emulate a dragon floppy controler+drive with a Raspberry Pi ?
Connect the existing GPIO ports to the cartridge ?

Maybe combine with this: http://archive.worldofdragon.org/index. ... %28Rink%29 ?

It maybe also used for "emulate" a cassette. It has only a 3.5mm jack for audio out, but a USB microphone could be used for audio in.
Use GPIO to check the "motor on information"...

Re: Emulate Floppy with a Raspberry Pi ?

Posted: Mon Aug 19, 2013 6:48 pm
by Rink
Most likely, yes. Whether it'd be worth all the effort (vs. an HxC emulator, Drivewire, or any of the other methods of loading program's into a Dragon) would be debatable but I can't see any reason why it wouldn't work.

I've used devices with less power to pretend to be cartridge ROMs before and to "activate" when certain memory addresses are hit etc. etc. so I'd imagine you could do it all with a Pi if you were so inclined. Couldn't say whether you'd need any additional circuitry as I don't have one so don't actually know how many I/O lines it has etc.

The idea of a cassette and floppy emulator in one box is pretty cool though.

Re: Emulate Floppy with a Raspberry Pi ?

Posted: Mon Aug 19, 2013 7:28 pm
by KenH
It's actually possible using existing tools!

Install DriveWire 4 server on a Raspberry Pi
Connect the Raspberry Pi to the Dragon with a Drivewire cable
Run HDB-DOS on the Dragon loaded using a cassette quick-loader , or even better from an EPROM cartridge with HDB-DOS rom burned on it.

and you have the Rasberry Pi as a floppy / vhd (virtual hard drive) server for the Dragon, for both DOS and NitrOS9.

Re: Emulate Floppy with a Raspberry Pi ?

Posted: Mon Aug 19, 2013 8:44 pm
by Rink
Sweet.

DriveWire is next on my list of things to play with.

Re: Emulate Floppy with a Raspberry Pi ?

Posted: Tue Aug 20, 2013 1:51 pm
by jedie
Rink wrote:Whether it'd be worth all the effort (vs. an HxC emulator, Drivewire, or any of the other methods of loading program's into a Dragon)
For a HxC emulator you need a disk controller... Maybe the Raspberry Pi can also replace this?!?!

One effort is, that RPi is a complete PC with a small size/power consume. It has ether net.

A good overview about RPi Low-level peripherals seems to be here: http://elinux.org/Rpi_Low-level_peripherals
The RPi provide 8 GPIO pins plus access to I²C, SPI, UART. The GPIOs are a BCM2835 chip.
GPIO voltage levels are 3.3 V and are not 5 V tolerant.
Don't know if there is a way to plug the RPi directly into the Cartridge? Simulate a floppy drive? Simulate a ROM Cartridge?

Re: Emulate Floppy with a Raspberry Pi ?

Posted: Tue Aug 20, 2013 6:23 pm
by tormod
Although the RPi has a lot of power, I am not sure it is fast enough (latency) to deal with the Dragon bus on its GPIO pins. Maybe if you run it "bare metal" without any OS.

But with its serial UART it makes for a great DriveWire server!

Re: Emulate Floppy with a Raspberry Pi ?

Posted: Wed Aug 21, 2013 7:58 am
by jedie
tormod wrote:Although the RPi has a lot of power, I am not sure it is fast enough (latency) to deal with the Dragon bus on its GPIO pins. Maybe if you run it "bare metal" without any OS.
Found some GPIO benchmarks here:
http://codeandlife.com/2012/07/03/bench ... pio-speed/

Interesting is the last post here: http://www.raspberrypi.org/phpBB3/viewt ... 44&t=26907

What data rate has the dragon on the cartridge ports?
tormod wrote:But with its serial UART it makes for a great DriveWire server!
What hardware is needed for using DriveWire? At least you need a origin floppy controller, isn't it?

Re: Emulate Floppy with a Raspberry Pi ?

Posted: Wed Aug 21, 2013 8:27 am
by KenH
jedie wrote: What hardware is needed for using DriveWire? At least you need a origin floppy controller, isn't it?
A floppy controller is not required to run DriveWire.
The only hardware that is required is a a Drivewire adapter cable, and of course a PC/Mac/Linux as the Drivewire Server.

Re: Emulate Floppy with a Raspberry Pi ?

Posted: Wed Aug 21, 2013 8:36 am
by jedie
KenH wrote:The only hardware that is required is a a Drivewire adapter cable, and of course a PC/Mac/Linux as the Drivewire Server.
But only the Dragon 64 has a serial port. So no solution for Dragon 32, isn't it?

Re: Emulate Floppy with a Raspberry Pi ?

Posted: Wed Aug 21, 2013 8:44 am
by KenH
Drivewire can be run equally well on the Dragon 32 / Dragon 64 / Tano Dragon :D
The adapter cable is plugged into the Dragon's parallel port which is available on all Dragons. The adapter basically converts the Dragon's parallel port to a bit-banger serial port.

Have a look at the instructions in this thread: viewtopic.php?f=5&t=781