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

Retroflag NESPi Case - Soft Power & Reset Hack

Scheduled Pinned Locked Moved Projects and Themes
nespiretroflagsoft shutdowntutorial
151 Posts 38 Posters 90.9k 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.
  • Y
    Yahmez
    last edited by Yahmez 12 Feb 2017, 01:51 20 Aug 2017, 17:39

    Hey guys,

    Thought I'd share this little tutorial I made for adding soft shutdown and reset to the awesome Retroflag NESPi case.

    https://drive.google.com/file/d/0B9AzTQWe_cTFem1JS01HVU1GMDg/view?usp=sharing

    If you end up doing this mod, be sure to check out @meleu graceful ES shutdown method here: https://retropie.org.uk/forum/topic/12895/ensuring-es-gracefully-finish-and-save-metadata-in-every-system-shutdown

    Enjoy!

    R X Z P I 5 Replies Last reply 2 Sept 2017, 15:13 Reply Quote 7
    • C
      cyperghost
      last edited by 20 Aug 2017, 20:38

      @yahmez That's a good one.
      Proper shutdown can be provided by these scripts here

      Y 1 Reply Last reply 21 Aug 2017, 01:06 Reply Quote 1
      • Y
        Yahmez @cyperghost
        last edited by 21 Aug 2017, 01:06

        @cyperghost In the tutorial linked, I provided a script specifically for this mosfet switch application.

        C 1 Reply Last reply 21 Aug 2017, 04:16 Reply Quote 0
        • C
          cyperghost @Yahmez
          last edited by 21 Aug 2017, 04:16

          @yahmez A checked your profile ;) You are a new member.
          Welcome on board mate! And thank you for your nice posting about modding switches.

          About the shutdown scripts... ES got the habit to not save metadata if it is not proper shutdowned. If you just perform a system reboot via SSH command or type killall emulationstation then indeed ES is closed but no metadata is saved. Metadata are those XML files that are used to store scraped data AND since ES 2.4.1 to save favorites and last played games. So it is important to have "Save metadata on exit" enabeled and to perform proper shutdowns.

          You can get into touch with the topic by starting here

          Script version 1.59 is the latest ...
          So you have to change it a bit if you want to do a reboot via your switch but you will find out ;)

          At this point I want to introduce @meleu, he's a well experienced coder and moreover a nice and friendly guy.

          Y 1 Reply Last reply 21 Aug 2017, 12:01 Reply Quote 1
          • Y
            Yahmez @cyperghost
            last edited by 21 Aug 2017, 12:01

            @cyperghost
            Thanks for explaining that to me as I did not realize there were issues with saving the metadata. I'll look into fixing this in my python script.

            Thank you!

            1 Reply Last reply Reply Quote 1
            • S
              s33d1ing
              last edited by 1 Sept 2017, 00:08

              @Yahmez Thanks this is exactly what I was looking for!

              Y 1 Reply Last reply 10 Sept 2017, 00:31 Reply Quote 1
              • R
                Renegade_R @Yahmez
                last edited by 2 Sept 2017, 15:13

                @yahmez Thanks for the very comprehensive tutorial, I am wondering, is there an alternative to using the momentary switch board for more somewhat common parts? Getting that board delivered to me would cost more than the NESPI case itself.

                Y 1 Reply Last reply 10 Sept 2017, 00:36 Reply Quote 0
                • M
                  mike17855
                  last edited by 4 Sept 2017, 04:01

                  Has the shut down script been updated in the walk through? With the 1.59 script noted above?

                  Y 1 Reply Last reply 10 Sept 2017, 00:34 Reply Quote 0
                  • D
                    DaminouTav
                    last edited by DaminouTav 9 Apr 2017, 10:05 4 Sept 2017, 08:43

                    Thanks @Yahmez !
                    I will receive my NesPi case at the end of september and will test that.
                    If I understand well, when you press Power, it sends an order to Raspberry via GPIO (and we can do what we would like with it, in this case a properly shutdown) and then, hard power off raspberry ? The mofset knows when it have to hard power off via "On Control" => When raspberry is off, GPIO is off then mofset can hard power off ? Am I right ? :)
                    I'm not sure to understand very well how it works in fact ^^

                    C Y 2 Replies Last reply 4 Sept 2017, 19:48 Reply Quote 0
                    • C
                      cyperghost @DaminouTav
                      last edited by 4 Sept 2017, 19:48

                      @daminoutav I tried to explaind the function shema here

                      D 1 Reply Last reply 4 Sept 2017, 20:35 Reply Quote 0
                      • D
                        DaminouTav @cyperghost
                        last edited by 4 Sept 2017, 20:35

                        @cyperghost Thanks :)

                        1 Reply Last reply Reply Quote 0
                        • D
                          DaminouTav
                          last edited by 5 Sept 2017, 06:41

                          And what happens when we press "Reset" ?

                          C 1 Reply Last reply 5 Sept 2017, 18:17 Reply Quote 0
                          • C
                            cyperghost @DaminouTav
                            last edited by 5 Sept 2017, 18:17

                            @daminoutav Well...
                            Then happens whatever you want....
                            Remove the NesPi connector from it's original place and connect it to a free GPIO together with a pullup resistor .... then if you press reset you can

                            1. Restart ES
                            2. Restart the whole Pi
                            3. Send an eMail
                            4. Make a Screenshot.....
                            1 Reply Last reply Reply Quote 0
                            • D
                              DaminouTav
                              last edited by DaminouTav 9 May 2017, 20:45 5 Sept 2017, 19:45

                              @cyperghost Yeah in fact I meant "what happens on mofset aide". Because with power button it's shutdown Rpi which doesn't keep HIGH on gpio control, then mofset hard power off. When a reset is sent to the pi, gpio control can't be maintain anymore, and mofset should hard power off Rpi. How can it distinguish a power off and a reset ?

                              C 1 Reply Last reply 5 Sept 2017, 20:52 Reply Quote 0
                              • C
                                cyperghost @DaminouTav
                                last edited by cyperghost 9 May 2017, 22:04 5 Sept 2017, 20:52

                                @daminoutav As @Yahmez cut the traces off the switches they work independent. On the mosfet side with reset and evenpower buttons happens nothing ;) Because they are not connected to the mosfet.... only the "POWER CONTROL" GPIO is directly connected to the mosfet and keeps the state on/off.

                                So you have power switch connected to GPIO X and reset to GPIO Y.
                                So the Pie "knows" which button is pressed and initiates different actions ;)

                                The original NesPi makes use of the reset buttons but that is an dirty reset method. Better use the software possibilities ;) RetroPie (better EmulationsStation) is able to perform proper Pie restarts, Pie shutdowns and ES restarts with a few tricks....

                                D B Y 3 Replies Last reply 6 Sept 2017, 06:08 Reply Quote 0
                                • D
                                  DaminouTav @cyperghost
                                  last edited by DaminouTav 9 Jun 2017, 07:10 6 Sept 2017, 06:08

                                  @cyperghost ooh okay I understand :D thanks for explanations ! (And shame on me, I use Retropie competitor aha I tried it 2 years ago but I didn't like, have to test it again)

                                  1 Reply Last reply Reply Quote 0
                                  • B
                                    bjose2345 @cyperghost
                                    last edited by bjose2345 9 Jun 2017, 19:59 6 Sept 2017, 18:57

                                    @cyperghost I have a doubt hope you maybe can help me there, im looking to use the reset button and programmed to trigger like if was a keyboard presses, somehitng like this

                                    http://www.rcjoycon.com/cpjexr/

                                    but for a GPIO solution, i saw it in this video

                                    Any help any guide any suggest woul help me a lot, many thanks

                                    C 1 Reply Last reply 6 Sept 2017, 19:44 Reply Quote 0
                                    • C
                                      cyperghost @bjose2345
                                      last edited by cyperghost 9 Jun 2017, 20:59 6 Sept 2017, 19:44

                                      @bjose2345 Sorry I've no clue what is done here....
                                      There is a binary from adafruit that simulates keypresses via GPIO - I think that will work. Google is your friend...

                                      Got it: https://learn.adafruit.com/retro-gaming-with-raspberry-pi/configuring-retrogame

                                      B 1 Reply Last reply 7 Sept 2017, 16:45 Reply Quote 0
                                      • B
                                        bjose2345 @cyperghost
                                        last edited by 7 Sept 2017, 16:45

                                        @cyperghost Many thanks, i will look at this.

                                        1 Reply Last reply Reply Quote 0
                                        • Y
                                          Yahmez @cyperghost
                                          last edited by 10 Sept 2017, 00:28

                                          @cyperghost said in Retroflag NESPi Case - Soft Power & Reset Hack:

                                          @daminoutav As @Yahmez cut the traces off the switches they work independent. On the mosfet side with reset and evenpower buttons happens nothing ;) Because they are not connected to the mosfet.... only the "POWER CONTROL" GPIO is directly connected to the mosfet and keeps the state on/off.

                                          So you have power switch connected to GPIO X and reset to GPIO Y.
                                          So the Pie "knows" which button is pressed and initiates different actions ;)

                                          The original NesPi makes use of the reset buttons but that is an dirty reset method. Better use the software possibilities ;) RetroPie (better EmulationsStation) is able to perform proper Pie restarts, Pie shutdowns and ES restarts with a few tricks....

                                          Not quite. The power button is connected to the mosfet too, so upon pushing the power button it activates the mosfet switch, powering up the pi. It will continue to keep the mosfet on as long as the power switch is on. As the pi boots, it supplies a second 'on signal' to the mosfet but only really matters or does anything when you switch off the power switch. At that point it is keeping the mosfet on until the pi safely shuts down.

                                          1 Reply Last reply Reply Quote 1
                                          • 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.

                                            This community forum collects and processes your personal information.
                                            consent.not_received