Getting Started With RetroPie
Getting Started With RetroPie
Looking to get started with RetroPie? Here's a comprehensive starter guide, complete with ROM resources and driver fixes.
Join the DZone community and get the full member experience.Join For Free
Digi-Key Electronics’ Internet of Things (IoT) Resource Center Inspires the Future: Read More
I recently bought a Raspberry Pi, and one of my first projects was a retro gaming machine. There are several methods and OSes capable of satiating your old school gaming needs, but the first I picked was RetroPie. Why RetroPie? Well, the RetroPie project has been around a while, plus several friends and colleagues recommended it highly.
If you’re debating gaming on your Pi, RetroPie is an excellent choice. To make your DIYing a bit easier, I’ve created a tutorial to get you started, and included a few resources for ROMs, controllers, and tweaks.
Gather Your Materials
I’ve broken these down into required and optional but recommended:
Raspberry Pi (you can use the 1, but I’d suggest opting for the more powerful 2 model B)
5V micro USB power supply
MicroSD card reader
USB keyboard and mouse (for set up)
Gamepad (lots of options, from USB NES controllers to XBOX 360 controllers)
Ethernet cable or Wifi dongle
Optional but Recommended:
Flash drive full of ROMs
Downloading Your Image
Ok, now that we’ve gathered out materials, let’s download the RetroPie image from the PetRockBlog downloads page. There are two different SD card images (a Raspberry Pi 1 and Raspberry Pi 2 image). Download whichever is compatible with your board.
With our image downloaded, navigate to the proper folder on your harddrive (in my case “Downloads”), and extract the image (our .gz file). We’ll need a compatible program to extract the image. I used The Unarchiver. “Why The Unarchiver?” you ask. Well, for one, it’s free, but moreover it’s compatible with a variety of file types, from ZIP to 7-zip RAR, Tar, and even ISO and BIN images.
Burn Baby Burn
Great! We’ve extracted our .gz file and now have an .img. It’s time to burn that .img, so we need a compatible program. Here are a few suggestions:
The Moment of Truth
Once our image is mounted, it’s time for the moment of truth:
Insert microsd card
Make sure your Raspberry Pi is connected via HDMI cable to your monitor
Plug in all periperials – Keyboard, mouse, gamepad, Wifi dongle if applicable
Power on by plugging in 5V 2A power supply
I’ve Got the Power
If we did everything properly, our Pi should begin powering on. Great! If not, give up and chuck your Raspberry Pi out the window in frustration. Playing retro games probably isn’t that fun anyway. Just kidding, go back and double check to see if everything is correctly plugged in and installed.
Get a Grip
On the initial boot, RetroPie offers a friendly welcome screen, and detects any available gamepads. My wireless Xbox 360 controller was recognized instantly, and a quick button-mapping sequence prompts us to hit certain buttons on our controller. Press the “A” button to begin, and then proceed to map buttons accordingly. *Note: The default driver isn’t great, and I kept having an annoying flashing light on my Xbox 360 gamepad, so I disabled that and installed the Xbox driver. More in this later.
Initial Set Up
Yay! We’ve booted into EumlationStation. Can we play ROMs yet? Yes! …and no. RetroPie includes a few default ROMs, such as Doom, and Quake, but in order to transfer all those ROMs over, we still have a few tweaks:
Select the RetroPie menu
Navigate to “Raspberry Pi Configuration Tool Raspi-Config”
Select “Expand Filesystem.” We’ll see a message that says Root partition has been resized. The filesystem will be enlarged upon the next reboot.
Select “Finish” to reboot
There Are No Strings on Me
Using wifi is really easy, and can even serve as a method for transferring ROMs. Here’s how to get that up and running:
Navigate to “RetroPie” in EmulationStation
Scroll down to and select “Configure Wifi”
Select “Connect to Wifi network”
Select the correct wifi network
Now that we’ve expanded our file system and set up our wifi dongle, we can get started transferring ROMs and installing the proper drivers.
Staying Up to Date
As with all new devices, it’s always a good idea to check for updates. With our keyboard and Ethernet/wifi plugged in, hit F4 to enter the command line prompt. Enter the following commands into the command-line:
sudo apt-get update
This installs all updates. For accessing the system on a network, netatalk can make things much easier.
sudo apt-get install netatalk
Now let’s reboot again.
As we discovered earlier, RetroPie is a bit barren upon first boot, so let’s install a some emulators.
Hit F4 to enter the command-line
Enter the following code:
cd RetroPie-Setup sudo ./retropie_setup.sh
There are two options for installing emulators:
I highly recommend choosing binaries-based installation, as the source-based install can take an obnoxiously long time (16-20 hours). At roughly 30 minutes, source-based installation is long enough. Let’s select that, then go grab a cup of coffee, tea, beer, or whatever tickles your fancy.
Upon returning, emulator installation will (hopefully) be finished, but we’ll have a few pop ups to slog through.
Great! Emulators are installed, but where are they? By default, emulators don’t appear unless there are corresponding ROMs installed. So let’s grab some ROMs! (Please only use ROMs of games you legally own…). The simplest way to add ROMs is loading them on a FAT32 formatted flashdrive. RetroPie auto imports ROMs from a flashdrive, so it’s pretty easy:
Create a “Retropie” folder in the root flashdrive directory
Plug flashdrive into Raspberry Pi
Power on and boot into RetroPie. Wait for flashdrive to stop blinking
Power off and remove flashdrive
Now there should be individual folders within our “Retropie” folder for each supported system. Dump ROMs into the appropriate system folder, plug this into the Pi, and power on. Once the flashdrive stops blinking, ROMs should be automatically imported! However, if this didn’t work, there’s always the good ‘ol manual way by using the file manager.
Hand Me My (Xbox) Driver
As I mentioned earlier, the default driver works fine with an Xbox 360 controller, but the constantly blinking light really annoyed me. There’s a pretty simple work around:
First, boot into the command-line. Enter the following code
sudo nano /etc/modprobe.d/raspi-blacklist.conf
Type blacklist xpad
Save and continue. Enter the following code:
This opens up our Setup menu. Scroll down to and select “Install Xbox contr. 360 driver." Then reboot.
However, if we’re adding multiple controllers, we’ll need to add lines for each controller. Enter the following in the command-line:
sudo nano /etc/rc.local
We should see this:
xboxdrv --trigger-as-button --id 0 --led 2 --deadzone 4000 --silent & sleep 1
This should be reproduced for each additional controller such that...
Controller 2 is:
Xboxdrv --trigger-as-button --id 1 --led 2 --deadzone 4000 --silent & sleep 1
Controller 3 is:
Xboxdrv --trigger-as-button --id 0 --led 3 --deadzone 4000 --silent & sleep 1
Controller 4 is:
Xboxdrv --trigger-as-button --id 0 --led 4 --deadzone 4000 --silent & sleep 1
Now we’re done, so the last step is having fun with our sweet new retro gaming arcade!
If you haven’t downloaded any ROMS before, a quick Google search will yield a multitude of resources, but I’ve included a few of my favorite sites below (again, please download only ROMs you legally own):
The ISO Zone – Very comprehensive, and includes everything from Atari 2600 to Xbox and Playstation 2 ROMs. Extra credit for the complete ROM sets.
Doperoms – Fun font, and easy navigation in the sidebar.
Emuparadise – Sorts ROMs by category (IE consoles, handhelds, computers, arcade systems, etc.)
If you really want to up your game, there are loads of neat add-ons. Among the highlights are USB gamepads (NES, SNES, Atari, Sega Genesis, N64, and Gamecube). Plus, DIYers have gotten quite creative with homemade cases. For those into 3D printing, there’s the NinTastic NES-style case.
So there you have it. Here’s my RetroPie starter guide. Got anything to add? Head over to the comments section or hit me up on Twitter with any questions, additions, or observations!
Opinions expressed by DZone contributors are their own.