DOSBOX exit key mapping on gamepad issue
-
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
-
@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 fileIf 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 ifjstest
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. -
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 !
-
@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
-
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 !
-
@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.
-
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 !
-
@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 thexpad
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. -
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,
-
@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.
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.