RetroPie Setup and Configuration
RetroPie Setup and Configuration
RetroPie Setup and Configuration
I threw together a couple Pi Carts with my brothers from the instructions here.
After going through the motions to get RetroPie up and running (with sound via HDMI and no green
tint on the GameBoy screen) I figured I'd write up what I had to do in hopes that it will help
someone else. I may add to this file as time goes on if I make any more config changes to my
RetroPie install. You'll want both a USB controller and a USB keyboard attached to your Pi to make
these changes.
NOTE: There are two RetroPie images provided by the official project: RetroPie 0/1 and RetroPie 2/3.
This guide is intended for the RetroPie 0/1 image (though you may find it helpful for 2/3).
To change these settings to US (or if you're in another country, use the settings that apply to you),
you'll first need to get to the shell. If Emulation Station is currently running, on your controller hit
Start, press down to select Quit and hit A (or whatever you've configured confirm to be), select
Quit EmulationStation and confirm, then confirm when prompted if you're sure to finally drop to
the shell so we can get some real work done.
sudo raspi-config
You'll want to key down through the menu options to 4 Internationalisation Options and hit
Enter. You'll change all 4 settings in this sub-menu, as outlined below:
At this point you'll want to reboot your Raspberry Pie to ensure all services on the device are using
the newest i18n settings. Hit Tab to highlight Finish and hit Enter to exit. You should be prompted
to reboot. Select Yes and hit Enter. Otherwise at the shell prompt type sudo reboot.
sudo vi /boot/config.txt
Find the line hdmi_drive=2 and uncomment it (press x once while hovering over the # character),
then save and quit with :wq.
If this works, it's because your TV or monitor is using the HDMI in DVI mode, which does not
transmit sound (hdmi_drive=1). The setting above will attempt to force the HDMI to use HDMI
mode instead.
If that doesn't quite do it for you, additional settings you can add to this file that may help are:
Remember, this is the RetroPie 0/1 image. I did the following to get connectivity to the web:
● Add DNS servers:You add DNS servers to /etc/resolv.conf, one per line:sudo vi
/etc/resolv.conf
Google's DNS servers are 8.8.8.8 and 8.8.4.4. Or add your own. Save and quit with :wq.
● Configure the network interfaces: To modify the interface configuration, we'll need to edit
/etc/network/interfaces: sudo vi /etc/network/interfaces
Then you'll want to edit the default wlan# configurations just a hair. Assuming your network
supports DHCP, the wlan0 config will look like: allow-hotplug wlan0
auto wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
Make the wlan1 config look the same, except, you know, saying wlan1 instead of wlan0. If you
don't have DHCP (or would prefer a static IP), change the line iface wlan0 inet dhcp to: iface
wlan0 inet manual
address 192.168.0.13
netmask 255.255.255.0
gateway 192.168.0.1
And swap out the IPv6 address, netmask, and gateway addresses per your network configuration.
Remember to save and quit with :wq.
● Configure your WiFi network credentials: Finally, you'll add your WiFi network's credentials so your
adapter will know what network to connect to. This gets added to your
/etc/wpa_supplicant/wpa_supplicant.conf file, below anything that might already exist there.
You can add the network ID and password as plain text, but that's a bad thing to do, because
security :closed_lock_with_key:. Instead, you should generate an encrypted key to connect. sudo
su
# You should now be root
# To append the encrypted key to the networks configuration file, run the following
wpa_passphrase 'YourNetworkSSID' 'YourNetworkPassword' >>
/etc/wpa_supplicant/wpa_supplicant.conf
exit
# You should no longer be root
sudo vi /etc/wpa_supplicant/wpa_supplicant.conf
You'll see that it's added a new network entry with your SSID, Password (commented out), and a
blob of text after psk=. Delete your commented out password. You'll already have values for ssid
and psk. Add the rest of these values: For WPA1: network={
ssid="YourNetworkSSID"
psk="YourNetworkPassword"
proto=WPA
key_mgmt=WPA-PSK
pairwise=TKIP
auth_alg=OPEN
}
For WPA2: network={
ssid="YourNetworkSSID"
psk="YourNetworkPassword"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
auth_alg=OPEN
}
Refer to the Raspberry Pi Documentation - Setting WiFi Up via the Command Line for additional
configuration scenarios.
● Reconfigure and test: To get your interface to pick up these changes, run: wpa_cli -i wlan0
reconfigure
And then run iwconfig to make sure your interface is connected to your SSID, and ifconfig
wlan0 to ensure you have an IP address listed after inet addr:. Finally, try ping -c 3 google.com
to ping Google 3 times to make sure you're connected.
If you still don't have connectivity, try Google and reading up on setting up your WiFi dongle on
Linux. Helpful commands include iwconfig (for wireless), ifconfig (for wired - also ifup and
ifdown), ping, nslookup, and netstat. This article might help, as well as this list of adapters known
to work with the Raspberry Pi.
:warning: IMPORTANT! If your RetroPie build is for a Raspberry Pi 0, you must have connectivity
from a Pi 0 or from a Pi 0 W to run your software upgrade. You will not be able to upgrade from
a different version of the Raspberry Pi (like the Pi 3), as the RetroPie setup scripts auto-detect
the platform they're being run on and require network connectivity to run successfully.
As mentioned in the bold faced warning prior to this, the RetroPie-Setup scripts have some fancy
logic to auto-detect the device type they're being run from. If you're curious how they do this, you
can find the aptly named function get_platform() in the system.sh file, under
/home/pi/RetroPieSetup/scriptmodules/system.sh or on their GitHub here.
First, you should use the update mechanism provided by RetroPie first. Only if this is causing errors
should you use the second method outlined afterward. Both require web connectivity.
RetroPie Update
● From within EmulationStation, select RetroPie in the list of Emulators, and select "RetroPie Setup".
● The first selection you'll make in this menu is S Update RetroPie-Setup script. This validates
that you can access the update scripts.
● After doing this, then select plain old U Update.
● You'll be asked for confirmation, and yes you want to update installed packages.
● You should get notification that the latest version of the setup scripts have been retrieved. And
then you'll get a copyright information dialog. Confirm past these.
● You'll receive a prompt that says "Would you like to update the underlying OS packages (eg kernel
etc)?" - select "Yes".
● Wait.
● Wait some more.
● Go grab something to drink. You've got a minute.
● As long as there were no errors, you should be good to go.
Manual Update
Once you've connected to the web, you'll want to get the latest versions of the software you're
running on your little RetroPie. Run:
This might take a while, depending on how long it's been since you installed RetroPie. Once this is
over, you'll need to update the RetroPie Setup Scripts, by running cd /home/pi/RetroPie-Setup
(Remember: capitalization matters on *nix systems) and then run git pull to get the latest scripts
from the RetroPie GitHub account.
After this is completed, you'll want to re-run the RetroPie setup scripts. When Emulation Station
loads, navigate to the RetroPie option in your list of emulators, and confirm. Select "Retropie Setup"
and watch as :sparkles: RetroPie automagically updates itself :sparkles:... hopefully.
Yeah... Aptitude has a habit of removing packages when you upgrade that it doesn't think you need
anymore... except RetroPie's setup script might still need them, without letting the system know
this. If this happens, run sudo apt-get install <your package name> to install the missing
package, and try to run the setup scripts again until it works. :repeat:
If errors are encountered by the RetroPie Setup scripts using either update path, relevant errors
can be found in the logs under ~/RetroPie-Setup/logs/some_file_name.log.gz where
some_file_name will include the date and time the scripts were run. This isn't just the errors though.
This is all of the output generated by the setup scripts. So you'll probably want to use vi and Page
Down / Page UP. Find the error and resolve it. If you don't know how, try Googling the error. That's
what most people who work in IT do.
To resolve this, I:
● Uninstalled xpad via the setup script menu (Manage Packages > Manage driver packages > 841
xpad).
● Deleted all files and folders in /opt/retropie/supplemental/xpad including the xpad folder.
● Reinstalled xpad via the setup script menu.
● Ran U Update again via the setup script menu.
This should have saved this change for all GameBoy roms.