• 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

Guide: Advanced Controller Mappings

Scheduled Pinned Locked Moved Help and Support
joystickcontrollermappingxboxdrvscummvm
626 Posts 35 Posters 460.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.
  • H
    Hubz
    last edited by 21 Mar 2017, 16:00

    Is there any place where we're keeping mappings for systems and various controllers? I've got a Wii U Pro Controller I've been setting all mine up as and would be happy to share. I just spent a few hours figuring out mapping it for VICE which was a pain in the ass and I'd like to share to save someone else the trouble :P

    M E 2 Replies Last reply 21 Mar 2017, 16:41 Reply Quote 0
    • M
      mediamogul Global Moderator @Hubz
      last edited by 21 Mar 2017, 16:41

      @Hubz

      It's not a bad idea, but there are so many physical button variations in all the controllers out there and so many personal preferences as to how the end result should be that any collection would really only serve as a list of examples to start from. I've always encouraged people to post their finished examples here, but I'll be the first to admit that it's far from organized.

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

      1 Reply Last reply Reply Quote 0
      • E
        ExarKunIv @Hubz
        last edited by 21 Mar 2017, 16:49

        @Hubz

        i second your thought.
        i have a 8bitdo NES30 pro

        and i would love you share my mappings too help people

        RPi3B+ / 200GB/ RetroPie v4.5.14, RPi4 Model B 4gb / 256gb / RetroPie 4.8.2
        RPi5 4gb / 512gb / RetroPie 4.8.9 -Basic
        Maintainer of RetroPie-Extra .

        H 1 Reply Last reply 21 Mar 2017, 21:31 Reply Quote 0
        • H
          Hubz @ExarKunIv
          last edited by 21 Mar 2017, 21:31

          Here's my xboxdrv config for the Wii U Pro Controller -

          basicWiiUPro="sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv
          --evdev /dev/input/event0
          --silent
          --detach-kernel-driver
          --force-feedback
          --deadzone-trigger 15%
          --deadzone 4000
          --device-name "WiiUProXboxDrv1"
          --calibration x1=-32767:0:32767,y1=-32767:0:32767,x2=-32767:0:32767,y2=-32767:0:32767
          --trigger-as-button
          --mimic-xpad
          --dpad-as-button
          --evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_RX=x2,ABS_RY=y2
          --evdev-keymap BTN_EAST=a,BTN_SOUTH=b,BTN_NORTH=x,BTN_WEST=y,BTN_TL=lb,BTN_TR=rb,BTN_THUMBL=tl,BTN_THUMBR=tr,BTN_SELECT=back,BTN_START=start,BTN_DPAD_UP=du,BTN_DPAD_DOWN=dd,BTN_DPAD_LEFT=dl,BTN_DPAD_RIGHT=dr,BTN_TL2=lt,BTN_TR2=rt"

          H 1 Reply Last reply 21 Mar 2017, 21:50 Reply Quote 1
          • H
            Hubz @Hubz
            last edited by 21 Mar 2017, 21:50

            I prefer using Y and B instead of B and A on my controllers so these are mapped for that. At least these could be used as a starting point for others.

            scummVM="--axismap -Y1=Y1,-Y2=Y2
            --ui-axismap x1=REL_X:10,y1=REL_Y:10
            --ui-buttonmap b=BTN_LEFT,y=BTN_RIGHT,back=KEY_LEFTCTRL+KEY_Q,start=KEY_F5
            --ui-buttonmap guide=void,x=KEY_ENTER,a=KEY_1,lb=void,rb=void,tl=void,tr=void,lt=void,rt=void,back=void
            --ui-axismap x2=void"

            amstradcpc="--axismap -Y1=Y1,-Y2=Y2
            --ui-buttonmap a=KEY_UNKNOWN,b=KEY_UNKNOWN,start=KEY_1,back=KEY_2,x=KEY_UNKNOWN,y=KEY_SPACE,lt=KEY_UNKNOWN,rt=KEY_UNKNOWN,lb=KEY_UNKNOWN,rb=KEY_UNKNOWN,tl=KEY_UNKNOWN,tr=KEY_UNKNOWN
            --ui-axismap x2=KEY_1:KEY_2,Y2=KEY_3:KEY_4"

            amiga="--axismap -Y1=Y1,-Y2=Y2
            --ui-axismap x2=REL_X:10,y2=REL_Y:10
            --ui-axismap x1=KEY_LEFT:KEY_RIGHT,y1=KEY_DOWN:KEY_UP
            --ui-buttonmap du=KEY_UP,dd=KEY_DOWN,dl=KEY_LEFT,dr=KEY_RIGHT
            --ui-buttonmap lt=BTN_LEFT,rt=BTN_RIGHT,start=KEY_F12,back=KEY_F11,y=KEY_SPACE,a=KEY_LEFTCTRL,b=KEY_LEFTALT,x=KEY_LEFTSHIFT
            --ui-buttonmap guide=void,tl=void,tr=void
            --ui-axismap x2=void"

            c64="--ui-axismap x2=void
            --ui-axismap x1=KEY_LEFT:KEY_RIGHT,y1=KEY_DOWN:KEY_UP
            --ui-buttonmap du=KEY_UP,dd=KEY_DOWN,dl=KEY_LEFT,dr=KEY_RIGHT
            --ui-buttonmap lt=KEY_C,rt=void,start+back=KEY_Q,start=KEY_F12,back=KEY_ESC,y=KEY_V,a=KEY_BACK,b=KEY_ENTER,x=KEY_W
            --ui-buttonmap lb=KEY_Z,rb=KEY_X,guide=void,tl=KEY_C,tr=void"

            apple2="--ui-buttonmap du=KEY_UP,dd=KEY_DOWN,dl=KEY_LEFT,dr=KEY_RIGHT
            --ui-buttonmap lt=KEY_Y,rt=KEY_N,lb=KEY_F3,rb=KEY_ESC,start=KEY_1,back=KEY_2,y=void,a=KEY_ENTER,b=void,x=KEY_SPACE
            --ui-buttonmap guide=void,tl=void,tr=void
            --ui-axismap x2=void"

            intellivision="--ui-axismap X1=KEY_S:KEY_D,Y1=KEY_X:KEY_E,X2=KEY_1:KEY_2,Y2=KEY_3:KEY_4,lt+X2=KEY_5:KEY_6,lt+Y2=KEY_7:KEY_8,rt+X2=KEY_9:KEY_0,rt+Y2=KEY_MINUS:KEY_EQUAL
            --ui-buttonmap a=KEY_LEFTSHIFT,b=KEY_HOME,x=KEY_LEFTCTRL,y=KEY_LEFTALT,lb=KEY_F1,rb=KEY_F12,lt=KEY_HOME,rt=KEY_HOME,tl=KEY_HOME,tr=KEY_HOME,du=KEY_E,dd=KEY_X,dl=KEY_S,dr=KEY_D,start=KEY_KPENTER
            --ui-buttonmap back=cycle-key:KEY_F6:KEY_F5
            --ui-buttonmap guide=void"

            atari800="--buttonmap tl^toggle=tl
            --buttonmap tr^toggle=tr
            --ui-axismap X1=KEY_KP4:KEY_KP6,Y1=KEY_KP5:KEY_KP8
            --ui-axismap X2=KEY_1:KEY_2,Y2=KEY_3:KEY_4,lt+X2=KEY_5:KEY_6,lt+Y2=KEY_7:KEY_8,rt+X2=KEY_9:KEY_0,rt+Y2=KEY_KPASTERISK:KEY_EQUAL
            --ui-buttonmap y=KEY_RIGHTCTRL,b=KEY_F2,x=KEY_EQUAL,a=KEY_KPASTERISK,lb=KEY_F9,rb=KEY_F5,du=KEY_KP8,dd=KEY_KP5,dl=KEY_KP4,dr=KEY_KP6,start=KEY_F4,back=KEY_F3,lt=KEY_HOME,rt=KEY_HOME,tl=KEY_HOME,tr=KEY_HOME
            --ui-buttonmap lt+a=KEY_ENTER,lt+b=KEY_ESC,lt+du=KEY_UP,lt+dd=KEY_DOWN,lt+dl=KEY_LEFT,lt+dr=KEY_RIGHT,lt+start=KEY_F1
            --ui-axismap lt+X1=KEY_LEFT:KEY_RIGHT,lt+Y1=KEY_UP:KEY_DOWN
            --ui-axismap tl+x1=REL_X:10,tl+y1=REL_Y:10
            --ui-buttonmap tr+b=BTN_LEFT,tr+a=BTN_RIGHT
            --ui-buttonmap guide=void"

            atari5200="--buttonmap tl^toggle=tl
            --buttonmap tr^toggle=tr
            --ui-axismap X1=KEY_KP4:KEY_KP6,Y1=KEY_KP5:KEY_KP8
            --ui-axismap X2=KEY_1:KEY_2,Y2=KEY_3:KEY_4,lt+X2=KEY_5:KEY_6,lt+Y2=KEY_7:KEY_8,rt+X2=KEY_9:KEY_0,rt+Y2=KEY_KPASTERISK:KEY_EQUAL
            --ui-buttonmap y=KEY_RIGHTCTRL,b=KEY_F2,x=KEY_EQUAL,a=KEY_KPASTERISK,lb=KEY_F9,rb=KEY_F5,du=KEY_KP8,dd=KEY_KP5,dl=KEY_KP4,dr=KEY_KP6,start=KEY_F4,back=KEY_F3,lt=KEY_HOME,rt=KEY_HOME,tl=KEY_HOME,tr=KEY_HOME
            --ui-buttonmap lt+a=KEY_ENTER,lt+b=KEY_ESC,lt+du=KEY_UP,lt+dd=KEY_DOWN,lt+dl=KEY_LEFT,lt+dr=KEY_RIGHT,lt+start=KEY_F1
            --ui-axismap lt+X1=KEY_LEFT:KEY_RIGHT,lt+Y1=KEY_UP:KEY_DOWN
            --ui-axismap tl+x1=REL_X:10,tl+y1=REL_Y:10
            --ui-buttonmap tr+b=BTN_LEFT,tr+a=BTN_RIGHT
            --ui-buttonmap guide=void"

            videopac="--axismap -Y1=Y1,-Y2=Y2
            --ui-buttonmap a=KEY_UNKNOWN,b=KEY_UNKNOWN,start=KEY_1,back=KEY_2,x=KEY_UNKNOWN,y=KEY_UNKNOWN,lt=KEY_UNKNOWN,rt=KEY_UNKNOWN,lb=KEY_UNKNOWN,rb=KEY_UNKNOWN,tl=KEY_UNKNOWN,tr=KEY_UNKNOWN
            --ui-axismap x2=KEY_1:KEY_2,Y2=KEY_3:KEY_4"

            1 Reply Last reply Reply Quote 1
            • S
              spud11 @mediamogul
              last edited by 21 Mar 2017, 23:19

              @mediamogul Hi. I've now got it partially working:

              With advmame, configuring the buttons to keys in TAB, the following configuration does work in game:

              sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv \
              --silent \
              --detach-kernel-driver \
              --deadzone=4000 \
              --deadzone-trigger 15% \
              --force-feedback \
              --mimic-xpad \
              --trigger-as-button \
              --ui-buttonmap lb=void,rb=void,tl=void,tr=void,guide=void,lt=void,rt=void \
              --evdev /dev/input/by-path/platform-3f980000.usb-usb-0:1.3.2:1.0-event-joystick \
              --device-name "Player_3_-_4-Way_Joystick_xboxdrv" \
              --evdev-absmap ABS_X=x1,ABS_Y=y1 \
              --four-way-restrictor \
              --evdev-keymap BTN_TRIGGER=y,BTN_THUMB=a,BTN_THUMB2=back,BTN_PINKIE=x,BTN_TOP=b,BTN_TOP2=start \
              --ui-axismap X1=KEY_LEFT:KEY_RIGHT,Y1=KEY_UP:KEY_DOWN \
              --ui-buttonmap a=KEY_A,b=KEY_B,x=KEY_X,y=KEY_Y,back=KEY_E,start=KEY_T \
              &
              

              However, I need to rotate the screen to a vertical/cocktail orientation and it looks like the individual game .cfg files I use to achieve that only work with lr-mame and not Advmame. I understand that with Advmame I'd need to change Advmame's .rc file to rotate each individual game ( https://retropie.org.uk/docs/MAME/ ). I'd like to try to avoid that by using lr-mame2003 with my already established individual rom configs. (As well, the screen resolution for some reason appears a lot better in lr-mame2003 than it does in Advmame despite Advmame being built for vertically-oriented screens).

              With lr-mame2003, I've tested the code above on the commandline. It states the controller should be working. Entering cat/proc/bus/input/devices on the commandline produces:

              I: Bus=0003 Vendor=045e Product=028e Version=0110
              N: Name="Player_3_-_4-Way_Joystick_xboxdrv"
              P: Phys=
              S: Sysfs=/devices/virtual/input/input10
              U: Uniq=
              H: Handlers=kbd event10 
              B: PROP=0
              B: EV=20000b
              B: KEY=73c00000 0 0 0 0 0 1680 0 12000 40340000
              B: ABS=30018
              B: FF=1 3f870000 0 0
              

              It all appears fine. However, with those 2 extra lines of --ui code at the bottom, the joystick does not appear in Retroarch (even though I've already mapped the joystick to User 5 previously) and does not appear when I start lr-mame2003. Without those 2 lines of code, the joystick does appear in Retroarch. Really not sure why.

              RetroPie v4.4.1 • RPi3 Model B • 5.1V 2.5A PSU • 32GB SanDisk Extreme microSD • 2TB Toshiba Canvio Basics Portable USB 3.0 hard drive • 4 x DragonRise USB Arcade joysticks • 2 x TurboTwist spinners • 1 x USB trackball • 1 x PS4 wireless • 1 x 8BitDo Zero

              M 1 Reply Last reply 22 Mar 2017, 00:35 Reply Quote 0
              • M
                mediamogul Global Moderator @spud11
                last edited by 22 Mar 2017, 00:35

                @spud11

                By adding those two extra lines, you've told xboxdrv to also create a virtual keyboard and every time you press one of your mapped buttons, the system will think that it's coming from that new keyboard. As long as the xboxdrv mapped buttons correspond to the keyboard settings in RetroArch, you won't need to worry about the controller showing up or not.

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

                S 1 Reply Last reply 22 Mar 2017, 01:29 Reply Quote 0
                • S
                  spud11 @mediamogul
                  last edited by 22 Mar 2017, 01:29

                  @mediamogul Thanks. I think I'm getting there. Okay, so it's now a virtual keyboard and so Player_3_-_4-Way_Joystick_xboxdrv won't appear in Retroarch.

                  I've actually mapped the keys in Retroarch on my "normal" keyboard, but do I need to do this now and, if so, to which controller (eg I'm assuming to the underlying DragonRise controller that corresponds to Player_3_-_4-Way_Joystick_xboxdrv?)

                  Is the new virtual keyboard effectively the same as my normal keyboard? That is, if I designate keys "a", "b" etc on my "normal" keyboard in Retroarch to the joystick's buttons, is that the same as designating the keys on the virtual keyboard?

                  Do I need to have anything in the amidar.zip.cfg? I'm just checking that I don't need to specify a particular joystick to Player 1 (for example). I wouldn't have thought so as the joystick is now effectively a virtual keyboard. So I'm assuming none of the lines below are necessary:

                  input_player1_joypad_index = 2
                  input_player1_a = "a"
                  input_player1_b = "b"
                  input_player1_y = "y"
                  input_player1_x = "x"
                  input_player1_start = "t"
                  input_player1_select = "e"
                  input_player1_left = "left"
                  input_player1_right = "right"
                  input_player1_up = "up"
                  input_player1_down = "down"
                  

                  Do I need to do anything in the TAB menu in game eg assign the virtual (or "normal") keyboard's keys to particular actions (eg press left arrow on normal keyboard means player 1 moves left)?

                  Sorry about the sheer number of questions. It's just that I've tested once again and there's no movement with the joystick. I know that I'm gradually getting there but there's obviously a combination of things that I've done, and I'd say one of those is probably interfering with achieving the end result.

                  RetroPie v4.4.1 • RPi3 Model B • 5.1V 2.5A PSU • 32GB SanDisk Extreme microSD • 2TB Toshiba Canvio Basics Portable USB 3.0 hard drive • 4 x DragonRise USB Arcade joysticks • 2 x TurboTwist spinners • 1 x USB trackball • 1 x PS4 wireless • 1 x 8BitDo Zero

                  M 1 Reply Last reply 22 Mar 2017, 02:22 Reply Quote 0
                  • M
                    mediamogul Global Moderator @spud11
                    last edited by mediamogul 22 Mar 2017, 02:22

                    @spud11

                    Is the new virtual keyboard effectively the same as my normal keyboard?

                    Yes indeedy.

                    Do I need to have anything in the amidar.zip.cfg?

                    No, just the RetroArch settings.

                    Do I need to do anything in the TAB menu

                    Not if it's already set in RetroArch.

                    Sorry about the sheer number of questions.

                    Questions are like keys that unlock doors in our lives and work. The challenge is finding the right key to unlock the right door.

                    Your lucky numbers are:
                    12, 4, 7, 23, 17, 0

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

                    S 2 Replies Last reply 22 Mar 2017, 03:36 Reply Quote 1
                    • S
                      spud11 @mediamogul
                      last edited by spud11 22 Mar 2017, 03:36

                      @mediamogul On ya, mediamogul! I laughed at that.

                      After work, I'll give it a crack.

                      Just checking too - with the RetroArch menu, we're talking about entering it via emulationstation (which is what I've been doing ie the global retroarch.cfg in the opt folder etc), not the specific one for mame-libretro or for lr-mame2003 (sorry not in front of the Pi at present) and not the RetroArch GUI which can be brought up "in game"?

                      I reckon I should also rename the "default.cfg" to something else for lr-mame2003 - start with a clean slate or as clean as I can make it, so there's no joystick/key assignments in the TAB menu.

                      RetroPie v4.4.1 • RPi3 Model B • 5.1V 2.5A PSU • 32GB SanDisk Extreme microSD • 2TB Toshiba Canvio Basics Portable USB 3.0 hard drive • 4 x DragonRise USB Arcade joysticks • 2 x TurboTwist spinners • 1 x USB trackball • 1 x PS4 wireless • 1 x 8BitDo Zero

                      1 Reply Last reply Reply Quote 0
                      • S
                        spud11 @mediamogul
                        last edited by 22 Mar 2017, 10:43

                        @mediamogul Hi. Okay, I'm officially stumped. I haven't been able to get it working in game with lr-mame2003. Just not sure what is going on. Would you have any suggestions please?

                        RetroPie v4.4.1 • RPi3 Model B • 5.1V 2.5A PSU • 32GB SanDisk Extreme microSD • 2TB Toshiba Canvio Basics Portable USB 3.0 hard drive • 4 x DragonRise USB Arcade joysticks • 2 x TurboTwist spinners • 1 x USB trackball • 1 x PS4 wireless • 1 x 8BitDo Zero

                        M 1 Reply Last reply 22 Mar 2017, 13:50 Reply Quote 0
                        • M
                          mediamogul Global Moderator @spud11
                          last edited by 22 Mar 2017, 13:50

                          @spud11

                          Did you create a udev rule for the virtual keyboard? If not, instructions are at the tail end of section 3A in the guide.

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

                          S 1 Reply Last reply 22 Mar 2017, 22:39 Reply Quote 0
                          • S
                            spud11 @mediamogul
                            last edited by 22 Mar 2017, 22:39

                            @mediamogul I did, but I've now changed the name to mirror the name of the joystick based on comments in this thread. Would that be right? The terms of it are now:

                            SUBSYSTEM=="input", ATTRS{name}=="Player_3_-_4-Way_Joystick_xboxdrv", GROUP="users", MODE="0666", ENV{ID_INPUT_KEYBOARD}="1"
                            

                            RetroPie v4.4.1 • RPi3 Model B • 5.1V 2.5A PSU • 32GB SanDisk Extreme microSD • 2TB Toshiba Canvio Basics Portable USB 3.0 hard drive • 4 x DragonRise USB Arcade joysticks • 2 x TurboTwist spinners • 1 x USB trackball • 1 x PS4 wireless • 1 x 8BitDo Zero

                            M 1 Reply Last reply 22 Mar 2017, 22:40 Reply Quote 0
                            • M
                              mediamogul Global Moderator @spud11
                              last edited by 22 Mar 2017, 22:40

                              @spud11

                              Would that be right?

                              That depends. Is it working now?

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

                              S 1 Reply Last reply 22 Mar 2017, 23:40 Reply Quote 0
                              • S
                                spud11 @mediamogul
                                last edited by 22 Mar 2017, 23:40

                                @mediamogul Thanks for your patience, mediamogul. It does now work.

                                I've mapped your Player 2 keys to my third joystick in RetroArch (User 3), got the udev rule as above, went in game and needed to map the keyboard in TAB menu. The interesting thing is when you do that last bit eg Coin 1 and then press the "f" key for example, it will show "f RetroPad 3 Select". So it identifies the RetroPad correctly, and basically you know it is then working.

                                I had to change the up/down/left/right as my 3rd joystick is operating in portrait mode.

                                Final code - joystick to keys:

                                sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv \
                                --silent \
                                --detach-kernel-driver \
                                --deadzone=4000 \
                                --deadzone-trigger 15% \
                                --force-feedback \
                                --mimic-xpad \
                                --trigger-as-button \
                                --ui-buttonmap lb=void,rb=void,tl=void,tr=void,guide=void,lt=void,rt=void \
                                --evdev /dev/input/by-path/platform-3f980000.usb-usb-0:1.3.2:1.0-event-joystick \
                                --device-name "Player_3_-_4-Way_Joystick_xboxdrv" \
                                --evdev-absmap ABS_X=x1,ABS_Y=y1 \
                                --four-way-restrictor \
                                --evdev-keymap BTN_TRIGGER=y,BTN_THUMB=a,BTN_THUMB2=back,BTN_PINKIE=x,BTN_TOP=b,BTN_TOP2=start \
                                --ui-axismap X1=KEY_J:KEY_I,Y1=KEY_H:KEY_G \
                                --ui-buttonmap a=KEY_K,b=KEY_M,x=KEY_N,y=KEY_O,back=KEY_F,start=KEY_V \
                                &
                                

                                I've played a bit of Amidar. The only thing I'm unsure of is whether the --four-way-restrictor configuration actually works when the joystick is mapped to the keyboard (the main reason for trying xboxdrv). It doesn't feel like four way restrictor is working and, from the manual, it looks as though it only applies to analog configurations:

                                "--four-way-restrictor
                                The --four-way-restrictor option allows to limit the movement on both analogsticks to only four directions (up, down, left, right), the diagonals (up/left, up/right, down/left, down/right) are filtered out from the output. This option is useful for games such as Tetris, that don't need diagonals and where you don't want to accidently trigger the down-move while trying to do a left/right move."

                                Thanks for your assistance and patience.

                                RetroPie v4.4.1 • RPi3 Model B • 5.1V 2.5A PSU • 32GB SanDisk Extreme microSD • 2TB Toshiba Canvio Basics Portable USB 3.0 hard drive • 4 x DragonRise USB Arcade joysticks • 2 x TurboTwist spinners • 1 x USB trackball • 1 x PS4 wireless • 1 x 8BitDo Zero

                                M 1 Reply Last reply 22 Mar 2017, 23:52 Reply Quote 0
                                • M
                                  mediamogul Global Moderator @spud11
                                  last edited by mediamogul 22 Mar 2017, 23:52

                                  @spud11

                                  The only thing I'm unsure of is whether the --four-way-restrictor configuration actually works when the joystick is mapped to the keyboard... from the manual, it looks as though it only applies to analog configurations

                                  I've tested it with keyboard, mouse, as well as normal controller input and the four-way restrictor has always worked for me. If the map is active and the restrictor is set, chances are that everything is performing as it should. The feel of some games are just more obvious than others. Try a game of 'Ms Pac-Man' with and without the restrictor and see if you get hung up on the corners without. If there is a problem, I'd guess it has to do with setting the controls in the TAB menu, as that shouldn't be necessary.

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

                                  S 1 Reply Last reply 23 Mar 2017, 00:33 Reply Quote 0
                                  • S
                                    spud11 @mediamogul
                                    last edited by 23 Mar 2017, 00:33

                                    @mediamogul Hi. Thanks for that. I'll give Ms Pacman a go after work and see how that goes and let you know.

                                    RetroPie v4.4.1 • RPi3 Model B • 5.1V 2.5A PSU • 32GB SanDisk Extreme microSD • 2TB Toshiba Canvio Basics Portable USB 3.0 hard drive • 4 x DragonRise USB Arcade joysticks • 2 x TurboTwist spinners • 1 x USB trackball • 1 x PS4 wireless • 1 x 8BitDo Zero

                                    M 1 Reply Last reply 23 Mar 2017, 00:47 Reply Quote 0
                                    • M
                                      mediamogul Global Moderator @spud11
                                      last edited by 23 Mar 2017, 00:47

                                      @spud11

                                      I'll give Ms Pacman a go after work

                                      Just remember that eating ghosts in a video game can be fun, but in real life it's disrespectful.

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

                                      S 1 Reply Last reply 23 Mar 2017, 08:28 Reply Quote 1
                                      • S
                                        spud11 @mediamogul
                                        last edited by 23 Mar 2017, 08:28

                                        @mediamogul Hi. Thanks so much for helping me - I've eaten some ghosts! Four way restrictor mode definitely appears to work!

                                        I looked at the code again and realised I was probably making a meal of things (pun definitely intended). I went into TAB in game, and into the Input (general) sub-menu, wrote down all of the keys and then just mapped those keys directly to the joystick buttons in xboxdrv. The code now looks like this:

                                        sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv \
                                        --silent \
                                        --detach-kernel-driver \
                                        --deadzone=4000 \
                                        --deadzone-trigger 15% \
                                        --force-feedback \
                                        --mimic-xpad \
                                        --trigger-as-button \
                                        --ui-buttonmap lb=void,rb=void,tl=void,tr=void,guide=void,lt=void,rt=void \
                                        --evdev /dev/input/by-path/platform-3f980000.usb-usb-0:1.3.2:1.0-event-joystick \
                                        --device-name "Player_3_-_4-Way_Joystick_xboxdrv" \
                                        --evdev-absmap ABS_X=x1,ABS_Y=y1 \
                                        --four-way-restrictor \
                                        --evdev-keymap BTN_TRIGGER=y,BTN_THUMB=a,BTN_THUMB2=back,BTN_PINKIE=x,BTN_TOP=b,BTN_TOP2=start \
                                        --ui-axismap X1=KEY_DOWN:KEY_UP,Y1=KEY_RIGHT:KEY_LEFT \
                                        --ui-buttonmap a=KEY_LEFTCTRL,b=KEY_LEFTALT,x=KEY_SPACE,y=KEY_LEFTSHIFT,back=KEY_5,start=KEY_1 \
                                        &
                                        

                                        The joystick buttons now correspond to Player 1's default keys in TAB. The ui-axismap settings reflect the fact that joystick 3 is on the side of the arcade table (ie in portrait mode, rather than landscape), so I needed to change the axes around after some trial and error.

                                        My /etc/udev/rules.d/990xboxdrv file looks like this:

                                        SUBSYSTEM=="input", ATTRS{name}=="Player_3_-_4-Way_Joystick_xboxdrv", GROUP="users", MODE="0666", ENV{ID_INPUT_KEYBOARD}="1"
                                        

                                        Now there are only 2 other things I need to do and that is to get Player 2 up and running properly and then to transcribe the new code into runcommand-onstart.sh and list all of the relevant 4-way joystick games.

                                        With the first thing, I've tried to change the 99-xboxdrv.rules file so that it also gives me Player 2 but the second part of the code below does not work:

                                        SUBSYSTEM=="input", ATTRS{name}=="Player_3_-_4-Way_Joystick_xboxdrv", GROUP="users", MODE="0666", ENV{ID_INPUT_KEYBOARD}="1"
                                        SUBSYSTEM=="input", ATTRS{name}=="Player_4_-_4-Way_Joystick_xboxdrv", GROUP="users", MODE="0666", ENV{ID_INPUT_KEYBOARD}="2"
                                        

                                        Could you please assist me with this? Should there be an entirely different file for the second keyboard? I just guessed the "2" at the end. Or is it as simple as adding an "&" at the end of the line or something similar?

                                        RetroPie v4.4.1 • RPi3 Model B • 5.1V 2.5A PSU • 32GB SanDisk Extreme microSD • 2TB Toshiba Canvio Basics Portable USB 3.0 hard drive • 4 x DragonRise USB Arcade joysticks • 2 x TurboTwist spinners • 1 x USB trackball • 1 x PS4 wireless • 1 x 8BitDo Zero

                                        M 1 Reply Last reply 23 Mar 2017, 08:41 Reply Quote 0
                                        • M
                                          mediamogul Global Moderator @spud11
                                          last edited by 23 Mar 2017, 08:41

                                          @spud11

                                          I believe keeping it as "1" should still work. If that doesn't work, try creating a second file.

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

                                          S 1 Reply Last reply 23 Mar 2017, 22:48 Reply Quote 0
                                          355 out of 626
                                          • First post
                                            355/626
                                            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