The NEW Build Your Own Arcade Controls

Main => Raspberry Pi & Dev Board => Topic started by: Slippyblade on May 21, 2015, 09:49:57 pm

Title: R-Pi SNES retro console project
Post by: Slippyblade on May 21, 2015, 09:49:57 pm
Got my Raspberry Pi and want to do a project. I love the retro console mods, so gonna do one of those.  Stuffing a Pi into a SNES case.

Parts:
Raspberry Pi, model B (Older B, not a B+)
SNES case
Mauseberry power switch (http://mausberry-circuits.myshopify.com/collections/frontpage/products/shutdown-circuit-use-your-own-switch)

I still need:
HDMI panel mount
Ethernet panel mount
4 port USB hub (to stuff into cart slot)
Various jumpers to move signals around the system

I'm still torn between wiring SNES controller ports to the GPIO and using the original ports or just using a SNES->USB adapter and mounting those ports into the proper place.  Either way I want it to use SNES controllers, not USB ones.  I don't like the look of USB ports on the front of a retro console.  I'm also considering just using wireless 360 controllers since I've got the 360 wireless dongle and that works on the Pi.

Dismantled the SNES into component parts and spent about half an hour with some abrasive scrubbies cleaning it.  Got it looking pretty darn good.

Gonna use the power switch that is original to the SNES, the reset mech needed to be reworked though.  Ground down the mech that was under the switch and just glued a standard microswitch in place.  Works just fine.

(http://forum.arcadecontrols.com/index.php?action=dlattach;topic=136713.0;attach=334532;image) (http://forum.arcadecontrols.com/index.php?action=dlattach;topic=136713.0;attach=334531;image)

Currently have a single player SNES->USB adapter that I shaved down a little to fit into the front plate of the console.
(UPDATE) Decided against doing this and wired the real ports to the GPIO - Post below.

I'll be attaching photos to this post later tonight.
Title: Re: R-Pi SNES retro console project
Post by: Slippyblade on May 21, 2015, 09:55:22 pm
Having problems with the Mauseberry power circuit...

Got it yesterday and wired it up to the power and reset switch.  The reset switch fires an immediate hard reset, so that works.  Tried to install the script from Mauseberry's website and it borked.  Turns out that their script is trying to use some directories that don't exist in the Retropie distro I am using.  Since I am new to Bash I'm not entirely sure what the setup script is trying to do so I am looking at other options.  Found a nice Python script that should work and installed it - no good.  It choked trying to use the GPIO library, apparently the Python GPIO library isn't installed in this distro.  No problem - grab the library and install it...  Security error now.  Ugh.

Losing my mind now.

Just as a test, I do a vanilla install of Raspbian using NOOBS.  Run the Mausberry scripts and...  it works just fine.

So - looks like I get to learn Bash a little better and figure out how to modify these scripts to work with Retropie.

Oh my god...  I'm a dumb ass.  The setup instructions have 3 different scripts for 3 different distros.  When I was trying to get it working with Retropie I was using the WRONG flavor.  When I plugged in Raspbian, I used the correct flavor.  I just used the proper flavor and...  TADA!  it works just fine.
Title: Re: R-Pi SNES retro console project
Post by: Locke141 on May 22, 2015, 06:20:07 am
You may want to try the DietPi RetroPie build. It use's a strict down versions of Raspbian for quicker boot times and better performance. It also comes with a good front end for console games. There is a step by step here (http://fuzon.co.uk/phpbb/viewtopic.php?f=8&t=8&p=8&hilit=retropi#p8).

You could use the Teensy USB Dev Board like ChanceKJ did in his Super PlayChoice (http://forum.arcadecontrols.com/index.php/topic,138341.0.html). But if I was you I would just try a NES to usb adapter cable (http://www.amazon.com/RetroBit-Adapter-Controller-Nintendo-Entertainment-System/dp/B004L5KHKS/ref=pd_sim_63_5?ie=UTF8&refRID=028SYTW69FP9GNH9YD4A) for the original NES ports and the 360 USB wifi thing internally for playing all the console games that have more then two buttons. 

What are you going to do with the guts of that NES?
   
Title: Re: R-Pi SNES retro console project
Post by: Slippyblade on May 22, 2015, 05:49:13 pm
I'll definately look into that build, thanks.

I'm using an SNES, not an NES.  But the board is literally fried.  I used to manage a GameStop and picked up dead systems.  This one had a banana smashed into the cart slot, the board literally smoked out when they tried to turn it on.  :)
Title: Re: R-Pi SNES retro console project
Post by: Locke141 on May 23, 2015, 01:09:27 am
I used to manage a GameStop and picked up dead systems.

Thats sweet. Do you have a huge collections of rare stuff as well? I know a guy who worked at a game store that would buy things like NEOGEO pockets from customer that came into sell them because it was not on the stores buy list.
Title: Re: R-Pi SNES retro console project
Post by: Slippyblade on May 23, 2015, 01:30:26 am
Nah, I wish.  I was in a crap store in Phoenix, so we didn't really see any good stuff.  I've sold off most of the stuff that worked.  Just have a few NES's and a couple SNES's left with dead boards.  Once I get this working I'm gonna duplicate it as gifts for some friends.
Title: Re: R-Pi SNES retro console project
Post by: Locke141 on May 24, 2015, 01:03:41 am
Don't know how you plan on setting up the other R-pie's after this one but thought you may want to look at some app's that make cloning a SD card for the Pi a snap.

http://ivanx.com/raspberrypi/ (http://ivanx.com/raspberrypi/)

http://www.tweaking4all.com/hardware/raspberry-pi/macosx-apple-pi-baker/ (http://www.tweaking4all.com/hardware/raspberry-pi/macosx-apple-pi-baker/)

You don't need any special software but these make it quick and simple to do.
Title: Re: R-Pi SNES retro console project
Post by: Locke141 on June 24, 2015, 12:05:29 am
So? Did you ever get to this?
Title: Re: R-Pi SNES retro console project
Post by: Slippyblade on June 24, 2015, 01:27:18 am
Yeppers, I've just been busy with work and RL stuff and haven't had time to upload pics and such.  Will do so this week.
Title: Re: R-Pi SNES retro console project
Post by: Locke141 on June 24, 2015, 02:50:14 am
 :cheers:

Title: Re: R-Pi SNES retro console project
Post by: DaOld Man on July 16, 2015, 02:37:49 am
Bump.
Im about to get started on my NES Pi project.
Some more pics of your work would be nice.
Title: Re: R-Pi SNES retro console project
Post by: Slippyblade on July 16, 2015, 02:40:51 am
Pics, yes.  Sorry.  I've been trying to finish up a bartop for my son and have been beating my head against a wall.  Will get some pics on this as soon as I can.
Title: Re: R-Pi SNES retro console project
Post by: DaOld Man on July 16, 2015, 02:43:28 am
No rush man, I was just afraid you had forgotten about it.
Title: Re: R-Pi SNES retro console project
Post by: Slippyblade on July 16, 2015, 02:56:14 pm
Nope, it's sitting on my bench like an open faced sandwich actually.  I just need to get the controller ports wired up to the Pi properly and it'll be done.
Title: Re: R-Pi SNES retro console project
Post by: DaOld Man on July 17, 2015, 11:04:48 am
I have ordered a mausberry power switch.
I am thinking of using the original NES power connector and a 5VDC 3 amp wall wart.
However, I am also considering a molded two conductor connector mounted in the case, and a 120 VAC cord (like on most dvd players, etc.), putting the 5 VDC power supply inside the NES case.
About that mausberry thingy. I understand how it shuts down the RPi when the switch is flipped, but whats going to happen if power fails or someone unplugs the power while the game is on?
Is there a chance of corrupting the SD card on the RPi?
Title: Re: R-Pi SNES retro console project
Post by: Slippyblade on July 17, 2015, 03:50:05 pm
Not entirely sure, I'm thinking that the Mausberry switch would see it as a power cycle signal and start the shutdown.  If it is the same internal circuit I've seen elsewhere it uses a capacitor as a timer to power down...
Title: Re: R-Pi SNES retro console project
Post by: DaOld Man on July 20, 2015, 09:26:57 am
But unless there is a power backup, such as a rechargeable battery or a pretty big capacitor, when the incoming power fails I wouldn't think the circuit would have time to properly shutdown the RPi.
Title: Re: R-Pi SNES retro console project
Post by: Slippyblade on July 20, 2015, 01:22:16 pm
There is that.  Hmm...  I wonder if I could got an old cordless phone with battery and charge circuit.  Put that inline with the power switch.  Have the Pi pull from the batter all the time, but have the charger topping the  battery at all times.
Title: Re: R-Pi SNES retro console project
Post by: DaOld Man on July 20, 2015, 03:14:14 pm
That might work. Also the PiGrrl (a pi in a 3d printed Gameboy case), uses a 3.3 volt battery and a circuit to step it up to 5 volts, and I think the circuit charges the battery when plugged in also. (If I am understanding correctly).

https://learn.adafruit.com/pigrrl-raspberry-pi-gameboy/overview

That could be the way to go to, however I was thinking a big capacitor that can power the pi long enough to shut down properly.
Maybe when my mauseberry circuit gets here I can experiment with it.
I think I read somewhere that just cutting the power to the pi can corrupt the sd card. Am I out in the weeds on this?
Title: Re: R-Pi SNES retro console project
Post by: Slippyblade on July 20, 2015, 03:20:59 pm
Well, arbitrarily cutting power can corrupt ANY OS.  Even the Windows/OSX/Linux computer you are using right now.  Yanking power from any comp is bad ju-ju.  :)

It's very possible, but also not extremely likely.
Title: Re: R-Pi SNES retro console project
Post by: DaOld Man on July 20, 2015, 03:27:45 pm
Well, arbitrarily cutting power can corrupt ANY OS.  Even the Windows/OSX/Linux computer you are using right now.  Yanking power from any comp is bad ju-ju.  :)

It's very possible, but also not extremely likely.

True, thats why all my builds do not cut power to the PC to turn off.
Title: Re: R-Pi SNES retro console project
Post by: pbj on July 20, 2015, 04:48:30 pm
You can turn off a DOS based MAME machine at will. 

My experience with Raspberry Pi has shown that the OS is very easily corrupted if you don't use a Read-Only environment or go through the shutdown process.  It's quite disappointing, honestly.

Title: Re: R-Pi SNES retro console project
Post by: DaOld Man on July 22, 2015, 10:56:58 am
This could be a dilemma in the console based Pi because of the high possibility of just unplugging the console instead of powering down first.
This may be worth some research time.
Title: Re: R-Pi SNES retro console project
Post by: blacketj on July 22, 2015, 11:31:16 am
Here is a different power switch add-on that I think does exactly what you want.  They are being sold on Tindie, but are currently out of stock.  I'm hoping to pick one up whenever they are available again.

Check the video demo at the bottom of the page
http://blog.petrockblock.com/2015/07/04/powerblock-another-power-switch-for-the-raspberry-pi/ (http://blog.petrockblock.com/2015/07/04/powerblock-another-power-switch-for-the-raspberry-pi/)
Title: Re: R-Pi SNES retro console project
Post by: DaOld Man on July 22, 2015, 04:19:53 pm
I don't see where this will properly shutdown the Pi if power fails or plug is pulled. Am I missing something?
Title: Re: R-Pi SNES retro console project
Post by: blacketj on July 22, 2015, 04:25:39 pm
You are right. It doesn't help with those cases.
I was thinking this thread was just looking for power circuit that could use a toggle type power switch found on most retro consoles.


Title: Re: R-Pi SNES retro console project
Post by: DaOld Man on July 22, 2015, 05:16:03 pm
I was thinking this thread was just looking for power circuit that could use a toggle type power switch found on most retro consoles.

 :cheers:
Title: Re: R-Pi SNES retro console project
Post by: Peabo on July 29, 2015, 09:40:38 am
What would be useful is if one of the GPIO pins could be used like soft power switch.  On a Windows based pc, you can hit the momentary power switch and the OS will get that signal from the BIOS and issue a shutdown command.  Can the same thing be done in Raspian? 
Title: Re: R-Pi SNES retro console project
Post by: Slippyblade on July 29, 2015, 01:00:13 pm
Yes, Peabo.  Also the Mauseberry switch we were talking about will cut the power after it issues the halt command.
Title: Re: R-Pi SNES retro console project
Post by: Peabo on July 29, 2015, 01:46:42 pm
I looked up the Mauseberry switch, but wouldn't that interfere with the Adafruit GPIO software that I'm currently using for the input? 

http://mausberry-circuits.myshopify.com/collections/frontpage/products/shutdown-circuit-use-your-own-switch (http://mausberry-circuits.myshopify.com/collections/frontpage/products/shutdown-circuit-use-your-own-switch)

I'm guessing another software module(driver for lack of a better term) needs to be running for this type of switch to work?
Title: Re: R-Pi SNES retro console project
Post by: Slippyblade on July 29, 2015, 01:58:06 pm
Without knowing what you are talking about from Adafruit, no clue.  Any physical shutdown switch is gonna need two GPIO pins though, at the very least a ground pin and a signal pin.  The ground could be shared with other stuff though.  And yes, some sort of script needs to be running.  Whether it's a bash script, some other script, or an actual deamon is up to you.
Title: Re: R-Pi SNES retro console project
Post by: Peabo on July 29, 2015, 03:54:05 pm
It's the Adafruit Retrogame utility found on this page:  https://learn.adafruit.com/retro-gaming-with-raspberry-pi/buttons
Title: Re: R-Pi SNES retro console project
Post by: DaOld Man on August 03, 2015, 06:11:23 am
I thought about using NES USB controllers on my Frankenstein project, but I dunno. Am thinking about going with the original NES controllers, only problem is that I don't know how the original NES controllers will work with a SNES emulator. I know the USB SNES controllers will work with NES and SNES, but not sure about vice-versa.
By using USB, I can switch between the two.
Decisions decisions.
Title: Re: R-Pi SNES retro console project
Post by: mvolke1 on August 21, 2015, 06:09:19 pm
Just some ideas...

http://www.iphoneincanada.ca/deals/nes30-bluetooth-gaming-back/ (http://www.iphoneincanada.ca/deals/nes30-bluetooth-gaming-back/)

http://www.amazon.com/ibuffalo-Button-Digital-Rapid-Japan/dp/B000TW9AFU/ref=sr_1_fkmr0_3?s=sporting-goods&ie=UTF8&qid=1440194724&sr=8-3-fkmr0&keywords=nes+four+button+usb+controller (http://www.amazon.com/ibuffalo-Button-Digital-Rapid-Japan/dp/B000TW9AFU/ref=sr_1_fkmr0_3?s=sporting-goods&ie=UTF8&qid=1440194724&sr=8-3-fkmr0&keywords=nes+four+button+usb+controller)

I used the SNES with my console. Doesn't bother me. But these would get you closer to the NES look.


Title: Re: R-Pi SNES retro console project
Post by: Slippyblade on August 21, 2015, 06:15:57 pm
Did some more work on this beast the other day.  Got the original SNES game ports wired up to the GPIO pins.  Player one works like a dream now.  One of the super generic off-brand controllers I had misbehaved in a weird way, but the other off-brand and the OG SNES controller both work great.  I took the build over to a get together at a friend's house last night and hooked it up...  it was being played all night by an assortment of people.  Made me so proud.
Title: Re: R-Pi SNES retro console project
Post by: Locke141 on August 22, 2015, 08:52:22 am
Is there a proper build thread for this, that I'm missing? I don't see any pic's above.
Title: Re: R-Pi SNES retro console project
Post by: Slippyblade on August 22, 2015, 01:28:39 pm
That's cause I'm lazy and bad with a camera.  Sorry - I'll get some soon.
Title: Re: R-Pi SNES retro console project
Post by: Slippyblade on August 25, 2015, 07:32:05 pm
Major update!

Mausberry power switch wired up to the switches.  The slider switch is the original switch.  It mounts on a pair of studs and mates into the recess seen on the right (white square).  The reset switch housing I ground down and hot glued in a microswitch.  Slider is wired as power, reset is wired as reset.  The white and blue wires plug into the Pi.

(http://forum.arcadecontrols.com/index.php?action=dlattach;topic=136713.0;attach=334537;image)

I decided I wanted things to be as simple as possible, so I am only breaking out power and hdmi.  Can't really see the power port in the pic though, sorry.  It's a standard two pin connector, round-round.  The HDMI is not on the same plate due to mounting issues

(http://forum.arcadecontrols.com/index.php?action=dlattach;topic=136713.0;attach=334529;image)

Inside that power connector is screwed on to a punch out plate that I made from some scrap plastic which was then hot glued (god I love that stuff) into position.  The cord was then routed around to a decased USB wall wart.  I pulled it out of the casing to make mounting easier.  When it is all assembled there is a small USB jumper that connects this board to the Mausberry power circuit.

(http://forum.arcadecontrols.com/index.php?action=dlattach;topic=136713.0;attach=334535;image)
(http://forum.arcadecontrols.com/index.php?action=dlattach;topic=136713.0;attach=334533;image)

The RetroPie image has a GPIO driver called GameCon already loaded.  It uses a kernel level routine to read gamepad input, with far less lag than a user space driver.  It has to be activated though, and it required my Pi to have completely updated firmware.  Not a problem though, just another command line and some waiting.  Right now the system is only wired for Player 1.  Player 2 actually just splits most of those connections, there is only one wire for P2 that goes directly to the Pi, the data line.  I just need to splice some jumpers between P1 and P2 for the clock, latch, power, and ground.  Then some shrink tube and all is good.

(http://forum.arcadecontrols.com/index.php?action=dlattach;topic=136713.0;attach=334539;image)
(http://forum.arcadecontrols.com/index.php?action=dlattach;topic=136713.0;attach=334541;image)

Everything I've got here has been tested and works - took the half assemble beast to a gathering the other day and it was played for hours.

Title: Re: R-Pi SNES retro console project
Post by: yotsuya on August 25, 2015, 08:20:50 pm
Major update!

Mausberry power switch wired up to the switches.  The slider switch is the original switch.  It mounts on a pair of studs and mates into the recess seen on the right (white square).  The reset switch housing I ground down and hot glued in a microswitch.  Slider is wired as power, reset is wired as reset.  The white and blue wires plug into the Pi.

(http://forum.arcadecontrols.com/index.php?action=dlattach;topic=136713.0;attach=334537;image)

I decided I wanted things to be as simple as possible, so I am only breaking out power and hdmi.  Can't really see the power port in the pic though, sorry.  It's a standard two pin connector, round-round.  The HDMI is not on the same plate due to mounting issues

(http://forum.arcadecontrols.com/index.php?action=dlattach;topic=136713.0;attach=334529;image)

Inside that power connector is screwed on to a punch out plate that I made from some scrap plastic which was then hot glued (god I love that stuff) into position.  The cord was then routed around to a decased USB wall wart.  I pulled it out of the casing to make mounting easier.  When it is all assembled there is a small USB jumper that connects this board to the Mausberry power circuit.

(http://forum.arcadecontrols.com/index.php?action=dlattach;topic=136713.0;attach=334535;image)
(http://forum.arcadecontrols.com/index.php?action=dlattach;topic=136713.0;attach=334533;image)

The RetroPie image has a GPIO driver called GameCon already loaded.  It uses a kernel level routine to read gamepad input, with far less lag than a user space driver.  It has to be activated though, and it required my Pi to have completely updated firmware.  Not a problem though, just another command line and some waiting.  Right now the system is only wired for Player 1.  Player 2 actually just splits most of those connections, there is only one wire for P2 that goes directly to the Pi, the data line.  I just need to splice some jumpers between P1 and P2 for the clock, latch, power, and ground.  Then some shrink tube and all is good.

(http://forum.arcadecontrols.com/index.php?action=dlattach;topic=136713.0;attach=334539;image)
(http://forum.arcadecontrols.com/index.php?action=dlattach;topic=136713.0;attach=334541;image)

Everything I've got here has been tested and works - took the half assemble beast to a gathering the other day and it was played for hours.
Nice job,  Slippy!
Title: Re: R-Pi SNES retro console project
Post by: Slippyblade on August 25, 2015, 08:24:05 pm
Thanks.  After Lock141's little jab, I figured I needed some actual documentation.
Title: Re: R-Pi SNES retro console project
Post by: Vigo on August 27, 2015, 12:01:41 pm
Looking Good! Right on for using the original ports. It's the only way to fly. :cheers:

I wish the Pi was around when I did my SNES, you have so much case room to work with and no concerns about overheating. Probably will boot faster, too!

Just out of curiosity, did you think of the microswitch for the reset switch off of my build, or did you come to the same solution as I did, independently?

Keep the hot glue going!  8)
Title: Re: R-Pi SNES retro console project
Post by: Slippyblade on August 27, 2015, 02:24:42 pm
Honestly Vigo, I thought it was original...  But I just went back and re-read your SNES thread and yep - it started triggering all kinds of bells.  So yeah, I think I sub-consciously used your idea.  It works great though!
Title: Re: R-Pi SNES retro console project
Post by: Vigo on August 27, 2015, 02:37:43 pm
 :cheers: Ah you know, great minds think alike, and we are probably resourceful in the same way. I am guessing neither of us are short of microswitches to use for every project.

You do good work. If I end up updating mine, I will probably be taking a queue right from your build.

Did you just turn the eject button into a dummy plug?
Title: Re: R-Pi SNES retro console project
Post by: Slippyblade on August 27, 2015, 04:23:52 pm
Thank you, I appreciate the compliment.  :)

As far as the eject goes, I cut off a lot of the internally projecting bits and the main part is held in place with a couple drops of super glue.  I wanted the outside to remain as original as possible.  I'm debating whether to wire up another microswitch to the eject lever and use that as an "Exit Emulator" switch.

I also intend to mount a USB port and possible an Ethernet breakout into the cart slot under the spring flap.
Title: Re: R-Pi SNES retro console project
Post by: Locke141 on August 29, 2015, 02:31:48 am
Thanks.  After Lock141's little jab, I figured I needed some actual documentation.

I really wanted to see what you did. It sounded cool and now we can see that it looks great. :cheers:
Title: Re: R-Pi SNES retro console project
Post by: severdhed on September 03, 2015, 10:18:31 pm
looking good so far.  i'd like to see how you handle the eject button