• 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

Configure analog controls in Mame?

Scheduled Pinned Locked Moved Help and Support
mame controls
16 Posts 6 Posters 8.5k 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.
  • R
    rsn8887
    last edited by 28 Jun 2018, 00:36

    In games like Outrun in Mame, how do I disable digital controls for the gas and brake and only use truly analog control?

    I am trying to map the Outrun gas and brake pedals to a true analog L2/R2 trigger control on my DS4 controller without any digitial-to-analog conversion.

    I can enter the native Mame menu using the TAB key and I can map controls there. But all the mappings (xxx_inc, xxx_dec) seem to refer to some digital-to-analog mapping.

    In addition, when I try to map the analog trigger in the Mame input menu, it always maps a trigger button plus an axis. It seems like the DS4 R2 and L2 triggers registers as digital buttons AND as analog axes at the same time. So I cannot map only the axis.

    So, is there an easy way to correctly map analog controls in Mame. I would like to have no interference from digital inputs, and disable this annoying behavior where Mame is trying to do a digital-to-analog conversion for me?

    D 1 Reply Last reply 28 Jun 2018, 13:05 Reply Quote 0
    • C
      ChuckyP
      last edited by 28 Jun 2018, 00:46

      Inc and Dec are only to allow slight adjustments to drift over time. They are not the settings you need to change to get your triggers to work.

      And with that being said and without my setup nearby I have no other help to offer. If no one replies before I’m able to take a look I’ll reply back later this evening.

      1 Reply Last reply Reply Quote 0
      • R
        rsn8887
        last edited by 28 Jun 2018, 00:55

        If you got it working it would be great if you could go into your input menu and take a quick screenshot of your Pedal_1 and Pedal_2 mappings, or maybe just write them down here. Thank you!

        C C 2 Replies Last reply 28 Jun 2018, 12:46 Reply Quote 0
        • C
          celly @rsn8887
          last edited by 28 Jun 2018, 12:46

          @rsn8887 you should try Cannoball. Its a great Outrun emulator with a gui controller config and lots of other extras.

          Currently Playing: Tetris (Gameboy)

          1 Reply Last reply Reply Quote 0
          • D
            dankcushions Global Moderator @rsn8887
            last edited by 28 Jun 2018, 13:05

            @rsn8887 which mame? please fill out https://retropie.org.uk/forum/topic/3/read-this-first

            presuming lr-mame*, i'm not entirely sure if libretro understands analog triggers, however it does understand sticks. with mame2003 if you have bound your left/right analog sticks correctly during https://retropie.org.uk/docs/First-Installation/#configure-controllers, your left stick should control steering, without any further configuration in RGUI or TAB menu.

            i did hookup the analog accelerator internally in 2003 but i have a feeling it never worked, but one step at a time.

            M 1 Reply Last reply 29 Jun 2018, 20:38 Reply Quote 0
            • C
              ChuckyP @rsn8887
              last edited by ChuckyP 29 Jun 2018, 00:32

              @rsn8887 ok I didn’t have it setup with triggers but it was mapped to the XBOX360 A button by default.

              I use lr-mame2003 and had to make the following changes to map it to the triggers.

              1. Launch Out Run
              2. Press “Tab” on your keyboard
              3. Click on “Input (this game)”
              4. Select “P1 Button 2” press Enter
              5. Press the Left Trigger
              6. Select “P1 Button 1” press Enter
              7. Press the Right Trigger
                8 Press Tab to exit back to the game.

              Right Trigger should now be Accelerator and Left Trigger will be Brake.

              Make sure the controls are correct and then exit your game to save the settings.

              1 Reply Last reply Reply Quote 0
              • M
                markwkidd
                last edited by 29 Jun 2018, 01:12

                I think that mame2003 is ripe to have some attention/effort put into analog controls . I've been considering making a github issue about this -- along with another for fully implementing the libretro lightgun API -- but there has been plenty of other work and conversation going about controls.

                That said this would be a good time as any to start figuring out where improvements are needed for analog control support. You may be tired of hearing me say things like this but: "I don't really play any analog control games myself." I will need a little time to get oriented on analog controls before I can help with new code :eek:

                1 Reply Last reply Reply Quote 1
                • M
                  markwkidd @dankcushions
                  last edited by 29 Jun 2018, 20:38

                  @dankcushions said in Configure analog controls in Mame?:

                  presuming lr-mame*, i'm not entirely sure if libretro understands analog triggers, however it does understand sticks. with mame2003 if you have bound your left/right analog sticks correctly during https://retropie.org.uk/docs/First-Installation/#configure-controllers, your left stick should control steering, without any further configuration in RGUI or TAB menu.

                  Some improvements to RetroArch linux trigger support may be in the works: https://github.com/libretro/RetroArch/issues/6920

                  1 Reply Last reply Reply Quote 1
                  • R
                    rsn8887
                    last edited by 30 Jun 2018, 17:55

                    Thank you for all the replies. Still I don’t have analog gas on my analog trigger. So I guess it is currently not possible to do this with libretro mame-2003.

                    Maybe in AdvanceMAME? But so far all I get there is digital triggers again.

                    Also is there a way around the problem I mentioned that the trigger press registers as a button and an axis?

                    1 Reply Last reply Reply Quote 0
                    • M
                      markwkidd
                      last edited by 30 Jun 2018, 19:43

                      It may need a little bit of code in mame2003-plus to get at least basic support added -- it's hard to believe but maybe no one has ever mapped an analog gas pedal game with that codebase before. It turns out I even created an issue ticked about this myself one time: https://github.com/libretro/mame2003-libretro/issues/317

                      It may be days or weeks before something is done for mame2003-plus but am pretty sure something can be done.

                      D 1 Reply Last reply 30 Jun 2018, 22:40 Reply Quote 0
                      • D
                        dankcushions Global Moderator @markwkidd
                        last edited by 30 Jun 2018, 22:40

                        @markwkidd said in Configure analog controls in Mame?:

                        It may need a little bit of code in mame2003-plus to get at least basic support added -- it's hard to believe but maybe no one has ever mapped an analog gas pedal game with that codebase before.

                        i'm pretty much the only one that has done any work on mame2003's inputs (or much else) until you, so it's not that hard to believe. there were no analog inputs at all before i mapped them. you can't have been following libretro cores very closely if you think they are typically a hive of activity...

                        anyways, i DID experiment with mapping the Z axis (it's trivial), but it didn't work in outrun for whatever reason. this is all likely in a PR/issue somewhere.

                        1 Reply Last reply Reply Quote 1
                        • M
                          markwkidd
                          last edited by 22 Oct 2018, 15:46

                          The only progress so far on this issue is that I have donated a few dollars to start a bounty for full analog controls support: https://www.bountysource.com/issues/64777052-implement-analog-retropad-controls

                          1 Reply Last reply Reply Quote 0
                          • G
                            grant2258 Banned
                            last edited by grant2258 22 Oct 2018, 16:14

                            Outrun is mapped to a button not a pedal in the driver youll need to change it there. Thats not the only problem though. I have done some chnges to the analog in my own branch to stop it stealing digital controls ( If someone using a snes pad) as the anolog as is will make any game unplayable if you have no analog stick.

                            If you want to see the z-axsis is working load up ivon iron mans super offroad and use the right stick to accelerate

                            @dankcushions https://github.com/grant2258/mame2003-plus-libretro/commit/cfdb02a7edfc7085c2ee9984ec18fac69b97e6b9

                            edit enabled analog controls in the driver the inputs do work but the driver needs fixed up the hi/low is tied to the acceration mapping

                            1 Reply Last reply Reply Quote 0
                            • G
                              grant2258 Banned
                              last edited by 25 Oct 2018, 05:56

                              I fixed the digital controls working in mame2003-plus as the analog already works for the pedal its just it takes over this is a courtesy for you mr @dankcushions in case you want to add it to mame2003.

                              https://github.com/libretro/mame2003-plus-libretro/pull/419

                              1 Reply Last reply Reply Quote 0
                              • M
                                markwkidd
                                last edited by 25 Oct 2018, 11:42

                                woot!

                                1 Reply Last reply Reply Quote 0
                                • G
                                  grant2258 Banned
                                  last edited by 25 Oct 2018, 12:39

                                  mark I will look into adding mapping analog controls into mame2003-plus properly when I get the time. It doesn't look that bad to do its just setup a little differently from normal buttons nothing major though

                                  1 Reply Last reply Reply Quote 1
                                  • 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]]