Main > Software Forum
New ControllerRemap utility, 7/11/13 update available (Version 0.0.11)
drventure:
@Mcgyver.
I'm thinking this.
You specify a device ID (or the first PART of a device ID) in the config file.
When I search, i try to match the full ID, if that doesn't work, go back through and match with a "begins with" logic.
Assuming the device id's are unique from the beginning that should work.
Alternatively, I could support a wildcard match....
Hmmm, that might work better, actually....
I'll look into it.
Howard_Casto:
Well they had started to implement it years ago if I remember correctly, but I think that was just around the time that ctrlr and cfg files switched from being ini based to xml based, so I'm guessing it got lost in the shuffle.
I'm not sure if stright joystick ids would be the best solution anyway, as you said... multi mice and all that. You wouldn't change the enumeration of the joystick, but rather store more info about it in the joylist array and use it as search flags when reading in the ctrlr file (which is only done once, so speed isn't an issue). A specific entry would look something like this:
--- Code: ---<port type="P1_JOYSTICK_UP">
<newseq type="standard" devname="MADCATZ Xbox 360 Controller" id="1">
JOYCODE_1_YAXIS_DOWN_SWITCH</newseq>
</port>
--- End code ---
Note the two new flags... both of which would be optional and most likely have to be manually inserted.
DevName would represent the device name, which mame already parses for verbose printout. Id would represent the joystick id or device id respectively. When mame parses a xml file, if it finds a devname or id entry, it ignores the number in the joycode flag and does a search through the array to find the device with the matching devname and/or id. If devname and id are missing, it handles the binding normally. Joystick id probably wouldn't be the best id to use anyway, the device address might be better.
Howard_Casto:
I did a little bit of reasearch about joystickIDs because I realized that aside from a preferred device, they aren't used in vista/win 7 anymore.
Apparently joystick ids are created just how mame does it, by enumerating all joysticks. The only difference is that the device name can be used to override this enumeration.
HOWEVER, joystick ids stil can't tell two identical devices apart. If you had 4 identical xbox 360 controllers and a flightstick, for example....
You could put the flightstick anywhere in the order you want, but when it comes to the 360 pads, the first one plugged in is the first, ect.....
The way you are doing it with the device address is the ONLY way to be certain of which device it is, and only then if you plug it into the same port.
I don't think this is an issue anyway, I just thought it might be interesting to note why mame didn't use joyids.
drventure:
Hi Howard
Thanks for the info. Yeah, I searched through all the stuff I could find about USB device ID's and when you have two identical devices, they really are identical. There's just not a lot to go on to uniquely id them.
still, i like the idea of the ability to specify a partial ID and have it match, in those cases where the partial ID still uniquely ID's a device.
But thanks for the extra info!
drventure:
@Macgyver
Just in case you didn't see the root post, i've updated the EXE (and the sample.cfg file) with the new capability. the PDF is updated as well with some example info.
Let me know if it works any better for you. It was a quick mod while my daughter was in the tub, so it's entirely possible I've missed a bit, but, as usual, it works on my machine ;)
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version