RetroPie Setup

Here’s how I made and configured my RetroPie gaming console!


Firstly, download the image for the hardware and install it onto a MicroSD Card.


Now, slam that MicroSD card into the Pi and boot it up and follow the onscreen instructions!

Built-in Audio

I’ve installed a I2S Mono amp to power a small speaker that fits inside the housing.

To configure the PI to send audio via the GPIO pins, visit this AdaFruit page.

Xbox One Wireless Adapter

To use an original Xbox One controller with the official adapter, I cloned and built xow from source.

7" Screen or HDMI?

I wanted a way to use the Official 7" Display and have the optional to also “dock” it, with HDMI output.

When the Pi boots it reads a config located in /boot/config.txt to configure the display and audio output - I needed to take advantage of this to dynamically swap the screen output on boot.

Here’s the idea:

  1. I created two config.txts, located in /home/pi/initDisplay/ - One for LCD mode, and one for HDMI mode. (Note the first line denoting the function)
  1. On boot, determine whether HDMI is plugged in, if so, overwrite the respective config into /boot/config.txt

Here’s the basic bash script:


HDMI_NAME=$(tvservice -n 2>&1 > /dev/null)
CURRENT_CONFIG=$(head -n1 /boot/config.txt | tr -d '# ')

function set_lcd_config() {
        echo "Setting LCD Config"
        sudo cp /home/pi/initDisplay/config_lcd.txt /boot/config.txt

function set_hdmi_config() {
        echo "Setting HDMI Config"
        sudo cp /home/pi/initDisplay/config_hdmi.txt /boot/config.txt

if [ "$CURRENT_CONFIG" == "LCD" ]; then
        echo "Current Config is LCD, Setting HDMI for Next boot"
        exit 0

if [ "$CURRENT_CONFIG" == "HDMI" ]; then
        echo "Current Config is HDMI, Is a device present?"
        if [ "$HDMI_NAME" == "[E] No device present" ]; then
                echo "No Device present,  falling back to LCD Config"
                sudo reboot now

That’s pretty much it for now, I’ll update this page as I go along!

Related Posts

© 2017 - 2022 · Home · Powered by Hugo ·