Skip to content

Instantly share code, notes, and snippets.

@jdcrensh
Last active February 14, 2019 22:53
Show Gist options
  • Save jdcrensh/4571a8abe5d886cbcf298f7c6829c166 to your computer and use it in GitHub Desktop.
Save jdcrensh/4571a8abe5d886cbcf298f7c6829c166 to your computer and use it in GitHub Desktop.
[Retropie Notes] #retropie

Retro gaming Raspberry Pi

There are many ways to build one, but this is mine!

Note that my build uses RetroPie, which is a highly configurable system. However, there could be a learning curve. This is especially true if you're not familiar with Linux or using the command line when you get into trouble. So keep that in mind! RetroPie is backed by a huge community, so help is usually just a Google search away.

Here's an alternate guide, but I only really used it to help me with overclocking so I could play N64 games:

https://itimagination.com/retropie-setup-guide/

Shopping list

There's kits you could buy that might have everything you need. But kits may be overpriced and/or use low quality components, so I chose mix and match and this is what I came up with.

Raspberry Pi Model 3 B+ - $35

Don't pay more than $35 for this guy.

https://www.amazon.com/dp/B01CD5VC92

Any 5v Micro USB Power Supply - $10

You can use any power supply, as long as it's rated at 5v, or else your Pi will not get enough juice.

https://www.amazon.com/dp/B00MARDJZ4

32GB MicroSD Card - $10

This is what the RetroPie OS will be installed onto, and you probably don't want to go lower than 32GB. For most systems games are really small, but if you want to play PS1, you'll either want to go bigger or run ROMs off a USB drive instead of the SD card.

https://www.amazon.com/gp/product/B06XWN9Q99

Optional - SanDisk 256GB Ultra Fit USB Flash Drive - $58

You can do without this and add it on later if you find yourself running out of space on the SD card. A USB drive also makes it easy to transfer game ROMs from your computer. Get whatever size you see fit, but I went with the biggest at 256GB since I wanted to load a lot of PS1 games.

https://www.amazon.com/gp/product/B07857Y17V

Retroflag Nespi Case+ - $24

It says it comes with a cooling fan, but mine didn't.

https://www.amazon.com/gp/product/B073ZC4TZY

Case Cooling Fan - $6

I went through a few fans, but this one had the best cooling while the CPU was under heavy load.

https://www.amazon.com/gp/product/B076H3FQ1W

Copper Heatsinks - $8

You can get any heatsinks of this size, copper transfers heat away from chips better than aluminum.

https://www.amazon.com/gp/product/B014KKY3KI

8BITDO NES30 Pro Bluetooth Controller - $35

There's a LOT of controller options, but I like the retro style and build quality of this one. If you have a PS3/4 or XBox 360/One remote lying around, those also work.

https://www.amazon.com/gp/product/B018K3Q4KS

Other stuff

You'll also need a small philips screwdriver (the case might provide one), an SD card reader, an HDMI cable, HDMI display or HDTV, headphones or a 3.5mm audio cord and speaker (if your display doesn't output sound), and a wired USB keyboard.

Assembly

This is the easy part. Have a clean workstation and wash your hands for this. You don't want to damage the Pi.

Don't do this with the SD card plugged in or you might snap it in half while putting the Pi into the case!

Get the Pi and heatsinks out. Peel off the stickers on the heatsinks and place them squarely on each chip.

Get the Nespi case out and place the Pi into it and connect the USB and ethernet cords.

Connect the 5x2 wire bundle to the GPIO pins. Double-check the Nespi's manual for the correct arrangement.

Use the 2 provided black screws to fasten the Pi to the case.

Get the cooling fan out, you'll only need 3 of the 4 screws.

Fasten a bolt all the way onto each screw to be used as a spacer. Otherwise or you'll end up fastening the screws straight through the top of the case like I did...

Fasten the fan to the top of the case with the 3 screws. The label should be facing the vents so that air will be pulled out of the case. Try to have it so the wires are coming out toward the front of the case.

Connect the fan to the two pins labeled "FAN" on the circuit board near the front of the case. Red wire to the pin labeled with a "+", black wire to the other pin. Connect USB power supply to the Pi and use the power button on the front of the case to turn on the Pi. Check to make sure the fan is blowing air OUT of the case through the vents. Turn it back off.

Topside Photo

Topside Photo

Underside Photo

Underside Photo

Close up the case. Make sure the fan wires are out of the way of the fan.

Fasten the case together with the six provided screws.

Install RetroPie

I'm just going to point you to the wiki for this one, which should explain everything just fine.

https://github.com/retropie/retropie-setup/wiki/First-Installation#installation

When you get to the part with the screen for setting up your controller, press F4 on your keyboard to quit EmulationStation. Cause you'll need to set up bluetooth first.

Change the Pi's default password

You'll at least want to change the default password at this point. There have been instances of Raspberry Pis being taken over by hackers to be used in botnets, so this is a good measure to prevent that. Type in passwd and change the pi user's password from the default, which is retropie. Don't forget your password! You could write down it somewhere, like on a sticker under the case...

source https://www.raspberrypi.org/documentation/configuration/security.md

Setup WiFi

Follow the wiki documentation below. From the command line, you get to the WiFi setup by typing sudo raspi-config and going to the WiFi menu item.

https://github.com/retropie/retropie-setup/wiki/Wifi

If you prefer, you could use a direct ethernet instead. I assume it'd work automatically, but I haven't tried it.

Upgrade RetroPie

You should update all the packages on the RetroPie. You'll need to be connected to the internet for this. From the command line, type this in:

sudo apt update && sudo apt upgrade

You can run this again every month or so to stay up-to-date.

Install safe shutdown script

The power button on the front of the Nespi case will, by default, cut power immediately. This is BAD because it can cause SD card corruption. Install the script below to make it so that the power buttons will safely shut down the Pi. Follow the example for RetroPie.

Note: this will only work if you've toggled that little, somewhat hidden, switch to ON inside the case. See "Topside photo".

https://github.com/RetroFlag/retroflag-picase

Setup your controller

If you're using the 8Bitdo controller, follow these instructions to connect it with bluetooth. Otherwise find instructions on the wiki for your specific controller.

https://github.com/RetroPie/RetroPie-Setup/wiki/8Bitdo-Controller

Finding ROMs (i.e. the games!)

If you want to actually have games on this thing and not an empty shell, you'll need ROMs. They often come in ROM packs specific to a game system. These are usually a huge set of nearly every game that exists for a given system. They're usually found as torrents, but on certain sites they can be found as direct downloads or as individual rom downloads.

For obvious reasons I won't be able to point you to anywhere specific, so you're on your own with this one... Google is your friend!

But it's not too hard to load them once you have them:

https://github.com/retropie/retropie-setup/wiki/Transferring-Roms

Alternatively, you could run the ROMs directly off the USB drive. If using this method, don't remove the USB drive or turn off the system during transfer or else you'll lose data.

https://github.com/RetroPie/RetroPie-Setup/wiki/Running-ROMs-from-a-USB-drive

Scraping Game Data

Once you HAVE games, a scraper is a tool that fetches metadata for your games, such as cover photos, screenshots, videos, descriptions, etc. I use a scraper called Skyscraper. It's very configurable and it gives me better results than the built-in scraper used by EmulationStation. But you'll have to use the command line to use it. I'd recommend it if you're comfortable with the command line. This one is up to you.

https://github.com/muldjord/skyscraper

PS1 games

Hint: you'll need a BIOS file...

https://github.com/RetroPie/RetroPie-Setup/wiki/Playstation-1

Google for "SCPH1001.bin"

Overclocking

You only really need to overclock the model 3 B+ if you intend to play N64 games. I followed the overclocking section of this guide for this:

https://itimagination.com/retropie-setup-guide/

Since his guide was for an older model of the Pi, my overclock settings is using arm_freq=1450 instead of what he has.

For the 3 B+, you should also set temp_soft_limit=70 in that same config.txt file. The default was changed from 70°C to 60°C after that guide was written. This setting will throttle the CPU after the temperature is reached, which is fairly easy to do under heavy load. But don't worry because around 80-85°C is when it's dangerous for the Pi. So with 70°C, there's still a good buffer, and you're unlikely to even reach that with decent cooling! Mine peaked at around 68°C in my stress tests.

Other Resources

There's so much more you could do with RetroPie that I didn't touch on at all. But you can find more info in the wiki, on reddit, or by Googling.

RetroPie Wiki

https://github.com/RetroPie/RetroPie-Setup/wiki

RetroPie Reddit

https://www.reddit.com/r/RetroPie/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment