A couple weeks ago I wrote about messing around with the Raspberry Pi and how it made me a hobby hacker again. In that post I mentioned the desire to build an Emulation Station so Abby and I could play old video games. That project has become much more of a reality and has been increasingly enjoyable.
The RetroPie Emulation Station lives inside a little 3” x 5” black box on my entertainment stand. This little beauty contains every game console from Atari to PS1, including full MAME library, DOOM Engine (Yea!) DOS Box, the works. It cost about $80 and a few weekends full of patience and perseverance. The reward was well worth it, and fulfilled not only the childhood dream of having a working arcade in my house. It opened up worlds of possibilities in micro-comupting, I never knew were there.
My enthusiasm has recently been noticed by a few friends who asked how I built this little gadget. So this post is my attempt to fulfill their desires. Here is how you build your own RetroPie Emulation Station.
1 Raspberry Pi 3 (RPi3) Model B Quad-core 1.2GHz w/ 1G RAM
*Any Pi 2 and above should do, but with the RPi3 being only $35 you really cannot argue with going with it.
1 32GB Micro SD Card
* You can use a smaller card but I would not go smaller than a 16gb
1 USB gamepad like an Xbox controller or Logitech controller
1 USB Stick (8GB minimum for your ROMS)
1 4-port Amazon USB Powered HUB
1 USB or Wireless Mouse
1 1 USB / Wireless Keyboard
The Pi was a Canakit I purchased through Amazon. The link will take you the exact package I bought. You do not need this much power or storage to make the Emulation Station. However, my Pi is running more than just RetroPie so, I wanted a bit more umph.
You will need a way to get your ROMs onto the Pi so you should have a USB stick handy so you can transfer them from another computer.
Raspian is the Linux operating system. RetroPie is the bundle of packages that makes this all possible. And Emulation Station (ES) is the front-end management system of our arcade. The mind(s) behind PetRock came up with the RetroPie project, bringing Emulation Station together with preloaded emulators and configurations. They made it SUPER FAST to get things up and running. There are many methods to building a RPi arcade. However, RetroPie puts it all in one nice little package and is the best solution so far, in my opinion. Kudos to PetRock!
Before we get started
There are two options for installing RetroPie. You can install an image onto your SD card, pre-formatted with Raspian and configurations. Or you can install it on an existing Raspian system that you created on your own.
There are advantages and disadvantages to both methods. However, I elected to install on top of an existing system. This gave me the ability to use the some other features of the overall RaspberryPi system with ease. If you would like to try the SD card image method you can find instructions on the RetroPi project site.
Here comes the disclaimer. None of this is plug and play. So, no matter which path you take there may be considerable amount of configuration and hacking that needs to be done in order to get everything working perfectly. This is also all open source software. Other than the ROMs, of course. There is tech support to call or email if you have technical difficulty. There is however, a thriving community of Pi and RetroPie enthusiasts, including me, on the web. At the end of the article there are links that will help put you on the path of support. Plus you have me! Ask any questions you have in the comments below and I will answer them the best I can. Now let’s build our home arcade.
Getting Familiar with the Pi
You should get at least a little familiar with RaspberryPi and how it does it’s thing. How To Geek has a great article to get you started. It is about 3 years old but its info is still mostly relevant. I highly suggest giving this a read if it is your first time playing with a Raspberry Pi.
If you have elected to get your Pi the exact same way I did, the SD card that comes with your Canakit will be pre-formatted with NOOBS which allows you to choose the OS of your RPi. If you decide to go the total purist route and buy a blank SD card or buy the hardware separately than you should follow these instructions first.
Assemble your Pi, and insert your pre-formatted SD card. Plug-in a USB mouse and keyboard, followed by the power and follow the on-screen instructions. Your screen should look something like this.
Select Raspian in the list and then Install from the top. This will install a Linux distro, based on Debian, that is specific to the RPi hardware (hence the name Rasp-ian). Once the installation is complete your RPi should boot like a normal desktop computer.
Setting Up RetroPie
We need to do some package installs to get the system ready for set up. This means we need internet connectivity. If you are using the RPi3 you have WiFi on board but I suggest plugging the RPi directly into your router for best results.
A good amount of our work will be executed using the Terminal. Those who are familiar with Linux, should be relatively comfortable. For those with little to no experience with Linux, not to worry. It is very easy process and you will be learning along the way. Have a bit of patience and I promise the reward is great.
Start by opening Terminal and getting some updates. Right click on the desktop of your Pi and select “Run Terminal Emulator”
You will get a prompt that looks like this:
Your prompt will probably read as pi@raspberrypi:~$. That’s fine. I have renamed my RPi to be “mediapi” because I have a couple of them.
First, we will make sure all of our packages are updated, and our Pi is running the latest OS, software and firmware. Execute the following commands:
sudo apt-get update
Updates all currently installed packages and software to the latest versions
sudo apt-get upgrade
Upgrades the OS and the system to the latest version of Raspian.
Updates the firmware of the Raspberry Pi
Once these are complete, reboot your pi.
When you get back to the desktop open your Terminal and enter:
$ sudo apt-get install -y git dialog
This sets up a type of GUI for the configuration script we need to install RetroPie
Now we need to get the RetroPie Setup Script that will do most of the heavy lifting for us. Make sure you are in your home directory by entering the change directory command “cd”:
*Your home is indicated by the “~” in your prompt.
The code we need lives on Git so type:
git clone --depth=1 https://github.com/RetroPie/RetroPie-Setup.git
This will create a new directory, in your home directory, called RetroPie-Setup. We need to go to this directory and make the setup script executable:
Changes us to the RetroPie-Setup directory
chmod +x retropie_setup.sh
Changes the permissions of the file
Now we can run the script from this directory simply by typing:
**Important** You must run this command using “sudo”. It will still run without it but will not have the permissions to write to some vital files. It will leave you with a false install.
After a moment or two, you should get a screen that looks like this:
The setup recommends installing via Binary. That is all fine. I elected to install “Source-based”, because I am a nerd and wanted the “bleeding edge” stuff. It also does not take as long as they state in the setup, especially if you are hard wired to your router. I do not know what the results of installing Binary are, but the word around the web is that it works just fine. If you are connected via wireless, I suggest you take the binary route. Regardless of which one you choose this process takes quite a bit of time. So, sit back and relax.
This script is installing everything you need including Emulation Station as well as all emulators, configurations and such. You will probably get a few warnings about having to move files for Atari and some other systems. Just say okay until the script has completed the setup. It should give you some indication that it is done, either by dialog or by taking you back to the Main Menu.
Once back in the original menu, select Item #3 from list—Setup /Configuration
From here you can configure a few things like whether your Pi will automatically boot into Emulation Station as well as enabling packages for various gamepad setups and emulators. You do not need to mess with this stuff now, you can mess with it later via the RetroPie menu in Emulation Station. You can also get back to this screen through the RetroPie Menu in Emulation Station. Once you have confirmed your install you should play around with this a bit more.
I would like to tell you that it all will work out of the box but you have to do a bit of tweaking here and there. We will get to that. For now, lets just make sure RetroPie got everything installed correctly.
In the Main Menu of the Setup script select “Perform Reboot”
Your system should restart and after a bit you should see an Emulation Station splash screen with the message “Loading…” displayed under the logo:
If you have a gamepad like an Xbox 360 controller or equivalent, plug it in and follow the onscreen instructions to setup the gamepad. This is only setting up the gamepad for Emulation Station. You will need to do further gamepad configurations based on the emulator. I will show you how to do this in a follow up post.
If you do not see the ES screen and instead have a prompt or reboot takes you back to your desktop simply type
emulationstation into any prompt and all should be normal.
On first boot Emulation Station only has a few selections of platforms. This is because RetroPie will only auto-load emulators based on ROMs present on the system. Since you probably do not have any ROMs on the system yet, all you can really mess with is the default emulators and the RetroPie menu.
ROMs? You Are On Your Own
RetroPie does not come with ROMs, only emulators. You are on your own when getting ROMs, because legally you are not allowed to get them for free. If you do some searching on the web I am sure you will find what you need. Once you have come across some ROMs you will need to place them in the proper directory. By default this is
depending on what platform your ROMS are for.
Now, in order to install ROMs we need a better way to navigate your system and install ROMs. the easiest way is to get access the desktop interface on your RPi. To do that you have to quit Emulation Station/RetroPie. Just press the button you mapped for “start” on your controller and you will have the option to quit. Just, quit Emulation Station. Shutdown will power the RPi off and Restart will restart us back in Emulation Station.
Quitting should bring you to a full screen command prompt like you had in the Terminal emulator. Type:
BOOM. Back in the desktop. Plugin a USB stick full of ROMS and start placing them in the proper ROM directories using the file manager. To get back to Emulation Station/RetroPie simply open a Terminal window and type:
There you go, back in the arcade.
As I stated earlier, I plan of following up the post with some of my configuration tips and experiences to help you along the way. Post any questions you may have in the comments below and I will answer them the best I can.
A couple of things…
There are still a lot of issues I am currently working out. Here are a couple I have found so far:
Most gamepad configurations need to done manually. I tried to use the Autoconfig in the RetroArch application found in the RetroPie menu but it did not work. Currently I am editing each *.cfg manually to get it all perfect.
I have not found a universal way to “exit” a game from the gamepad. I have hotkeys enabled but that is only getting me halfway there. It is different for each system. I either have to hit the ESC key on my keyboard or SSH into the Pi and
sudo pkill retroarchin order to stop the game. Not a deal breaker but not ideal.
Exiting from RetroPie/Emulation Station is not consistent. Sometimes it goes to a command line, other times the screen just stays black and I have to SSH in, or reboot.
MAME is the hardest in terms of gamepad mapping. This is due to the enormous amount of game button layouts on arcade cabinets. What is the FIRE button in one game is “DUCK/DODGE” button in another. I may have had a breakthrough with this the other night. I will keep you posted.
Some resources to help you:
Complete setup and configuration guide can be found on the RetroPie Wiki.
The guys who made RetroPie have a great section on their site dedicated to the system. You can find more information here: https://retropie.org.uk/
There is also a wealth of information on their forums.
I recommend bookmarking all of the sites listed above as well as the Raspberry Pi Stack Exchange.
This has been an awesome project to tinker with. Although it still needs some tweaking here and there, I am pretty pleased with the results. Please share your experience if you can. I would love to see how others were able to make this happen. Have fun in the arcade!