Emulate Floppy with a Raspberry Pi ?

Hardware Hacking, Programming and Game Solutions/Cheats
jedie
Posts: 655
Joined: Wed Aug 14, 2013 12:23 pm
Location: germany
Contact:

Emulate Floppy with a Raspberry Pi ?

Post 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"...
... too many ideas and too little time ... Related stuff written in Python:
Dragon 32 emulator / PyDC - Python Dragon 32 converter: https://github.com/jedie/DragonPy
DWLOAD server / Dragon-Lib and other stuff: https://github.com/6809
Rink
Posts: 236
Joined: Mon Sep 05, 2011 7:01 pm

Re: Emulate Floppy with a Raspberry Pi ?

Post 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.
KenH
Posts: 182
Joined: Fri Oct 12, 2012 9:50 am

Re: Emulate Floppy with a Raspberry Pi ?

Post 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.
Rink
Posts: 236
Joined: Mon Sep 05, 2011 7:01 pm

Re: Emulate Floppy with a Raspberry Pi ?

Post by Rink »

Sweet.

DriveWire is next on my list of things to play with.
jedie
Posts: 655
Joined: Wed Aug 14, 2013 12:23 pm
Location: germany
Contact:

Re: Emulate Floppy with a Raspberry Pi ?

Post 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?
... too many ideas and too little time ... Related stuff written in Python:
Dragon 32 emulator / PyDC - Python Dragon 32 converter: https://github.com/jedie/DragonPy
DWLOAD server / Dragon-Lib and other stuff: https://github.com/6809
User avatar
tormod
Posts: 416
Joined: Sat Apr 27, 2013 12:06 pm
Location: Switzerland
Contact:

Re: Emulate Floppy with a Raspberry Pi ?

Post 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!
jedie
Posts: 655
Joined: Wed Aug 14, 2013 12:23 pm
Location: germany
Contact:

Re: Emulate Floppy with a Raspberry Pi ?

Post 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?
... too many ideas and too little time ... Related stuff written in Python:
Dragon 32 emulator / PyDC - Python Dragon 32 converter: https://github.com/jedie/DragonPy
DWLOAD server / Dragon-Lib and other stuff: https://github.com/6809
KenH
Posts: 182
Joined: Fri Oct 12, 2012 9:50 am

Re: Emulate Floppy with a Raspberry Pi ?

Post 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.
jedie
Posts: 655
Joined: Wed Aug 14, 2013 12:23 pm
Location: germany
Contact:

Re: Emulate Floppy with a Raspberry Pi ?

Post 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?
... too many ideas and too little time ... Related stuff written in Python:
Dragon 32 emulator / PyDC - Python Dragon 32 converter: https://github.com/jedie/DragonPy
DWLOAD server / Dragon-Lib and other stuff: https://github.com/6809
KenH
Posts: 182
Joined: Fri Oct 12, 2012 9:50 am

Re: Emulate Floppy with a Raspberry Pi ?

Post 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
Post Reply