Retropie in a Snes Controller [PRS-TECH-BOARD]

Show off your completed Game Boy Zero, or post your build logs here!
Post Reply
User avatar
drafterITA
Posts: 120
Joined: Fri Feb 24, 2017 8:15 am
Location: Italy
Has thanked: 66 times
Been thanked: 19 times
Contact:

Retropie in a Snes Controller [PRS-TECH-BOARD]

Post by drafterITA » Thu May 25, 2017 11:24 am

Hello sudomodders :)

I finally completed a decent build (my first GBZ is kind a of a mess.. I'll do a post-mortem post at some point) and I want to share with you the result, I want to start saying that I'm very happy on how it turned out so rejoice with me! :D

DISCLAIMER:
the work contained in this post would not be made possible if not for the user prerunnerseth who made this awesome board available for us, more info at the post linked here; you'll also find a list of the necessary parts so I'll not list them.
/DISCLAIMER

As you can imagine this is about a raspberry pi zero w soldered on the custom pcb and stored inside a snes controller, so I started with the broken controller, although the plastics are in good shape (after a massive cleaning with soap and hot water), and adapted the inside by cutting some plastic pieces.
BeforeShow
Image
AfterShow
Image
Please note that this is not the final version of the inside of the case, more on that later.

I had a problem with the HDMI cable I ordered, in fact the mini connector, the one that goes in the RPi, was too big (I couldn't find the one suggested by prerunnerseth), as you can see from the following image. Luckily after removing the plastic casing the connector is pretty much made of clear material, so I could see the wiring inside
Too big to fitShow
Image
After hacking several millimeters of material I finally got it to close, and used some electrical tape to mask the white plastic
It fits now!Show
ImageImage
Just to be sure, let's test the RPi with the hacked cable..
It works, trust meShow
Image
Time to cut the SMT Header on the side that goes in the RPi, basically the straight pins, the one shaped like an L are to be soldered on the custom pcb
That's how it looks when inside the RPiShow
Image
Left: before; right: afterShow
Image
To help me keeping the custom pcb and the header row steady and in the right spot I used 2 helping hands
Keep it right THEREShow
Image
I soldered first the left side, the first two pins and then I did the same on the right, so that the header was in the right spot on both sides, and then finished soldering all of them
This is how it looks at the endShow
Image
Time to do the soldering of the RPi on the header, it was not too difficult because the header row was already soldered on the pcb, so it was just a matter of patience and keep the RPi level on the header row
Friends Forever!Show
Image
As per instructions in the guide from prerunnerseth, carry the 5v power with this little junction
5v, checkShow
Image
Next are the Left and Right shoulder little pcb, desolder them from the snes board and solder them back in the custom pcb
Tiny pcb for L and R buttonsShow
ImageImage
The following was the scariest and the most difficult part for me.. solder a little diode in the HDMI adapter.. the problem for me was.. buy the diode! in the town I live there is only 1 store that sells those things, and it's going under renovations.. so yeah.. a little rant here.. thanks to a very kind guy from another store I got 2 of those little buggers (for free!). Just to mention that opening the case was not too difficult.. I just used an exacto knife and being very careful it was no problem
HDMI adapter BeforeShow
Image
HDMI adapter AfterShow
Image
Basically now it's done.. just close the HDMI adapter case, close the Snes Controller, put the sd card with the Retropie software installed and boot it! Then follow this post on how to use the GPIO as keyboard input for your controller. And it really works! :D

But... another user made another modification to this beauty, basically a tactile switch to power on and off the system, read about it here
I wanted to do the same, but I didn't want to use hot glue, so that I could still open the case and completely remove the whole thing without it being attached to the snes controller case. Another idea I got was to have 2 additional tactile switches and bind them to the key ENTER and ESC, in this way you can select options and exit from the various menus where the controller is not supported, read about it here

My solution for all this, 3 additional buttons to sum it up, is a piece of perfboard, switches attached to it, and wires going to the RPi
Breakout board for additional buttonsShow
ImageImage
I made a common ground and PLEASE NOTE that the clear wires are wrong.. I realized it after booting the system the first time :P
basically the switches were always closed :P so just move the clear wires on the right pin.. learning by trials and errors :)

The place for this little addition is on the left of the RPi, as you can see from the following image, I just put some electrical tape under the perfboard so that the custom pcb will not get scratched
Wiring it on the GPIO pinsShow
ImageImage
As I said, no hot glue, I just used my dremel to drill perfect fits holes in the snes case and the breakout board just stays in place this way, the buttons are sticking out for maybe 1mm and they can be pressed.
Also some of the plastic needs to be removed to make space for the breakout board
Holes and plastic removedShow
Image
In my case the holes are 1cm apart from each other, center to center of the tact switch button, so it was easy using a pencil and a ruler to mark the points where to drill.
The holes are in the end made with a 2.8mm drill bit, but I started with 1mm, then going up slowly, so I won't mess up with the case :D
The two sides of the case near to each otherShow
Image
Finally... just close the case, don't make the screws too tight or the tact switches will not move back into position after pressing them.
From left to right, ENTER - ESC - Power on/off
Closing the caseShow
ImageImage
To configure the software for the power button I followed this article
for the ENTER and ESC buttons I modified the retrogame.c library on the RPi, logged via ssh on the system and with the editor of your choice change the code in this way
retrogame.c additionShow

Code: Select all

{  17,     KEY_ESC      },
{  18,     KEY_ENTER    },
Add this code to the ioTFT[] and the ioStandard[] arrays (maybe it's only needed in the ioStandard..), NOTE that I wired my buttons to the BCM 17 and BCM 18 pins on the GPIO of the RPi, if you use different pins, refer to the pinout in the retrogame.c post.
Another nice thing about these 2 buttons is that you can use them in the MAME emulator: ESC to quit the emu and ENTER to select the options, for example to configure the controls.
I compiled the library again, rebooted the system and everything works like a charm! Wohooo! :D

Sorry for the long post, but I was so happy that this build turned out like this and I wanted to share a (almost) step-by-step process.

Thank you prerunnerseth for the board and the whole community for this, I love it! :D

Ciao!
Cheers! :D
drafterITA

Racerboy
Posts: 129
Joined: Thu Jun 02, 2016 4:49 pm
Has thanked: 25 times
Been thanked: 36 times

Re: Retropie in a Snes Controller [PRS-TECH-BOARD]

Post by Racerboy » Fri May 26, 2017 8:59 am

Clean, I like it! Not a bad guide to follow too, nice work!


User avatar
rodocop
Posts: 1723
Joined: Mon Aug 22, 2016 3:14 pm
Location: Saskatchewan
Has thanked: 606 times
Been thanked: 608 times

Re: Retropie in a Snes Controller [PRS-TECH-BOARD]

Post by rodocop » Fri May 26, 2017 9:57 am

Looks awesome. The additional buttons are a great plan. I've recently just sold my last 2 gameboys, so I need a new project.Mmaybe i'll build one of these next...That is, until the minty pi products are released!

I have a generic USB SNES controller, hopefully it will work okay.

SeDon
Posts: 1
Joined: Mon Dec 18, 2017 1:28 pm

Re: Retropie in a Snes Controller [PRS-TECH-BOARD]

Post by SeDon » Mon Dec 18, 2017 1:53 pm

I recently soldered my SMT had her on to the PRS board and realized pins one and three have continuity between each other is this cool or do I have a problem?
I don't see any stray solder linking the two but I didn't check the pads before I started putting everything together.

User avatar
YaYa
Posts: 1719
Joined: Mon Jun 26, 2017 12:42 pm
Location: brittany - France
Has thanked: 871 times
Been thanked: 689 times
Contact:

Re: Retropie in a Snes Controller [PRS-TECH-BOARD]

Post by YaYa » Mon Dec 18, 2017 3:30 pm

Sedon, the right topic for this is not really here, i invite you to post your issue to the original creator of the board in his dedicated thread.
Follow this link
viewtopic.php?f=38&t=2659
Follow me on instagram Image

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest