Ground Control Arcade Box

From My WIki
Jump to: navigation, search


About the Project

'Ground control' is an arcade controller for the Raspberry Pi and other mini-computers, such as the CubieBoard. It is being distributed as an Open hardware kit, so you can build and improve it yourself, or buy the kit from Samurai Circuits.

What comes with the kit

  • Arduino Leonardo Clone with joystick firmware, Linux-compatible
  • Arduino-compatible prototyping shield
  • Arcade controller and buttons
  • Stylish Acrylic Case
  • Cables

Getting Started

First step is to pick a SD card of your choice (4GB or bigger) and write the Raspbian image I prepared with all the pre-configured emulators. We are using the stock image from Raspberry Pi foundation with very few modifications.

  • Check the file against this SHA1 sum:
  • Boot your system with a keyboard, press CTRL+C after boot-up and before entering the game menu, and type:
   sudo raspi-config
  • Using the menu option, resize your partition according to the space left on your SD card
  • Change your password and restart

I tested two Raspberry Pi boards: revision 1 (Hynix RAM chip) and revision 2 (Samsung RAM chip). There are differences between these boards in terms of how fast their RAM can be overclocked. I provide configuration files you will have to use depending on the RAM chip you have. The disk image I provide comes with the configuration for the revision 1 (256MB of RAM, Hynix chip), which is safe to be used with all boards, but a little bit slower. If you have a new board (512 MB, Samsung chip) you will need to use this configuration file instead. Just download the config file, rename it to config.txt and copy it to the root of the 'boot' partition of your SD card -- after writing on it with our image.

Running your favorite games

The image I prepared comes with the following pre-configured emulators:

If you follow the links above, you will have access to the source code, license information, and documentation for each project.

To play your favorite games, you have to copy them to a particular directory of the system on the SD card. It is easy to do so. For certain systems we specify below, you will have also to copy the 'bios' files. Systems which require bios files are: Playstation1, MSX2, Neo Geo, and Apple2. Remember: emulation is not a crime! But copying games you do not own is... so, do not use illegal ROMs.

  • Copy your games and bios files to the respective directories:
  MAME for old school arcade (more accurate emulation):
  /home/pi/roms/mame (file extension .zip)
  MAME 0.37b5 roms (faster emulation):
  /home/pi/roms/mame4all (file extension .zip)
  Capcom System 2 games:
  /home/pi/roms/finalburn (file extension .zip)
  /home/pi/roms/neogeo (file extensions .zip)
  /home/pi/roms/neogeo (for the bios files, .zip)
  Super Nintendo:   
  /home/pi/roms/snes (file extensions .zip, .1, .fig, .smc, .sfc) 
  Genesis/Mega Drive:
  /home/pi/roms/genesis (file extensions: .zip, .bin)
  /home/pi/roms/ps1 (file extension .bin)
  /home/pi/roms/bios (for PS1 bios)
  MSX 1 and 2:
  /home/pi/roms/mess/bios/msx2 (for the bios files)
  /home/pi/roms/mess/bios/apple2e (for the bios files)
  Atari 2600:
  /home/pi/roms/atari2600 (file extensions .bin, .a26)

Joystick Configuration

Download and install the firmware, which is located here. I tried to follow a pattern and keep the most obvious key mapping. However, some systems will have a particular key combo to exit. Below I explain the default configuration for each system. Follow this graph for the reference numbers:



  • button[0-5] corresponds to button[1-6] on the emulator
  • button 6 is '1st player start'
  • button 7 is 'coin'
  • pressing button 7 and button 0 at the same time will exit the emulator ('esc')

For Final Burn / CPS2 games:

  • button[0-5] corresponds to button[1-6]
  • button 0 is 1st player 'start'
  • button 6 is 'coin'
  • pressing button 7 and button 0 at the same time will exit the emulator ('esc')

For Neo Geo games:

  • buttons[0-3] correspond to buttons[1-4] of the Neo-Geo controller
  • button 6 is 'start'
  • button 7 is 'coin'
  • button 5 is menu, and button 1 selects the option on the menu (to 'exit' or 'load' another game)

For Genesis/Mega Drive:

  • button[0-5] corresponds to button[1-6] on the 6-button controller
  • button 6 is 'start'
  • button 7 is 'exit/esc'

For Super Nintendo/Famicon:

  • button[0-5] corresponds to button[1-6] on the 6-button controller
  • button 6 is 'start'
  • button 7 is 'exit/esc'
  • button 'select' was not mapped

For MSX 1 and 2:

  • button 0 is 'space'
  • button 5 is 'keyboard:1' (useful to select 1-player joystick)
  • button 6 is 'enter'
  • button 7 is 'exit/esc'

For Atari 2600:

  • button 0 is 'fire'
  • button 1 is 'difficulty A'
  • button 2 is 'difficulty B'
  • button 5 is 'reset'
  • button 6 is 'select'
  • button 7 is 'exit'

Here is how the buttons are wired on the Arduino Leonardo:

 2   up
 3   down
 4   right
 5   left
 6   button 1  (0)
 7   button 2  (1)
 8   button 3  (2)
 9   button 4  (3)
 10  button 5  (4)
 11  button 6  (5)
 12  button 7  (start)
 13  button 8  (coin / quit)

For the Sparkfun Pro Micro, using these pins:

 2   up
 3   down
 4   right
 5   left
 6   button 1  (0)
 7   button 2  (1)
 8   button 3  (2)
 9   button 4  (3)
 10  button 5  (4)
 14  button 6  (5)
 15  button 7  (start)
 16  button 8  (coin / quit)


  • Audio does not work over HDMI: it does not work out of the box for certain monitors. In order to have proper video output, DVI mode is negotiated instead of HDMI with the monitor. It is easy to solve the problem by editing /boot/config.txt and uncommenting the line:
  • Video modes with HDMI: we scaled down to 640x480 because you will not need higher resolution than that for your old games
  • Some arcade games do not run, which is a problem with the emulation of particular systems and sound chips


  • Clean Raspbian image for diskspace
  • Add more emulators
  • Speed hacks!
  • Adjust HID USB Descriptor for the Arduino Leonardo controller

Project Files


First attempt was a tiny joystick on a protoboard at Tully's lab (rev1). Then, we moved on to a wooden case (rev2) and finally, it took a few runs to get a acrylic case we wanted (rev3, ground control version 1.0).


This project is licensed under the BTCware License, revision 23. You are free to study, modify and redistribute this project. If you find it fun and/or useful, consider donating bitcoins to the author:


Pi config + testing, documentation, and enclosure design by Luis Felipe R. Murillo; 3D design and enclosure design by Tully Gehan from Samurai Circuits. The project includes other hardware and software under free and open licenses. Their licenses are included in the Raspbian image, under /usr/share/docs and /opt/$name_of_the_emulator. Also, you can follow the links for the source code of the emulation, which also contains the license information for each binary we distribute with the SD image. The case design is licensed as CC-BY-SA 3.0. Support Open Hardware!


This project was based on the Free Software and Open hardware work of way too many people to list here. Special thanks to the Raspberry Pi Forum community members who are contributing information, code, and testing for emulation on the RPi: Devon for his help and support; welshy for supporting the Rpi community, silverman for packaging and distributing emulators; squid for the amazing work on porting emulators for the Pi. We used the joystick code published by Kevin Peat. The stock/official Debian wheezy image generated for the Raspberry Pi were also used. This project was inspired and discussed at Tokyo Hackerspace and counted with the good help of MRE and Romedius. Akiba gave me a book on arcade cabinet making from which I learned everything I needed for this project. Thanks Tully for letting me work on his electronics lab for this project, and thanks a ton for helping to improve the design of the box substantially, giving important help to make the project real (as in tangible, material). Thanks Atommann for all the help roaming around Shenzhen with me to find a lasercutter! Oh, and thanks David Bowie for the inspirational song.

-- Unixjazz, November 15th, 2013

Personal tools