Portable Raspberry Pi Emulation Machine

Have you ever been in the situation where you wanted to play those nostalgiac Super Nintendo games with your friends while on a 200 mile long trek through the rainforests of Madagascar? Probably not, but if the situation ever arises you could use this sweet emulation machine that you are about to learn to build. The emulation machine runs off of a Raspberry Pi running Retropie, this allows it to support various emulators such as NES, SNES, Gameboy, Gameboy Color, Gameboy Advance, Sega Genesis, Neo Geo, MAME, PlayStation One and can even emulate an Apple II.
Portable Raspberry Pi Emulation Machine
WARNING: Neither Instructables nor I condone illegal activities. As long as you own a hard copy of the game, you may use a digital backup within your emulation console for personal use.
http://www.copyright.gov/help/faq/faq-digital.html

Step 1: Acquire Your Supplies

Parts listRaspberry Pi Model B ($35)

Pi compatible USB Gamepad(s)

32GB SDHC SD Card ($28)

Micro usb power cable (Free, comes with many electronics such as phones, kindles)

Anker 10,000mAh battery ($50)

Phillips 9012 slave screen ($15-$50)
Any portable 9v or 12v screen should work as long it has the required ports.

Brief Case ($5)

Velcro ($2)

A/V Cable (Free, come with many camcorders)

3.5mm to RCA audio female adapter ($2)

Pick and pluck foam ( Price varies on size of brief case. Make sure the dimensions are larger than the brief case. You will cut it to
size.)

Tools list

Craft Knife

Ethernet Cable

Scissors

PC with SD card reader

USB Keyboard and Mouse

USB Memory Stick

Glue

Normal RCA cable

Step 2: Choose Your Path

There are two paths you can take now. The easy way where you will learn nothing about the Linux operating system but it will grant you quick results. Path 2 will separate the men from the boys. If you choose this path be prepared for some troubleshooting and sifting through the innards of the Linux OS. For path 1, skip to step 4. For path 2, continue like normal.

Step 3: Write the SD card: Hard path

Hi non-lazy people. You should start this by grabbing your SD card and inserting it into your reader. Then you must download these two programs

www.raspberrypi.org/downloads  (Download the Raspbian “Wheezy” under Raw Images.)

http://www.softpedia.com/get/CD-DVD-Tools/Data-CD-DVD-Burning/Win32-Disk-Imager.shtml

Now unzip win32 disk imager and run the .exe. Once the program is open, select the Rasbian wheezy you just downloaded as the image file. Then, using Windows Explorer and the Computer tab, check the letter next to the SD card in side bar. This is the letter you want to select under the device tab. Click write. MAKE SURE YOU GET THIS CORRECT OR YOU CAN WIPE ALL OF THE DATA OFF OF ANOTHER DRIVE!!
Now skip to step 5.

Step 4: Writing the SD card: Easy Way

So, now you need to grab your SD card and insert it into your PC's SD card reader.

http://blog.petrockblock.com/retropie/retropie-downloads/ (Download the RetroPie Project SD card Image)

http://www.softpedia.com/get/CD-DVD-Tools/Data-CD-DVD-Burning/Win32-Disk-Imager.shtml

Now unzip win32 disk imager and run the .exe. Once the program is open, select the Retropie image you just downloaded as the image file. Then, using Windows Explorer and the Computer tab, check the letter next to the SD card in side bar. This is the letter you want to select under the device tab. Click write. MAKE SURE YOU GET THIS CORRECT OR YOU CAN WIPE ALL OF THE DATA OFF OF ANOTHER DRIVE!!

Step 5: Set up the Pi

Now you grab your Pi and connect it to a video source using a video RCA cable. Now plug in your keyboard and mouse. Plug the Ethernet cable from your router into your Pi. Then plug the Micro USB into the power port of the Raspberry Pi and then plug the wall charge into the most conveniently placed power outlet.  The Pi should now power on. If it doesn’t, you either have a faulty unit or you need to find instructions on how to operate an electrical socket.

Now that it has booted, there should be the Raspi-config menu present.  Select the “expand_rootfs” option and execute it by pressing enter. It will display a message when completed but just press enter when the message come up.
Next, configure your keyboard. Do this by select the “configure_keyboard” option and press enter. Now select the option that applies to your keyboard and press enter. I selected the “Generic 105-Key (Intl) PC”. It worked for me and my Apple USB keyboard. Then you must select the correct keyboard layout. To find the English layout, I had to go through the “Other” option and press enter. I then found the “English(US)” and hit enter. Now you must select the special options for your keyboard. I left them at default and pressed enter. I then did not make a compose key on the next page and hit “no compose key” and pressed enter. The next option is for selecting a “ctl alt delete” setting. This is personal preference as I enabled it but never used it.

Now you must select the “change_locale” option.  Now use the spacebar to select the locale you want and deselect the ones you do not want. (“en_GB.UTF-8 UTF-8” is Great Britian and “en_US.UTF-8 UTF-8” is United States). On the next screen select the same locale and press enter.

Now go down to “change_timezone” and press enter. Select your region and press enter. Then select the time zone of which you exist within and press enter yet again.

Now go down to “memory_split” and type “256” into the field.  (If you have the cheaper Model A Pi, put “128” into the field rather than “256”)

Skip the overclocking option for now as it is not needed yet

Press the right arrow key twice and select “Finish” and press enter

Path 1 folks should skip to step 8. Path 2 people should continue like normal

Step 6: Download and Compile

Once the Pi reboots, it will ask for login info. The default username is “pi” and the default password is “raspberry”. Press enter. Remember this information as it will be used again.

The text “pi@raspberrypi ~ $” should appear. This is called the Terminal prompt. The Terminal is where all of the commands and most of the programs will be executed.

You will soon begin to type all of the commands that will download the RetroPie architecture for your Pi. All bolded text will be something you type in the Terminal prompt. Here is an example

sudo example text

Bolded text with multiple lines should be typed as they are seen. Make sure you press enter and divide them into multiple commands.
Like this

    cd
git clone example

Not like this

      cd git clone example

Step 5
Now make sure the Pi is connected to the internet through ethernet.
To install updates, type:

sudo apt-get update

Once done the terminal prompt comes back, type this:

sudo apt-get upgrade –y git

This will take a short while, the terminal will appear again once done. Now type:

  sudo apt-get install –y git dialog

This will take another few minutes. The terminal prompt will reappear when done.
Now type:

 sudo apt-get install –y git dialog

Yet again, you will be back at the terminal when completed. Now type:

     cd
git clone –depth=0 git://github.com/petrockblog/RetroPie-Setup.git

Now this will download the installation files for the emulators. Once you are back at the terminal, type this:

 cd RetroPie-Setup
chmod +x retropie_setup.sh
sudo ./retropie_setup.sh

Now the RetroPie installation screen will appear. Pick the Source Based Installation (option 2). Now what you need to do is press enter and the next screen will appear. Skip it by pressing enter. We are going to leave everything on the default setting.
Now you should see some fast moving text that may stop for a while. Don’t worry, it is not frozen, it is merely installing emulators. Now this is going to take a fair bit of time. Mine took from around 8-19 hours.  Note that the screen will eventually go black and transition into idle mode; This is not bad as the installation is still commencing.
To pass the time you could either sit there and watch the fast moving integers and pretend you’re a hacking into the government’s top secret bear wrestling facility or you can leave it be; whatever floats your boat.

Step 7:

Now that those long hours have passed, it is time to get back to work. A blue screen should appear when you wake the Pi, it is not too important so just skip it by pressing Enter. Press Enter once the next screen appears also. Now you should be back to the RetroPie-Setup screen. You should now select option 3 “Setup (only if you have run one of the installations above)” and press enter. This should pull up another menu. Select the 5th option which its “Start EmulationStation on boot?” and press enter. Now confirm it by pressing the 2nd option on the next screen and press enter.

You should now be back at the RetroPie_setup, press tab and select “cancel” and press enter. This will bring you back to the main install menu. Repeat the process and you should find yourself back in the terminal prompt.

Step 8: Load Those ROMs!

Load a USB drive with your ROMs that you want to play using your computer. Plug the USB drive into the pi. Now on the Pi, type this into the terminal prompt:

startx

This will start up the graphical interface of the Pi. Depending on your keyboard, you may need a USB splitter. I did not because the Apple keyboard has usb ports for the mouse, thus leaving a port vacant for the USB drive.

Click on the file browser icon which is located near the bottom left of the screen on the bottom tool bar. This will open up a familiar looking file browser. Proceed to locate this folder:
~/RetroPie/roms/EMULATORNAME
EMULATORNAME is a placeholder for the system your roms are for. Now just copy the ROM files from the USB drive to the proper ROM folder. Once the files are moved over to the correct rom folder, press the logout button on the bottom left of the desktop screen. You should now be back at the terminal prompt.

Step 9: Configure That Gamepad!

Now unplug your USB drive and replace it with one of your gamepads. Now in the terminal prompt type this:
sudo rebootShockingly, this will reboot your device. Now you must enter your login info yet again and the Emulation Station should start up automatically. It will prompt you to configure your controls for the menus of Emulation Station. Press the button that corresponds on the screen.Once you are finished you will be shown the Emulation Station UI. Scroll either left or right until you find the emulators you want. They should not work with your controller as you need to go through further setup to configure in game controls. Now you can either press F4 to exit or you can use the menu button to pull up the exit menu. Select exit.

Now back at the terminal prompt, type:

   cd RetroPie/emulators/RetroArch/tools
./retroarch-joyconfig >> ~/RetroPie/configs/all/retroarch.cfg

Now you must follow the on screen instructions and press the buttons it tells you to press. This will configure your controller to play in game. When complete, type:

    sudo reboot

Step 10: Fine Tune the Pi

The following step is for adding more controllers or modifying key maps for the controllers.
Once you sign in and are back at the command prompt, type

startx

Now the graphical interface should be back up. Go back to the file manager application and open the “RetroPie” folder. Within that open the “configs” folder. Within that open the “all” folder. Now you should find the “retroarch.cfg” file. Open it.
You should be seeing a large text file. Scroll down until you find the segment of text that starts with “input_player1_joypad_index = “0″” and highlight it and all of the lines below it that  start with “input_player1…”

Note that you can modify these config files so that you can adjust the controller mappings. Some controllers map strangely and require manual configuration. This can be confusing to do and will require trial and error to find out what buttons correspond with certain numbers. When you find out the button numbers you can configure the controls manually.

Now copy all of the highlighted text and paste it beneath it. Make sure you create a space in-between the original chunk of text and the new copy. Now change the first line of the copied text to: “input_player2_joypad_index = “1″”. Now look through the copied text and change everywhere it says “player1” to “player2”. Example: “input_player1_b_btn = “2”” should be changed to “input_player2_b_btn = “2””.

Now, some controllers have more buttons than others. If you lack an extra button to use as an exit emulator button you can use the following method. Scroll to the bottom of the config file and add these two lines:

input_enable_hotkey_btn = “A”
input_exit_emulator_btn = “B”

The A and B are place holders for your button numbers. Make the hotkey the same number as your “select” or “start” button and make the exit button anything that can be used as a exit button. (start, triangle, Y). This will make it so you can only exit the emulator if you hold down the hotkey button while pressing the exit button.
Portable Raspberry Pi Emulation Machine pic
Save and exit the config file and click the logout button on the bottom right of the screen. Now type in:
sudo nano /etc/inittab

This should be the terminal text editor, scroll down to the line “1:2345:respawn:/sbin/getty 115200 tty1” and add a # in front of it. Example: “#1:2345:respawn:/sbin/getty 115200 tty1”. Now directly below that line, add “1:2345:respawn:/bin/login -f pi tty1 </dev/tty1 >/dev/tty1 2>&1”

Now save and exit. You shall now be back at the terminal prompt. Type:

For more detail: Portable Raspberry Pi Emulation Machine


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

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

Scroll to Top