loading

This article describes how to use an Arduino Leonardo or Arduino Micro to make up to three classic console joysticks (e.g. Atari 2600, ColecoVision, and possibly others) available to a modern computer (e.g. Windows PC, Mac, or Linux). This adapter can be placed into one of the following modes:

  • Joystick Mode

Each of the three classic console joysticks appear as a Game Controller.

  • ADAMEm Mode

Configured for use with the ADAMEm emulator. Joystick 1’s direction and fire buttons are mapped to a Game Controller and the keypad is mapped to the keyboard’s numeric keypad keys. Joystick 2 is mapped to keyboard keys (e.g. up arrow key, down arrow key, etc.). This allows ADAMEm to support two player games. Joystick 3 is not used in this mode.

  • MAME Mode

Configured for use with the MAME emulator. All three joysticks’ direction and fire buttons are mapped to the three Game Controllers. The numeric keys on all three joysticks are mapped to keyboard keys.

Step 1: Background

Back in September of 2014 I published an Instructable (Classic Joystick to USB Adaptor) explaining how to use an Arduino Leonardo or Arduino Micro to create an adapter that would allow a classic game console controller/joystick (e.g. Atari 2600, ColecoVision, and possibly others) to work on a modern computer (e.g. Windows PC, Mac, or Linux). This adapter mapped the various joystick actions (Up, Down, Left, Right, Fire Button, etc.) to keyboard keystrokes. I used the keystrokes used by the ADAMEm (http://www.komkon.org/~dekogel/adamem.html) ColecoVision / Coleco ADAM emulator, but any keystroke mapping could be used.

Throughout 2015 I have been posting the following blog articles and Instructables that explain how to make an Arduino Leonardo or Arduino Micro appear as a USB Game Controller:

All of these blog articles and Instructables have been building up to this Instructable which will explain how to create the “ultimate” classic game console joystick to USB adapter.

Step 2: Classic Console Joysticks

The solution I have developed will support Atari 2600 joysticks, ColecoVision and ADAM controllers, and most of the ColecoVision Super Action Controllers’ functions. This solution does not currently support the Spinner located below the keypad on the Super Action Controllers.

Step 3: Classic Console Joysticks - Atari 2600 Joysticks

The Atari 2600 joysticks are the simplest of the controllers supported by this adaptor. They have a D-Subminiature Female 9 Position connector. The following describes the function of each pin:

Pin 1 - Up
Pin 2 - Down
Pin 3 - Left
Pin 4 - Right
Pin 6 - Fire
Pin 8 - Ground

Step 4: Classic Console Joysticks - ColecoVision Controllers

The ColecoVision and ADAM joysticks are much more complicated. In addition to the four direction control stick, they have two fire buttons (or 4 in the case of the Super Action Controller) and a 12 button keypad. Like the Atari 2600 joystick, they have a D-Subminiature Female 9 Position connector, but the pin outs have two different modes. When pin 8 is grounded, pins 1-4 are the four directions and pin 6 is the left fire button. When pin 5 is grounded, pins 1-4 are a keypad scan code and pin 6 is the right fire button. The table below lists the pin outs for the ColecoVision and ADAM controllers.

Pin 8 Grounded - Control Stick Mode

Pin 1 - Up
Pin 2 - Down
Pin 3 - Left
Pin 4 - Right
Pin 5 - High (Keypad Mode)
Pin 6 - Left Fire
Pin 7 - Spinner
Pin 8 - Ground (Control Stick Mode)
Pin 9 - Spinner

Pin 5 Grounded - Keypad Mode

Pin 1 - Bit 0
Pin 2 - Bit 2
Pin 3 - Bit 3
Pin 4 - Bit 1
Pin 5 - Ground (Keypad Mode)
Pin 6 - Right Fire
Pin 7 - Spinner
Pin 8 - High (Control Stick Mode)
Pin 9 - Spinner

Step 5: ColecoVision Controllers - Keypad Scan Codes

The ColecoVision and ADAM joystick keypad scan codes are shown in the graphic above.

Step 6: Parts List

Required Parts

1 - Arduino Leonardo or Arduino Micro

3 - D-Subminiature Male 9 Position Connector (e.g. http://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_12504_-1, http://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_1975029_-1, etc.)

3 - LEDs (any colors you want to use)

3 - 330 Ohm Resistors (or whatever is appropriate for the LEDs chosen)

1 - Momentary Push Button

1 to 3 - Classic Console Joysticks

1 - Solderless Plugin Breadboard or Solderable PC Breadboard

Optional Parts

1 - Project Box

Step 7: D-Sub Male 9 Position Connector Preparation

Depending on the type of D-Sub Male 9 Position connector you use, you may need to do some work to get the connector ready to use. In my case I used a connector and a SparkFun Serial DB9 Breakout (https://www.sparkfun.com/products/retired/8552), so I needed to do a little soldering to get it ready to use.

Step 8: Momentary Push Button Preparation

Depending on what type of momentary push button you use, you many need to solder some wires to the push button so it can be connected to the Arduino.

Step 9: LED Preparation

Depending on the type of LEDs you use and how you plan to package the final device, you many need to solder some wires to the LEDs so they can be connected to the Arduino.

Step 10: Solderable PC Breadboard Preparation

For my project I used an Arduino Micro which I soldered to a solderable PC breadboard. I wanted to make sure I had good connections between my Arduino Micro and my joystick lines, so I threaded very small wires through the breadboard to act as the conductive traces.

Step 11: Wiring Diagram

The diagram above shows how to connect the Arduino Leonardo or Arduino Micro to the three, D-Subminiature male 9-pin connectors, resistors, LEDs, and momentary switch. I also have this available as an SVG file or a Fritzing file.

Step 12: Wiring Table

The table above describes how the pins of the Arduino are connected to the Joystick’s D-Subminiature pins.

Step 13: Enclosure

So the final product would look nice (and I would not worry about my kids breaking any of the wires) I put the adapter into a project box. I had to drill holes for the momentary switch, the LEDs, and the d-subminiature connectors.

Step 14: Label Enclosure

To finish it up I put some labels on the connectors and on the LED mode indicators.

Step 15: Software

Arduino made a major change to how they implemented the USB HID functionality in Arduino IDE Version 1.6.6, so I have two different sets of instructions depending on which version of the Arduino IDE you are using. I recommend using Version 1.6.6 or above if you can, because it is much simpler.

Step 16: Arduino Version 1.6.5 and Below

  1. Follow the instructions provided in the following blog article to add 3 USB Game Controllers to the Arduino Leonardo or Arduino Micro: Add Up To 3 USB Game Controllers to Arduino Leonardo or Micro.
  2. Download and install the ClassicController library from the Arduino-1.6.5 branch of the MHeironimus/ClassicJoystickAdaptor GitHub repository. This library can be installed by copying it to the Arduino libraries folder (typically %userprofile%\Documents\Arduino\libraries).
  3. Download the ClassicJoystickAdaptor.ino sketch file from the Arduino-1.6.5 branch of the folder of the MHeironimus/ClassicJoystickAdaptor GitHub repository and open it in the Arduino IDE.
  4. Compile and upload the sketch file to the Arduino Leonardo or Arduino Micro.
  5. The adapter can be testing using the “Game Controllers” dialog in Microsoft Windows. See the Add Up To 3 USB Game Controllers to Arduino Leonardo or Micro blog article for more details on testing the adapter.

Step 17: Arduino Version 1.6.6 and Above

  1. Download and install the Arduino Joystick Library from the MHeironimus/ArduinoJoystickLibrary GitHub repository. This library can be installed by copying it to the Arduino libraries folder (typically %userprofile%\Documents\Arduino\libraries). For more information on how to install this library, see the following Instructable: Arduino Leonardo/Micro as Game Controller/Joystick.
  2. Download and install the ClassicController library from the master branch of the MHeironimus/ClassicJoystickAdaptor GitHub repository. This library can be installed by copying it to the Arduino libraries folder (typically %userprofile%\Documents\Arduino\libraries).
  3. Download the ClassicJoystickAdaptor.ino sketch file from the master branch of the folder of the MHeironimus/ClassicJoystickAdaptor GitHub repository and open it in the Arduino IDE.
  4. Compile and upload the sketch file to the Arduino Leonardo or Arduino Micro.
  5. The adapter can be testing using the “Game Controllers” dialog in Microsoft Windows. See the Arduino Leonardo/Micro as Game Controller/Joystick for more details on testing the adapter.

Step 18: Final Product

I have tested this “ultimate” classic game console joystick to USB adapter on Windows 7, Windows 10, and Raspbian on the Raspberry Pi Model B. To work properly on the Raspberry Pi (or any other linux devices), see the following blog article: Linux Support for Arduino Leonardo / Micro USB Game Controllers.

its a magical time we live in

About This Instructable

7,671views

73favorites

License:

More by MatthewH:Create a Joystick Using the Arduino Joystick Library 2.0 Remote Control Your Raspberry Pi Ultimate Classic Game Console Joystick to USB Adapter 
Add instructable to: