RetroPie is a complete software package that's installed on the Raspberry Pi and allows you to play old video games. The Raspberry Pi is a small "bang for the buck" computer. We are talking about ~$100 once you buy everything you need. In terms of performance, the latest Pi 3.0b model is quad core 64-bit 1.2ghz with 1gb built in RAM. This isn't anything to brag about in terms of a modern day gaming computer, but it is all you really need to play any consoled game from the N64/Playstation 1 era and prior.
This isn't going to be a click-by-click guide on how to setup and configure the Pi. Guides like this already exist and the last thing we need is another one. This is going to be a common usage walkthrough on what to do, and where to go. Setting up the Pi and getting it to turn on is one thing, but figuring out what to do afterwards is another. Often times there is more than one way to do something scattered out there on the internet. I've tried various methods and I'm going to point you to what works best for me and what I think will work best for 95% of Pi users.
The Canakit is a Raspberry 3.0b (Currently the latest Pi you can get as of 12/26/2016) with all the basic add-ons you will need. It comes with heat sinks for the GPU and CPU, a case, a 32GB Class 10 MicroSD card, a HDMI cable, and a power cord. Everything is available from amazon for around $75 shipped. If you have Prime you'll have it in two days. In addition to this buy any USB keyboard. Walmart or Amazon should have some for around $10. Also you will want one wired controller to start with. I chose an Xbox 360 controller. Find an OEM controller and not some cheap knockoff.
It sounds difficult, but it's actually really simple if you follow these steps: https://github.com/retropie/retropie-setup/wiki/First-Installation. There is even a video walkthrough on the page. Once you've completed this process, you should have a working Pi that will boot up to Emulation Station. It will have internet access and you will have a working keyboard and controller.
This really isn't too advanced. The Pi comes delivered at a set CPU speed of 1.2ghz. Overclocking is where you push the CPU a little harder. So instead of cycling at 1.2ghz it may be 1.3ghz. Overclocking is considered a fine art. There are Do's and Don'ts, and tradeoffs to consider. If you push it to the max you will need a bigger power supply, better cooling, and it will shorten the processor's life. You can go crazy with editing configuration files, waiting until it causes crashing in applications, then backing it off a little. I'm not recommending doing any of this. What I do recommend though is that you bump it to the next step. Asking for 100mhz more out of a processor that you just installed the Canakit heat sinks on is perfectly safe. I actually have the older Raspberry Pi 2 which is only 900mhz. I've had it overclocked to 1000mhz for 2 years now. If you can go into the Configuration/Tools menu of RetroPie and they provide pre-configured levels of overclocking; bumping it up 1 spot shouldn't hurt anything. The 2 minutes it took you to gain ~10% more CPU will help you especially in more intense emulators like the N64. Here is the latest GitHub page on overclocking your Pi that has more information: https://github.com/retropie/retropie-setup/wiki/Overclocking
Next, you will want to adjust the GPU/CPU memory split. The current Pi comes with 1GB built in RAM that is shared between the CPU and GPU. By default the GPU is only getting 32mb of RAM. I'd give it more, especially if you are going to try to run N64 games. I have mine set to 384mb for the GPU. The Github page on this is located here: https://github.com/retropie/retropie-setup/wiki/Memory-Split
The Pi has taught me that there were a TON of gaming consoles I had never heard of. The RetroPie is capable of emulating older game systems very well. Before you go out and try to find every known rom in existance you should really take a step back and plan out what systems you really want your Pi to host. Here are some guidelines that should help you:
Definitely use Github to customize your list. For instance HERE is the page for the MAME emulator. See how several emulators are listed? Notice how some start with "lr" in the name. Those are liberato. So this is a system I would definitely support. The other key things to take away from this page are the extension and the BIOS. The extension is for the rom files. This is saying that the rom files this emulator uses should have a .zip extension to them. Some platforms support multiple extensions. It's important to know the extension is correct before downloading and copying games to the Pi. Also the BIOS is important. These are special system files. For this MAME emulator if you didn't have NEOGEO.zip copied into the rom folder as all the games, the emulator wouldn't work or some games may not be playable. The Intellivision emulator has several BIOS files that are needed including one for IntelliVoice. So keep this in mind when trying to find Roms. You'll need to find the BIOS files as well.
You probably noticed that after setting up the Pi you couldn't see any emulators inside of Emulation Station. Emulators will ONLY appear inside Emulation Station when games exist in their corresponding rom folders. Afterall, there is no since in turning on a Super Nintendo if you don't have any games for it. A lot of the online videos will show you using a USB thumb drive to copy roms over. That is just over-complicating things. Instead download WinSCP onto your laptop, launch it, and connect to the Pi. The name of the Pi should be "Retropie" and the login credentials will be pi/raspberry by default. Once connected you can navigate to home\pi\Retropie\roms\
At this point you probably have a bunch of games that are playable on the Pi. However they are not organized very well. It's just a list of filenames and it's not always intuitive what name corresponds to what game. This is where Scraping comes in. Scraping will take a hash of the game (or sometimes filename) and compare it to a few different online game databases. When it finds a match, data related to the game (such as title, ratings, description, even a picture of gameplay or the game box) will be downloaded to the Pi. Now when you select an emulator and see the list of roms available they will be more legible.
I've tried scraping roms 3 different ways.
I prefer the last method the best. I'm not even going to describe how to do the first 2, but you can read about them here: https://github.com/RetroPie/RetroPie-setup/wiki/scraper. To use the command line method, Floob has an awesome Youtube video describing it. I encourage you to watch it before trying it yourself. Floob puts out other good videos too. He's worth subscribing to. You can watch it HERE.
These are the general steps to manually run the SSelph Scraper.
*NOTE: Sometimes if you scrape too much you'll see 429 errors. This just means the website that's scraped against has put a temporary block on you because of all the requests you've made. This is normal. Simply try again the next day. Eventually you'll get everything scraped.
*NOTE: When you scrape games (except for when using "-mame" option) it looks at http://thegamesdb.net/. When you use the -mame option it is looking at http://mamedb.com/. The Mame website has been down for the last few months so trying to scrape against it will yield "Hash Not Found" errors. If you run into this you can trick the scraper to look at this mirror website: http://mamedb.blu-ferret.co.uk/. This can be done by modifying the \etc\hosts file as shown below. You'll need to ping the mirror website to get the current IP address as it seems to change every few days.
So SSelphs scraper will probably get you around a 90% hit ratio for rom meta data. You can call this good enough, or you can try to get more. Inside Emulation Station you can now use the built in scraper if you are careful. What I do is run the built in scraper, but I set it to scrape 1 system at a time and to let me decide on conflicts. I also have the Filter set so that it does "Roms Missing Images Only". This means it is only going to scrape about 10% of the roms. It's still kind of slow and you will have to sit there in front of it to match conflicts. There will still be some games you can't find. If it finds no matches you can click "Add Input" and try searching for a few different terms. You can even log into http://thegamesdb.net and see if you can find it there. Sometimes it's easier to use the website to search. I've ran into issues where I can find it on the website but not in the scraper. I'm not sure why. Fortunately the scraper allows you to skip it if you can't find a match. After this you will have a higher hit ratio.
What do you do about the games that couldn't be scraped? You can leave them and they will appear with the filename. You could delete the rom. You can press select in Emulation Station and manually edit the meta data. You could play the game and see if maybe you were using the wrong search terms. Perhaps the filename has nothing to do with the game name and you've been searching for the wrong terms. You can also manually scrape a single game by going into the Edit Meta data menu and selecting scrape at the bottom.
*NOTE: So one thing that bugs me is the file location. The SSelph scraper puts the gamelist.xml and boxart images right in the rom directory. I like this. If you try to get a better hit ratio and run the built in scraper; it puts the boxart images in /home/pi/.emulationstation/downloaded_images/<system>/. The boxart still displays correctly in Emulation Station because the gamelist.xml file in the rom directory points to the weird path. So it works, but bugged me. To manually fix it you could copy the images over. Example: After using the built in scraper to grab meta data for several roms that SSelph's scraper couldn't match you now have several images in /home/pi/.emulationstation/downloaded_images/n64/. You can move those image files to /home/pi/RetroPie/roms/n64/images/. Afterwards you can edit /home/pie/RetroPie/roms/n64/gamelist.xml and change any path that points to "/home/pi/.emulationstation/downloaded_images/n64/boxart_filename.jpg" to point to "./images/boxart_filename.jpg". Then all of your boxart images are in the same SSelph directory. I created a perl script to handle this move and XML for me. If you are Perl savvy, you can grab it HERE.
I play my games on a 40" 1080P tv. When all of these old consoles came out a 40" tv with this resolution was unheard of. I think that systems like the NES or Arcade play fine with the screen stretched bigger. However it is too pixelated for handheld systems as the games end up being 6x the original screen size. Fortunately there is an easy way to adjust this by editing configuration files. This Wiki on Github explains it well: https://github.com/retropie/retropie-setup/wiki/Smaller-RetroArch-Screen Since you have WinSCP you can do this on your laptop. Basically you are setting a new heigh-width of the screen and an X/Y location on where the center will be. I like to have my consoles 3x larger than they were originally. Here's an example of my Gameboy Advance configuration:
This is going to be the most detailed section. Controllers are probably what most people get hung up on when building and configuring their Pi. Since I started, there have been many improvements with recent releases RetroPie making it better.
I personally use the wired xbox 360 controller the most. It's an OEM controller that has proven the test of time for being reliable and well built. I'm sure the wired PS2 controllers are the same way. For older game systems like the Nintendo or Super Nintendo I do have some replica controllers. I found "Retrolink" controllers to be the best. I bought a non-branded set of NES controllers off eBay for even cheaper but I wasn't happy with them. They are finicky when it comes to holding the down button. You'll be ducking in a game like Contra then all of a sudden stand up and get shot. The Retrolink nes controllers don't have this problem. They do feel a lot lighter though than the original controllers. I may take them apart and hot glue some quarters in them to make them feel a little heavier.
I find the best way to configure a controller is using the Controller Configuration right in Emulation Station. It will prompt you with a list of buttons to press. Just press the corresponding button on the controller and it learns what is what. Afterwards I like to edit the control configuration file it creates for that controller and organize/comment it better. When you configure a controller the config file is saved to "/opt/retropie/conigs/all/retroarch-joypads/". You can navigate to this directory and open up the file. It will be kind of legible. However it may not be apparent that input_l2_btn = "7" is the left trigger button.
So what I do is utilize jstest. If you navigate to /dev/input you will see a few things listed. For instance "JS0", "JS1", "JS2" etc... These are joysticks that are plugged in. You can test the controller by typing "jstest js0". Ctrl+C will exit the test. This will give you a very simple screen to test button and joystick inputs. You should be able to press a button on the controller and see something on the screen flip from OFF to ON. If not, you may not have the right controller passed into jstest. You can try "jstest js1" and repeat. Eventually you'll find a controller that works. When you do, you want to record each button. For instance pressing the A button may make the #5 button on the screen go from OFF to ON. So take note of this. The Joypad axis are a little trickier. Say you press the joystick up. This may cause the jstest program to show that the 0 joystick goes to -3423. Press the joystick down and this number goes to a positive 3430. What this means is that -0 is UP and +0 is down. For the 1 joystick spot you may see the same thing. Move it to the right and you see -3422. MOve it to he left and you see a positive 3430. This means that -1 is LEFT and that +1 is RIGHT. Eventually you'll have the numerical representation of each button/axis.
Now you can go into the "/opt/retropie/configs/all/retroarch-joypads/" directory and find the configuration file. You can edit the file and organize it so it's easier to understand. I like to group the joystick axis stuff towards the top, the buttons under that, then the hotkey stuff at the bottom. The hotkey stuff is for special commands. For instance pressing select and start at the same time will exit the game. Here's a before and after look at my Retrolink Nintendo 64 Controller controller.
You will want to repeat this process for every type of controller that you have. This controller configuration is what will be used for every Libarato Emulator. It's the global configuration. That's why it's located in the ALL directory path.
Let's say that you have a system where the global configuration doesn't work well. Maybe you are trying to use an xBox Controller to play Nintendo. On the Xbox controller the A button is to the left of the B button. On the original Nintendo controller the A button is to the Right of the B button. So just for this system you'd like to flip these buttons. To do this you need to mimic the structure of the ALL directory. Using WinSCP I would navigate to /opt/retropie/configs/All/ and copy the "retroarch-joypads" and all it's configuration files over to your desktop. Then change to the /opt/retropie/configs/nes directory. Move the "retroarch-joypads" folder you just put on your desktop over to this nes path. Now open the xBox configuration file in the nes path. Find where the A and B button are defined (This should be easy as you already commented these files when running jstest), and flip the numerical values. If you want you can remove the other controller configurations from the nes directory that you aren't tweaking you can.
Finally we have to tell the nes emulator to look in this retroarch-joypads folder you just created in the nes directory before looking at the one in the ALL path. Open the "/opt/retropie/configs/nes/retroarch.cfg" file and above the bottom #include line, add this line: "joypad_autoconfig_dir = /opt/retropie/configs/nes/retroarch-joypads/". It should look like this:
*NOTE: There is a lot of extra information on Github regarding controller configuration. You can view this at https://github.com/RetroPie/RetroPie-Setup/wiki/RetroArch-Configuration. On this page it mentions making system specific controller changes by copying the content of your config file directly inside the "/opt/retropie/configs/nes/retroarch.cfg" file above the #include line. I couldn't get this to work. The only way I could get it to work was to mimic the directory as I outlined doing in the steps above. Perhaps it's some kind of bug that will be fixed in a later version.
It's also possible to configure controllers to be game specific. To do this you would copy the controller configuration file and paste it directly in the home\pi\retropie\roms\
Now this is something that scared me the most. I setup the Pet Rock Block controller on my Pi and have an arcade stick with several buttons. This works well for a lot of the Arcade style games. But I was worried that these controls (which are plugged in via ribbon cable and not something that's easily unplugged like a USB cable) would trump any of my controller configurations. Meaning I'd plug the NES controller in, go to Mario and the controller wouldn't work. Instead the Joystick would pick it up. There is a lot of discussion on the forums where people are having this problem. There is even this project which seems to try to fix it by providing yet another configuration: https://github.com/meleu/RetroPie-joystick-selection
Now honestly I didn't run into this issue. And I think it may be because I setup my Arcade controllers last? This is how it works for me right now. I have 4 USB ports. The top left port contains my USB wifi card. I have a Pi 2.0 which doesn't have build in wifi. The top right port contains my USB keyboard. This leaves the bottom 2 USB ports available. My Pet Rock Control Block is hooked up via ribbon cable feeding directly to the pin header on the Pi. If I don't have any controllers in the system defaults to my Arcade joystick and buttons. As soon as I plug any controller in, it defaults to that controller. If I want to play Nintendo I plug 1 or 2 NES controllers in the bottom USB ports. If I want to play Super Nintendo I do the same with the SNES controllers. If I want to use my Xbox controller, I plug that in and it works. When I load any game in the bottom left of the screen I can see where it quickly detects joypads. In yellow text it will say something like "USB Gamepad COnnected on 0". After it will say it detected by Arcade controls. Because they get detected afterwards they don't take control. So maybe it works this way all the time. Maybe I just got lucky. Or maybe it's working how I want it because I setup the Arcade Controls last.
It should go without saying that you should have your Pi backed up. I like to keep all my backups on a USB thumbdrive. This includes your roms and any configuration file you made changes to. Sure you could remake changes but that is time consuming. Once your Pi is working the way you want it to I would backup any controller configs in the "/opt/retropie/configs/all/retroarch-joypads/" directory.
Eventually the latest version of RetroPie that you just installed will not be the latest and greatest. You will want to upgrade it. Before doing so I'd make sure you have everything backed up. Then you can reference this page to help you through updating: https://github.com/RetroPie/RetroPie-Setup/wiki/Updating-RetroPie
The default theme that comes with RetroPie is Carbon. It has a carbon fiber pattern in the background. If you don't like this though you can change it. There are good instructions at https://github.com/retropie/retropie-setup/wiki/themes. If you install 4.1 you'll notice that the Carbon theme delivered looks different than the one on the Wiki page. I'm not entirely sure why, but they simplified it. It no longer shows labels. This looks stupid for games that couldn't be scraped properly as it will say "unknown unknown unknown" on the screen. It would look much better if it said "Released: unknown Genre: unknown Developer: unknown". At least then you would know what is unknown. The star ratings are also gone. Honestly I liked the way it looked delivered in 3.0 better. I have no idea why they changed it. You can see in the 4.1 readme file that it mentions removing labels and stuff. So it was done intentionally.
Why am I bashing this theme? There really aren't a lot of good themes for RetroPie. This one was my favorite and I'm bummed that functionality was taken away. There are other themes you can install. Some I do like (especially the ones that show an actual picture of the game system and history blurb), but I run into the White Screen of Death issue. For some unknown reason if you have a large number of emulators to flip through, some of the theme backgrounds won't render. You will swipe to GameBoy Advance and the background will be white. The themes with a simpler background (aka a nice carbon fiber image that is the same for every system) do not run into the White Screen of Death. So out of all the themes that don't see the WSOD, carbon is my favorite. And now it doesn't contain stuff I like. I did invest some time into re-modifying the delivered 4.1 carbon so it to contains some of the missing labels and stars. You can grab the a copy of what I use HERE, but no guarantees. There are also some other carbon based themes available on the RetroPie forums. I plan on testing them out someday to see if I like them better than mine. Edit: 12/20/2020 - Now pi 4.7 is out and the Carbon theme contains the labels. There is also a "Favorite" and "Last Played" category which I love. I no longer do anything custom to the delivered theme.
This section only really applies if you are going to have arcade style controls. I really knew nothing about joysticks when ordering. I ended up going with 2 Sanwa JLF-TP-8YT Joysticks from Focus Attack. I read an article somewhere saying they were used in competitions so I figured they would be good. Straight out of the box the first thing I noticed is that they are noisy. You can hear them click when you move them in any direction. So you may want to find some quiet ones. Also the other thing to consider is 4-way vs 8-way. A 4-way joystick has up/down/left/right. Older games like Pacman used it. An 8-way joystick can do diagonal directions. If you try to use a 4 way joystick on an 8-way game you will be limited on movement. If you go vice-versa you can run into weird results. For instance Pacman was almost unplayable using the as-is Sanwa joystick.
I believe the actual # of switches between a 4-way and 8-way joystick are always the same. There will be 4 switches. The difference is the gate. A plastic gate goes underneath the device to restrict movement of the pad to the corners for a 4-way. There will be no restrictions with an 8-way and a corner will activate 2 switches (For instance Up and Right means you are going towards the top right corner). Some joysticks have different gates you can use, but usually they are not easy to swap in and out. My Sanwa came with a square looking gate. I could move it in all 8 directions, but the corners felt awkward. I think because of the nature of the square, I could push the joystick deeper into a corner than I could up/down or left/right. Rotating it in circles didn't feel fluent. So I swapped the square gates out with an Octagonal gate (Part# GT-Y which costs 95 cents). This was a huge improvement. Pacman was now very playable. I found with Pacman though that I'd have to be pretty quick to switch directions. Going from down to up took some time. I wanted to shorten the throw. Turns out there is an actuator sleeve I could swap out. I went with a 1mm KOWAL oversized actuator (only 30 cents!). This is the part that rides back and forth inside of the gate. By having a thicker sleeve it means the throw is shorter. While I was at it I got the upgraded springs. They are stronger and the joypad feels less sloppy in the neutral position.
After customizing the joypad with the octagonal gate, the thicker actuator, and the stiffer spring it is perfect. Yes it still has an audible click, but I'm very happy with it. My advice here would be to order all of the extra stuff at the same time as your joypad. Paying a few bucks extra to get different gates/springs/sleeves etc... will save you on shipping costs in the long run and it will let you figure out what fits you best.
For the buttons I went with Suzo Happ Convex Competition Long Stem Pushbuttons. They have a ton of colors available. I went with the Suzo Happ Concave buttons for start and select. They sell short and long buttons. The difference being the thickness of material the buttons are going through. So plan accordingly. If you order from Focus Attack I'd recommend buying their wire packages, especially the ground daisy chain wire. It made wiring easy.
Here is a picture of my current setup. I am still in the process of designing an arcade cabinet to build. I think I am going to mount the tv on the wall and make some kind of pedestal for the arcade controls. Having a pedestal also will allow for me to sit farther/closer to the tv. Plus if I'm playing solo I could move it to the right and center the player 1 arcade controls to the tv. I'd have a hard time doing that if the tv was part of the cabinet. I want to make some kind of door and shelf inside the pedestal to hold controllers too.
Edit: 12/20/2020 - I finally finished my gamepad design. Some pics below. Also I made this video going over the design.
Here are some good starter websites. Also there is quite a lot of information on Youtube as well. Hopefully what I outlined will be helpful to you.