Arcade icon

A complete guide to setting up RetroPie

(Updated ) by

I spent one year building an arcade machine and another year crafting my own handheld game console. I found myself installing and reinstalling RetroPie on my Raspberry Pi a million times to get it right for the type of work I wanted to do. I had to make a bunch of decisions along the way. The problem for me was in how scattered the information was.

Every time I needed to reinstall it, I was forced to reconfigure the system all over by following the exact same steps. So, I compiled all of them here with links to the official docs.

Contents

  1. Installing RetroPie
  2. Installing Games
    1. SD card
    2. External USB Storage
  3. Fine-tuning emulators
    1. Sega Megadrive/Genesis
    2. Neo Geo
    3. MS-DOS
    4. MAME
  4. Overclocking the Raspberry Pi
  5. Forcing HDMI sound
  6. Setting up an arcade controller

01. Installing RetroPie

Burning the RetroPie image into the SD card.

  1. Identify which model of Raspberry Pi you have.
  2. Connect a compatible SD card to your computer.
  3. Download and install the official Raspberry Pi Imager.
  4. On the Raspberry Pi Imager, click Choose device and select your Raspberry Pi model.
  5. Click Choose OS. Select "Emulation and game OS", then "RetroPie".
  6. Choose the version of RetroPie that corresponds to your specific board.
  7. Click Choose storage and select your SD card on the list to install RetroPie into it.
  8. Click Next and install RetroPie on the SD card.

02. Installing Games

There are 2 main options when it comes to installing games into RetroPie:

SD card

  1. Connect to wi-fi and enable SSH to be able to connect remotely to the Raspberry Pi. Consider assigning a static IP to make your workflow easier.
  2. Transfer ROMs using SCP or any of these methods.

External USB Storage

Keeping the games and the game's saved progress in an external source makes it easier to experiment with RetroPie in the SD card. It keeps the critical data safe in a plug-n-play source.

  1. Format a USB drive as FAT. Use any disk utility available on your OS for it.
  2. Create a folder named retropie-mount on the root of the USB drive. It will be used by RetroPie every time you boot the system.
  3. Plug the USB drive on the Rasbperry Pi, boot RetroPie and let 1 minute pass. RetroPie will copy some files and folders into the drive.
  4. Turn the system off and unplug the USB drive.
  5. Insert the drive into your computer. Now the folder /retropie-mount will have some folders inside: Folders structure after the first run
  6. Place the ROMs into its corresponding folder. Avoid zip files because they are not supported. All the game ROMs must go inside the console folder. For example: xxxxx.gba for Gameboy Advance must go on /retropie-mount/roms/gba/xxxxx.gba.
  7. Plug the USB drive into the Raspberry Pi and wait until the drive's LED stops blinking.
  8. Reset EmulationStation: Press Start to open the menu, then select Quit and Restart EmulationStation
  9. The ROMs are now on EmulationStation. You're going to see them in the main menu of RetroPie under the corresponding console name.

Find more info about this in the official RetroPie documentation.

03. Fine-tuning emulators

Following the steps above, you'll have access to the most common consoles and games. But there are some consideration you need to have for specific emulators.

Sega Megadrive/Genesis

The Sega emulator only recognizes 3 buttons by default. The Megadrive gamepad has only the ABC buttons in it, so that makes sense. In my case, I've installed 6 buttons in my arcade cabinet. So in order to use the 6 buttons layout I told the emulator to use the Genesis gamepad layout (ABC-XYZ):

  1. Launch a Megadrive/Genesis game and go to the RetroArch menu by pressing Select and then X.
  2. Go to Quick Menu then Options and set the 2 input devices to the 6 buttons gamepad.
  3. Exit the RetroArch menu.

Neo Geo

This emulator works a little bit differently from the other ones. Before copying ROMs, you need to:

  1. Get the Neo Geo BIOS: There is plenty of sites where you can find the neogeo.zip file you need.
  2. Copy the zip file (compressed) to both /retropie-mount/BIOS and /retropie-mount/roms/neogeo.
  3. Copy Neo Geo ROMs as zip files (compressed) to /retropie-mount/roms/neogeo.
  4. Restart EmulationStation.

Most of the games won't work the first time, but you can use another emulator for those specific games:

  1. Open a game and press any key before it loads.
  2. Go to Select emulator for ROM then lr-fba (or any other emulator) and Exit without launching.
  3. Relaunch the game manually.
  4. If the game still doesn't work, try with another ROM of the game.

Visit this complete video tutorial for more info:

MS-DOS

You need to use a keyboard for setting up and playing MS-DOS games.

  1. Connect the Raspberry Pi to the Internet.
  2. Go to the RetroPie settings on RetroPie, then Retropie setup. The first time getting there can take several minutes.
  3. Install DosBox on Manage packages, then manage optional packages, dosbox, and install from binary. It will take some time because it needs to download packages from the Internet.
  4. When it ends, go back to the main menu, then restart the system using the option Perform reboot.

Now MS-DOS is a console in the list of consoles. A new folder /retropie-mount/roms/pc will also be created automatically in the external drive.

Visit this complete video tutorial for more info:

MAME

I've had the worst experience when trying to understand this platform. I recommend you to play arcade games on Neo Geo or to find a version of the games for a more mainstream console. In case you choose to use MAME, this is what worked for me.

There are different versions of MAME that were launched in different years. So, for example, if you have the emulator for MAME 0.37b5, you must get games with the specific version 0.37b5. For some versions, the games are far more challenging to get than others. Another factor that determines which version you need is the Raspberry Pi model.

Then to copy the ROMs:

The first time a game runs, it will ask you for an emulator to run with:

04. Overclocking the Raspberry Pi

If you have an old model of Raspberry Pi or a Raspberry Pi Zero, it's recommendable to overclock your board. That way, you can run games that require more power. For example, a Raspberry Pi Model 1 and Zero can't run most of the Neo Geo or MS-DOS games, but an overclocked Pi can do it.

There are two ways to overclock a Raspberry Pi: the wrong one and the right one.

The wrong way lets you expand the core and memory as you wish, but it's dangerous to your board and voids the warranty.

Raspberry Pi provides an official way to do it right: Introducing Turbo Mode: up to 50% more performance for free.

I recommend you to do it in the right way:

  1. Edit the file /config.txt:
    $ sudo nano /config.txt
  2. Add (or uncomment if it's already there):
    force_turbo=1
  3. Save the changes and exit Nano. You can do both by pressing ctrl + X.

05. Forcing HDMI sound

I used an old computer monitor that doesn't have built-in speakers. In some cases, this kind of monitor has a 3.5mm (aux) jack to output sound to external speakers. In that case, you need to make the HDMI take control over the sound:

  1. Edit the file /config.txt:
    $ sudo nano /config.txt
  2. Force the sound to go through HDMI by adding the following line:
    hdmi_drive=2
  3. Save the changes and exit Nano. You can do both by pressing ctrl + X.

You can increase the sound quality by updating the /retroarch.cfg file:

  1. Edit the file /retroarch.cfg:
    $ sudo nano /retroarch.cfg
  2. Add (or uncomment if it's already there):
    audio_out_rate = 44100
  3. Save the changes and exit Nano. You can do both by pressing ctrl + X.

The headphone jack's sound is a lot clearer with a lot less static using that configuration.

06. Setting up an arcade controller

It took me a while to understand how to set up an arcade controller. Even though the documentation is right there, I didn't know the arcade controllers are called Xin-Mo.

A Xin-Mo controller on my arcade machine
  1. Edit the file /cmdline.txt:
    $ sudo nano /cmdline.txt
  2. Add (or uncomment if it's already there):
    usbhid.quirks=0x16c0:0x05e1:0x040
  3. Save the changes and exit Nano. You can do both by pressing ctrl + X.

Turn on the Rasbperry Pi and boot RetroPie. Then set up all the buttons of your controller.

A screenshot of the screen with instructions to setup the controllers

For an arcade machine (Xin-Mo controller), I recommend using the same distribution as the Sega Genesis controller. For any control that you don't need to set up, keep pressing any key to choose -NOT DEFINED-. Sega Genesis controller

You can change this later and also set up different controller distributions for individual consoles and games.

The A button becomes the Enter key, and the B button becomes Escape.