Page 1 of 1

Controller Profiles

PostPosted: Fri Sep 27, 2013 4:32 am
by Zombie
Can we have Controller Profiles detected by the USB ID of the controller plugged in? Many of my controllers are Wireless and I'd prefer to be able to change mapping at will. Could we store individual setups in ~/.wahcade?

Re: Controller Profiles

PostPosted: Fri Sep 27, 2013 11:47 pm
by sairuk
It can possibly be done, add it to the blueprints and I or someone else may get a chance to look into the reality of it. I can understand the need for this, not yet sure how it would be done.

Re: Controller Profiles

PostPosted: Sat Sep 28, 2013 5:19 pm
by Zombie
Each Controller has a USB String. The USB String would be used to describe the Controller. Maybe even the file name.

Code: Select all
[WiseGroup.,Ltd TigerGame XBOX+PS2+GC Game Controller Adapter]
plugged = True
plugin = 2
mouse = False
AnalogDeadzone = 4096,4096
AnalogPeak = 32768,32768
DPad R = button(9)
DPad L = button(8)
DPad D = button(10)
DPad U = button(11)
Start = button(7)
Z Trig = button(6)
B Button = button(1)
A Button = button(0)
C Button R = axis(2+)
C Button L = axis(2-)
C Button D = axis(3+)
C Button U = axis(3-)
R Trig = axis(4+)
L Trig = axis(5+)
Mempak switch =
Rumblepak switch =
X Axis = axis(0-,0+)
Y Axis = axis(1-,1+)

[Wish Technologies Adaptoid]
plugged = True
plugin = 2
mouse = False
AnalogDeadzone = 4096,4096
AnalogPeak = 32768,32768
DPad R = button(13)
DPad L = button(12)
DPad D = button(11)
DPad U = button(10)
Start = button(8)
Z Trig = button(9)
B Button = button(3)
A Button = button(0)
C Button R = button(2)
C Button L = button(4)
C Button D = button(1)
C Button U = button(5)
R Trig = button(7)
L Trig = button(6)
Mempak switch =
Rumblepak switch =
X Axis = axis(0-,0+)
Y Axis = axis(1-,1+)


On start up, WahCade would probe the Controller ID, and load the config file appropriate to that controller.

Re: Controller Profiles

PostPosted: Tue May 06, 2014 10:53 am
by sairuk
I've added an option to the emulator ini file called ctrlr, i added with the name of a profile in the ~/.wahcade/ctrlrl directory it will load it inplace of default.ini. If it fails for any reason it will revert back to the default.ini file.

e.g. For a custom Arcade profile for mame create
Code: Select all
~/.wahcade/ctrlr/arcade.ini


then in ~/.wahcade/ini/mame.ini add
Code: Select all
ctrlr                                   arcade


I did not go with automatic loading of multiple profiles based connected devices as it would constitute a major change to way wahcade operates. I also have a couple of controllers that do not have names that translate nicely into a filename. Further I may add the controller identifier into the emulator.ini as well and only load that device, still debating that one.

I could not replicate the BUG 1132403 (tried on commit 150 though). I have a xbox360 USB controller (10 buttons), a xbox2usb arcade stick (10 buttons) and a SNES controller USB adapter (8 buttons) none of which crash on a 'non-existent' button. Can you confirm the problem is still present in commit 152?

Re: Controller Profiles

PostPosted: Thu May 08, 2014 4:12 pm
by Zombie
I will try when I get the chance. Right now, I'm dealing with a situation in my personal life.

Re: Controller Profiles

PostPosted: Thu May 08, 2014 8:30 pm
by Zombie
automatic detection is kind of important, what about the Hex USB ID? Like: 046d:c00e rendering to 046d-c00e.ini?

Re: Controller Profiles

PostPosted: Wed May 14, 2014 4:26 am
by sairuk
Zombie wrote:automatic detection is kind of important, what about the Hex USB ID? Like: 046d:c00e rendering to 046d-c00e.ini?


Wah!cade will not currently handle multiple input profiles per device, as far as I can tell. Manually loading profiles per emulator will suffice for now until I have more time to look into this feature.

Need to look into polling connected devices during the main loop at some point when I can find the time

Re: Controller Profiles

PostPosted: Wed May 14, 2014 3:15 pm
by hello_kitty
Thanks for reply. We're waiting for this feature :)