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 35.7k 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.
    • hansolo77H
      hansolo77
      last edited by

      Woot! Got Atari800 working, and using $2 = atari800 in the onstart script. This now works with the Atari 5200 and the Atari 800. Next up: mapping the joysticks to work with the Atari 2600/7800/ST.

      :)

      Question to @mediamogul - Do you have an occasional hiccup with the Atari800 emulator not recognizing the keyboard when you boot it up through XBOXDRV? I've had maybe 1 in 3 boots where the keyboard is dead and I have to hit F9 to exit the emulator and try again. It's pretty annoying, especially when you have to use the keyboard to select what size ROM you have in the 5200 system. Also, I noticed in like the Frogger 2 game, I can't move unless I press the fire button, was it always like that? In Galaxian on the 800 system, I couldn't get the joystick to work right (it was left/right reversed) unless I set it to play 2 players. Any idea what that's all about?

      Thanks again!

      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:

        Do you have an occasional hiccup with the Atari800 emulator not recognizing the keyboard when you boot it up through XBOXDRV?

        I believe that's all tied into a bug found in the Atari800 emulator itself. After almost any setting is altered from the Atari800 GUI and saved, it will corrupt the configuration file and cause these types of issues. If this is the case, you'll need to delete the current configuration file and allow the program to generate a new one to regain stability. Once recreated, you can still alter any settings you wish from an external solution such as nano without issue.

        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

          Thanks for that. I'll try doing that. It's too bad RetroArch never established any kind of open-source port of an emulator for these systems.

          Who's Scruffy Looking?

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

            @hansolo77

            I think they're currently working on an Atari800 core, but I might be mistaken. There are ups and downs to RetroArch cores though. If you look at their implementation of Stella for example, it lacks the capability to play many 2600 games, due to a lack of keypad, paddle and trackball support. I'm sure they'll get around to adding all that some day, but until then I'll be using the standalone version with bonus Mindlink support.

            mindlink

            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

              LOL!!! "My head hurts from playing with my eyebrows".

              Got Atari 2600 and Atari 7800 working now too. Since they're both RetroArch, their configurations were the same. :) :) :) Next up.. ST.

              Who's Scruffy Looking?

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

                Ok I'm lost. I realized I don't have my Atari ST stuff set up yet, so I'm moving on to Sega Genesis/MasterDrive. Now to start, the default/auto configuration using both original 6-button pads works fine. But to remap inside XBOXDRV is giving me a migraine tonight. I'm using the same connectors as I did with the Atari joysticks, so I'm using the same "device name" and event numbers. The only thing I'm really changing is the addition of the extra buttons. Player 1 works fine. Once I go to add the Player 2 though, I can't get the START button to work. I'm testing in Mortal Kombat 3, since I know it defaults to 6-button layout and has 2-player support. The idea of the game is that you start it up to the character selection screen, then press START on Player 2 to add that player. Nothing works, and the timer eventually ticks out and the game starts. Here is my current test script:

                #!/bin/bash
                sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv \
                    --evdev /dev/input/event5 \
                    --detach-kernel-driver \
                    --device-name "ATARI_SEGA Player 1 (xboxdrv)" \
                    --evdev-absmap ABS_HAT0X=x1,ABS_HAT0Y=y1 \
                    --evdev-keymap BTN_TR=back,BTN_TR2=start \
                    --evdev-keymap BTN_SOUTH=y,BTN_EAST=b,BTN_C=a \
                    --evdev-keymap BTN_NORTH=lb,BTN_WEST=x,BTN_TL=rb \
                    --dpad-only \
                    --ui-axismap x1=KEY_LEFT:KEY_RIGHT,y1=KEY_DOWN:KEY_UP \
                    --ui-buttonmap y=KEY_Y,b=KEY_B,a=KEY_A,lb=KEY_L,x=KEY_X,rb=KEY_R,start=KEY_T,back=KEY_E \
                &
                sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv \
                    --evdev /dev/input/event6 \
                    --detach-kernel-driver \
                    --device-name "ATARI_SEGA Player 2 (xboxdrv)" \
                    --evdev-absmap ABS_HAT0X=x1,ABS_HAT0Y=y1 \
                    --evdev-keymap BTN_TR=back,BTN_TR2=start \
                    --evdev-keymap BTN_SOUTH=y,BTN_EAST=b,BTN_C=a \
                    --evdev-keymap BTN_NORTH=lb,BTN_WEST=x,BTN_TL=rb \
                    --dpad-only \
                    --ui-axismap x1=KEY_G:KEY_H,y1=KEY_J:KEY_I \
                    --ui-buttonmap x=KEY_N,a=KEY_K,b=KEY_M,lb=KEY_P,y=KEY_O,rb=KEY_Q \
                    --ui-buttonmap start=KEY_KP9,back=KEY_KP0 \
                &
                /opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-picodrive/picodrive_libretro.so --config /opt/retropie/configs/megadrive/retroarch.cfg "/home/pi/RetroPie/roms/megadrive/Mortal Kombat 3 (USA).md"
                sudo killall xboxdrv
                

                Now I have done all kinds of testing, and everything looks correct. I thought maybe RetroArch was having trouble with the mapping of the Player 2 Start button to "NUM_9", but it turns out it works fine for the NES. I then thought maybe my Player 2 controller wasn't working, so I swapped it, and it's working fine. I then opened up an SSH terminal, ran the command for just Player 2's xboxdrv, then opened another SSH terminal to do a jstest and evtest on the newly created entries. Both of them seem to be picking up all the correct signals. EVTEST even shows that the key being transmitted is the correct KEY_KP9. So I'm completely lost here.

                Got any ideas?

                Who's Scruffy Looking?

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

                  @hansolo77

                  Well, you're nothing if not thorough. You've tried just about everything I would recommend. If you eliminate xboxdrv from the equation, do the assigned keys function if entered from a keyboard?

                  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

                    Hmm, never tried that. I'm actually shocked I didn't think of it. I used to be Tier 3 tech support. Going "off the script" and thinking of absolutely everything to eliminate all possibilities is just how I operate. I think that's why I'm probably able to grasp this better than other people. I've been trained on detective work, in a sense.

                    I've turned off my system for the night. I gotta eat dinner real quick and head to bed, work early tomorrow. Thanks for the suggestion, I'll give it a go when I get home tomorrow!

                    Who's Scruffy Looking?

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

                      Ok, just got home, tried running the game from within EmulationStation (rather than my test script). Pressing num0 and num9 doesn't register in RetroArch. The EVTEST I ran yesterday confirms it's at least sending it. So the problem must be that RetroArch doesn't recognize that as a valid mappable key. I did some Googling, as RetroArch has NOTHING on a list of available keys. Turns out the left shift (shift) and right shift (rshift) ARE available, so I edited the retroarch.cfg file and changed Start to shift and select to rshift. Loaded up the game, and it works! So, either you're using an outdated keymap list for your player 2, or maybe you just never encountered a need to press Start on Player 2. After thinking about it, there was no reason to do that in my tests on the NES. I was testing with Bubble Bobble, because I knew it had a 2 player option, but that 2nd player is set up from the opening menu, rather than you pressing a button to activate it.

                      I'm glad I got it figured out. That would have been a hex on the whole thing if I couldn't make it work. Thanks again for that suggestion to test it. Had I not done that, I would have been completely lost.

                      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:

                        or maybe you just never encountered a need to press Start on Player 2

                        This is most likely the case. Looks like I'll have to switch things up a bit myself.

                        Thanks again for that suggestion to test it.

                        Not a problem. I'm glad it helped lead to a solution.

                        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

                          @mediamogul - Off another day tomorrow (typically Sundays and Thursdays) so that means more XBOXDRV time. :) I have a further need of your assistance, but I'm getting close to nailing this! Have you managed to map any "shifted" button combinations? The only thing my mini Sega Genesis hub is missing is a RESET button (which I have configured to exit out of games on my NES full size case). Since I'm primarily using the Sega hub with some USB controlled Sega 6-button controllers, I don't have a good clean way to exit out of games that aren't automatically supported through RetroArch. I'm speaking, of course, of the "Streets of Rage Remix" port. The only way I can exit out of that game right now is by having a keyboard attached and hit the ESCAPE key on the main menu, or turn the system off. I'd like to program (in XBOXDRV) a similar escape method of START+BACK (mode in Sega's case). Since the Start and Mode buttons are already mapped in the system, I wasn't sure how to set up a combo. Would it work if I did something like:

                          --ui-buttonmap start=KEY_A,back=KEY_B,start+back=KEY_C
                          

                          Where I have a key for start, a key for back, and a third key for start+back? I thought I read in the official documentation for the driver (not the RetroPie wiki) that this is possible. I might have the commands wrong though. I'm just looking for confirmation that this is a viable option (I'll fix the commands proper later).

                          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:

                            Have you managed to map any "shifted" button combinations?

                            Sure. I actually have all my emulators and ports mapped to exit out by pressing 'Select+Start'.

                            I might have the commands wrong though.

                            Your instincts are in fact right on the money. Also, if you should ever need to map this functionality to an emulator/port that uses a key combination to exit (let's say 'ctrl+q'), then the formatting is no more difficult than:

                            --ui-buttonmap back+start=KEY_LEFTCTRL+KEY_Q
                            

                            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

                              So this will still work even I have those buttons mapped to something else individually? Awesomesauce!

                              Who's Scruffy Looking?

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

                                @hansolo77

                                yesireebobbyjimbo.

                                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

                                  Grumble Grumble

                                  @mediamogul

                                  I hate opening up old threads, but it looks like I'm back into this whole XBOXDRV again. Turns out, I'm having issues where the RunCommand menu won't trigger with my Xbox controller on any of the systems I configured in the runconmmand-onstart.sh file. To counteract this, I tried adding a mapping inside the if/then statements to include the Xbox controller. But that doesn't work. I wonder if it's a mapping issue, and not necessarily a driver issue. I just did a simple cut and paste without really thinking about it.

                                  For starters, I'm having trouble with NES. Originally, I only had the Xbox controller, and it sent over proper autoconfigs from EmulationStation into RetroArch. I could also access the RunCommand menus with it just fine. Then I added the XboxDRV into the mix to use the original NES controllers. While they worked fine with the remapping, I lost the ability to access the RunCommand. This might be due to the re-working of my plugs on the Pi, and having to move them around. Right now, I can navigate ES, RetroArch, and play games with my Xbox Controller, but I can't access the RunCommand. If I attach an NES controller, I can access the RunCommand, but then I can't navigate inside it, nor does the controller work inside a game. The only way I can navigate RunConmmand is by using a keyboard, after triggering it from the NES controller.

                                  Sounds confusing.

                                  Xbox Controller - Works in ES, Doesn't Trigger RunCommand, Doesn't work in RunCommand, Works in RetroArch/Games
                                  NES Controller - Works in ES, Triggers RunCommand, Doesn't work in RunCommand, Doesn't work in RetroArch/Games
                                  Keyboard - Works in ES, Triggers RunCommand, Works in RunCommand, Works in RetroArch/Games

                                  Perhaps you can take a look and help me? :)

                                  Example from runcommand-onstart.sh :

                                  if [ "$1" = "nes" ]
                                  then
                                  sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv > /dev/null 2>&1 \
                                      --evdev /dev/input/by-id/usb-©Microsoft_Xbox_360_Wireless_Receiver_for_Windows_E1594E70-event-joystick \
                                      --detach-kernel-driver \
                                      --silent \
                                      --force-feedback \
                                      --deadzone-trigger 15% \
                                      --deadzone 4000 \
                                      --mimic-xpad \
                                      --dpad-as-button \
                                      --evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_RX=x2,ABS_RY=y2,ABS_Z=lt,ABS_RZ=rt \
                                      --evdev-keymap BTN_SOUTH=a,BTN_EAST=b,BTN_NORTH=x,BTN_WEST=y,BTN_TL=lb,BTN_TR=rb,BTN_THUMBL=tl,BTN_THUMBR=tr,BTN_MODE=guide,BTN_SELECT=back,BTN_START=start,BTN_TRIGGER_HAPPY3=du,BTN_TRIGGER_HAPPY4=dd,BTN_TRIGGER_HAPPY1=dl,BTN_TRIGGER_HAPPY2=dr \
                                      --ui-buttonmap x=KEY_X,a=KEY_C,b=KEY_V,lb=KEY_A,Y=KEY_S,rb=KEY_D \
                                      --ui-buttonmap guide=KEY_B,start=KEY_ENTER,back=KEY_ESC \
                                      --ui-buttonmap du=KEY_UP,dd=KEY_DOWN,dl=KEY_LEFT,dr=KEY_RIGHT \
                                  &
                                  sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv > /dev/null 2>&1 \
                                      --evdev /dev/input/event3 \
                                      --detach-kernel-driver \
                                      --device-name "NES Pad Player 1 (xboxdrv)" \
                                      --evdev-absmap ABS_X=x1,ABS_Y=y1 \
                                      --evdev-keymap BTN_TRIGGER=a,BTN_THUMB=b,BTN_THUMB2=back,BTN_TOP=start \
                                      --dpad-only \
                                      --ui-axismap x1=KEY_LEFT:KEY_RIGHT,y1=KEY_UP:KEY_DOWN \
                                      --ui-buttonmap start=KEY_T,back=KEY_E,b=KEY_B,a=KEY_A \
                                  &
                                  sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv > /dev/null 2>&1 \
                                      --evdev /dev/input/event4 \
                                      --detach-kernel-driver \
                                      --device-name "NES Pad Player 2 (xboxdrv)" \
                                      --evdev-absmap ABS_X=x1,ABS_Y=y1 \
                                      --evdev-keymap BTN_TRIGGER=a,BTN_THUMB=b,BTN_THUMB2=back,BTN_TOP=start \
                                      --dpad-only \
                                      --ui-axismap x1=KEY_G:KEY_H,y1=KEY_I:KEY_J \
                                      --ui-buttonmap start=KEY_LEFTSHIFT,back=KEY_RIGHTSHIFT,b=KEY_M,a=KEY_K \
                                  &
                                  fi
                                  

                                  I checked the input devices, and can confirm that even though I moved their locations physically on the Pi, the evdev /dev/input/device ## is stll the same.

                                  Who's Scruffy Looking?

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

                                    DERP - I think the problem with the controller INSIDE a game might be because I had to restore the original default retroarch.cfg file because the latest update to RetroArch was broke. GRR now I have MORE work to do. :(

                                    Who's Scruffy Looking?

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

                                      @hansolo77

                                      Good to see that you nailed down what the problem was. Half the time that's the hardest part.

                                      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 Yeah, but I'm not much closer now than I was a couple hours ago. Back to the old starting grounds.

                                        Who's Scruffy Looking?

                                        mediamogulM 1 Reply Last reply Reply Quote 0
                                        • 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
                                            • 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.