GamePi XS - the Plug'n'Play Emulation Station

11,744

262

25

Published

Introduction: GamePi XS - the Plug'n'Play Emulation Station

About: Simplicity is natures first step, and the last of art. ~ Philip James Bailey

Intro:

This instructable describes the build of a Raspberry Pi Zero W powered console all within a SNES controller. It can be used on any display with HDMI. It is powered by a smartphone Lithium Ion battery which lasts up to 3 hour (depending on the emulator running).

If you want to run emulators with high demands e.g. Playstation 1 you may take a look at the GamePi 2. You could also like my new alternation of the GamePi 2 - the GamePi Zero. It cheaper, smaller and lighter.

Note:

Please note that English is not my first language. If you find any mistakes or something is not clear feel free to tell me and I'll try to fix it. Same goes for general mistakes. If you have any suggestions for improvements please let me know.

Step 1: Tools & Materials

Make sure you have everything you need for the build. There is nothing more annoying than stopping your project because you have to wait for some small part being delivered.

You do not have to buy the listed parts and material from given links. These are examples and show the required properties of the parts.


Parts:

1x Raspberry Pi Zero W [$13.00]

1x micro SD Card - 8GB [$4.40]

1x USB SNES Controller [$2.20]

1x LiPo Battery [$6.42]

1x HDMI to Mini-HDMI cable 2m [$3.78]

1x Lipo Charger + Step up Module [$2.66]

1x Slide Switch [$1,36]

1x LED 3mm [$0.44]

1x micro USB jack female [$0.02]


Tools:

Soldering Utilities

Screw drivers

Hotglue gun

Double Faced Adhesive Tape

3D Printer or 3D Printing service

Step 2: 3D Printing the Case

I've printed my case with gray PLA filament. PLA comes off the printer in a decent quality - so no post-processing is required (imho).

If you have a 3D printer with a smaller bed or no printer at all you can use a 3D printing service or message me - maybe I'm in the mood to print it for you.

You'll find my case on this thingiverse design page. I'll keep it on thingiverse to avoid redundancy.

Step 3: Controller Disassembly

Now that all parts are ready we can start building.

In this step we want to disassemble the SNES controller and prepare it for all the stuff we're going to put into it.

  1. Remove the 5 screws on the back of the controller (keep the screw since we'll need them later!).
  2. Remove the back cover of the controller (we do not need it anymore).
  3. Clip/break off the 4 supports (shown in the picture) so everything can fit nicely.
  4. Measuring from the controller board cut the USB cable after 10 cm.
  5. Your controller should now look like the one on the last picture of this step.

The controller is now ready for the next steps.

Step 4: Wiring: the Power Circuit

This is the step covering most of the wiring.

Since this is the power circuit be super careful regarding the polarity - check it as often as possible.

At the end of this step you power circuit should look like the one on the first picture of this step.


Setting the correct Voltage:

The Raspberry Pi Zero W runs off 5,0 Volts (V) so we need to set up the correct voltage on the LiPo charger / step-up combo first. We will set the step-up converter to something around 5,2 V so the Pi has some buffer if under heavy load.

  1. Solder the batter to the LiPo charger / step-up combo like shown in the 3rd picture.
  2. Connect your multimeter to the "Out+" and "Out-" pads of the LiPo charger / step-up combo.
  3. Turn the golden screw on the blue potentiometer of the LiPo charger / step-up combo until you reach 5.2 V.
  4. Remove the multimeter.


Soldering the Circuit:

  1. Connect all components according to the last picture.

This setup does not use the micro USB power jack of the Pi in order to save space. Solder the wires directly to the Pi.

Now that you have finished the power circuit be careful with it - there is now current on the LiPo charger / step-up combo!

Step 5: Wiring: Power LED

In this short step we want to attach the status LED. Its only purpose is to indenticate if the Raspberry Pi is powered or not.

When finished your setup should look like the one on the first picture of this step.


Soldering:

  • Connect the LED according to the last picture.
  • The longer leg of the LED is connected to the 3.3V power output of the Pi.
  • The shorter leg of the LED is connected to one of the ground points of the Pi.

Power on the Pi and check if the LED lights up.

Step 6: Wiring: SNES Controller

This is the last step including soldering (yeay). We want to attach the SNES controller.

When finished your setup should look like the one on the first picture of this step.

Soldering:

  1. Connect the SNES controller according to the last picture.

Step 7: Preparing the HDMI Cable

Since the mini HDMI end (going into the Pi) of the HDMI cable is to big to fit into the case we need to remove the housing.

I used a side cutter to carefully remove the housing of the mini HDMI end.

In the picture you can see how it look before and how it's looking without the housing.

Step 8: Installing the Software

Before putting everything together we want to take care of the software part first.

In this step we're going to download all needed software and prepare the SD card using the RetroPie image.


Required Software:

  • Download the pre-made RetroPie image for the Raspberry Pi (the red "Raspberry Pi 0/1" button). This is basically the operating system of this console. Of course you can use whatever you want on the Pi - there are dozens of other solutions.
  • Download and install 7-Zip- a free file de/archiver. We need it to unpack the RetroPie image archive.
  • Download and install SD Memory Card Formatter. As the name says this tool formats SD memory cards.
  • Download Win32 Disk Imager. We need this tool to write the unpacked RetroPie image to the SD card.


Preparing the SD Card:

  1. Plug the SD card into your Windows PC.
  2. Make sure Windows detects the card.
  3. Open "My Computer" or "This Computer" or the Windows Explorer and remember the drive letter of the SD card. In my case it was F:\ (differs from systems to system). Make sure it's really the letter of the card and not some of your harddrives.
  4. Start SDFormatter.exe, select your drive letter from the "Drive:" dropdown menu and hit the Format button.
  5. When formatting has finished close SDFormatter with the Exit button and unplug the SD card.


Write the RetroPie image to the SD card:

  1. The downloaded RetroPie archive should be called something like "retropie*.img.gz".
  2. After installing 7-zip right click the RetroPie archive and select 7-Zip from the context menu. Select "Extract Here" and wait for the unpacking to finish.
  3. Plug the SD card into your Windows PC. Make sure Windows detects the card and again remember the drive letter of the SD card.
  4. Start Win32 Disk Imager.
  5. Select the unpacked RetroPie image from the field "Image File". Select the drive letter of the SD card from the "Device" dropdown menu.
  6. Click the "Write" button and wait until the writing finished.


Add your WiFi credentials:

  • There are several ways to connect the Raspberry Pi Zero W to you wireless network.
  • We are going to use the one without any additional peripherals:
    1. With the SD card still in your PC navigate to the SD card
    2. Create a new file on the SD card called "wifikeyfile.txt"
    3. Open the file and add the following code to the file where "NETWORK_NAME" is the name of your wireless network (case-sensitive) and "NETWORK_PASSWORD" is the password for this network (case-sensitive).
    4. Save and close the file.
    ssid="NETWORK_NAME"
    
    psk="NETWORK_PASSWORD"

    Now you can remove the SD card from your PC.

  • Step 9: Assembly

    Now that we've prepared and connected every component we need it's time to put everything together:

    1. Use the double faced adhesive tape to stick the LiPo charger / step-up combo to the back of the case (see the position in the first picture)
    2. Put the female micro USB jack into its dedicated hole and add hot glue to secure it.
    3. Put the mini slide switch into its dedicated hole and add hot glue to secure it.
    4. Put the power LED into its dedicated hole and add hot glue to secure it.
    5. Put the battery into its dedicated space in the center of the printed case.
    6. Put the Raspberry Pi Zero W into its position on top of the battery with the HDMI ouput facing the slide switch (see second picture).
    7. Secure the Raspberry Pi Zero W with 2 screws.
    8. Plug in the HDMI cable (see third picture).
    9. Close the case by putting both case parts carefully together (no force should be needed).
    10. Secure the case parts with 4 screw on the back side (see last picture).

    Step 10: Configuring RetroPie

    Time to boot up the whole thing!

    The first boot up takes a while because RetroPie has to handle some first start tasks (looks like the first 2 pictures of this step).

    Configuring the Input:

    1. Insert the SD card into the Raspberry Pi and slide the power switch.
    2. Wait until emulationstation shows up and asks you to "Configure Input" (see third picture).
    3. Follow the onscreen instructions and map your buttons.
    4. Now we are going to configure some basic settings.


    Configure WiFi:

    1. In the main menu of emulationstation (where you select the systems) select RETROPIE and press the A button.
    2. Select WiFi and press the A button.
    3. In the new menu select "Import wifi credentials from /boot/wifikeyfile.txt" and press the A button.
    4. Wait for emulationstation to establish a connection to your WLAN.
    5. Welcome to the internet.

    Step 11: Adding Games

    To play emulated games we need those games first.


    Getting Roms (the games ... as files):

    • I won't describe where to get the roms for the emulators because from what I understand this is kind of a legal grey zone.
    • Use google to find your favourite rom - there are a lot of websites offering them. Just search for something like "Mario Kart Super Nintendo Rom".


    Transfer Roms to the GamePi:

    1. Turn on the GamePi and wait until it boots up completely.
    2. Make sure you have connected the GamePi to your WiFi.
    3. Open a Windows Explorer (a folder not the Internet Explorer).
    4. Enter "\\RETROPIE\roms" in the address field of the folder and press Enter. You are now in a shared folder of the GamePi.
    5. Copy your downloaded rom into the correct emulator directory. For example: if you downloaded the "Super Mario Kart" rom for the Super Nintendo copy the rom into the SNES folder.
    6. Restart emulationstation (press the Start button in the main menu, select QUIT, select RESTART EMULATIONSTATION).
    7. After the reboot the new system and game should be visible in the main menu.

    Step 12: The Final Step

    Congratulations:

    • Congratulations you've build your own GamePi XS.
    • Plug it in any Display, Monitor, TV, Beamer, whatever and have fun playing some all time classics.
    • Show some love and have a nice day.
    • You can also tip me on thingiverse if you feel to.

    Step 13: Change History

    12-APR-2018:

    • Published.

    14-APR-2018:

    • Changed title picture.

    20-APR-2018:

    • Added links for GamePi 2 and GamePi Zero.

    03-MAY-2018:

    • Corrected typo in "Step 4: Wiring: the Power Circuit".
    Microcontroller Contest

    This is an entry in the
    Microcontroller Contest

    Share

      Recommendations

      • Outdoor Fitness Challenge

        Outdoor Fitness Challenge
      • Slow Cooker Challenge

        Slow Cooker Challenge
      • Make it Move Contest

        Make it Move Contest
      user

      We have a be nice policy.
      Please be positive and constructive.

      Tips

      7 Questions

      0

      Hey

      Really nice project!
      I tried to do it myself and had some troubles getting the pieces. But now after soldering and building everything together and pluging it in: My Controller won't get recognized. :( There seems to be power on the controller, but pressing any button won't change a thing and I'm stuck at "no gamepads detected"

      Did this happen to you too?

      Greetings
      Randakan

      I tried switching them, but sadly it remained with the same result: No gamepad detected.

      1 more answer

      Had no problems with my controller.

      Try swapping the controller data wires (withe and green).

      Hi, my partner and I are working on a project, and we are not the best at putting together electronics, but since the raspberry pi zero w already has bluetooth capabilities, could you just hook it up to a bluetooth dongle instead of a HDMI cable?

      I've no experience with video via bluetooth. You should try it.

      I've just ordered the parts but two questions 1. how long does the battery last one charge? and 2. how will I know if it's fully charged?

      1. The battery life is described in the third sentence.

      2. You won't. But you can calculate it:

      - the capacity of the battery is 1350 mAh.

      - the charger delivers a charge current of 1000 mA.

      So technically it takes around 1.5 hours to charge it.

      But the charger won't constantly charge the battery with 1000mA. Just let it charge for 2 hours and it should be fine.

      0

      An amazing project, kudos to you! Got several questions though.

      1. Can you shed a bit more light on how the controller is wired? What I mean is, how is it recognized by the RPI/Emulation Station?

      2. In power wiring part, point 4 says to remove the potentiometer. This part is quite unclear to me. Could you please explain?

      3. Would the RPI still allow the possibility of attaching more controllers? I'm thinking... slightly thicker shell, that would allow for USB ports to be accessible, so that others could plug their controllers to your controller. Thank you!

      Thank you. To your questions:
      1.) The USB cable of the controller was cut and the single wires were directly soldered to the USB connector of the Pi (or to the test pads - for better handling). So it's like connecting the Controller to the Pi via USB -- but skipping the long cable and the USB jack.

      2.) That was a typo. It should be "4. Remove the multimeter." I've corrected it.

      3.) Yes, it's possible. This question was already asked and answered. Look into the commentens for the question of "Mr Joshua" 18 days ago. You could also connect further controllers via bluetooth.

      So I ordered everything you listed from the sites you listed... except for the batteries (I'm trying to build 2). Your link for the battery took me to aliexpress.com for a HIXANNY EB425161LU Battery that measures 50mm x 60mm x 4mm. I ordered EB425161LU batteries from Amazon since aliexpress wouldn't ship the batteries to me (I'm in the US). I got my batteries today, but they don't fit inside the cases I printed. But they do match the specs and sizes listed in the link you provided. I'm *hoping* that all I need to do is print out your bottom case again (at >100%, maybe?), but I don't have all the other components yet to check how the parts all fit. The batteries I have, which are the right size by the best of my understanding, simply don't fit inside the cases I've printed at 100% (143mm wide x 61mm tall). Do you have any suggestions? (Is the battery not supposed to be 50mm x 60mm?)

      IMG_20180423_195625.jpg

      That's the battery I'm using.

      DSC_3982.JPG

      0

      what if you don't have a 3D printer?

      I could print it or you try a 3D printing service.
      you've got mail, btw.

      0

      Hello Mr araymbox. I would like to ask you if you would print the case for me and if so what the cost would be. Also if you have a PayPal payme account. I live in Indiana,USA

      25 Comments

      Excellent, Bro. You can upload video's demostration.

      All your invent are fantastic!

      Excellent work! I definitely want to give this a try. One question though, how well does the Pi Zero work for emulation? I see many recommendations for using the biggest and best version of raspberry pi in order to get good performance while playing. You've got my vote!

      1 reply

      Thank you for the vote.
      The performance depends on what emulators you want to use. I tried some games on N64 and PS1 - they didn't performed that well.
      Older system like NES, SNES, some Segas works just fine.

      I've been toying around with the idea of making this type of device based on the various projects I've seen. This one looks great! My question is about the controller and the 3d printed bottom. The USB controller you posted a link to is sold out. If I grabbed a random "USB SNES" controller off ebay or somewhere else, are they pretty standard in shape so your 3D template would fit? Also if you could send over or post the version with the ext USB port that would be great!

      I also voted for this in the contests. good luck and thanks!!!

      1 reply

      I'm very impressed! I like that the whole project involves a bit of electronics, a bit of 3D printing, a bit of software knowhow... a nice smattering of related hobbies. I just voted for you in both contests, and I'm just about to order parts so that a friend at work and I can each build one. Nice tutorial!

      1 reply

      thanks a lot and have fun building it.

      You got my vote for the pocket-size contest! Now, I didn't see anything about recharging the battery or a way to shutdown the PI cleanly (I just burnt a SD Card with that :-/ ), did I miss something?

      1 reply

      first of all thanks for the vote :)


      the charging is described in "Step 4: Wiring: the Power Circuit". On the first picture you can see a female micro USB jack. The wiring diagram says "female micro USB jack for charging the battery". You can charge it just like a random smartphone. Plugin a wall charger or power bank and that's it.


      You can shut down the Pi cleanly from the emulationstation main menu:
      press the Start button in the main menu, select QUIT, select SHUTDOWN SYSTEM

      I am probably the least qualified person to attempt this project but your instructions are so well written that I'm going to do it. However I would to ask you if you could print the case for me. Tell me the price and your pp account and I will send the payment right away. Great job.

      1 reply

      you've got mail.

      Thx. Don't forget to vote for it in the contests :P

      Awesome project, thanks! Quite amazed when I looked up the software, to see the number of different emulators that this can run!! I definitely need to make one of these.

      I was wondering, do you think that it's possible (or rather, how difficult it might be) to add a way to add a second controller into the project? So for instance to have a second cheap USB Snes controller that maybe would plug into a USB socket on the main one perhaps?
      I think that would be a fantastic upgrade to be able to have 2 player action!

      Your English is better than I think most people who have it as their first language btw. :)
      Keep up the great work!

      1 reply

      thanks for the kind words.

      Actually this build presented here is my second iteration of this device. The fist one featured an internal USB hub and a external USB jack (see attached picture).
      I dropped the hub for this build since the Pi Zero W comes with bluetooth and it's super easy to bind it with some (for example) PlayStation bluetooth controllers for some multiplayer action.
      If you're interested I can send you the 3D model (stl file) with the external USB jack.

      27797558_10215579814838134_5974738754342976505_o.jpg

      The 3rd sentence of this instructable says:
      "It is powered by a smartphone Lithium Ion battery which lasts up to 3 hours (depending on the emulator running)."