• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
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

D-Input vs X-Input on 8Bitdo controllers

Scheduled Pinned Locked Moved Help and Support
xpad8bitdox-input
15 Posts 3 Posters 15.8k 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.
  • B
    bmn001 @bmn001
    last edited by 9 Jul 2023, 23:01

    Thanks to info in this thread I was able to edit:

    /opt/retropie/configs/all/retroarch-joypads/[name of my controller].cfg
    

    I then added these two lines to the end of the file:

    input_l2_axis = "+2"
    input_r2_axis = "+5"
    

    That makes L2 and R2 work in emulators.

    However...I'm helping out a not-so-computer-literate friend who I'm sure will manage to overwrite this setting at some point in the future by using Emulation Station's button configurator. I'd still prefer to do this in a less-hacky way if there is one.

    W 1 Reply Last reply 12 Jul 2023, 07:25 Reply Quote 0
    • M
      mitu Global Moderator @bmn001
      last edited by 10 Jul 2023, 05:26

      @bmn001 said in D-Input vs X-Input on 8Bitdo controllers:

      Previous posts about this made it sound like all you had to do to fix this is update the xpad driver. I un/reinstalled xpad and there was no change.

      xpad only works for wired Xbox controllers, try installing xpadneo and re-pair the controller, then re-configure it in EmulationStation.

      I'm helping out a not-so-computer-literate friend who I'm sure will manage to overwrite this setting at some point in the future by using Emulation Station's button configurator.

      You can disable the auto-configuration of the controller from the Configuration section in RetroPie-Setup, under the emulationstation menu.

      B 1 Reply Last reply 12 Jul 2023, 03:41 Reply Quote 0
      • B
        bmn001 @mitu
        last edited by 12 Jul 2023, 03:41

        @mitu said in D-Input vs X-Input on 8Bitdo controllers:

        xpad only works for wired Xbox controllers, try installing xpadneo and re-pair the controller, then re-configure it in EmulationStation.

        Removed my Bluetooth device.
        Removed the previous udev rules after reading this
        Installed xpadneo.
        Uninstalled xpad just in case.
        Rebooted.
        Paired controller.
        Tried to configure buttons in ES and...no change. The L2/R2 buttons are not recognized.

        jstest does see the trigger presses. Just Emulation Station will not.

        Is there a way for me to confirm that xpadneo is actually being used by this controller?

        M 1 Reply Last reply 12 Jul 2023, 04:49 Reply Quote 0
        • M
          mitu Global Moderator @bmn001
          last edited by 12 Jul 2023, 04:49

          @bmn001 said in D-Input vs X-Input on 8Bitdo controllers:

          Is there a way for me to confirm that xpadneo is actually being used by this controller?

          Disconnect the controller, then run - from the terminal:

          dmesg -w
          

          Connect the controller again and see if the xpadneo driver takes over the connection. Press Ctrl+C to stop dmesg and go back to the terminal.

          B 1 Reply Last reply 12 Jul 2023, 05:18 Reply Quote 0
          • B
            bmn001 @mitu
            last edited by 12 Jul 2023, 05:18

            @mitu Yeah that output is full of xpadneo messages referencing my gamepad. So I guess the driver is in use at least.

            Jstest does show the two triggers as axis, not buttons, if that makes a difference.

            M 1 Reply Last reply 12 Jul 2023, 12:10 Reply Quote 0
            • W
              WeirdH @bmn001
              last edited by 12 Jul 2023, 07:25

              @bmn001 said in D-Input vs X-Input on 8Bitdo controllers:

              However...I'm helping out a not-so-computer-literate friend who I'm sure will manage to overwrite this setting at some point in the future by using Emulation Station's button configurator.

              Just set Emulationstation to kiosk or kid mode after configuring. It will hide all the setup stuff.

              1 Reply Last reply Reply Quote 0
              • M
                mitu Global Moderator @bmn001
                last edited by mitu 7 Dec 2023, 13:11 12 Jul 2023, 12:10

                @bmn001 said in D-Input vs X-Input on 8Bitdo controllers:

                @mitu Yeah that output is full of xpadneo messages referencing my gamepad. So I guess the driver is in use at least.

                Can you post the messages ? You can copy them by running the dmesg command over SSH.
                The triggers being recognized as axis is ok and EmulationStation should be able to deal with them.

                B 1 Reply Last reply 12 Jul 2023, 14:16 Reply Quote 0
                • B
                  bmn001 @mitu
                  last edited by 12 Jul 2023, 14:16

                  @mitu Yep, here's a log. I start with the controller off, then power it on and this is the output I see as soon as it connects:

                  [34441.432303] xpadneo 0005:045E:02E0.000A: buggy firmware detected, please upgrade to the latest version
                  [34441.432314] xpadneo 0005:045E:02E0.000A: pretending XB1S Windows wireless mode (changed PID from 0x02E0 to 0x028E)
                  [34441.432322] xpadneo 0005:045E:02E0.000A: working around wrong SDL2 mappings (changed version from 0x00000903 to 0x00001130)
                  [34441.432330] xpadneo 0005:045E:02E0.000A: report descriptor size: 307 bytes
                  [34441.432338] xpadneo 0005:045E:02E0.000A: fixing up report descriptor size
                  [34441.433222] xpadneo 0005:045E:02E0.000A: battery detected
                  [34441.433230] xpadneo 0005:045E:02E0.000A: enabling compliance with Linux Gamepad Specification
                  [34441.433327] input: 8Bitdo SN30 Pro as /devices/platform/soc/fe201000.serial/tty/ttyAMA0/hci0/hci0:11/0005:045E:02E0.000A/input/input23
                  [34441.446011] xpadneo 0005:045E:02E0.000A: input,hidraw2: BLUETOOTH HID v11.30 Gamepad [8Bitdo SN30 Pro] on d8:3a:dd:1c:dd:84
                  [34441.446027] xpadneo 0005:045E:02E0.000A: controller quirks: 0x00000027
                  [34442.106805] xpadneo 0005:045E:02E0.000A: 8Bitdo SN30 Pro [e4:17:d8:7a:f4:73] connected
                  

                  I've noted the first line about "buggy firmware," but I'm already running the latest 8Bitdo firmware available (2.02) so I'm not sure what that's looking at.

                  1 Reply Last reply Reply Quote 0
                  • M
                    mitu Global Moderator
                    last edited by 12 Jul 2023, 15:11

                    Yeah, it looks like xpadneo takes over and applies some quirks to the controller, so it's clearly managed by xpadne.

                    Not sure why the L2/R2 buttons don't get mapped in ES, but you can start EmulationStation using the debug option and it should print what input is activated during the input configuration dialog (log is printed on console and also written in $HOME/.emulationstation/es_log.txt).

                    emulationstation --debug
                    
                    B 1 Reply Last reply 12 Jul 2023, 15:59 Reply Quote 0
                    • B
                      bmn001 @mitu
                      last edited by 12 Jul 2023, 15:59

                      @mitu The ES debug log seems to indicate that ES isn't seeing the triggers being pressed at all.

                      After "Mapping [Button 5] -> RightShoulder" when I was asked to press the left and right trigger buttons, I made sure to press L2 and R2 ten times each so they would be obvious in the log before I did a "hold button to skip" to move on.

                      Instead, there's nothing in the log about triggers at all, and indeed the UI gave no indication that any button or trigger was being pressed at that time.

                      Jul 12 08:30:51 lvl2:   Added known joystick '8Bitdo SN30 Pro' (instance ID: 0, device index: 0)
                      Jul 12 08:30:51 lvl3:   SystemView::getViewElements()
                      Jul 12 08:30:58 lvl2:   Configuring device 0 (8Bitdo SN30 Pro).
                      Jul 12 08:31:00 lvl2:     Mapping [Hat 0 up] -> Up
                      Jul 12 08:31:00 lvl2:     Mapping [Hat 0 down] -> Down
                      Jul 12 08:31:01 lvl2:     Mapping [Hat 0 left] -> Left
                      Jul 12 08:31:02 lvl2:     Mapping [Hat 0 right] -> Right
                      Jul 12 08:31:02 lvl2:     Mapping [Button 7] -> Start
                      Jul 12 08:31:03 lvl2:     Mapping [Button 6] -> Select
                      Jul 12 08:31:03 lvl2:     Mapping [Button 0] -> A
                      Jul 12 08:31:04 lvl2:     Mapping [Button 1] -> B
                      Jul 12 08:31:05 lvl2:     Mapping [Button 2] -> X
                      Jul 12 08:31:05 lvl2:     Mapping [Button 3] -> Y
                      Jul 12 08:31:06 lvl2:     Mapping [Button 4] -> LeftShoulder
                      Jul 12 08:31:06 lvl2:     Mapping [Button 5] -> RightShoulder
                      Jul 12 08:31:18 lvl2:     Mapping [Button 9] -> LeftThumb
                      Jul 12 08:31:19 lvl2:     Mapping [Button 10] -> RightThumb
                      Jul 12 08:31:19 lvl2:     Mapping [Axis 1-] -> LeftAnalogUp
                      Jul 12 08:31:20 lvl2:     Mapping [Axis 1+] -> LeftAnalogDown
                      Jul 12 08:31:20 lvl2:     Mapping [Axis 0-] -> LeftAnalogLeft
                      Jul 12 08:31:21 lvl2:     Mapping [Axis 0+] -> LeftAnalogRight
                      Jul 12 08:31:22 lvl2:     Mapping [Axis 4-] -> RightAnalogUp
                      Jul 12 08:31:22 lvl2:     Mapping [Axis 4+] -> RightAnalogDown
                      Jul 12 08:31:23 lvl2:     Mapping [Axis 3-] -> RightAnalogLeft
                      Jul 12 08:31:23 lvl2:     Mapping [Axis 3+] -> RightAnalogRight
                      Jul 12 08:31:24 lvl2:     Mapping [Button 6] -> HotKeyEnable
                      Jul 12 08:31:24 lvl3:   fireEvent: config-changed
                      Jul 12 08:31:24 lvl3:   fireEvent: controls-changed
                      Jul 12 08:31:24 lvl2:           /opt/retropie/supplementary/emulationstation/scripts/inputconfiguration.sh
                      

                      Given that:

                      • xpadneo identifies and drives my controller
                      • jstest recognizes the triggers when pressed
                      • The the triggers work within retroarch when I manually edit a config file
                      • I've seen identical behavior using both xpad and xpadneo (so far)

                      ...it's looking a lot like a possible bug in Emulation Station maybe?

                      I really do appreciate you taking the time to step through all this with me. Thank you.

                      M 1 Reply Last reply 12 Jul 2023, 16:06 Reply Quote 0
                      • M
                        mitu Global Moderator @bmn001
                        last edited by mitu 7 Dec 2023, 17:07 12 Jul 2023, 16:06

                        @bmn001 said in D-Input vs X-Input on 8Bitdo controllers:

                        ...it's looking a lot like a possible bug in Emulation Station maybe?

                        More likely with the SDL2 library used by EmulationStation underneath, which handles also the input. However, if things work with RetroArch, it's not a big deal, since L2/R2 are not really used by EmulationStation itself.

                        B 1 Reply Last reply 12 Jul 2023, 17:00 Reply Quote 0
                        • B
                          bmn001 @mitu
                          last edited by 12 Jul 2023, 17:00

                          @mitu I have only a vague grasp of this, so please bear with me.

                          I just installed some random SDL2 controller testing tool from github. It needed libsdl2-dev installed to build. The version I used was "2.0.10+5rpi". That testing tool does correctly see the triggers.

                          So I just pulled the latest Emulation Station from github and built it on the same machine (Ras Pi4). It still will not see the triggers.

                          M B 2 Replies Last reply 12 Jul 2023, 17:38 Reply Quote 0
                          • M
                            mitu Global Moderator @bmn001
                            last edited by 12 Jul 2023, 17:38

                            @bmn001 said in D-Input vs X-Input on 8Bitdo controllers:

                            So I just pulled the latest Emulation Station from github and built it on the same machine (Ras Pi4). It still will not see the triggers.

                            What's the version of EmulationStation you have installed ?

                            1 Reply Last reply Reply Quote 0
                            • B
                              bmn001 @bmn001
                              last edited by bmn001 7 Dec 2023, 22:59 12 Jul 2023, 20:52

                              @mitu Whew. It's getting weird now.

                              I just built the latest version of SDL2 from github.

                              cmake sees SDL2 as 2.29.0 now instead of the previous 2.0.10.

                              So then I rebuilt Emulation Station.

                              The preinstalled Emulation Station was v2.11.2rp. The one I've built identifies as 2.12.0rp-dev.

                              The good news:

                              • Emulation Station now recognizes my L2/R2 triggers!

                              The weird news:

                              • When I launch retroarch emulators, they do not recognize my L2/R2 trigger presses.
                              • While the bluetooth dialog still reports my controller name as "8Bitdo SN30 Pro" when I pair and connect it, this newly-built version of Emulation Station reports it as "Xbox 360 Controller".
                              1 Reply Last reply Reply Quote 0
                              15 out of 15
                              • First post
                                15/15
                                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.

                                This community forum collects and processes your personal information.
                                consent.not_received