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
    13110
    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

      @tdelios
      sorry for my english :
      can you take picture of Xin-Mo Dual Arcade and upload in our forum please.

      Connect in ssh :

      **3) Mount partition **
      mount -o remount,rw /boot

      ** Edit /boot/cmdline.txt file** with nano or notepad++

      Make space with other word, add this line :

      usbhid.quirks=0x16c0:0x5e1:0x040

      like this :

      dwc_otg.fiq_fix_enable=1 sdhci-bcm2708.sync_after_dma=0 dwc_otg.lpm_enable=0 console=tty3 loglevel=3 elevator=deadline vt.global_cursor_default=0 logo.nologo root=/dev/mmcblk0p7 rootwait fastboot noswap ro usbhid.quirks=0x16c0:0x5e1:0x040
      

      reboot and configure only player 1 in Emulationstation > options gamepad

      In gamepad options : choose

      Player 1 on #0.....
      and
      Player 2 on #1.....

      If it's work, your pcb will be add to recalbox 4.1.0

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

        @acris said in Mapped 2P Buttons Don't Behave Correctly:

        usbhid.quirks=0x16c0:0x5e1:0x040

        I tried to make the modifications to cmdline.txt either directly on the device using nano or through putty terminal but in either case I get an error message that the its a read-only file system.

        I don't understand why I'm getting the error message. I'm logged in as root with the password recalboxroot

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

          @tdelios just mount -o remount, rw /boot and edit again the file

          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
            my bad.. I've done the changes to the cmdline.txt file and I mapped the 1P player buttons only and in the gamepad I put Player 1 on #0 and Player 2 on #1 ..

            Player 1 controls like before.. but noticed that if I press the Player 2 START button, that it is the Player 2 SELECT function instead.

            Do you want me to map the Player 2 buttons and joystick as well to see if I have the same outcome as my original post?

            1 Reply Last reply Reply Quote 0
            • 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
                                            • First post
                                              Last post

                                            Want to support us ?

                                            74
                                            Online

                                            99.6k
                                            Users

                                            28.1k
                                            Topics

                                            187.1k
                                            Posts

                                            Copyright © 2021 recalbox.com