Parsec

Uncategorized

The Nintendo Switch For PC Gaming  — Powered By A Raspberry Pi 2 And Parsec

This guide is reprinted with permission and written by Drew Wallace. The up-to-date version of the guide is hosted on Github.

The SwitchBerry Setup Guide

The SwitchBerry is a mobile PC game streaming device inspired by the Nintendo Switch and made from a Raspberry Pi. The goal was to play my PC games on the go, mouse and keyboard free, with little to no latency, and a steady frame rate.

The Story

I’ve always wanted a really cool handheld gaming device. I had a GameBoy, PSP, and Nintendo DS growing up. I really liked the PSP the most because I could mod the heck out of it but also because they had more of the kind of games I like. Then I got into consoles by playing Xbox, Xbox 360, PS3, and now Xbox One. I’m also just now diving into PC gaming. My desire for a handheld console diminished because I enjoyed competitive multiplayer games and other single player and co-op games that I knew a handheld couldn’t handle (no pun intended).

One day, Microsoft announced the ability to stream the Xbox One to any Windows 10 device. I was excited! All I had to do was find a small enough tablet and I’d be good to go. But it wouldn’t be the same. I’d carry around a tablet, and a controller when I already carried a Surface Pro 3. So I waited again, until I found NVIDIA Game Stream using Moonlight. They had an android app and I had an Android phone. My problem was I didn’t have a gaming rig. I was planning on building one but didn’t have the money yet. Again, I waited.

Finally, one day I found Parsec. Their focus was on low latency and they supported AMD, Intel, and NVIDIA. My Surface had integrated graphics so I could test it out! It was buttery smooth. I then found out they made a Raspberry Pi version. It got me thinking, could I MAKE a handheld and use this app? I needed to see what other people had done. I found different tips about which Pi to use for mobile projects, what kind of battery life to expect, what screens I could use, but the one big question was the controller. I always imagined having to split an Xbox controller in half and just mounting it on the sides of a screen. I knew that would be difficult and ugly so I was hesitant. Then I saw the Nintendo Switch Joy-Cons. I found a video of some guy playing 2-player with the Joy-Cons in RetroPie — a plan was born.

The idea that I could have a console/PC gaming experience in my hands remained a dream, until now. I went to Microcenter and bought a bunch of parts. I ordered some off Amazon as well. I grabbed the Joy-Cons from Best Buy because no one else around had them in stock at the time. Everything came together except the ability to join the Joy-Cons together as 1 controller. I tried multiple apps designed for remapping controls. Even the ones that advertised joining 2 devices as 1 joystick didn’t work. I tried modifying the source of another app to get it to work. Nothing was working. Then I found a Joy-Con driver written by Kane York (riking). After getting it to compile, it worked!

Designing the case to be 3D printed

Now that it’s complete I’m going to start thinking up how to make it smaller and maybe add some features. For example:

  • I want to embed the Joy-Con Charging Grip into my case so the Joy-Cons charge while on the SwitchBerry
  • I want to see if I can drop the Pi 2B for a Pi Zero, but I’m not sure if they make a DSI connector or hat for connecting with the touchscreen. This would be 100% handheld instead of having an option to “dock” it and use HDMI. I would also need a sound solution since it doesn’t have a headphone jack
  • Simplify the circuitry into a PCB for space and time saving

How To Build The Switch Berry Pi

Credits

I did not do this project alone. I was helped by friends, family, and the Parsec community. Because of how awesome everyone has been, I feel the credits should come first in this guide.

  • My wife: for letting me spend a chunk of change and most of my free time for the past month on this!
  • @CBNathanael#5078 from the Parsec Discord: Helped all throughout the project. We bounced ideas off each other. He helped me visualize things. Most notably he helped with the power circuit planning and gave me a visual diagram of how to hook it all up.
  • My dad: for soldering the power circuit for me.
  • My pastor: for 3D printing my case over and over as we tweaked the design and dialed in the tolerances.
  • @Rysha#1207 from Parsec and the Parsec Discord: for helping me troubleshoot issues on my Pi with Parsec and my Joy-Cons.
  • Kane York (riking): for developing (and continuing to develop) the Joy-Con driver I’m using.
  • Pimoroni Ltd (pimoroni): for making the touchscreen driver I’m using.
  • Rob Jones (craic): for making the power solution I’m using.
  • @benjy_parsec#6335 the CEO of Parsec: for his generosity, encouragement, and availability to help.
  • Raspbery Pi Foundation: for making a small mobile computing solution that worked out wonderfully.
  • Parsec: for building the practically magic streaming solution that has such low latency to make the experience near flawless.
  • Nintendo: for making the Joy-Cons that power an awesome single player and even 2-player experience.
  • Microcenter: for selling me most of my hardware at a good price.
  • Adafruit: for selling me the smaller bits at a reasonable quantity and price.
  • Amazon: for selling me the last few parts I needed and shipping them quickly.
  • Best Buy: for having the Joy-Cons in stock! Also for having an SD card that works with the Pi.

Media

Hardware

Software

Setting Up the Hardware

NOTE: Do the first 9 steps of the software section below. Also, if you get confused with the layout of things, check out the pictures.

  • 3D print this case but exclude the screen housing
Early vesion of the 3D printed case
  • 3D print this screen housing.
  • Place screen into 3D printed housing.
  • Secure L backets with 4 M3 screws, flat side facing outward, over the holes on the 3D printed screen housing.
  • Unscrew the screws from the riser screws on the touchscreen driver board and set them aside.
  • Replace the bottom right riser screw with one of the screws from the previous step from the touchscreen driver. This is so it doesn’t poke the battery.
  • Remove the top right riser screw.
  • On your permaboard, create this circuit from the parts you have. You may wish to use a temporary breadboard for testing purposes so you don’t have to go through the hassle of desoldering if you messed up. Read ahead to figure out where to place the attached components.
  • The button is going to go right outside the case next to the Powerboost 1000C. It will be secured with velcro. There should be a hole, if not it was probably just filled in during the 3D printing process and you can clear it out with a knife.
  • You may need to hot glue around the LED leads if it’s exposed.
  • Place the completed permaboard circuit vertically next to the Pi such that the soldered components are facing the same direction as the Pi’s USB ports.
  • Secure the Powerboost 1000C with 1 screw from the touchscreen driver board and another from the Kingwin 80 Piece Assorted Notebook Replacement Screw Kit.
  • Secure the pi in place with 2 screws from the touchscreen driver board.
  • Place a strip of velcro along the wall opposite of the Powerboost 1000C.
  • Place a piece of velcro on the battery and gently press the battery against the back wall.
  • Connect the battery to the Powerboot 1000C.
  • Place the LED between the battery and the Powerboost 1000C.
  • Connect the touchscreen to the Pi by ribbon cable.
  • Connect a 5V GPIO pin to the 5V pin on the touchscreen.
  • Connect a ground GPIO pin to the ground pin on the touchscreen.

Setting Up the Software

DISCLAIMER: If you deviated from the hardware listed above, mainly the touchscreen and wifi adapter, this won’t work and you’ll be on your own. I rely on a touchscreen driver for that specific touchscreen and a wifi driver for that specific dongle. Also, the bluetooth adapter I used is plug-and-play. If you choose a different one, and it’s not plug-and-play or doesn’t find the Joy-Cons, you’re on your own.

  1. Download the latest Raspbian Lite image.
  2. Download Etcher.
  3. Write the latest Raspbian Lite image to your SD card with Etcher.
  4. Plug in SD card to Pi.
  5. Plug in ethernet cable into Pi.
  6. Plug in HDMI cable to Pi and TV.
  7. Plug in Pi AC adapter to turn on the Pi.
  8. Log in to the Pi with username: pi, password: raspberry
  9. Run sudo raspi-config
  10. Change password
  11. Change hostname if you want
  12. Change locale/timezone/keyboard/wifi region in Localisation
  13. Enable ssh in Interfacing
  14. Disable terminal, enable hardware for Serial in Interfacing
  15. Select Finish
  16. Agree to Reboot
  17. When the Pi comes back to the login screen, login
  18. Run sudo apt-get install -y git
  19. Run git clone https://github.com/drew-wallace/switchberry.git
  20. Run mv switchberry/* ./
  21. Run chmod +x 1-setup
  22. Run ./1-setup
  23. When the Pi comes back to the login screen, login
  24. Run ./2-wifi
  25. When the Pi comes back to the login screen, login
  26. Run ./3-touchscreen
  27. Run ./4-joycons
  28. Run ./5-desktop
  29. Disconnect the HDMI cable.
  30. When the Pi comes back on, it should load the Desktop environment. Tap the terminal icon
  31. Run ./6-parsec username password where username is your e-mail you sign into Parsec with, and password is your Parsec password
  32. For both Joy-Cons:
  33. Long press the Joy-Con sync button until the LEDs start to flash back and forth
  34. Touch the Bluetooth Icon on the taskbar
  35. Tap Add Device
  36. Tap the Joy-Con entry in the list when it pops up
  37. Tap Pair
  38. Tap Ok
  39. Touch the network icon in the taskbar
  40. Touch your WiFi access point
  41. Enter your WiFi access point password
  42. Touch Ok
  43. In the terminal, run sudo reboot
The final product

How To Use

When you turn on the SwitchBerry, you will end up on the Desktop. There are 4 shortcuts for you to double tap:

  • Keyboard: Opens the onscreen keyboard. This is helpful when connecting to a new WiFi access point
  • LCD Mode: Enables the LCD screen and disables HDMI out. Also enables sound through the headphone jack and disables sound over HDMI
  • HDMI Mode: Enables HDMI out and disables the LCD screen video. Turns the touchscreen into one large touchpad. Also enables sound through over HDMI and disables the sound through the headphone jack
  • Parsec: Starts Parsec and chooses the first available server to stream from

Hotcorners

  • Brightness: Touch the top left corner of the touchscreen. The screen should dim. Drag your finger to the left to increase the brightness.
  • Volume: Touch the bottom left corner of the touchscreen. The volume should go all the way down. Slowly drag your finger to the right to increase the volume.
  • Exit: Long press for 5sec the top right corner, then release to quite Parsec, close all running scripts, and get back to the desktop.
  • Joy-Con configuration: Long press for 5 sec the bottom right corner, the release. The Joy-Cons will begin to flash the LEDs. At that point you can either click L + R to play with both controllers as player 1, or press SL + SR on each controller you want to use individually. The LEDs will indicate which player you are.

Donate

Here’s my Square Cash. This wasn’t a cheap project by any means. It’s too complicated right now to sell, so if you’re feeling generous, drop me some cash!

Share

Power your remote workplace. Try Parsec for Teams

Sign up