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

    USB Controller and Keyboard Encoder for player 1

    Scheduled Pinned Locked Moved Help and Support
    controllerkeyboard encodeusbminipac
    11 Posts 4 Posters 4.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.
    • RandoCalrisianR
      RandoCalrisian
      last edited by RandoCalrisian

      I have the recroommasters 4player cocktail cabinet which is using 3 minipac keyboard encoders.
      These are plugged into usb ports 0,1, and 2 on the pi, leaving port 3 open.

      The cocktail cabinet is not at my home, but instead the office I work at.

      At home I was able to plug three keyboards into the same 0,1, and 2 usb ports on the pi, then plug a generic usb SNES controller into the usb port 3.

      Via emulationstation, I set the inputs for this controller. At this point I could launch games and have the "player 1" keyboard in usb port 0 pass inputs to the game as if it were player 1, but I could also use the USB pad to do the same thing. Great! This is exactly what I want.

      Now, the system at the office is where I have the problem. This is using the exact same image on its sd card, and it's a pi3 as well. The only difference in this setup is instead of literal keyboards plugged into the first the 3 usb ports, its the minipacs, which from what I understand are just keyboard encoders. When I plug the generic usb SNES controller into the last open port (usb prot 3, just like at home) it doesn't function the same way.

      I can, for example, navigate the emulationstation menus, and start Mario 1 for example. I can even press select and start with this controller to start the game, but I cannot pass commands to mario to say ... move, or jump. Only the "player 1" joystick on the first minipac is passing these commands. I guess the pi is registering the minipacs as "joypads" as well, and therefore the usb snes pad is being seen as joypad3 instead of joypad0?

      With the tool made by @meleu I found on this post, I see you can reassign controller arrangements, but is it possible to have it work as it did at home where the "player 1" joystick that's controlled via the minipac plugged into usb port0 passes commands for "player 1" as well as a usb pad that's plugged into usb port3?

      Pi Model: 3
      RetroPie Version Used: 4.1
      Built From: Pre made SD Image on RetroPie website
      USB Devices connected: 3 minipac keyboard encoders, 1 snes usb pad
      Controller used: snes usb pad

      meleuM 1 Reply Last reply Reply Quote 0
      • meleuM
        meleu @RandoCalrisian
        last edited by

        @RandoCalrisian said in USB Controller and Keyboard Encoder for player 1:

        is it possible to have it work as it did at home where the "player 1" joystick that's controlled via the minipac plugged into usb port0 passes commands for "player 1" as well as a usb pad that's plugged into usb port3?

        If the system detects them as joysticks, the answer is no. A joystick can control several players, but a player is controlled by only one joystick.

        "Why!?", one may ask.

        Answer
        RetroArch only accept one config line per option, then if you put this in your retroarch.cfg:

        input_player1_joypad_index = 0
        input_player1_joypad_index = 2
        input_player1_joypad_index = 3
        

        RetroArch gets only the first line and ignore the rest.

        BUUUUT...
        I'm talking about pure RetroArch configs, maybe somebody knows some hack to do what you want...

        • Useful topics
        • joystick-selection tool
        • rpie-art tool
        • achievements I made
        RandoCalrisianR 1 Reply Last reply Reply Quote 0
        • RandoCalrisianR
          RandoCalrisian @meleu
          last edited by

          @meleu said in USB Controller and Keyboard Encoder for player 1:

          @RandoCalrisian said in USB Controller and Keyboard Encoder for player 1:

          is it possible to have it work as it did at home where the "player 1" joystick that's controlled via the minipac plugged into usb port0 passes commands for "player 1" as well as a usb pad that's plugged into usb port3?

          If the system detects them as joysticks, the answer is no. A joystick can control several players, but a player is controlled by only one joystick.

          "Why!?", one may ask.

          Answer
          RetroArch only accept one config line per option, then if you put this in your retroarch.cfg:

          input_player1_joypad_index = 0
          input_player1_joypad_index = 2
          input_player1_joypad_index = 3
          

          RetroArch gets only the first line and ignore the rest.

          BUUUUT...
          I'm talking about pure RetroArch configs, maybe somebody knows some hack to do what you want...

          Thanks for the reply.
          If it's seeing them as "joypads" and I can't do it, fine, but I'd be okay with a second scenario:

          Correct me if I'm reading replies from this post I mentioned, but the tool you wrote allows for a joypad to be set to a specific player, and if say, that joystick is unplugged, then the default takes hold again.

          So to elaborate, the minipac I have in usb port0 is currently player 1. I plug in a usb snes pad into usb port3. I use your tool and tell it to, by name of controller (right?), use that joypad as player 1 instead. If when that usb snes pad is disconnected, the minipac in usb port0 now goes back to being player 1?

          meleuM 1 Reply Last reply Reply Quote 0
          • meleuM
            meleu @RandoCalrisian
            last edited by

            @RandoCalrisian said in USB Controller and Keyboard Encoder for player 1:

            So to elaborate, the minipac I have in usb port0 is currently player 1. I plug in a usb snes pad into usb port3. I use your tool and tell it to, by name of controller (right?), use that joypad as player 1 instead. If when that usb snes pad is disconnected, the minipac in usb port0 now goes back to being player 1?

            Yes. That's what happens. Be sure to enable the selection by name method. ;-)

            • Useful topics
            • joystick-selection tool
            • rpie-art tool
            • achievements I made
            RandoCalrisianR 1 Reply Last reply Reply Quote 0
            • RandoCalrisianR
              RandoCalrisian @meleu
              last edited by

              @meleu said in USB Controller and Keyboard Encoder for player 1:

              @RandoCalrisian said in USB Controller and Keyboard Encoder for player 1:

              So to elaborate, the minipac I have in usb port0 is currently player 1. I plug in a usb snes pad into usb port3. I use your tool and tell it to, by name of controller (right?), use that joypad as player 1 instead. If when that usb snes pad is disconnected, the minipac in usb port0 now goes back to being player 1?

              Yes. That's what happens. Be sure to enable the selection by name method. ;-)

              Hey thanks so much. I'll get back and let you know how it went.

              1 Reply Last reply Reply Quote 0
              • RandoCalrisianR
                RandoCalrisian
                last edited by

                @meleu, great news!

                First, your script is stupidly simple to get installed. Thanks for the awesome tool!

                Second, the interesting nature of those Ultimarc MiniPac controllers actually allowed for my initially desired intent.
                So, the raspberry pi is seeing the MiniPac as a joypad, but also a keyboard. So when I tell your tool to set player 1 as "USB SNES RetroPad", it does just that, but since the MiniPac is still passing keyboard commands, it still works too.

                I think this might have to do with the fact that in my main retroarch.cfg in /opt/config/all, in the keyboard input section, I have those buttons defined. I defined those keys in the config because I couldn't get fb-alpha to see the keyboard otherwise.

                So, thanks for your input, and maybe this information is interesting to you.
                Cheers.

                rbakerR 1 Reply Last reply Reply Quote 2
                • rbakerR
                  rbaker @RandoCalrisian
                  last edited by

                  @RandoCalrisian said in USB Controller and Keyboard Encoder for player 1:

                  so, the raspberry pi is seeing the MiniPac as a joypad, but also a keyboard. So when I tell your tool to set player 1 as "USB SNES RetroPad", it does just that, but since the MiniPac is still passing keyboard commands, it still works too.

                  So , I use the Ipac2 but have had issues because of the encoder being seen as a joypad rather than a keyboard. Here is a scenario where it is desirable. @Caver01, what do you think of this? Is this why it is like that in the firmware?

                  caver01C 1 Reply Last reply Reply Quote 0
                  • caver01C
                    caver01 @rbaker
                    last edited by

                    @rbaker I think only Andy from Ultimarc will be able to explain why the firmware on newer IPACs is recognized as a joypad. It's actually a little disappointing in my opinion that it happens at all. According to notes you have shared, Andy thinks it's a bug in RetroPie that incorrectly identifies the IPAC. I am still curious why he makes that claim and can simultaneously provide a firmware update that overcomes the alleged bug.

                    However, the "duality" of the IPAC (and possibly other keyboard controllers) with respect to lr-mame2003 has to do with the way keyboard inputs are accept AT THE SAME TIME as the RetroPad virtual controllers. It may be that Joypad input, if that's how the device is recognized work the same. What we do know from a lot of testing in this thread trying to make <CODE_NOT> keys work is that mame2003 receives input twice from a keyboard, once as the Retroarch gamepad and again from the RAW key input. I think this is simply another example of that.

                    My 4-player cocktail style cabinet built as a custom "roadcase"

                    RandoCalrisianR 1 Reply Last reply Reply Quote 1
                    • RandoCalrisianR
                      RandoCalrisian @caver01
                      last edited by

                      @caver01 said in USB Controller and Keyboard Encoder for player 1:

                      @rbaker I think only Andy from Ultimarc will be able to explain why the firmware on newer IPACs is recognized as a joypad. It's actually a little disappointing in my opinion that it happens at all. According to notes you have shared, Andy thinks it's a bug in RetroPie that incorrectly identifies the IPAC. I am still curious why he makes that claim and can simultaneously provide a firmware update that overcomes the alleged bug.

                      However, the "duality" of the IPAC (and possibly other keyboard controllers) with respect to lr-mame2003 has to do with the way keyboard inputs are accept AT THE SAME TIME as the RetroPad virtual controllers. It may be that Joypad input, if that's how the device is recognized work the same. What we do know from a lot of testing in this thread trying to make <CODE_NOT> keys work is that mame2003 receives input twice from a keyboard, once as the Retroarch gamepad and again from the RAW key input. I think this is simply another example of that.

                      Just to make sure, I can request from Andy a firmware upgrade to disble the 'joypad' "feature" of my minipacs? Is this firmware upgrade by request only, or do I simply have to download the firmware upgrade available on his site?

                      1 Reply Last reply Reply Quote 0
                      • RandoCalrisianR
                        RandoCalrisian
                        last edited by

                        So, looking at the firmware versions available, I'm guess I'd force my board to not have controller support by using the noGC versions with a 4, like 1.44. So, as a result, it'd only be seen as a keyboard. Is this correct?

                        caver01C 1 Reply Last reply Reply Quote 0
                        • caver01C
                          caver01 @RandoCalrisian
                          last edited by

                          @RandoCalrisian sorry. I wish I wish I knew more about the firmware. My IPAC4 device is an older version that uses a PS/2 to USB converter and it does not get recognized as a game pad at all. It's my understanding that this issue affects only the newer versions of these devices. I hate to send people to Andy for support every time, but as far as I know, he has been the only source cited by people who have obtained the replacement firmware. However, perhaps he has now incorporated it into the utility available online.

                          My 4-player cocktail style cabinet built as a custom "roadcase"

                          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.