RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    GPIOnext input works great during menu but stops working after game boots

    Scheduled Pinned Locked Moved Help and Support
    controllerjoypadgpionextgamepad
    9 Posts 2 Posters 1.3k 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.
    • W
      willelind
      last edited by

      Hi! New here, I read all the rules etc and I hope this will suffice as a post because I couldn't find anything similar.

      Hardware: rpi zero 2.
      Power supply: micro usb to computer.
      Retropie version: 4.8
      Built from: Prebuilt from your website download link
      Emulator: Happens for both GBA and GBC
      Guide I followed:

      I have a joypad1 configured via GPIOnext, as pins being set to low causes a certain button to trigger. When launched first time, this let me use those pins to setup a gamepad with emulationstation config. It works as intended in retropie menu, start, arrows, a, b, etc.

      The problem is when launching a game:

      GPIOnext joypad 1 9999/8888 not configured
      

      After this, nothing I do affects the game state. No buttons seem to register. When I reboot, I can still control the menu in retropie as normal.

      I am not really sure what to make of this code. I couldn't find any similar topic online or as an issue on the github for GPIOnext. Has anyone here seen something similar and can point me in the right direction?

      Much appreciated!

      W 1 Reply Last reply Reply Quote 0
      • W
        willelind @willelind
        last edited by

        @willelind

        I did figure it out finally, so I wanted to post a response here in case anyone else gets this problem.

        9999/8888 seems to be related to joystick/dpad. I did find an old thread https://retropie.org.uk/forum/topic/32997/controller-working-in-menu-but-not-in-game/2 about this, and it seems if you use a joystick/dpad you can add your 9999/8888 or whatever numbers you have into your config file.

        The problem/solution for me is that I don't have a dpad, so if I don't register one and simply enter my pins as a keyboard in gpionext config instead, it works as intended.

        mituM 1 Reply Last reply Reply Quote 0
        • mituM
          mitu Global Moderator @willelind
          last edited by mitu

          @willelind said in GPIOnext input works great during menu but stops working after game boots:

          9999/8888 seems to be related to joystick/dpad.

          Not quite. The numbers printed by RetroArch refer to the input device's Vendor/Product ID. GPIONext sets those numbers to 9999/8888 here for any device it emulates.

          W 1 Reply Last reply Reply Quote 0
          • W
            willelind @mitu
            last edited by willelind

            @mitu

            Interesting, thank you for clarifying. What do you think was the problem then?

            I also noticed that even though I selected keyboard, it now says GPIOnext Keyboard 1 (1/1) not configured

            So the keybindings from emulationstation is void and it uses the keybinds from GPIOnext config instead. So the reason for me that it works is that the binds from GPIOnext matches the keybinds found in the global retroarch.cfg file for keyboard.

            But it would be cool to get the emulationstation to work, if that is possible. Do you know how?

            mituM 1 Reply Last reply Reply Quote 0
            • mituM
              mitu Global Moderator @willelind
              last edited by mitu

              @willelind said in GPIOnext input works great during menu but stops working after game boots:

              I also noticed that even though I selected keyboard, it now says GPIOnext Keyboard 1 (1/1) not configured

              [...]

              It seems it's still detected as a joypad/gamepad.

              But it would be cool to get the emulationstation to work, if that is possible. Do you know how?

              Not sure what you mean here - I thought the topic was about the gamepad not working in RetroArch, but working in EmulationsStation/menu ?

              After you set-up the gamepad in EmulationStation, a RetroArch gamepad profile is automaticallu generated, stored under /opt/retropie/configs/all/retroarch-joypads, in a .cfg file named after the controller. For you though, there seems to be an issue with this .cfg file being not generated or missing.

              Is this a stock RetroPie installation ? Did you modify disable the EmulationStation's auto-generation of gamepad configuration ? Did you re-set RetroArch or otherwise changed the location where it expects the gamepad auto-configuration profile is located ?

              W 1 Reply Last reply Reply Quote 0
              • W
                willelind @mitu
                last edited by

                @mitu

                Thank you for helping me.

                Maybe I am using the wrong language because I am new to RetroArch. I am using a stock firmware as I wrote in OP.

                However, I do not see a .cfg in the location that you say, even after freshly configuring a gamepad in emulationstation. You are correct that the gamepad (the one configured in emulationstation) works in retropie menu, until I launch a game, then it seems the config from gpionext takes over. I can see that I have a device in /sys/devices/virtual/input/input0 that I think is created by gpionext.

                When I had my gpionext configured as a joypad, this input file was removed when I launched a game. When I have my gpionext configured as a keyboard, the input file remains and I can therefore use the gpionext configured input system in the games. However, that is separate from the config I created in emulationstation, which is only active in retropie menu. Is there not a way to make sure that the emulationstation config is used in games too?

                mituM 1 Reply Last reply Reply Quote 0
                • mituM
                  mitu Global Moderator @willelind
                  last edited by

                  However, I do not see a .cfg in the location that you say, even after freshly configuring a gamepad in emulationstation.

                  If your GPIO device acts as a keyboard, then the .cfg file is not created. Instead the keyboard inputs are set directly in /opt/retropie/configs/all/retroarch.cfg.

                  However, that is separate from the config I created in emulationstation, which is only active in retropie menu. Is there not a way to make sure that the emulationstation config is used in games too?

                  The input configuration used by EmulationStation cannot be used by other programs, because other programs have their own configurations - they can't read the ES config, but instead RetroPie will generate the specific program configuration after the ES configuration is finished (as I explained before).

                  W 1 Reply Last reply Reply Quote 0
                  • W
                    willelind @mitu
                    last edited by

                    @mitu

                    Thank you, that explains most of it!

                    But there is one thing I still don't understand.

                    I also noticed that even though I selected keyboard, it now says GPIOnext Keyboard 1 (1/1) not configured
                    

                    Your response was:

                    It seems it's still detected as a joypad/gamepad.
                    

                    What did you mean by that? It seems that my input keybindings are from the /opt/retropie/configs/all/retroarch.cfg file, listed under keyboard, not joypad/gamepad.

                    mituM 1 Reply Last reply Reply Quote 0
                    • mituM
                      mitu Global Moderator @willelind
                      last edited by

                      @willelind said in GPIOnext input works great during menu but stops working after game boots:

                      What did you mean by that? It seems that my input keybindings are from the /opt/retropie/configs/all/retroarch.cfg file, listed under keyboard, not joypad/gamepad.

                      Look in a verbose log and see if an additional joystick/gamepad input type is detected. It may be that GPIONext adds an additional gamepad device, even if you configure it as a keyboard.

                      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.