• 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

DOSBOX exit key mapping on gamepad issue

Scheduled Pinned Locked Moved Help and Support
dosboxgamepad config
18 Posts 3 Posters 2.3k 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.
  • M
    mitu Global Moderator
    last edited by mitu 14 Dec 2021, 05:01

    @mbernier said in DOSBOX exit key mapping on gamepad issue:

    my complete map file is here: [https://pastebin.com/921LG5dn](link url)

    The only issue with the map you posted is a blank line at the end, which causes the message from the log:

    ...
    Can't find matching event for
    ...
    

    Otherwise, replacing btn9/10 with btn6/7 (to match my joystick) works for exiting Dosbox by pressing both buttons. So there's nothing wrong with the configuration file.

    Can you try running the game with the .conf file I posted in my first reply ? Just create it in the pc roms folder, replacing the .sh file you have, and run the game.

    EDIT: one more thing - can you check that you're using the RetroPie patched libsdl1.2 package ? Run

    dpkg -l | grep libsdl1.2
    

    and post the output.

    M 1 Reply Last reply 15 Dec 2021, 00:17 Reply Quote 0
    • M
      mbernier @mitu
      last edited by 15 Dec 2021, 00:17

      @mitu

      Hello !

      Here the command output:

      pi@retropie:~ $ dpkg -l | grep libsdl1.2
      hi  libsdl1.2-dev                     1.2.15+dfsg2-7rpi                   armhf                                     Simple DirectMedia Layer development files
      ii  libsdl1.2debian:armhf             1.2.15+dfsg2-7rpi                   armhf                                     Simple DirectMedia Layer
      

      I removed the blank line in .map file

      And also i tried the "clean" by .sh by moving my multiple -c arguments in the .sh into the [autoexec] tag in the .conf. It works, but it does not solve the original mapping problem. BTW thank you for this trick, it is a lot more clearer now and intuitive !

      I think i will now migrate to staging-dosbox or wait for a new major release of RetroPie (4.8 ?) and re-install everything...

      Best regards,

      Martin

      M 1 Reply Last reply 2 Jan 2022, 19:03 Reply Quote 0
      • M
        mbernier @mbernier
        last edited by mbernier 1 Feb 2022, 19:04 2 Jan 2022, 19:03

        Re-Hello,

        i finally understand what happened. It seems that after a kernel/firmware update, gamepad configuration was changed. In fact only a couple of button (select, start, triggers) changed and i was able to remap most of them, but one thing remains: The triggers are now seen as axis instead of button. And this is for all non-libretro core (ex: dosbox).

        i can confirm this by using "jstest /dev/input/js0" that are recognizing my left/right triggers in the axis 2/5 instead of the button 6/7 .

        In the case of dosbox, i changed my left trigger from "stick_0 button 6" to "stick_0 axis 2 0": This works but as soon as i press the trigger in a game, dosbox sees it as always pressed. So i would like to revert my configuration from axis to button based triggers.

        I saw numerous posts on this subject before writing this post and tried the following without success:

        • unsintalled/installed xpad driver
        • edited "options xpad triggers_to_buttons=1" from 1 to 0 in xpad.conf file
        • re-started the emulationstation gamepad configuration GUI

        Nothing works...

        any ideas ?

        regards

        M 1 Reply Last reply 2 Jan 2022, 19:26 Reply Quote 0
        • M
          mitu Global Moderator @mbernier
          last edited by 2 Jan 2022, 19:26

          @mbernier said in DOSBOX exit key mapping on gamepad issue:

          So i would like to revert my configuration from axis to button based triggers.
          ...
          edited "options xpad triggers_to_buttons=1" from 1 to 0 in xpad.conf file

          If you like the shoulder trigger to behave like buttons, then you need the triggers_to_buttons parameter to be set to 1. Did you try to see if jstest behaves differently with the different options set (0 / 1) ? Note that you need to restart after changing the parameter in order for this to work.

          M 1 Reply Last reply 2 Jan 2022, 21:14 Reply Quote 0
          • M
            mbernier @mitu
            last edited by mbernier 1 Mar 2022, 01:16 2 Jan 2022, 21:14

            @mitu

            Hello !

            Thanks for your answer.

            The parameter "options xpad triggers_to_buttons" has the same output in jstest if it configured to 1 or 0. Just to be sure the subdirectory is /etc/modprobe.d/xpad.conf.

            I am 100% confident that the changes are done since i verified the change using "more xpad.conf" after each modification.

            Normal value is -32767 and pressed value is +32767 for both axes 2 and 5. Previously (before kernel or firmware update weeks ago) it was button 6 and 7.

            I also rebooted the RPi 400 after each change.

            Weird isn't ? Also even if i stay on this axis configuration, that is strange that the trigger seems to stay glued after using it. This happens only in games, not in jstest.

            p.s. i have two different logitech f710 gamepad and both of them have the same result.

            UPDATE: I want to add that my F710 controler is configured in Xinput (X) mode,
            meaning that it is in 'analog trigger' mode. But is there a way to keep in X mode and use in button mode in retropie ? The reason for this is that the logitech button is not working in DirectInput (D) mode...

            To recap: why the "options xpad triggers_to_buttons=1" is no longer working for me ?

            Ciao !

            M 1 Reply Last reply 3 Jan 2022, 05:15 Reply Quote 0
            • M
              mitu Global Moderator @mbernier
              last edited by 3 Jan 2022, 05:15

              @mbernier said in DOSBOX exit key mapping on gamepad issue:

              To recap: why the "options xpad triggers_to_buttons=1" is no longer working for me ?

              Let's check whether the xpad driver is correctly installed. Run the following commands and post the output:

              cat /sys/module/xpad/parameters/triggers_to_buttons
              modinfo xpad | head -n 5
              
              M 1 Reply Last reply 3 Jan 2022, 15:25 Reply Quote 0
              • M
                mbernier @mitu
                last edited by 3 Jan 2022, 15:25

                @mitu

                Hello !

                Here is the requested output:

                pi@retropie:~ $ cat /sys/module/xpad/parameters/triggers_to_buttons
                Y
                pi@retropie:~ $ modinfo xpad | head -n 5
                filename:       /lib/modules/5.10.63-v7l+/kernel/drivers/input/joystick/xpad.ko
                license:        GPL
                description:    X-Box pad driver
                author:         Marko Friedemann <mfr@bmx-chemnitz.de>
                srcversion:     E1B709DF2EBAA331E53C6D6
                

                Thanks a lot !

                M 1 Reply Last reply 3 Jan 2022, 16:05 Reply Quote 0
                • M
                  mitu Global Moderator @mbernier
                  last edited by 3 Jan 2022, 16:05

                  @mbernier Can you run the following commands:

                  sudo rmmod xpad
                  sudo rm "/lib/modules/5.10.63-v7l+/kernel/drivers/input/joystick/xpad.ko"
                  sudo depmod -a
                  

                  then reboot and try again after the reboot to see if the triggers map to buttons.

                  M 1 Reply Last reply 3 Jan 2022, 16:34 Reply Quote 0
                  • M
                    mbernier @mitu
                    last edited by 3 Jan 2022, 16:34

                    @mitu

                    OK i executed the commands. It works ! Will try a couple of things to confirm later but can you tell me what happened ? I am not sure of what i have removed :-)

                    You are a magician !

                    Will do some testing and get back to you !

                    M 1 Reply Last reply 3 Jan 2022, 16:46 Reply Quote 0
                    • M
                      mitu Global Moderator @mbernier
                      last edited by mitu 1 Mar 2022, 16:47 3 Jan 2022, 16:46

                      @mbernier said in DOSBOX exit key mapping on gamepad issue:

                      I am not sure of what i have removed :-)

                      You removed the Linux kernel's built-in xpad module (driver), so the one installed by RetroPie-Setup took over.

                      The reason the parameter triggers_to_buttons didn't work is because the built-in kernel driver applies it only for certain gamepads, whereas the xpad driver installed from RetroPie-Setup applies it to all gamepads. The system loaded the built-in driver instead of the one installed by RetroPie, so the parameter didn't work for your gamepad(s).

                      Now the question remains why the override doesn't happen by default, this may be something that's changed with an update (for dkms maybe ?).
                      Note that upgrading the kernel would still make the built-in driver the default, reverting to the behavior you noticed, so we should find a solution that would work without the steps I posted earlier.

                      M 1 Reply Last reply 3 Jan 2022, 17:10 Reply Quote 0
                      • M
                        mbernier @mitu
                        last edited by 3 Jan 2022, 17:10

                        @mitu

                        Thanks for this. That was not an easy one (for me). The support is fantastic, you really are a very knowledgeable team! I would never have found it on my own.

                        I can confirm now that everything seems to be back to normal now.

                        In my case i did not notice immediatly because it only affected non libretro package like redream, dosbox, vice and jzintv. All the others was working properly so it's something that can easily go unnoticed.

                        Best regards,

                        M 1 Reply Last reply 3 Jan 2022, 17:25 Reply Quote 0
                        • M
                          mitu Global Moderator @mbernier
                          last edited by 3 Jan 2022, 17:25

                          @mbernier said in DOSBOX exit key mapping on gamepad issue:

                          In my case i did not notice immediatly because it only affected non libretro package like redream, dosbox, vice and jzintv. All the others was working properly so it's something that can easily go unnoticed.

                          My guess is only SDL1 apps would not be able to work reliably without the trigger_to_buttons param, all other SDL2 applications, should have better support for this configuration.

                          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.

                            This community forum collects and processes your personal information.
                            consent.not_received