RetroPie Setup Guide
If you’re looking for a cheat-sheet to quickly setup a Raspberry Pi 3 Model B as a RetroPie emulation system, you’re in the right spot. Many of the guides you find, including the official RetroPie wiki, are outdated, between 2012-2015 before the release of RetroPie v4. This guide will eventually meet the same fate, but for now, it’s the newest, sweetest, down-and-dirty guide you’ll find. Enjoy!
- Installing OS
- Updating OS
- Adding ROMs
- Configuring System (the long part)
- Performance Improvements
- Configuring Controllers
- ROM Compatibility per Emulator Plugin
Chapter 1 – Parts
Raspberry Pi 3 Model B
- I highly recommend the Vilros kit, includes power cord, case, and board
- $50 https://www.amazon.com/dp/B01D92SSX6
- I got a 64GB SanDisk Class 10 MicroSD
- $25 – https://www.amazon.com/dp/B010Q588D4/
- I recommend a minimum of 16GB, 32GB is the sweet spot for not having to worry about enough space. If you are planning at add countless MAME ROMs or PS1 games, you’ll want as big a MicroSD card you can get.
Official Microsoft Xbox 360 Wireless Receiver
- Get the official Microsoft OEM version. There are third-party receivers that *can* work fine, but I’ve had bad experiences in the past. The official Microsoft labeled device works the best.
- $20 – https://www.amazon.com/dp/B000HZFCT2/
Official Xbox 360 Wireless Controllers
- $30/ea, you can find them anywhere. Best Buy Price Matching works too.
- Any keyboard will work, for running more intense menu commands.
Chapter 2 – Installing OS
You’ll need a way to format the MicroSD card. This is usually done with the included SD Card (full size) adapter, and plugging it into a laptop/desktop/memory-card adapter.
Go download and install Win32DiskImager from Sourceforge. This lets you write a downloaded .IMG file directly to the MicroSD card.
Download RetroPie v4.X
- The OS is about 600MB. They seem to choose random mirrors for downloads, some go at 30KBps, others at 20MBps, if it’s slow, cancel and re-download.
The image file will be a .img.gz (GZIP) file. Extract the .IMG file inside with 7Zip or WinRar to somewhere on your local PC.
Run Win32DiskImager from Start as Administrator (right-click > Run as Administrator)
Select the MicroSD card drive letter, browse to your extracted .IMG, and write. — This will completely erase the selected device (which should be the MicroSD card). Make sure it’s the right one.
Wait until the write is complete.
Once complete, remove the MicroSD card, and connect it to the Raspberry Pi memory slot. Connect everything together:
- 360 Wireless Receiver
- Power MicroSD
Then connect the power-adapter to a power-strip/wall-jack.
Chapter 3 – Updating OS
Let the Raspberry Pi boot up and wait until you get to the main interface. You will need a controller input
Configuring Primary Controller
Absolutely 100% configure the controller you will be playing with day-to-day first.
This means if you intend to use an Xbox 360 Controller for playing, make that the first thing you setup for inputs, rather than a keyboard!
Make absolutely sure you configure the buttons correctly. For Xbox 360 <> N64:
- A = A
- X = B
- B = X
- Y = Y
The reason for this, is some emulators (looking at you N64), only use the first setup controller as their main interface. Even if you change the input’s later via RetroPie, the emulator will remember the first configuration only (this can be edited via Putty in the file “/opt/retropie/configs/all/retroarch-joypads/Xbox360WirelessReceiver.cfg”
Updating OS Packages
Updating the RetroPie OS and packages can provide a 80% performance improvement in some cases. Absolutely 100% do this step.
- Open RetroPie
- RetroPie Setup > Update RetroPie-Setup Script > Yes
- Update all installed packages > Yes > Would you like to update the underlying OS packages? > Yes
- Wait 25 minutes (I timed it)
That was easy enough…
Chapter 4 – Adding ROMs
If you’ve got the ROMs, it’s easy. Just remove them from their ZIP files, and copy them to a network share. If you don’t yet have ROMs, go find a torrent site and get your game on! Generally releases are call “ROM Collections” or “ROM Packs”, so for example go on Google and search for, “N64 ROM collection torrent”.
Hop on your PC, and browse your local network. If you can’t find anything and you’re on Windows, Start > Advanced Sharing > Enable Network Discovery
You can also find your IP on RetroPie by going RetroPie > Show IP
Then browsing to \\192.168.0.X\ or \\retropie
Go into the roms folder, and start copy/pasting in ROMs for each system.
Chapter 5 – Configuring System (the long part)
Raspberry Pi Config
We are going to configure some core OS settings that have nothing to do with RetroPie. You will likely need a keyboard for this to work, controller buttons can go weird in Raspi-Config.
From the menus, open RetroPie > Raspi-Config
You can also open this by using Putty, SSHing in, and typing “raspi-config”.
- This step should not be necessary as of RetroPie v4, but if you find yourself running out of space much earlier than expected:
- Expand FileSystem”, this takes the 600MB image you flashed to the MicroSD, and lets you have all of the free space of your 64/128GB MicroSD card.
- Boot Options > Wait for Network at Boot > Would you like boot to wait? > NO
- This makes the Raspberry Pi boot MUCH faster if a network connection is not available. Otherwise you will sit for 30s while the Raspberry looks for a DHCP server and times out.
- Advanced Options > Overscan > Would you like to enable compensation for displays with overscan?
- Select No if you have a modern, 1080p or higher HDTV, or are on HDMI.
- Select Yes if you have an older TV that zooms in on devices so there are no black bars (but it cuts off detail with HDMI/DVI).
Disable Run Command Editor
Whenever you load a ROM, you have 5 seconds to press any button to load the Run Command Editor. That means if any person presses anything during those 5 seconds, time to pull out a keyboard or reboot the system to try again while everyone gets confused. I highly recommend turning this off if non-technical people or children are playing on the system.
- Launch Menu > Disabled
- Launch Menu Art > Disabled
- Launch Menu Joystick Control > Enabled
- Select Cancel (should be named Quit or Exit) > A (or Yes).
I personally prefer Tronkyfran (#32 at the bottom of the list), pick whatever you prefer 🙂
RetroPie Setup > Configuration / Tools > esthemes (Emulation Station User Interface themes) > 32 – Install Tronkyfran
Go back to home > Start > UI Settings > Theme Set (at the bottom) > Change from Carbon (default) to Tronkyfran (or whatever you use). Some themes may require a reboot to go into effect.
Scrape for Details
A scraper scans all of the games in your system for metadata like year of release, rating, description, title, cover-arts, etc. Very worth the time to run it, makes the system look MUCH prettier. For running an scrape of 2500 games, it took 3 hours to complete.
Do this after copying over your ROM files.
- Plug in a keyboard, hit F4 to close Emulation Station
- sudo -i
- sh /home/pi/RetroPie-Setup/retropie_setup.sh
- Scraper > Scan All Systems
Change Default N64 Emulator
This file lets you select the default emulator. You have the option to assign different emulators to different ROM files with the Run Command before a system launches. I have personally had better stability and performance with gles2n64 than gliden64. Officially, GlideN64 is supposed to be the best current graphical plugin and may one day be the best (isn’t everything linux like that though ;-). At the time of writing this (December 2016) glitchy graphics, stuttering audio, and random buggyness with GlideN64 says otherwise, so I recommend Gles2N64.
- sudo -i
- nano /opt/retropie/configs/n64/emulators.cfg
- Change the following line
- (Before) default = “mupen64plus-GLideN64”
- (After) default = “mupen64plus-gles2n64”
- Ctrl + X (Exit) > Y (Yes to save changes)
Chapter 6 – Performance Improvements
This is surprisingly important. I normally don’t overclock any equipment, ever, but overclocking really does make a massive improvement on your RetroPi setup.
These settings are for a Raspberry Pi 3 in a case with minor ventilation, and the cheapo 14mm x 14mm x 4mm heatsinks on top that come with cheap kits.
The most important setting oddly enough, is the v3d_frequency. This seems to provide more performance improvements than anything else I’ve found. disable_splash=1 just speeds up the boot process.
- sudo -i
- nano /boot/config.txt
- Insert the below code
arm_freq=1300 gpu_freq=500 sdram_freq=500 over_voltage=6 v3d_freq=525 disable_splash=1
Chapter 7 (Optional) – Configuring Controllers
Only needed if your buttons are not matching up between systems, especially on N64.
There are three ways controller configurations are saved in a RetroPie.
- From the initial setup configuration file
- nano /opt/retropie/configs/all/retroarch/autoconfig/Xbox360WirelessReceiver.cfg
- From the “live” setup configuration file, what you can change via EmulationStation
- nano opt/retropie/configs/all/retroarch-joypads/Xbox360WirelessReceiver.cfg
- From a system-specific configuration file (N64, SNES, etc)
- nano /opt/retropie/configs/n64/InputAutoCfg.ini
Below is a mapping image that may be helpful. The stock-mapping works perfectly for NES, SNES, Game Boy, etc, but for some reason goes bonkers with the N64.
These input mappings were figured out via the RetroCore GUI Configuration Tool.
Example code of default N64 Setup (Wrong).
; Xbox 360 Wireless Receiver_START [Xbox 360 Wireless Receiver] plugged = True plugin = 2 mouse = False AnalogDeadzone = 4096,4096 AnalogPeak = 32768,32768 Mempak switch = button(11) Rumblepak switch = button(12) C Button D = button(0) axis(3+) C Button L = axis(2-) Z Trig = button(4) Start = button(9) Y Axis = axis(1-,1+) DPad U = button(15) C Button U = button(1) axis(3-) A Button = button(2) DPad D = button(16) X Axis = axis(0-,0+) R Trig = button(5) DPad R = button(14) B Button = button(3) DPad L = button(13) C Button R = axis(2+) L Trig = button(6) ; Xbox 360 Wireless Receiver_END
- Button (0) [The A button on a 360 controller)], is auto-mapped to C-Button Down AND Right-Stick Down.
- Button (1) [The B button on a 360 controller], is auto-mapped to C-Button up AND Right-Stick Up.
- Button (2) [The X button on a 360 controller], is auto-mapped to A.
- Button (3) [The Y button on a 360 controller], it auto-mapped to B.
Example Code of a modfied N64 setup (Correct)
; Xbox 360 Wireless Receiver_START [Xbox 360 Wireless Receiver] plugged = True plugin = 2 mouse = False AnalogDeadzone = 4096,4096 AnalogPeak = 32768,32768 Mempak switch = button(11) Rumblepak switch = button(12) C Button D = axis(3+) C Button L = axis(2-) Z Trig = button(4) Start = button(9) Y Axis = axis(1-,1+) DPad U = button(15) C Button U = axis(3-) A Button = button(0) DPad D = button(16) X Axis = axis(0-,0+) R Trig = button(5) DPad R = button(14) B Button = button(2) DPad L = button(13) C Button R = axis(2+) L Trig = button(6) ; Xbox 360 Wireless Receiver_END
Chapter 8 – ROM Compatibility for N64
If you are planning to make a few of these systems, you may want to prep one image perfectly and then copy/paste the image to other SD cards with Win32DiskImager.
For that first unit, I’ve always customized each emulator for the most important N64 ROMs. You can define a single ROM to use a specific emulator video-plugin, you can also define the default settings for each plugin. I recommend going lower res for all of the plugins: 720×480 16:9 will give you the best performance for modern widescreen monitors/TVs. You may want to reduce the frame buffer to the native 320×240 size.
For the below list, I have personally tested all three emulators: Gles2N64, Gles2Rice, and GlideN64, to see which is the most stable and has the most playable performance. Some games simply cannot run smoothly on the RetroPie, others it’s a toss-up. You’ll need to enable the Command Editor temprarily when you save these changes. Once done, turn it back off. List below, hope it helps.
|Game Name||Best Plugin||Notes|
|007 Goldeneye||GlideN64||Works fine if overclocked|
|1080 Snowboarding||Gles2N64||Works fine|
|Banjo Kazooie||Gles2N64||Graphical Glitches (puzzle pieces)|
|Bomberman N64||GlideN64||Works ok, some glitches|
|Conkers Bad Fur Day||N/A||Too slow on all|
|Cruisin’ USA||N/A||Too slow on all|
|Diddy Kong Racing||Gles2N64||Works fine|
|Jet Force Gemini||Gles2Rice||Work ok, minor stutters|
|Legend of Zelda – Ocarina||Gles or Glide||Works fine|
|Mario Kart 64||Gles2N64||Works fine|
|Mario Party 1||Gles2N64||Works on all|
|Mario Tennis||Gles2Rice||Works ok, minor stutters|
|Pokemon Snap||Gles2N64||Works ok, some glitches|
|Starfox 64||GlideN64||Works fine|
|Super Smash Bros||Gles2N64||Works fine if overclocked|
|Wave Race 64||Gles2Rice||Works fine|
That should be enough to get you a fully operational RetroPie. Enjoy, and have fun!