James Mackenzie

RetroPie Ultimate Setup Guide

How To, Videogames, Raspberry Pi, Retrogaming, Streaming

Oct 8, 2018

With RetroPie, your Raspberry Pi can become the ultimate retro-gaming machine. Mega Drive, SNES and even PlayStation all run great - and (with a little extra work) you can even stream more taxing games from your home PC

Interested and want to get started? Read on

What you need

  • Raspberry Pi and a compatible power supply. For best performance use a Raspberry Pi 3 Model B+
  • Raspberry Pi case. Optional but recommended. I use this one
  • MicroSD card. At least 8GB recommended. Find compatible cards listed here
  • MicroSD card reader. To write the downloaded RetroPie image to your SD card
  • Television/monitor and HDMI cable
  • Wi-Fi dongle or (for best streaming performance) Ethernet cable
  • Wired Xbox 360 controller, or a Wireless Xbox 360 controller paired with a Wireless Gaming Receiver. Many other controllers are supported, but the Xbox 360 controllers work best
  • USB keyboard. To edit config files on your Raspberry Pi. Alternatively you can do this from your networked PC via SSH. More details below

Install RetroPie

1. Download RetroPie image and write to SD card

Some fairly simple first steps. Follow the official instructions here

2. Enable SSH on your Pi

Create a file named ssh in the root directory of your SD Card. This way you can configure RetroPie from your networked PC - no keyboard required. Learn more here

3. Pair your Wireless Xbox 360 controller

If you have a Wireless Xbox 360 controller, you’ll need to pair it with your Wireless Gaming Receiver before continuing. Find the instructions here

4. Boot up your Pi and configure your controller

Switch on the power to your Raspberry Pi. After a minute or so, EmulationStation will launch and ask you to configure your controller

Go ahead and configure your controller as per the diagram below

An important note! EmulationStation follows the SNES button layout. So when configuring your Xbox 360 controller, you’ll need to switch X with Y, and A with B. Yes, this is confusing - but don’t worry there is a fix for it later

5. Make a note of the RetroPie hotkeys

These will enable you quickly access emulator features from your joypad:

Hotkeys Action
Select+Start Exit
Select+Right Shoulder Save
Select+Left Shoulder Load
Select+Right Input State Slot Increase
Select+Left Input State Slot Decrease
Select+X RGUI Menu
Select+B Reset

Optimize controller settings

1. Fix the “A and B” controller issue

Since the 360 controller has A and B reversed vs a SNES controller, the Emulation Station will be extra confusing! Prompting you to press A when it means B and vice versa.

You can fix this via the following config:

Configuration -> RetroPie Setup -> Manage packages > Manage core packages > emulationstation > Configurations/Options > Swap A/B Buttons in ES

2. Enable analog sticks

Wouldn’t it be great to use the 360 controller’s analog sticks instead of that mushy d-pad? Well you can!

In the EmulationStation menu:

RetroPie -> Configuration -> Configuration Editor Advanced Configuration Configure Libretro options all/retroarch.cfg input_player1_analog_dpad_mode = 1 Cancel -> Cancel -> Cancel -> Cancel

3. (Re)configure input to enable your changes

You’ll need to reconfigure input before EmulationStation and your emulators will pick up the changes above. Go to:

Start -> Configure Input

As before, don’t forget to reverse around A and B, X and Y

Copy ROMs

1. Copy some ROMs via SFTP

You’ve probably noticed nothing shows up, right? EmulationStation is smart. It won’t show you any emulators or platforms unless you have ROMs to play on them.

I recommend SFTP to transfer files.

On Windows, I use FileZilla, but any SFTP client is good. Go to “Site”, “Add new Site” and add the following:

[screenshot of SFTP config in FileZilla)

Then connect and navigate to the following directory: /home/pi/RetroPie/roms

You’ll see lots of folders for each platform. Copy the ROMs into the corresponding folder for their platform. I recommend you copy zips (the file size adds up!) and to use the No Intro naming convention (which EmulationStation and any metadata scrapers understand and will present to you appropriately)

2. Restart Emulation Station to make ROMs appear

How do you make the ROMs and emulators show up? Start -> Quit -> Restart Emulation Station

Now you should see the following:

[insert screenshot of EmulationStation with emulators)

Time to get playing!

Add metadata

So everything works, but EmulationStation looks a bit plain. You want metadata and screenshots, right? Here’s how

1. Exit EmulationStation

We need to close Emulation Station down before we update the metadata as EmulationStation holds on to the metadata files. The scraper we’re going to use won’t even open if EmulationStation is running. So:

Start -> Quit -> Quit Emulation Station

2. Install Steven Selph’s scraper

Either via SSH or a USB keyboard attached to your pi, enter the following

sudo ~/RetroPie-Setup/retropie_setup.sh

Once this launches, navigate to: Manage Packages -> Manage Optional Packages -> scraper (right at the bottom for me) Install from source Back -> Back -> Back -> Exit

This will install Steven Selph’s metadta scraper - one of the better ones out there

Once that’s installed, select “Scrape all systems” (under Manage Packages -> Manage Optional Packages -> scraper Configuration / Options)

Once this completes successfully, select Cancel -> Back -> Back -> Back -> Perform Reboot

Once EmulationStation reloads, you should now see pretty metadata for your ROMs!

Fix broken metadata

TODO - this needs to be improved

The scraper won’t pick up everything. For the items that are’t picked up, you can upload box art and correct the metadata manually. See https://www.reddit.com/r/RetroPie/comments/3n032p/how_can_i_manually_add_cover_art_to_my_games/?st=JMZ6CWQ2&sh=e4020b34

If you use the built in ES Scraper your gamelist.xml and images folder will be in ~/.emulationstation/gamelists/[SYSTEM_NAME]/gamelist.xml

If you use Sselph’s Scraper you can choose whether your scraped data goes in:

  • [SYSTEM_PATH]/gamelist.xml (the rom folder) or
  • ~/.emulationstation/gamelists/[SYSTEM_NAME]/gamelist.xml

Adjust screen border

Perhaps you’re using a monitor or TV in “Just Scan” or “Pixel Perfect” mode and see black borders around the EmulationStation menu and all your games? You can fix this with some Pi settings

1. Update boot config to disable overscan

Exit EmulationStation and enter the following from the command line:

sudo nano /boot/config.txt

This will load the nano text editor.

uncomment the line #disable_overscan=1

So that it becomes disable_overscan=1

Press Ctrl+X to Exit and Y to save (this is a common pattern for RetroPie)

2. Reboot Pi to see the new settings

Reboot the pi with the following command:

sudo reboot

Once the Pi restarts, the border should be gone! There are a bunch of controls to optimize overscan and borders in a more granular way. Add a link here

Apple TV Now Syncs TV Refresh Rate to Content

Media, Lifehacks, Streaming

Aug 20, 2018

I’m a die-hard Apple TV fan, using a 4th-gen device for regular big-screen Netflix, YouTube or Plex binges. However during a recent viewing, something struck me as not-quite-right. YouTube’s wonderful 1080p60 content didn’t look quite so buttery smooth as on a phone or iPad.

Heading to the Video Settings menu, I found the culprit. The display was set to 1080p 50Hz - not at all suitable for YouTube’s 60fps content - and the certain cause of my screen judder. After a toggle to 1080p 60Hz, YouTube was once again silky smooth. But the switch came with a downside. The playback of 25fps content (most importantly, my iTunes purchase of Scandi-drama The Bridge) was now suffering the same stuttery side effects

Some more staggering around the Settings menus yielded the following find under “Settings”, “Video and Audio”:

Toggle this on to have the Apple TV detect the frame rate of your video content and match the screen sync accordingly. No more stutter! It even supports 24p for movies, and works with iTunes, Netflix, Amazon Prime Video, iPlayer and Plex. YouTube is (as far as I can tell) not working, so for best results set your default resolution to 1080p 60Hz - which is the best match for most YouTube content. Examples below

24p Movie Content from iTunes

50Hz European Television Content from iTunes

60Hz Content from Netflix

Dropbox as a GitHub Alternative

Programming, How To, Web Development

Mar 28, 2017

Want the benefits of private, distributed version control but don’t want to pay GitHub’s subscription fee? Or simply don’t trust GitHub with checked in passwords, tokens and secrets?

You can fashion yourself a quick and dirty solution using Git and Dropbox.

What you need

Step 1. Clone an Empty Repository

  • Decide on a folder name for your new repo
  • Clone it via git clone dropbox://[reponame]
  • This will create a new, empty directory in your local with all the necessary .git gubbins

Step 2. Write Some Code!

  • Get busy, write some code! Save it to your new local repo.
  • Or if you’re feeling lazy, just copy-paste the code from somewhere else.

Step 3. Add, Commit and Push

  • Stage the source code via git add
  • Commit to your local repository via git commit
  • Push to the Remote via git push

Step 4. Share and Collaborate

  • Want to collaborate with someone? Just use Dropbox’s built in Share feature.
  • Anyone you add can clone, add, commit and push too. Easy as!