mupen64plus / mupen64plus-user-issues

Issue reports from users go here
http://www.mupen64plus.org/
17 stars 3 forks source link

[mupen64plus-input-sdl] wrong joystick button/axis number #671

Closed illwieckz closed 8 years ago

illwieckz commented 8 years ago

Hi, there is something strange here. Mupen64plus works well with my joystick, but I must set wrong button/axis numbers in mupen64plus.cfg to get it working.

For example, both jstest-gtk and dolphin-emu say my “A” button is 0 and my “B” button is 1, but in mupen64plus I must write button(1) for “A” and button(0) for “B”.

Also, both jstest-gtk and dolphin-emu say my joystick up axis are 2-, 2+, 3-, 3+, but I must write axis(6-), axis(6+), axis(7-), axis(7+). What is happening there ?

Also, since mupen64plus is the only software that uses that numbering (all other software use the same numbering as jstest-gtk), I don't have any way to get the numbers. I only managed to get a working config file by hours of trial & errors with arbitrary numbers and loading roms to test the config in game…

There is another issue that is probably related, I use also m64py as a GUI and the GUI for mupen64plus-input-sdl is not usable to configure keys since the mupen64plus-input-sdl plugin read minor events (like axis trembling), so every time I click on a key to configure it, it get automatically one random axis because there is no dead zone at all. I think this another issue is not a m64py issue but a mupen64plus-input-sdl too.

In fact, It's weird to find the AnalogDeadzone and AnalogPeak options in mupen64plus.cfg as a per-app option since it's normally handled by the driver itself. Some software provides some additional dead zone options (like in dolphin-emu) but it's just to give more polish over the driver's one. These dead zone options are options that must be configured using config tools like jstest-gtk, not in mupen64plus.

It looks like mupen64plus-input-sdl reads some very low levels events that are not expected to be used by applications, so mupen64plus is not able to benefit from driver's dead zone, driver's mapping, and probably driver's calibration too. Because of that, configuring mupen64plus-input-sdl is not doable using the GUI (due to axis trembling, axis are always detected all the time so you can't use the "press and detect" method) and configuring mupen64plus-input-sdl with config file only works with a very painful trial and error process, trying random numbers then loading some roms to test the config…

richard42 commented 8 years ago

You can use the SDL joystick test program ([http://mupen64plus.org/old-releases/SDLJoyTest-linux32.tar.gz]) to get the axis/button numbers. Your issue with configuring the joysticks with m64py GUI is purely a problem with the m64py front-end; it does not use the mupen64plus-input-sdl library to handle the configuration process.