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
Lightguns Arcade1Up Try the site in https mode Site News

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

  

Author Topic: ControllerRemap GUI  (Read 21091 times)

0 Members and 1 Guest are viewing this topic.

stigzler

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 983
  • Last login:March 21, 2025, 06:36:05 am
  • It seemed like a good idea at the time....
    • Mago Arcade
ControllerRemap GUI
« on: May 27, 2015, 07:00:01 pm »


Hi folks. This is a GUI add-on to Dr Venture's excellent tool that allows you to work with swapped usb devices within mame.



Vid here:



More info and download here:
https://controllerremapgui.codeplex.com/

Changelog:

0.6.6:
Fixed bug where null entry causes dbnull error in controls table

0.6.7:
Added Min to Tray and Hide on start to enable 'invisible' start
Added Delete button to controllers table - allows user to select rows and delete via gui.
Added Codeplex link for help.
« Last Edit: April 11, 2016, 06:59:47 pm by stigzler »

drventure

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4152
  • Last login:April 23, 2024, 06:53:06 pm
  • Laser Death Ray Bargain Bin! Make me an offer!
Re: ControllerRemapGUI
« Reply #1 on: May 27, 2015, 07:12:21 pm »
Damn! Nice job.  :applaud:

Maybe we can collaborate at some point and fold these two into one project?

I've been meaning to get that up into codeplex or github. Just haven't had the time.

stigzler

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 983
  • Last login:March 21, 2025, 06:36:05 am
  • It seemed like a good idea at the time....
    • Mago Arcade
Re: ControllerRemapGUI
« Reply #2 on: May 28, 2015, 12:15:02 pm »
Cheers and sure - no probs :)

stigzler

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 983
  • Last login:March 21, 2025, 06:36:05 am
  • It seemed like a good idea at the time....
    • Mago Arcade
Re: ControllerRemap GUI
« Reply #3 on: May 30, 2015, 09:52:54 am »
If you have a few spare mins, Dr Venture, I'd welcome your checking it out and breaking it as you look well-versed in the whole Mame controller mapping business. I think I know one limitation which is it may only parse one element of the Port element, that being "type" - seems there're some other mame controls which have other elements? such as paddle ('mask' 'revesrse' etc?) Haven't tested out what happens with these. Another fella helped out with the xml parsing code, so not sure what it can and can't handle.

Anywhoos - welcome any feedback and improvement suggestions!

stigzler

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 983
  • Last login:March 21, 2025, 06:36:05 am
  • It seemed like a good idea at the time....
    • Mago Arcade
Re: ControllerRemap GUI
« Reply #4 on: June 03, 2015, 07:24:35 pm »
New Release - 0.6.0.0
Added functions around per-game settings.
Updated documentation on per-game settings.
Overhauled Mame CFG files tab - more useable.
Added ability to view and edit .cfg files.
cfg\.cfg files with no controls now display in app - shows other info such as dipswitches etc.


Main changes to accommodate per-game settings. Related documentation here:

https://controllerremapgui.codeplex.com/wikipage?title=Setting%20up%20Per-Game%20Settings&referringTitle=Documentation

MydknyteStyrm

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 331
  • Last login:March 20, 2024, 12:19:41 pm
  • Makeup FX Gamer
Re: ControllerRemap GUI
« Reply #5 on: July 09, 2015, 03:34:58 pm »
Hi again,
Sorry, I shouldve posted my issue here instead of the original Remap thread.

So here goes.
I set my controls via GUI, transfer it to CRG_MyRemap.cfg, and hit the WRITE button. It then writes the CFG file. Go into Hyperspin, Mame, etc, and everything is working as it should. When I turn off the computer, reboot, etc, the moues devices lose their IDs and Mame sees them as something else. Ive reinstalled my config three times now and nothing seems to stick. The only thing that still stays are my Ultrastiks and keyboard buttons.

I am using 4 Ultrastik 360s, 1 UTrak Trackball, 1 TurboTwist spinner, and 2 Aimtrak guns.

Attached is my CRG_MyRemap config.

One question, should I remove the digit from the codes? Example, GUNCODE_5_Button 1. Is my problem that GUNCODE is wired to #5? In Mame on reboot, it could be any other number. Im not sure what I missed. Thanks so much for a great app and the help!

Code: [Select]
<?xml version="1.0" encoding="utf-8"?>
<mameconfig version="10">
  <controlleralias>
    <id>ATRAK Device #1</id>
    <alias>ATRAK 1</alias>
  </controlleralias>
  <controlleralias>
    <id>ATRAK Device #2</id>
    <alias>ATRAK 2</alias>
  </controlleralias>
  <controlleralias>
    <id>Ultimarc Ultra-Stik Player 1</id>
    <alias>Ultimarc Ultra-Stik Player 1</alias>
  </controlleralias>
  <controlleralias>
    <id>Ultimarc Ultra-Stik Player 2</id>
    <alias>Ultimarc Ultra-Stik Player 2</alias>
  </controlleralias>
  <controlleralias>
    <id>Ultimarc Ultra-Stik Player 3</id>
    <alias>Ultimarc Ultra-Stik Player 3</alias>
  </controlleralias>
  <controlleralias>
    <id>Ultimarc Ultra-Stik Player 4</id>
    <alias>Ultimarc Ultra-Stik Player 4</alias>
  </controlleralias>
  <controlleralias>
    <id>keyboard</id>
    <alias>keyboard</alias>
  </controlleralias>
  <controlleralias>
    <id>HID#VID_D209_PID_15A1#9_21789b04</id>
    <alias>Trackball</alias>
  </controlleralias>
  <controlleralias>
    <id>HID#VID_FAFA_PID_0060#9_98e4f62</id>
    <alias>Spinner</alias>
  </controlleralias>
  <system name="default">
    <controller id="ATRAK 1">
      <input>
        <port type="P1_BUTTON1">
          <newseq type="standard">GUNCODE_5_BUTTON1</newseq>
        </port>
        <port type="P1_LIGHTGUN_X">
          <newseq type="standard">GUNCODE_5_XAXIS</newseq>
        </port>
        <port type="P1_AD_STICK_X">
          <newseq type="standard">GUNCODE_5_XAXIS</newseq>
        </port>
        <port type="P1_LIGHTGUN_Y">
          <newseq type="standard">GUNCODE_5_YAXIS</newseq>
        </port>
        <port type="P1_AD_STICK_Y">
          <newseq type="standard">GUNCODE_5_YAXIS</newseq>
        </port>
        <port type="P1_BUTTON2">
          <newseq type="standard">JOYCODE_5_BUTTON1</newseq>
        </port>
      </input>
    </controller>
    <controller id="ATRAK 2">
      <input>
        <port type="P2_BUTTON1">
          <newseq type="standard">GUNCODE_6_BUTTON1</newseq>
        </port>
        <port type="P2_LIGHTGUN_X">
          <newseq type="standard">GUNCODE_6_XAXIS</newseq>
        </port>
        <port type="P2_AD_STICK_X">
          <newseq type="standard">GUNCODE_6_XAXIS</newseq>
        </port>
        <port type="P2_LIGHTGUN_Y">
          <newseq type="standard">GUNCODE_6_YAXIS</newseq>
        </port>
        <port type="P2_AD_STICK_Y">
          <newseq type="standard">GUNCODE_6_YAXIS</newseq>
        </port>
        <port type="P2_BUTTON2">
          <newseq type="standard">JOYCODE_6_BUTTON1</newseq>
        </port>
      </input>
    </controller>
    <controller id="Ultimarc Ultra-Stik Player 1">
      <input>
        <port type="P1_AD_STICK_X">
          <newseq type="standard">JOYCODE_1_XAXIS</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_AD_STICK_Y">
          <newseq type="standard">JOYCODE_1_YAXIS</newseq>
        </port>
        <port type="P1_JOYSTICK_DOWN">
          <newseq type="standard">JOYCODE_1_YAXIS_DOWN_SWITCH</newseq>
        </port>
        <port type="P1_JOYSTICK_UP">
          <newseq type="standard">JOYCODE_1_YAXIS_UP_SWITCH</newseq>
        </port>
      </input>
    </controller>
    <controller id="Ultimarc Ultra-Stik Player 2">
      <input>
        <port type="P2_AD_STICK_X">
          <newseq type="standard">JOYCODE_2_XAXIS</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_AD_STICK_Y">
          <newseq type="standard">JOYCODE_2_YAXIS</newseq>
        </port>
        <port type="P2_JOYSTICK_DOWN">
          <newseq type="standard">JOYCODE_2_YAXIS_DOWN_SWITCH</newseq>
        </port>
        <port type="P2_JOYSTICK_UP">
          <newseq type="standard">JOYCODE_2_YAXIS_UP_SWITCH</newseq>
        </port>
      </input>
    </controller>
    <controller id="Ultimarc Ultra-Stik Player 3">
      <input>
        <port type="P3_JOYSTICK_LEFT">
          <newseq type="standard">JOYCODE_3_XAXIS_LEFT_SWITCH</newseq>
        </port>
        <port type="P3_JOYSTICK_RIGHT">
          <newseq type="standard">JOYCODE_3_XAXIS_RIGHT_SWITCH</newseq>
        </port>
        <port type="P3_JOYSTICK_DOWN">
          <newseq type="standard">JOYCODE_3_YAXIS_DOWN_SWITCH</newseq>
        </port>
        <port type="P3_JOYSTICK_UP">
          <newseq type="standard">JOYCODE_3_YAXIS_UP_SWITCH</newseq>
        </port>
      </input>
    </controller>
    <controller id="Ultimarc Ultra-Stik Player 4">
      <input>
        <port type="P4_JOYSTICK_LEFT">
          <newseq type="standard">JOYCODE_4_XAXIS_LEFT_SWITCH</newseq>
        </port>
        <port type="P4_JOYSTICK_RIGHT">
          <newseq type="standard">JOYCODE_4_XAXIS_RIGHT_SWITCH</newseq>
        </port>
        <port type="P4_JOYSTICK_DOWN">
          <newseq type="standard">JOYCODE_4_YAXIS_DOWN_SWITCH</newseq>
        </port>
        <port type="P4_JOYSTICK_UP">
          <newseq type="standard">JOYCODE_4_YAXIS_UP_SWITCH</newseq>
        </port>
      </input>
    </controller>
    <controller id="keyboard">
      <input>
        <port type="P1_BUTTON1">
          <newseq type="standard">KEYCODE_A</newseq>
        </port>
        <port type="P1_BUTTON2">
          <newseq type="standard">KEYCODE_B</newseq>
        </port>
        <port type="P1_BUTTON3">
          <newseq type="standard">KEYCODE_C</newseq>
        </port>
        <port type="P1_BUTTON4">
          <newseq type="standard">KEYCODE_D</newseq>
        </port>
        <port type="P1_BUTTON5">
          <newseq type="standard">KEYCODE_E</newseq>
        </port>
        <port type="P1_BUTTON6">
          <newseq type="standard">KEYCODE_F</newseq>
        </port>
        <port type="P2_BUTTON1">
          <newseq type="standard">KEYCODE_G</newseq>
        </port>
        <port type="P2_BUTTON2">
          <newseq type="standard">KEYCODE_H</newseq>
        </port>
        <port type="P2_BUTTON3">
          <newseq type="standard">KEYCODE_I</newseq>
        </port>
        <port type="P2_BUTTON4">
          <newseq type="standard">KEYCODE_J</newseq>
        </port>
        <port type="P2_BUTTON5">
          <newseq type="standard">KEYCODE_K</newseq>
        </port>
        <port type="P2_BUTTON6">
          <newseq type="standard">KEYCODE_L</newseq>
        </port>
        <port type="P3_BUTTON1">
          <newseq type="standard">KEYCODE_M</newseq>
        </port>
        <port type="P3_BUTTON2">
          <newseq type="standard">KEYCODE_N</newseq>
        </port>
        <port type="P3_BUTTON3">
          <newseq type="standard">KEYCODE_O</newseq>
        </port>
        <port type="P3_BUTTON4">
          <newseq type="standard">KEYCODE_Q</newseq>
        </port>
        <port type="P3_BUTTON5">
          <newseq type="standard">KEYCODE_R</newseq>
        </port>
        <port type="P3_BUTTON6">
          <newseq type="standard">KEYCODE_S</newseq>
        </port>
        <port type="P4_BUTTON1">
          <newseq type="standard">KEYCODE_T</newseq>
        </port>
        <port type="P4_BUTTON2">
          <newseq type="standard">KEYCODE_U</newseq>
        </port>
        <port type="P4_BUTTON3">
          <newseq type="standard">KEYCODE_V</newseq>
        </port>
        <port type="P4_BUTTON4">
          <newseq type="standard">KEYCODE_W</newseq>
        </port>
        <port type="P4_BUTTON5">
          <newseq type="standard">KEYCODE_X</newseq>
        </port>
        <port type="P4_BUTTON6">
          <newseq type="standard">KEYCODE_Y</newseq>
        </port>
      </input>
    </controller>
    <controller id="Trackball">
      <input>
        <port type="P1_TRACKBALL_X">
          <newseq type="standard">MOUSECODE_2_XAXIS</newseq>
        </port>
        <port type="P2_TRACKBALL_X">
          <newseq type="standard">MOUSECODE_2_XAXIS</newseq>
        </port>
        <port type="P1_TRACKBALL_Y">
          <newseq type="standard">MOUSECODE_2_YAXIS</newseq>
        </port>
        <port type="P2_TRACKBALL_Y">
          <newseq type="standard">MOUSECODE_2_YAXIS</newseq>
        </port>
      </input>
    </controller>
    <controller id="Spinner">
      <input>
        <port type="P1_DIAL">
          <newseq type="standard">MOUSECODE_3_XAXIS</newseq>
        </port>
        <port type="P2_DIAL">
          <newseq type="standard">MOUSECODE_3_XAXIS</newseq>
        </port>
      </input>
    </controller>
    <input />
  </system>
</mameconfig>

stigzler

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 983
  • Last login:March 21, 2025, 06:36:05 am
  • It seemed like a good idea at the time....
    • Mago Arcade
Re: ControllerRemap GUI
« Reply #6 on: July 09, 2015, 04:05:27 pm »
First thing to check is that you have no controls mapped in your default.cfg and [game].cfg files in your Mame/cfg folder. If you do, then these will supersede any controls set in the ControllerRemap.cfg. You can check this via the ControllerRemapGUI interface.

Fuller explanation here:

https://controllerremapgui.codeplex.com/wikipage?title=Setting%20up%20Per-Game%20Settings&referringTitle=Documentation

I'd recommend reading this page fully first, then making sure no controls are mapped in the Mame Cfg files.

Let me know how you get on.

MydknyteStyrm

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 331
  • Last login:March 20, 2024, 12:19:41 pm
  • Makeup FX Gamer
Re: ControllerRemap GUI
« Reply #7 on: July 09, 2015, 04:07:22 pm »
There are controls in my default.cfg which I thought was supposed to be blank. How do I make it so it never gets written in?


Sent from my iPhone using Tapatalk

stigzler

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 983
  • Last login:March 21, 2025, 06:36:05 am
  • It seemed like a good idea at the time....
    • Mago Arcade
Re: ControllerRemap GUI
« Reply #8 on: July 09, 2015, 04:24:52 pm »
Hmmm.. thought it might be that and remember deliberating over this when knocking it together.

I could include a setting to allow the user to automatically delete any default/[game].cfg files on CRG boot and this would prevent the issue you're having. However, if you have any other info in there such as dipswitch settings or game info, this will obviously also be lost (as per the linked page I referenced). That's why I left it manual deletion.

Guess I could include a backup feature... let me have a look at it...

MydknyteStyrm

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 331
  • Last login:March 20, 2024, 12:19:41 pm
  • Makeup FX Gamer
Re: ControllerRemap GUI
« Reply #9 on: July 09, 2015, 04:31:03 pm »
So manual deletion of default.cfg is necessary, to leave it blank. Mame usually makes its own default.cfg if the file is erased, so I just cleared the contents. Right now I'm setting up the controls for everything, and should see what happens. What if we change the default.cfg file to read only, instead of it writing? Also, I think per game settings like bezels and dips are written to the game name cfg, no?

Usually when I cleared the CFG folder, I would lose all my bezel settings and had to redo them. Food for thought. And seriously, thanks for the help. Once I've finished with the controls I'll reboot and see if it sticks.


Sent from my iPhone using Tapatalk

stigzler

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 983
  • Last login:March 21, 2025, 06:36:05 am
  • It seemed like a good idea at the time....
    • Mago Arcade
Re: ControllerRemap GUI
« Reply #10 on: July 09, 2015, 05:12:39 pm »
Yes you have it right. Did you read through that link I posted - that covers all this.

Deletion of the default.cfg or [game].cfg isn't absolutely necessary for your control setups to work, but deletion of the controls within those is. If you are wanting to preserve your dips and bezels then you'll have to manually change the individual game.cfgs, removing all the controls and leaving the other xml components. Two minute job for one game using the mame cfg tab. Not up to automating that part just yet - as thinking that might be quite a bit of coding and busy onother things.

However, am coding in a blunt instrument of remove + backup mame cfgs by default.



MydknyteStyrm

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 331
  • Last login:March 20, 2024, 12:19:41 pm
  • Makeup FX Gamer
Re: ControllerRemap GUI
« Reply #11 on: July 09, 2015, 05:34:57 pm »
I read through the link you sent. It explains a lot.

One good note, I set the default.cfg to Read Only in the windows properties, shut off the cabinet, unplugged it, had a smoke, and when I started it up, everything now works as expected. I confirmed in CRGUI that there was nothing in the Mame default.cfg.  So far so good!


Sent from my iPhone using Tapatalk

stigzler

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 983
  • Last login:March 21, 2025, 06:36:05 am
  • It seemed like a good idea at the time....
    • Mago Arcade
Re: ControllerRemap GUI
« Reply #12 on: July 09, 2015, 06:36:15 pm »
New Release - 0.6.5.0

Added AutoClear settings option:
- clears mame.cfg files on running CRGUI via command line.
- option to backup the files before deletion
- used as blunt measure to ensure mame.cfgs don't supersede controls in ctrlr.cfg
- if you're looking to maintain none control .cfg data - clear controls by hand.

Usual place: https://controllerremapgui.codeplex.com/releases/view/616187
Explanation of concepts behind this:
https://controllerremapgui.codeplex.com/wikipage?title=Setting%20up%20Per-Game%20Settings&referringTitle=Documentation

Let me know how you get on with this one, Mydknyte

MydknyteStyrm

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 331
  • Last login:March 20, 2024, 12:19:41 pm
  • Makeup FX Gamer
Re: ControllerRemap GUI
« Reply #13 on: July 09, 2015, 06:37:02 pm »
Will definitely try it out. You rock


Sent from my iPhone using Tapatalk

MydknyteStyrm

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 331
  • Last login:March 20, 2024, 12:19:41 pm
  • Makeup FX Gamer
Re: ControllerRemap GUI
« Reply #14 on: July 10, 2015, 12:27:00 pm »
Ok gave it a test, checked AutoClear for the Mame default cfg. Ran Mame through command line (mame tempest -ctrlr CRG_MyRemap) and played. Exited game, checked default.cfg in CRGUI and on its own, and it is still populated with commands. I cleared the default.cfg via GUI, and made the file a READ ONLY, and it works when I boot the comp on and off. Food for thought.

stigzler

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 983
  • Last login:March 21, 2025, 06:36:05 am
  • It seemed like a good idea at the time....
    • Mago Arcade
Re: ControllerRemap GUI
« Reply #15 on: July 10, 2015, 01:13:10 pm »
Just tested this end with the new code + there's no problems. All working as should.

I'm a little confused by your post above. You are running CtrlRemapGUI via command line before you launch Mame separately? That is, you have run CtrlRemapGUI.exe to get it to map any enumerated usb controls to mame BEFORE running mame.

As per the documentation on the site, you'd need to run TWO command lines:

>CtrlRemapGUI.exe -rmap ""

and then:

>mame64.exe -nowindow -ctrl MyRemap

You really shouldn't be having a problem if so, but let me know.

MydknyteStyrm

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 331
  • Last login:March 20, 2024, 12:19:41 pm
  • Makeup FX Gamer
Re: ControllerRemap GUI
« Reply #16 on: July 10, 2015, 01:40:53 pm »
Now Im confused. I never ran CtrlRemapGUI.exe before hand. I just used mame (rom) -ctrlr CRG_MyRemap and it worked.

Right now what Im doing is going through the Street Fighter games. I am setting the buttons for each game, and then loading them up in the GUI, setting the Aliases, then transfering and writing to the new CFG. So my CRG_MyRemap.cfg starts to show default, sf2, tempest, etc.

Since I set the default settings in the main Mame menu, should I have to reset the keys per game? Its not a problem to do it, but I assume that I write everything to the CRG_MyRemap file, and then can delete the contents of the rom's cfg file.

I read the guide numerous times, and I may have not comprehended the process. I watched your video twice as well.


MydknyteStyrm

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 331
  • Last login:March 20, 2024, 12:19:41 pm
  • Makeup FX Gamer
Re: ControllerRemap GUI
« Reply #17 on: July 10, 2015, 01:55:03 pm »
Ok nevermind I got it to work. I realize now that the CFG files have to be empty, default has to be blank, and using the new AutoClear, I can have all of the buttons defaulted. I only have to enter custom buttons for specific games, not all.

So when I start hyperspin, I should only be throwing the -ctrlr CRG_MyRemap parameter, not the CtrlRemapGUI.exe -rmap ""?

stigzler

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 983
  • Last login:March 21, 2025, 06:36:05 am
  • It seemed like a good idea at the time....
    • Mago Arcade
Re: ControllerRemap GUI
« Reply #18 on: July 10, 2015, 02:49:29 pm »
What you need to do is on the main/front codeplex page. Basically, if you unplug and replug in usb devices, you  need to run ctrlremapgui as above to remap the ctrl cfg file. Ill leave you to read the frontpage or the controllerremap doumentation as it should become clear form this.

Onc e you understand/follow the instructions  you should be golden.

MydknyteStyrm

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 331
  • Last login:March 20, 2024, 12:19:41 pm
  • Makeup FX Gamer
Re: ControllerRemap GUI
« Reply #19 on: July 11, 2015, 03:59:46 pm »
Everything seems to work okay, except for the Aimtraks. Upon reboot they end up not working, but the trackball and spinner work. After reading the documentation over and over, I still have a question or two.

Using CRGUI, I checked my detected hardware, moved Aimtrak 1 and 2, and the Mouse version IDs into my controllers
I renamed Aimtrak's IDs by taking off the last digits (_0_0000)

I set up Mame's default controls, give them aliases, transfer them to my CRG_MyRemap.cfg, and make sure all checkboxes are marked in the Mame tab when I refresh.

I write the CFG, then do a Test with the CRGUI. The auto delete pops up, erases all files in my CFG folder, and loads the game. When I enter Mame, I immediately hit TAB to make sure my set controls are in the menu, which they are.

The guns are set in Mame to Gun5 and Gun6, as per my CFG file. But when I reboot, the guns are given new numbers via mame, although the IDs are the same in CRGUI.

What Im confused about is the parameters. Am I always supposed to do CtrlRemapGUI.exe -rmap "" -mame (game) or just use mame (game) -ctrlr CRG_MyRemap via Hyperspin? Im under the assumption that the first code just remaps any detected devices to the CRG_MyRemap.cfg file. I dont unplug anything from the USBs.

Any insight? Thanks!

stigzler

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 983
  • Last login:March 21, 2025, 06:36:05 am
  • It seemed like a good idea at the time....
    • Mago Arcade
Re: ControllerRemap GUI
« Reply #20 on: July 11, 2015, 04:40:05 pm »
Well, as per the documentation on the first page of the codeplex page, there are different ways of using the command line as there are for most Front End/Emulators setups. I don't use Hyperspin - so bit difficult to advise you on that. Maybe you can get one of your Hypserspin buddies to help out with this issue?

Basically, you must remap the .cfg file in the CTRL folder before booting mame.

The simplest way to do this is to run the command line:
Code: [Select]
CtrlRemapGUI.exe -rmap ""And then Boot mame, but with the -ctrl MyRemap added to however you are dong this.

So, if you have a "Launch/Run Before" facility in Hyperspin (that is execute a command line before the main command line to run mame) then you would use:
Code: [Select]
CtrlRemapGUI.exe -rmap ""there.
Then you would add the "-ctrl [Your default CRemap file]" switch and parameter to the main HS Mame execute method.

The "CtrlRemapGUI.exe -rmap "" -mame (game)" is a way to do it all in one command line, but you will need a way for HS to populate the mame gamename to the single command line.

I think you might be best seeking the advice of your colleagues, here if you get stuck:
http://www.hyperspin-fe.com/topic/9539-controller-remap-gui/
« Last Edit: July 11, 2015, 04:44:34 pm by stigzler »

MydknyteStyrm

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 331
  • Last login:March 20, 2024, 12:19:41 pm
  • Makeup FX Gamer
Re: ControllerRemap GUI
« Reply #21 on: July 11, 2015, 04:41:59 pm »
thanks!


Sent from my iPhone using Tapatalk

stigzler

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 983
  • Last login:March 21, 2025, 06:36:05 am
  • It seemed like a good idea at the time....
    • Mago Arcade
Re: ControllerRemap GUI
« Reply #22 on: July 11, 2015, 04:43:29 pm »
Check above for edits.

MydknyteStyrm

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 331
  • Last login:March 20, 2024, 12:19:41 pm
  • Makeup FX Gamer
Re: ControllerRemap GUI
« Reply #23 on: July 11, 2015, 07:56:50 pm »
Sorry to bother you again, but now something is happening that I can't explain.

When I use the CtrlRemapGUI.exe -rmap "" command, my CRG_MyRemap.cfg file gets extra code written in. The issue is, I have the defaults set to Guncode 9 and 10 respectively, and the GUI adds more input codes. I didnt understand where the code was coming from, so I decided to start fresh with a new install. I deleted all of the CRGUI folders, cfg files, and started Mame with a blank default.

Did the whole process, entered controllers, mame settings, aliases, transfers and test. When I do the test in the GUI, the code is written in again.
The other weird thing I noticed is that when I did a fresh install, CRGUI already knew where my Mame was (on a D drive) and already had my aliases intact, which led me to believe that there is some code somewhere on my machine that pertains to CRGUI.

Any ideas? I'm so close to getting this thing working, and this new dilemma is baffling me.

stigzler

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 983
  • Last login:March 21, 2025, 06:36:05 am
  • It seemed like a good idea at the time....
    • Mago Arcade
Re: ControllerRemap GUI
« Reply #24 on: July 12, 2015, 02:34:33 am »
Ok. On your first issue, post the remap.cfg before and after remapping (ie. Running crg from command line). it will add or ammend the code in the remap file as thats the whole point of controller remap. It might be useful for you to read the documentation that comes with controllerremap (the original, not the gui). That should give you some understanding of how it works.

On your second point, yeah. Crg settings are saved in appdata/roaming so you dont have to resetup again. Nothing to worry about..

MydknyteStyrm

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 331
  • Last login:March 20, 2024, 12:19:41 pm
  • Makeup FX Gamer
Re: ControllerRemap GUI
« Reply #25 on: July 12, 2015, 05:59:21 pm »
What's happening is when I build the CFG file in GUI, I see exactly what I put in. When I click Test, it writes new inputs which are incorrect to my CFG setup.

I went through every guide, video and such, and the issue is my newly written Input isnt matching what I entered.

Here is my CRG_MyRemap.cfg after Written, with the Joycode,Guncode and Mousecode numbers removed.

Code: [Select]
<?xml version="1.0" encoding="utf-8"?>
<mameconfig version="10">
  <controlleralias>
    <id>ATRAK Device #1:1</id>
    <alias>ATRAK Gun 1</alias>
  </controlleralias>
  <controlleralias>
    <id>ATRAK Device #2:2</id>
    <alias>ATRAK Gun 2</alias>
  </controlleralias>
  <controlleralias>
    <id>Ultimarc Ultra-Stik Player 1:1</id>
    <alias>UltraStik Joy 1</alias>
  </controlleralias>
  <controlleralias>
    <id>Ultimarc Ultra-Stik Player 2:2</id>
    <alias>UltraStik Joy 2</alias>
  </controlleralias>
  <controlleralias>
    <id>Ultimarc Ultra-Stik Player 3:3</id>
    <alias>UltraStik Joy 3</alias>
  </controlleralias>
  <controlleralias>
    <id>Ultimarc Ultra-Stik Player 4:4</id>
    <alias>UltraStik Joy 4</alias>
  </controlleralias>
  <controlleralias>
    <id>keyboard</id>
    <alias>keyboard</alias>
  </controlleralias>
  <controlleralias>
    <id>HID#VID_D209_PID_15A1#9_21789b04</id>
    <alias>Trackball</alias>
  </controlleralias>
  <controlleralias>
    <id>HID#VID_FAFA_PID_0060#9_98e4f62</id>
    <alias>Spinner</alias>
  </controlleralias>
  <system name="default">
    <controller id="ATRAK Gun 1">
      <input>
        <port type="P1_BUTTON1">
          <newseq type="standard">GUNCODE_BUTTON1</newseq>
        </port>
        <port type="P1_AD_STICK_X">
          <newseq type="standard">GUNCODE_XAXIS</newseq>
        </port>
        <port type="P1_LIGHTGUN_X">
          <newseq type="standard">GUNCODE_XAXIS</newseq>
        </port>
        <port type="P1_AD_STICK_Y">
          <newseq type="standard">GUNCODE_YAXIS</newseq>
        </port>
        <port type="P1_LIGHTGUN_Y">
          <newseq type="standard">GUNCODE_YAXIS</newseq>
        </port>
        <port type="P1_BUTTON2">
          <newseq type="standard">JOYCODE_BUTTON1</newseq>
        </port>
      </input>
    </controller>
    <controller id="ATRAK Gun 2">
      <input>
        <port type="P2_BUTTON1">
          <newseq type="standard">GUNCODE_BUTTON1</newseq>
        </port>
        <port type="P2_AD_STICK_X">
          <newseq type="standard">GUNCODE_XAXIS</newseq>
        </port>
        <port type="P2_LIGHTGUN_X">
          <newseq type="standard">GUNCODE_XAXIS</newseq>
        </port>
        <port type="P2_LIGHTGUN_Y">
          <newseq type="standard">GUNCODE_YAXIS</newseq>
        </port>
        <port type="P2_AD_STICK_Y">
          <newseq type="standard">GUNCODE_YAXIS</newseq>
        </port>
        <port type="P2_BUTTON2">
          <newseq type="standard">JOYCODE_BUTTON1</newseq>
        </port>
      </input>
    </controller>
    <controller id="UltraStik Joy 1">
      <input>
        <port type="P1_PADDLE">
          <newseq type="standard">JOYCODE_XAXIS</newseq>
        </port>
        <port type="P1_AD_STICK_X">
          <newseq type="standard">JOYCODE_XAXIS</newseq>
        </port>
        <port type="P1_JOYSTICK_LEFT">
          <newseq type="standard">JOYCODE_XAXIS_LEFT_SWITCH</newseq>
        </port>
        <port type="P1_JOYSTICKRIGHT_LEFT">
          <newseq type="standard">JOYCODE_XAXIS_LEFT_SWITCH</newseq>
        </port>
        <port type="P1_JOYSTICK_RIGHT">
          <newseq type="standard">JOYCODE_XAXIS_RIGHT_SWITCH</newseq>
        </port>
        <port type="P1_JOYSTICKRIGHT_RIGHT">
          <newseq type="standard">JOYCODE_XAXIS_RIGHT_SWITCH</newseq>
        </port>
        <port type="P1_PADDLE_V">
          <newseq type="standard">JOYCODE_YAXIS</newseq>
        </port>
        <port type="P1_JOYSTICK_DOWN">
          <newseq type="standard">JOYCODE_YAXIS_DOWN_SWITCH</newseq>
        </port>
        <port type="P1_JOYSTICKRIGHT_DOWN">
          <newseq type="standard">JOYCODE_YAXIS_DOWN_SWITCH</newseq>
        </port>
        <port type="P1_JOYSTICKRIGHT_UP">
          <newseq type="standard">JOYCODE_YAXIS_UP_SWITCH</newseq>
        </port>
        <port type="P1_JOYSTICK_UP">
          <newseq type="standard">JOYCODE_YAXIS_UP_SWITCH</newseq>
        </port>
      </input>
    </controller>
    <controller id="UltraStik Joy 2">
      <input>
        <port type="P1_POSITIONAL">
          <newseq type="standard">JOYCODE_XAXIS</newseq>
        </port>
        <port type="P2_AD_STICK_X">
          <newseq type="standard">JOYCODE_XAXIS</newseq>
        </port>
        <port type="P2_JOYSTICK_LEFT">
          <newseq type="standard">JOYCODE_XAXIS_LEFT_SWITCH</newseq>
        </port>
        <port type="P2_JOYSTICKLEFT_LEFT">
          <newseq type="standard">JOYCODE_XAXIS_LEFT_SWITCH</newseq>
        </port>
        <port type="P2_JOYSTICK_RIGHT">
          <newseq type="standard">JOYCODE_XAXIS_RIGHT_SWITCH</newseq>
        </port>
        <port type="P2_JOYSTICKLEFT_RIGHT">
          <newseq type="standard">JOYCODE_XAXIS_RIGHT_SWITCH</newseq>
        </port>
        <port type="P1_POSITIONAL_V">
          <newseq type="standard">JOYCODE_YAXIS</newseq>
        </port>
        <port type="P2_AD_STICK_Y">
          <newseq type="standard">JOYCODE_YAXIS</newseq>
        </port>
        <port type="P2_JOYSTICK_DOWN">
          <newseq type="standard">JOYCODE_YAXIS_DOWN_SWITCH</newseq>
        </port>
        <port type="P2_JOYSTICKLEFT_DOWN">
          <newseq type="standard">JOYCODE_YAXIS_DOWN_SWITCH</newseq>
        </port>
        <port type="P2_JOYSTICK_UP">
          <newseq type="standard">JOYCODE_YAXIS_UP_SWITCH</newseq>
        </port>
        <port type="P2_JOYSTICKLEFT_UP">
          <newseq type="standard">JOYCODE_YAXIS_UP_SWITCH</newseq>
        </port>
      </input>
    </controller>
    <controller id="UltraStik Joy 3">
      <input>
        <port type="P1_JOYSTICKLEFT_LEFT">
          <newseq type="standard">JOYCODE_XAXIS_LEFT_SWITCH</newseq>
        </port>
        <port type="P3_JOYSTICK_LEFT">
          <newseq type="standard">JOYCODE_XAXIS_LEFT_SWITCH</newseq>
        </port>
        <port type="P1_JOYSTICKLEFT_RIGHT">
          <newseq type="standard">JOYCODE_XAXIS_RIGHT_SWITCH</newseq>
        </port>
        <port type="P3_JOYSTICK_RIGHT">
          <newseq type="standard">JOYCODE_XAXIS_RIGHT_SWITCH</newseq>
        </port>
        <port type="P1_JOYSTICKLEFT_DOWN">
          <newseq type="standard">JOYCODE_YAXIS_DOWN_SWITCH</newseq>
        </port>
        <port type="P3_JOYSTICK_DOWN">
          <newseq type="standard">JOYCODE_YAXIS_DOWN_SWITCH</newseq>
        </port>
        <port type="P1_JOYSTICKLEFT_UP">
          <newseq type="standard">JOYCODE_YAXIS_UP_SWITCH</newseq>
        </port>
        <port type="P3_JOYSTICK_UP">
          <newseq type="standard">JOYCODE_YAXIS_UP_SWITCH</newseq>
        </port>
      </input>
    </controller>
    <controller id="UltraStik Joy 4">
      <input>
        <port type="P2_JOYSTICKRIGHT_LEFT">
          <newseq type="standard">JOYCODE_XAXIS_LEFT_SWITCH</newseq>
        </port>
        <port type="P4_JOYSTICK_LEFT">
          <newseq type="standard">JOYCODE_XAXIS_LEFT_SWITCH</newseq>
        </port>
        <port type="P2_JOYSTICKRIGHT_RIGHT">
          <newseq type="standard">JOYCODE_XAXIS_RIGHT_SWITCH</newseq>
        </port>
        <port type="P4_JOYSTICK_RIGHT">
          <newseq type="standard">JOYCODE_XAXIS_RIGHT_SWITCH</newseq>
        </port>
        <port type="P2_JOYSTICKRIGHT_DOWN">
          <newseq type="standard">JOYCODE_YAXIS_DOWN_SWITCH</newseq>
        </port>
        <port type="P4_JOYSTICK_DOWN">
          <newseq type="standard">JOYCODE_YAXIS_DOWN_SWITCH</newseq>
        </port>
        <port type="P2_JOYSTICKRIGHT_UP">
          <newseq type="standard">JOYCODE_YAXIS_UP_SWITCH</newseq>
        </port>
        <port type="P4_JOYSTICK_UP">
          <newseq type="standard">JOYCODE_YAXIS_UP_SWITCH</newseq>
        </port>
      </input>
    </controller>
    <controller id="keyboard">
      <input>
        <port type="P1_START">
          <newseq type="standard">KEYCODE_1</newseq>
        </port>
        <port type="P2_START">
          <newseq type="standard">KEYCODE_2</newseq>
        </port>
        <port type="P3_START">
          <newseq type="standard">KEYCODE_3</newseq>
        </port>
        <port type="P4_START">
          <newseq type="standard">KEYCODE_4</newseq>
        </port>
        <port type="P1_SELECT">
          <newseq type="standard">KEYCODE_5</newseq>
        </port>
        <port type="P2_SELECT">
          <newseq type="standard">KEYCODE_6</newseq>
        </port>
        <port type="P3_SELECT">
          <newseq type="standard">KEYCODE_7</newseq>
        </port>
        <port type="P4_SELECT">
          <newseq type="standard">KEYCODE_8</newseq>
        </port>
        <port type="P1_BUTTON1">
          <newseq type="standard">KEYCODE_A</newseq>
        </port>
        <port type="P1_BUTTON2">
          <newseq type="standard">KEYCODE_B</newseq>
        </port>
        <port type="P1_BUTTON3">
          <newseq type="standard">KEYCODE_C</newseq>
        </port>
        <port type="P1_BUTTON4">
          <newseq type="standard">KEYCODE_D</newseq>
        </port>
        <port type="P1_BUTTON5">
          <newseq type="standard">KEYCODE_E</newseq>
        </port>
        <port type="P1_BUTTON6">
          <newseq type="standard">KEYCODE_F</newseq>
        </port>
        <port type="P2_BUTTON1">
          <newseq type="standard">KEYCODE_G</newseq>
        </port>
        <port type="P2_BUTTON2">
          <newseq type="standard">KEYCODE_H</newseq>
        </port>
        <port type="P2_BUTTON3">
          <newseq type="standard">KEYCODE_I</newseq>
        </port>
        <port type="P2_BUTTON4">
          <newseq type="standard">KEYCODE_J</newseq>
        </port>
        <port type="P2_BUTTON5">
          <newseq type="standard">KEYCODE_K</newseq>
        </port>
        <port type="P2_BUTTON6">
          <newseq type="standard">KEYCODE_L</newseq>
        </port>
        <port type="P3_BUTTON1">
          <newseq type="standard">KEYCODE_M</newseq>
        </port>
        <port type="P3_BUTTON2">
          <newseq type="standard">KEYCODE_N</newseq>
        </port>
        <port type="P3_BUTTON3">
          <newseq type="standard">KEYCODE_O</newseq>
        </port>
        <port type="P3_BUTTON4">
          <newseq type="standard">KEYCODE_Q</newseq>
        </port>
        <port type="P3_BUTTON5">
          <newseq type="standard">KEYCODE_R</newseq>
        </port>
        <port type="P3_BUTTON6">
          <newseq type="standard">KEYCODE_S</newseq>
        </port>
        <port type="P4_BUTTON1">
          <newseq type="standard">KEYCODE_T</newseq>
        </port>
        <port type="P4_BUTTON2">
          <newseq type="standard">KEYCODE_U</newseq>
        </port>
        <port type="P4_BUTTON3">
          <newseq type="standard">KEYCODE_V</newseq>
        </port>
        <port type="P4_BUTTON4">
          <newseq type="standard">KEYCODE_W</newseq>
        </port>
        <port type="P4_BUTTON5">
          <newseq type="standard">KEYCODE_X</newseq>
        </port>
        <port type="P4_BUTTON6">
          <newseq type="standard">KEYCODE_Y</newseq>
        </port>
      </input>
    </controller>
    <controller id="Trackball">
      <input>
        <port type="P1_TRACKBALL_X">
          <newseq type="standard">MOUSECODE_XAXIS</newseq>
        </port>
        <port type="P2_TRACKBALL_X">
          <newseq type="standard">MOUSECODE_XAXIS</newseq>
        </port>
        <port type="P1_TRACKBALL_Y">
          <newseq type="standard">MOUSECODE_YAXIS</newseq>
        </port>
        <port type="P2_TRACKBALL_Y">
          <newseq type="standard">MOUSECODE_YAXIS</newseq>
        </port>
      </input>
    </controller>
    <controller id="Spinner">
      <input>
        <port type="P1_DIAL">
          <newseq type="standard">MOUSECODE_XAXIS</newseq>
        </port>
        <port type="P2_DIAL">
          <newseq type="standard">MOUSECODE_XAXIS</newseq>
        </port>
      </input>
    </controller>
    <input />
  </system>
</mameconfig>


And after using either the CMD line ControllerRemap /Remap:"D:\Arcade\MAME\mame 0162\ctrlr\CRG_MyRemap.cfg" , or using the Test option in the GUI with Auto Delete checked, I get this new input written below my code, which doesnt match the Guns set in mame (9 and 10) and most of my P2,P3 and P4 code missing.
Code: [Select]
    <input>
      <port type="P1_BUTTON1">
        <newseq type="standard">GUNCODE_5_BUTTON1 OR KEYCODE_A</newseq>
      </port>
      <port type="P1_AD_STICK_X">
        <newseq type="standard">GUNCODE_5_XAXIS OR JOYCODE_1_XAXIS</newseq>
      </port>
      <port type="P1_LIGHTGUN_X">
        <newseq type="standard">GUNCODE_5_XAXIS</newseq>
      </port>
      <port type="P1_AD_STICK_Y">
        <newseq type="standard">GUNCODE_5_YAXIS</newseq>
      </port>
      <port type="P1_LIGHTGUN_Y">
        <newseq type="standard">GUNCODE_5_YAXIS</newseq>
      </port>
      <port type="P1_BUTTON2">
        <newseq type="standard">JOYCODE_5_BUTTON1 OR KEYCODE_B</newseq>
      </port>
      <port type="P1_PADDLE">
        <newseq type="standard">JOYCODE_1_XAXIS</newseq>
      </port>
      <port type="P1_JOYSTICK_LEFT">
        <newseq type="standard">JOYCODE_1_XAXIS_LEFT_SWITCH</newseq>
      </port>
      <port type="P1_JOYSTICKRIGHT_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_JOYSTICKRIGHT_RIGHT">
        <newseq type="standard">JOYCODE_1_XAXIS_RIGHT_SWITCH</newseq>
      </port>
      <port type="P1_PADDLE_V">
        <newseq type="standard">JOYCODE_1_YAXIS</newseq>
      </port>
      <port type="P1_JOYSTICK_DOWN">
        <newseq type="standard">JOYCODE_1_YAXIS_DOWN_SWITCH</newseq>
      </port>
      <port type="P1_JOYSTICKRIGHT_DOWN">
        <newseq type="standard">JOYCODE_1_YAXIS_DOWN_SWITCH</newseq>
      </port>
      <port type="P1_JOYSTICKRIGHT_UP">
        <newseq type="standard">JOYCODE_1_YAXIS_UP_SWITCH</newseq>
      </port>
      <port type="P1_JOYSTICK_UP">
        <newseq type="standard">JOYCODE_1_YAXIS_UP_SWITCH</newseq>
      </port>
      <port type="P1_START">
        <newseq type="standard">KEYCODE_1</newseq>
      </port>
      <port type="P2_START">
        <newseq type="standard">KEYCODE_2</newseq>
      </port>
      <port type="P3_START">
        <newseq type="standard">KEYCODE_3</newseq>
      </port>
      <port type="P4_START">
        <newseq type="standard">KEYCODE_4</newseq>
      </port>
      <port type="P1_SELECT">
        <newseq type="standard">KEYCODE_5</newseq>
      </port>
      <port type="P2_SELECT">
        <newseq type="standard">KEYCODE_6</newseq>
      </port>
      <port type="P3_SELECT">
        <newseq type="standard">KEYCODE_7</newseq>
      </port>
      <port type="P4_SELECT">
        <newseq type="standard">KEYCODE_8</newseq>
      </port>
      <port type="P1_BUTTON3">
        <newseq type="standard">KEYCODE_C</newseq>
      </port>
      <port type="P1_BUTTON4">
        <newseq type="standard">KEYCODE_D</newseq>
      </port>
      <port type="P1_BUTTON5">
        <newseq type="standard">KEYCODE_E</newseq>
      </port>
      <port type="P1_BUTTON6">
        <newseq type="standard">KEYCODE_F</newseq>
      </port>
      <port type="P2_BUTTON1">
        <newseq type="standard">KEYCODE_G</newseq>
      </port>
      <port type="P2_BUTTON2">
        <newseq type="standard">KEYCODE_H</newseq>
      </port>
      <port type="P2_BUTTON3">
        <newseq type="standard">KEYCODE_I</newseq>
      </port>
      <port type="P2_BUTTON4">
        <newseq type="standard">KEYCODE_J</newseq>
      </port>
      <port type="P2_BUTTON5">
        <newseq type="standard">KEYCODE_K</newseq>
      </port>
      <port type="P2_BUTTON6">
        <newseq type="standard">KEYCODE_L</newseq>
      </port>
      <port type="P3_BUTTON1">
        <newseq type="standard">KEYCODE_M</newseq>
      </port>
      <port type="P3_BUTTON2">
        <newseq type="standard">KEYCODE_N</newseq>
      </port>
      <port type="P3_BUTTON3">
        <newseq type="standard">KEYCODE_O</newseq>
      </port>
      <port type="P3_BUTTON4">
        <newseq type="standard">KEYCODE_Q</newseq>
      </port>
      <port type="P3_BUTTON5">
        <newseq type="standard">KEYCODE_R</newseq>
      </port>
      <port type="P3_BUTTON6">
        <newseq type="standard">KEYCODE_S</newseq>
      </port>
      <port type="P4_BUTTON1">
        <newseq type="standard">KEYCODE_T</newseq>
      </port>
      <port type="P4_BUTTON2">
        <newseq type="standard">KEYCODE_U</newseq>
      </port>
      <port type="P4_BUTTON3">
        <newseq type="standard">KEYCODE_V</newseq>
      </port>
      <port type="P4_BUTTON4">
        <newseq type="standard">KEYCODE_W</newseq>
      </port>
      <port type="P4_BUTTON5">
        <newseq type="standard">KEYCODE_X</newseq>
      </port>
      <port type="P4_BUTTON6">
        <newseq type="standard">KEYCODE_Y</newseq>
      </port>
      <port type="P1_TRACKBALL_X">
        <newseq type="standard">MOUSECODE_10_XAXIS</newseq>
      </port>
      <port type="P2_TRACKBALL_X">
        <newseq type="standard">MOUSECODE_10_XAXIS</newseq>
      </port>
      <port type="P1_TRACKBALL_Y">
        <newseq type="standard">MOUSECODE_10_YAXIS</newseq>
      </port>
      <port type="P2_TRACKBALL_Y">
        <newseq type="standard">MOUSECODE_10_YAXIS</newseq>
      </port>
      <port type="P1_DIAL">
        <newseq type="standard">MOUSECODE_9_XAXIS</newseq>
      </port>
      <port type="P2_DIAL">
        <newseq type="standard">MOUSECODE_9_XAXIS</newseq>
      </port>
    </input>
  </system>
</mameconfig>


This is the phantom code I was talking about earlier. Now I realize that ControllerRemap runs and grabs inputs from the connected devices, but all of them are connected. My only other option now is to do the code run from beginning to end with each controller, which I saw mentioned in your guide.
Thanks again for your help.

stigzler

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 983
  • Last login:March 21, 2025, 06:36:05 am
  • It seemed like a good idea at the time....
    • Mago Arcade
Re: ControllerRemap GUI
« Reply #26 on: July 12, 2015, 06:20:35 pm »
I'll take a look sometime. Could you attach both files (pre + post rempa) in their entirety (i.e. unedited)

As a matter of interest - why are you removing the gun.mouse and joycode numbers from the controlleralias section? All being well, you shouldn't have to manually edit the xml at all (it doesn't matter about the numbers being wrong in the controlleralias section - they're stripped and modified by controllerremap anyway).

Also, try taking out the Number entries for each device. You only need to number them if they are non-unique. Your device IDs are unique.

Sorry you're having difficulty. Shall endeavor to help when circumstances are advantageous...

MydknyteStyrm

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 331
  • Last login:March 20, 2024, 12:19:41 pm
  • Makeup FX Gamer
Re: ControllerRemap GUI
« Reply #27 on: July 12, 2015, 07:11:50 pm »
I took out the Joy/Gun/MouseCODE numbers as mentioned in Dr.Venture's guide. I know CR is supposed to ignore them, but I figured play it safe.

Attached is my CRG_MyRemap, before test or using CtrlRemapGUI.exe /rmap "", and then the altered version after running through CR. Any insight you might be able to provide will be most appreciated.

stigzler

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 983
  • Last login:March 21, 2025, 06:36:05 am
  • It seemed like a good idea at the time....
    • Mago Arcade
Re: ControllerRemap GUI
« Reply #28 on: July 13, 2015, 02:10:41 pm »
Ok. Few questions:

1. When you ran CR + remapped the controls - which controllers did you have plugged in? Your xml implies you only had 1 Lightgun, 1 Ultra-Stik, your trackball and spinner plugged in. ControllerRemap will only populate the controls that you have plugged in at the time of running in the "</controller><input>...</input>" area.

2. I'm not sure what you mean by "phantom code" - are you referring to the code under the <controller> definitions - if so - this is meant to be there after running ControllerRemap.

3. Because you've removed the original Controller numbers - this makes it harder to help. It may be that when you mapped the original GUNCODES (for e.g.) it registered in MAME as GUNCODE_1. If the USB setup is changed through reboot/replugging, then this can change your controller enumeration. Thus, GUNCODE_1 may become GUNCODE_5 in MAME - the number changing in you [myremap].cfg is not problematic - it's meant to happen. Test your current device enumeration by manually booting Mame and re-setting your Gun calibration. In your example - test in mame to see if the gun now registers in there as GUNCODE_5.

Here's what I suggest you do:

a. Don't run before walking. Just setup 1 SlikStick and 1 Gun in mame. Transfer to [myremap].cfg. Leave the numbers in and post the original [myremap].cfg xml before remap.

b. Remap and run game. Then post the xml after remap. Test in Mame. Share test.

c. Rejiggle these controllers until the device enumeration changes in mame (for e.g. GUNCODE_1 changes to GUNCODE_5 or something).

d. Remap and run game. Post the remap xml. Share test.

I'm confused with your difficulties and wish someone would chip in with whether they're having difficulties or whether it's running smoothly for them - then I'd be able to tell whether it's the code or something else....

Good luck, brother.

MydknyteStyrm

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 331
  • Last login:March 20, 2024, 12:19:41 pm
  • Makeup FX Gamer
Re: ControllerRemap GUI
« Reply #29 on: July 13, 2015, 09:32:52 pm »
SOLVED! After rereading the guides, something clicked last night. First, in the GUI, I used Atrak Mouse 1 and Joy 1 together, setting the buttons with the Joy 1, and the X and Y with Mouse 1. When I ran the test, it wrote the cfg file with the correct inputs. Since I didn't have the mouse settings in the CRG_MyRemap file for the guns, Mame was filling in the blanks.

Second, to ensure the file was being written every time I start up the process, my code is
CtrlRemapGUI.exe -ramp "D:\Arcade\Mame\mame 0162\ctrlr\CRG_MyRemap.cfg"
By using an absolute path, and since my Mame is on a D drive, I wanted a guarantee where it was loading from.

Now, everything is clear. I've rebooted numerous times and the controllers load up as expected. Hyperspin loads up CtrlRemapGUI and writes the cfg, and the Mame module loads up the specific Cfg on game start.

The only catch I noticed is that if I use AutoClear, Mame gets weird and doesn't write the new cfg file. I clear the default.cfg but don't delete it.

I can't thank you enough for your help. Your guide stated to persevere with this, and I did. Now the headache is gone. Thanks again for making a fantastic app.


Sent from my iPhone using Tapatalk

stigzler

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 983
  • Last login:March 21, 2025, 06:36:05 am
  • It seemed like a good idea at the time....
    • Mago Arcade
Re: ControllerRemap GUI
« Reply #30 on: July 14, 2015, 02:44:45 am »
Glad you finally figured it out and that it wasnt my code! Could you also update your hs post to help other hs users. That is, how to run crgui from hs.

As a matter of interest- whats your first language?

MydknyteStyrm

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 331
  • Last login:March 20, 2024, 12:19:41 pm
  • Makeup FX Gamer
Re: ControllerRemap GUI
« Reply #31 on: July 15, 2015, 07:29:41 pm »
Okay, here is how I incorporated ControllerRemap GUI with Hyperspin.

In HyperHQ, under Startup program, choose your CtrlRemapGUI.exe file.
The parameter should read
-rmap "Absolute Path\CRG_MyRemap.cfg"

The absolute path should be where your CRG_MyRemap.cfg file is, in your ctrlr folder in Mame. For example, my code reads
-rmap "D:\Arcade\Mame\mame 0162\ctrlr\CRG_MyRemap.cfg"
Use quotes if you have spaces in your path, as I do in mame 0162. I thoroughly recommend using absolute paths, since you know it will definitely point to the required file.

Some tips I learned along the way
READ the ControllerRemap guide from Dr.Venture, READ Stigzler's Guide, WATCH his video, and work slowly.

I originally tried to input all of the controls at once. I have four U360s, two Aimtraks, a UTrak and a TurboTwist. Its smarter to do one control set at a time, when using the Run Mame button in CRGUI. Another thing, when you transfer the inputs with aliases from the Mame.cfg to the CRG_MyRemap.cfg, I find if you select all of them, Transfer, be SURE to check the Refresh button on the Mame.cfg tab. Sometimes not all of the controls transfer over to the CRG_MyRemap tab. I think this is because if you have one highlighted in blue, it may or may not transfer. I adopted the practice of selecting everything by clicking on the top left blank square, checking the Transfer checkbox, clicking over to the CRG_MyRemap tab, then clicking back to Mame.cfg. Nothing should be highlighted, and you can then press TRANSFER

For the Aimtrak guns, you should have two aliases upon detection. One being the ATRAK Gun 1, another being the ATRAK Mouse 1. You will need both when setting the aliases for the guns in Mame.cfg tab.
I didnt realize this, and just used ATRAK Gun 1 for all gun settings, including the Lightgun X and Y, AD Stick X and Y (for positional gun games), Gun button 1 for the trigger, and Joycode Button for the side buttons. The problem is, if you dont have the correct settings and aliases, Mame will not see them and fill in your code with its defaults. This is where the phantom code came from, as I said above.

That being said, set your gun buttons (trigger and bomb buttons) using the ATRAK Gun 1 alias (or whatever number the gun is), and set the X and Y for the gun using the ATRAK Mouse alias. This should solve any problems you may have when running ControllerRemap.

After a week of running the code, and bothering the hell out of stigzler, I finally caught wind of how the program works, and I have to say, upon numerous reboots, not one ID has changed in Mame, and everything runs smoothly. If you want to confirm that your code has been written to the CRG_MyRemap, when you enter Mame, hit TAB, and you should see your controls there. Dont pay any mind to the numbers of your guns, trackballs or spinners. They change in Mame, but ControllerRemap stops that ---steaming pile of meadow muffin--- cold and ensures your periphreals work.

Thanks again Dr. Venture and Stigzler for solving the major Mame problem. :applaud: :applaud: :applaud:

stigzler

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 983
  • Last login:March 21, 2025, 06:36:05 am
  • It seemed like a good idea at the time....
    • Mago Arcade
Re: ControllerRemap GUI
« Reply #32 on: July 16, 2015, 02:41:12 am »
Thanks, man, for the detailed writeup. That should help other users. And yeah, you gotta be careful with those aimtraks... they are both mouse and gamepad.

lisowskikevin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 326
  • Last login:April 02, 2024, 07:49:55 pm
  • If you take shortcuts, you get cut short.
Re: ControllerRemap GUI
« Reply #33 on: September 22, 2015, 10:37:37 am »
Real basic question.....what button do you press to delete a saved device in the device tab of the gui?

MydknyteStyrm

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 331
  • Last login:March 20, 2024, 12:19:41 pm
  • Makeup FX Gamer
Re: ControllerRemap GUI
« Reply #34 on: September 22, 2015, 10:39:23 am »
I think it was Delete, but you could only do it if the IDs were unlocked, or something like that. I had that issue early on, but since I'm not in front of my rig, I don't recall exactly how I did it.


Sent from my iPhone using Tapatalk

lisowskikevin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 326
  • Last login:April 02, 2024, 07:49:55 pm
  • If you take shortcuts, you get cut short.
Re: ControllerRemap GUI
« Reply #35 on: September 22, 2015, 10:41:01 am »
I think it was Delete, but you could only do it if the IDs were unlocked, or something like that. I had that issue early on, but since I'm not in front of my rig, I don't recall exactly how I did it.


Sent from my iPhone using Tapatalk

Haha ok good I'm not the only one. Thanks! Delete doesn't seem to work.....I'll just wait for a reply from Stigzler.
« Last Edit: September 22, 2015, 12:09:58 pm by lisowskikevin »

stigzler

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 983
  • Last login:March 21, 2025, 06:36:05 am
  • It seemed like a good idea at the time....
    • Mago Arcade
Re: ControllerRemap GUI
« Reply #36 on: September 22, 2015, 05:52:11 pm »
You highlight the row by clicking the row header (the right arrow) and then press the "Del" key - not backspace.

Think I fixed the having to unlock the IDs first - work without unlock on the most recent version anyway...

lisowskikevin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 326
  • Last login:April 02, 2024, 07:49:55 pm
  • If you take shortcuts, you get cut short.
Re: ControllerRemap GUI
« Reply #37 on: September 22, 2015, 06:02:30 pm »
You highlight the row by clicking the row header (the right arrow) and then press the "Del" key - not backspace.

Think I fixed the having to unlock the IDs first - work without unlock on the most recent version anyway...

Thank you for this and for for post re: the other topic and my self generated problem with the GUI that you have now remedied. All good now!

lisowskikevin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 326
  • Last login:April 02, 2024, 07:49:55 pm
  • If you take shortcuts, you get cut short.
Re: ControllerRemap GUI
« Reply #38 on: September 22, 2015, 09:41:20 pm »
Well I'm almost all squared away but.....I'm having a little issue with Hyperspin.

I have selected in Hyper HQ to run the Controller RemapGUI on startup.....so far so good.

Then when I actually start Hyperspin, Controller Remap does start up, (as it is supposed to) BUT the GUI window overtakes the Hyperspin window! SO I then went back into Hyper HQ and selected to have Controller Remap start up in hidden mode instead of Normal mode. I started Hyperspin up again and there was no Controller Remap window BUT none of my buttons work.

Anyone know how to remedy this....I'm so close!

MydknyteStyrm

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 331
  • Last login:March 20, 2024, 12:19:41 pm
  • Makeup FX Gamer
Re: ControllerRemap GUI
« Reply #39 on: September 22, 2015, 09:44:03 pm »
I have it start up in minimized, where upon starting HS I see a quick flash of the GUI window then it minimizes. It's not the ideal situation visually, but at least I know the GUI is running.


Sent from my iPhone using Tapatalk