Recalbox Forum

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

    Solved Mapped 2P Buttons Don't Behave Correctly

    GamePad/GPIO/USB encoder
    mapped buttons dont behave correctly
    5
    31
    11648
    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.
    • acris
      acris last edited by acris

      The wiring of the buttons and joysticks of both players must be exactly the same
      I think the wiring is not correct.

      Verify with evtest or jstest : https://github.com/recalbox/recalbox-os/wiki/Test-your-joystick-with-jstest-(EN)

      Xin Mo 18 pins or 20 pins ??

      Examples with xin mo 18 pins : https://github.com/recalbox/recalbox-os/wiki/Xin-mo-(EN)

      can you upload this archive, request in this wiki's page : https://github.com/recalbox/recalbox-os/wiki/Recalbox-support-(EN) again please.

      Take a picture of xin mo PCB please and upload your picture.

      tdelios 1 Reply Last reply Reply Quote 0
      • tdelios
        tdelios @acris last edited by

        @acris @subs

        Mine is a 18 pin 2Player xin-mo.. I will take a picture and upload.. I will also follow the directions you have given and will give an update.

        One thing I noticed I need you to clarify..

        The link you provided in a 18 pin 2 Player shows a picture that pin 5 is the CREDIT/SELECT and pin 6 is the 2PLAYER START. But the link I received from the supplier to wire my xin-mo shows the opposite: http://www.xin-mo.com/dual-players-controller.html
        Is the link you provided incorrect or is the link for the supplier incorrect? When I have time, I'm going to flip the 2 to see what happens before going through the additional steps you had asked for and get back to you with the results.

        I want to thank all of you for your feedback and efforts.. it is greatly appreciated and I feel that the Recalbox is so much cooler and easier to deal with than RetroPie.. hopefully I can overcome this hump!

        cheers
        tom

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

          @tdelios Hey Tom
          I'll give you a lityle background info so that you get the trick 🙂 Linux doesn't "naturally" understand devices such as the juyao or the xinmo the right way. Both are encoders that create 2 input devices on a single USB port. So to speak : that's a heresy for Linux. But, we can help Linux understanding how to set up the system for such devices with some "hacks" at the USB protocol level : this is called a (usb) quirk. There are several of them, and 0x40 means "set thz right bits so that linux shares a single usb devices as 2 input devices". I don't know how and where the share is made, but the kernel parameter you added means "for vendor id XXX and product id YYY, use magic number 0x40".

          Concerning the mapping : this has been proven by the community to be working 100%, we have to rely on them as it never proved to be wrong. The doc must refer to windows which has a not so "usb protocol standard respectful" behaviour !

          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é

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

            @subs @acris

            Hey guys.. just wanted to give you a great update. Flipping the 2P START and SELECT/COINS button did the trick.
            Its so funny how there are so many image references on the internet saying the opposite and luckily the one link you provided showed the correct way.

            not sure if the usbhid.quirks=0x16c0:0x5e1:0x040 being added to the cmdline.txt helped it or not, but I guess it doesn't hurt to keep it in there. Not sure if 4.1 will have this entry in there by default as a Nooby would pull their hair out trying to do it themselves.

            anyhow, you guys have been great and I always anticipate the continued evolution of Recalbox !

            cheers
            tom

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

              As i explained above, the qurik is mandatory or you can't have 2 sticks from your xinmo, just one

              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é

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

                @subs
                anyway to for you guys to code Recalbox on your next version to detect the xin-mo and automatically add the quirk to the cmdline.txt?

                I had spoken via email to a xin-mo manufacturer engineer and he said that he wasn't aware that different OSs have different interpretation on the pins as they are following the USB HID protocol. He said that I am probably using the XM-02 model that gave me the problem. He said that the XM-07 model may have better results to follow the pins as exactly as illustrated, and not to flip the START/SELECT as suggested by you guys. He forgot to mention how to tell them apart though .. lol...

                1 Reply Last reply Reply Quote 0
                • acris
                  acris last edited by

                  In recalbox 4.1, xin-mo will be add.

                  tdelios 1 Reply Last reply Reply Quote 0
                  • tdelios
                    tdelios @acris last edited by

                    @acris and @Substring ..

                    I found a link on the internet that outlines the 4.1 release items that the developers are still working on and the items that have been completed..

                    I do not see anything related to xin-mo and my problem.. Can you guys confirm that its on the list and that you guys are going to roll it out in 4.1 so that I don't have to manually go through the manual way of modifying the cmdline.txt file ..

                    cheers
                    tom

                    paradadf 1 Reply Last reply Reply Quote 0
                    • paradadf
                      paradadf Staff @tdelios last edited by

                      @tdelios it has been already added to the 4.1 release, don't worry.
                      See:
                      https://github.com/recalbox/recalbox-buildroot/blob/master/board/recalbox/fsoverlay/etc/modprobe.d/usbhid.conf

                      If your question was answered, please mark it as solved: Topic Tools -> Ask a question + Topic Tools -> Mark as Solved

                      tdelios 1 Reply Last reply Reply Quote 1
                      • tdelios
                        tdelios @paradadf last edited by

                        @paradadf thanks for the info buddy!

                        tdelios 1 Reply Last reply Reply Quote 0
                        • tdelios
                          tdelios @tdelios last edited by

                          @acris @Substring @paradadf

                          I thought you said that the 2P xin-mo fix was in the 4.1 release.

                          I am currently playing around with the 4.1 latest version and the button mapping is just as bad as before.
                          My 1P SELECT button is acting like the 1P Start and vise versa and my designated "A" button has become the Hotkey button.
                          I double checked the wiring and it is fine..

                          any thoughts on how to trouble shoot this?

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

                            @tdelios which board are you using ?

                            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é

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

                              @Substring How can I tell? I was just told that it was a 2P xin-mo and by looking at it, it has 18 pins for each player

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

                                @tdelios I meant pi ? odroid ? x86 ?

                                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é

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

                                  @Substring Raspberry Pi3

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

                                    @tdelios For the xin-mo, you should only map the first player and force it as player 1, the system will autoconfigure the P2 (both inputs and player position)

                                    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é

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

                                      @Substring what do I set the 1Player and 2Player values on the controller setup.

                                      1Player = "#0 Xin-Mo" and 2Player = "Default"

                                      or

                                      1Player = "#0 Xin-Mo" and 2Player = "#1 Xin-Mo"

                                      tdelios 1 Reply Last reply Reply Quote 0
                                      • tdelios
                                        tdelios @tdelios last edited by

                                        @tdelios nvm.. read the previous post history on this

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

                                          @Substring your awesome!

                                          it was my mistaken to configure the buttons for both controllers.. .Once I configured only the 1 PLAYER and not both.. and then setup the controller for 1P = #0 XIN-MO and 2P = #1 XIN-MO .. then I was good to go..

                                          THANKS!
                                          tom

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

                                            @tdelios i'm glad you can now enjoy your recalbox 🙂

                                            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é

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

                                            Want to support us ?

                                            115
                                            Online

                                            96.9k
                                            Users

                                            27.8k
                                            Topics

                                            186.5k
                                            Posts

                                            Copyright © 2021 recalbox.com