sysgodmin / mupen64plus

Automatically exported from code.google.com/p/mupen64plus
0 stars 0 forks source link

Auto configuration input for Xbox 360 wireless controller is messed #576

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Describe your system:
 - Operating System (be specific): Debian GNU/Linux Jessie/Sid
 - Machine type (32-bit or 64-bit): 64-bit
 - Mupen64Plus version: 2.0.0
 - Plugins used: Mupen64Plus SDL Input Plugin

Describe the problem:

First of all, I have SDL 1.2 and SDL 2.0, both installed, and I use xpad.
I tried some games with the Xbox 360 wireless controller, but I noticed control 
isn't working very well, so I investigated and found the culprit: the 
InputAutoCfg.ini. Especially this section.

***Faulty section***

[Microsoft X-Box 360 pad]
[Win32: Controller (XBOX 360 For Windows)]
[Win32: XBOX 360 For Windows (Controller)]
[Win32: XBOX 360 For Windows]
[Xbox 360 Wireless Receiver]
[OSX: Wireless 360 Controller]
[OSX: Controller]
[Linux: Xbox Gamepad (userspace driver)]
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 = axis(4+)
C Button L = axis(4-) button(3)
C Button D = axis(3+) button(1)
C Button U = axis(3-)
R Trig = button(5) axis(2-)
L Trig = button(4)
Mempak switch = 
Rumblepak switch = 
X Axis = axis(0-,0+)
Y Axis = axis(1-,1+)

***End section***

Issues:
-As you see, both R and Z trigger share the same axis (2, which corresponds to 
Xbox 360's left trigger), which isn't a smart move, because it messes with 
gameplay and renders a lot of games unplayable. 
-The C buttons have the axes that are inverted (vertical instead of horizontal 
and vice versa).
-Switch binding for Mempak and Rumblepak are missing.
-D-pad doesn't work.

So I fixed this thing and now control works very well. See below:

***Section fixed***

[Microsoft X-Box 360 pad]
[Win32: Controller (XBOX 360 For Windows)]
[Win32: XBOX 360 For Windows (Controller)]
[Win32: XBOX 360 For Windows]
[Xbox 360 Wireless Receiver]
[OSX: Wireless 360 Controller]
[OSX: Controller]
[Linux: Xbox Gamepad (userspace driver)]
plugged = True
plugin = 2
mouse = False
AnalogDeadzone = 4096,4096
AnalogPeak = 32768,32768
DPad R = hat(0 Right) button(12)
DPad L = hat(0 Left) button(11)
DPad D = hat(0 Down) button(14)
DPad U = hat(0 Up) button(13)
Start = button(8)
Z Trig = button(4)
B Button = button(2)
A Button = button(0)
C Button R = axis(3+)
C Button L = axis(3-) button(3)
C Button D = axis(4+) button(1)
C Button U = axis(4-)
R Trig = button(5)
L Trig = axis(2+)
Mempak switch = button(6)
Rumblepak switch = button(7)
X Axis = axis(0-,0+)
Y Axis = axis(1-,1+)

***End section***

What have I done:
- Z trigger now binds to X360's L button, and R trigger to X360's R button; as 
those two are the most used, and I found X360's L/R buttons more comfortable 
than triggers to this purpose. Consequence is that L trigger now binds to 
X360's trigger (only when is pressed). Thoughts?
- C buttons now have the correct axes.
- I put Mempak switch as Back (or Select) button, and Rumblepak switch as 
X360's Start button. Consequence is that N64's Start button is now binded to 
X360's guide button. Reason I did this is because some games supports both, and 
I wouldn't bother with stick buttons as they may be accidentally clicked, so I 
found Back/Start buttons more suitable to this purpose.
- I added the button variables along with hat to the D-pad, so it works again.

Original issue reported on code.google.com by masterga...@gmail.com on 5 Sep 2013 at 9:59

GoogleCodeExporter commented 8 years ago
Did you also test it with the kernel driver instead of xpad? Are you using the 
builds from the website or the Debian package?

I will have a look at it later and decide whether it is added to the Debian 
package

Original comment by s...@narfation.org on 6 Sep 2013 at 1:36

GoogleCodeExporter commented 8 years ago
Patch: 
http://anonscm.debian.org/gitweb/?p=collab-maint/mupen64plus-input-sdl.git;a=com
mit;h=fb278870cc930c408563ff00893ec4f268534e61

Original comment by s...@narfation.org on 6 Sep 2013 at 1:42

GoogleCodeExporter commented 8 years ago
Hmm...no, I haven't tested. I thought xpad was the kernel driver...? Anyways, 
can you tell me how to test it with the kernel driver? Seems I can't find 
anything.

I was using the build from this website for testing purposes, but it looks like 
the debian package suffers from this too.

This patch is really a good news to me, I hope it being merged upstream soon.

Original comment by masterga...@gmail.com on 6 Sep 2013 at 2:20

GoogleCodeExporter commented 8 years ago
Yes, I've mixed up the names. xpad was the kernel driver and the userspace 
driver was xboxdrv. Can you please test it with xboxdrv

Original comment by s...@narfation.org on 6 Sep 2013 at 6:12

GoogleCodeExporter commented 8 years ago
I have just tested with xboxdrv.

With xboxdrv, neither the old or the fixed autoconfig work very well. That's 
odd, so I investigated with jstest with both xpad and xboxdrv, and these are 
what I found and compared them:
(T= trigger, B = button, S = stick)

X360    xboxdrv     xpad

LT  axis 5      axis 2
RT  axis 4      axis 5
LS  axis 0(X),1(Y)  axis 0(X),1(Y)
RS  axis 2(X),3(Y)  axis 3(X),4(Y)
D-Pad   axis 6(X),7(Y)  Up=B13,Down=B14,Left=B11,Right=B12
LB  B4      B4
RB  B5      B5
BackB   B6      B6
GuideB  B8      B8
StartB  B7      B7
AB  B0      B0
XB  B2      B2
BB  B1      B1
YB  B3      B3  
LSB B9      B9
RSB B10     B10

1) Seems that both drivers use different axes for triggers and right stick. 
Only left stick has same axes for both drivers.
2) For D-Pad, xboxdrv recognizes it with axes 6 and 7, while xpad uses buttons 
11,12,13,14 instead. Maybe is this the reason why hat doesn't work with xpad, I 
dunno.
3) And for the rest, they use same names.

So for what concerns with the fixed autoconfig, one may want just to readjust 
the axes to xboxdrv's name scheme, but...I would suggest to stick with fixed 
autoconfig as it is now, because xpad is the standard de facto that (I think?) 
everyone uses, and whose using xboxdrv may add the option --mimic-xpad-wireless 
to make xboxdrv act identical to xpad.

Right now, the controller is working fine with both xpad and xboxdrv with 
--mimic-xpad-wireless. And I'm happy with this.

Original comment by masterga...@gmail.com on 6 Sep 2013 at 9:03

GoogleCodeExporter commented 8 years ago
Or even better, we could split up xpad and xboxdrv configuration.

***Section***

[Microsoft X-Box 360 pad]
[Win32: Controller (XBOX 360 For Windows)]
[Win32: XBOX 360 For Windows (Controller)]
[Win32: XBOX 360 For Windows]
[Xbox 360 Wireless Receiver]
[OSX: Wireless 360 Controller]
[OSX: Controller]
plugged = True
plugin = 2
mouse = False
AnalogDeadzone = 4096,4096
AnalogPeak = 32768,32768
DPad R = hat(0 Right) button(12)
DPad L = hat(0 Left) button(11)
DPad D = hat(0 Down) button(14)
DPad U = hat(0 Up) button(13)
Start = button(8)
Z Trig = button(4)
B Button = button(2)
A Button = button(0)
C Button R = axis(3+)
C Button L = axis(3-) button(3)
C Button D = axis(4+) button(1)
C Button U = axis(4-)
R Trig = button(5)
L Trig = axis(2+)
Mempak switch = button(6)
Rumblepak switch = button(7)
X Axis = axis(0-,0+)
Y Axis = axis(1-,1+)

[Linux: Xbox Gamepad (userspace driver)]
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(8)
Z Trig = button(4)
B Button = button(2)
A Button = button(0)
C Button R = axis(2+)
C Button L = axis(2-) button(3)
C Button D = axis(3+) button(1)
C Button U = axis(3-)
R Trig = button(5)
L Trig = axis(5+)
Mempak switch = button(6)
Rumblepak switch = button(7)
X Axis = axis(0-,0+)
Y Axis = axis(1-,1+)

***End section***

In this way, one could play smoothly any games, no matter what driver he uses.
However, I can't guarantee that xpad configuration could work fine under 
Windows or Mac OS X.

Original comment by masterga...@gmail.com on 7 Sep 2013 at 2:26

GoogleCodeExporter commented 8 years ago
Maybe it is better to keep your change in a separate section and not the 
"Linux: Xbox Gamepad (userspace driver)"? I don't have such a device and 
therefore cannot check it

Original comment by s...@narfation.org on 13 Dec 2013 at 4:20

GoogleCodeExporter commented 8 years ago
will this work with xubuntu 

Original comment by Baddonke...@gmail.com on 20 Aug 2014 at 5:36

GoogleCodeExporter commented 8 years ago
Greetings.  Seeking help - no buttons on my controller seems to work.  I've 
tried 4 of them and tried every combination in this ticket.  Is there a way to 
get mupen64plus to output "Input: Controller 1: pressed button(3)"?  -verbose 
don't do this.

Describe your system:
 - Operating System (be specific): XBMCbuntu 13.1 Gotham (Ubuntu 14.04.1 LTS GNU/Linux 3.13.0-35-generic x86_64)
 - Machine type (32-bit or 64-bit): 64-bit
 - Mupen64Plus version: 2.0.0
 - Plugins used:
  + 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
  + 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

Describe the problem:

No controller inputs working when a XBOX 360 controller clone is used

stdout shows:
Input: 1 SDL joysticks were found.
Input: N64 Controller #1: Using auto-config with SDL joystick 0 ('Afterglow 
Gamepad for Xbox 360')
Input: 1 controller(s) found, 1 plugged in and usable in the emulator
Input: Rumble activated on N64 joystick #1
Input Warning: Couldn't open rumble support for joystick #2
Input Warning: Couldn't open rumble support for joystick #3
Input Warning: Couldn't open rumble support for joystick #4
Input: Mupen64Plus SDL Input Plugin version 2.0.0 initialized.

Changes made:
Added "[Afterglow Gamepad for Xbox 360]" to this block in 
/usr/share/games/mupen64plus/InputAutoCfg.ini

[Microsoft X-Box 360 pad]
[Win32: Controller (XBOX 360 For Windows)]
[Win32: XBOX 360 For Windows (Controller)]
[Win32: XBOX 360 For Windows]
[Xbox 360 Wireless Receiver]
[OSX: Wireless 360 Controller]
[OSX: Controller]
[Linux: Xbox Gamepad (userspace driver)]
[Afterglow Gamepad for Xbox 360]
plugged = True
plugin = 2
mouse = False
AnalogDeadzone = 4096,4096
AnalogPeak = 32768,32768
DPad R = hat(0 Right) button(12)
DPad L = hat(0 Left) button(11)
DPad D = hat(0 Down) button(14)
DPad U = hat(0 Up) button(13)
Start = button(8)
Z Trig = button(4)
B Button = button(2)
A Button = button(0)
C Button R = axis(3+)
C Button L = axis(3-) button(3)
C Button D = axis(4+) button(1)
C Button U = axis(4-)
R Trig = button(5)
L Trig = axis(2+)
Mempak switch = button(6)
Rumblepak switch = button(7)
X Axis = axis(0-,0+)
Y Axis = axis(1-,1+)

Original comment by jlco...@gmail.com on 16 Sep 2014 at 3:24

GoogleCodeExporter commented 8 years ago
Bullcrap like this is why getting rid of the gui was a bad idea, now mupen 
sucks.
Want a good n64 emulator use project64 in wine

Original comment by Dancingm...@gmail.com on 25 Sep 2014 at 1:46

GoogleCodeExporter commented 8 years ago
@Dancingm...@gmail.com: If you want a gui then use a gui. Ever tried m64py?

Original comment by conc...@web.de on 25 Sep 2014 at 6:38

GoogleCodeExporter commented 8 years ago
@masterga   thx alot dude! worked for me! 

Original comment by brfabi...@gmail.com on 4 Feb 2015 at 8:17