• 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.6k 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.
  • G
    grant2258 Banned
    last edited by grant2258 2 Dec 2019, 16:55 12 Feb 2019, 16:53

    Mame2003-plus has become very difficult for people to understand due to none legacy mode. First thing you want to do in mame2003 plus is update to the latest. Then you need to fix the input changes by deleting mame2003-plus/cfg contents.

    the next step is to choose you controller type
    options -> Control mapping ; analog_and_digital|digital (directions on lstick or dpad )
    if you undestand how mame works this sets you input general too use directions default on dhat or lstick)

    to make mame work like you are used to set the following
    options Input interface -> simultaneous (i named this mame and mark changed it back to simultaneous)

    no allow the mame mapping if you want to access the tab menu
    Legacy Remapping (restart) -> enabled

    restart you controls will work.

    I cant really speak for mame2003 havent tested the feauture on there mark ported it there works like is should in plus.

    1 Reply Last reply Reply Quote 0
    • G
      grant2258 Banned
      last edited by 12 Feb 2019, 17:29

      on another not just tested the latest mame2003 you will need to delete the mame2003/cfg dir as well the latest updates mark made requires it

      1 Reply Last reply Reply Quote 0
      • R
        Riverstorm
        last edited by 12 Feb 2019, 17:33

        @grant2258 - I think he was more focused on this statement:

        I've found that gameplay with lr-mame2003 4-way mode enabled has proven a little challenging in Pac-Man style games, and it will take some getting used to. For example... Instead of Pac-Man taking unwanted turns like in 8-way mode, he often just stops at an intersection, unless I've clearly anticipated the turn.

        so I replied with this:

        I think I know what you're talking about and occasionally get stuck/stopped turning on ladders in Donkey Kong or get a millisecond lag still but could never quite know for sure and as you said you adapt to it but it doesn't feel 100% correct until you accept it as normal. Funny how the mind works.

        Now that others are experiencing some of those same anomalies it might help looking into the issue. The dev @grant2258 that developed the feature loosely calls it "last direction" I believe. He tried a few methods and decided on this one.

        Basically the character will continue in the same direction (up, down, left, right) until a new direction (up, down, left, right) is pressed. I think that might leave a bit of room on the stick for a dead spots but I am not 100% sure.

        I think of it this way. There's 4 switches that equate to 8 directions. Which are up, down, left and right. The four angle directions are due to two switches being pressed simultaneously like up/right, up/left, down/right and down/left.

        When you're moving right in Pac-Man and decide to go up at a corner but instead you hit right/up vs up only I don't think it will make the turn until it's up only. I don't know if that makes sense but I wonder if that's where potential dead spot might be introduced. In true 4-way there is no angle only the four directions which leaves no dead spot.

        All this is just theory on my part but the dev that programmed the code would be able to answer it for sure.

        I can't fully explain how the 4-way mode works or if there's any room for improvement but it seems there's some dead spots in using Pac-Man in his example.

        1 Reply Last reply Reply Quote 0
        • G
          grant2258 Banned
          last edited by 12 Feb 2019, 17:43

          well need to fix the input issues with the latest mame2003 and plus needs the cfgs deleted because of changes. The latest mame2003 requires the same (i never changed anything on 2003). Since the input cfg files are important that needs dealt with because it can cause issues in itself. He can clarify after he updates.

          1 Reply Last reply Reply Quote 0
          • R
            Riverstorm
            last edited by 12 Feb 2019, 17:46

            @grant2258 - I am on the current build, I've wiped all cfg files and see the same issues as he explained above with 4-way but waiting for him to verify is fine, thanks.

            1 Reply Last reply Reply Quote 0
            • G
              grant2258 Banned
              last edited by grant2258 2 Dec 2019, 18:03 12 Feb 2019, 17:54

              well its simple a 4 way doesnt have a 8 directions it only has 4. so if you go right then press right/up you will keep on going right )or last direction pressed until you commit to another direction.

              you cant play 4 way like a 8way the directions simply dont exist. If you want 100% 4 way get a restriction even on a way pressing up/right is a 50/50 what way it will go depending on what way you hold a joystick and how hard you press it. There is no point in prediction it just produces bad directions randomly. Most people seem happy with it but id be happy to remove it if you think its not working. I only added it on request

              https://retropie.org.uk/forum/topic/17766/mame2003-plus-hundreds-of-new-games-improved-input-features-new-bugs-now-with-runahead-support/877

              the code is here if anyone fancied modding it feel free prs are very welcome.

              https://github.com/libretro/mame2003-plus-libretro/blob/0e1506554cc752e814a5b0d493dbf54b396fc238/src/inptport.c#L2665-L2737

              M 1 Reply Last reply 13 Feb 2019, 00:16 Reply Quote 0
              • R
                Riverstorm
                last edited by Riverstorm 2 Dec 2019, 18:07 12 Feb 2019, 18:06

                @grant2258 said in Guide: Advanced Controller Mappings:

                Most people seem happy with it but id be happy to remove it if you think its not working.

                Removing the 4-way feature entirely? That sounds a bit extreme, kind of like throwing the baby out with the bath water. He is experiencing dead spots turning corners in Pac-Man. I think he was wondering if there was any improvements that could be made to address the issue and he also asked how the 4-way compared to the xboxdrv method.

                1 Reply Last reply Reply Quote 0
                • G
                  grant2258 Banned
                  last edited by 12 Feb 2019, 18:39

                  it already been discussed here we are using digital not analog(xbox drive is probably using analog to digital ) no need to repeat what we have discussed earlier. Mame 4 way has to do digital for it to work for people with none analog pads.

                  https://github.com/libretro/mame2003-plus-libretro/issues/380

                  1 Reply Last reply Reply Quote 0
                  • R
                    Riverstorm
                    last edited by 12 Feb 2019, 19:54

                    @grant2258 - Thanks for the link so we may submit PRs for coding a fix ourselves. I have no idea what could be done to improve it. If I did I wouldn't know how to code it anyway and you know it. You do that all the time to people on the forums here. Linking us to code we don't know how to modify.

                    Putting your sarcasm aside, I don't believe @PMac10000 listed what type of controller he's using. It might actually help to wait for him to respond before making a bunch of assumptions as he might have some useful information that might help uncover an unknown issue or possible improvement to the existing 4-way code.

                    P 1 Reply Last reply 12 Feb 2019, 21:17 Reply Quote 0
                    • P
                      PMac10000 @Riverstorm
                      last edited by 12 Feb 2019, 21:17

                      @Riverstorm @grant2258
                      Wow, quite a few responses. @grant2258 first of all, thanks for your coding work and in no way am I trying to complain. Rather, I'm happy to do any testing and submit any PRs that may help.

                      I'm using a Dragonrise USB controller (standard cabinet build with 8-way native joystick, 6 buttons per player). Very similar to @spud11 's setup, who has been very helpful... but I just can't seem to get his xboxdrv 4-way approach configured correctly. Everyone seems to agree xboxdrv 4-way logic is a huge improvement for old-school gameplay.

                      But the lr-mame2003-plus option seems much more user-friendly to me, if it accomplishes the same thing. I only want to use it for a few old-school games with 4-way joysticks, for better control and less frustration.

                      I understand the predicament of predictive vs last-direction, when the inputs don't exist... in my current gameplay... using lr-mame2003 (not plus) with the 4-way emulation active, I'm often finding (for example) Pac-Man coming to a complete stop at an "L" or "T" shaped junction, when it "feels" like I made the choice to go in a certain direction before I got there. I guess you'd call it a dead spot. I'll keep playing a few different games and provide feedback. I also need to make the cfg deletions and legacy remapping described above, before proceeding

                      Thanks all for their contributions.

                      1 Reply Last reply Reply Quote 0
                      • G
                        grant2258 Banned
                        last edited by 12 Feb 2019, 23:21

                        @PMac10000 I am using a dragonwise controller with a sanwa joystick. The good news is you can move the restrictor plates in these to make the do a real 4 way.

                        The problem with the standard restriction plate in these joysticks is there is a long throw (the gap between up and right when you are mid way wanting to choose one). I have a circular restriction in mine now took a while to get used to but plays a lot nicer all with a shorter throw a lot better for shot em ups ect specially is you add a stronger pin in it.

                        for swapping the the standard sanwa to 4 / 8 way do this.

                        even with 4 way the throw is long but the restriction helps a lot with any deadzone.

                        @Riverstorm the code was for the bigger community if they have any better ideas they are 100% more than welcome to try improve things there are many people here that can code just pointed the code out so they can see whats happening if they have a better idea to implement it. I can only see someone trying to implement a analog reader to make a choice unfortunately it wont work on snes and arcade joysticks as they are digital. Well the sanwa can run analog but it still onlly full on or full off

                        P 1 Reply Last reply 12 Feb 2019, 23:43 Reply Quote 0
                        • P
                          PMac10000 @grant2258
                          last edited by 12 Feb 2019, 23:43

                          @grant2258

                          Thanks for the tip. I'm aware of the 4-way restrictor possibility, but of course the drawback is that I'd have to take apart my cabinet each time I wanted to play an old 4-way game.... I need 8-way mode for most of the others. So I'm looking for a decent SW solution as opposed to a brute-force HW solution... hopefully one that's easier to implement than xboxdrv. Your work on lr-mame2003-plus seems like the closest thing for my purposes so far.

                          S 1 Reply Last reply 13 Feb 2019, 01:27 Reply Quote 0
                          • G
                            grant2258 Banned
                            last edited by 12 Feb 2019, 23:53

                            you should try it at least once to see how a 4 way plays on you joystick its not that fantastic to begin with try kung fu master it 4 way does take a bit of getting used to when you are familiar with 8 way. I dont think any software solution will get it 100% analog position tracking can get closer but again no use in an arcade joystick or dpad where you just have a button on or off there is no way to track how far they are in between.

                            1 Reply Last reply Reply Quote 0
                            • M
                              mediamogul Global Moderator @grant2258
                              last edited by 13 Feb 2019, 00:16

                              @grant2258 said in Guide: Advanced Controller Mappings:

                              so if you go right then press right/up you will keep on going right )or last direction pressed until you commit to another direction.

                              This seems like a perfectly reasonable solution, but for whatever reason, the xboxdrv 4-way restriction doesn't seem to behave this way. With it, control is very precise on quick turns without any necessary forethought on how to to adapt to a new control behavior. The result feels very close to an actual restriction plate. All that said, I have no idea what is used in xboxdrv to accomplish this.

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

                              G 1 Reply Last reply 13 Feb 2019, 01:34 Reply Quote 0
                              • S
                                spud11 @PMac10000
                                last edited by 13 Feb 2019, 01:27

                                @PMac10000 Hi. I'm just wondering whether you followed @mediamogul's xboxdrv guide from scratch. My code will definitely help you, but may not be 100% for your purposes (eg your buttons might be wired up differently from mine and therefore be "named" differently from mine). From a troubleshooting point of view, where did it fall down for you? I might be able to help.

                                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

                                P 1 Reply Last reply 14 Feb 2019, 20:33 Reply Quote 0
                                • G
                                  grant2258 Banned @mediamogul
                                  last edited by 13 Feb 2019, 01:34

                                  @mediamogul said in Guide: Advanced Controller Mappings:

                                  @grant2258 said in Guide: Advanced Controller Mappings:

                                  so if you go right then press right/up you will keep on going right )or last direction pressed until you commit to another direction.

                                  This seems like a perfectly reasonable solution, but for whatever reason, the xboxdrv 4-way restriction doesn't seem to behave this way. With it, control is very precise on quick turns without any necessary forethought on how to to adapt to a new control behavior. The result feels very close to an actual restriction plate. All that said, I have no idea what is used in xboxdrv to accomplish this.

                                  Your probably using it on an analog stick. try it on a none analog device analog is easier to track. digital only has 8 positions so this analog logic won't work on a sanwa or dpad tgat is what mame addresses

                                  M 1 Reply Last reply 13 Feb 2019, 04:11 Reply Quote 1
                                  • M
                                    mediamogul Global Moderator @grant2258
                                    last edited by 13 Feb 2019, 04:11

                                    @grant2258 said in Guide: Advanced Controller Mappings:

                                    Your probably using it on an analog stick.

                                    I am indeed and you're completely right. I don't remember if it's come up in conversation before, but MAME actually had it's own implementation of software 4-way restriction at one time. I believe the reason for its removal was that no one could agree on the best way to implement it effectively. While it might not be perfect, you're solution may very well be the best solution for most situations.

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

                                    G 1 Reply Last reply 13 Feb 2019, 05:36 Reply Quote 0
                                    • G
                                      grant2258 Banned @mediamogul
                                      last edited by 13 Feb 2019, 05:36

                                      @mediamogul the biggest problem is people using a square 8 way restriction plate that why i use circular one now less throw for shoot em ups as well. so you use the joystick rather than ride the restrictor. I would recommend a hexagonal you need help with finding you up/right ect. It is personal preference at the end of the day.

                                      1 Reply Last reply Reply Quote 0
                                      • P
                                        PMac10000 @spud11
                                        last edited by 14 Feb 2019, 20:33

                                        @spud11
                                        Hard to say exactly where it went wrong, but I had modified so many scripts, cfg files, and parameters (xboxdrv, retroarch, mame) that I had to surrender and start over. I'll have a go again with a clean slate, and lean on your troubleshooting skills. Would it help to know how my particular buttons are wired as xboxdrv sees them? for example I can correlate THUMB2 with jstest value with X/Y/A/B, and so on...

                                        Since your setup is so similar to mine, I'm wondering if you've had a chance to try out the built-in 4-way emulation in lrmame2003, and compare and contrast the gameplay experience with the xboxdrv approach. Thanks

                                        1 Reply Last reply Reply Quote 0
                                        • S
                                          spud11
                                          last edited by 14 Apr 2019, 03:35

                                          @mediamogul Hi mediamogul. I've come across a problem I haven't been able to solve. I've manually compiled/installed the GSplus emulator (Apple IIGS) for my Jessie-based Rpi3B. GSPlus's internal joystick configuration doesn't work well, but most games have keyboard commands. I'm using xboxdrv to "tie" my DragonRise arcade joysticks to the keyboard. However, Gauntlet, for example, uses 8 keys for 8 directions (including diagonals). I'm not sure how to replicate that with xboxdrv. At present, I can only move left/right/up/down, not diagonally. I wonder whether you could help please.

                                          Is there a way to get --ui-axismap X1=KEY_LEFT:KEY_RIGHT,Y1=KEY_UP:KEY_DOWN \ to reflect diagonal directions too?

                                          Thanks.

                                          Player1_appleIIGS="sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv >> /dev/shm/runcommand.log 2>&1 \
                                          --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 \
                                          --evdev /dev/input/by-path/platform-3f980000.usb-usb-0:1.3.3:1.0-event-joystick \
                                          --device-name "Player_1" \
                                          --evdev-absmap ABS_X=y1,ABS_Y=x1 \
                                          --ui-axismap X1=KEY_LEFT:KEY_RIGHT,Y1=KEY_UP:KEY_DOWN \
                                          --evdev-keymap BTN_THUMB2=a,BTN_PINKIE=b,BTN_BASE3=back,BTN_BASE6=start,BTN_BASE5=rt \
                                          --ui-buttonmap a=KEY_OPTION,b=KEY_KPDOT,x=KEY_UNKNOWN,y=KEY_UNKNOWN,back=KEY_UNKNOWN,start=KEY_UNKNOWN,rt=KEY_ENTER,rt+back=KEY_F4 \
                                          --ui-buttonmap back+rt=exec:/opt/retropie/configs/all/gsplus_exit.sh \
                                          --ui-buttonmap lt+rt=exec:/opt/retropie/configs/all/SoundToggle.sh"
                                          

                                          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 14 Apr 2019, 21:02 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.

                                            [[user:consent.lead]]
                                            [[user:consent.not_received]]