DragonPi Project

A place to discuss everything Dragon related that doesn't fall into the other categories.
Post Reply
martinjharvey
Posts: 11
Joined: Tue Oct 27, 2015 4:55 pm
Location: Mansfield, Notts

DragonPi Project

Post by martinjharvey »

As this is as good a place as any I suppose, I thought I'd share some pictures of my Dragon32. I don't normally give up easily but I've totally given up on trying to repair this. Its not all bad though cos my poorly Dragon32 has now been given a new lease of life and been reborn as the...............wait for it............. DragonPi :)

I wasn't prepared to give up totally thgough and just toss it in the bin. Seeing as I had a spare Raspberry Pi 2 and the Dragon has plenty of room inside the case, I thought it would be a tasty project to stick the Pi into the case and have it run the Xroar emulator. The keyboard is fully functional and is connected to the Pi2 using an Arduino Leonardo board to basically create a USB keyboard. I still need to use a wireless USB keyboard for anything involving the Raspberry Pi command line as the Dragon Keyboard doesn't have enough keys and is missing Ctrl, Tab, ~ and the F-Keys but for normal use it works just as you would expect.

Although the motherboard is not working, I've left it in place within the case. The main reason is maybe one day I might come back to it and get working, but I also can't bring myself to bin it because I hate to see these kinds of things done where there are massive empty holes in the case or they've been gummed up with hotglue and the innards from a usb hub. Also I was thinking that I might repurpose the power connector and make it into a joystick port for an old Atari joystick ;) Cut the traces and connect it to the Pi GPIO.

I've not hacked the case to pieces to accommodate power socket, usb, video out etc. like I've seen so many people doing with their poor old C64/ZX81 cases. Instead I thought I'd make some sort of interface using a rom cartridge case. In the event that I want to revert it back to a working Dragon then I'm not too upset to have only sacrificed the cartridge case. Seemed to make more sense than Dremelling the living daylights out of the Dragon case!

The only case mod I had to make was to the inside of the cart slot cover. I removed a small notch of plastic with the Dremel to allow the power, HDMI and USB cables for the cartridge case interface to fit through.

I only originally intended to have it running XRoar, so from the outside it would appear to be just a Dragon32. Really struggled a lot trying to build a copy of Xroar for the Pi that would run at fullscreen, and was user friendly enough in terms of loading tape images etc. In the end I've installed RetroPie. This now has the XRoar emulator built in, and it runs exactly how I wanted it to, so didn't think there was any point trying to reinvent the wheel. Not only that but I have set up all RetroPie emulators so can use my new DragonPi to play all my fav C64, Speccy game too :)
DPi01.jpg
DPi01.jpg (75.69 KiB) Viewed 3341 times
DPi02.jpg
DPi02.jpg (66.7 KiB) Viewed 3341 times
DPi03.jpg
DPi03.jpg (47.32 KiB) Viewed 3341 times
DPi04.jpg
DPi04.jpg (87.24 KiB) Viewed 3341 times
DPi05.jpg
DPi05.jpg (111.58 KiB) Viewed 3341 times
DPi06.jpg
DPi06.jpg (143.29 KiB) Viewed 3341 times
DPi07.jpg
DPi07.jpg (148 KiB) Viewed 3341 times
fbnbmns
Posts: 17
Joined: Tue Feb 16, 2016 7:11 am

Re: DragonPi Project

Post by fbnbmns »

looks very interesting..
wait, I've got a RaspBerry Pi too... :D

BTW; you've got a PM.
User avatar
tormod
Posts: 416
Joined: Sat Apr 27, 2013 12:06 pm
Location: Switzerland
Contact:

Re: DragonPi Project

Post by tormod »

Very neatly done! I totally approve of the spirit of not destroying the old original hardware. Is the keyboard interface your own design or do you have more info on it? I guess you can do some key mapping on the Pi (XKB?) so that you generate ctrl/tab etc with various key combinations. For instance ctrl on the CLEAR like FUZIX does, or shift-right for tab and so on. It should be possible to switch keymaps live or automatically when starting XRoar. But I am sure you spend most of the time "inside the Dragon" anyway, so you can live with the extra keyboard just for emergencies :)
sixxie
Posts: 1346
Joined: Fri Jul 18, 2008 8:36 am
Location: Hertfordshire
Contact:

Re: DragonPi Project

Post by sixxie »

That looks really cool.

Doing the keyboard interface on the Arduino (converting to USB) allows you to have as much "KRO" as you like - I guess you get the correct "ghosted" keypress behaviour this way?

Edit: BTW, I've not visited XRoar on Pi for ages; the only way I got it running fast enough was to avoid X and drive the framebuffer and audio buffers directly - but that didn't have any useful file interface. Have the RetroPie people done more work to it?

Edit again: I see you're on a Pi 2 - beefy enough to run it fast in X now?
tjewell
Posts: 346
Joined: Mon Oct 19, 2009 4:58 pm
Location: Cambridge, England

Re: DragonPi Project

Post by tjewell »

Really nicely done! I think the use of an old cartridge was quite inspired - it looks really smart, and avoids having to make case modifications. I'm also intrigued to know more about the keyboard interface - a regular question on the Facebook group is 'can I make my Dragon into a USB keyboard for my computer?', and this could be a solution.
martinjharvey
Posts: 11
Joined: Tue Oct 27, 2015 4:55 pm
Location: Mansfield, Notts

Re: DragonPi Project

Post by martinjharvey »

tormod wrote:Is the keyboard interface your own design or do you have more info on it?
I'd like to be able to take all the credit, but the keyboard interface is sort of mix and match of bits and pieces from here and there :)
tjewell wrote:I'm also intrigued to know more about the keyboard interface - a regular question on the Facebook group is 'can I make my Dragon into a USB keyboard for my computer?', and this could be a solution.
If anyone else is interested I'm happy to share the Arduino Sketch that I made. The sketch started out as some code for a ZX81 key matrix, but I modified it to work with the additional keys and to have all the correct shifted keypresses etc for the Dragon. Works great as a USB keyboard and I did try it standalone on a PC before putting it all together in the Dragon case.

I chose to remove the ribbon cable from the Keyboard and soldered in some of that fancy breadboard wire with male pins attached to make connecting to the Arduino easier and neater. I think the Arduino Leonardo cost about £7 from eBay but you can get them cheaper if you're happy to wait on shipping from China.

There are some smaller, cheaper Leonardo boards that I suppose would work but I chose the larger board because of the increased number of usable i/o pins and because it features a Micro ATmega32U4 chip. The case for the Arduino was made from a plastic box that had paperclips in it. It just needed some Dremel magic! Plugs into the Pi or computer via USB which it also uses for its power.

.
sixxie wrote:I've not visited XRoar on Pi for ages; the only way I got it running fast enough was to avoid X and drive the framebuffer and audio buffers directly - but that didn't have any useful file interface. Have the RetroPie people done more work to it?
It seems to work better than I managed to get the compiled source from the XRoar website to work on the Raspberry Pi. Not sure what they've done if anything, but it runs fullscreen with sound. The Pi2 runs the retroPie XRoar pretty fast and smooth. I think I only ever got it to run once in X at fullscreen. The rest of the time it was in a small window, and switching to fullscreen just plopped the little window in the middle of the screen and surrounded it with a gigantic black border. There doesn't seem to be much of any file interface but assuming you have the Dragon cassette images in the Retropie Roms folder, you can select your file from the RetroPie menu and it jumps straight into XRoar and loads the image automatically.
Post Reply