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

    Both joysticks controlling both players in P2 game

    Scheduled Pinned Locked Moved Help and Support
    joystickretropie
    13 Posts 2 Posters 540 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.
    • mituM
      mitu Global Moderator
      last edited by

      @herts101 How is your controller detected in Emulationstation - in the Input Configuration - is it 1 controller or 2 controllers ?
      There's a tidbit of info about Xin-Mo 2P controller in the docs, though it doesn't seem to apply in your case since your buttons are separately detected.
      You can use the jstest program to check that it's not a wiring/hardware problem: run jstest /dev/input/js0 and jstest /dev/input/js1 and see if the P1 joystick moves appear when testing the P2 controls. More details here.

      1 Reply Last reply Reply Quote 0
      • H
        herts101
        last edited by

        @mitu said in Both joysticks controlling both players in P2 game:

        Input Configuration

        Thank you. I've done a bit of testing as you suggested.

        The controller is detected in Emulationstation as Gamepad 1. There is only the option to enter controls for one of the joystick/button combos as far as I can see.

        I've tried jstest as you suggested and got different numbers for the buttons, but both joysticks changed the 0 and 1 numbers.

        I'm sure this isn't a wiring issue as the joypad still works effectively with a previous pi as 2 seperate joysticks. I'm just upgrading the pi to a new fresh install on a fresh pi which has caused the problems.

        Any other ideas?

        Thank you again

        1 Reply Last reply Reply Quote 0
        • H
          herts101
          last edited by

          Maybe worth saying that my controller.cfg file just seems to refer to 1 input as below.

          input_device = "xin-mo.com Xinmotek Controller"
          input_driver = "udev"
          input_l_btn = "4"
          input_load_state_btn = "4"
          input_start_btn = "8"
          input_exit_emulator_btn = "8"
          input_down_axis = "+1"
          input_r_btn = "5"
          input_save_state_btn = "5"
          input_right_axis = "+0"
          input_state_slot_increase_axis = "+0"
          input_select_btn = "9"
          input_left_axis = "-0"
          input_state_slot_decrease_axis = "-0"
          input_up_axis = "-1"
          input_a_btn = "0"
          input_b_btn = "1"
          input_reset_btn = "1"
          input_enable_hotkey_btn = "8"
          input_x_btn = "2"
          input_menu_toggle_btn = "2"
          input_y_btn = "3"

          1 Reply Last reply Reply Quote 0
          • H
            herts101
            last edited by

            Solved it! The issue was with getting the Xin-Mo board to be detected as 2 gamepads. Thanks for the link on your reply @mitu

            I got a lot of help from this link also https://blog.petrockblock.com/forums/topic/how-to-get-xin-mo-dual-arcade-working-with-retropie-easy-guide/page/2/, but please be wary that it is old and the changing of the kernel is not required for a Pi 3. It will brick the pi.

            The process I used was as follows:

            Exit emulationstation (F4)
            Type lsusb to show the usbhid of your Xin-Mo controller. Note the usbhid of your controller. Mine was 0x16c0:0x05e1:0x040
            Type sudo nano /boot/cmdline.txt
            Move to the end of the line, press space, then add usbhid.quirks=0x16c0:0x05e1:0x040. If your usbhid is different then use your reference. Do not press enter or move to 2 lines in any way.
            Save the cmdline.txt file
            If you have already tried to configure a gamepad, then delete these files using sudo rm /home/pi/.emulationstation/es_input.cfg
            Type: reboot

            Then, when emulationstation starts again you will first be able to configure gamepad 1 (pressing one of the P1 buttons), and then go back in and configure P2 by pressing one of the P2 buttons.

            Finally, you'll need to configure in retroarch. I had already done this so thought it was fine but the Select and Start P2 buttons didn't work. The solution was to reconfigure User 2 in retroarch, noting that there are now 2 Xin-Mo options under Device Index and User 2 needs to use the second one of these.

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

              @herts101 said in Both joysticks controlling both players in P2 game:

              I got a lot of help from this link also https://blog.petrockblock.com/forums/topic/how-to-get-xin-mo-dual-arcade-working-with-retropie-easy-guide/page/2/, but please be wary that it is old and the changing of the kernel is not required for a Pi 3. It will brick the pi.

              That link is the source material for the page in the Docs that I mentioned, only the configuration (i.e. adding the usbquirks module option) is required with the current release. Glad you got it working.

              H 1 Reply Last reply Reply Quote 0
              • H
                herts101 @mitu
                last edited by

                @mitu Thank you. Only remaining issue I can see is that the L1 and L2 buttons no longer page down the rom lists.

                Is there something else I need to do to update the config for this to work?

                Thank you so much for the help.

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

                  @herts101 Restart Emulationstation, should work.

                  1 Reply Last reply Reply Quote 0
                  • H
                    herts101
                    last edited by

                    I’ve restarted and still no luck. Any other ideas?

                    Thank you.

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

                      @herts101 I don't have any other ideas, I noticed that after first configuring the gamepad the L/R triggers don't work, but they work after ES restarts. Can you paste the output of the ~/.emulationstation/es_input.cfg file ? This is where Emulationstation stores the mapping for gamepads.

                      1 Reply Last reply Reply Quote 0
                      • H
                        herts101
                        last edited by

                        Thank you. File shows the following:

                        <?xml version="1.0"?>
                        <inputList>
                        <inputConfig type="joystick" deviceName="xin-mo.com Xinmotek Controller" deviceGUID="03000000c0160000e105000010010000">
                        <input name="a" type="button" id="0" value="1" />
                        <input name="b" type="button" id="1" value="1" />
                        <input name="down" type="axis" id="1" value="1" />
                        <input name="hotkeyenable" type="button" id="8" value="1" />
                        <input name="left" type="axis" id="0" value="-1" />
                        <input name="leftshoulder" type="button" id="4" value="1" />
                        <input name="right" type="axis" id="0" value="1" />
                        <input name="rightshoulder" type="button" id="5" value="1" />
                        <input name="select" type="button" id="8" value="1" />
                        <input name="start" type="button" id="9" value="1" />
                        <input name="up" type="axis" id="1" value="-1" />
                        <input name="x" type="button" id="2" value="1" />
                        <input name="y" type="button" id="3" value="1" />
                        </inputConfig>
                        </inputList>

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

                          @herts101 Hm, this looks a bit different than the one I have. Try replacing leftshoulder with pageup and rightshoulder with pagedownin the file.
                          My configuration file looks like this (it's a SNES type gamepad) and has the pageup/pagedown functionality using the shoulder buttons.

                          <inputConfig type="joystick" deviceName="USB,2-axis 8-button gamepad  " deviceGUID="03000000830500006020000010010000">
                              <input name="pageup" type="button" id="4" value="1"/>
                              <input name="start" type="button" id="7" value="1"/>
                              <input name="down" type="axis" id="1" value="1"/>
                              <input name="pagedown" type="button" id="5" value="1"/>
                              <input name="right" type="axis" id="0" value="1"/>
                              <input name="select" type="button" id="6" value="1"/>
                              <input name="left" type="axis" id="0" value="-1"/>
                              <input name="up" type="axis" id="1" value="-1"/>
                              <input name="a" type="button" id="0" value="1"/>
                              <input name="b" type="button" id="1" value="1"/>
                              <input name="x" type="button" id="2" value="1"/>
                              <input name="y" type="button" id="3" value="1"/>
                            </inputConfig>
                          
                          1 Reply Last reply Reply Quote 0
                          • H
                            herts101
                            last edited by

                            Brilliant. Words perfectly. Thank you once again.

                            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.