RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    Famicom (not Mini) build (WIP)

    Scheduled Pinned Locked Moved Projects and Themes
    famicomfamicom minines
    264 Posts 11 Posters 144.8k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • edmaul69E
      edmaul69 @FlyingTomahawk
      last edited by edmaul69

      @FlyingTomahawk an arcade button is a momentary switch. Both mementary and non momentary can have 2-3 pins. On an arcade momentary button you have n.o. and n.c. Normally open and normally closed. If you wire to the normally open then when you press down it activates. Whe it is depressed (pushed up) it activates the normally closed. Some things require a button being detected pressed when you arent pushing it down. Not very common in an arcade to use the nc.

      FlyingTomahawkF 1 Reply Last reply Reply Quote 0
      • FlyingTomahawkF
        FlyingTomahawk @edmaul69
        last edited by

        @edmaul69

        Thx for explaining.
        So what kind of switch is inside a Famicom? Or SNES?

        edmaul69E 1 Reply Last reply Reply Quote 0
        • edmaul69E
          edmaul69 @FlyingTomahawk
          last edited by

          @FlyingTomahawk the power switch is non momentary. The reset is a momentary. Momentary meaning it only stays activated for a moment. So anything even like keyboard keys or your controller buttons that are only pressed for a moment and not permanent is a momentary switch.

          FlyingTomahawkF 1 Reply Last reply Reply Quote 1
          • FlyingTomahawkF
            FlyingTomahawk @edmaul69
            last edited by

            @edmaul69

            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
            
            
            edmaul69E 1 Reply Last reply Reply Quote 0
            • edmaul69E
              edmaul69 @FlyingTomahawk
              last edited by

              @FlyingTomahawk i am assuming that it wont work for you. Im not familiar with the mausberry though.

              1 Reply Last reply Reply Quote 0
              • FlyingTomahawkF
                FlyingTomahawk
                last edited by FlyingTomahawk

                Yeah, script seems to be not working with my current setup.
                Here pics of the current switch and setup.

                alt text
                alt text

                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.

                1 Reply Last reply Reply Quote 0
                • FlyingTomahawkF
                  FlyingTomahawk
                  last edited by

                  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.

                  obsidianspiderO 1 Reply Last reply Reply Quote 0
                  • obsidianspiderO
                    obsidianspider @FlyingTomahawk
                    last edited by

                    @FlyingTomahawk

                    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.

                    📷 @obsidianspider

                    FlyingTomahawkF 1 Reply Last reply Reply Quote 0
                    • spruce_m00seS
                      spruce_m00se
                      last edited by

                      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.

                      1 Reply Last reply Reply Quote 0
                      • CodeDrawerC
                        CodeDrawer
                        last edited by

                        I think that it seems fun!

                        N64 emulation is the next step :)

                        1 Reply Last reply Reply Quote 0
                        • FlyingTomahawkF
                          FlyingTomahawk @obsidianspider
                          last edited by

                          @obsidianspider

                          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....
                          alt text
                          alt text
                          alt text
                          alt text
                          alt text

                          1 Reply Last reply Reply Quote 0
                          • spruce_m00seS
                            spruce_m00se
                            last edited by

                            that retropie logo is sweet, where did you get it ?

                            FlyingTomahawkF 1 Reply Last reply Reply Quote 0
                            • FlyingTomahawkF
                              FlyingTomahawk @spruce_m00se
                              last edited by FlyingTomahawk

                              @spruce_m00se

                              I got it from the Splashscreens section in the RetroPie Settings menu. Just download the extra splashscreens.

                              rookervik-nintendo.png

                              https://github.com/RetroPie/RetroPie-Setup/wiki/Splashscreen

                              https://github.com/HerbFargus/retropie-splashscreens-extra

                              lilbudL 1 Reply Last reply Reply Quote 1
                              • lilbudL
                                lilbud @FlyingTomahawk
                                last edited by

                                @FlyingTomahawk How did you get the clock to show up in the bottom corner?

                                Creator of the Radiocade: https://retropie.org.uk/forum/topic/6077/radiocade

                                Backlog: http://backloggery.com/lilbud

                                FlyingTomahawkF 1 Reply Last reply Reply Quote 0
                                • FlyingTomahawkF
                                  FlyingTomahawk @lilbud
                                  last edited by

                                  @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. ;-)

                                  lilbudL 1 Reply Last reply Reply Quote 1
                                  • lilbudL
                                    lilbud @FlyingTomahawk
                                    last edited by

                                    @FlyingTomahawk What kind of tv does that? My TV struggles with overscan, no friggin way mine has a clock.

                                    Creator of the Radiocade: https://retropie.org.uk/forum/topic/6077/radiocade

                                    Backlog: http://backloggery.com/lilbud

                                    1 Reply Last reply Reply Quote 0
                                    • FlyingTomahawkF
                                      FlyingTomahawk
                                      last edited by

                                      It's a Sharp TV. We have 2 Sharp TVs and both can display that clock on the bottom-right.

                                      1 Reply Last reply Reply Quote 0
                                      • FlyingTomahawkF
                                        FlyingTomahawk
                                        last edited by FlyingTomahawk

                                        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.

                                        alt text

                                        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.
                                        alt text

                                        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.

                                        obsidianspiderO 1 Reply Last reply Reply Quote 0
                                        • obsidianspiderO
                                          obsidianspider @FlyingTomahawk
                                          last edited by

                                          @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.

                                          📷 @obsidianspider

                                          FlyingTomahawkF 1 Reply Last reply Reply Quote 0
                                          • FlyingTomahawkF
                                            FlyingTomahawk @obsidianspider
                                            last edited by

                                            @obsidianspider

                                            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.

                                            obsidianspiderO 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            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.