Famicom (not Mini) build (WIP)
-
So non-momentary switch it is.
So this script is useless?'#!/bin/bash #this is the GPIO pin connected to the lead on switch labeled OUT GPIOpin1=23 #this is the GPIO pin connected to the lead on switch labeled IN GPIOpin2=24 echo "$GPIOpin1" > /sys/class/gpio/export echo "in" > /sys/class/gpio/gpio$GPIOpin1/direction echo "$GPIOpin2" > /sys/class/gpio/export echo "out" > /sys/class/gpio/gpio$GPIOpin2/direction echo "1" > /sys/class/gpio/gpio$GPIOpin2/value while [ 1 = 1 ]; do power=$(cat /sys/class/gpio/gpio$GPIOpin1/value) if [ $power = 0 ]; then sleep 1 else sudo poweroff fi done
-
@FlyingTomahawk i am assuming that it wont work for you. Im not familiar with the mausberry though.
-
Yeah, script seems to be not working with my current setup.
Here pics of the current switch and setup.
I also have a PowerBoost 500 which I think can also be used to switch ON/OFF a RPi right?
At least it is used here in this Pi Zero in a SNES controller build. -
UPDATE
I tried the Mausberry switch on my RPi 3 this time and who would have thought it does work. So it looks like that the Mausberry or/and Mausberry script won't work with my Pi Zero.
Guess I'll have to figure out a different way then. -
Good to see you're back on the project! I thought maybe a mountain of Gameboys crushed you during a recent trip to Hard-On! ;)
You said you have a PowerBoost 500C in the mix. Where is that in the circuit? I don't see it in your photos? I'm pretty sure the Zero in a controller build you linked to is just using the switch to cut power to the Pi. It's not triggering a soft shutdown like the Mausberry is.
The switch you have is not a momentary switch. It's a "latching switch" in that you flip it to one position and it stays there. That said, the Mausberry will automatically detect if the switch is a momentary one or a latching one. That's all taken care of in hardware, so the script is not the issue.
The script is really just detecting the state of the GPIO pins and when one drops in voltage due to the Mausberry not sending current anymore, it triggers a shutdown command.
You said that it works with a Pi 3, so we assume that the Mausberry itself is "good", and while I've not tried one with a Zero, I don't see why it wouldn't work, unless the GPIO pins are either configured differently in your build (I don't think so) or that something is not being detected properly.
I'm thinking that the best way to troubleshoot this would be to tweak the script to do something else instead of
sudo poweroff
or to somehow monitor the state of the GPIO pins. I'm not a programming or hardware wizard, so I'll have to think on it a bit, and it's not quite 7 AM yet.To confirm that your script isn't wonky, this is the working script that I just copied from my Genesis USB hub Pi. Granted, that's with a Pi 3, but still.
#!/bin/bash #this is the GPIO pin connected to the lead on switch labeled OUT GPIOpin1=23 #this is the GPIO pin connected to the lead on switch labeled IN GPIOpin2=24 echo "$GPIOpin1" > /sys/class/gpio/export echo "in" > /sys/class/gpio/gpio$GPIOpin1/direction echo "$GPIOpin2" > /sys/class/gpio/export echo "out" > /sys/class/gpio/gpio$GPIOpin2/direction echo "1" > /sys/class/gpio/gpio$GPIOpin2/value while [ 1 = 1 ]; do power=$(cat /sys/class/gpio/gpio$GPIOpin1/value) if [ $power = 0 ]; then sleep 1 else sudo poweroff fi done
I really think it's a matter of the GPIO not being detected properly, not that the Mausberry is being weird.
-
Well if the mausberry can detect the difference between momentary and non momentary then we should assume thats not the problem, then if the pi3 works fine witht he same switch, it would seem likely that the zero isnt maintaining the same logic on the gpio when its off as the pi3.
as most of these things work by shorting a pin to ground, you may want to take a digital multi meter and make sure that the pin on the pi zero stays shorted to ground when its powered off.
-
I think that it seems fun!
-
Hey! It is so good to see that you are still around.
Yeah, I totally neglected this build. I guess waiting over 2 months for the Mausberry killed it. I kept working on my Futura theme and also got into other things like eGPU stuff.
Got me a GTX660 and connected it to my Laptop and now I started to replay all the games I could never play on Ultra settings. Skyrim, Sniper Elite V2, Mass Effect 1-3 I tell you gaming can be sooooo time consuming.Anyways, back on topic.
I am not sure what exactly went wrong. As you guys say the Mausberry works with the RPi 3. I will try to solder the GPIO pins tomorrow so that I can just plug in the two cables that came with the Mausberry. Maybe my soldering work was not good?
Still I didn't wanna stop there and leave the stuff otherwise I might not continue to work on it again. So I took all my parts and start to put them into the Famicom and here is the result. She ain't a beauty but it does work and besides I still got a few more Famicoms here to improve. The controllers can only be charged if the Pi is running. Wish there was a sleep mode like the PS4 has where you can keep charging the controllers. Here pics....
-
that retropie logo is sweet, where did you get it ?
-
I got it from the Splashscreens section in the RetroPie Settings menu. Just download the extra splashscreens.
https://github.com/RetroPie/RetroPie-Setup/wiki/Splashscreen
-
@FlyingTomahawk How did you get the clock to show up in the bottom corner?
-
@lilbud said in Famicom (not Mini) build (WIP):
@FlyingTomahawk How did you get the clock to show up in the bottom corner?
lol. that's a TV feature not RPi feature. ;-)
-
@FlyingTomahawk What kind of tv does that? My TV struggles with overscan, no friggin way mine has a clock.
-
It's a Sharp TV. We have 2 Sharp TVs and both can display that clock on the bottom-right.
-
Back at it again...
Today I soldered the 40 pin thing into the Pi Zero just to make sure that it was not my soldering work that causes the issue.Test 1 -> Success!
At first it looked like my solder work was sloppy after all.... BUT...
After I assembled everything back together I gave it another try and the issue appeared again. Back to square one.
So we know the Mausberry is working.
We know it did work with the setup in the image above.
So what could it be... I start to remove cables and keep testing till I found it.The adapter cable male to female micro USB (yellow arrow) that I use to is the culprit.
If I plug the power cable directly into the Pi all works like it suppose to but if I use that adapter cable it won't work.
I am technically not versed and don't know why that adapter cable can cause such an issue.
For now I will keep the silver power cable connected directly so that I can use the Mausberry. I will have to find a different adapter cable but even then no guarantees that it works.If someone has a link to such a cable please share, thanks.
-
@FlyingTomahawk woo hoo! I'm glad your troubleshooting helped you identify the problem component.
With extensions and adapters sometimes there can be a problem with voltage drop, or just crappy materials.
If you connect a multimeter up to your 5V GPIO pin and ground, are voltages different with the black cable vs the silver? I'm wondering if the black one is fluctuating or something bizarre like that.
-
Ok, scratch that. It wasn't the cable. :-/
I have a new theory now. It could be that the Famicom switch touched the Pi Zero which is just underneath it. I taped the switch and now it works.
So yesterday it was sloppy soldering and today it was sloppy packing into the Famicom.
I am glad it finally worked, at least for now.But there is one last issue left to though.
The SNES emulator runs like shit on a Pi Zero. I overclocked it and added a heat sink according to ETA Primes youtube tutorial but still no luck.
If I use the PiSNES emulator it does run smooth but it won't recognize my second 8 bitdo controller. So in short I can either have a laggy SNES with 2 players or smooth running SNES with 1 player only.NES, MegaDrive and Gameboy Advance run good as they should. No issues there.
-
The SNES emulator runs like shit on a Pi Zero.
Good thing you have a Pi 3…
Any way you can fit that in the case?
-
Yeah I have one but I need that for NeoGeo and Capcom stuff, speaking of which wonder when ruckage is releasing that awesome theme of his.
I will buy a new RPi 3 as soon as possible. I am sure it'll fit in there somehow.
Is there any new Pi coming out anytime soon? Not that I buy a Pi 3 only to be surprised by a new release few days later.Oh and btw. there was only a slight voltage drop with or without adapter cable.
5.03 vs 5.21
-
@FlyingTomahawk They usually announce new models in February for the Pi anniversary, but I remember reading that they weren't planning on an upgrade to the Pi 3 for a while and they were focusing on software for a bit to make it more robust. I'd say you're safe with a 3 for now. If I were making a home console today that's what I would use.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.