I’ve wanted a Raspberry Pi ever since I heard about its conception. Everybody wants one. Who doesn’t want a little $35 linux computer with a multitude of general purpose I/O connections? The real decision everyone faces isn’t whether or not to buy one, it’s what the hell do I do with it once it’s in my possession?
A few years ago I built a camera remote head. It’s a remote controlled head that controls the pan/tilt of a camera, mainly for putting on the far end of a jib or crane, or these days on a multi-rotor helicopter (we’ll cover those in a future post for sure). During that project I had to check out Arduino’s and other motor controllers trying to figure out which one would be best served in that instance. In the end I opted for some basic potentiometer controlled motor controllers and the result was awful. I’ve always wished I had gone for a more digital, computer controlled solution instead of the analog route I went.
What does this all have to do with the Pi? Actually, nothing. But my point is I’ve wanted an Arduino or other GPIO control board just to mess around with and put to use in some way. I read about RetroPie and how easy those guys have made the process of turning the Pi into a emulation computer and it was hard to pass up. The only thing I really didn’t like was how slow the Pi was. Then the Pi2 came out. BooSH!
I had an idea. My buddy Gio’s birthday was coming up, and he was always so envious of my jailbroken Nintendo Wii and it’s abilities to play old console games so I figured that’s a great excuse to buy a Pi and try out this RetroPie business. And of course, why buy one when you can buy two for twice the price, so I picked up a second Pi2 for myself so I could continue to dick around with the platform even after Gio’s GyroBox was delivered.
What made this project different and actually interesting to me however, was the idea of using original game controllers. Plugging in a USB gamepad is something that could already be accomplished with a laptop or other PC. Even my Wii worked great for old console games, and the controllers are wireless. But the problem is that part of what makes playing consoles like the SNES great is playing on the original SNES controllers. If I was going to bother going through with this build, then it damn well better be able to utilize the original controllers. Thankfully, those drivers had already been written as well. [SNES Dev Rpi]
So really, I’m not breaking new ground here. Console games on a Pi has been taken care of, and actually RetroPie comes with a great front end called EmulationStation that takes out a lot of the guess work there as well. There are guides so detailed that you need VERY LITTLE linux experience to pull it off. Now I think you need some linux experience to really make it your own, but my point is that this has been done many times before. Even the SNES Dev drivers have been utilized by many people, and the creator himself sells a PCB to make the connections easy for you: [RetroPie GPIO Adapter]
No, if we’re going to make this worthwhile, we need to do something unique. Well in this case I don’t think this idea is TOTALLY unique as I think it’s been done a couple times before, but I’m fairly certain no one has done it with a Pi2 yet. So pioneering at least!
First step, completely cannibalize a test SNES cart. I was not inclined to wait for the proper Nintendo screwdriver kit, so I forced my way in, like William Shatner tried to get into JJ’s first Star Trek movie.
I was very reluctant to do the right thing and modify the PCB, instead I wanted to try and modify the SNES cart to fit the Pi without having to do any modifications. In the end not only did this look horrific, the Pi still wouldn’t fit anyway. I’m actually really glad it didn’t fit because this would’ve look atrocious.
That’s one less John Madden SNES cart in circulation.
In the meantime I continued progress on trying to get the SNES Dev drivers to work on this Pi. I didn’t want to shell out for the GPIO adapter because honestly I didn’t think I needed it and I was almost certain there’s no chance of it fitting inside the SNES cartridge. The solution, some ribbon cable. Cut off the wires to the pins I don’t need, and wire up the rest to the SNES controller extension cables.
A lot of the technical details here are detailed on the PetRockBlog, and if you want to do this yourself I recommend a visit. [SNES DEV Rpi]
I did have to make a couple minor changes to account for the Pi2, and IIRC I may have had to recompile something or other, but in the end I was able to confirm SNES controller functionality in EmulationStation and in the various RetroArch emulators that I tested.
Now the the hard part. The part I’d been dreading and avoiding for weeks. I’m going to have to desolder the USB ports from the Pi, and re-solder a single-height USB port and a USB extension cable. Hella lame.
I was certain that I was going to fry the Pi and ruin everything. I mean I guess the benefit was that to this point most of the work had been software related anyway, so worst case scenario I have to buy another Pi2 and try the desoldering again.
So this is silly, but this actually took me SEVERAL days of trial and error to remove the old ports and solder on the new ones. And really, I wouldn’t even call removing the old ones “desoldering” because I pretty much just destroyed them and cut them off the board. No matter what I tried I could not get the solder sucker to work. I bought a new solder iron because I thought mine wasn’t hot enough, I tried solder wick, I tried diet Coke, nothing worked. Soldering the new parts in was far less challenging, but I still didn’t do a very good job. But when I tried powering up the Pi, everything seemed to work.
I’ll take it.
Now for some comparatively easy work, dremel out some notches for the necessary cables and ports. NO PROB BRO.
The only thing that really bothers me about the Pi is that there’s no power switch. It automatically boots up when you plug in the PSU, and when you do a shutdown -h it powers down but there’s no way to boot it back up without pulling the power and plugging it back in. I also did not like the idea of not having any way of shutting down the system without going through the EmulationStation menu, or by typing the command in the shell.
I was trying to figure out some way to connect a pushbutton to a GPIO port and have that trigger a script that would shutdown the computer, and if it was powered down to somehow start it back up without having to reconnect the power cable.
The script idea was obviously a no-go for booting up the machine, but what did work was bridge the reset pins on the Pi itself. The button wouldn’t shut down the Pi, but it worked great as a boot up button. Unfortunately my godawful soldering came back to bite me as the Pi would then intermittently reboot during gameplay. I desoldered the thing and just scrapped the idea. Having an unstable reset switch is far worse than just having to unplug the power cable to reboot the Pi. Someday I’ll get this soldering shit down.
I made some custom artwork for the cart label and the OS splash screen, waited for them to be delivered then boxed up the stuff to send to Gio for his b-day. For the cart label I found some dimensions online, and I think I printed through vistaprint.com on a bumper sticker. I figured this would give me a decent adhesive-backed glossy image that is probably as close as I can get to an actual SNES cart.
He seemed to enjoy it. Then I dumped all the configuration files to my own Pi and I can jam some EarthBound without having to pay $300 for it on ebay. I did not, however, bother putting mine in an SNES cartridge.