Introduction: Retro Gaming Console (N64 Mod) With KODI

About: Firmware Engineer / Hobbiest

Playing retro games on old school consoles is a lot of fun however to buy the individual consoles and all the games that go along with it is too cumbersome and expensive! Not to mention if you are a college/university student and move apartments every 12 months, it's not the easiest thing to pack up all these consoles (rats nests of wires!!!). So here is a simple modification to the already publicly available RetroPie gaming console with a front interface for your original N64 controllers and two USB slots for universal controllers to play a variety of other consoles.

This is a relatively inexpensive project and can most likely be completed in a weekend, however allow up to 3 weeks for all parts to arrive! Aside from access to a 3D printer, here's what you'll need (all prices are in Canadian currency).

Materials:

  • ABS Filament (1.75mm) (color of choice).......~$25.00 CAD**
  • Raspberry Pi 3 Starter Kit.............................~$120.00 CAD
    • Raspberry Pi 3 Model B*..............................................
    • HDMI Cable..................................................................
    • Heat Sink x2*................................................................
    • 2.5A Power Supply*......................................................
    • 32GB Micro SD Card (Class 10)*.................................
  • N64 Controller Connector(x4)..........................~$10.00 CAD
  • N64 Controller PCB...........................................~$5.00 CAD
  • Wireless Keyboard...........................................~$17.00 CAD
  • USB Extension Cables.....................................~$10.50 CAD
  • 2x3 Pin Header..................................................~$2.00 CAD
  • 2.4-4mm Mounting Screws (x9).........................~$2.00 CAD
  • 2.8-6mm Mounting Screws (x4).........................~$2.00 CAD

Tools:

  • 3D Printer............................................................................
  • Screw Driver Set.................................................................
  • Soldering Iron.....................................................................
  • Heat Gun............................................................................
  • Hot Glue/Silicon..................................................................

Miscellaneous:

Total Cost:........................................................~$166.50 CAD

*Strongly recommended.
**Assuming you already have this.

Step 1: Printing the Case

Materials Used:

  • ABS Filament (1.75mm)
  • NinjaFlex Filament (1.75mm)

Tools Required:

  • 3D Printer
  • STL Files

Instructions:

The case is available HERE on Thingiverse.com and includes the .STL files. Follow the printing details in the description for the best quality of print the first time, since printing large flat cases is not very easy due to warping. Print the feet with NinjaFlex since these will press fit into the screw holes on the bottom of the case and prevent the box from siding around the table if you pull on one the cables.

If you do not have access to a 3D printer then there are several options. First, try Google. Google is great. Second, how about sending your files into an online 3D printing company and have them ship right to your door? Here are some options:

And the list goes on...

Step 2: Solder the PCB

Materials Used:

  • N64 Controller PCB
  • N64 Controller Connectors
  • 2x3 Male Header Pin

Tools Required:

  • Soldering Iron

Instructions:

Unless you have access to your own PCB printer, then you'll have to outsource this step. Personally, I used OshPark.com since they offered a 3 week lead time and we the cheapest I could find. The minimum order is for three pieces and works out to roughly five dollars a board. Go to the website and follow the instructions for uploading a .zip file containing Gerber CAM files which are attached to this step (Gerbers.zip).

The leads on the N64 Controller Connectors have variable tolerance and not always to spec so they may need a little fiddling to get them to slot into the holes. Note, that there are outlines printed on the silk screen layer to indicate which side and orientation to install the controller headers. Once all the connectors are in place, solder them to the board.

Solder the 2x3 pin header on the opposite side from the N64 pins and try to place it with the pins flush on the opposite side to keep the mounting surface low profile.

How It Works:

The PCB just redirects the three pins from each controller connector and consolidates them into 6 pins. Original N64 controllers operate using 3.3V logic and have a single signal pin for two-way communication between the controller and console. The ground and power for each controller are bundled to a single pin and the four controller signals are redirected to reduce the 12 inputs down to 6 outputs.

Sources:

Step 3: Make the Cables

Materials Used:

  • Push button
  • Female-Female Jumper Cables
  • Heat Shrink

Tools Required:

  • Soldering Iron
  • Heat Gun

Instructions:

2.1 Toggle Switch

The toggle switch is optional for this project but I have included here anyways because it provides an easy way to reset/power on the unit rather than physically pulling the power. To attach the software reset, cut two female header cables to approximately 4 inches and solder the free ends to the reset switch. Heat shrink the connections to prevent short circuiting.

2.2 Solder the Raspberry Pi

Break off two header pins and solder to the 'run' port on the Raspberry Pi. Try to get a clean bead of solder on the pads and ensure the pins are square to the board.

2.2 GPIO-PCB Cable

For this cable you can just use six female header pin cables to connect the Raspberry Pi GPIO pins to the PCB board. So put put these aside for later.

Sources:

Step 4: Assemble the Unit

Materials Needed:

  • 2.8-4mm Fasteners
  • 2.4-6mm Fasteners
  • PCB
  • Raspberry Pi
  • USB Connectors
  • Reset Switch
  • Wireless Keyboard Dongle

Tools Required:

  • Screw Driver Set
  • Hot Glue/Silicon

Instructions:

4.1 Mount N64 Connector Interface

Mount the PCB Controller PCB to the front wall using five 2.8-4mm screws.

4.2 Raspberry Pi

Mount the Raspberry Pi in place using four 2.8-4mm screws. Place the two heat sinks onto the Raspberry Pi to assist with cooling.

4.3 Mount Reset Switch

Mount the reset switch through the back hole with the lock washer on the inside of the case. Plug the free ends of the cable to the 'run' port on the Pi and use hot glue/silicon to hold in place. Order of how to plug the cables in is irrelevant.

4.4 Mount USB Extenders

Plug in the USB extenders and dab with a touch of hot glue/silicon before sliding them into their slots to prevent them from sliding out over time. Wrap the cables out of the way and plug into two free USB ports on the Pi.

4.5 Plugin USB Keyboard Dongle

Plug in the Nano USB receiver to a free port.

4.6 Plugin GPIO-PCB Cable

Plug in six female cables to the PCB board and glue in place to prevent them from becoming dislodged. The ground and 3.3V power are clearly marked on the board, so plug those directly into the corresponding ports on the Pi's GPIO pins. Plug the four controller pins into the remaining slots as indicated.

4.7 Secure Lid

The four 2.4-6mm hex socket screws are four securing the lid to the case. As you expected, there are four pillars inside the case that house the screws so that no fasteners are visible on the outside of the case. Using an Allen key bit from your screw set, screw these in until tight.

4.8 Add Feet

This is an important step since it allows airflow under the unit to the vent for cooling. Print little feet using the NinjaFlex filament or just purchase sticky rubber pads and mount them to the underside of the unit.

Step 5: Install RetroPie

Materials Used:

  • 32GB Micro SD Card (Class 10)
  • Micro SD Adapter

Tools Required:

Instructions:

5.1 Install RetroPie Image & Add ROMs

Using the Micro SD USB Adapter format the SD card using SD Formatter and then burn the RetroPie image onto the SD card using Win32DiskImager. Once complete, insert the SD card into the slot on the Raspberry Pi and power on the unit to begin the installation process. Follow this tutorial HERE. Note: Use the keyboard for the controller configuration since the N64 controllers will not work yet.

5.2 Install GPIO Controller Support

Unfortunately RetroPie does not come with controller support through the GPIO pins by default and therefore must be loaded. Follow THIS tutorial to install the gamecon_gpio_rpi driver for reading in data from the original N64 controller. The easiest way to install the drivers is via RetroPie-Setup script by selecting Manage Packages, then Manage Driver Packages, then gamecondriver. For compatibility with N64 controllers, use option 6 for the file and add `options gamecon_gpio_rpi=6,6,6,6,6,6` to the file /etc/modprobe.d/gamecon.conf to enable the controller support. Reboot the system so that you are in the RetroPie splash screen, and enter the options to add a controller configuration. Now you can map the N64 controller.

5.3 Calibrate the N64 Controller

I found that when mapping the N64 controller that it didn't work exactly as I had hoped which required some manual turning in the calibration file since some buttons didn't register and the joy stick was too sensitive. Enter the command from the RetroPie splash screen by hitting F4 (CTRL + F4 or Windows + F4) and run the joystick test to print a live readout from your controllers to determine the index of each button.

$ jstest /dev/input/js0     # repeat for js0, js1, ..., js5

Open /opt/retropie/configs/n64/InputAutoCfg.ini and update the configuration file for the N64 controller to match the configuration file attached (N64_config.txt) and save. Now your N64 controller should work as expected!

5.3 Adjusting the Emulator

Now you should have the RetroPie installed with working N64 controllers, but you may notice that some games don't play all that well. When starting a ROM a screen pops up asking if you want to adjust the settings, tap ENTER/RETURN to enter this menu. There are several different emulators to pick from so play around with these to determine which one works best for each ROM that you want to play.

5.4 Overclock the Pi

By default Raspberry Pi runs at 800MHz and the Raspi-Config menu does not allow the option to overclock so you have to do it manually. Follow this link HERE to edit /boot/config.txt to speed up the system. My system is running at 1300MHz and plays the majority of the N64 ROMs pretty smoothly.

Sources:

Step 6: Customize (Add KODI)

Follow this tutorial to install KODI on RetroPie as a Port.

Install KODI of RetroPie

Step 7: Relax & Enjoy

Well that's it! You should have a fully functional system with all of your favourite games! If you have any feedback or suggestions on how to improve this further, I would love to hear it. Enjoy your new gaming console.

Cheers :)