Recalbox Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • recalbox.com
    • Gitlab repository
    • Documentation
    • Discord

    Start/Stop Button + GPIO 4-player Controls (Gamecon Driver)

    GamePad/GPIO/USB encoder
    startstop button gpio 4-player controls
    3
    9
    3735
    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.
    • BornDead
      BornDead last edited by

      Re: Start/Stop Button + GPIO Controls
      I´m building a Recalbox inside an old NES case with two original snes ports and two original nes ports and would like to be able to use the original power and reset buttons. I have already set up the controllers and now I would like to add the buttons.

      Would it be possible to use 4-player gamecon when using Start/Stop reset and led?

      There would be a conflict on pin03 and pin05
      Player 5 and reset pin on the same GPIO pin. Player 6 and power pin on the same GPIO pin.

      The two I´m talking about are these:
      https://github.com/recalbox/recalbox-os/wiki/Add-a-start-stop-button-to-your-recalbox-(EN)
      https://github.com/recalbox/recalbox-os/wiki/Gamecon-controllers-(EN)

      alt text

      Substring 1 Reply Last reply Reply Quote 0
      • Substring
        Substring @BornDead last edited by

        @borndead You can edit the power script and change pins

        Former dev - Please reply with @substring so that i am notified when you answer me
        Ex dev - Merci de me répondre en utilisant @substring pour que je sois notifé

        BornDead 1 Reply Last reply Reply Quote 0
        • BornDead
          BornDead @Substring last edited by

          @substring
          Thank you that would be perfect. Where do I find the script file to edit?
          What pins could I change to?

          Substring 1 Reply Last reply Reply Quote 0
          • Substring
            Substring @BornDead last edited by

            @borndead I din't know which pins would ve free once you configured what you need. The script sgould be in /recalbox/scripts

            Former dev - Please reply with @substring so that i am notified when you answer me
            Ex dev - Merci de me répondre en utilisant @substring pour que je sois notifé

            BornDead 2 Replies Last reply Reply Quote 0
            • BornDead
              BornDead @Substring last edited by

              @substring said in Start/Stop Button + GPIO 4-player Controls (Gamecon Driver):

              @borndead I din't know which pins would ve free once you configured what you need. The script sgould be in /recalbox/scripts

              I tried GPIO13 and GPIO19. Reset and power off is working, but power on is not working.

              1 Reply Last reply Reply Quote 0
              • BornDead
                BornDead @Substring last edited by

                @substring
                I tried changing back rpi-pin356-power.py to original pins and rewired, then reset, power off and power on is working. Must be something special with pin5 (GPIO3).
                Do you know anything about changing the pins of player 5 and 6 on the Gamecon Driver?

                Substring 1 Reply Last reply Reply Quote 0
                • Substring
                  Substring @BornDead last edited by

                  @borndead That would require rewriting the driver itself

                  Former dev - Please reply with @substring so that i am notified when you answer me
                  Ex dev - Merci de me répondre en utilisant @substring pour que je sois notifé

                  BornDead 1 Reply Last reply Reply Quote 0
                  • BornDead
                    BornDead @Substring last edited by BornDead

                    @substring
                    That´s what I ended up doing, after a lot of trying I successfully got what I wanted by editing gamecon_gpio_rpi.c and rebuilding the driver.
                    So now I have 4 gamecon gpio controllers, POWER, RESET and LED!

                    • PIN01 | 5V
                    • PIN06 | GROUND
                    • PIN19 | CLOCK
                    • PIN23 | LATCH
                    • PIN07 | DATA3 (NES1)
                    • PIN26 | DATA4 (NES2)
                    • PIN29 | DATA5 (SNES1)
                    • PIN31 | DATA6 (SNES2)

                    alt text

                    The code replace in gamecon_gpio_rpi.c:

                    /* GPIO pins 0, 1, 4, 7, 29, 31 */
                    static const int gc_status_bit[] = { 0x01, 0x02, 0x10, 0x80, 0x20, 0x40 };
                    static const int gc_gpio_ids[] = { 0, 1, 4, 7, 29, 31 };

                    Felipe_e 1 Reply Last reply Reply Quote 0
                    • Felipe_e
                      Felipe_e @BornDead last edited by

                      @borndead
                      Sorry for reliving this issue, but I could not reach the solution you explain.
                      I have the same problem, I want to connect 4 controls (2 snes and 2 nes) and the power off and reset buttons.
                      The truth is that I don't know how to rebuild the driver.
                      In this link is version 1.4 of the driver, it is easier to modify the pins, but my problem is in reinstalling the driver
                      https://github.com/marqs85/gamecon_gpio_rpi/tree/master/gamecon_gpio_rpi-1.4

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

                      Want to support us ?

                      77
                      Online

                      98.9k
                      Users

                      28.1k
                      Topics

                      187.1k
                      Posts

                      Copyright © 2021 recalbox.com