This game console is a complete system: a console, a joystick and game cartridges. You insert a game cartridge into the console to play a new game.
This Instructable is about making your own console, joystick and game cartridges.
Inside the console is a Raspberry Pi. The joystick is a heavy duty stick with magnetic centering. When you insert a game cartridge in the console, the game starts.
The Raspberry Pi inside the console makes use of Retropie so your console can emulate what you want: various Atari's, Sega's or a Nintendo SNES. Mine only runs M.A.M.E games.
The brain of the console is a Raspberry Pi running a game console emulator. The game cartridge triggers some inputs of an Arduino Leonardo and this Arduino then sends keystrokes to the Raspberry Pi (via USB) to invoke commands to start games, pause or shutdown the system.
Inside a game cartridge there is nothing but some wires that short circuit some Arduino inputs to the ground. All games are stored on the SD card inside the Raspberry Pi (inside the console).
A joystick that is mounted in a box together with two fire buttons and a USB-keyboard controller is wired to the console with a USB cable.
On the back side of the console you can plug in the joystick (USB), the HDMI-connector for the monitor and the power adapter (micro USB).
I created this console to have the same gaming experience as I had in the eighties. Playing games involves nosing in to your game collection (physical cartridges), inserting them, wait for the game to load, and then play. This experience is different than clicking with your mouse on a game inside a game emulator front-end :-)
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: The Console: Raspberry Pi
The console runs RetroPie, a game emulator system for the Raspberry Pi.
Install RetroPie on the Raspberry Pi and remove the retropie program from the autostart list. The Raspberry needs to boot in the command line.
Use SSH to connect to the Raspberry Pi and then run Retropie setup to disable autostart:
cd RetroPie-Setup chmod +x retropie_setup.sh sudo ./retropie_setup.sh
First choose Configuration/Tools and then autostart and make the Raspberry Pi boot into the command line. In the file /opt/retropie/configs/all/retroarch/retroarch.cfg make sure the following lines appear:
input_enable_hotkey = "escape"<br>input_exit_emulator = "escape"
This is needed to quit a MAME game by pressing the Esc-key (the actual "pressing" of the Esc-key is done automatically by the Arduino when you remove a cartridge from the slot).
Step 2: The Console: LED Indicator
The Raspberry Pi needs to properly shutdown before you disconnect the power. This is visualized by a red LED on the console.
The console has an LED indicator that is lit when the system is on. When the system is switched off (by pressing the red power button on the console) the LED goes out after a short time. Only when the LED is off it is safe to remove the power plug.
Mount an LED and serial resistor (220 ohm) between the TXD pen and GND of the Raspbery Pi (as shown on the picture).
Edit the file /boot/config.txt (use command line or SSH and nano) and add the following line:
This will enable the LED functionality automatically.
Step 3: The Console: Arduino
Inside the console are a Raspberry Pi and an Arduino Leonardo. The Leonardo is connected to the Pi via a (short) USB cable.
The Arduino sketch is responsible for sending keystrokes to the Pi. The game port of the console is connected to the digital inputs of the Arduino. When a cartridge is inserted the game is automatically selected.
Upload the sketch into the Arduino.
Connect the cartridge wires to the Arduino. Also connect the wires of the buttons power, pause, coin and player-1 and player-2 to the Arduino. Check the schematic diagram.
Step 4: The Console: Printing and Assembly
The console consists of four different parts: bottom, top, bevel and "wooden" bar. The bottom and top can be printed in black. The bevel in orange, yellow or another bright colour. The bar on the front may be printed in a suitable brown colour.
The top and bottom of the console need to be printed with supports. The orange bevel is glued to the console using superglue. The top is attached to the bottom using self-tapping screws. The letters on top of the console (power, coin, P1 and P2) may be coloured using nail polish.
I provide all STL files to print your console. I've also included the OpenScad source files so that you can change the designs to your liking.
My 3D printer is a Flexiforge Dreamer which has a bed of 150x230mm.
Mount the Raspberry Pi and the Arduino in the console. Attach the wires to the Arduino (according to the schematic) and connect the Arduino to the Pi with a short USB cable.
The game port is a standard female D-sub connector with 9 pens.
Use a USB adapter cable as a joystick port. Connect this to the joystick slot and the Pi.
Step 5: Game Cartridges
A game cartridge is a plastic (3D printed) box with a colourful label on it. Inside the cartridge is a male sub d connector that fits on the game port of the console.
Check the Arduino sketch for some examples on how to wire the sub-d connector in the game cartridge. Basically every zero bit needs to be short ciruited to the ground.
Create nice labels for your cartridges and print these with a colour printer. I also created some accompanying booklets with historic backgrounds of my games and instructions of how to play the game.
Step 6: Joystick
You can use any USB joystick (or game controller) that you want. I wanted a solid joystick so I used a magnetic arcade stick and put it in a box together with two fire buttons.
I used an Arcade controller to send keystrokes of the joystick and buttons to Retropie. This controller already has a standard USB cable that fits in the joystick port of the console.
The case and lid can be printed without supports. The lid is screwed on the bottom of the main case.
Step 7: Playing
To play a game proceed as follows:
- Attach the console to a screen using an HDMI cable. Attach power.
- Wait for it to boot.
- Insert a game cartrigde. The game will start automatically and you can play.
- Remove the cartridge to stop the game or press the big red button. Press the big red button again to shutdown the console. As soon as the LED is off you can remove power.
The arcade style push buttons are 24 mm in diameter. The pause button (located to the right of the power LED) is a standard push button with a closing contact.
ROMS for MAME are in /home/pi/RetroPie/roms/mame-libretro. Bezel pictures and accompanying .cfg files for MAME are in /opt/retropie/configs/all/retroarch/overlay/arcade-bezel-overlays.