RetroPie Install Guide RaspberryPi 4

This is the updated article specifically for the RetroPie on the RaspberryPi 4 with the Retroflag NESPi 4 Case. This will support up to most systems up until Playstation 1 (PS1). If you’re interested in RetroPie on the RaspberryPi 3/3B+, you can refer to my original article.

Retroflg NESPi 4 Case

Hardware Used

Here is the hardware and pricing on my build. You can lessen the cost by using existing hardware or replacing it with cheaper items. The important items are the Raspberry Pi 4B & RetroFlag NESPi 4 Case.

  • RaspberryPi 4 Model B 4GB RAM
    • $59 on Amazon
    • Note: No need to get 8GB as it does not affect game performance
  • SanDisk 128GB Extreme microSDXC UHS-I Memory Card
    • $24.88 on Amazon
    • Note: You can go much smaller if you plan to store ROMs on a SSD such as an 8GB card for about $8
  • RetroFlag NESPi 4 Case
    • $39.99 on Amazon
    • Exact replicate of NES, functioning power & reset buttons, removable USB 3.0 SSD HDD, and all cables moved to the back now. Retroflag makes cases for other
  • Optional: Western Digital 1TB WD Blue 3D NAND Internal PC SSD
    • $104.99 on Amazon
    • Although optional, I would recommend this to store the ROMs as USB 3.0 gives better performance for an SSD vs. the microSD card and more longevity
  • Optional: 2 x 8Bitdo Sn30 Pro+ Bluetooth Gamepad
  • Optional: Rii mini i8+ Keyboard

Software Used

Resources

Update 8Bitdo Controller Firmware

  • Download the latest 8Bitdo Controller Firmware on a Windows Computer
  • Run the update utility and follow the onscreen instructions

Create RetroPie SD Card

  • Download RetroPie image on a Windows Computer
  • Extract the image using 7zip
  • Connect the Micro SD card to the computer using a MicroSD card reader
  • In Windows, use balena Etcher to write the image on a MicroSD Card
    • Note: It will format the card for you.  If needed, you can format the card as fat so windows will recognize it prior to running etcher

Install the RaspberryPi Into the Case

  • Make sure the case is powered off
  • Install the RaspberryPi into the Retroflag case as per the directions
  • Switch the Safe Shutdown switch to ON
  • Connect the Micro HDMI cable, Ethernet Cable, keyboard USB dongle, insert the microSD card, and insert the power USB-C cable
  • NOTE: Do NOT mount the SSD Into the Cartridge Case yet, we will need to format it as exFat or FAT32 on a PC using directions later in this article!

Configure US Keyboard on First Boot

  • Make sure the keyboard dongle is connected and the keyboard is charged and powered on
  • Turn the power to “ON” on the case
  • On the Welcome Screen, hold any button on the keyboard to configure it, and configure it as follows:
    • D-PAD UP: Up Arrow
    • D-PAD DOWN: Down Arrow
    • D-PAD LEFT: Left Arrow
    • D-PAD RIGHT: Right Arrow
    • START: 1
    • SELECT: 2
    • Button A / East: Enter (Same as OK key)
    • Button B /South: Escape
    • For all other keys, hold any button to skip configuring
    • When OK is highlighted, press the Enter button
    • When prompted about not enabling a hotkey button, highlight YES and press Enter to use the default select button
  • Navigate to the RetroPie menu and press Enter on the keyboard
    • Select RASPI-CONFIG and press Enter on the keyboard
      • Select Localization Options and press Enter on the keyboard
      • Select Change Keyboard Layout and press Enter on the keyboard
      • Select Generic 105-key (Intl) PC and press Enter on the keyboard
      • For the keyboard layout, select Other and press Enter on the keyboard
        1. Select English (US) and press Enter on the keyboard
      • Select English (US) and press Enter on the keyboard
      • Select Default Keyboard Layout and press Enter on the keyboard
      • Select No Composer Key and press Enter on the keyboard
      • Select Finish and press Enter on the keyboard

Optional – Connect WiFi (Skip if using Wired LAN)

  • Navigate to the RetroPie menu and press Enter on the keyboard
  • Select RASPI-CONFIG and press Enter on the keyboard
    • Select Localization Options and press Enter on the keyboard
    • Select Change WI-FI Country and press Enter on the keyboard
    • Select United States and press Enter on the keyboard
    • Press OK on the success message
    • Select Finish and press Enter on the keyboard
  • *Select WIFI and press OK on the keyboard
    • Select Connect to WIFI network and press Enter on the keyboard
    • Select the SSID, and press Enter on the keyboard
    • Enter the SSID PSIK and press Enter on the keyboard
    • Select Exit and press Enter on the keyboard

Optional – Enable SSH (Useful later for scraping ROMs)

  • Navigate to the RetroPie menu and press Enter on the keyboard
  • Select RASPI-CONFIG and press Enter on the keyboard
    • Select Interface Options and press Enter on the keyboard
    • Select SSH and press Enter on the keyboard
    • Select Yes to enable SSH and press Enter on the keyboard
    • Press OK to confirm SSH is enabled
    • Select Finish and press Enter on the keyboard

Optional – Update RetroPie

  • Navigate to the RetroPie menu and press Enter on the keyboard
  • Select RETROPIE SETUP and press Enter on the keyboard
    • Select Update and press Enter on the keyboard
    • When prompted, select Yes and press Enter on the keyboard
    • Press OK/YES to all proceeding messages
    • Select Exit and press Enter on the keyboard
  • If Retropie Does Not Boot Emulation Station and is stuck asking for the retropie login
    • Login as pi
    • Navigate to the RetroPie menu and press Enter on the keyboard
    • Select RASPI-CONFIG and press Enter on the keyboard
    • Select Boot Options and press Enter on the keyboard
    • Select Desktop/CLI and press Enter on the keyboard
    • Select Console Autologin and press Enter on the keyboard
    • Select Finish and press Enter on the keyboard
    • Select Yes to reboot and press Enter on the keyboard
    • It should not restart and autologin to emulationstation again

Add the RetoFlag Safe Shutdown Script for Power/Reset Buttons

I personally recommend using crcerror’s forked version of the retroflag script vs. the official retroflag version of the script for the power/reset buttons. Here are the differences and instructions to install either:

  • crcerror Script
    • Button Functions:
      • Press Reset in Emulator: Exits emulator back to Emulationstation
      • Press Reset in Emulationstation: Restarts Emulationstation
      • Press Reset in Console: Restart the RaspberryPi
      • Press Power in Console, Emulationstation, or ROM Emulator: Shutdown the RaspberryPi
    • Install Directions:
      • Ensure you are connected to the internet & the keyboard is connected
      • Press F4 to enter the terminal
      • In the terminal, type the one-line command below (Case Sensitive):
        • wget -O – “https://raw.githubusercontent.com/crcerror/retroflag-picase/master/install.sh” | sudo bash
      • RetroPie will restart once complete
  • Retroflag Script
    • Button Functions:
      • Press Reset in Emulator/Emulationstation: Restart the RaspberryPi
      • Press Reset in Console: Nothing
      • Press Power in Emulator/Emulationstation: Shutdown the RaspberryPi
      • Press Power in Console: Nothing
    • Install Directions:
      • Ensure you are connected to the internet & the keyboard is connected
      • Press F4 to enter the terminal
      • In the terminal, type the one-line command below (Case Sensitive):
        • wget -O – “https://raw.githubusercontent.com/RetroFlag/retroflag-picase/master/install.sh” | sudo bash
      • RetroPie will restart once complete

Setup Bluetooth Controllers

This is written for the 8Bitdo controllers, but should be the same for any Bluetooth controller

  • Navigate to the RetroPie menu and press Enter on the keyboard
  • Select BLUETOOTH and press Enter on the keyboard
    • Make sure 8Bitdo mapping hack is set to off
    • Power on the 8Bitdo controller by holding the start button until the blue light comes on.  Once it is blinking, set it to pairing mode by holding the select button for 3 seconds and the blue light will start rapidly blinking
    • Select Register and Connect Bluetooth Device and press Enter on the keyboard
    • The controller will show up with its MAC address as 8Bitdo, select it and press Enter on the keyboard
    • Select DisplayYesNo and press Enter on the keyboard
      • Repeat for each additional controller
    • Select Setup udev rule for joypad and press Enter on the keyboard
    • Select an 8Bitdo controller and press Enter on the keyboard
    • Press Enter on the keyboard to confirm the entry was added
    • Select Cancel and press Enter on the keyboard to return to Emulationstation
  • Press 1 on the keyboard to bring up the Main Menu
    • Select Configure Input and press Enter on the keyboard
    • When prompted to configure input, press Enter on the keyboard
    • Hold any key on the 8Bitdo SNES30 controller and configure it as follows
    • D-PAD UP: Up Arrow
    • D-PAD DOWN: Down Arrow
    • D-PAD LEFT: Left Arrow
    • D-PAD RIGHT: Right Arrow
    • START: Start
    • SELECT: Select
    • A: A
    • B: B
    • X: X
    • Y: Y
    • LEFT SHOULDER: L
    • RIGHT SHOULDER: R
    • For all others, hold any button to skip configuration (Or use the keyboard to skip down to OK)
    • When OK is highlighted, press the Enter on the keyboard
    • When prompted about not enabling a hotkey button, highlight YES and press Enter on the keyboard to use the default select button
    • Repeat for each Controller
  • Press 1 on the keyboard to bring up the Main Menu
    • Select Quit and press Enter on the keyboard
    • Select Restart System and press Enter on the keyboard
    • Select Yes to confirm the restart and press Enter on the keyboard

Install Optional Emulators

SystemOPT EmulatorNote
Apple IIlinapple
Atari SThatari
Commodor 64vice
Coleco Visionlr-blueMSXcoolcv not supported on Pi4 due to video drivers at this time, using lr-blueMSX instead
Dragon 32 / Tandy CoCoxroar
Intellivisionlr-freeintv
MSXlr-fmsxAdds the following files to BIOS folder: CARTS.SHA, CYRILLIC.FNT, DISK.ROM, FMPAC.ROM, FMPAC16.ROM, ITALIC.FNT, KANJI.ROM, MSX.ROM, MSX2.ROM, MSX2EXT.ROM, MSX2P.ROM, MSX2PEXT.ROM, MSXDOS2.ROM, PAINTER.ROM, RS232.ROM
Virtual Boylr-beetle-vb
Wonderswan / Wonderswan Colorlr-beetle-wswan
ZmachinefrotzIncludes Zork 1, 2, and 3
  • Navigate to RetroPie menu and press Enter on the keyboard
    • Select RETROPIE SETUP and press Enter on the keyboard
    • Select Manage packages and press enter on the keyboard
    • Select Manage Optional packages and press enter on the keyboard
    • Select %EMULATOR_NAME% and press enter on the keyboard
    • Select Install from source (latest) or Install from binary and press Enter on the keyboard and wait for the installer to finish
      • Select Back and press Enter on the keyboard
      • Select Back and press Enter on the keyboard
      • Select Back and press Enter on the keyboard
      • Select Exit and press Enter on the keyboard
      • Select Yes and press Enter on the keyboard

Install Experimental Emulators

SystemExp EmulatorNote
Nintendo DSdrastic
Atari Jaguarlr-virtualjaguarDoes not run great on PI4 still, reports that lr-mess works well
  • Navigate to RetroPie menu and press Enter on the keyboard
  • Select RETROPIE SETUP and press Enter on the keyboard
  • Select Manage packages and press enter on the keyboard
  • Select Manage Optional packages and press enter on the keyboard
  • Select %EMULATOR_NAME% and press enter on the keyboard
  • Select Install from source (latest) or Install from binary and press Enter on the keyboard and wait for the installer to finish
    • Select Back and press Enter on the keyboard
    • Select Back and press Enter on the keyboard
    • Select Back and press Enter on the keyboard
    • Select Exit and press Enter on the keyboard
    • Select Yes and press Enter on the keyboard

Add BIOS and Config Files to the SD Card

  • From a Windows computer containing the BIOS and Config Files, open the samba share for the RetroPie by entering \\retropie
    • If this does not work, navigate to the RetroPie menu, press Enter on the keyboard, select Show IP, press OK on the keyboard and note the IP then press Enter on the keyboard
    • Try to access the samba share for the RetroPie by using the IP address noted above: \\IPADDRESS
  • Copy the BIOS files to the BIOS Share
  • OPTIONAL – Copy Configs to the CONFIGS share
    • You only need to do this if you have previous configurations backed up & do not want to treat this as a brand new install

Prepare the SSD and Copy ROMS

Note: See my article on cleaning ROM collections:
http://sigkillit.com/2019/06/19/clean-no-intro-2018-rom-set/

  • Plug the SSD into a Linux or Windows PC and format the SSD drive as exFAT or FAT32
  • Create a folder called retropie-mount on the root of the drive
  • Mount the SSD drive into the RetroFlag “Cartridge” case
  • Install the cartridge into the RetroFlag case and ensure the SSD firmly inserts into the connector and then power on the RetroPie
  • It will proceed to automatically copy the Retropie folder and all of its content (You may need to reboot to start the copy)
  • From a Windows computer containing the ROM Files, open the samba share for the RetroPie by entering \\retropie
    • If this does not work, navigate to the RetroPie menu, press Enter on the keyboard, select Show IP, press OK on the keyboard and note the IP then press Enter on the keyboard
    • Try to access the samba share for the RetroPie by using the IP address noted above: \\IPADDRESS
  • Copy your ROMs to the ROMS share

Special Configurations for ROMs to Work Properly

Atari 800 / Atari 5200 Load BIOS

  • Launch an Atari 800/5200 game
  • If you launched a 5200 game, select Standard 5200 cartridge option or if you launched a 800 game you won’t see this prompt just continue.  You’ll get a warning that you need a real Atari/OS.
  • Press F1 on the keyboard to open the menu
  • Select Emulator Configuration and press enter on the keyboard
  • Select System ROM Settings and press enter on the keyboard
  • Select Find ROM images in a directory, navigate to the BIOS directory (/home/pi/RetroPie/BIOS) and press the space bar on the keyboard to select that directory.
  • Press Escape on the keyboard to go back a menu
  • Select Save Configuration File and press enter on the keyboard
  • Select Save Configuration on Exit and press enter on the keyboard
  • Press Escape on the keyboard to go back a menu
  • Select Exit Emulator and press enter on the keyboard
  • If you have the correctly named BIOS files and it should automatically configure them

Atari 5200 Auto Load Game (Prevents Memo Pad from Loading)

If the screen loads to a blue memo pad instead of loading the game, this is because it’s set to an 800 system.  You can press F1 and load the rom fine each time or you can do the following to override it

  • Launch the Atari 5200 game
  • Press the Select + X (Hotkey + X) to bring up the Quick Menu
    • Select Options and press enter on the keyboard
    • Select Atari System and press the right arrow to select 5200
    • Press B to return to the previous menu
    • Select Resume and press A to return to the game
    • Test to see if it works now.  If it works, you can permanently save it by going back to Controls and selecting Save Core Overrides

Atari 800 / Atari 5200 Configure Controller

  • Launch Atari 800/5200 game
  • Press the Select + X (Hotkey + X) to bring up the Quick Menu
    • Select Controls and press A
    • Next to user 1 Device Type, press the right arrow to select Atari Joystick
    • Press B to return to the previous menu
    • Select Resume and press A to return to the game
    • Test to see if it works now.  If it works, you can permanently save it by going back to Controls and selecting Save Core Overrides

Sinclair ZX Spectrum

Not all games will work with a joystick!  However, if the input does not seem to be working

  • Launch a ZX Spectrum game
  • Press the Select + X (Hotkey + X) to bring up the Quick Menu
    • Select Controls and press A
    • Next to user 1 Device Type, press the right arrow to select Kempton Joystick or Cursor Joystick
    • Press B to return to the previous menu
    • Select Resume and press A to return to the game
    • Test to see if it works now.  If it works, you can permanently save it by going back to Controls and selecting Save Core Overrides

Install Skyscraper

  • Press F4 on the keyboard to exit emulationstation and enter the terminal
  • Enter the following command at the terminal:
    • sudo ~/RetroPie-Setup/retropie_setup.sh
  • Select Manage Packages and press Enter on the keyboard
  • Select Optional Packages and press Enter on the keyboard
  • Select Skyscraper and press Enter on the keyboard
    • Select Install from pre-built biner or Install from source and press Enter on the keyboard
  • Select Back and press Enter on the keyboard (Repeat 3x’s)
  • Select Exit and press Enter on the keyboard
  • Optional – Add Login for screenscraper.fr, enter the following command at the terminal:
    • sudo nano /opt/retropie/config/all/skyscraper/config.ini
    • Add the below lines
      • [screenscraper]
      • userCreds=”USER:PASSWORD”
      • Replace USER with your username and PASSWORD with your password
    • Press Ctrl + O then press Enter on the keyboard to save the file
    • Press Ctrl + X to exit
    • Type emulationstation to go back to emulationstation

Scrape ROMs with Skyscraper

  • Press F4 on the keyboard to exit emulationstation and enter the terminal
    • Note: once you exit emulationstation, you can SSH into the PI so you can use your TV while you wait for the ROM scrapes to occur which take hours to days. The default username is pi and password is raspberry
  • Enter the following command at the terminal:
    • sudo ~/RetroPie-Setup/retropie_setup.sh
  • Select Manage Packages and press Enter on the keyboard
  • Select Optional Packages and press Enter on the keyboard
  • Select Skyscraper and press Enter on the keyboard
  • Select Configuration/Options and press Enter on the keyboard
  • Select Gather Resources and press Enter on the keyboard
    • Select the game system you want to scrape (suggest 1 at a time as it takes a few hours) and press Enter on the keyboard
    • Note: This caches the game info & images in \\retropie\configs\all\skyscraper\ and only needs run once unless you add new games.  It then uses this cache to build the game info, which greatly increases the speed since it all local.  However, you will need to monitor the size of the cache to make sure it does not fill the SD card.
  • Select Generate Games Lists and press Enter on the keyboard
    • Select the game system(s) you want to scrape and press Enter on the keyboard
    • Note: This builds the game images, description, etc
    • Select Run on all systems and press Enter on the keyboard then WAIT!

One thought on “RetroPie Install Guide RaspberryPi 4

  1. Pingback: RetroPie Install Guide | Sigkill IT

Leave a Reply

Your email address will not be published. Required fields are marked *