Main > Software Forum

New ControllerRemap utility, 7/11/13 update available (Version 0.0.11)

(1/47) > >>

drventure:
Fourth Beta Version of ControllerRemap now available. (Version 0.0.10)

NOTE: I've gotten several reports of version 0.0.9 throwing virus alerts. I've rebuilt version 0.0.10, scanned with NOD32 locally as well as with a couple online scanners, and posted it in a ZIP file with a TXT extension, just in case.

When you download, just rename the file to a ZIP file to extract.

If anyone still gets a virus alert, please let me know (PM or respond on this thread).

++++++++++++++++++++++
V0.0.11 What's new
Fixed a bug in handling aliased controllers when the controller is not currently connected to the machine.
Now, that controllers mappings will be ignored and not written to the config file.


++++++++++++++++++++++
V0.0.10 What's new
Added support for MESS KEYPAD entries.

++++++++++++++++++++++
V0.0.9 What's new
Fixed problem with PORT entries that have more than 1 "newseq" child element. Previously, the children wouldn't
be properly copied to the remapped section.
Also, any additional attributes would be duplicated either. Both should now work properly.
This is particularly important for things like steering wheels that make use of the "increment" and "decrement" type newseq entries. Thanks to ArcadeBliss for pointing this out!


++++++++++++++++++++++
V0.0.8 What's new
Fixed minor issue with the command line /SAVE command


++++++++++++++++++++++
V0.0.7 What's new
Added support for GUNCODE input elements. Before, GUNCODE elements were simply ignored.
Added GUNCODE sample to the Sample.cfg file (and updated the PDF documentation)


++++++++++++++++++++++
V0.0.6 What's new
Fixed the Sample.cfg file to be correct (and match the PDF documentation)
Fixed so that you can specify a partial controller ID (any amount of ID actually, starting at the beginning) and the program will first attempt to match on the +entire+ id, and if that fails, will then attempt to match the whatever portion of the ID you've specified against the actual controller ID.
Ugh, that sounds terrible.
Here's an example:

This is a controller element with the FULL ENTIRE controller id specified:
    <controlleralias>
        <id>HID#Vid_1241_Pid_1111#b_2eabd86_0_00000#</id>
        <alias>Top Trackball</alias>
    </controlleralias>

Notice that "_0_00000#" at the end? That identifies which USB port the controller is plugged into. Since that port number can change if you move the device to a different port, ControllerRemap might not find it the next time.

Instead, you can now specify any amount of the ID, beginning at the start. So, I might set up the configuration like this instead:

    <controlleralias>
        <id>HID#Vid_1241_Pid_1111#b_2eabd86</id>
        <alias>Top Trackball</alias>
    </controlleralias>

When ControllerRemap sees the shortened version and attempts to match it against the complete ID of the installed device, it won't match.

Once it's searched all devices in that manner, it goes back and checks each device ID to see if it +begins with+ the specified ID. If it finds a match this way, the device is matched up just like before.

Technically, this does mean you could specify something silly like:
    <controlleralias>
        <id>HID#Vid_12
        <alias>Top Trackball</alias>
    </controlleralias>

That ID is likely too short to uniquely identify a single device, so your result will probably not be what you want.

Just use as much of the device ID as what looks to uniquely identify the device and you should be good.
++++++++++++++++++++++


Let me start by saying this thing is serious beta at this point. Standard disclaimers apply (It work on my machine, blah blah).

You'll need the .net runtime 3.5. But otherwise, that should be it.

It does require 2 DirectX dlls, but they are part of the executable and get extracted automatically as necessary. Nothing to do there.
Though wherever you run it from will need WRITE rights.

Extract the ZIP into a folder somewhere.

There's a sample CFG file, the documentation as a PDF, and the EXE.

It's basically a simple command line app. Run ControllerRemap /? for options.

And check out the help for a quick start guide, as well as the full docs.

Let me know if you run into anything, have questions, suggestions, can't get it to work, think the docs suck, etc.





----- OLD MESSAGE BELOW  -------
I've been working out the kinks on a little utility I'm calling ControllerRemap.

Essentially, it's my take on trying to solve the problem of what happens when you have a cab that supports USB input devices that might be disconnected or reconnected in various combinations at various times.

Many games support the concept of a JoystickID (and you can use another utility called JoyIDs to set those id's easily). The idea being that it assigns an ID to a joystick and that ID persists for that particular joystick, even if it's unplugged, other devices are plugged in and then the original device is reconnected.

However, from what I can tell of Mame, it doesn't support Joystick IDs. It appears that mame simply enumerates the devices current connected to the system when Mame is run, and subsequently uses those numbers in all the CFG and controller files it reads.

And since windows enumerates USB devices by Vendor ID, and since the vendor ID is essentially a random hex number, there's no telling where specific devices will end up in the enumeration order.

Soooo.. If you have 2 U360's, and you map them in MAME as Joystick 1 and 2, but then you plug in a game pad and it happens to sort BEFORE the U360s, mame will now think they're sticks 2 and 3.

I've seen plenty of projects around that appear to make use of disconnectable devices, but I've never seen any info on how to get mame to play reasonably well with them, without having to manually remap devices constantly.

At any rate, ControllerRemap, essentially allows you to define mame port mappings connected specifically to a controller by it's unique ID, including joysticks and RawMouse devices (like multiple trackballs or spinners if you have them).

It also allows you to set those maps for specific "systems" (ie drivers, or BIOS's, or specific games), just like the mame controller and CFG files currently allow, but with the added benefit of being able to specifically indicate which controllers map to what mame ports.

So, right before you run MAME, you run ControllerRemap, which basically just looks at the current controllers installed in the system and rebuilds the <INPUT> sections in your controller file to match what you +actually+ have installed.



Would anyone else find this concept useful? Have I completely missed some capability of Mame that would provide for this?

Right now the code is a little rough around the edges, but if there's interest, I could clean it up a bit and make it publicly available.

Just wanted to gauge interest (and see if I've totally wasted my time for a feature that Mame already has  ::) )

Blanka:
Sounds cool (if it was on mac)!
Maybe include remapping of keys as well. We have a tool on mac that does this, but I don't know if it exists for Windows. It allows you to map U360 to keyboard keypresses, U360 to mouse coordinates, mouse to keyboard mapping, adding macro's to any key, well pretty much mess up any controller to do anything else.

drventure:
Unless I'm mistaken, JoyToKey and XPadder already do those sorts of things for Windows.

So far, any way, I haven't needed to use anything like that (that actually converts joystick input to keyboard presses) with Mame, it seems to handle all the various input devices I have pretty seamlessly.

However, I could see a small benefit with a utility like that. Since it would convert u360 stick movements to keypresses, Mame wouldn't have to have the sticks mapped at all, it would just use it's default keyboard mappings. Assuming JoyToKey or XPadder used JoystickID's to connect with specific joysticks, no matter when they were connected, that might work well.

But.... If you did want to play games using an Analog stick in mame, you might still have problems.

My little utility doesn't actually take input from any of the devices. It literally rewrites the Mame CFG controller file and exits. That's it.

SammyWI:
Sounds like a useful tool.  I do disconnect my stand alone CP occasionally and remapping every time is a pain.

I've never needed joytokey in MAME, but I do use it for Daphne with a U360.  In that case, I don't think I've had any issues with unplugging things.  But it's been a while.

Cananas:
Yes. It seems very interesting tool.

Navigation

[0] Message Index

[#] Next page

Go to full version