Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news


  

Author Topic: New ControllerRemap utility, 7/11/13 update available (Version 0.0.11)  (Read 41624 times)

0 Members and 1 Guest are viewing this topic.

drventure

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4138
  • Laser Death Ray Bargain Bin! Make me an offer!
Re: New ControllerRemap utility, 3/30/11 update available (Version 0.0.6)
« Reply #40 on: April 01, 2011, 07:41:46 am »
Cool.

You'll probably have to forcibly kill and restart ledblinky to get it to recognize the change. Arzoo could probably help with that.

NipRing

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 142
  • I love cats but i just cant eat a whole one myself
Re: New ControllerRemap utility, 3/30/11 update available (Version 0.0.6)
« Reply #41 on: April 01, 2011, 09:06:11 pm »
I'm sure everyone using this/talking about it knows more about PCs than me, and i'm sorry i dont know more. I downloaded it, opened the folder, and there was ControllerRemap exe, and instruction pdf, and a sample cfg. I started reading the instruction pdf, created a new text doc with notepad, copied the cfg text portion from the inst. to the doc, named it and saved it. When i go to run the CR exe, it opens and closes in an instant. Every time. However two dll files showed up, as well as remap.lastrun. Am i doing something wrong? I didnt even get to run the ControllerRemap /list  :-\  damn i wish i new more code type stuff  ???

drventure

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4138
  • Laser Death Ray Bargain Bin! Make me an offer!
Re: New ControllerRemap utility, 3/30/11 update available (Version 0.0.6)
« Reply #42 on: April 01, 2011, 10:23:00 pm »
Hey Nipring, Sorry you're having troubles.

Well, if you're getting the 2 dll's extracted, and the lastrun file generated, it means the app is at least running (so you've got .net installed etc).

So that's good.

Open a DOS box, and try running it from there (it's a command line tool, so dbl clicking it from explorer won't do you much good).

You should get a title/version printed out.

then, in the dos box, type "controllerremap /list" and press enter.

That should generate the initial list that shows the devices currently in your system.

Again, there's no GUI for this tool (at least not yet) so you'll have to deal with the command line and dos boxes to get it going. Primitive and crude, but, it's also free...

From there, start with a REALLY simple config file, just like one controller and one mapping. run it and get it to properly update the CFG file.

then you can expand the CFG, add more to it, and define the additional controllers, and finally wrap it up by adding it to a bat file that runs controllerremap, then MAME.

My instructs probably aren't the greatest in the world (I'm a developer, not a tech writer  :) ), but I'll do what I can to help.

It'd be nice to put a nice GUI front end on it for config purposes, but to do so would almost require reimplementing MAME's config stuff, and I just don't have time for that right now.

MacGyver

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 281
Re: New ControllerRemap utility, 3/30/11 update available (Version 0.0.6)
« Reply #43 on: April 04, 2011, 01:27:22 am »
Yeah drventure, I think the nature of the program and the configuration creating part are going to be a challenge for non-technicians.  Most people that will benefit from this don't even know that they need it, or why the problem is happening.  I think until you make a gui that basically outputs a mame.exe replacement batch file, some people are going to have trouble.  I think you might need to change the name of this post to something like:
 "MAME USB device Remapper (for replacing instances of MOUSE ? that have been moved to a different MOUSE # after a reboot or being plugged into a different port)"
That's about as small as I could make it.  ;D

drventure

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4138
  • Laser Death Ray Bargain Bin! Make me an offer!
Re: New ControllerRemap utility, 3/30/11 update available (Version 0.0.6)
« Reply #44 on: April 04, 2011, 07:50:56 am »
I'd put some thought into somehow possibly reading the EXISTING config (assuming that it's correct as of the point you initially run the program) and using that as the basis for creating the mapping entries.

Sort of like...
1 Read existing config file
2 check mouse and joystick port numbers
3 match them up to existing devices
4 write controller entries back into the config such that those devices will always get mapped that way from then on.

But, I was a bit concerned that there's no good way for the program to know whether what it comes up with is correct, and taking out the requirement to learn a little bit of how to set things up would just make it that much more difficult to resolve issues that would happen as a result of trying to automatically handle it.

If anyone's got any ideas, I'm all ears! It would be nice to simplify it a bit.

MacGyver

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 281
Re: New ControllerRemap utility, 3/30/11 update available (Version 0.0.6)
« Reply #45 on: April 04, 2011, 08:11:22 am »
You could try to go at it from the point of view of a "Mame USB lock in" utility.  Have the user set up their settings in default.cfg manually or via the gui in Mame, then when the user runs the "Lock" utility, it scans the default.cfg and the USB ports, matches them up, and builds the ctrl .cfg file.  Then the user can run the "Set" program after a reboot or before Mame launches, and it will just fix the USB mappings.  Depending on how bored you are, you could include a flag to scan and build the specific game.cfg into the ctrl .cfg when the "Lock" program is run.

I have no problem with how your utility works right now, and don't know why Mame doesn't already deal with how USB devices like to jump around in Windows.  If you are wanting to help people out, I don't think it can get any simpler than, "Mame works fine right now; Lock, Play.  Mame is broken; Set, Play."

Again, thanks for an already great fix.  :cheers:

kronic24601

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 285
  • Evil Arcade Monkey Strikes Again!
Re: New ControllerRemap utility, 3/30/11 update available (Version 0.0.6)
« Reply #46 on: April 04, 2011, 09:11:26 pm »
Just found this thread. I am looking forward to testing this out soon. I've been really annoyed at having to reset USB controller items due to my swappable control panel so I'm really hoping this works :)

drventure

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4138
  • Laser Death Ray Bargain Bin! Make me an offer!
Re: New ControllerRemap utility, 3/30/11 update available (Version 0.0.6)
« Reply #47 on: April 04, 2011, 09:27:20 pm »
@Kronic

Let me know how it works for you!


Damonator

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 3
Re: New ControllerRemap utility, 3/30/11 update available (Version 0.0.6)
« Reply #48 on: June 05, 2011, 05:00:19 pm »
This utility is working great for my spinner, trackball and mouse - but not for my lightguns.  My condensed configuration file is:

Code: [Select]
<mameconfig version="10">
  <controlleralias>
    <id>HID#VID_061C_PID_AA00#7_35df86d5_0_0000#</id>
    <alias>Lightgun1</alias>
  </controlleralias>
  <system name="default">
    <controller id="Lightgun1">
      <input>
        <port type="P1_LIGHTGUN_X">
          <newseq type="standard">
                    GUNCODE_XAXIS
                </newseq>
        </port>
        <port type="P1_LIGHTGUN_Y">
          <newseq type="standard">
                    GUNCODE_YAXIS
                </newseq>
        </port>
      </input>
    </controller>
    <input>
      <port type="P1_LIGHTGUN_X">
        <newseq type="standard">
                    GUNCODE_XAXIS
                </newseq>
      </port>
      <port type="P1_LIGHTGUN_Y">
        <newseq type="standard">
                    GUNCODE_YAXIS
                </newseq>
      </port>
    </input>
  </system>
</mameconfig>

When I perform the remap, the generated input section does not have the proper lightgun number in the newseq tags - ie the text remains "GUNCODE_XAXIS" instead of "GUNCODE_3_XAXIS".  In the controller configuration, if I use "MOUSECODE_XAXIS" instead of "GUNCODE_XAXIS", it properly generates a "MOUSECODE_3_XAXIS" in the input section.

Am I doing something wrong or is it not recognizing the GUNCODE_XXX text?

Thanks for the great utility!

drventure

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4138
  • Laser Death Ray Bargain Bin! Make me an offer!
Re: New ControllerRemap utility, 3/30/11 update available (Version 0.0.6)
« Reply #49 on: June 05, 2011, 05:49:14 pm »
@Damonator

Doh! Didn't realize GUNCODE was one of the input types (I don't have my aimtracks working yet so I haven't had to work with GUNCODE entries yet.

But you're right, I'll need to add support for those entry types.

I'll try and get that implemented and tested out this week.

I'll post when a new build is available.

Glad to hear the rest is working right. Once I add the GUNCODE entries, they should be fine too.

Sorry about that

drventure

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4138
  • Laser Death Ray Bargain Bin! Make me an offer!
Re: New ControllerRemap utility, 3/30/11 update available (Version 0.0.6)
« Reply #50 on: June 05, 2011, 05:56:24 pm »
Just had a look at the mame source and it looks like those are the only 4 "CODE' elements

JOYCODE
KEYCODE
GUNCODE
MOUSECODE

So once I get GUNCODE added that should finish it up!

drventure

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4138
  • Laser Death Ray Bargain Bin! Make me an offer!
Re: New ControllerRemap utility, 6/05/11 update available (Version 0.0.7)
« Reply #51 on: June 05, 2011, 10:34:56 pm »
Well, as it turns out, I had some time this afternoon (after grilling and swimming, yeah summer!), so what the heck.

I've just updated the first page on this thread with version 0.0.7 that should support GUNCODE remaps (very similar to MOUSECODE remapping, in reality).

I haven't done a ton of testing, since I don't really have any guns set up yet (my aimtrak is still quite naked), so you mileage may very.

@Damonator: If you have some time to give this a whirl, I'd appreciate any feedback!

It should work straight out using the same setup you tried in your config file (I used your config as the basis of my tests!).

Damonator

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 3
Re: New ControllerRemap utility, 6/05/11 update available (Version 0.0.7)
« Reply #52 on: June 06, 2011, 12:08:17 am »
Thanks drventure - the changed worked perfectly!  I actually have two guns and it correctly assigned both of them to the appropriate GUNCODE.

Excellent work!

drventure

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4138
  • Laser Death Ray Bargain Bin! Make me an offer!
Re: New ControllerRemap utility, 6/05/11 update available (Version 0.0.7)
« Reply #53 on: June 06, 2011, 07:33:49 am »
Thanks for checking it out.

Glad it worked! I'm looking forward to getting my Aimtraks set up.

diggso

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 43
Re: New ControllerRemap utility, 6/05/11 update available (Version 0.0.7)
« Reply #54 on: July 17, 2011, 05:24:25 pm »
good work dr. this issue has been bugging me since i first set up my cab and i couldn't find an answer anywhere. basically i have 2 spinners and a trackball all plugged into a usb hub. can you tell me if the current code will work for a usb hub?

drventure

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4138
  • Laser Death Ray Bargain Bin! Make me an offer!
Re: New ControllerRemap utility, 6/05/11 update available (Version 0.0.7)
« Reply #55 on: July 17, 2011, 06:47:30 pm »
Definitely. Usb hubs are no problem. My cab has 5 usb hubs (4 to 10 ports each), some always connected, some disconnectable (like game pads, and a drum controller). Hubs make no difference at all to the program.

One question though. If you've got 2 spinners and a trackball, those are pretty much static devices, right. Ie they're always plugged in. If that's the case, you shouldn't need the remap util, unless you're ALSO running disconnectable gamepads or you've got a swappable control panel, or something else like that.

diggso

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 43
Re: New ControllerRemap utility, 6/05/11 update available (Version 0.0.7)
« Reply #56 on: July 18, 2011, 03:21:58 am »
Yep, always plugged in but the 3 devices are randomly assigned to the mame ports on startup.

drventure

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4138
  • Laser Death Ray Bargain Bin! Make me an offer!
Re: New ControllerRemap utility, 6/05/11 update available (Version 0.0.7)
« Reply #57 on: July 18, 2011, 08:25:49 am »
That's strange. Usually, Windows will keep things more or less consistent between boots as long as nothing gets plugged in or removed.

At any rate, yeah, grab a copy, and run

ControllerRemap /list

from the command line to make sure you can uniquely ID the 3 devices. If you can, it should be able to clean that situation up nicely.

diggso

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 43
Re: New ControllerRemap utility, 6/05/11 update available (Version 0.0.7)
« Reply #58 on: July 18, 2011, 04:03:31 pm »
hey dr, apologies for this - i realise your utility has far wider reaching potential than the problem i'm describing but it has solved my issue and may help someone else in the process.
as described its a relatively simple setup with 2 spinners and a trackball - enumerated randomly on each boot. i've configured most games to be
mouse 2 for 1 player spinner, mouse 3 for 2 player spinner, and mouse 4 for trackball. to get the devices enumerated correctly i have to pull out the p2 spinner and trackball usbs and re-insert in the correct order. up until now there has been no other solution.
i've already had a go with the utility and i can see that each device has a unique id (the vendor ids are the same but the rest is different) that seems to hold steady between boots. to this end i've created aliases for them in the file and the following:
        <controller id="Spinner1">
            <input>
                <port type="P1_DIAL">
                    <newseq type="standard">MOUSECODE_XAXIS</newseq>
                </port>
            </input>
        </controller>
        <controller id="Spinner2">
            <input>
                <port type="P2_DIAL">
                    <newseq type="standard">MOUSECODE_XAXIS</newseq>
                </port>
            </input>
        </controller>
        <controller id="Trackball">
            <input>
                <port type="P1_TRACKBALL_X">
                    <newseq type="standard">MOUSECODE_XAXIS</newseq>
                </port>
                <port type="P1_TRACKBALL_Y">
                    <newseq type="standard">MOUSECODE_YAXIS</newseq>
                </port>
            </input>
        </controller>
I've had to remove the specific mouse reference in the game's individual cfg file, while retaining any sensitivity/speed adjustments but thats it. All works the way it should(as far as I've tested!).
Only issue I have is that I can't find where to add pre commands to mame in mala - easy for other emulators but not for mame. i'm not being lazy but if you have a second to let me know how you usually get it to run i'd appreciate it.
thanks again - great application

drventure

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4138
  • Laser Death Ray Bargain Bin! Make me an offer!
Re: New ControllerRemap utility, 6/05/11 update available (Version 0.0.7)
« Reply #59 on: July 18, 2011, 06:51:54 pm »
I set things up so that mala runs a BAT file, and the BAT file runs ControllerRemap and then runs mame.

You should also be able to use the /MAME:filenameformame option on the ControllerRemap command line, and then execute ControllerRemap directly from Mala.

I don't normally do that and haven't extensively tested it though, simply because I found vectoring things through a BAT file gives me a little more flexibility.

Let me know if you still have problems getting it to run either way, and I'll try to run it down.

ArcadeBliss

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 161
Re: New ControllerRemap utility, 6/05/11 update available (Version 0.0.7)
« Reply #60 on: December 12, 2011, 02:13:34 am »
Hi drventure,

thanks again for this wonderful tool. It is a godsend for my multipanel setup. I have noticed a bug though with the way the tool handles port mapping with multiple <newseq> tags.

I have configured my Logitech USB Wheel as shown below.

Code: [Select]
    <controller id="Logitech MOMO Racing USB">
        <input>
            <port type="P1_PADDLE" mask="255" defvalue="128">
                <newseq type="standard">
                    JOYCODE_1_XAXIS
                </newseq>
            </port>
            <port type="P1_PEDAL" mask="255" defvalue="0" reverse="yes">
                <newseq type="decrement">
                    JOYCODE_1_ZAXIS_POS_SWITCH
                </newseq>
                <newseq type="increment">
                    JOYCODE_1_ZAXIS_POS_SWITCH
                </newseq>
            </port>
        </input>
</controller>

After running ControllerRemap it turns this section into this  ??? .

Code: [Select]
     <port type="P1_PADDLE">
        <newseq type="standard">
                    JOYCODE_1_XAXIS
                </newseq>
      </port>
      <port type="P1_PEDAL">
        <newseq type="standard">
              NONE
          </newseq>
      </port>

As you can see it removes the <newseq type="increment"> and <newseq type="decrement"> sections. Any ideas what I am doing wrong? Thanks in advance.

drventure

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4138
  • Laser Death Ray Bargain Bin! Make me an offer!
Re: New ControllerRemap utility, 6/05/11 update available (Version 0.0.7)
« Reply #61 on: December 12, 2011, 07:42:26 am »
@ArcadeBliss.

Hmm. I likely just never accounted for the "newseq type="xxxx"" sections. I don't recall seeing those during my testing...

I'll take a look and post back to this thread. Shouldn't be a big deal, and I doubt it's anything you're doing wrong.

And thanks for the heads up! There's so many combinations possible for the Mame controllers. The more feedback I can get, the better.

drventure

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4138
  • Laser Death Ray Bargain Bin! Make me an offer!
Re: New ControllerRemap utility, 6/05/11 update available (Version 0.0.7)
« Reply #62 on: December 12, 2011, 11:49:56 am »
Ok, looks like multiple newseq entries under a port was throwing things off.

I've fixed things up and will do some testing, then post the new build here in a bit.

ArcadeBliss

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 161
Re: New ControllerRemap utility, 12/12/11 update available (Version 0.0.9)
« Reply #63 on: December 13, 2011, 03:14:19 am »
Woohoo Christmas came early. I tested the new version and it works like a charm. It even keeps the other assorted info such as mask= and the like.

Thanks very much. You rock.  :afro:


drventure

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4138
  • Laser Death Ray Bargain Bin! Make me an offer!
Re: New ControllerRemap utility, 12/12/11 update available (Version 0.0.9)
« Reply #64 on: December 13, 2011, 07:32:52 am »
Great news! Thanks for checking it out.

isamu

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 564
  • I'm a llama!
Re: New ControllerRemap utility, 12/12/11 update available (Version 0.0.9)
« Reply #65 on: January 03, 2012, 12:20:07 am »
Interesting tool. I will be keeping my eye on this. Thanks Badmouth for the link.

Is there any way you can create a utility to change the hardware ID#'s of our USB devices within Windows 7? I hate having my gear shifter always at device ID #1, while my steering wheel is always device ID #3.

Oh and in addition to that, can you please develop a way for mame to support xinput devices?
« Last Edit: January 03, 2012, 03:58:25 am by isamu »

drventure

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4138
  • Laser Death Ray Bargain Bin! Make me an offer!
Re: New ControllerRemap utility, 12/12/11 update available (Version 0.0.9)
« Reply #66 on: January 03, 2012, 08:00:06 am »
Quote
Is there any way you can create a utility to change the hardware ID#'s of our USB devices within Windows 7? I hate having my gear shifter always at device ID #1, while my steering wheel is always device ID #3.

Check out JoyIDs. As far as I know, that's the furthest you can get toward being able to change those ids. I do know that even with JoyIDs, the devices can still get moved around by windows. That's why I gave up on that approach and wrote controllerremap.


Quote
Oh and in addition to that, can you please develop a way for mame to support xinput devices?

Isn't xinput just a layer over standard directinput? I use xbox compatible sticks with mame right now (they're just USB hid devices, or am I missing something). Regardless, I don't see myself doing any work on Mame directly any time soon. I'm probably not the right person to ask for that kind of feature.

isamu

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 564
  • I'm a llama!
Re: New ControllerRemap utility, 12/12/11 update available (Version 0.0.9)
« Reply #67 on: January 03, 2012, 11:06:02 pm »
Quote
Is there any way you can create a utility to change the hardware ID#'s of our USB devices within Windows 7? I hate having my gear shifter always at device ID #1, while my steering wheel is always device ID #3.

Check out JoyIDs. As far as I know, that's the furthest you can get toward being able to change those ids. I do know that even with JoyIDs, the devices can still get moved around by windows. That's why I gave up on that approach and wrote controllerremap.


Quote
Oh and in addition to that, can you please develop a way for mame to support xinput devices?

Isn't xinput just a layer over standard directinput? I use xbox compatible sticks with mame right now (they're just USB hid devices, or am I missing something). Regardless, I don't see myself doing any work on Mame directly any time soon. I'm probably not the right person to ask for that kind of feature.


OK drventure thanks.

kmhamel

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 23
Re: New ControllerRemap utility, 12/12/11 update available (Version 0.0.9)
« Reply #68 on: February 17, 2012, 03:49:00 pm »
Ok i've read the instructions. Before I start I do have a question. When I make my cfg file. Do I transfer all the info for my machine from the default to the new cfg file, ie buttons, joysticks and spinners or just the joystick and spinners? After running "list" is see that the U360's come up as joysticks and usb mouse devices. Do I just use the spinner mouse device names and joystick id, and ignore the joystick mouse device ids?

Has anyone run this program with the hypersin frontend? If so, how did you setup mame?


drventure

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4138
  • Laser Death Ray Bargain Bin! Make me an offer!
Re: New ControllerRemap utility, 12/12/11 update available (Version 0.0.9)
« Reply #69 on: February 18, 2012, 11:14:23 am »
Hmm, a u360 shouldn't come up as a mouse device. It definitely should only show as a joystick.

Could you post the list file you get when you run it?

In terms of running with other front ends, all you +SHOULD+ have to do is create a  batch file that runs controllerremap first, and then runs mame as usual.

Something like this

{path}\ControllerRemap /remap:{path and filename of controller file to remap}
{path}\Mame %1 -ctrlr {path and filename of controller file to remap} %2 %3 %4 %5

something like that (i'm going from memory, but basically the idea is to pass whatever other arguments have been passed on the BAT file command line on to mame, but run ControllerRemap first to remap the controller file you want to use).

About whether to transfer all your config.

I don't believe it's strictly necessary. I'm pretty sure Mame loads the DEFAULT.CFG file, then any ROM specific CFG file, and then the Controller file, but don't quote me on that.

The thing that can hang you up is that once you decide to specify a controller file, you can no longer use the Mame menu to CHANGE any controller settings. If you try it, It'll look like it worked, but your settings won't stick.


For those reasons, and because it keeps all the config for everything in one neat file, I just put everything (keyboard, mouse, sticks etc) into the controller file.

Once you get used to looking at it, you should find you can setup the defaults fairly easily and then just use overrides for specific games that need them (for instance, I override Missile Command and World Class bowling to make both trackballs look like the player 1 trackball, but my default config is for each trackball to map to a specific player, 1 or 2).

kmhamel

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 23
Re: New ControllerRemap utility, 12/12/11 update available (Version 0.0.9)
« Reply #70 on: February 18, 2012, 02:51:52 pm »
Well I made up a cfg file.....the buttons don't work. mame assigned a bunch of different keys.

Here is the controller list:
ControllerRemap Utility v0.0.0.0 - For Mame
(c) 2011 drventure Enterprises


Joystick Device List (Devices are in enumeration order) ...

   1.  'Ultimarc Ultra-Stik Player 1', ID=0
   2.  'Ultimarc Ultra-Stik Player 2', ID=1

Mouse Device List (Devices are in enumeration order) ...

   1.  'HID#Vid_fafa_Pid_0060#7_9eb3352_0_0000#'                          Player 1 spinner
   2.  'HID#Vid_d209_Pid_0502_MI_01#8_24588317_0_0000#'              Player 2 U360
   3.  'HID#Vid_fafa_Pid_0061#7_21934b00_0_0000#'                         Player 2 spinner
   4.  'HID#Vid_d209_Pid_0501_MI_01#8_3a7f8b52_0_0000#'               Player 1 U360
   5.  'HID#Vid_046d_Pid_c529_MI_01_Col01#8_1a7b4d3_0_0000#'       Mouse/keyboard

End of list

Here is the cfg file that I am having problems with:

<!-- This file is autogenerated; comments and unknown tags will be stripped -->
<mameconfig version="10">
  <controlleralias>
    <id>Ultimarc Ultra-Stik Player 1</id>
    <alias>U360 player1</alias>
  </controlleralias>
  <controlleralias>
    <id>Ultimarc Ultra-Stik Player 2</id>
    <alias>U360 player2</alias>
  </controlleralias>
  <controlleralias>
    <id>Ultimarc Ultra-Stik Player 2</id>
    <alias>U360 player2</alias>
  </controlleralias>
  <controlleralias>
    <id>HID#Vid_fafa_Pid_0060#7_9eb3352_0_0000#</id>
    <alias>Spinner player1</alias>
  </controlleralias>
  <controlleralias>
    <id>HID#Vid_fafa_Pid_0061#7_21934b00_0_0000#</id>
    <alias>Spinner player2</alias>
  </controlleralias>
  <system name="default">
    <controller id="U360 Player1">
      <input>
        <port type="P1_JOYSTICK_UP">
          <newseq type="standard">
                    JOYCODE_1_YAXIS_UP_SWITCH
                </newseq>
        </port>
        <port type="P1_JOYSTICK_DOWN">
          <newseq type="standard">
                    JOYCODE_1_YAXIS_DOWN_SWITCH
                </newseq>
        </port>
        <port type="P1_JOYSTICK_LEFT">
          <newseq type="standard">
                    JOYCODE_1_XAXIS_LEFT_SWITCH
                </newseq>
        </port>
        <port type="P1_JOYSTICK_RIGHT">
          <newseq type="standard">
                    JOYCODE_1_XAXIS_RIGHT_SWITCH
                </newseq>
        </port>
        <port type="P1_LIGHTGUN_X">
          <newseq type="standard">
                    JOYCODE_1_XAXIS
                </newseq>
        </port>
        <port type="P1_LIGHTGUN_Y">
          <newseq type="standard">
                    JOYCODE_1_YAXIS
                </newseq>
        </port>
        <port type="P1_MOUSE_X">
          <newseq type="standard">
                    JOYCODE_1_XAXIS
               </newseq>
        </port>
        <port type="P1_MOUSE_Y">
          <newseq type="standard">
                    JOYCODE_1_YAXIS
                </newseq>
        </port>
      </input>
    </controller>
    <controller id="U360 Player2">
      <input>
        <port type="P2_JOYSTICK_UP">
          <newseq type="standard">
                    JOYCODE_2_YAXIS_UP_SWITCH
                </newseq>
        </port>
        <port type="P2_JOYSTICK_DOWN">
          <newseq type="standard">
                    JOYCODE_2_YAXIS_DOWN_SWITCH
                </newseq>
        </port>
        <port type="P2_JOYSTICK_LEFT">
          <newseq type="standard">
                    JOYCODE_2_XAXIS_LEFT_SWITCH
                </newseq>
        </port>
        <port type="P2_JOYSTICK_RIGHT">
          <newseq type="standard">
                    JOYCODE_2_XAXIS_RIGHT_SWITCH
                </newseq>
        </port>
        <port type="P2_LIGHTGUN_X">
          <newseq type="standard">
                    JOYCODE_2_XAXIS
                </newseq>
        </port>
        <port type="P2_LIGHTGUN_Y">
          <newseq type="standard">
                    JOYCODE_2_YAXIS
                </newseq>
        </port>
        <port type="P2_POSITIONAL">
          <newseq type="standard">
                    JOYCODE_2_XAXIS
                </newseq>
        </port>
        <port type="P2_MOUSE_X">
          <newseq type="standard">
                    JOYCODE_2_XAXIS
                </newseq>
        </port>
        <port type="P2_MOUSE_Y">
          <newseq type="standard">
                    JOYCODE_2_YAXIS
                </newseq>
        </port>
        <port type="P2_POSITIONAL">
          <newseq type="standard">
                    JOYCODE_2_XAXIS
                </newseq>
        </port>
      </input>
    </controller>
    <controller id="Keyboard">
      <input>
        <port type="P1_JOYSTICK_UP">
          <newseq type="standard">
                    KEYCODE_UP
                </newseq>
        </port>
        <port type="P1_JOYSTICK_DOWN">
          <newseq type="standard">
                    KEYCODE_DOWN
                </newseq>
        </port>
        <port type="P1_JOYSTICK_LEFT">
          <newseq type="standard">
                    KEYCODE_LEFT
                </newseq>
        </port>
        <port type="P1_JOYSTICK_RIGHT">
          <newseq type="standard">
                    KEYCODE_RIGHT
                </newseq>
        </port>
        <port type="P1_BUTTON1">
          <newseq type="standard">
                    KEYCODE_A
                </newseq>
        </port>
        <port type="P1_BUTTON2">
          <newseq type="standard">
                    KEYCODE_S
                </newseq>
        </port>
        <port type="P1_BUTTON3">
          <newseq type="standard">
                    KEYCODE_Z
                </newseq>
        </port>
        <port type="P1_BUTTON4">
          <newseq type="standard">
                    KEYCODE_X
                </newseq>
        </port>
        <port type="P1_BUTTON5">
          <newseq type="standard">
                    KEYCODE_D
                </newseq>
        </port>
        <port type="P1_BUTTON6">
          <newseq type="standard">
                    KEYCODE_C
                </newseq>
        </port>
        <port type="P1_SELECT">
          <newseq type="standard">
                    KEYCODE_1
                </newseq>
        </port>
        <port type="P2_JOYSTICK_UP">
          <newseq type="standard">
                    KEYCODE_P
                </newseq>
        </port>
        <port type="P2_JOYSTICK_DOWN">
          <newseq type="standard">
                    KEYCODE_STOP
                </newseq>
        </port>
        <port type="P2_JOYSTICK_LEFT">
          <newseq type="standard">
                    KEYCODE_L
                </newseq>
        </port>
        <port type="P2_JOYSTICK_RIGHT">
          <newseq type="standard">
                    KEYCODE_COLON
                </newseq>
        </port>
        <port type="P2_BUTTON1">
          <newseq type="standard">
                    KEYCODE_J
                </newseq>
        </port>
        <port type="P2_BUTTON2">
          <newseq type="standard">
                    KEYCODE_K
                </newseq>
        </port>
        <port type="P2_BUTTON3">
          <newseq type="standard">
                    KEYCODE_M
                </newseq>
        </port>
        <port type="P2_BUTTON4">
          <newseq type="standard">
                    KEYCODE_N
                </newseq>
        </port>
        <port type="P2_BUTTON5">
          <newseq type="standard">
                    KEYCODE_H
                </newseq>
        </port>
        <port type="P2_BUTTON6">
          <newseq type="standard">
                    KEYCODE_B
                </newseq>
        </port>
        <port type="P2_START">
          <newseq type="standard">
                    KEYCODE_2
                </newseq>
        </port>
        <port type="P2_SELECT">
          <newseq type="standard">
                    KEYCODE_2
                </newseq>
        </port>
        <port type="START2">
          <newseq type="standard">
                    KEYCODE_2
                </newseq>
        </port>
        <port type="COIN2">
          <newseq type="standard">
                    KEYCODE_6
                </newseq>
        </port>
      </input>
    </controller>
    <controller id="spinner player1">
      <input>
        <port type="P1_PADDLE">
          <newseq type="standard">
                    MOUSECODE_1_XAXIS
                </newseq>
        </port>
        <port type="P1_PADDLE_V">
          <newseq type="standard">
                    MOUSECODE_1_XAXIS
                </newseq>
        </port>
        <port type="P1_POSITIONAL">
          <newseq type="standard">
                    MOUSECODE_1_YAXIS
                </newseq>
        </port>
        <port type="P1_POSITIONAL_V">
          <newseq type="standard">
                    MOUSECODE_1_YAXIS
                </newseq>
        </port>
        <port type="P1_DIAL">
          <newseq type="standard">
                    MOUSECODE_1_XAXIS
                </newseq>
        </port>
        <port type="P1_DIAL_V">
          <newseq type="standard">
                    MOUSECODE_1_XAXIS
                </newseq>
        </port>
      </input>
    </controller>
    <controller id="spinner player2">
      <input>
        <port type="P2_PADDLE">
          <newseq type="standard">
                    MOUSECODE_2_XAXIS
                </newseq>
        </port>
        <port type="P2_PADDLE_V">
          <newseq type="standard">
                    MOUSECODE_2_XAXIS
                </newseq>
        </port>
        <port type="P2_DIAL">
          <newseq type="standard">
                    MOUSECODE_2_XAXIS
                </newseq>
        </port>
        <port type="P2_DIAL_V">
          <newseq type="standard">
                    MOUSECODE_2_XAXIS
                </newseq>
        </port>
      </input>
    </controller>
    <input>
      <port type="P1_JOYSTICK_UP">
        <newseq type="standard">
                    JOYCODE_1_YAXIS_UP_SWITCH
                </newseq>
      </port>
      <port type="P1_JOYSTICK_DOWN">
        <newseq type="standard">
                    JOYCODE_1_YAXIS_DOWN_SWITCH
                </newseq>
      </port>
      <port type="P1_JOYSTICK_LEFT">
        <newseq type="standard">
                    JOYCODE_1_XAXIS_LEFT_SWITCH
                </newseq>
      </port>
      <port type="P1_JOYSTICK_RIGHT">
        <newseq type="standard">
                    JOYCODE_1_XAXIS_RIGHT_SWITCH
                </newseq>
      </port>
      <port type="P1_LIGHTGUN_X">
        <newseq type="standard">
                    JOYCODE_1_XAXIS
                </newseq>
      </port>
      <port type="P1_LIGHTGUN_Y">
        <newseq type="standard">
                    JOYCODE_1_YAXIS
                </newseq>
      </port>
      <port type="P1_MOUSE_X">
        <newseq type="standard">
                    JOYCODE_1_XAXIS
               </newseq>
      </port>
      <port type="P1_MOUSE_Y">
        <newseq type="standard">
                    JOYCODE_1_YAXIS
                </newseq>
      </port>
      <port type="P1_PADDLE">
        <newseq type="standard">
                    MOUSECODE_3_XAXIS
                </newseq>
      </port>
      <port type="P1_PADDLE_V">
        <newseq type="standard">
                    MOUSECODE_3_XAXIS
                </newseq>
      </port>
      <port type="P1_POSITIONAL">
        <newseq type="standard">
                    MOUSECODE_3_YAXIS
                </newseq>
      </port>
      <port type="P1_POSITIONAL_V">
        <newseq type="standard">
                    MOUSECODE_3_YAXIS
                </newseq>
      </port>
      <port type="P1_DIAL">
        <newseq type="standard">
                    MOUSECODE_3_XAXIS
                </newseq>
      </port>
      <port type="P1_DIAL_V">
        <newseq type="standard">
                    MOUSECODE_3_XAXIS
                </newseq>
      </port>
      <port type="P2_PADDLE">
        <newseq type="standard">
                    MOUSECODE_2_XAXIS
                </newseq>
      </port>
      <port type="P2_PADDLE_V">
        <newseq type="standard">
                    MOUSECODE_2_XAXIS
                </newseq>
      </port>
      <port type="P2_DIAL">
        <newseq type="standard">
                    MOUSECODE_2_XAXIS
                </newseq>
      </port>
      <port type="P2_DIAL_V">
        <newseq type="standard">
                    MOUSECODE_2_XAXIS
                </newseq>
      </port>
    </input>
  </system>
</mameconfig>

drventure

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4138
  • Laser Death Ray Bargain Bin! Make me an offer!
Re: New ControllerRemap utility, 12/12/11 update available (Version 0.0.9)
« Reply #71 on: February 18, 2012, 05:34:27 pm »
Ok. I see a few things, so I'll just list the things to look at and work with

1), Mame (and XML) is pretty particular about case, You have
               <controller id="Keyboard">
     but that "Keyboard" should probably by "keyboard".
My utility tries to ignore case in most places, but Mame is not quite as forgiving.

2) Although it won't hurt anything (because I coded the utility to ignore it), you don't have to include the stick numbers in the <controller> port definitions, and I find it can get confusing if you do.

For instance, you have

<system name="default">
    <controller id="U360 Player1">
      <input>
        <port type="P1_JOYSTICK_UP">
          <newseq type="standard">
                    JOYCODE_1_YAXIS_UP_SWITCH
                </newseq>
        </port>

But keep in mind that in this area, that "JOYCODE_1_YAXIS_UP_SWITCH" really doesn't mean JOYSTICK_1, because JOYSTICK_1 might change on you. Instead, I usually just use "JOYCODE_YAXIS_UP_SWITCH". That way, there's no confusing a controller definition with an actual input definition. It won't necessarily solve any problems here, but it might help to keep things clear.

3) I'm assuming this is the CFG file +AFTER+ you've run the controller remap utility on it. The reason I say this is that it has a populated <input> section under <system name="default"> (the large section toward the end).

If that's NOT the case, then I'd recommend deleting the input section and run controllerremap from the command line (I usually create a little batch file called "remap.bat" to make this easier.

So, run the utility to remap things, then reload the cfg file, and the <input> section should now contain a bunch of port definitions. If it DOESN'T, that means you didn't run the utility right, so check your paths, etc.

If it DOES, then you've got your paths and all right, so now it's just a matter of identifying what ports aren't mapping right.


4) Keep backups. I'm a software developer so I use a version control system, but if you can't or don't want to do that, just make backup copies with incrementing numbered file names or something. That way, if things get screwed up, you can quickly revert back.

5) And finally, start slow and simple and work your way up. For instance, instead of trying to define the P1 stick with Lightgun and mouse ports, try just defining the up/down/left/right and get that working first.

<system name="default">
    <controller id="U360 Player1">
      <input>
        <port type="P1_JOYSTICK_UP">
          <newseq type="standard">
                    JOYCODE_YAXIS_UP_SWITCH
                </newseq>
        </port>
        <port type="P1_JOYSTICK_DOWN">
          <newseq type="standard">
                    JOYCODE_YAXIS_DOWN_SWITCH
                </newseq>
        </port>
        <port type="P1_JOYSTICK_LEFT">
          <newseq type="standard">
                    JOYCODE_XAXIS_LEFT_SWITCH
                </newseq>
        </port>
        <port type="P1_JOYSTICK_RIGHT">
          <newseq type="standard">
                    JOYCODE_XAXIS_RIGHT_SWITCH
                </newseq>
        </port>
    </controller>
....

Same with the keyboard options.

edit the CFG file, save, run the remap util, and reload the cfg file to examine the changes it made. If they look right, fire up mame with rom you know uses those inputs and verify that they work in Mame.

Be sure to remember to tell mame to use a specific controller file! You can do that in the MAME.INI file or via command line, but you do have to tell it one way or the other.

Once you've got a few basic input defs working, save a backup and expand out from there.

And let me know how things go. If you still are having issues, just post back here. I try to monitor the boards pretty regularly.

kmhamel

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 23
Re: New ControllerRemap utility, 12/12/11 update available (Version 0.0.9)
« Reply #72 on: February 19, 2012, 11:50:16 am »
Thanks, controls and buttons work after making the two corrections. "Keyboard" has to be "keyboard".  :cheers:

Now I just have to fit the controllerremap into hyperspin.

drventure

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4138
  • Laser Death Ray Bargain Bin! Make me an offer!
Re: New ControllerRemap utility, 12/12/11 update available (Version 0.0.9)
« Reply #73 on: February 19, 2012, 12:09:24 pm »
Great. Glad to hear that's all it was.

TopJimmyCooks

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2093
Re: New ControllerRemap utility, 12/12/11 update available (Version 0.0.9)
« Reply #74 on: February 21, 2012, 10:00:54 pm »
dr:
can you take a quick look at my config file, It went through remapping with no error messages, but will not run under mame.  I checked as best I could in regular notepad for any missed cases or unpaired tags.  renamed file to .txt so I could attach it.  I really appreciate your help.   

drventure

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4138
  • Laser Death Ray Bargain Bin! Make me an offer!
Re: New ControllerRemap utility, 12/12/11 update available (Version 0.0.9)
« Reply #75 on: February 21, 2012, 10:24:36 pm »
Sure.

First, you don't need to define and alias for anything that isn't a stick or mouse, so you can get rid of the USBHUB entry.

Second, in the <controller> sections, generally , I don't use the device number because it can be confusing.

So

<system name="default">
    <controller id="U360 Player1">
      <input>
        <port type="P1_JOYSTICK_UP">
          <newseq type="standard">
                    JOYCODE_1_YAXIS_UP_SWITCH
                </newseq>
        </port>


Would become

<system name="default">
    <controller id="U360 Player1">
      <input>
        <port type="P1_JOYSTICK_UP">
          <newseq type="standard">
                    JOYCODE_YAXIS_UP_SWITCH
                </newseq>
        </port>

Note that I just removed the _1 after JOYCODE.

If you leave it, ControllerRemap will just replace it with the right ID but I find it a bit confusing to leave those in...

You have 2 SIDEWINDER <controller> sections. Looks like the second one has all sorts of other ports in it. That could definitely cause a problem, For any <system> section, a particular <controller> section should only be included once.

It looks like it DID perform a remap (you can tell this because there is an <input> section immediately below the <system> sections). Those <input> sections are removed and rewritten by the remap process when you run it.

That's good news because it means that there's nothing spectacularly wrong with the XML (ie leaving off a close tag or something) that would invalidate the whole file.


I'd remove the second "id=Sidewinder"  section first, Run remap and verify that the <input> section is including the right elements, then add back in whatever you really need in that second sidewinder section.

Let me know how it goes!

TopJimmyCooks

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2093
Re: New ControllerRemap utility, 12/12/11 update available (Version 0.0.9)
« Reply #76 on: February 22, 2012, 08:43:03 am »
Thank you good sir, will edit and report back. 

Hoopz

  • Don't brand me a troublemaker!
  • Trade Count: (+8)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5091
  • Intellivision Rocks!
Re: New ControllerRemap utility, 12/12/11 update available (Version 0.0.9)
« Reply #77 on: February 27, 2012, 11:50:54 am »
TTT

Can we get this stickied?
Ajax should have been named Warlord, not Swan.

First off, Hoopz is right.

tony.silveira

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 551
    • my baby
hey guys,

reading up on this post for the first time and i think this little app could work for my situation.

i have a star wars yoke i've added to my panel as a removable unit, using a dual strike hack mounted inside the box i built.  i'm also going to be using dual strike hacks for a motorcycle handle assembly (two in fact for that controller) and pedals (one more dual strike hack).

my question on using ControllerRemap, how will differentiate between these different hacks when plugged in?  or will it even?

thanks guys, looking forward to taking a crack at this util.

drventure

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4138
  • Laser Death Ray Bargain Bin! Make me an offer!
It should be able to distinguish between them.

You can plug all three in, and run

controllerremap /list

to get a list of the device signatures.

Even if the device names are exactly the same, their ID numbers should be slightly different, and you can use that to ID the individual devices.

The Docs have full details.

  
 

Sitemap 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31