What's new

Xbox360 controller with Mupen64

Surkow

Member
I'm trying to get an Xbox360 controller to work with Mupen64. The sad thing about is that I haven't been able to get any game to recognize the controller. I'm using Ubuntu Feisty Fawn which should support the controller with the xpad driver. "modinfo xpad" gives me the following output:

Code:
filename:       /lib/modules/2.6.20-16-generic/kernel/drivers/usb/input/xpad.ko
license:        GPL
description:    driver for Xbox controllers
author:         Marko Friedemann <[email protected]>, Oliver Schwartz <[email protected]>, Georg Lukas <[email protected]>, Thomas Pedley <[email protected]>, Edgar Hucek <[email protected]>
srcversion:     7EC4E48313512193C8A772E
alias:          usb:v*p*d*dc*dsc*dp*icFFisc5Dip01*
alias:          usb:v*p*d*dc*dsc*dp*ic03isc00ip00*
alias:          usb:v*p*d*dc*dsc*dp*ic58isc42ip00*
depends:        usbcore
vermagic:       2.6.20-16-generic SMP mod_unload 586 
parm:           debug:Debugging (ulong)

The only devices I can choose in the blight's SDL input plugin are "none" and "keyboard". How am I supposed to make the program aware of the controller?
 
Last edited:
OP
S

Surkow

Member
Nobody who experienced the same with a controller in Ubuntu? I still have no clue how to make it work. I tried the package "joystick" but Mupen64 still doesn't seem to recognize the controller.
 
OP
S

Surkow

Member
It seems nobody was successful in doing it. Any controllers that do work with Mupen in Linux?
 
OP
S

Surkow

Member
I understand that it's a driver problem. My other gamepads create an /dev/input/js$ entry. My Xbox360 controller does not, even with a recent kernel.
 

Hacktarux

Emulator Developer
Moderator
It does not seem to be a mupen64 specific problem, i'm sure you would have more answer on an unbuntu forum or a general linux forum.
 
OP
S

Surkow

Member
It does not seem to be a mupen64 specific problem, i'm sure you would have more answer on an unbuntu forum or a general linux forum.

Although you are correct, before I created this topic I already asked for information in the Ubuntu forums. Sadly enough for me most people were successful in using this controller and I decided to create a thread over here because I thought it was a problem with the emulator input plugin. It was not and now I try to read something about creating a device node for the controller (all my other gamepads do create one and they are recognized by Mupen).
 
Last edited:
OP
S

Surkow

Member
I upgraded to the latest kernel and was able to install a modification of the basic driver which can be found here. All buttons seem to work except for the LT and the RT buttons. They are the buttons on the back of the controller which behave like axes. I wanted to assign the Z button to the LT button but blight's input plugin does not recognize it. Does this have something to do with those buttons being recognized as axes?

Edit: I'm sure the buttons work (in other programs) because they are recognized by a joystick calibration tool called jscalibrator.
 
Last edited:
OP
S

Surkow

Member
Maybe it's blight plugin, i'm not sure. You can try to manualy edit the config file.

I edited the blight_input.conf without results. I know the axes are called 2 and 5 but when I enter the number 2 the config is overwritten as soon as I exit mupen64.

Code:
Z Trig=key( 122 ); button( None ); axis( 2 ); hat( None , None ); mouse( None )
 
OP
S

Surkow

Member
It was a problem with the graphics plugins (!?). I had couldn't use glN64 for some reason. Somehow it caused the behavior of not being able to use the triggers on the back of the controller (which seems really weird to me).
 
OP
S

Surkow

Member
Was it happening with all games ?

Edit: I deleted what I wrote because I think the issues can't be reproduced. I should compile a version of Mupen64 myself because of the random issues I'm having (problems with the input and instability of several plugins).
 

Danny

Programmer | Moderator
Nobody who experienced the same with a controller in Ubuntu? I still have no clue how to make it work. I tried the package "joystick" but Mupen64 still doesn't seem to recognize the controller.

Yep, the xbox 360 controller is a bitch to get working on ubuntu, ive seen one or two "Guides" on how to do it on the net, but none of them worked. I hope you like using your keyboard :(
 
OP
S

Surkow

Member
Yep, the xbox 360 controller is a bitch to get working on ubuntu, ive seen one or two "Guides" on how to do it on the net, but none of them worked. I hope you like using your keyboard :(

The newer Linux kernels have a different simplified model for input devices like controllers and therefore the driver has to be installed in a different place. In the end I got it to work because of this post.
 
OP
S

Surkow

Member
After a reinstall of my OS (currently Ubuntu Gutsy Gibbon) I can no longer use the triggers on the back of my controller anymore with blight's SDL input plugin.

Edit: I deleted what I wrote because I think the issues can't be reproduced. I should compile a version of Mupen64 myself because of the random issues I'm having (problems with the input and instability of several plugins).

To quote myself, compiling did not make a difference.
 
OP
S

Surkow

Member
I'm sure it's a problem with the input plugin. In Feisty it worked half and now the triggers aren't noticed at all. Could anyone test mupen with an xbox360 controller?
 

nmn

Mupen64Plus Dev.
Well, I seriously doubt its really a problem with the plugin. Not because of any reason in particular but because every feature works on all of my USB controllers and that plugin uses SDL, which simplifies the interface. Its normally a better chance that theres something wrong with the libraries handling low level, or in this case, much more of a chance that the kernel level driver is wrong somewhere. The most suspecious thing here? The fact that its an OS upgrade causing this. An OS upgrade usually means a kernel upgrade which means your kernel drivers all get updated (except for some that just get recompiled ;))

So while its definitally possible theres something wrong in blights SDL input plugin, its more likely related to what you did that caused the problem, an OS upgrade. The most closely related thing there would be the kernel drivers. Which is how i keep on suspecting that its the problem. Now, it would be different if you were using SVN and that caused it to not work anymore, but as you said, its because of the OS upgrade.

Also, before giving up, you could give upgrading SDL a shot. That can help too.
 

Richard42

Emulator Developer
I'm sure it's a problem with the input plugin. In Feisty it worked half and now the triggers aren't noticed at all. Could anyone test mupen with an xbox360 controller?

NMN is right about the Ubuntu upgrade causing your problem - that is suspicious. Does the controller work with other apps/games? If so, then it could be the lack of a feature in the input plugin. What I'm getting at is that triggers on some controllers are actually analog - they have a range of movement, not just on/off like a switch. Is the 360 trigger like this? If so, then the trigger will appear to SDL as an AXIS, instead of a BUTTON. In that case, if the blight input is expecting a button press but you're moving an axis, it won't work. XMESS has a feature where an axis movement can be interpreted as a button press - a similar thing could also be added to the blight input plugin if this solves your problem.
 
OP
S

Surkow

Member
Well, I seriously doubt its really a problem with the plugin. Not because of any reason in particular but because every feature works on all of my USB controllers and that plugin uses SDL, which simplifies the interface. Its normally a better chance that theres something wrong with the libraries handling low level, or in this case, much more of a chance that the kernel level driver is wrong somewhere. The most suspecious thing here? The fact that its an OS upgrade causing this. An OS upgrade usually means a kernel upgrade which means your kernel drivers all get updated (except for some that just get recompiled ;))

So while its definitally possible theres something wrong in blights SDL input plugin, its more likely related to what you did that caused the problem, an OS upgrade. The most closely related thing there would be the kernel drivers. Which is how i keep on suspecting that its the problem. Now, it would be different if you were using SVN and that caused it to not work anymore, but as you said, its because of the OS upgrade.
jscalibrator
Also, before giving up, you could give upgrading SDL a shot. That can help too.

The thing is that I used the exact same drivers and I already used the same kernel in the previous version of Ubuntu.

NMN is right about the Ubuntu upgrade causing your problem - that is suspicious. Does the controller work with other apps/games? If so, then it could be the lack of a feature in the input plugin. What I'm getting at is that triggers on some controllers are actually analog - they have a range of movement, not just on/off like a switch. Is the 360 trigger like this? If so, then the trigger will appear to SDL as an AXIS, instead of a BUTTON. In that case, if the blight input is expecting a button press but you're moving an axis, it won't work. XMESS has a feature where an axis movement can be interpreted as a button press - a similar thing could also be added to the blight input plugin if this solves your problem.

Yes they are axes. Last time they were stored as axes in the input config file. Currently they do nothing. I know the triggers work because "jscalibrator" (Joystick test application) show's them to be working. I read about jscalibrator interfering with the controller but I didn't even had it installed when I tested Mupen.
 
Last edited:

Top