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

    20 pin xin mo wiring diagram set up

    Scheduled Pinned Locked Moved Help and Support
    controller
    32 Posts 9 Posters 21.5k 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.
    • stuntsteinS
      stuntstein
      last edited by

      Could you check the USB vendor and product id?
      I have made a fix for the product with id 0x75e1:
      https://retropie.org.uk/forum/topic/7832/fix-up-left-joystick-direction-for-tht-2p-arcade-controller-with-device-id-0x75e1

      G 1 Reply Last reply Reply Quote 0
      • G
        Greg @stuntstein
        last edited by

        @stuntstein Hi. I checked the product and vendor id and I used it to change cmdline.txt with usbhid.quirks=0x16c0:0x05e0:0x040. The values are :
        0x16c0:0x05e0. Very simmilar to tht where it was 0x16c0:0x05e1.
        The controller is visible as 3H Arcade 2Players. If you need more info just let me know.
        Thanks for help.

        1 Reply Last reply Reply Quote 0
        • stuntsteinS
          stuntstein
          last edited by

          oh another Xin Mo clone :-(

          You can take my patch and add the new product ID and build the kernel. Then I'm confident that your usb controller will work.

          In drivers/hid/hid-core.c
          { HID_USB_DEVICE(USB_VENDOR_ID_XIN_MO, USB_DEVICE_ID_XIN_MO_DUAL_ARCADE) },
          { HID_USB_DEVICE(USB_VENDOR_ID_XIN_MO, USB_DEVICE_ID_THT_2P_ARCADE) },
          { HID_USB_DEVICE(USB_VENDOR_ID_XIN_MO, USB_DEVICE_ID_3H_2P_ARCADE) },

          In drivers/hid/hid-ids.h

          #define USB_VENDOR_ID_XIN_MO 0x16c0
          #define USB_DEVICE_ID_XIN_MO_DUAL_ARCADE 0x05e1
          #define USB_DEVICE_ID_THT_2P_ARCADE 0x75e1
          #define USB_DEVICE_ID_3H_2P_ARCADE 0x05e0

          and finally in drivers/hid/hid-xinmo.c
          { HID_USB_DEVICE(USB_VENDOR_ID_XIN_MO, USB_DEVICE_ID_XIN_MO_DUAL_ARCADE) },
          { HID_USB_DEVICE(USB_VENDOR_ID_XIN_MO, USB_DEVICE_ID_THT_2P_ARCADE) },
          { HID_USB_DEVICE(USB_VENDOR_ID_XIN_MO, USB_DEVICE_ID_3H_2P_ARCADE) },

          G 1 Reply Last reply Reply Quote 0
          • G
            Greg @stuntstein
            last edited by

            @stuntstein
            Hi

            When I apply the patch to the kernel it gives me the following error:

            fatal: corrupt patch at line 14.

            This is my edited patch :

            diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
            index 9369602..2458687 100644
            --- a/drivers/hid/hid-core.c
            +++ b/drivers/hid/hid-core.c
            @@ -2052,6 +2052,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
            { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP, USB_DEVICE_ID_WALTOP_SIRIUS_BATTERY_FREE_TABLET) },
            { HID_USB_DEVICE(USB_VENDOR_ID_X_TENSIONS, USB_DEVICE_ID_SPEEDLINK_VAD_CEZANNE) },
            { HID_USB_DEVICE(USB_VENDOR_ID_XIN_MO, USB_DEVICE_ID_XIN_MO_DUAL_ARCADE) },

            • { HID_USB_DEVICE(USB_VENDOR_ID_XIN_MO, USB_DEVICE_ID_THT_2P_ARCADE) },
            • { HID_USB_DEVICE(USB_VENDOR_ID_XIN_MO, USB_DEVICE_ID_3H_2P_ARCADE) },
              { HID_USB_DEVICE(USB_VENDOR_ID_ZEROPLUS, 0x0005) },
              { HID_USB_DEVICE(USB_VENDOR_ID_ZEROPLUS, 0x0030) },
              { HID_USB_DEVICE(USB_VENDOR_ID_ZYDACRON, USB_DEVICE_ID_ZYDACRON_REMOTE_CONTROL) },
              diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
              index e370306..5e98504 100644
              --- a/drivers/hid/hid-ids.h
              +++ b/drivers/hid/hid-ids.h
              @@ -1014,6 +1014,7 @@

            #define USB_VENDOR_ID_XIN_MO 0x16c0
            #define USB_DEVICE_ID_XIN_MO_DUAL_ARCADE 0x05e1
            +#define USB_DEVICE_ID_THT_2P_ARCADE 0x75e1
            +#define USB_DEVICE_ID_3H_2P_ARCADE 0x05e0

            #define USB_VENDOR_ID_XIROKU 0x1477
            #define USB_DEVICE_ID_XIROKU_SPX 0x1006
            diff --git a/drivers/hid/hid-xinmo.c b/drivers/hid/hid-xinmo.c
            index 7df5227..9ad7731 100644
            --- a/drivers/hid/hid-xinmo.c
            +++ b/drivers/hid/hid-xinmo.c
            @@ -46,6 +46,7 @@ static int xinmo_event(struct hid_device *hdev, struct hid_field *field,

            static const struct hid_device_id xinmo_devices[] = {
            { HID_USB_DEVICE(USB_VENDOR_ID_XIN_MO, USB_DEVICE_ID_XIN_MO_DUAL_ARCADE) },

            • { HID_USB_DEVICE(USB_VENDOR_ID_XIN_MO, USB_DEVICE_ID_THT_2P_ARCADE) },
            • { HID_USB_DEVICE(USB_VENDOR_ID_XIN_MO, USB_DEVICE_ID_3H_2P_ARCADE) },
              { }
              };

            What is the problem ?

            Thank you very much for your work.

            Best Regards

            G 1 Reply Last reply Reply Quote 0
            • GraboidG
              Graboid
              last edited by

              I wired mine up as per below, works fine with the usb quirks fix

              0_1487929914958_Xin-Mo-2-player-layout-wired.jpg

              Built Space Invaders Themed Bartop - Check it out here:- https://retropie.org.uk/forum/topic/5593/space-invaders-themed-bartop-arcade-uk-completed

              stuntsteinS 1 Reply Last reply Reply Quote 0
              • G
                Greg @Greg
                last edited by

                For now I edited source files manually and added new lines.
                Krenel is now compiling, waiting it to end.

                My usb controller is 40 pin.

                stuntsteinS 1 Reply Last reply Reply Quote 0
                • stuntsteinS
                  stuntstein @Greg
                  last edited by

                  @Greg Not sure why the patch didn't work. It is difficult to tell if some typo error from the above print because the forum reformat the text.
                  Anyway, I hope that your kernel compiled successfully and your controller now fully working.

                  1 Reply Last reply Reply Quote 0
                  • stuntsteinS
                    stuntstein @Graboid
                    last edited by

                    @Graboid The original Xin Mo controller works fine because the fix for joystick up&left is already included in the linux kernel.
                    The Xin Mo and the clones have same Vendor ID 0x16c0.
                    The original Xin Mo has Product ID 0x05e1.
                    Mine and Subz clone has PID 0x75e1.
                    Gregs clone has PID 0x05e0.

                    I submitted a patch to Linux Kernel to fix PID 0x75e1. We might need another patch to permanently fix 0x05e0.

                    G 1 Reply Last reply Reply Quote 0
                    • G
                      Greg @stuntstein
                      last edited by

                      @stuntstein I still trying to compile the krenel but at the end it cannot create img. file, During compiling I have errors about xinmo.
                      Now i`m trying third time. Fresh install retropie with rpi3.

                      G 1 Reply Last reply Reply Quote 0
                      • G
                        Greg @Greg
                        last edited by

                        Problem with the patch is that there are different lines in source files which it modifies. I had to manually add new lines in 3 files (commented in the patch).

                        G 1 Reply Last reply Reply Quote 0
                        • G
                          Greg @Greg
                          last edited by

                          Steps with compiling :

                          1. Enter console raspberry
                          2. enter home folder
                          3. sudo git clone --depth=1 https://github.com/raspberrypi/linux
                          4. sudo apt-get install bc
                          5. enter cloned linux dir
                          6. copy changed files over original
                            7)in linux dir enter commands:
                            KERNEL=kernel7
                            make bcm2709_defconfig
                            8)make -j4 zImage modules dtbs
                            takes time ( 1h)

                          sudo make modules_install
                          sudo cp arch/arm/boot/dts/.dtb /boot/
                          sudo cp arch/arm/boot/dts/overlays/
                          .dtb* /boot/overlays/
                          sudo cp arch/arm/boot/dts/overlays/README /boot/overlays/
                          sudo scripts/mkknlimg arch/arm/boot/zImage /boot/$KERNEL.img

                          problem cannot find zImage file

                          Maybe I do something wrong.
                          Any suggestions ?

                          1 Reply Last reply Reply Quote 0
                          • stuntsteinS
                            stuntstein
                            last edited by

                            In step 8 try to build only zImage:
                            make -j4 zImage
                            Then you should see the error message.
                            When fixed then do the complete make instruction.

                            G 1 Reply Last reply Reply Quote 0
                            • G
                              Greg @stuntstein
                              last edited by

                              @stuntstein Ok after make -j4 zImage the image is done. What next ?
                              make -j4 zImage modules dtbs ?
                              or separate make modules dtbs ?

                              1 Reply Last reply Reply Quote 0
                              • stuntsteinS
                                stuntstein
                                last edited by

                                You can do either. Make system will not rebuild zImage unless you change the source files.
                                But try
                                make -j4 modules dtbs

                                G 1 Reply Last reply Reply Quote 0
                                • G
                                  Greg @stuntstein
                                  last edited by

                                  @stuntstein Thanks i just ran make -j4 modules, next i will run make -j4 dtbs. It takes time so I have to wait and see if there is any error.

                                  1 Reply Last reply Reply Quote 0
                                  • G
                                    Greg
                                    last edited by

                                    I can confirm that everything is working ok after making changes to kernel. 3H Dual Arcade 2 Players are now working properly ( every directions).
                                    If someone need help please read whole post. There are informations how to compile new kernel.
                                    1.Before compiling kernel i had to su apt-get upgrade and apt-update.
                                    Soon i will post comloete guide how to get it working.
                                    How about post this change to retropie team to support this patch in future releases ?

                                    P 1 Reply Last reply Reply Quote 0
                                    • stuntsteinS
                                      stuntstein
                                      last edited by

                                      I have written a guide here:
                                      https://retropie.org.uk/forum/topic/7832/fix-up-left-joystick-direction-for-tht-2p-arcade-controller-with-device-id-0x75e1

                                      It is not a patch that the retropie team has to maintain, but rather a patch for the linux kernel.
                                      I have submitted the patch to support the THT controller. I can add the new changes to another patch but I don't know if Linux org will keep accepting changes to kernel because of an unknown USB clone is coming out now and then.

                                      1 Reply Last reply Reply Quote 0
                                      • P
                                        pajaroloco @Greg
                                        last edited by

                                        @Greg Hello:Please, when you have the guide please publish as soon as possible; i have the same controller (3H) and don“t go left/up joystick, and im noob with linux, errors, thank you

                                        1 Reply Last reply Reply Quote 0
                                        • S
                                          subvers
                                          last edited by

                                          Hi Guys,

                                          I have the same problem with the 3H Dual Arcade 2 Players, did you found any solution to solve this?

                                          1 Reply Last reply Reply Quote 0
                                          • R
                                            robthedude81
                                            last edited by

                                            I am still having this issue with the 75e0 one

                                            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.