Introduction: C64 USB Joystick Adapter

There are some nice emulators for vintage video games and computers out there, for example WinVice for commodore hardware like the C64, but how do you connect old joysticks to your PC, like the Competition Pro (the original one, with 9-pin D-sub for an original C64, not the USB version) ? Most emulators provides joystick emulation with the cursor keys or other configurable keys. So this project is one solution for this problem: a Freescale microcontroller implements an USB keyboard and translates the up/down etc. buttons to keyboard events, like if you have pressed the cursor keys.

Programming the microcontroller and testing the joystick with WinVice and International Karate:

Step 1: Tools

See the images for some useful tools for this project and consumption items for soldering: soldering flux, solder, and desoldering wire. A cotton bud is useful for applying the soldering flux.

I recommend a good regulated soldering iron with a 1 mm tip for the SMD parts, like my i-CON 1. The easiest way to solder it is a stereo microscope, but magnifying glasses works, too. But with some practice, the SOP-20 IC needed for this project can be soldered without any magnifying.

Step 2: Parts

The parts list:

C1, C2: 1 uF
C3, C4, C6: 100 nF
C5: 10 uF
IC1: MCP1703CB, Digikey MCP1703T-3302E/MBCT-ND, 0.52 €
IC2: MC9S08JS16L, Digikey MC9S08JS16LCWJ-ND, 0.92 €
IC3: 8 MHz crystal oscillator, Digikey CW515CT-ND, 2.20 €
R1, R2: 33 ohm
R3, R4: 1 k
R5: 1 k
RED-LED: 5 mm LED, 0.20 €
BLUE-LED: 5 mm LED, 0.20 €
S1: programming momentary button, Farnell 1550254, 0.88 €
S2: on/off switch
X1: USB connector, e.g. Farnell 1654060, 1.22 €
X2: sub-D, 9 pin, e.g. Farnell 1653939, 0.33 €

See the images for some of the parts. For the momentary button I like this type, stable and nice to press. For the PCB I have used the type with soldering points on one side, you can get it cheap at eBay. For connecting the USB connector, I have soldered thin wire, 0.4 mm silver-plated copper wire, and for mounting the USB stick I have soldered thick wire, 1 mm silver-plated copper wire, which I soldered at the four outer contacts of the USB connector, which is pretty stable. For the SMD IC you can get cheap adapters from eBay. So without the wire coils, in sum you can build it for less than 20 €.

Step 3: The Board

See the images for the soldered board and the schematic. Eagle schematic file:

Step 4: The Software

The developing environment

Freescale provides a free IDE, CodeWarrior Development Suite - Special ( ), which is limited to 32 kB, but the chip has only 16 kB anyway, so this is no problem. The microcontroller has an integrated bootloader, so no programmer is required, just the "BOOTLOADER_GUI" from .

The firmware  containts the project file for Code Warrior and all sources. It is based on the keyboard example from the Freescale USB Stack. You can change the switch detection for other types of joysticks in main.c and the key event generation in keyboard.c. The HID protocol is not based on key-press and key-release events, but you have to fill the HID buffer each time it is called with the scancode of all keys currently pressed.


MarcoR6 (author)2015-03-17

Does it work on Linux/Raspberry ?

Nitz76 (author)2012-10-21

Hi Frank! Nice work! I had the same idea.
I built one based on Atmel atmega8 because I don't know very much about Freescale's microcontrollers.

See my site at

Frank Buss (author)Nitz762012-10-21

Nice, your product looks very professional. I guess you are using V-USB and low-speed USB? How much latency do you have? With the Freescale microcontroller I can use full speed USB and can set the HID update rate to 1 ms.

Nitz76 (author)Frank Buss2012-10-21

Hum interesting... I might have a look to Freescale products. I tried Atmel's own hardware USB controllers but they are quite expensive for what they bring more for this application.

Actually, my design is based on Igor Cesko's design.

Latency is not an issue here. Low speed USB is more than enough for joystick interfacing.

TheRealDutchOwner (author)2012-01-12

Do SEGA Genesis/Megadrive and Atari 2600/7200 controllers work on it? I'm pretty sure 2600/7200 ones should work on them, since they work the same, and have the same plug. The SEGA Genesis/Megadrive uses the plug too, and it would be nice if they would work on this.


The pinout of the C64:

So yes, the Sega Genesis joysticks would work with it, too, see this pinout:

But you would have to connect pin 7 to GND to select button A or to +5V to select button B and you won't have button C with my current schematic. So you could play C64 games with a Sega Genesis joystick, but if you like to play Sega Genesis games e.g. in Mame, my schematic would need to be extended, but should be not too difficult.

The pinout of the Atari 2600:

So this would work without problems.

mischka (author)2011-07-31

Cool, I love playing retro games, specially Commodore 64 games, because it was my first computer. I was thinking about making an adapter using a keyboard controller ("keyboard hack"). Your solution seems more professional.

Frank Buss (author)mischka2011-07-31

Thanks. I plan to make a PCB for it, so that it is easier to rebuild for others, and maybe a kit. Could be enhanced to support a wider range of old joysticks, or any other hardware, which needs to send keyboard events.

About This Instructable



More by Frank Buss:Windows XP and PicoScope installation on a Mac with VirtualBoxC64 USB Joystick AdapterUsing a Quadrature Encoder with an ATtiny 2313 and an OLED Display
Add instructable to: