You are not logged in.

#1 2014-08-28 14:30:07

kev717
Member
Registered: 2011-06-08
Posts: 67
Website

[SOLVED]mupen64plus and Logitech Dual Action Controller mapping issues

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

#2 2014-08-28 16:04:26

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [SOLVED]mupen64plus and Logitech Dual Action Controller mapping issues

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

#3 2014-08-29 22:38:03

kev717
Member
Registered: 2011-06-08
Posts: 67
Website

Re: [SOLVED]mupen64plus and Logitech Dual Action Controller mapping issues

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

#4 2014-08-29 22:48:01

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [SOLVED]mupen64plus and Logitech Dual Action Controller mapping issues

joystick wiki wrote:

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

#5 2014-08-30 02:05:23

kev717
Member
Registered: 2011-06-08
Posts: 67
Website

Re: [SOLVED]mupen64plus and Logitech Dual Action Controller mapping issues

I ran jscal from the terminal with

jscal -c /dev/input/js0

Strangely, 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

#6 2014-08-30 02:19:24

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [SOLVED]mupen64plus and Logitech Dual Action Controller mapping issues

man jscal

How did you remap axes? Did you store the configuration with jscal-store? There is a gui if you have trouble called jstest-gtk.

Offline

#7 2014-08-30 03:09:49

kev717
Member
Registered: 2011-06-08
Posts: 67
Website

Re: [SOLVED]mupen64plus and Logitech Dual Action Controller mapping issues

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

#8 2014-08-30 11:28:19

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [SOLVED]mupen64plus and Logitech Dual Action Controller mapping issues

emeres wrote:

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

#9 2014-08-30 13:43:42

kev717
Member
Registered: 2011-06-08
Posts: 67
Website

Re: [SOLVED]mupen64plus and Logitech Dual Action Controller mapping issues

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/js0

After:

jscal -u 6,16,17,0,1,2,5,12,288,289,290,291,292,293,294,295,296,297,298,299 /dev/input/js0

If I code something, it's probably at https://github.com/kellcodes

Do **NOT** expect a response from me.

Offline

#10 2014-08-30 14:50:33

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [SOLVED]mupen64plus and Logitech Dual Action Controller mapping issues

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

#11 2014-08-30 15:19:45

kev717
Member
Registered: 2011-06-08
Posts: 67
Website

Re: [SOLVED]mupen64plus and Logitech Dual Action Controller mapping issues

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

#12 2014-08-30 15:27:30

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [SOLVED]mupen64plus and Logitech Dual Action Controller mapping issues

You are welcome.

Offline

Board footer

Powered by FluxBB