PiJuice Games Console Project

This project will show you how to build a portable games console using the PiJuice and Media Center HAT. You will be able to play all of your Retro games anywhere with the PiJuice portable battery solution, combined with the Media Center HAT and a Bluetooth controller housed in a case, it is the perfect combination for a portable games project.

What you will need

You will need the following parts to build this project, some of what are only required for the initial setup procedure:

Hardware Setup

Step 1 – First, you will need to separate the top half and bottom half of the Maker Kit case. You can do this easily by pushing the two shorter sides outwards and lifting upwards, sliding the top half up. The sides of the case are designed to give a little flex.

          

Step 3 – Add the PiJuice HAT to your Raspberry Pi board. Make sure that it is firmly pushed down on the GPIO pins.

Step 4 – Now we can add to the PiJuice HAT GPIO pins, the Media Center HAT. Push the GPIO connector on the Media Center HAT down as far as it can go.

Step 5 – Now take the Raspberry Pi with the PiJuice and Media Center HAT on and slide it into the case, making sure it aligns up with the grooves either side and also the connectors line up with the cutouts on the side of the case. Remember that the case can flex slightly either side to make it easier.

Step 6 – Carefully slide over the top, the top half of the make kit case. Slide it over the top and you should hear it click into place once it has aligned.

Step 7 – No lets place the case into the holder for the controller.

Unclip the bottom mount and add it to the controller, making sure it clips on the other side.

Slide open the holder at the top and insert the case.

Software Setup

The gaming software for this project is based on the latest version of RetroPie, which an operating system for the Raspberry Pi that runs a number of retro-gaming projects such as emulationstation, RetroArch and many others. It allows you to play all your favourite retro arcade games, home-console and some classic PC games.

Step 1 – Download RetroPie OS

Go to https://retropie.org.uk and download the latest image for the Raspberry Pi. Flash the RetroPie image to an 16GB or 32GB micro SD card using Etcher software. You can download Etcher from https://etcher.io .

Step 2 – Boot up RetroPie and connect to Wi-Fi

Before we begin to install the Media Center HAT software you will need to boot RetroPie and connect to your local Wi-Fi internet. You will need to connect a keyboard and mouse to the Raspberry Pi during this initial setup but then may be removed later on. You will also need to connect the Raspberry Pi to a HDMI monitor or TV until we install the Media Center HAT software.

Insert the microSD card into the Raspberry Pi and apply power either using the PiJuice or mains power. Pressing SW1 on the PiJuice will apply power to the Raspberry PI via the GPIO header.

When RetroPie boots up it will prompt you to setup gaming controls, this will also allow you to navigate its menu system. Go ahead and assign keys, you can skip others by holding down a key already used.

Once done you will see the emulationstation menu. In here enter the Retropie menu, which should be the first option in emulationstation. Once the Retropie menu opens up you should see an option which says “Configure WiFi”, select this to access the WiFi configuration menu. Select option 1 “Connect to WiFi network”.

The configuration program will then begin to scan for local SSID and show you a list. Select your WiFi router from the list and then enter your password.

Note: You can usually find your credentials on the reverse side of your router box

Once connected you will go back to the main WiFi menu where you should see an IP address assigned to the Raspberry Pi, you are now connected to your Wi-Fi.

Step 3 – Setup PiJuice HAT

If you are in the emulationstation menu or RetroPie menu then press F4 to exit and go to the command line. In the command line enter the following command to install the pijuice command line interface:

sudo apt-get install pijuice-base

Reboot the Raspberry Pi:

sudo reboot

Go back to the command line by hitting F4. Launch the pijuice software with the following:

pijuice_cli

Scroll down to General tab and hit enter:

Check box EEPROM write unprotect and then change the EEPROM address to 52. Apply Settings at the bottom then exit and reboot the Raspberry Pi.

Step 4 – Setting up the Media Center HAT

If you are in the emulationstation menu or RetroPie menu then press F4 to exit and go to the command line. In the command line enter the following command to install the media center HAT:

sudo su -c "bash <(wget -qO- https://pisupp.ly/mediacentersoftware)" root

Follow the install procedure to install frame buffer copy (fbcp). Enable it at boot and then reboot the Raspberry Pi.

Now we need to change some of the output settings in the config.txt file so that it outputs the correct resolution for our Media Center HAT screen size, this will stop anything from getting cut off at the edge of the screen. To edit the file enter the following command in the command line:

sudo nano /boot/config.txt

In the config.txt file add the following or comment out and change the values of the following:

hdmi_force_hotplug=1
hdmi_group=2
hdmi_mode=87
hdmi_cvt=320 240 60 1 0 0 0

Step 5 – Setting up the PS3 controller

Navigate to the “RetroPie” icon in the Home Screen and select it using whatever key you mapped “A” to on your gamepad/keyboard, and go to RetroPie Setup

Once in the RetroPie Setup menu, choose [Manage packages] > [driver].

Select PS3 Controller Driver (“ps3controller”), and then select [Install from source].

    • Go to [Configuration / Options] > [Install/Pair PS3 Controller (Clone support Shanwan)]

Once installation completes, exit RetroPie setup and return to the EmulationStation Home Screen.

Press “Start” to enter the EmulationStation Menu, and select Configure Input.

Disconnect your PS3 controller from USB. You should see the lights on it flash sequentially. The controller should now be connected via Bluetooth as indicated by 1 red LED on the controller.

Emulation Station should now detect another gamepad connected. Hold any button down on the controller to begin configuring it.

And you now have a functional PS3 controller over Bluetooth.

Note: Do not enable other bluetooth options as these will conflict with the PS3 specific bluetooth setup (sixad)

First published at 6:05pm on March 13, 2020
Last updated at 10:13pm on May 16, 2020