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

    Unable to configure spinner correctly with xboxdrv

    Scheduled Pinned Locked Moved Help and Support
    xboxdrvspinner720 joystick
    14 Posts 2 Posters 875 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.
    • A
      asimp
      last edited by

      That was my first step after getting all excited that the spinner worked without any hassle. I tried both of the controller configuration tools within Emulation Station and inside of the rom itself and they weren't recognized.

      mediamogulM 1 Reply Last reply Reply Quote 0
      • mediamogulM
        mediamogul Global Moderator @asimp
        last edited by mediamogul

        @asimp

        If you would, try running jstest on whichever jsX entry the device is on (js0, js1, js2... etc). While you're there, get the name of the device and relay it here.

        Edit: Also, get the button number codes. They should be buttons '0' and '1', but double check.

        RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

        1 Reply Last reply Reply Quote 0
        • A
          asimp
          last edited by

          The controller doesn't show up as a jsX device by default, I really only get to that point once I run xboxdrv. If that is what you're looking for, here is the output.

          Driver version is 2.1.0.
          Joystick (Microsoft X-Box 360 pad) has 8 axes (X, Y, Z, Rx, Ry, Rz, Hat0X, Hat0Y)
          and 11 buttons (BtnX, BtnY, BtnTL, BtnTR, BtnTR2, BtnSelect, BtnThumbL, BtnThumbR, ?, ?, ?).
          Testing ... (interrupt to exit)
          Axes:  0:     0  1:     0  2:-32767  3:     0  4:     0  5:-32767  6:     0  7:     0 Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off  7:off  8:off  9:off 10:off
          

          Here is the evtest output to the actual, non xboxdrv, device in case that helps too.

          Input driver version is 1.0.1
          Input device ID: bus 0x3 vendor 0xd209 product 0x1582 version 0x111
          Input device name: "Opti-PAC Opti-PAC"
          Supported events:
            Event type 0 (EV_SYN)
            Event type 1 (EV_KEY)
              Event code 272 (BTN_LEFT)
              Event code 273 (BTN_RIGHT)
              Event code 274 (BTN_MIDDLE)
            Event type 2 (EV_REL)
              Event code 0 (REL_X)
              Event code 1 (REL_Y)
              Event code 2 (REL_Z)
            Event type 4 (EV_MSC)
              Event code 4 (MSC_SCAN)
          Properties:
          Testing ... (interrupt to exit)
          
          mediamogulM 1 Reply Last reply Reply Quote 0
          • mediamogulM
            mediamogul Global Moderator @asimp
            last edited by mediamogul

            @asimp said in Unable to configure spinner correctly with xboxdrv:

            Here is the evtest output to the actual, non xboxdrv, device in case that helps too.

            That tells a lot and I should have noticed it in your first evtest listing. The device is actually registering as a mouse. xboxdrv might indeed be necessary, as I don't think you can map mouse buttons in RetroArch. Assuming that's true, try changing you xboxdrv map to:

            Actually, you should be good with your original map. I'm about to head out for an Easter thing, but I'll be back later to look at it a little closer.

            RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

            1 Reply Last reply Reply Quote 0
            • A
              asimp
              last edited by

              I really appreciate your help, @mediamogul. Happy easter.

              mediamogulM 2 Replies Last reply Reply Quote 0
              • mediamogulM
                mediamogul Global Moderator @asimp
                last edited by

                @asimp

                Same to you!

                RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

                1 Reply Last reply Reply Quote 0
                • mediamogulM
                  mediamogul Global Moderator @asimp
                  last edited by

                  @asimp

                  I think I have a way for this to work with and without xboxdrv. First, let's try without just to remove one layer of complexity. After launching a game in lr-mame2003, open up the Retroarch menu and navigate to 'Settings' and then 'Input'. From there, go into all the numbered player input binds and make sure that the mouse index for the device is only set for Player 1. Next, leave the RetroArch menu and open up the MAME 'Tab' menu and navigate to 'Input (General)'. From here, select 'P1 Button 1' and when it begins listening for input, press the first button on the device.

                  Repeat that for 'P1 Button 2' and then back out of the menu to see if things are now working. If they are, you'll need to go back in and add the P1 button mappings for your standard controller as well and you'll be good to go. If that doesn't work, we'll explore an xboxdrv alternative.

                  RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

                  1 Reply Last reply Reply Quote 0
                  • A
                    asimp
                    last edited by

                    I attempted to add the buttons to the numbered player input binds, but neither of the buttons were recognized inside of the Retroarch Input Settings. Unfortunately, the experiance was the same inside of the MAME Input Settings menu.

                    mediamogulM 1 Reply Last reply Reply Quote 0
                    • mediamogulM
                      mediamogul Global Moderator @asimp
                      last edited by mediamogul

                      @asimp

                      OK, first of all delete /home/pi/RetroPie/roms/mame-libretro/mame2003/cfg/default.cfg to undo any mapping that may have been done in the previous trial. Now we're going to try an xboxdrv solution by adding --evdev-no-grab to your original map and remove the --ui-axismap line. This will map both mouse buttons to virtual controller buttons, but allow the the underlying device to function as well. This would normally cause a conflict, as the mouse buttons would be registered the same time as the virtual controller buttons. However, since the mouse buttons won't map anyway, this should allow the mouse movement to be read from the undlying device, while the buttons are registered from the virtual xboxdrv device. In practice, the map should look like:

                      xboxdrv --evdev /dev/input/event1 (OR /dev/input/by-id/usb-Opti-PAC_Opti-PAC_9-if01-event-mouse) \
                          --evdev-no-grab \
                          --evdev-keymap BTN_LEFT=a,BTN_RIGHT=b \
                          --mimic-xpad \
                          --silent
                      

                      RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

                      1 Reply Last reply Reply Quote 0
                      • A
                        asimp
                        last edited by

                        I think you're 100% on the right track with the evdev-no-grab, but while I was getting the controller configured correctly in the system, I did something that just deactivated the spinner completely.

                        I'm going to crash for the night, but will continue to bash my head against this tomorrow. I'll let you know what I come up with.

                        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.