What's new

Help us with new Blight Input feature

hulkenstrong

New member
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.

Not if they are using drivers made by completely different people. To narrow it down you probably need to know the driver used before blaming anything else. I wouldn't be surprised if Microsoft had different teams doing drivers for x86 and x64. Also it is a popular controller, meaning theres 3d party drivers circulating.
 
OP
R

Richard42

Emulator Developer
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.

I have added a new feature to the input plugin which allow custom deadzone values when mapping a joystick analog axis to an N64 controller digital button. To use it, just add a comma and a positive deadzone value in the axis() word of the config parameter. For example, you could do something like this:

C Button R = axis(3+,32000)
C Button L = axis(3-,32000)
C Button D = axis(2+,32000)
C Button U = axis(2-,32000)

This would set the deadzone very high (32767 is max) for the analog joystick axes 2 and 3 which map to the C buttons on the N64 controller.

I have committed the new feature to the Hg repository. If you don't have a build environment set up to build the input plugin, let me know and I can build the latest code and put it somewhere for you to grab and test.
 

Lig

New member
I've noticed that at some point the mupen64plus.cfg file gets parameters added with the controller automatic setting feature. Would it interfere with anything if my frontend in response to there being no parameters in the .cfg file ran the following code:

m64p_handle InputSDLControl = NULL;
ConfigOpenSection(section.c_str( ), &InputSDLControl);

ConfigSetDefaultBool(InputSDLControl, "plugged", 0, "Specifies whether this controller is 'plugged in' to the simulated N64");

ConfigSetDefaultInt(InputSDLControl, "plugin", 1, "Specifies which type of expansion pak is in the controller: 1=None, 2=Mem pak, 5=Rumble pak");

ConfigSetDefaultBool(InputSDLControl, "mouse", 0, "If True, then mouse buttons may be used with this controller");

ConfigSetDefaultInt(InputSDLControl, "device", -1, "Specifies which joystick is bound to this controller: -2=Keyboard/mouse, -1=Auto config, 0 or more= SDL Joystick number");

ConfigSetDefaultString(InputSDLControl, "AnalogDeadzone", "4096,4096", "The minimum absolute value of the SDL analog joystick axis to move the N64 controller axis value from 0. For X, Y axes.");
ConfigSetDefaultString(InputSDLControl, "AnalogPeak", "32768,32768", "An absolute value of the SDL joystick axis >= AnalogPeak will saturate the N64 controller axis value (at 80). For X, Y axes. For each axis, this must be greater than the corresponding AnalogDeadzone value");

ConfigSetDefaultString(InputSDLControl, "DPad R", "", "");
ConfigSetDefaultString(InputSDLControl, "DPad L", "", "");
ConfigSetDefaultString(InputSDLControl, "DPad D", "", "");
ConfigSetDefaultString(InputSDLControl, "DPad U", "", "");
ConfigSetDefaultString(InputSDLControl, "Start", "", "");
ConfigSetDefaultString(InputSDLControl, "Z Trig", "", "");
ConfigSetDefaultString(InputSDLControl, "B Button", "", "");
ConfigSetDefaultString(InputSDLControl, "A Button", "", "");
ConfigSetDefaultString(InputSDLControl, "C Button R", "", "");
ConfigSetDefaultString(InputSDLControl, "C Button L", "", "");
ConfigSetDefaultString(InputSDLControl, "C Button D", "", "");
ConfigSetDefaultString(InputSDLControl, "C Button U", "", "");
ConfigSetDefaultString(InputSDLControl, "R Trig", "", "");
ConfigSetDefaultString(InputSDLControl, "L Trig", "", "");
ConfigSetDefaultString(InputSDLControl, "Mempak switch", "", "");
ConfigSetDefaultString(InputSDLControl, "Rumblepak switch", "", "");
ConfigSetDefaultString(InputSDLControl, "X Axis", "", "");
ConfigSetDefaultString(InputSDLControl, "Y Axis", "", "");
 

guran

New member
Tried it a little with Goldeneye and Zelda now, and so far it all seems to work really well!

Edit:

Don't have much to add, but it works like the NRage input plugin, but it's better imo since I can use different values for every axis.

You press the C button you want to press right now instead of how it was before with too sensitive and it felt a little random sometimes with what C button you were to press down..

Thanks once again.
 
Last edited:

tukuyomi

New member
Hello!
I'll share what I added to InputAutoCfg.ini to make my Thrustmaster gamepad to work:

Code:
[Thrustmaster Dual Trigger 3-in-1]
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(9)
Z Trig = button(3)
B Button = button(0)
A Button = button(1)
C Button R = axis(2+)
C Button L = axis(2-)
C Button D = axis(5+)
C Button U = axis(5-)
R Trig = button(5)
L Trig = button(4)
Mempak switch = button(6)
Rumblepak switch = button(7)
X Axis = axis(0-,0+)
Y Axis = axis(1-,1+)
I hope it will be useful :)
 

Slizyboy

New member
I, too, am in the same boat as Acidnine, running Windows 7 32bit. I managed to figure out all the relevant buttons and axis myself, but I can't get the DPad to work, whether I use the hat buttons or axis(5/6/+/-). The strange thing is, if I run Mupen64Plus v1.3, with the blight plugin that it shipped with, and go to the GUI configuration screen, the d pad buttons are correctly detected as hat buttons. Could this be a problem with my ROM, then, rather than with the input plugin?

For reference, here's what I'm (trying) to use

[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(6)
Z Trig = button(4)
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 = axis(2-)
L Trig = axis(2+)
Mempak switch =
Rumblepak switch =
X Axis = axis(0-,0+)
Y Axis = axis(1-,1+)

Also, does the input plugin shipped w/ 1.99.3 support analog deadzones when mapped to buttons (like for the C buttons)? Because the link provided above no longer works.
 

Slizyboy

New member
Thanks for the quick reply Richard. The joystick does indeed respond as expected - the utility shows me the following:

Joystick 0 hat 0 value: right
Joystick 0 hat 0 value: centered
Joystick 0 hat 0 value: up
Joystick 0 hat 0 value: centered
Joystick 0 hat 0 value: left
Joystick 0 hat 0 value: centered
Joystick 0 hat 0 value: down
Joystick 0 hat 0 value: centered

For the various motions. So, unless the dpad doesn't actually do anything in OoT (which would be strange, as I've tried it in the new-character creation name selection, and in the start menu in-game), something isn't talking to someone else right. I've even tried changing the capitalization of R/right, in case that made a difference, and it didn't.

I'll try poking at it some more later, but if you have any suggestions for what else I could try I'm all ears.

Edit: If you could repost the input SDL with the analog cutoffs, that would be useful as well, unless it's not compatible with 1.99.3.
 

cebolla

New member
Mupen64 plus SVN. Compiled and executed in Windows XP and Debian 32-bits.

USB Human(2p) Interface Device (Asikgame - Super Dual Box) input control.

Only the ps2 gamepad plugged in the port 2 run ok.

In other programs all ok and SDL Joy Test all ok (Windows and Debian).

If I change the gamepads from one port to other, only run port 2 and tests ok.

Log in Windows:

...
Input: Using auto-configuration for device 'USB Human(2p) Interface Device'
Input: Using auto-configuration for device 'USB Human(2p) Interface Device': 2 controllers for this device
Input: 2 controller(s) found, 2 plugged in and usable in the emulator
...

Sorry for my bad English. I hope you understand me.

FIXED :party:
 
Last edited:

HDL

New member
Here are two more controllers. The first one is for a PS2 (DualShock 2) controller and some generic USB adapter from GreenAsia, Inc. I'm not sure if this first one was posted, but the InputAutoCfg.ini file that comes with 1.99.3 didn't have it:

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

The controls are as follows:

Left analog: N64 analog
Right analog: C buttons
L1: C left
L2: Z button
R1: C down
R2: R button
Select: L button
Start: Start...
Cross: A button
Square: B button
Triangle: C up
Circle: C right

I've also configured the buttons for a SFIV TE arcade stick:

Code:
[Street Fighter IV FightStick TE]
plugged = True
plugin = 2
mouse = False
AnalogDeadzone = 4096,4096
AnalogPeak = 32768,32768
DPad R = 
DPad L = 
DPad D = 
DPad U = 
Start = button(4)
Z Trig = button(11)
B Button = button(13)
A Button = button(14)
C Button R = axis(4+)
C Button L = button(9)
C Button D = axis(5+)
C Button U = button(8)
R Trig = button(12)
L Trig = button(5)
Mempak switch = 
Rumblepak switch = 
X Axis = button(2,3)
Y Axis = button(0,1)

The controls for this setup (TE stick left, N64 right):

Stick (DP mode): analog stick
A: Z button
B: R button
X: B button
Y: A button
LB: C up
RB: C left
LT: C right
RT: C down
Back: L button
Start: Start...
 

Bfarber91

New member
Need mapping blight_input for xbox 360 controller on a mac osx

I'm having a lot of trouble finding a mapped blight_input for my mac osx the best version i have right now is

[Input-SDL-Control1]
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(4)
Z Trig = axis(2+)
B Button = button(12)
A Button = button(11)
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+)

i got this from a deifferent message board but it doesnt work, i need help mapping one for all the buttons that work, this doesnt. also does anyone know how to have the keybard as controller one and the 360 controller as controller 2 to play mario kart or something, PLEASE HELP
 

Top