• Published on | May 07, 2013 | by FozzTexx

USB Joysticks and Retro Consoles

One of the things bugging me while tinkering with old computers has been the joysticks. Several of the computers I'm playing with can use the Atari 2600 joysticks, but those joysticks are awful. I've never liked them, even back when the Atari 2600 was new. I kept thinking about getting some other 2600 compatible joystick, or maybe making a box and sticking some of my arcade buttons and joysticks in it and wiring it up with the 9 pin Atari pinout.

Neither of those ideas seemed satisfactory though since I wasn't sure what was a "good" 3rd party joystick, and I didn't really want to use the arcade sticks. What I really like are the modern PS2 style controllers. These days every kind of controller either is USB, or can be converted to USB with a cheap adapter. Why not use a Raspberry Pi?

The hardware is pretty minimal. The Raspberry Pi talks to a USB game controller, and then using a couple of common ICs connected to three GPIO pins, the Raspberry Pi emulates an Atari 2600 joystick. Pretty much everything is done in software, and it only took a few lines of code. I can now use SNES, N64, PS2, and XBox controllers, Wiimotes, and others because for any that aren't native USB it's possible to convert them with a cheap USB adapter.

I have plans to add 2 player support, analog controls, and support more than just the Atari 2600 style pinout. I'm still trying to figure out how to emulate the different potentiometer values for the different platforms (Apple II is 150kΩ, C64 is 500kΩ, and Atari is 1MΩ). But this is a great start, and it amazes me how much more enjoyable the old games are by using a nice USB controller! (But Alley Cat is still way too hard...)

Join The Discussion

+1  Posted by Scott V. • Jul.26.2013 at 19.45 • Reply

Do the USB sticks experience any noticeable lag in this setup?

+1  Posted by FozzTexx • Jul.28.2013 at 05.21 • Reply

None at all.

+1  Posted by chrotlon2080 • Aug.17.2013 at 12.57 • Reply

Great article. Would you mind sharing the details (H/W and S/W)? This would make a great educational project.

+1  Posted by FozzTexx • Aug.17.2013 at 14.36 • Reply

Check the other articles on my blog, the source is available on github.

+1  Posted by Pierre-Francois Bonnefoi • Mar.27.2014 at 16.47 • Reply

Hello, I can't find the schematic to build the PCB on github, could you post it on your blog ?

+1  Posted by FozzTexx • Mar.27.2014 at 16.55 • Reply

The only schematic is the PNG file which details the resistor divider. I'm working on a new design right now which will include a detailed schematic and board layout.

+1  Posted by Pierre-Francois Bonnefoi • Mar.27.2014 at 20.45 • Reply

Thank you for the answer. I've already ordered the components. Do you plan some support for rapid fire ? My Neo-Geo is waiting for your new layout :-)

+1  Posted by Morebits • Jun.21.2014 at 00.35 • Reply

This is very cool, can't wait for the update. I think there is huge potential for the raspberry pi to be an all in one retro computing adapter. The commodore iec, amiga floppy emulators apple2pi etc. A mouse and keyboard adapter would be great too. A lot of vintage accessories are very hard to find now. Commodore 1351 mouse, and 128D keyboard for example.

+1  Posted by Morebits • Jan.02.2015 at 18.27 • Reply

Has any more work been done on this?

I have been researching atmega chips. These emulate analog by pulsing the output pins at varied frequency to simulate a varied voltage

You could probably do the same with the raspberry pi alto an atmega328 would be 1/7th the price.

+1  Posted by FozzTexx • Jan.02.2015 at 21.18 • Reply

I started working on a small circuit to add analog joystick support using some digital pots. I posted about it on my twitter a couple of months ago, but got sidetracked with some other things and I haven't finished it yet.