What's new

Can't map analog stick

guran

New member
I have been waiting for a Windows release of Mupen64plus for quite some time now, and it all seems to work very nicely except for one thing.

I use a Xbox 360 controller and the default configs didn't work very well at all, maybe because I've installed the XBCD drivers instead of the official ones from Microsoft (do they even work with Mupen?), so I decided to change the settings, I have found what each button does now (after some trial and error) but I cant get the right analog stick to work completely, think that I just don't know what the axis number should be. I do know that axis(5+) and axis(5-) is for left and right, but I cant find the number for up and down, I've tried them all up to at least 10.

Is there any way to find out what the number should be? The analog stick is not broken because it all looks just fine in the XBCD Setup Utility.
 

Surkow

Member
I submitted the keymap for the xbox360 controller (for the auto-configuration of the blight input plugin). I'm not sure if the name of the controller is the same in Linux as in Windows because each driver has a different name for controllers. This is how I configured the controller:

Surkow said:
Microsoft X-Box 360 pad:
C button U (up) and C button R (right) are assigned to the Y and B buttons.
All 4 C buttons are assigned to the U and V axis (including the already configured up and right C buttons).
The Z button has been assigned to the left trigger and switching the rumble on and off can be done with the right trigger.
Because there are no other buttons left I decided to use the button click behavior of the left joystick to switch Mempak on and off.

The mapped buttons:
[Microsoft X-Box 360 pad]
plugged = True
plugin = 2
mouse = False
AnalogDeadzone = 4096,4096
AnalogPeak = 32768,32768
DPad R = axis(6+)
DPad L = axis(6-)
DPad D = axis(7+)
DPad U = axis(7-)
Start = button(6)
Z Trig = axis(2+)
B Button = button(2)
A Button = button(0)
C Button R = button(1) axis(3+)
C Button L = axis(3-)
C Button D = axis(4+)
C Button U = button(3) axis(4-)
R Trig = button(5)
L Trig = button(4)
Mempak switch = button(9)
Rumblepak switch = axis(5+)
X Axis = axis(0-,0+)
Y Axis = axis(1-,1+)
 
Last edited:
OP
G

guran

New member
Yeah it's named differently when using Windows, with the latest XBCD (note that these are not official from Microsoft) drivers installed it's called "XBCD Xbox 360 Controller" instead, so I added that to the line below your "[Microsoft X-Box 360 pad]" but it didn't like your config, not any of the axis anyway except for axis 0 and 1 which works just fine.

I should try with the official Microsoft drivers and see what happens..
 

Richard42

Emulator Developer
I have compiled a Win32 build of the SDL joystick testing program which is included in the SDL 1.2.14 source code. You can download it here. To use this, just run it from a command line with a single argument which is the index number of the joystick that you want to test: the first joystick is 0, second is 1, etc. It should print out all of the events that it receives from the joystick, so you can use this for finding the button/axis/hat values.
 
OP
G

guran

New member
That app is very handy for configuring the controls! It just gives input for the right analog stick as axis 5 though, from what I can tell it doesn't work with up/down at all, still haven't tried the drivers from Microsoft, so I'll do that now..
 
OP
G

guran

New member
Ok, the right analog stick seems to work completely with the official drivers, but it's still weird with the [Microsoft X-Box 360 pad] config, will have to look a little bit more into that.

Also it's named: [Controller (XBOX 360 For Windows)]
And the D-pad needs to be changed into:
DPad R = hat(0 Right)
DPad L = hat(0 Left)
DPad D = hat(0 Down)
DPad U = hat(0 Up)
to work.



Edit:

I've now remade the [Microsoft X-Box 360 pad] config to work with Windows and the official drivers from Microsoft, nothing is changed in the layout from [Microsoft X-Box 360 pad] except for the start button that now is set to the start button on the controller instead of the back button (was there a reason for this?).


A small changelog:
Rumblepak switch = axis(2-)
DPad * = hat(0 *)
C Button * = Changed 4 to 3 and 3 to 4
Start = button(7)


And the config:

[Controller (XBOX 360 For Windows)]
plugged = True
plugin = 2
mouse = False
AnalogDeadzone = 4096,4096
AnalogPeak = 32768,32768
DPad R = hat(0 Right)
DPad L = hat(0 Left)
DPad D = hat(0 Down)
DPad U = hat(0 Up)
Start = button(7)
Z Trig = axis(2+)
B Button = button(2)
A Button = button(0)
C Button R = button(1) axis(4+)
C Button L = axis(4-)
C Button D = axis(3+)
C Button U = button(3) axis(3-)
R Trig = button(5)
L Trig = button(4)
Mempak switch = button(9)
Rumblepak switch = axis(2-)
X Axis = axis(0-,0+)
Y Axis = axis(1-,1+)
 
Last edited:

Surkow

Member
I've now remade the [Microsoft X-Box 360 pad] config to work with Windows and the official drivers from Microsoft, nothing is changed in the layout from [Microsoft X-Box 360 pad] except for the start button that now is set to the start button on the controller instead of the back button (was there a reason for this?).

Great to hear it works out for you. :)

The start button should have been set to "start" when I created the configuration in Linux. When I have time I'll see if the button is actually mapped to start.

Edit: In Linux the start button is mapped to start. I have no idea why it's different in Windows.
 
Last edited:

Top