Overview
Play games with a proper old-school arcade joystick and buttons on your modern systems! Back at the dawn of MAME arcade game emulation there were lots of heavy-duty joysticks made for Windows PCs. Their joysticks and buttons are great, but their brains were meant to output over PS/2 keyboard cables or sound card joystick interfaces.
Now you can keep all the good parts and swap out the old-fashioned driver board for a Raspberry Pi Pico microcontroller that works as a gamepad over USB. With the Pico H and Terminal PiCowbell you can avoid soldering altogether for a plug-and-play solution.
Old Arcade Controller to Resurrect
This type of controller can be found at yard sales and online auctions -- they were made for MAME gaming on PCs with PS/2 or sound card joystick ports. Build like tanks, they contain real arcade joysticks and buttons and an obsolete controller interface PCB we'll bypass to modernize it!
This guide shows an X-Arcade Tankstick, but nearly any arcade-style controller should work.
Page last edited May 01, 2024
Text editor powered by tinymce.
Pico Setup
Terminal PiCowbell
Orient your Pico H or Pico WH as shown -- with the Pico USB port above the PiCowbell I2C STEMMA QT port -- and press the header pins into the sockets.
Install Firmware and Customize Settings
GP2040-CE is an open source gamepad firmware that's compatible with RetroPie, PC, PS3/PS4, Nintendo Switch, Xbox, and more. It runs on a number of microcontrollers that use the RP2040 chip, such as Pico, KB2040 Kee Boar, and more.
Flash the Pico with a drag-and-drop .uf2 file and then customize settings with a web editor.
Download Firmware
From the GP2040-CE Downloads page, click the Download button for the Raspberry Pi Pico firmware.
This will save a file named GP2040-CE_0.7.8_Pico.uf2 (or later) to your download location.
Firmware Installation
This page gives detailed instructions on installation, but the basic steps are:
- While holding the BOOTSEL button down, plug the Pico into your computer with a known good data and power USB cable -- this puts the board into BOOTSEL/USB drive mode
- A new removable drive named
RPI-RP2will appear on your computer - Drag-and-drop the GP2040-CE v0.7.8.uf2 (or later) firmware .uf2 file onto the
RPI-RP2drive and wait for it to copy the file and reboot itself
Web Configurator
Unplug the Pico from your computer's USB cable. Then, you'll use a short wire to jumper Pico pin GP17 to a GND pin (see attached diagram for physical pin locations).
Plug the Pico into your computer's USB cable while pin GP17 is shorted to ground. After a couple of seconds you can remove the wire. This action has caused the Pico's GP2040-CE firmware to launch a web server you can access from your computer's web browser by visiting http://192.168.7.1
Settings
You can now update the controller settings.
Click on the Settings menu item and then switch the Input Mode to PS3/DirectInput then press Save.
You can alternately use this on your Switch, Xbox, or Playstation -- just pick the appropriate Input Mode from the menu.
Reboot
To get the Pico out of configuration mode and into controller mode, click the REBOOT button in the upper right corner of the configuration page.
This opens a reboot popup. From here, click the CONTROLLER button to restart the Pico in controller mode.
The pinout diagram below shows the default GPIO-pin to button mapping.
Button Test
This is a great time to test the controller to make sure basic button presses are working.
Plug the Pico into your computer with a known good USB-C to Micro-B data and power cable. Head to this gamepad tester in your browser to see the button presses.
You can now use a jumper wire to short any mapped GPIO pin to ground -- those button presses will register on the controller tester.
Page last edited May 01, 2024
Text editor powered by tinymce.
Arcade Wiring
The default button-to-pin assignments in the GP-2040 Pico firmware will work well for most arcade controllers. The diagram above shows the GPIO pin numbering for the joystick and thirteen user buttons, as well as the reset button and enable switch.
Wiring Harness
The microswitches that are actuated by the buttons and joysticks all use spade connector wiring. You can use these to connect to the terminal PiCowbell directly, or in the case of the X-Arcade, these are bundled and connected to the original PCB with JST-XH 5-conductor shrouded connectors.
Note how many of the ground runs are daisy-chained to reduce the number of connections back to the main board.
We can use the JST-XH cable sets to make the wiring simpler -- unplug them from the old PCB and plug them into the cable extensions to wire into the terminal blocks.
I used a continuity tester on my multimeter to determine the switch-to-wire correspondence and labeled each cable set before wiring.
This also included one sub-harness for the built-in power LED, and the selector switch for the enable pin.
USB Cable Extension
Use an available hole (from removing the old PS/2 and D-sub cabling) to run a USB micro-B panel mount extension. This plugs into the Pico on one end, and mounts to the exterior on the other.
You can then plug in a USB cable externally to plug into your gaming machine, and remove it when not in use.
This particular controller is a dual user setup. Since you can plug multiple USB devices into your computer for multiplayer gaming, a second Pico wired to the second set of buttons would give you exactly what you need for head-to-head gaming!
Page last edited May 01, 2024
Text editor powered by tinymce.