What's new

Analog stick problem with x-axis

banana11

New member
Hello!

I can't get the horizontal axis (axis 0) working, it's reacting late or just doesn't react.

I'm using a Dualshock 4 controller on OpenSuse 13.2. It's working fine out-of-box.
Now with mupen64plus, if I set up the controller in /usr/share/mupen64plus/InputAutoCfg.

Code:
[Wireless Controller]
plugged = True
plugin = 1
mouse = False
AnalogDeadzone = 4096,4096
AnalogPeak = 32768,32768
#DPad R = button(5)
#DPad L = button(7)
#DPad D = button(6)
#DPad U = button(4)
Start = button(9)
Z Trig = button(1)
B Button = button(6)
A Button = button(7)
#C Button R = axis(2+)
#C Button L = axis(2-)
#C Button D = axis(3+)
#C Button U = axis(3-)
R Trig = button(5)
L Trig = button(4)
Mempak switch =
Rumblepak switch =
X Axis = axis(0-,0+)
Y Axis = axis(1-,1+)
#X Axis = axis(2-,2+)
#Y Axis = axis(5-,5+)

Now, the left joystick is axis 0 and 1, and the right joystick is axis 2 and 5.
Using the right joystick, everythings running fine and very smooth.
Using the left joystick, the horizontal axis (axis 0) is reacting late, updates slowly and often just doesn't react at all whereas axis 1 runs smooth.

Any ideas what I got wrong or what else i could try?

Here's the output of mupen64plus during start:

Code:
UI-Console Error: dlopen('/usr/lib64/') failed: /usr/lib64/: cannot read file data: Is a directory
UI-Console: attached to core library 'Mupen64Plus Core' version 2.0.0
UI-Console:             Includes support for Dynamic Recompiler.
Core: Goodname: Super Mario 64 (E) (M3) [!]
Core: Name: SUPER MARIO 64      
Core: MD5: 45676429EF6B90E65B517129B700308E
Core: CRC: a03cf036 bcc1c5d2
Core: Imagetype: .v64 (byteswapped)
Core: Rom size: 8388608 bytes (or 8 Mb or 64 Megabits)
Core: Version: 1446
Core: Manufacturer: Nintendo
Core: Country: Europe (0x50)
UI-Console Status: Cheat codes disabled.
UI-Console: using Video plugin: 'Mupen64Plus OpenGL Video Plugin by Rice' v2.0.0
UI-Console: using Audio plugin: 'Mupen64Plus SDL Audio Plugin' v2.0.0
Input Warning: missing config key 'DPad R' for controller 1 button 0
Input Warning: missing config key 'DPad L' for controller 1 button 1
Input Warning: missing config key 'DPad D' for controller 1 button 2
Input Warning: missing config key 'DPad U' for controller 1 button 3
Input Warning: missing config key 'C Button R' for controller 1 button 8
Input Warning: missing config key 'C Button L' for controller 1 button 9
Input Warning: missing config key 'C Button D' for controller 1 button 10
Input Warning: missing config key 'C Button U' for controller 1 button 11
UI-Console: using Input plugin: 'Mupen64Plus SDL Input Plugin' v2.0.0
UI-Console: using RSP plugin: 'Hacktarux/Azimer High-Level Emulation RSP Plugin' v2.0.0
Input: 1 SDL joysticks were found.
Input Warning: missing config key 'DPad R' for controller 1 button 0
Input Warning: missing config key 'DPad L' for controller 1 button 1
Input Warning: missing config key 'DPad D' for controller 1 button 2
Input Warning: missing config key 'DPad U' for controller 1 button 3
Input Warning: missing config key 'C Button R' for controller 1 button 8
Input Warning: missing config key 'C Button L' for controller 1 button 9
Input Warning: missing config key 'C Button D' for controller 1 button 10
Input Warning: missing config key 'C Button U' for controller 1 button 11
Input: N64 Controller #1: Using auto-config with SDL joystick 0 ('Wireless Controller')
Input: 1 controller(s) found, 1 plugged in and usable in the emulator
Input: Rumble activated on N64 joystick #1
Input: Mupen64Plus SDL Input Plugin version 2.0.0 initialized.
Video: Disabled SSE processing.
Video: Found ROM 'SUPER MARIO 64', CRC 36f03ca0d2c5c1bc-50
Video: Initializing OpenGL Device Context.
Core: Setting 32-bit video mode: 640x480
Video Warning: Failed to set GL_BUFFER_SIZE to 32. (it's 24)
Video Warning: Failed to set GL_DEPTH_SIZE to 15. (it's 24)
Video: Using OpenGL: NVIDIA Corporation - GeForce GT 330M/PCIe/SSE2 : 3.3.0 NVIDIA 340.65
Audio: Initializing SDL audio subsystem...
Core Warning: LIRC disabled: Error contacting daemon!
Core: Starting R4300 emulator: Dynamic Recompiler
Core: R4300: starting 64-bit dynamic recompiler at: 0x7f2efb3e4740
Core Status: Stopping emulation.
Core: R4300 emulator finished.
Core Status: Rom closed.

Thanks in advance :)
 

V1del

New member
This looks more like a controller issue, or something in SDL (or maybe even the kernel) than something that can be easily fixed within mupen. Can you check if other SDL(2) based games have the same issue? Are the range values reported by sdljoytest (or the evdev/xinput tools which I don't remember the names of anymore) the same for both sticks?
 
OP
B

banana11

New member
At first, thank you for your help.

It seems to me to be related to SDL input. Using sdljoytest I experience the same problem, but range values are ok.

Ranges:
Joystick 0 axis 0 value: -32768
Joystick 0 axis 0 value: 32767
Joystick 0 axis 1 value: -32768
Joystick 0 axis 1 value: 32767
Joystick 0 axis 2 value: -32768
Joystick 0 axis 2 value: 32767
Joystick 0 axis 5 value: -32768
Joystick 0 axis 5 value: 32767

On further investigation I found out, that it's related to the additional sensors (like the position sensor) of the controller. If it's lying flat on the table, x-axis is working fine, only if i hold in my hands, it reacts weird. To say, axis 8-13 are reserved for different sensors. But when having input via SDL and just moving the controller around, axis 0 reacts weird.

Joystick 0 axis 0 value: -1496
Joystick 0 axis 0 value: 9114
Joystick 0 axis 0 value: 1071
Joystick 0 axis 0 value: -1394
Joystick 0 axis 0 value: 8379
Joystick 0 axis 0 value: 2562
Joystick 0 axis 0 value: 463
Joystick 0 axis 0 value: 294
Joystick 0 axis 0 value: -878
Joystick 0 axis 0 value: 8063
Joystick 0 axis 0 value: 2438
Joystick 0 axis 0 value: 303
Joystick 0 axis 0 value: 485
Joystick 0 axis 0 value: -899
Joystick 0 axis 0 value: 7622
Joystick 0 axis 0 value: 1989
Joystick 0 axis 0 value: 269
Joystick 0 axis 0 value: 9
Joystick 0 axis 0 value: 538
Joystick 0 axis 0 value: -298
Joystick 0 axis 0 value: 2108
Joystick 0 axis 0 value: 134
Joystick 0 axis 0 value: 14
Joystick 0 axis 0 value: -591

I've tried with jscal and jstest from the joystick package, here both joysticks are working fine. I don't know which input method they use, but obviously not SDL.

sdljoytest reports that there are 6 axes, but jscal reports that there are 14 (!). Maybe these additional ones confuse SDL??
./SDLJoyTest-linux32
There are 1 joysticks attached
Joystick 0: Wireless Controller
axes: 6
balls: 0
hats: 1
buttons: 14
jstest /dev/input/js0
Driver version is 2.1.0.
Joystick (Wireless Controller) has 14 axes (X, Y, Z, Rx, Ry, Rz, Hat0X, Hat0Y, (null), (null), (null), (null), (null), (null))
and 14 buttons (BtnX, BtnY, BtnZ, BtnTL, BtnTR, BtnTL2, BtnTR2, BtnSelect, BtnStart, BtnMode, BtnThumbL, BtnThumbR, ?, ?).
Testing ... (interrupt to exit)
Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 6: 0 7: 0 8: 0 9: 0 10: 0 11: 0 12: 0 13: 0 Buttons: 0 : off 1 : off

So what can I do about it? Are there any settings in SDL I can change? Or is there another input plugin for mupen64plus?
 
Last edited:

V1del

New member
I don't think there is something you can change apart from trying a more up to date SDL / making a bug report for SDL because that isn't something which should happen. There aren't any other input plugins for mupen64plus per se, but what would also be a possibility is trying out retroarch which has a mupen64plus core and uses its own API for input which can use kernel functions directly
 

Top