You are not logged in.
I'm trying to configure mupen64plus with a logitech controller (via m64py), but for some reason the main control stick doesn't map properly. Any other axis besides the main axis maps to the correct "axis (3+)" and "axis(3-)" position, but for some reason the main control stick maps to "hat(0 left)", "hat(0 right)", "hat(0 up)" and "hat(0 down)". When I try to load mupen64plus, it then gives an error saying that direction hat(0 up) and hat(0 left) are unknown directions and correspondingly, the two directions on the controller don't work.
I've tried re-defining the axes for axis(0+) and 0-, but that does not seem to do anything.
I have also tried switching from xpad to xboxdrv to see if there might be an improvement, but xboxdrv doesn't even detect the controller.
Does anyone have some suggestions for configuring this? Any help is appreciated.
Last edited by kev717 (2014-08-30 15:20:18)
If I code something, it's probably at https://github.com/kellcodes
Do **NOT** expect a response from me.
Offline
You might want to try jscal to remap axes and jscal-store from linuxconsole package, untested.
Edit: might not be compatible with xpad or xboxdrv.
Last edited by emeres (2014-08-28 16:11:37)
Offline
Mupen64plus uses SDL to map the joystick... so I'm not sure that will work. I tried jscal and couldn't get it to work.
If I code something, it's probably at https://github.com/kellcodes
Do **NOT** expect a response from me.
Offline
You can override SDL and force it to use the 'Joystick' API by setting the environment variable 'SDL_JOYSTICK_DEVICE=/dev/input/js0'.
https://wiki.archlinux.org/index.php/Jo … ut_Systems
But again, might not be applicable to xbox-like hardware and drivers. Just try it. How exactly did you run jscal?
Last edited by emeres (2014-08-29 22:49:44)
Offline
I ran jscal from the terminal with
jscal -c /dev/input/js0Strangely, the inputs for the '+' pad and the main analogue stick seem to be switched, i.e. the analogue stick only returns values of +1, 0, -1 for its axes and the + pad returns values of 1, 128, 255 for its axes... the other analogue stick returns the 1,128,255 axis values which makes sense since it's sensitive to amount of deflection.
I tried the SDL_JOYSTICK_DEVICE setting. That made the program detect a different joystick, however the configuration has the same issues as before (i.e. it's detecting the same joystick as being a different device, but the configuration is the same as before)
Last edited by kev717 (2014-08-30 02:10:06)
If I code something, it's probably at https://github.com/kellcodes
Do **NOT** expect a response from me.
Offline
man jscalHow did you remap axes? Did you store the configuration with jscal-store? There is a gui if you have trouble called jstest-gtk.
Offline
I stored the config using jscal-store. I tried using jstest-gtk and noted that the main analogue stick still produces a digital response to movement in the interface. I'm thinking that maybe the kernel is reading it as being a digital input whereas it's supposed to be analogue?
If I code something, it's probably at https://github.com/kellcodes
Do **NOT** expect a response from me.
Offline
How did you remap axes?
What is the output of 'jscal /dev/input/jsN -q' before and after you remap the axes?
Since xpad recognizes your gamepad and xboxdrv does not, you could edit ${srcdir}/xboxdrv-*/src/xpad_device.cpp and add your device. I did not dig deep into xboxdrv, but it may work.
Offline
Before:
jscal -u 6,0,1,2,5,16,17,12,288,289,290,291,292,293,294,295,296,297,298,299 /dev/input/js0After:
jscal -u 6,16,17,0,1,2,5,12,288,289,290,291,292,293,294,295,296,297,298,299 /dev/input/js0If I code something, it's probably at https://github.com/kellcodes
Do **NOT** expect a response from me.
Offline
And there are no changes with jstest-gtk? Provide vid and pid with lsusb. Is it 046d:c216? I skimmed through hid-lg.[ch] but did not find anything pov related.
Edit: Are there any switches or additional buttons on the gamepad? My DragonRise switches between pov and axis with its mode button.
Last edited by emeres (2014-08-30 15:05:35)
Offline
wow... you know what? There's a little mode button on the controller that switches those inputs...
Works fine now. Thanks for the help
If I code something, it's probably at https://github.com/kellcodes
Do **NOT** expect a response from me.
Offline
You are welcome.
Offline