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

    XBOXDRV Guidance Needed

    Scheduled Pinned Locked Moved Help and Support
    xboxdrv
    106 Posts 3 Posters 32.9k 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.
    • mediamogulM
      mediamogul Global Moderator @hansolo77
      last edited by mediamogul

      @hansolo77

      My memory on this is a bit wobbly, but I believe I've always had trouble with xboxdrv mappings triggering and navigating the Runcommand window and I just used my little wireless keyboard for these occurances. Was this something that was previously working for you?

      Keep in mind that the Runcommand window's control scheme is limited to up, down, left and right, as well as 'A' on a standard controller and up, down, left and right, as well as 'Enter' on a keyboard. If the xboxdrv mapping differs from these two schemes, it's unlikely to work.

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

      hansolo77H 1 Reply Last reply Reply Quote 0
      • hansolo77H
        hansolo77 @mediamogul
        last edited by

        @mediamogul I thought I had it working, but I could be mistaken. I don't really need to get into the RunCommand window, other than when I need to try an experiment with an alternative LibRetro core. Realizing I couldn't do it with my Xbox controller led me to discover that it works with an NES controller. But even then, navigating doesn't work, or at least, not correctly. I press up on the NES controller, and the selector scrolls down. None of the A/B/Start buttons work. It's a bummer for sure. I guess there's no happy solution. I'm looking at "KEYBOARD ONLY" for RunCommand navigation, and "ORIGINAL CONTROLLER" (not Xbox) for triggering it.

        Who's Scruffy Looking?

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

          @hansolo77

          It sounds like a mapping issue that may originate from the base xboxdrv controller map, where you might have accidentally mapped the physical 'Up' button to the virtual 'Down' button on the simulated xbox controller that xboxdrv creates. If this is so, when you then mapped 'Up' inside of Emulation station, it would set the 'Down' direction as being 'Up', which would work fine in all of the RetroArch emulators, but still be read as 'Down' in any software that doesn't use the configuration that ES created, such as the Runcommand menu. Of course, it's just a guess. These types of issues can be a bit like untangling Christmas tree lights.

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

          1 Reply Last reply Reply Quote 0
          • hansolo77H
            hansolo77
            last edited by

            Well, I started off today with NOTHING working. Now I'm back to at least the NES controllers working correctly through XboxDRV. It's the strangest thing. I still can't do much inside of RunCommand other than press UP to go DOWN. Not sure what that's all about. But I also can't do the START+SELECT to exit a game with the NES controller. I think it has to do with the SELECT button not registering in RetroArch as the hotkey.

            Is there a way to override a key mapping per emulator? I know, that's a stupid question. But it seems like if I'm using XBOXDRV, there's no way to access the Controller Remap functionality for RetroArch. Or is there? I think I need to experiment more. Maybe it works like it's supposed to, but I have the SELECT button mapped wrong.

            Who's Scruffy Looking?

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

              @hansolo77 said in XBOXDRV Guidance Needed:

              But it seems like if I'm using XBOXDRV, there's no way to access the Controller Remap functionality for RetroArch. Or is there?

              It should work all the same. RetroArch should map the simulated XBox controller to it's own 'RetroPad' and allow it to be remapped from the GUI just like anything else. Even if you're keymapping, RetroArch should map those keys to it's 'RetroPad' so long as they correspond to the keyboard controls you set in Emulation Station.

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

              1 Reply Last reply Reply Quote 0
              • hansolo77H
                hansolo77
                last edited by

                OK new problem... :(

                How can I get it to pull the USB EVENT by-id? I get it working like I want it, then turn the system off and back on, and its not working. Every time I reboot, the /dev/input/event## changes. Sometimes its /dev/input/event3 other times it's /dev/input/event4. So to get around that with my Xbox controller way back with SORR, I set it to use /dev/input/by-id. The problem is that the controller is one of 2, and the event-joystick only offers 1 choice. When I evtest that, it only gives me the keys for Controller 2. :( UHG!

                Who's Scruffy Looking?

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

                  @hansolo77

                  Your controller's ID can be discovered with ls /dev/input/by-id/. However, if it doesn't have an ID, you can also call out to the USB path where you know the controller is. For example, by adding:

                  --evdev /dev/input/by-path/platform-3f980000.usb-usb-0:1.2:1.0-event-joystick
                  

                  you're telling xboxdrv to map the controller in the upper, left USB port on a Pi 3. To discover the other path listings, plug a controller into whichever port you're looking to use and type ls /dev/input/by-path/.

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

                  1 Reply Last reply Reply Quote 0
                  • hansolo77H
                    hansolo77
                    last edited by hansolo77

                    I am figuratively pulling my hair out. Because I wasn't getting anywhere, I decided to start completely over. I deleted all the controller config files that RetroArch uses. I then disconnected the USB hub that the Mayflash Sega/Atari adapter and Raphnet NES adapter were connected to. I then replaced the retroarch.cfg file with the default. I then went into the RetroPie-Setup scripts and triggered the ES function to reset ALL controllers (removing them and prompting for a re-configure). That should put me back to bare minimum with no configured controllers right? Well...

                    With everything still disconnected, except for the Xbox controller, I turned the machine off then back on. ES prompted for input. I configured ONLY the Xbox controller. I then tried to load up a game. The game loads, but none of the controls do. WTF. OMG I can't believe it. Not even the USB keyboard I have is being recognized by RetroArch.

                    This is crazy. I'm restoring my backup SD card and just living with it the way it was. I can't figure out what's going on, and it's really upsetting me. With NOTHING connected, bare essentials, it should work with whatever is picks up is connected. It used to work fine until I updated RetroArch. Now I got nothing but trouble.

                    Who's Scruffy Looking?

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

                      @hansolo77

                      I can definitely relate. It's situations like your having where you almost start believing in poltergeists or gremlins. I hope it works out. Just tag me in if you decide to give it another go down the road.

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

                      hansolo77H 1 Reply Last reply Reply Quote 0
                      • hansolo77H
                        hansolo77 @mediamogul
                        last edited by

                        @mediamogul

                        Oh you bet I will. :) Honestly, I think I just need to sleep this off and come back some other day. I don't want to ruin my vacation being pissed off at this thing. It's supposed to be enjoyable. lol

                        Who's Scruffy Looking?

                        1 Reply Last reply Reply Quote 0
                        • hansolo77H
                          hansolo77
                          last edited by hansolo77

                          @mediamogul
                          Back at it again. I started with your doc you wrote on how to set this all up. You indicated a possible workaround using a SYMLINK in the dev rules so you can get proper remaps with Bluetooth controllers. This got me thinking. Since part of the problem I seem to be having is due to the devices being enumerated differently on bootups, could I use this method here? The only obstacle is that the ATTRS{name} and ID_MODEL is the same for both event's. There is only 1 USB plug, but it has 2 controller connectors on it. Is there a way to create the SYMLINK dev rule another way? Without it requiring those two indicators? Maybe an alternative?

                          Here is what I'm looking at (evtest):

                          Available devices:
                          /dev/input/event1:      Microsoft Microsoft® 2.4GHz Transceiver v8.0
                          /dev/input/event2:      Microsoft Microsoft® 2.4GHz Transceiver v8.0
                          /dev/input/event3:      Microsoft Microsoft® 2.4GHz Transceiver v8.0
                          /dev/input/event4:      raphnet.net nes2usb
                          /dev/input/event5:      raphnet.net nes2usb
                          /dev/input/event6:      Mayflash Ltd Mayflash MD USB Adapter
                          /dev/input/event7:      Mayflash Ltd Mayflash MD USB Adapter
                          

                          Essentially (for this part), the event4 and event5 devices change to 3/4 respectively on the occasion. This typically happens based on whether or not the Xbox Controller is turned on (not listed now because it's off).


                          EDIT - Guess I was wrong there too. I turned ON the Xbox Controller, and re-ran the evtest. It sets the controller up on event0 and the NES events didn't change. I don't get it. :(


                          EDIT 2 - Tried again. Turned the system off, Xbox Controller off, boot up, evtest shows the NES controllers now on event3 and event4. Then I turn on the Xbox controller, and evtest shows it on event7 now. So I definitely need to establish some kind of rule that would allow me to map the controller based on it's "name" (symlink) rather than by it's event id.


                          EDIT 3 - Did another test. This time evtest comes up with the Xbox controller on event5. So maybe it's the Xbox controller that's being unreliable, and depending on where the Pi installs it to determines the placement of all the other controller events. In either case, I still need to do something to assign the devices to specific events or something.

                          Who's Scruffy Looking?

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

                            @hansolo77 said in XBOXDRV Guidance Needed:

                            In either case, I still need to do something to assign the devices to specific events or something.

                            The symlinking you mentioned would probably do the job, but the whole udev process to achieve it might be overkill in your case. As long as your controller is always plugged into the same port, assigning the mappings via /dev/input/by-path/ is always a very reliable option. I actually have to use this method, as I use four identical controllers and they all naturally share the same ID information.

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

                            1 Reply Last reply Reply Quote 0
                            • hansolo77H
                              hansolo77
                              last edited by

                              Any chance I could get you to elaborate? :) I could probably figure it out on my own, but you 'd probably know how to do it faster.

                              Who's Scruffy Looking?

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

                                @hansolo77

                                Sure. Just plug your controller into whichever port you plan on keeping it in, then run ls /dev/input/by-path/. As an example, a controller plugged into the upper, left usb port on a Pi 3 will likely read as being; platform-3f980000.usb-usb-0:1.2:1.0-event-joystick. After you have that, you'd just add it to your xboxdrv config as:

                                --evdev /dev/input/by-path/platform-3f980000.usb-usb-0:1.2:1.0-event-joystick
                                

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

                                hansolo77H 1 Reply Last reply Reply Quote 0
                                • hansolo77H
                                  hansolo77 @mediamogul
                                  last edited by

                                  @mediamogul Thanks, I'll take a look at it soon as I finish dinner!

                                  Who's Scruffy Looking?

                                  1 Reply Last reply Reply Quote 0
                                  • hansolo77H
                                    hansolo77
                                    last edited by hansolo77

                                    @mediamogul said in XBOXDRV Guidance Needed:

                                    ls /dev/input/by-path/

                                    So these "paths" will never change as long as I keep the adapters connected on the same ports?


                                    EDIT This still won't work for me. I did an evtest of each event-joystick and it only gives me the player 1 port of the adapter.

                                    Who's Scruffy Looking?

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

                                      @hansolo77

                                      Did two listings show up with ls /dev/input/by-path/?

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

                                      hansolo77H 1 Reply Last reply Reply Quote 0
                                      • hansolo77H
                                        hansolo77 @mediamogul
                                        last edited by hansolo77

                                        @mediamogul When I do ls /dev/input/by-path, I get this:

                                        platform-3f980000.usb-usb-0:1.2:1.0-event-joystick      platform-3f980000.usb-usb-0:1.4.1.2:1.0-event-joystick  platform-3f980000.usb-usb-0:1.4.3:1.0-event-kbd
                                        platform-3f980000.usb-usb-0:1.2:1.0-joystick            platform-3f980000.usb-usb-0:1.4.1.2:1.0-joystick        platform-3f980000.usb-usb-0:1.4.3:1.1-event-mouse
                                        platform-3f980000.usb-usb-0:1.4.1.1:1.0-event-joystick  platform-3f980000.usb-usb-0:1.4.1.2:1.1-event-joystick  platform-3f980000.usb-usb-0:1.4.3:1.1-mouse
                                        platform-3f980000.usb-usb-0:1.4.1.1:1.0-joystick        platform-3f980000.usb-usb-0:1.4.1.2:1.1-joystick        platform-3f980000.usb-usb-0:1.4.3:1.2-event-kbd
                                        

                                        I tested each event-joystick, and I came up with this:

                                        Xbox
                                        platform-3f980000.usb-usb-0:1.2:1.0-event-joystick
                                        
                                        Raphnet
                                        platform-3f980000.usb-usb-0:1.4.1.1:1.0-event-joystick
                                        
                                        MayFlash
                                        platform-3f980000.usb-usb-0:1.4.1.2:1.0-event-joystick
                                        
                                        MayFlash
                                        platform-3f980000.usb-usb-0:1.4.1.2:1.1-event-joystick
                                        

                                        So while it would work with the MayFlash (Atari/Sega) it only saw one entry for the the Raphnet (NES). When I do an generic evtest I get this:

                                        No device specified, trying to scan all of /dev/input/event*
                                        Not running as root, no devices may be available.
                                        Available devices:
                                        /dev/input/event0:      Xbox 360 Wireless Receiver
                                        /dev/input/event1:      Microsoft Microsoft® 2.4GHz Transceiver v8.0
                                        /dev/input/event2:      Microsoft Microsoft® 2.4GHz Transceiver v8.0
                                        /dev/input/event3:      Microsoft Microsoft® 2.4GHz Transceiver v8.0
                                        /dev/input/event4:      raphnet.net nes2usb
                                        /dev/input/event5:      raphnet.net nes2usb
                                        /dev/input/event6:      Mayflash Ltd Mayflash MD USB Adapter
                                        /dev/input/event7:      Mayflash Ltd Mayflash MD USB Adapter
                                        

                                        So it looks like it sees multiple events but for a single device (which makes sense). But it doesn't do it that way with the MayFlash.


                                        EDIT - If I run evtest /dev/input/by-path/, I get this:

                                        evtest: can't get version: Inappropriate ioctl for device
                                        

                                        EDIT 2 - If I run ls /dev/input/by-id, I get this:

                                        usb-Mayflash_Ltd_Mayflash_MD_USB_Adapter-event-joystick            usb-Microsoft_Microsoft®_2.4GHz_Transceiver_v8.0-if01-mouse
                                        usb-Mayflash_Ltd_Mayflash_MD_USB_Adapter-if01-event-joystick       usb-Microsoft_Microsoft®_2.4GHz_Transceiver_v8.0-if02-event-kbd
                                        usb-Mayflash_Ltd_Mayflash_MD_USB_Adapter-if01-joystick             usb-©Microsoft_Xbox_360_Wireless_Receiver_for_Windows_E1594E70-event-joystick
                                        usb-Mayflash_Ltd_Mayflash_MD_USB_Adapter-joystick                  usb-©Microsoft_Xbox_360_Wireless_Receiver_for_Windows_E1594E70-joystick
                                        usb-Microsoft_Microsoft®_2.4GHz_Transceiver_v8.0-event-kbd         usb-raphnet.net_nes2usb_1228-event-joystick
                                        usb-Microsoft_Microsoft®_2.4GHz_Transceiver_v8.0-if01-event-mouse  usb-raphnet.net_nes2usb_1228-joystick
                                        

                                        Looks like it's only seeing 1 raphnet there too. :(

                                        Who's Scruffy Looking?

                                        hansolo77H 1 Reply Last reply Reply Quote 0
                                        • hansolo77H
                                          hansolo77 @hansolo77
                                          last edited by

                                          @hansolo77 @mediamogul
                                          I think I need to do this:
                                          http://www.raphnet-tech.com/support/retropie/

                                          Who's Scruffy Looking?

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

                                            @hansolo77

                                            The adapters that have multiple ports are notoriously difficult to map outside of Windows and they're all pretty much set up the same way. An example that I've worked with personally is the Mayflash Gamecube to WiiU adapter. In it's USB mode, all the ports register as being one device also. The only way I could get it working with my RetroPie setup was to use Toadking's driver in WiiU mode. It's been a while, but as I recall, there's a certain aspect of the USB HID spec that is responsible for delineating the multiple ports and it's unique to Windows for some reason.

                                            Edit:

                                            I think I need to do this:
                                            http://www.raphnet-tech.com/support/retropie/

                                            Looks like your right as per:

                                            "The way multi-player adapters and boards are implemented make them appear as one single controllers in Linux. For instance, the adapters based on the 4nes4snes board (eg: Four SNES to USB) used to register as a joystick with 4 pairs of axes, and 32 buttons (8 per controller). But at some point, this became 2 axis (a mix of all controllers) but still 32 buttons.

                                            To fix this problem, I wrote a kernel patch to make the adapters appear as a set of independant controllers in march 2015 and it was included in the Linux kernel starting at version 4.2.0. With this patch, things are cleaner than ever. But as 2016-05-02, the kernel included in the RetroPie SD images is still one of the 4.1 series... So besides waiting, what can one do? Of course geting the kernel sources, applying the patch, compiling and installing it! But there is an easier way."

                                            This will likely do the job and it's great to see that this addition is waiting around the corner in a future kernal update. Seeing as how several adapters use this same method, hopefully this will solve the issue all around.

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

                                            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.