Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Controller bounding for mupen64plus to a specified number #49

Open
HansKockrich opened this issue Sep 16, 2017 · 6 comments
Open

Controller bounding for mupen64plus to a specified number #49

HansKockrich opened this issue Sep 16, 2017 · 6 comments

Comments

@HansKockrich
Copy link

Hi there,

I have a problem regarding the bounding of controllers for mupen64plus.

I have 3 controllers (Thrustmaster dual analog 3.2 / FireStorm Dual Power 2 / Thrustmaster analog gamepad) and I want to bound each controller to a specified number (e.a. the blue controller is always player number 1, the red one always player number 2 and the green one always player number 3 even if I switch the usb ports.

How is that possible?

So far I set up my controllers via "InputAutoCfg.ini" and assigned all the buttons. Only the bounding of the controllers won't work?!

I really tried a lot and even in different forums I couldn't find a solution :-(

Can anyone help me?

PS: Here is my "InputAutoCfg.ini":

[Thrustmaster dual analog 3.2]
plugged = True
plugin = 2
mouse = False
device=1
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(3)
Z Trig = button(8)
B Button = button(1)
A Button = button(0)
C Button R = axis(3+)
C Button L = axis(3-)
C Button D = axis(2+)
C Button U = axis(2-)
R Trig = button(6)
L Trig = button(4)
Mempak switch =
Rumblepak switch =
X Axis = axis(0-,0+)
Y Axis = axis(1-,1+)

[FireStorm Dual Power 2]
plugged = True
plugin = 2
mouse = False
device=2
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(3)
Z Trig = button(8)
B Button = button(1)
A Button = button(0)
C Button R = axis(3+)
C Button L = axis(3-)
C Button D = axis(2+)
C Button U = axis(2-)
R Trig = button(6)
L Trig = button(4)
Mempak switch =
Rumblepak switch =
X Axis = axis(0-,0+)
Y Axis = axis(1-,1+)

[Thrustmaster analog gamepad]
plugged = True
plugin = 2
mouse = False
device=3
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(3)
Z Trig = button(8)
B Button = button(1)
A Button = button(0)
C Button R = axis(3+)
C Button L = axis(3-)
C Button D = axis(2+)
C Button U = axis(2-)
R Trig = button(6)
L Trig = button(4)
Mempak switch =
Rumblepak switch =
X Axis = axis(0-,0+)
Y Axis = axis(1-,1+)

@richard42
Copy link
Member

Luckily, I think it is possible to do exactly what you want to do with the current software. You need to make changes to the main "mupen64plus.cfg" file. In the Input-SDL-Control1 section, set "mode" to "1", and set "name" to "Thrustmaster dual analog 3.2" (or whatever the blue one is). In the Input-SDL-Control2 section, set "mode" to "1", and "name" to "FireStorm Dual Power 2" (or whatever the red controller is). And do likewise for the 3rd controller.

@HansKockrich
Copy link
Author

HansKockrich commented Sep 28, 2017

Thanks a lot for your response!

I made the changes to the main "mupen64plus.cfg" file and so far it works. Thanks for that!

So I got myself a fourth controller. The problem is, its name is also "Thrustmaster dual analog 3.2" (the same as the first controller). Due to the same controller name, the assignment isn't clear. So both controllers with the name "Thrustmaster dual analog 3.2" cannot be assigned to a specified number.

In my opinion I eventually have two options:

  1. Renaming the controller:
    Does someone know how to rename the controller name, so I can differentiate them?

  2. Use another information than just the "name"-parameter:
    Is it possible to use VID (Vendor ID) or PID (Product ID) to specify and distinguish both controllers with the same name?

best regards, Hans

@richard42
Copy link
Member

I think that the name is either set by the kernel driver, or on an EEPROM chip inside of the USB device itself. Either way, it's not a simple thing to change. I would also assume that if the controllers have the same name, they probably have the same VID and PID as well.

@HansKockrich
Copy link
Author

Hey,
thanks again for your answer.

Do you or anyone else see a solution for this problem?

I changed the name of the controller with this tutorial (here: with USB Device instead of mouse)
https://www.eightforums.com/customization/15321-tutorial-how-change-device-names-device-manager.html
The changed name of the Controller even appeared in Windows "Devices and Printers".
Unfortunately the mupen64plus.cfg won't recognized this changed name :-(

@richard42
Copy link
Member

Apparently that registry hack just causes the Windows OS to use a different name in the device manager. Mupen64Plus gets the name from the SDL library, and it must be using a lower level API, which doesn't remap the name according to the registry.

@HansKockrich
Copy link
Author

Hey richard42,

thanks for your answer.

In this case I'll have to live with that :-/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants