What's new

xbox gamepad analog stick inverted?

beniro

New member
I've recompiled mupen64 and must say it is excellent!!!

I'm having a problem using jttl's input plugin, though. My analog stick (using xbox gamepad) is inverted when I play... I've even tried pressing "down" when it says "press up". No dice.

Any ideas on how to fix this?
 

Darklegion

New member
beniro said:
I've recompiled mupen64 and must say it is excellent!!!

I'm having a problem using jttl's input plugin, though. My analog stick (using xbox gamepad) is inverted when I play... I've even tried pressing "down" when it says "press up". No dice.

Any ideas on how to fix this?

Some xbox controllers have this issue (my aussie S-Type controller has this problem).Attached is a patched version of xpad.c that gives you a number of extra options for controlling the driver, including reversing either of the analogue sticks, detecting the D-Pad as buttons and detecting the triggers as buttons.Put the xpad.c in drivers/usb/input under your kernel source directory. Details for setting the various options are given in the source, but if you don't know binary they are a little confusing so I'll give a few examples:

To just invert the left axis (probably what you want) : modprobe xpad options=1
To invert both axes: modprobe xpad options=3
To invert left axis, digital triggers, and dpad as buttons: modprobe xpad options=13

If you want to have the options set on boot, you'll have to find out what method your particular distro uses for setting these options.

Here is a link to the thread where the modified xpad patch was originally posted (was not written by me, btw)
http://forums.gentoo.org/viewtopic-t-111528-start-75.html

I posted a pre-patched version here directly because the patch did not work with the xpad.c in all kernels.It doesn't work at all with a 2.4 kernel btw.
 

Tillmann

Whatever
Darklegion said:
Here is a link to the thread where the modified xpad patch was originally posted (was not written by me, btw)
http://forums.gentoo.org/viewtopic-t-111528-start-75.html

I posted a pre-patched version here directly because the patch did not work with the xpad.c in all kernels.It doesn't work at all with a 2.4 kernel btw.

hi!
Can you help me?
I just want the url to the tutorials for how to plug this kind of controller on my pc and how to turn it functional under linux

+It is just like the snes controller (i've one setted up here)
+using gamecon? or another module? OR it is another module
+It is needed to recompile kernel under the debian sarge distr?

tanks! :D
 

Top