What's new

Help us with new Blight Input feature

Richard42

Emulator Developer
Hello all,

I'm planning on adding a new auto-configuration feature to our SDL input plugin (formerly known as Blight input) while I'm converting it to the new API. The way that this feature will work is, the first time you run the emulator (or if you delete the configuration file), the SDL input plugin will read the name of the joystick and set some sensible default controls for you. I only have 2 joysticks, both Logitech pads, so I would like to ask you in the community to gather some data for me so that this feature may support other joysticks as well.

If you are willing to lend your help with this, please do the following:

1. Unplug all of your joysticks and controllers from your PC
2. Plug in just one joystick that you want to test and configure
3. Run mupen64plus 1.5 or later SVN version
4. Open the configuration dialog with Options -> Configure...
5. Select the Plugins tab
6. Select "blight's SDL input plugin" in the Input box
7. Click Config to open the SDL configuration window
8. Write down the exact name shown in the "Device:" box in the upper-right corner of the window
9. If the Device name is Keyboard or None, then your joystick was not recognized; maybe it's turned off or not supported by SDL
10. Set reasonable default configuration controls for each N64 controller input. Make sure that you set all 18 controls.
11. Click OK on the SDL dialog, then OK on the Configure dialog. Close Mupen64Plus.
12. Write an email to: [email protected]. Include the joystick name from step 8, and attach your blight configuration file (normally in ~/.mupen64plus/blight_input.conf, or if you are using the Mupen64Plus package in the Ubuntu repository, it's in ~/.config/mupen64plus/blight_input.conf)

Thanks
 
Last edited:

Tillmann

Whatever
Sorry my ignorance, but i really do not know where is the svn repo, if you don't mind to paste the url here i would gladly test 2 joysticks that i have here ("snes" joystick plugued by lpt1 and a "tool" usb joystick ps2 alike)
 
OP
R

Richard42

Emulator Developer
Sorry my ignorance, but i really do not know where is the svn repo, if you don't mind to paste the url here i would gladly test 2 joysticks that i have here ("snes" joystick plugued by lpt1 and a "tool" usb joystick ps2 alike)

You can check out the source code from SVN at:

svn://fascination.homelinux.net:7684/mupen64plus/trunk

The username is "mupen64" and the password is "Dyson5632-kart".
 

cebolla

New member
I wrote to [email protected] with bligth_input.conf, but later... the conversion is very easy!

If anyone have a device "USB Human(2p) Interface Device" and need help...

For example, this run ok on my computer (added to InputAutoCfg):

[USB Human(2p) Interface Device]
; this is a 2-port USB device. The Right port is controller #1, the Left port is #2
plugged = True
plugin = 2
mouse = False
;AnalogDeadzone = 2500,2500
;AnalogPeak = 20000,20000
DPad R= axis( 2+ )
DPad L= axis( 2- )
DPad D= axis( 5+ )
DPad U= axis( 5- )
Start= button( 0 )
Z Trig= button( 1 )
B Button= button( 3 )
A Button= button( 2 )
C Button R= hat( 0 Right )
C Button L= hat( 0 Left )
C Button D= hat( 0 Down )
C Button U= hat( 0 Up )
R Trig= button( 5 )
L Trig= button( 4 )
Mempak switch= button( 9 )
Rumblepak switch= button( 8 )
Y Axis= axis( 1-,1+ )
X Axis= axis( 0-,0+ )
__NextController:
plugged = True
plugin = 2
mouse = False
;AnalogDeadzone = 2500,2500
;AnalogPeak = 20000,20000
DPad R= axis( 6+ )
DPad L= axis( 6- )
DPad D= axis( 7+ )
DPad U= axis( 7- )
Start= button( 12 )
Z Trig= button( 13 )
B Button= button( 15 )
A Button= button( 14 )
C Button R= hat( 1 Right )
C Button L= hat( 1 Left )
C Button D= hat( 1 Down )
C Button U= hat( 1 Up )
R Trig= button( 17 )
L Trig= button( 16 )
Mempak switch= button( 21 )
Rumblepak switch= button( 20 )
Y Axis= axis( 4-,4+ )
X Axis= axis( 3-,3+ )

:bouncy:


SORRY!!!!


The original blight_input.conf :

[controller 0]
plugged=1
plugin=2
mouse=0
device=0
DPad R=key( 0 ); button( None ); axis( 2+ ); hat( None , None ); mouse( None )
DPad L=key( 0 ); button( None ); axis( 2- ); hat( None , None ); mouse( None )
DPad D=key( 0 ); button( None ); axis( 5+ ); hat( None , None ); mouse( None )
DPad U=key( 0 ); button( None ); axis( 5- ); hat( None , None ); mouse( None )
Start=key( 0 ); button( 0 ); axis( None ); hat( None , None ); mouse( None )
Z Trig=key( 0 ); button( 1 ); axis( None ); hat( None , None ); mouse( None )
B Button=key( 0 ); button( 3 ); axis( None ); hat( None , None ); mouse( None )
A Button=key( 0 ); button( 2 ); axis( None ); hat( None , None ); mouse( None )
C Button R=key( 0 ); button( None ); axis( None ); hat( 0 , Right ); mouse( None )
C Button L=key( 0 ); button( None ); axis( None ); hat( 0 , Left ); mouse( None )
C Button D=key( 0 ); button( None ); axis( None ); hat( 0 , Down ); mouse( None )
C Button U=key( 0 ); button( None ); axis( None ); hat( 0 , Up ); mouse( None )
R Trig=key( 0 ); button( 5 ); axis( None ); hat( None , None ); mouse( None )
L Trig=key( 0 ); button( 4 ); axis( None ); hat( None , None ); mouse( None )
Mempak switch=key( 0 ); button( 9 ); axis( None ); hat( None , None ); mouse( None )
Rumblepak switch=key( 0 ); button( 8 ); axis( None ); hat( None , None ); mouse( None )
Y Axis=key( 0 , 0 ); button( None , None ); axis( 1- , 1+ ); hat( None , None , None )
X Axis=key( 0 , 0 ); button( None , None ); axis( 0- , 0+ ); hat( None , None , None )

[controller 1]
plugged=1
plugin=2
mouse=0
device=0
DPad R=key( 0 ); button( None ); axis( 6+ ); hat( None , None ); mouse( None )
DPad L=key( 0 ); button( None ); axis( 6- ); hat( None , None ); mouse( None )
DPad D=key( 0 ); button( None ); axis( 7+ ); hat( None , None ); mouse( None )
DPad U=key( 0 ); button( None ); axis( 7- ); hat( None , None ); mouse( None )
Start=key( 0 ); button( 12 ); axis( None ); hat( None , None ); mouse( None )
Z Trig=key( 0 ); button( 13 ); axis( None ); hat( None , None ); mouse( None )
B Button=key( 0 ); button( 15 ); axis( None ); hat( None , None ); mouse( None )
A Button=key( 0 ); button( 14 ); axis( None ); hat( None , None ); mouse( None )
C Button R=key( 0 ); button( None ); axis( None ); hat( 1 , Right ); mouse( None )
C Button L=key( 0 ); button( None ); axis( None ); hat( 1 , Left ); mouse( None )
C Button D=key( 0 ); button( None ); axis( None ); hat( 1 , Down ); mouse( None )
C Button U=key( 0 ); button( None ); axis( None ); hat( 1 , Up ); mouse( None )
R Trig=key( 0 ); button( 17 ); axis( None ); hat( None , None ); mouse( None )
L Trig=key( 0 ); button( 16 ); axis( None ); hat( None , None ); mouse( None )
Mempak switch=key( 0 ); button( 21 ); axis( None ); hat( None , None ); mouse( None )
Rumblepak switch=key( 0 ); button( 20 ); axis( None ); hat( None , None ); mouse( None )
Y Axis=key( 0 , 0 ); button( None , None ); axis( 4- , 4+ ); hat( None , None , None )
X Axis=key( 0 , 0 ); button( None , None ); axis( 3- , 3+ ); hat( None , None , None )

[controller 2]
plugged=0
.....
.....


AND A BETTER CONFIGURATION!!!!


[USB Human(2p) Interface Device]
; this is a USB device with 2-ports for PS2 or PS1 controllers.
plugged = True
plugin = 2
mouse = False
;AnalogDeadzone = 2500,2500
;AnalogPeak = 20000,20000
DPad R= axis( 2+ )
DPad L= axis( 2- )
DPad D= axis( 5+ )
DPad U= axis( 5- )
Start= button( 6 )
Z Trig= button( 7 )
B Button= button( 3 )
A Button= button( 2 )
C Button R= hat( 0 Right )
C Button L= button( 0 )
C Button D= button( 1 )
C Button U= hat( 0 Up )
R Trig= button( 5 )
L Trig= button( 4 )
Mempak switch= button( 9 )
Rumblepak switch= button( 8 )
Y Axis= axis( 1-,1+ )
X Axis= axis( 0-,0+ )
__NextController:
plugged = True
plugin = 2
mouse = False
;AnalogDeadzone = 2500,2500
;AnalogPeak = 20000,20000
DPad R= axis( 6+ )
DPad L= axis( 6- )
DPad D= axis( 7+ )
DPad U= axis( 7- )
Start= button( 18 )
Z Trig= button( 19 )
B Button= button( 15 )
A Button= button( 14 )
C Button R= hat( 1 Right )
C Button L= button( 12 )
C Button D= button( 13 )
C Button U= hat( 1 Up )
R Trig= button( 17 )
L Trig= button( 16 )
Mempak switch= button( 21 )
Rumblepak switch= button( 20 )
Y Axis= axis( 4-,4+ )
X Axis= axis( 3-,3+ )


AnalogDeadzone and AnalogPeak :plain: ... I haven't problems playing the games:bouncy:
 
Last edited:

hulkenstrong

New member
Hi!

Just wanted to share what I needed to add to get my xbox360 wired controller to work in.

[XBOX 360 For Windows]
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(7)
Z Trig = axis(2-)
B Button = button(2)
A Button = button(0)
C Button R = axis(4+)
C Button L = axis(4-)
C Button D = axis(3+)
C Button U = axis(3-)
R Trig = button(5)
L Trig = button(4)
Mempak switch = button(8)
Rumblepak switch = axis(9)
X Axis = axis(0-,0+)
Y Axis = axis(1-,1+)


Also Can you control the deadzone on the stick used for the C buttons? As its really sensitive now. Cant strafe in Goldeneye without the aim going up or down. This doesn't happen in other N64 emus using NRage input plugin.
 

Surkow

Member
[...] Also Can you control the deadzone on the stick used for the C buttons? As its really sensitive now. Cant strafe in Goldeneye without the aim going up or down. This doesn't happen in other N64 emus using NRage input plugin.

Maybe you can assign a number of C buttons to real buttons intead of the joystick. For my xbox360 controller I assigned all the C buttons to the left joystick and two of them to real buttons (see this post for more information).
 

guran

New member
Hmm, I've been thinking about the same thing, I use the right analog stick for the C buttons, but it's not really optimal since it's too sensitive and you quite often push some other C button in the game then the one you want to (have been playing Zelda OoT recently, and the C buttons are definitely the biggest problem, you play the songs wrong if you don't take it quite slow, and you don't always use the weapon you want to), I have been trying to figure out another layout where I use some buttons instead of the stick, but it means that I would have to move A and B to some other place which would not be any good, at least not for Zelda.

I tried to change the deadzone, but it doesn't change much at all (I don't even know if it work for other axis then 0 and 1), from what it looks like you would need to add deadzones between all the axis the stick uses, like between axis(4+) [C Button R] and axis(3-) [C Button U] for example, but I may have gotten something wrong here, if the case was that the deadzone function doesn't work on all the other axis..
 

hulkenstrong

New member
Maybe you can assign a number of C buttons to real buttons intead of the joystick. For my xbox360 controller I assigned all the C buttons to the left joystick and two of them to real buttons (see this post for more information).

Well sure but I really feel the controller is optimally setup as is. As this "problem" doesn't happen when using nrage input plugin and project64. Maybe the nrage plugin simply ignore the left upp and so on or use the second analouge stick in digital mode.
 

guran

New member
I had to try with Project64 and the latest NRage plugin, and it all works very nicely having the C buttons bound to the analog stick, it doesn't feel super sensitive at all. Tried with Goldeneye.


Edit:

After doing some more testing it looks like NRage for the N64 buttons when you bind them to some of the axis only react when you move the analog stick all the way out to the edge (like the deadzone is really high), but it also looks like there is a deadzone between the different axis on the analog stick too as I tried to describe in my previous post, and it looks like hulkenstrong did the same.

One drawback with this is that the right and left trigger on the Xbox 360 pad is also axis so you have to press those all the way down for them to actually do something.
 
Last edited:

hulkenstrong

New member
I had to try with Project64 and the latest NRage plugin, and it all works very nicely having the C buttons bound to the analog stick, it doesn't feel super sensitive at all. Tried with Goldeneye.


Edit:

After doing some more testing it looks like NRage for the N64 buttons when you bind them to some of the axis only react when you move the analog stick all the way out to the edge (like the deadzone is really high), but it also looks like there is a deadzone between the different axis on the analog stick too as I tried to describe in my previous post, and it looks like hulkenstrong did the same.

One drawback with this is that the right and left trigger on the Xbox 360 pad is also axis so you have to press those all the way down for them to actually do something.

Exactly, love that "feel" of the second stick and second L/R buttons. Makes it more like a real N64 that only had one analogue stick. To have a deadzone option or maybe axis option for the analogue sticks would perfect the input to be close to a real N64 gamepad.
 

guran

New member
I can't say that I like how the left and right trigger works in NRage, I think it's better like they work now in Mupen, assigning buttons to the analog stick in NRage sure works better though.

Anyway it would be great if you could assign custom deadzone values for every axis in Mupen, I think it would fix some of the problems.
Maybe have some global deadzone value (like AnalogDeadzone) you can set and then you can add a deadzone for some specific axis if you want by maybe adding something like AnalogDeadzoneAxis3 for axis(3*).

I think it would fix the problem in almost the same way as NRage does it, but NRage might do something more then just that (like "deadzones" between the axis, but I don't really know that).

Tell me what you think, maybe it's a worthless idea.
 
OP
R

Richard42

Emulator Developer
The AnalogDeadzone and AnalogPeak parameters only apply to the 2 analog axes of the emulated N64 controller. I could add a DigitalDeadzone parameter which would apply to any analog joystick axes which are mapped to buttons. From looking at the code, currently this value is fixed at 6000.
 

guran

New member
Sounds nice! Even if it affect all the axis (I would just want to change the right analog stick and not the left and right trigger buttons), but I don't even know if this would completely fix the too sensitive analog stick anyway, but it's still worth a try.
 

Acidnine

New member
I have a wired XBox 360 Wired Controller... Hopefully this helps someone.

;;;Explanation of the Controller Keys
;axis(1-) == Left Analog Up
;axis(1+) == Left Analog Down
;axis(0+) == Left Analog Right
;axis(0-) == Left Analog Left
;axis(2+) == Left Trigger
;axis(2-) == Right Trigger
;axis(3-) == Right Analog Up
;axis(3+) == Right Analog Down
;axis(4+) == Right Analog Right
;axis(4-) == Right Analog Left
;hat(0 Up) == DPad Up
;hat(0 Down) == DPad Down
;hat(0 Right) == DPad Right
;hat(0 Left) == DPad Left
;button(9) == Right Analog Click
;button(8) == Left Analog Click
;button(7) == Start Button
;button(6) == Back Button
;button(5) == Right Bumper
;button(4) == Left Bumper
;button(3) == Y Button
;button(2) == X Button
;button(1) == B Button
;button(0) == A Button

;My Config

[XBOX 360 For Windows (Controller)]
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(1)
A Button = button(0)
C Button R = axis(4+)
C Button L = axis(4-)
C Button D = axis(3+)
C Button U = axis(3-)
R Trig = button(5)
L Trig = button(4)
Mempak switch = button(6)
Rumblepak switch = axis(2+)
X Axis = axis(0-,0+)
Y Axis = axis(1-,1+)
 

guran

New member
I would just like to add that the config from Hulkenstrong (that recently was commited to the Mupen64plus project) doesn't work with my Xbox 360 controller, it doesn't have the same name and the DPad buttons needs to be hat(*) or it wont work, also the Z-trigger is on the right side, but that does of course not make it unusable.

This is the config I modified from the [Microsoft X-Box 360 pad] to work with Windows a while ago.
 

hulkenstrong

New member
I would just like to add that the config from Hulkenstrong (that recently was commited to the Mupen64plus project) doesn't work with my Xbox 360 controller, it doesn't have the same name and the DPad buttons needs to be hat(*) or it wont work, also the Z-trigger is on the right side, but that does of course not make it unusable.

This is the config I modified from the [Microsoft X-Box 360 pad] to work with Windows a while ago.

There seem to be many different types of this controller going around. All I know is this is an original Xbox360 wired controller. Using Windows 7 x64 with drivers from Microsoft. There where already a Xbox auto config before I reported my changes to get my controller working (I copied and modified the first one to fit my controller).

Start = Start button
Z = Right second button
A = A
B = X
L =Left button
R = Right button
Analogue = Left stick
C buttons = Right stick
D pad = Digital Pad/Pov buttons

Thats how its setup on my Xbox controller after I modified the current one. Just how I love it (except for the earlier mentioned C-button problem).
 
Last edited:

guran

New member
Yeah it sure looks that way, for my controller 360 controller the DPad wont work with those axis(*) setting instead of hat(*) though. Using the latest official drivers for Windows XP 32 bit..
 
OP
R

Richard42

Emulator Developer
Okay, I have added both guran's and Acidnine's configs to the InputAutoCfg.ini file. Why are there so many different xbox360 controllers in Windows? Are these different versions of the Microsoft hardware, or different adapters?
 

hulkenstrong

New member
Okay, I have added both guran's and Acidnine's configs to the InputAutoCfg.ini file. Why are there so many different xbox360 controllers in Windows? Are these different versions of the Microsoft hardware, or different adapters?

Did some testing and the conclusion is more likely to be driver related.

Windows 7 x64 reported as XBOX 360 For Windows
Mupen 1.5 under linux reported as Microsoft X-Box 360 pad(#1)
Linux using hwinfo Model: "Microsoft Xbox360 Controller"

So 3 different names for the same controller.
 
OP
R

Richard42

Emulator Developer
Did some testing and the conclusion is more likely to be driver related.

Windows 7 x64 reported as XBOX 360 For Windows
Mupen 1.5 under linux reported as Microsoft X-Box 360 pad(#1)
Linux using hwinfo Model: "Microsoft Xbox360 Controller"

So 3 different names for the same controller.

It's not too surprising that the devices have different names on different operating systems, but what about the fact that Acidnine wrote a config for a controller named [XBOX 360 For Windows (Controller)], while guran wrote one for [Controller (XBOX 360 For Windows)]? That's pretty strange.
 

Top