Instructables

Portable Raspberry Pi Emulation Machine

FeaturedContest Winner
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.

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
 
Remove these adsRemove these ads by Signing Up

Step 1: Acquire Your Supplies

Parts list

Raspberry 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

Picture of 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!

Picture of 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 reboot

Shockingly, 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.

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:

     sudo shutdown -h now

The Pi should completely shut down. Turn it back on by unplugging it and plugging it back in. It should boot up and launch the Emulation Station automatically. You should now have a working stationary emulation console. Now time to build!

Step 11: Build the case

Grab your brief case and cut out all of the flaps and pockets. This will enable us to put the foam more evenly. Once all of the flaps are cut off and the interior surfaces are flat, move on to the next step.

Step 14: Layout Your Components

Now, layout the components that will go inside the briefcase (battery, Pi, controllers). You can follow our layout or think of your own. Just make sure that the Pi is situated in a manner that would allow you to gain access to all of its ports. Now, place pins along the border of all of the components. These will act as your guides for plucking the foam.

Step 16: Layout the components

Picture of Layout the components
IMG_0975.JPG
IMG_0990.JPG
Take all of the components (Pi, screen, battery, controllers, wires) and lay them out. You will then hook them all up just as if they were in the briefcase. The wires for the screen should be connected like the pictures show. The 3.5mm to rca should plug directly into the audio ports on the A/V cable. The A/V cable should plug into the video rca on the Pi and then plug into the screen’s a/v port. There will be lots of extra wires bundles up but it works and it looks fine when the project is complete. This will allow you to visualize where the wires go once inside the briefcase.

The battery comes with cables that can be used with the pi and the screen. Run the screen off of DC power using the DC cable fitted with the correct tip. Run the Pi off USB fitted with the micro usb tip.

When the visualization process is complete, place the components with briefcase and run the wires underneath the foam. IF the foam bunches up, carve away some more of the bottom of the foam to create a small “cave” for the wires. This will make the foam lay flat and it will look much better. 


Step 18: Play!

Now Game! Power on the Pi by plugging it into the battery and then plug in the screen to the batter. Make sure you have the wires hooked up correctly and you should be ready to play.

Step 19: Extra Tips

RetroPie has most likely gone through updates since this tutorial. Some actions may not work.

Bios files are needed for the Gameboy Advanced and the Playstation One emulators. You should obtain these from your console and from a third party.

Some emulators are hit and miss (Neo Geo, Genesis) I have had these working on some setups and not working on others.

Have a good day
1-40 of 44Next »
tinker0002 days ago

I know this is an older post but I am building a similar system and have many ROMs which are all in a zip format. Do I have to unzip them into each folder or can I just put the whole (unzipped) file in there?

Just realized something Zaqq you put an Anker battery that has no DC out. So I found one right here.

http://www.amazon.com/XTPower-10000mAh-Recorders-S...

making this soon :D probably just gonna get most of the stuff for free considering i have most of this stuff already :D

segavoyager7 months ago
love the blow darts
Zaqq (author)  segavoyager6 months ago

Haha, I like to use what I have on hand.

WatFaffles8 months ago
Do you know what emulators work best? And the ones that don't work as well?
jjdub37018 months ago
Cheaper method? Sorry,it's just I added the stuff together and it comes up as £172 not including the foam and the tools but its a bit too much out of budget.
Zaqq (author)  jjdub37018 months ago
Nope, it is in dollars bud; however, we got some good deals through eBay in order to buffer the price.
shadii2218 months ago
I just have two questions. 1 What kind of battery life are you getting out of that anker with it running the screen and all. 2 Are you still able to access the Rpi OS? I think it would be cool if you could use the Pi to download the Roms or check email and browse the web as well as play our retro games.
Zaqq (author)  shadii2218 months ago
Yeah, all access to the RPi OS still exists. All you have to do is exit EmulationStation and plug in a mouse and keyboard.
cookieeater54511 months ago
Will a Ps3 or a Xbox 360 controller work for this project? Ive ordered all the parts for it and they should be here soon but i need some controllers that dont cost 50$
troutpouch12 months ago
What model controller are you using?
Zaqq (author)  troutpouch11 months ago
Here you go.
http://www.amazon.com/Logitech-PlayStation-2-Cordless-Action-Controller/dp/B0001VNNE8

I will admit that these controllers are rather finicky and there are probably better choices out there.
Hi! I'm planning on making this for a Gameboy advance emulator. I was just wondering how I would go about setting up the controller, as the controller is the Gameboy advance. Please help!
Zaqq (author)  Element_Ike11 months ago
That is beyond my skill level but I am sure it is possible. I have seen people do it using the original gameboy.
alaiacano1 year ago
this is definitely the best emulator setup Ive seen!!! Ive only got a few issues. I cant seem to spot the genesis folder. did it not compile right, or is it named something weird? and also my mame games are not showing up on the list of games. is there a different way to get them to play?
Zaqq (author)  alaiacano1 year ago
The Genesis folder is probably under its Japanese name, Mega Drive. The Genesis/Mega Drive emulator is somewhat finicky but will work after some tinkering. I have yet to play any MAME games but they may be the wrong file type or just in the wrong ROM folder.

Thanks for the compliment too!
bbousman1 year ago
Whenever I boot the Emulation Station it's starts on an Apple PC emulation and not the main screen, how can I fix that?
Zaqq (author)  bbousman1 year ago
The Apple emulation is just one of the different options, scroll right and left to find the other emulators.
Wiggmaster1 year ago
This is the best portable emulation system that supports multiple games. A definate must build:)
jhunmar1001 year ago
Where can i buy Brief case?
ebay
craigslist
amazon
...
mkarvonen1 year ago
Very nice build! I have to build myself one too!!! :)
Jesse L1 year ago
There doesn't seem to be any listing for that screen even close to $15. The best there is, on ebay, is a single listing for it at $50, from there it's the whole set at around $80.
It doesn;t have to be that exact model..pretty much any screen with RCA or HDMI will work as long as it runs on 12Volt.

http://www.ebay.com/sch/Car-Monitors-w-o-Player-/48606/i.html

$15 is probably a bit of a stretch though.
cheapest is to buy a car 7" flat screen that has the same inputs as this. i got one for 20 dollars and it was new from the store. Its just luck that you can find one for cheap. Don't always check ebay or something like that for cheap products. Go to the store and see for your self for good deals. Internet is not always the cheapest. And i'm a living proof for that, Check my instructables. I build them with not using any money on them. Mostly its recycled stuff that i use in them that i got for free or with a few dollars.
Zaqq (author)  razamatraz1 year ago
Now that I look I cannot find one for that price but I can assure you that I bought one for that price. The seller listed it at 5 dollars originally and I placed a bid for 15 and won. After viewing the current prices, I will change the pricing in the instructable. Also, the battery can switch from either 9 volts or 12 volts. The screen we used has a built in restrictor to transform 12 volts into 9 volts. Have a good day.
Usablerain1 year ago
Would this DIY game pad (http://www.instructables.com/id/USB-Game-Pad-With-Tilt-accelerometer-Mouse/) work with this project?
Zaqq (author)  Usablerain1 year ago
I couldn't tell you if it will work or not. Some game pads work with the Pi while some do not. I was just lucky with the controllers that I picked, there should be a list of working controllers somewhere on the web. I would link it but I am on my phone right now...
capnjack781 year ago
I thought RPi emulation had sound issues. Notice any problems with sound? Lots of forum posts have mentioned this in the past, especially for Mame.
Zaqq (author)  capnjack781 year ago
I have only noticed sound issues with Playstation 1 emulation and I have yet to try MAME. Everything else works pretty well besides the occasional sound hiccup.
Berns12241 year ago
I'm new to the Raspberry Pi scene and was wondering if this will work with larger screens without modding the software/hardware or is it limited to the smaller size monitors? I have two boys (7 and 5) that this would be ideal for, but I personally would like it to have a 13 inch screen....thoughts?

Thanks for the feedback!
Zaqq (author)  Berns12241 year ago
It should work on any screen as long as you can plug it in through HDMI or RCA. Those are the ports the Pi comes with by default. If your screen lacks those ports there are other, more difficult options.
Incredible. That is a great Raspberry Pi project! Good job and good luck in the competition!
Great project! it just so happens I'm developing some raspberry pi stuff! good luck with your games!
patriqq441 year ago
dude you are my hero ... will you go out with me ?
Zaqq (author)  patriqq441 year ago
I will put it under consideration. ;)
I love this you have my vote
Zaqq (author)  SMOKINACE991 year ago
Thanks man! Every vote helps.
1-40 of 44Next »