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: New ControllerRemap utility, 7/11/13 update available (Version 0.0.11)  (Read 152005 times)

0 Members and 1 Guest are viewing this topic.

Connorsdad

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 268
  • Last login:December 22, 2018, 05:56:03 pm
  • I want to build my own arcade controls!

Oh, and also, I would like to attempt to build a GUI for this...kinda a little "helper" lol...when I have some spare time. Would it be ok for me to do this?

Thanks!!

LC

Saved this thread for future reference, I would definitely appreciate a friendlier GUI for noobs like me :)
    

drventure

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4152
  • Last login:June 25, 2023, 02:23:57 pm
  • Laser Death Ray Bargain Bin! Make me an offer!
Re: New ControllerRemap utility, 12/12/11 update available (Version 0.0.9)
« Reply #121 on: June 14, 2013, 05:00:35 pm »
I considered a GUI but quickly realized that it would be a significant project. Just look at the built in mame UI for configuring controls.

But if your still interested, I absolutely wouldn't mind and would be happy to help any way I could.

chipywinie

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 4
  • Last login:November 15, 2013, 08:45:00 am
  • I want to build my own arcade controls!
Re: New ControllerRemap utility, 12/12/11 update available (Version 0.0.9)
« Reply #122 on: June 15, 2013, 10:11:51 am »
hello drventure

Sorry if I do not understand very well, my English is very bad.

ask you a few post back about my problem, I ask again if gone unnoticed

I have two xbox360 wireless controls, which are for the player 3 and 4.

when only one control connect xbox360, controllerremap I assigned to that command the player 3 and 4, when in theory, if not detected would not have to assign controls.

is there any way around this? is a defect of the program? or just works well and you can not do anything?

greetings and thank you very much!

thurmansevolution

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 16
  • Last login:September 14, 2013, 07:19:53 pm
  • I want to build my own arcade controls!
Re: New ControllerRemap utility, 12/12/11 update available (Version 0.0.9)
« Reply #123 on: June 15, 2013, 07:58:04 pm »
Thanks drventure!  :) Lol, I understand that it's gonna be somewhat of a nice uphill battle creating a "dedicated" GUI for it (with concerns of writing complex coding, etc)...I have the same outlook.  What I plan on doing though is creating a small tool that will create the "MyArcade.cfg" file (including all of the IDs and Aliases), then use the ControllerRemap Utility to automatically remap after the file is created, and then place the complete "MyArcade.cfg" file into the specified "mame/ctrlr" folder - while also moving the default.cfg folder out of mame\controls.  It will also include other functions like: backing up ID numbers to Notepad; Fetching Controller IDs, etc...

All in all, its just a simple ahk gui script (don't judge lol) that will pretty much do the whole process for you.  I started working on the GUI a little last night, and have the first tab done:



Basically, what happens is that the Helper will write the file from a basic...kinda templete.  If the boxes to the left of the controllers are checked, it will write those down in order, along with inputing the ID numbers and Aliases in the correct place.  If it comes to an area that the checkbox is unchecked, it will skip writing that section of templete and proceed to the next checked area and start writing. 

The second tab will have a bunch of "goodies" that will make it easier to add new controllers after the first run of the Helper.

Please let me know what you think of it so far - It may take a little while to get it 100% going (I'm also helping planning for a wedding and honeymoon, building a driving cab, and a whole lot of projects at work lol), but it will hopefully be done soon :).

LC

drventure

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4152
  • Last login:June 25, 2023, 02:23:57 pm
  • Laser Death Ray Bargain Bin! Make me an offer!
Re: New ControllerRemap utility, 12/12/11 update available (Version 0.0.9)
« Reply #124 on: June 28, 2013, 06:51:25 pm »
@chipywinie

Finally got a chance to look at your files.

Yeah, that doesn't look right at a quick glance. It's supposed to just drop the definitions for the P4 stick if the device isn't available.

I'll try to get some time this weekend to see what might be happening in the code.

drventure

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4152
  • Last login:June 25, 2023, 02:23:57 pm
  • Laser Death Ray Bargain Bin! Make me an offer!
Re: New ControllerRemap utility, 12/12/11 update available (Version 0.0.9)
« Reply #125 on: June 30, 2013, 08:36:56 am »
I do have a question though of how ControllerRemap operates. (Just outta curiosity) When you use "/Remap" and enter the path for the MyArcade file, does the utility "remember" the path of the cfg file, so it could alter the inputs before mame starts if the enumeration changed?

Glad to hear you got that other issue worked out.

As to the Remap option, no, ControllerRemap doesn't remember anything <g>. Seriously though, it doesn't save "configuration" options anywhere, or anything like that. It's basically just a file "filter".

You run it and point it at a file, and it looks at the current system config and the command line options you specify and filters that file, writing out whatever output you tell it to. That's about it.

I do believe chipywiny has found an issue though, so I'm hunting it down now.

chipywinie

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 4
  • Last login:November 15, 2013, 08:45:00 am
  • I want to build my own arcade controls!
Re: New ControllerRemap utility, 12/12/11 update available (Version 0.0.9)
« Reply #126 on: July 03, 2013, 06:03:02 pm »
@chipywinie

Finally got a chance to look at your files.

Yeah, that doesn't look right at a quick glance. It's supposed to just drop the definitions for the P4 stick if the device isn't available.

I'll try to get some time this weekend to see what might be happening in the code.

thanks for the help!

if you need to perform any test, I'm at your disposal.

drventure

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4152
  • Last login:June 25, 2023, 02:23:57 pm
  • Laser Death Ray Bargain Bin! Make me an offer!
Re: New ControllerRemap utility, 12/12/11 update available (Version 0.0.9)
« Reply #127 on: July 03, 2013, 10:03:48 pm »
@chipywinie

I've attached a testing build to this message.

Extract it and give it a go.

It should properly ignore the aliases for those devices that aren't actually plugged in when run.

Let me know how it goes.

Anyone else checking this thread out. There's nothing new in this build except specifically the fix for the issue chipywinie has run into to it's probably not worth messing with.

EDIT, I've removed the attachment here and updated the OP
« Last Edit: July 08, 2013, 07:59:56 pm by drventure »

chipywinie

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 4
  • Last login:November 15, 2013, 08:45:00 am
  • I want to build my own arcade controls!
Re: New ControllerRemap utility, 12/12/11 update available (Version 0.0.9)
« Reply #128 on: July 08, 2013, 02:15:24 pm »
@chipywinie

I've attached a testing build to this message.

Extract it and give it a go.

It should properly ignore the aliases for those devices that aren't actually plugged in when run.

Let me know how it goes.

Anyone else checking this thread out. There's nothing new in this build except specifically the fix for the issue chipywinie has run into to it's probably not worth messing with.

thanks for all drventure.

I've tried it today, it works perfectly.

drventure

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4152
  • Last login:June 25, 2023, 02:23:57 pm
  • Laser Death Ray Bargain Bin! Make me an offer!
Re: New ControllerRemap utility, 12/12/11 update available (Version 0.0.9)
« Reply #129 on: July 08, 2013, 04:49:45 pm »
Great! Glad to hear it. I'll update the OP and remove the beta.

Thanks for letting me know.
« Last Edit: July 08, 2013, 07:59:08 pm by drventure »

Connorsdad

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 268
  • Last login:December 22, 2018, 05:56:03 pm
  • I want to build my own arcade controls!
Re: New ControllerRemap utility, 7/11/13 update available (Version 0.0.11)
« Reply #130 on: August 11, 2013, 05:51:21 am »
Could this work with the sega model 2/3 emulators ?

They have configs which have the same problem as mame regarding ids.

Sent from Amstrad CPC464

    

nick3092

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 211
  • Last login:March 22, 2022, 03:57:28 pm
Re: New ControllerRemap utility, 7/11/13 update available (Version 0.0.11)
« Reply #131 on: August 11, 2013, 09:41:45 am »
Could this work with the sega model 2/3 emulators ?

They have configs which have the same problem as mame regarding ids.

Sent from Amstrad CPC464

Someone else asked this earlier in the thread.  It most likely will not work.  Per the person who asked the question, the model 2 emu uses a binary file to store the relevant settings.  So, that's not something easily re-written.  If you can find an ini or xml style file that clearly lays out the controller mapping for a specific emulator, then it might be able to be supported by Dr V's tool.  I don't use model 2 or 3 on my cab, so I can't speak to how the emu's work, or how they save their settings.

drventure

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4152
  • Last login:June 25, 2023, 02:23:57 pm
  • Laser Death Ray Bargain Bin! Make me an offer!
Re: New ControllerRemap utility, 7/11/13 update available (Version 0.0.11)
« Reply #132 on: August 11, 2013, 09:54:41 am »
Could this work with the sega model 2/3 emulators ?

They have configs which have the same problem as mame regarding ids.

Sent from Amstrad CPC464

Someone else asked this earlier in the thread.  It most likely will not work.  Per the person who asked the question, the model 2 emu uses a binary file to store the relevant settings.  So, that's not something easily re-written.  If you can find an ini or xml style file that clearly lays out the controller mapping for a specific emulator, then it might be able to be supported by Dr V's tool.  I don't use model 2 or 3 on my cab, so I can't speak to how the emu's work, or how they save their settings.

What he said  ;)

But seriously, yeah, without some very specific info on the binary file formats used, that'd be a job I just don't have time to take on (plus I don't use Model2/3 myself, at least not yet).


Wade007

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 309
  • Last login:April 06, 2017, 01:33:35 pm
  • A MAME cabinet at home is heaven
    • bit.ly/1cWnoIC
    • Cheapskategamer.com
Re: New ControllerRemap utility, 7/11/13 update available (Version 0.0.11)
« Reply #133 on: November 05, 2013, 01:56:48 pm »
I was recently pointed to this thread after asking how to keep the IDs of my MAME cabinet lightguns (ArcadeGuns) consistent after each boot up.
Thank you for creating such a great utility!! I've been looking for this solution for quite a while but need a bit of help.

I've read and re-read the PDF and sample config files. I'm not a complete beginner with this stuff, but I can't seem to get it to work.
I know I'm close but I'm not quite there with the new config XML file. Wondering if someone might take a quick look at my code....please.  :dunno

I'm using an Xarcade tankstick (two joysticks and trackball) as my control panel. On top of this I've added two lightguns (AimTrak)
Up until now I've simply pointed MAME to the "xarcade.cfg" file in my "ctrl" folder for all controls except for the lightguns. The lightguns would be configured within MAME and of course would change IDs from time to time. Enter the need for this utility. All I need to do is essentially combine the xarcade.ctlr with the abiltily of ControllerRemap for lightgun control (X/Y axis, 3 buttons each)

Below is the unaltered code of the xarcade.cfg file (working):
Code: [Select]
<mameconfig version="10">
<system name="default">

<!-- X-Arcade Version 1.0 input configuration file -->

<input>
<remap origcode="KEYCODE_UP" newcode="KEYCODE_8_PAD" />
<remap origcode="KEYCODE_DOWN" newcode="KEYCODE_2_PAD" />
<remap origcode="KEYCODE_LEFT" newcode="KEYCODE_4_PAD" />
<remap origcode="KEYCODE_RIGHT" newcode="KEYCODE_6_PAD" />

<port type="UI_UP">
<newseq type="standard">KEYCODE_UP OR KEYCODE_8_PAD</newseq>
</port>
<port type="UI_DOWN">
<newseq type="standard">KEYCODE_DOWN OR KEYCODE_2_PAD</newseq>
</port>
<port type="UI_LEFT">
<newseq type="standard">KEYCODE_LEFT OR KEYCODE_4_PAD</newseq>
</port>
<port type="UI_RIGHT">
<newseq type="standard">KEYCODE_RIGHT OR KEYCODE_6_PAD</newseq>
</port>
<port type="UI_SELECT">
<newseq type="standard">KEYCODE_ENTER OR KEYCODE_LCONTROL</newseq>
</port>

<port type="UI_CONFIGURE">
<newseq type="standard">KEYCODE_TAB OR KEYCODE_1 KEYCODE_3</newseq>
</port>
<port type="UI_CANCEL">
<newseq type="standard">KEYCODE_ESC OR KEYCODE_2 KEYCODE_4</newseq>
</port>

<port type="START1">
<newseq type="standard">KEYCODE_1</newseq>
</port>
<port type="START2">
<newseq type="standard">KEYCODE_2</newseq>
</port>
<port type="COIN1">
<newseq type="standard">KEYCODE_3</newseq>
</port>
<port type="COIN2">
<newseq type="standard">KEYCODE_4</newseq>
</port>
<port type="START3">
<newseq type="standard">NONE</newseq>
</port>
<port type="START4">
<newseq type="standard">NONE</newseq>
</port>

<port type="P1_JOYSTICK_UP">
<newseq type="standard">KEYCODE_8_PAD</newseq>
</port>
<port type="P1_JOYSTICK_DOWN">
<newseq type="standard">KEYCODE_2_PAD</newseq>
</port>
<port type="P1_JOYSTICK_LEFT">
<newseq type="standard">KEYCODE_4_PAD</newseq>
</port>
<port type="P1_JOYSTICK_RIGHT">
<newseq type="standard">KEYCODE_6_PAD</newseq>
</port>
<port type="P1_JOYSTICKRIGHT_UP">
<newseq type="standard">KEYCODE_R</newseq>
</port>
<port type="P1_JOYSTICKRIGHT_DOWN">
<newseq type="standard">KEYCODE_F</newseq>
</port>
<port type="P1_JOYSTICKRIGHT_LEFT">
<newseq type="standard">KEYCODE_D</newseq>
</port>
<port type="P1_JOYSTICKRIGHT_RIGHT">
<newseq type="standard">KEYCODE_G</newseq>
</port>
<port type="P1_JOYSTICKLEFT_UP">
<newseq type="standard">KEYCODE_8_PAD</newseq>
</port>
<port type="P1_JOYSTICKLEFT_DOWN">
<newseq type="standard">KEYCODE_2_PAD</newseq>
</port>
<port type="P1_JOYSTICKLEFT_LEFT">
<newseq type="standard">KEYCODE_4_PAD</newseq>
</port>
<port type="P1_JOYSTICKLEFT_RIGHT">
<newseq type="standard">KEYCODE_6_PAD</newseq>
</port>

<port type="P1_BUTTON1">
<newseq type="standard">KEYCODE_LCONTROL   OR JOYCODE_1_BUTTON1 OR MOUSECODE_1_BUTTON1</newseq>
</port>
<port type="P1_BUTTON2">
<newseq type="standard">KEYCODE_LALT       OR JOYCODE_1_BUTTON2 OR MOUSECODE_1_BUTTON3</newseq>
</port>
<port type="P1_BUTTON3">
<newseq type="standard">KEYCODE_SPACE      OR JOYCODE_1_BUTTON3 OR MOUSECODE_1_BUTTON2</newseq>
</port>
<port type="P1_BUTTON4">
<newseq type="standard">KEYCODE_LSHIFT     OR JOYCODE_1_BUTTON4</newseq>
</port>
<port type="P1_BUTTON5">
<newseq type="standard">KEYCODE_Z          OR JOYCODE_1_BUTTON5</newseq>
</port>
<port type="P1_BUTTON6">
<newseq type="standard">KEYCODE_X          OR JOYCODE_1_BUTTON6</newseq>
</port>
<port type="P2_BUTTON1">
<newseq type="standard">KEYCODE_A          OR JOYCODE_2_BUTTON1</newseq>
</port>
<port type="P2_BUTTON2">
<newseq type="standard">KEYCODE_S          OR JOYCODE_2_BUTTON2</newseq>
</port>
<port type="P2_BUTTON3">
<newseq type="standard">KEYCODE_Q          OR JOYCODE_2_BUTTON3</newseq>
</port>
<port type="P2_BUTTON4">
<newseq type="standard">KEYCODE_W          OR JOYCODE_2_BUTTON4</newseq>
</port>
<port type="P2_BUTTON5">
<newseq type="standard">KEYCODE_E          OR JOYCODE_2_BUTTON5</newseq>
</port>
<port type="P2_BUTTON6">
<newseq type="standard">KEYCODE_OPENBRACE  OR JOYCODE_2_BUTTON6</newseq>
</port>
</input>
</system>

<system name="neogeo">
<input>
<port type="P1_BUTTON1">
<newseq type="standard">KEYCODE_C          OR JOYCODE_1_BUTTON1</newseq>
</port>
<port type="P1_BUTTON2">
<newseq type="standard">KEYCODE_LSHIFT     OR JOYCODE_1_BUTTON2</newseq>
</port>
<port type="P1_BUTTON3">
<newseq type="standard">KEYCODE_Z          OR JOYCODE_1_BUTTON3</newseq>
</port>
<port type="P1_BUTTON4">
<newseq type="standard">KEYCODE_X          OR JOYCODE_1_BUTTON4</newseq>
</port>
<port type="P1_BUTTON5">
<newseq type="standard">NONE</newseq>
</port>
<port type="P1_BUTTON6">
<newseq type="standard">NONE</newseq>
</port>
<port type="P1_BUTTON7">
<newseq type="standard">NONE</newseq>
</port>
<port type="P1_BUTTON8">
<newseq type="standard">NONE</newseq>
</port>
<port type="P2_BUTTON1">
<newseq type="standard">KEYCODE_CLOSEBRACE OR JOYCODE_2_BUTTON1</newseq>
</port>
<port type="P2_BUTTON2">
<newseq type="standard">KEYCODE_W          OR JOYCODE_2_BUTTON2</newseq>
</port>
<port type="P2_BUTTON3">
<newseq type="standard">KEYCODE_E          OR JOYCODE_2_BUTTON3</newseq>
</port>
<port type="P2_BUTTON4">
<newseq type="standard">KEYCODE_OPENBRACE  OR JOYCODE_2_BUTTON4</newseq>
</port>
<port type="P2_BUTTON5">
<newseq type="standard">NONE</newseq>
</port>
<port type="P2_BUTTON6">
<newseq type="standard">NONE</newseq>
</port>
<port type="P2_BUTTON7">
<newseq type="standard">NONE</newseq>
</port>
<port type="P2_BUTTON8">
<newseq type="standard">NONE</newseq>
</port>
</input>
</system>

</mameconfig>

The following is my current (not quite working) combined X-Arcade/Arcadeguns cfg (xarcade_arcadeguns.cfg) file:

Code: [Select]
<!-- This file is autogenerated; comments and unknown tags will be stripped -->
<mameconfig version="10">
  <controlleralias>
    <id>HID#VID_D209_PID_1601_MI_02#7_6f6937b_0_0000#</id>
    <alias>Lightgun_Player1</alias>
  </controlleralias>
  <controlleralias>
    <id>HID#VID_D209_PID_1602_MI_02#7_23fea4a1_0_0000#</id>
    <alias>Lightgun_Player2</alias>
  </controlleralias>
  <system name="default">
    <controller id="Xarcade_UI_Control">
      <input>
        <remap origcode="KEYCODE_UP" newcode="KEYCODE_8_PAD" />
        <remap origcode="KEYCODE_DOWN" newcode="KEYCODE_2_PAD" />
        <remap origcode="KEYCODE_LEFT" newcode="KEYCODE_4_PAD" />
        <remap origcode="KEYCODE_RIGHT" newcode="KEYCODE_6_PAD" />
        <port type="UI_UP">
          <newseq type="standard">KEYCODE_UP OR KEYCODE_8_PAD </newseq>
        </port>
        <port type="UI_DOWN">
          <newseq type="standard">KEYCODE_DOWN OR KEYCODE_2_PAD </newseq>
        </port>
        <port type="UI_LEFT">
          <newseq type="standard">KEYCODE_LEFT OR KEYCODE_4_PAD </newseq>
        </port>
        <port type="UI_RIGHT">
          <newseq type="standard">KEYCODE_RIGHT OR KEYCODE_6_PAD</newseq>
        </port>
        <port type="UI_SELECT">
          <newseq type="standard">KEYCODE_ENTER OR KEYCODE_LCONTROL</newseq>
        </port>
        <port type="UI_CONFIGURE">
          <newseq type="standard">KEYCODE_TAB OR KEYCODE_1 KEYCODE_3</newseq>
        </port>
        <port type="UI_CANCEL">
          <newseq type="standard">KEYCODE_ESC OR KEYCODE_2 KEYCODE_4</newseq>
        </port>
        <port type="START1">
          <newseq type="standard">KEYCODE_1</newseq>
        </port>
        <port type="START2">
          <newseq type="standard">KEYCODE_2</newseq>
        </port>
        <port type="COIN1">
          <newseq type="standard">KEYCODE_3</newseq>
        </port>
        <port type="COIN2">
          <newseq type="standard">KEYCODE_4</newseq>
        </port>
        <port type="START3">
          <newseq type="standard">NONE</newseq>
        </port>
        <port type="START4">
          <newseq type="standard">NONE</newseq>
        </port>
      </input>
    </controller>
    <controller id="Xarcade_Joystick_Control">
      <input>
        <port type="P1_JOYSTICK_UP">
          <newseq type="standard">
                    KEYCODE_8PAD
                </newseq>
        </port>
        <port type="P1_JOYSTICK_DOWN">
          <newseq type="standard">
                    KEYCODE_2PAD
                </newseq>
        </port>
        <port type="P1_JOYSTICK_LEFT">
          <newseq type="standard">
                    KEYCODE_4PAD
                </newseq>
        </port>
        <port type="P1_JOYSTICK_RIGHT">
          <newseq type="standard">
                    KEYCODE_6PAD
                </newseq>
        </port>
        <port type="P1_BUTTON1">
          <newseq type="standard">
                    GUNCODE_4_BUTTON1 OR KEYCODE_LCONTROL
                </newseq>
        </port>
        <port type="P1_BUTTON2">
          <newseq type="standard">
                    JOYCODE_1_BUTTON3 OR KEYCODE_LALT
                </newseq>
        </port>
        <port type="P1_BUTTON3">
          <newseq type="standard">
                    JOYCODE_1_BUTTON2 OR KEYCODE_SPACE
                </newseq>
        </port>
        <port type="P1_BUTTON4">
          <newseq type="standard">
                    KEYCODE_LSHIFT
                </newseq>
        </port>
        <port type="P1_BUTTON5">
          <newseq type="standard">
                    KEYCODE_Z
                </newseq>
        </port>
        <port type="P1_BUTTON6">
          <newseq type="standard">
                    KEYCODE_X
                </newseq>
        </port>
        <port type="P1_BUTTON7">
          <newseq type="standard">
                    KEYCODE_C
                </newseq>
        </port>
        <port type="P1_BUTTON8">
          <newseq type="standard">
                    KEYCODE_5
                </newseq>
        </port>
        <port type="P2_BUTTON1">
          <newseq type="standard">
                    KEYCODE_A OR GUNCODE_3_BUTTON1
                </newseq>
        </port>
        <port type="P2_BUTTON2">
          <newseq type="standard">
                    JOYCODE_2_BUTTON3 OR KEYCODE_S
                </newseq>
        </port>
        <port type="P2_BUTTON3">
          <newseq type="standard">
                    JOYCODE_2_BUTTON2 OR KEYCODE_Q
                </newseq>
        </port>
      </input>
    </controller>
    <controller id="Lightgun_Player1">
      <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>
        <port type="P1_AD_STICK_X">
          <newseq type="standard">
                    GUNCODE_XAXIS
                </newseq>
        </port>
        <port type="P1_AD_STICK_Y">
          <newseq type="standard">
                    GUNCODE_YAXIS
                </newseq>
        </port>
      </input>
    </controller>
    <controller id="Lightgun_Player2">
      <input>
        <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_X">
          <newseq type="standard">
                    GUNCODE_XAXIS
                </newseq>
        </port>
        <port type="P2_AD_STICK_Y">
          <newseq type="standard">
                    GUNCODE_YAXIS
                </newseq>
        </port>
      </input>
    </controller>
    <!--
        ###################################################
        ACTUAL INPUT MAPPING STARTS HERE
        DO NOT actually put anything in this section.
        It is completely cleared and regenerated!
        ###################################################
     -->
    <input>
      <port type="P2_LIGHTGUN_X">
        <newseq type="standard">
                        GUNCODE_2_XAXIS
                    </newseq>
      </port>
      <port type="P2_LIGHTGUN_Y">
        <newseq type="standard">
                        GUNCODE_2_YAXIS
                    </newseq>
      </port>
      <port type="P2_AD_STICK_X">
        <newseq type="standard">
                    GUNCODE_2_XAXIS
                </newseq>
      </port>
      <port type="P2_AD_STICK_Y">
        <newseq type="standard">
                    GUNCODE_2_YAXIS
                </newseq>
      </port>
    </input>
  </system>
</mameconfig>
My Super Arcade cabinet project:
Software blog article: http://bit.ly/1cWnoIC

Hardware blog article: http://bit.ly/1dWxjvP

YouTube video: http://bit.ly/1N818Xm

Super Arcade Cabinet Progress thread (Now Complete):
http://forum.arcadecontrols.com/index.php/topic,123292.0.html

Frontend Video Intro: http://bit.ly/1P9HPDN

drventure

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4152
  • Last login:June 25, 2023, 02:23:57 pm
  • Laser Death Ray Bargain Bin! Make me an offer!
Re: New ControllerRemap utility, 7/11/13 update available (Version 0.0.11)
« Reply #134 on: November 05, 2013, 07:22:15 pm »
Hi Wade007

Sorry you're having some troubles.

I think the first place to start is with the keyboard

You've got something like this in your ctrlr file

Code: [Select]
  <system name="default">
    <controller id="Xarcade_UI_Control">
      <input>
        <remap origcode="KEYCODE_UP" newcode="KEYCODE_8_PAD" />
        <remap origcode="KEYCODE_DOWN" newcode="KEYCODE_2_PAD" />
        <remap origcode="KEYCODE_LEFT" newcode="KEYCODE_4_PAD" />
        <remap origcode="KEYCODE_RIGHT" newcode="KEYCODE_6_PAD" />
        <port type="UI_UP">
          <newseq type="standard">KEYCODE_UP OR KEYCODE_8_PAD </newseq>
        </port>

The main problem there I suspect is that if the xarcade "looks" like a keyboard, you need to use the "keyboard" controller id

so, something more like this

Code: [Select]
  <system name="default">
    <controller id="keyboard">
      <input>
        <port type="UI_UP">
          <newseq type="standard">KEYCODE_UP</newseq>
        </port>

Note that I removed the REMAP lines, I'm not completely sure what they do, or if ControllerRemap will handle them, and it doesn't seem like they should be strictly necessary.

for instance, they appear to map a KEYUP to a KEY 8 PAD port. But then the port definition specifies +either+ KEY UP or KEY 8 PAD. I'm just not sure about that part.

Make sure the "keyboard" controller id ONLY includes keyboard port elements. For instance, if p1_up maps to KEY_UP and to JOYSTICK_1_XAXIS_UP_SWITCH, you have the port map for KEY_UP under the "keyboard" controller id section, and other the joystick section, you'd include only the JOYSTICK_1_XAXIS_UP_SWITCH mapping. When controllerremap processes, it'll merge both those elements as applicable.

Make those changes first and get things to a point where you're getting your keyboard elements mapped into the <input> section at the bottom of the file (after the comment block that says ACTUAL INPUT MAPPING STARTS HERE)

Be sure to use the /list option to get the IDs of the controllers. Then, it might make things easier to define a few aliases for those.

Then we can take a stab any any remaining issues.

Wade007

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 309
  • Last login:April 06, 2017, 01:33:35 pm
  • A MAME cabinet at home is heaven
    • bit.ly/1cWnoIC
    • Cheapskategamer.com
Re: New ControllerRemap utility, 7/11/13 update available (Version 0.0.11)
« Reply #135 on: November 07, 2013, 12:12:46 am »
Thank you so much for your help drventure!!

I took your advice and tweaked a few things with my ctrl file. I'm much much closer. I seem to have regained control of the keyboard functions relative to my xarcade tankstick once again. Joystick MAME games work like before.

I triple checked the ID of my lightguns and fixed the ID for lightgun1. It was off by one digit and therefore wasn't getting picked up via the alias. All good now. Now, Lightgun 1 and 2 seem to have been picked up/re-mapped correctly (X/Y axis control) however Lightgun 2 trigger/buttons aren't mapped. Lightgun 1 buttons work, but probably only because I lucked out and called for GUNCODE_4_BUTTON1 in the P1_BUTTON1 port type, etc. I need to remap the 3 buttons on each lightgun correctly. Pull out of keyboard controller id right? How do I separate the trigger/gun buttons again separately from the keyboard section so they will get correctly remapped everytime? Also, Keystoke arrows don't seem to work on MAME UI.

I'm making progress... Can you take a look at my code again here below and give me another nudge or two in the right direction?

Thanks again for your work on this utility. I have high hopes of getting this to work and no longer having to worry about having to constantly re-configure my lightguns on my MAME cabinet! :)


Code: [Select]
<!-- This file is autogenerated; comments and unknown tags will be stripped -->
<mameconfig version="10">
  <controlleralias>
    <id>HID#VID_D209_PID_1601_MI_02#7_6f69e7b_0_0000#</id>
    <alias>Lightgun_Player1</alias>
  </controlleralias>
  <controlleralias>
    <id>HID#VID_D209_PID_1602_MI_02#7_23fea4a1_0_0000#</id>
    <alias>Lightgun_Player2</alias>
  </controlleralias>
  <system name="default">
    <controller id="keyboard">
      <input>
        <port type="UI_UP">
          <newseq type="standard">KEYCODE_UP OR KEYCODE_8_PAD </newseq>
        </port>
        <port type="UI_DOWN">
          <newseq type="standard">KEYCODE_DOWN OR KEYCODE_2_PAD </newseq>
        </port>
        <port type="UI_LEFT">
          <newseq type="standard">KEYCODE_LEFT OR KEYCODE_4_PAD </newseq>
        </port>
        <port type="UI_RIGHT">
          <newseq type="standard">KEYCODE_RIGHT OR KEYCODE_6_PAD</newseq>
        </port>
        <port type="UI_SELECT">
          <newseq type="standard">KEYCODE_ENTER OR KEYCODE_LCONTROL</newseq>
        </port>
        <port type="UI_CONFIGURE">
          <newseq type="standard">KEYCODE_TAB OR KEYCODE_1 KEYCODE_3</newseq>
        </port>
        <port type="UI_CANCEL">
          <newseq type="standard">KEYCODE_ESC OR KEYCODE_2 KEYCODE_4</newseq>
        </port>
        <port type="START1">
          <newseq type="standard">KEYCODE_1</newseq>
        </port>
        <port type="START2">
          <newseq type="standard">KEYCODE_2</newseq>
        </port>
        <port type="COIN1">
          <newseq type="standard">KEYCODE_3</newseq>
        </port>
        <port type="COIN2">
          <newseq type="standard">KEYCODE_4</newseq>
        </port>
        <port type="START3">
          <newseq type="standard">NONE</newseq>
        </port>
        <port type="START4">
          <newseq type="standard">NONE</newseq>
        </port>
        <port type="P1_JOYSTICK_UP">
          <newseq type="standard">
                    KEYCODE_8PAD
                </newseq>
        </port>
        <port type="P1_JOYSTICK_DOWN">
          <newseq type="standard">
                    KEYCODE_2PAD
                </newseq>
        </port>
        <port type="P1_JOYSTICK_LEFT">
          <newseq type="standard">
                    KEYCODE_4PAD
                </newseq>
        </port>
        <port type="P1_JOYSTICK_RIGHT">
          <newseq type="standard">
                    KEYCODE_6PAD
                </newseq>
        </port>
        <port type="P1_BUTTON1">
          <newseq type="standard">
                    GUNCODE_4_BUTTON1 OR KEYCODE_LCONTROL
                </newseq>
        </port>
        <port type="P1_BUTTON2">
          <newseq type="standard">
                    JOYCODE_1_BUTTON3 OR KEYCODE_LALT
                </newseq>
        </port>
        <port type="P1_BUTTON3">
          <newseq type="standard">
                    JOYCODE_1_BUTTON2 OR KEYCODE_SPACE
                </newseq>
        </port>
        <port type="P1_BUTTON4">
          <newseq type="standard">
                    KEYCODE_LSHIFT
                </newseq>
        </port>
        <port type="P1_BUTTON5">
          <newseq type="standard">
                    KEYCODE_Z
                </newseq>
        </port>
        <port type="P1_BUTTON6">
          <newseq type="standard">
                    KEYCODE_X
                </newseq>
        </port>
        <port type="P1_BUTTON7">
          <newseq type="standard">
                    KEYCODE_C
                </newseq>
        </port>
        <port type="P1_BUTTON8">
          <newseq type="standard">
                    KEYCODE_5
                </newseq>
        </port>
        <port type="P2_BUTTON1">
          <newseq type="standard">
                    KEYCODE_A OR GUNCODE_3_BUTTON1
                </newseq>
        </port>
        <port type="P2_BUTTON2">
          <newseq type="standard">
                    JOYCODE_2_BUTTON3 OR KEYCODE_S
                </newseq>
        </port>
        <port type="P2_BUTTON3">
          <newseq type="standard">
                    JOYCODE_2_BUTTON2 OR KEYCODE_Q
                </newseq>
        </port>
      </input>
    </controller>
    <controller id="Lightgun_Player1">
      <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>
        <port type="P1_AD_STICK_X">
          <newseq type="standard">
                    GUNCODE_XAXIS
                </newseq>
        </port>
        <port type="P1_AD_STICK_Y">
          <newseq type="standard">
                    GUNCODE_YAXIS
                </newseq>
        </port>
      </input>
    </controller>
    <controller id="Lightgun_Player2">
      <input>
        <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_X">
          <newseq type="standard">
                    GUNCODE_XAXIS
                </newseq>
        </port>
        <port type="P2_AD_STICK_Y">
          <newseq type="standard">
                    GUNCODE_YAXIS
                </newseq>
        </port>
      </input>
    </controller>
    <!--
        ###################################################
        ACTUAL INPUT MAPPING STARTS HERE
        DO NOT actually put anything in this section.
        It is completely cleared and regenerated!
        ###################################################
     -->
    <input>
      <port type="UI_UP">
        <newseq type="standard">KEYCODE_UP OR KEYCODE_8_PAD </newseq>
      </port>
      <port type="UI_DOWN">
        <newseq type="standard">KEYCODE_DOWN OR KEYCODE_2_PAD </newseq>
      </port>
      <port type="UI_LEFT">
        <newseq type="standard">KEYCODE_LEFT OR KEYCODE_4_PAD </newseq>
      </port>
      <port type="UI_RIGHT">
        <newseq type="standard">KEYCODE_RIGHT OR KEYCODE_6_PAD</newseq>
      </port>
      <port type="UI_SELECT">
        <newseq type="standard">KEYCODE_ENTER OR KEYCODE_LCONTROL</newseq>
      </port>
      <port type="UI_CONFIGURE">
        <newseq type="standard">KEYCODE_TAB OR KEYCODE_1 KEYCODE_3</newseq>
      </port>
      <port type="UI_CANCEL">
        <newseq type="standard">KEYCODE_ESC OR KEYCODE_2 KEYCODE_4</newseq>
      </port>
      <port type="START1">
        <newseq type="standard">KEYCODE_1</newseq>
      </port>
      <port type="START2">
        <newseq type="standard">KEYCODE_2</newseq>
      </port>
      <port type="COIN1">
        <newseq type="standard">KEYCODE_3</newseq>
      </port>
      <port type="COIN2">
        <newseq type="standard">KEYCODE_4</newseq>
      </port>
      <port type="START3">
        <newseq type="standard">NONE</newseq>
      </port>
      <port type="START4">
        <newseq type="standard">NONE</newseq>
      </port>
      <port type="P1_JOYSTICK_UP">
        <newseq type="standard">
                    KEYCODE_8PAD
                </newseq>
      </port>
      <port type="P1_JOYSTICK_DOWN">
        <newseq type="standard">
                    KEYCODE_2PAD
                </newseq>
      </port>
      <port type="P1_JOYSTICK_LEFT">
        <newseq type="standard">
                    KEYCODE_4PAD
                </newseq>
      </port>
      <port type="P1_JOYSTICK_RIGHT">
        <newseq type="standard">
                    KEYCODE_6PAD
                </newseq>
      </port>
      <port type="P1_BUTTON1">
        <newseq type="standard">
                    GUNCODE_4_BUTTON1 OR KEYCODE_LCONTROL
                </newseq>
      </port>
      <port type="P1_BUTTON2">
        <newseq type="standard">
                    JOYCODE_1_BUTTON3 OR KEYCODE_LALT
                </newseq>
      </port>
      <port type="P1_BUTTON3">
        <newseq type="standard">
                    JOYCODE_1_BUTTON2 OR KEYCODE_SPACE
                </newseq>
      </port>
      <port type="P1_BUTTON4">
        <newseq type="standard">
                    KEYCODE_LSHIFT
                </newseq>
      </port>
      <port type="P1_BUTTON5">
        <newseq type="standard">
                    KEYCODE_Z
                </newseq>
      </port>
      <port type="P1_BUTTON6">
        <newseq type="standard">
                    KEYCODE_X
                </newseq>
      </port>
      <port type="P1_BUTTON7">
        <newseq type="standard">
                    KEYCODE_C
                </newseq>
      </port>
      <port type="P1_BUTTON8">
        <newseq type="standard">
                    KEYCODE_5
                </newseq>
      </port>
      <port type="P2_BUTTON1">
        <newseq type="standard">
                    KEYCODE_A OR GUNCODE_3_BUTTON1
                </newseq>
      </port>
      <port type="P2_BUTTON2">
        <newseq type="standard">
                    JOYCODE_2_BUTTON3 OR KEYCODE_S
                </newseq>
      </port>
      <port type="P2_BUTTON3">
        <newseq type="standard">
                    JOYCODE_2_BUTTON2 OR KEYCODE_Q
                </newseq>
      </port>
      <port type="P1_LIGHTGUN_X">
        <newseq type="standard">
                        GUNCODE_4_XAXIS
                    </newseq>
      </port>
      <port type="P1_LIGHTGUN_Y">
        <newseq type="standard">
                        GUNCODE_4_YAXIS
                    </newseq>
      </port>
      <port type="P1_AD_STICK_X">
        <newseq type="standard">
                    GUNCODE_4_XAXIS
                </newseq>
      </port>
      <port type="P1_AD_STICK_Y">
        <newseq type="standard">
                    GUNCODE_4_YAXIS
                </newseq>
      </port>
      <port type="P2_LIGHTGUN_X">
        <newseq type="standard">
                        GUNCODE_2_XAXIS
                    </newseq>
      </port>
      <port type="P2_LIGHTGUN_Y">
        <newseq type="standard">
                        GUNCODE_2_YAXIS
                    </newseq>
      </port>
      <port type="P2_AD_STICK_X">
        <newseq type="standard">
                    GUNCODE_2_XAXIS
                </newseq>
      </port>
      <port type="P2_AD_STICK_Y">
        <newseq type="standard">
                    GUNCODE_2_YAXIS
                </newseq>
      </port>
    </input>
  </system>
</mameconfig>
My Super Arcade cabinet project:
Software blog article: http://bit.ly/1cWnoIC

Hardware blog article: http://bit.ly/1dWxjvP

YouTube video: http://bit.ly/1N818Xm

Super Arcade Cabinet Progress thread (Now Complete):
http://forum.arcadecontrols.com/index.php/topic,123292.0.html

Frontend Video Intro: http://bit.ly/1P9HPDN

Wade007

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 309
  • Last login:April 06, 2017, 01:33:35 pm
  • A MAME cabinet at home is heaven
    • bit.ly/1cWnoIC
    • Cheapskategamer.com
Re: New ControllerRemap utility, 7/11/13 update available (Version 0.0.11)
« Reply #136 on: November 10, 2013, 12:03:59 pm »
OK, I've pushed things along some more since my last post. I think I have everything set up in the Ctrl file now so my XArcade Tankstick and two ArcadeGuns (Aimtraks) to get remapped correctly on my MAME cabinet. I was able to clean up my XML coding a bit more and resolved the P2 lightgun trigger mapping issue. Keystroke arrows in MAME UI has been resolved. It had nothing to do with ControllerRemap but rather a frontend issue that got messed up somehow.

Only one question remains... correctly remapping the 2nd and 3rd buttons (JOYCODE) on the lightguns via ControllerRemap. What am I not understanding?

Each of my Aimtrak based lightguns has 3 buttons. Trigger, Reload (back) and handle.

For example if I map the following buttons (partial code) for Lightgun_Player1:

Code: [Select]
<controller id="Lightgun_Player1">
      <input>
        <port type="P1_BUTTON1">
          <newseq type="standard">
                        GUNCODE_BUTTON1
                    </newseq>
        </port>
        <port type="P1_BUTTON2">
          <newseq type="standard">
                        JOYCODE_BUTTON3
                    </newseq>
        </port>
        <port type="P1_BUTTON3">
          <newseq type="standard">
                        JOYCODE_BUTTON2
                    </newseq>
        </port>
      </input>
</controller>

What results via ControllerRemap (partial code) is:

Code: [Select]
<port type="P1_BUTTON1">
        <newseq type="standard">
                    KEYCODE_LCONTROL <!-- This is correct. Mapped separately via the "keyboard" id-->
                 OR
                    GUNCODE_3_BUTTON1 <!-- This works! Trigger button remapped correctly-->
        </newseq>
      </port>
      <port type="P1_BUTTON2">
        <newseq type="standard">
                    KEYCODE_LALT <!-- This is correct. Mapped separately via the "keyboard" id-->
                 OR
                    JOYCODE_3_BUTTON3 <!-- NOT correct for the P1 gun. If mapped via MAME it should be
                                                             JOYCODE_1_BUTTON3 in order to work correctly-->
        </newseq>
      </port>
      <port type="P1_BUTTON3">
        <newseq type="standard">
                    KEYCODE_SPACE <!-- This is correct. Mapped separately via the "keyboard" id-->
                 OR
                    JOYCODE_3_BUTTON2 <!-- NOT correct for the P1 gun. If mapped via MAME it seems to be
                                                             JOYCODE_1_BUTTON2 in order to work correctly-->
        </newseq>

Similarly, the second and third buttons on the Player 2 lightgun only work when mapped (manually) to JOYCODE_2_BUTTON"X". The trigger buttons (GUNCODE) for both guns work perfectly.

Something seems off here, but I'm not sure how to fix it. Any help (drventure?).

Do I need to map the JOYCODE buttons separately somehow?

I deleted the config files for "default" and any lightgun game that uses 2 or more buttons before executing ControllerRemap, but the 2nd and 3rd "Joycode" buttons don't seem to picked up correctly. Generally, only the keyboard button gets mapped and the JOYCODE_X_BUTTONX gets left off entirely when I look at the resulting MAME config file for the desired lightgun game. What am I missing here?

Lastly, another huge THANKS for this utility. Despite my questions/concerns, this app is a huge help and greatly needed. Thanks for the time and effort to create it (drventure).
 
« Last Edit: November 10, 2013, 12:20:25 pm by Wade007 »
My Super Arcade cabinet project:
Software blog article: http://bit.ly/1cWnoIC

Hardware blog article: http://bit.ly/1dWxjvP

YouTube video: http://bit.ly/1N818Xm

Super Arcade Cabinet Progress thread (Now Complete):
http://forum.arcadecontrols.com/index.php/topic,123292.0.html

Frontend Video Intro: http://bit.ly/1P9HPDN

Wade007

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 309
  • Last login:April 06, 2017, 01:33:35 pm
  • A MAME cabinet at home is heaven
    • bit.ly/1cWnoIC
    • Cheapskategamer.com
Re: New ControllerRemap utility, 7/11/13 update available (Version 0.0.11)
« Reply #137 on: November 10, 2013, 02:06:59 pm »
Not quite solved but....

As a follow-up, I realized that perhaps Windows was seeing my Aimtraks as both a lightgun AND a joystick and therefore I needed to remap the controls separately.

When I run ControllerRemap /list I get a Joystick Device list as follows [brackets added]:

Code: [Select]
1. 'ATRAK Device #1' , ID=0 [This is P1 lightgun]
2. 'ATRAK Device #2' , ID=1 [This is P2 lightgun]

Mouse Device List (after listing installed mouse and trackball)
1. [...computer mouse listed here...code]
2. [...xarcade trackball listed here...code]
3. 'HID#VID_D209_PID_1602_MI_02#7_23fea4a1_0_0000#' [This is P2 lightgun]
4. 'HID#VID_D209_PID_1601_MI_02#7_6f69e7b_0_0000#' [This is P1 lightgun]

So in my XML Ctrl file I set up the following code to pick up the joystick button portion of the lightguns (Buttons 2 &3) along with the regular lightgun (which work fine) settings:

Code: [Select]
<controlleralias>
    <id>ATRAK Device #1</id>
    <alias>"Lightgun_Player1_joystickbuttons"</alias>
  </controlleralias>
  <controlleralias>
    <id>ATRAK Device #2</id>
    <alias>"Lightgun_Player2_joystickbuttons"</alias>
  </controlleralias>

<controlleralias>
    <id>HID#VID_D209_PID_1601_MI_02#7_6f69e7b_0_0000#</id>
    <alias>Lightgun_Player1</alias>
  </controlleralias>
  <controlleralias>
    <id>HID#VID_D209_PID_1602_MI_02#7_23fea4a1_0_0000#</id>
    <alias>Lightgun_Player2</alias>
  </controlleralias>

Then in the <system name="default"> area of my ctrl XML file I added the following code:

Code: [Select]
<controller id="Lightgun_Player1_joystickbuttons">
      <input>
        <port type="P1_BUTTON2">
          <newseq type="standard">
                        JOYCODE_BUTTON3
                    </newseq>
        </port>
        <port type="P1_BUTTON3">
          <newseq type="standard">
                        JOYCODE_BUTTON2
                    </newseq>
        </port>
      </input>
    </controller>
    <controller id="Lightgun_Player2_joystickbuttons">
      <input>
        <port type="P2_BUTTON2">
          <newseq type="standard">
                        JOYCODE_BUTTON3
                    </newseq>
        </port>
        <port type="P2_BUTTON3">
          <newseq type="standard">
                        JOYCODE_BUTTON2
                    </newseq>
        </port>
      </input>
    </controller>

Shouldn't this work? Trouble is...it's not. After executing ControllerRemp.exe, it still won't map the P1/P2 BUTTON2/3 buttons to JOYCODE_BUTTON"X" like its suppose to. It only maps the keyboard mappings and nothing else.  :banghead:

I'm stuck. Below is my entire current ctrl XML file written for ControllerRemp.exe. Any ideas...anyone? drventure?  :notworthy:

Code: [Select]
<!-- This file is autogenerated; comments and unknown tags will be stripped -->
<mameconfig version="10">
  <controlleralias>
    <id>HID#VID_D209_PID_1601_MI_02#7_6f69e7b_0_0000#</id>
    <alias>Lightgun_Player1</alias>
  </controlleralias>
  <controlleralias>
    <id>HID#VID_D209_PID_1602_MI_02#7_23fea4a1_0_0000#</id>
    <alias>Lightgun_Player2</alias>
  </controlleralias>
  <controlleralias>
    <id>ATRAK Device #1</id>
    <alias>"Lightgun_Player1_joystickbuttons"</alias>
  </controlleralias>
  <controlleralias>
    <id>ATRAK Device #2</id>
    <alias>"Lightgun_Player2_joystickbuttons"</alias>
  </controlleralias>
  <system name="default">
    <controller id="keyboard">
      <input>
        <port type="UI_UP">
          <newseq type="standard">KEYCODE_UP OR KEYCODE_8_PAD </newseq>
        </port>
        <port type="UI_DOWN">
          <newseq type="standard">KEYCODE_DOWN OR KEYCODE_2_PAD </newseq>
        </port>
        <port type="UI_LEFT">
          <newseq type="standard">KEYCODE_LEFT OR KEYCODE_4_PAD </newseq>
        </port>
        <port type="UI_RIGHT">
          <newseq type="standard">KEYCODE_RIGHT OR KEYCODE_6_PAD</newseq>
        </port>
        <port type="UI_SELECT">
          <newseq type="standard">KEYCODE_ENTER OR KEYCODE_LCONTROL</newseq>
        </port>
        <port type="UI_CONFIGURE">
          <newseq type="standard">KEYCODE_TAB OR KEYCODE_1 KEYCODE_3</newseq>
        </port>
        <port type="UI_CANCEL">
          <newseq type="standard">KEYCODE_ESC OR KEYCODE_2 KEYCODE_4</newseq>
        </port>
        <port type="START1">
          <newseq type="standard">KEYCODE_1 OR ENTER</newseq>
        </port>
        <port type="START2">
          <newseq type="standard">KEYCODE_2</newseq>
        </port>
        <port type="COIN1">
          <newseq type="standard">KEYCODE_3</newseq>
        </port>
        <port type="COIN2">
          <newseq type="standard">KEYCODE_4</newseq>
        </port>
        <port type="START3">
          <newseq type="standard">NONE</newseq>
        </port>
        <port type="START4">
          <newseq type="standard">NONE</newseq>
        </port>
        <port type="P1_JOYSTICK_UP">
          <newseq type="standard">
                    KEYCODE_8PAD
                </newseq>
        </port>
        <port type="P1_JOYSTICK_DOWN">
          <newseq type="standard">
                    KEYCODE_2PAD
                </newseq>
        </port>
        <port type="P1_JOYSTICK_LEFT">
          <newseq type="standard">
                    KEYCODE_4PAD
                </newseq>
        </port>
        <port type="P1_JOYSTICK_RIGHT">
          <newseq type="standard">
                    KEYCODE_6PAD
                </newseq>
        </port>
        <port type="P1_BUTTON1">
          <newseq type="standard">
                    KEYCODE_LCONTROL
                </newseq>
        </port>
        <port type="P1_BUTTON2">
          <newseq type="standard">
                    KEYCODE_LALT
                </newseq>
        </port>
        <port type="P1_BUTTON3">
          <newseq type="standard">
                    KEYCODE_SPACE
                </newseq>
        </port>
        <port type="P1_BUTTON4">
          <newseq type="standard">
                    KEYCODE_LSHIFT
                </newseq>
        </port>
        <port type="P1_BUTTON5">
          <newseq type="standard">
                    KEYCODE_Z
                </newseq>
        </port>
        <port type="P1_BUTTON6">
          <newseq type="standard">
                    KEYCODE_X
                </newseq>
        </port>
        <port type="P1_BUTTON7">
          <newseq type="standard">
                    KEYCODE_C
                </newseq>
        </port>
        <port type="P1_BUTTON8">
          <newseq type="standard">
                    KEYCODE_5
                </newseq>
        </port>
        <port type="P2_BUTTON1">
          <newseq type="standard">
                    KEYCODE_A
                </newseq>
        </port>
        <port type="P2_BUTTON2">
          <newseq type="standard">
                    KEYCODE_S
                </newseq>
        </port>
        <port type="P2_BUTTON3">
          <newseq type="standard">
                    KEYCODE_Q
                </newseq>
        </port>
        <port type="P2_BUTTON4">
          <newseq type="standard">
                    KEYCODE_W         
                </newseq>
        </port>
        <port type="P2_BUTTON5">
          <newseq type="standard">
                    KEYCODE_E         
                </newseq>
        </port>
        <port type="P2_BUTTON6">
          <newseq type="standard">
                    KEYCODE_OPENBRACE 
                </newseq>
        </port>
        <port type="P2_BUTTON7">
          <newseq type="standard">
                    KEYCODE_CLOSEBRACE
                </newseq>
        </port>
        <port type="P2_BUTTON8">
          <newseq type="standard">
                    KEYCODE_6
                </newseq>
        </port>
      </input>
    </controller>
    <controller id="Lightgun_Player1">
      <input>
        <port type="P1_BUTTON1">
          <newseq type="standard">
                        GUNCODE_BUTTON1
                    </newseq>
        </port>
        <port type="P1_LIGHTGUN_X">
          <newseq type="standard">
                        GUNCODE_XAXIS
                    </newseq>
        </port>
        <port type="P1_LIGHTGUN_Y">
          <newseq type="standard">
                        GUNCODE_YAXIS
                    </newseq>
        </port>
        <port type="P1_AD_STICK_X">
          <newseq type="standard">
                    GUNCODE_XAXIS
                </newseq>
        </port>
        <port type="P1_AD_STICK_Y">
          <newseq type="standard">
                    GUNCODE_YAXIS
                </newseq>
        </port>
      </input>
    </controller>
    <controller id="Lightgun_Player2">
      <input>
        <port type="P2_BUTTON1">
          <newseq type="standard">
                        GUNCODE_BUTTON1
                    </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_X">
          <newseq type="standard">
                    GUNCODE_XAXIS
                </newseq>
        </port>
        <port type="P2_AD_STICK_Y">
          <newseq type="standard">
                    GUNCODE_YAXIS
                </newseq>
        </port>
      </input>
    </controller>
    <controller id="Lightgun_Player1_joystickbuttons">
      <input>
        <port type="P1_BUTTON2">
          <newseq type="standard">
                        JOYCODE_BUTTON3
                    </newseq>
        </port>
        <port type="P1_BUTTON3">
          <newseq type="standard">
                        JOYCODE_BUTTON2
                    </newseq>
        </port>
      </input>
    </controller>
    <controller id="Lightgun_Player2_joystickbuttons">
      <input>
        <port type="P2_BUTTON2">
          <newseq type="standard">
                        JOYCODE_BUTTON3
                    </newseq>
        </port>
        <port type="P2_BUTTON3">
          <newseq type="standard">
                        JOYCODE_BUTTON2
                    </newseq>
        </port>
      </input>
    </controller>
    <!--
        ###################################################
        ACTUAL INPUT MAPPING STARTS HERE
        DO NOT actually put anything in this section.
        It is completely cleared and regenerated!
        ###################################################
     -->
    <crosshairs>
      <crosshair player="0" mode="0" />
      <crosshair player="1" mode="0" />
    </crosshairs>
    <input>
      <port type="UI_UP">
        <newseq type="standard">KEYCODE_UP OR KEYCODE_8_PAD </newseq>
      </port>
      <port type="UI_DOWN">
        <newseq type="standard">KEYCODE_DOWN OR KEYCODE_2_PAD </newseq>
      </port>
      <port type="UI_LEFT">
        <newseq type="standard">KEYCODE_LEFT OR KEYCODE_4_PAD </newseq>
      </port>
      <port type="UI_RIGHT">
        <newseq type="standard">KEYCODE_RIGHT OR KEYCODE_6_PAD</newseq>
      </port>
      <port type="UI_SELECT">
        <newseq type="standard">KEYCODE_ENTER OR KEYCODE_LCONTROL</newseq>
      </port>
      <port type="UI_CONFIGURE">
        <newseq type="standard">KEYCODE_TAB OR KEYCODE_1 KEYCODE_3</newseq>
      </port>
      <port type="UI_CANCEL">
        <newseq type="standard">KEYCODE_ESC OR KEYCODE_2 KEYCODE_4</newseq>
      </port>
      <port type="START1">
        <newseq type="standard">KEYCODE_1 OR ENTER</newseq>
      </port>
      <port type="START2">
        <newseq type="standard">KEYCODE_2</newseq>
      </port>
      <port type="COIN1">
        <newseq type="standard">KEYCODE_3</newseq>
      </port>
      <port type="COIN2">
        <newseq type="standard">KEYCODE_4</newseq>
      </port>
      <port type="START3">
        <newseq type="standard">NONE</newseq>
      </port>
      <port type="START4">
        <newseq type="standard">NONE</newseq>
      </port>
      <port type="P1_JOYSTICK_UP">
        <newseq type="standard">
                    KEYCODE_8PAD
                </newseq>
      </port>
      <port type="P1_JOYSTICK_DOWN">
        <newseq type="standard">
                    KEYCODE_2PAD
                </newseq>
      </port>
      <port type="P1_JOYSTICK_LEFT">
        <newseq type="standard">
                    KEYCODE_4PAD
                </newseq>
      </port>
      <port type="P1_JOYSTICK_RIGHT">
        <newseq type="standard">
                    KEYCODE_6PAD
                </newseq>
      </port>
      <port type="P1_BUTTON1">
        <newseq type="standard">
                    KEYCODE_LCONTROL
                 OR
                        GUNCODE_4_BUTTON1
                    </newseq>
      </port>
      <port type="P1_BUTTON2">
        <newseq type="standard">
                    KEYCODE_LALT
                </newseq>
      </port>
      <port type="P1_BUTTON3">
        <newseq type="standard">
                    KEYCODE_SPACE
                </newseq>
      </port>
      <port type="P1_BUTTON4">
        <newseq type="standard">
                    KEYCODE_LSHIFT
                </newseq>
      </port>
      <port type="P1_BUTTON5">
        <newseq type="standard">
                    KEYCODE_Z
                </newseq>
      </port>
      <port type="P1_BUTTON6">
        <newseq type="standard">
                    KEYCODE_X
                </newseq>
      </port>
      <port type="P1_BUTTON7">
        <newseq type="standard">
                    KEYCODE_C
                </newseq>
      </port>
      <port type="P1_BUTTON8">
        <newseq type="standard">
                    KEYCODE_5
                </newseq>
      </port>
      <port type="P2_BUTTON1">
        <newseq type="standard">
                    KEYCODE_A
                 OR
                        GUNCODE_2_BUTTON1
                    </newseq>
      </port>
      <port type="P2_BUTTON2">
        <newseq type="standard">
                    KEYCODE_S
                </newseq>
      </port>
      <port type="P2_BUTTON3">
        <newseq type="standard">
                    KEYCODE_Q
                </newseq>
      </port>
      <port type="P2_BUTTON4">
        <newseq type="standard">
                    KEYCODE_W         
                </newseq>
      </port>
      <port type="P2_BUTTON5">
        <newseq type="standard">
                    KEYCODE_E         
                </newseq>
      </port>
      <port type="P2_BUTTON6">
        <newseq type="standard">
                    KEYCODE_OPENBRACE 
                </newseq>
      </port>
      <port type="P2_BUTTON7">
        <newseq type="standard">
                    KEYCODE_CLOSEBRACE
                </newseq>
      </port>
      <port type="P2_BUTTON8">
        <newseq type="standard">
                    KEYCODE_6
                </newseq>
      </port>
      <port type="P1_LIGHTGUN_X">
        <newseq type="standard">
                        GUNCODE_4_XAXIS
                    </newseq>
      </port>
      <port type="P1_LIGHTGUN_Y">
        <newseq type="standard">
                        GUNCODE_4_YAXIS
                    </newseq>
      </port>
      <port type="P1_AD_STICK_X">
        <newseq type="standard">
                    GUNCODE_4_XAXIS
                </newseq>
      </port>
      <port type="P1_AD_STICK_Y">
        <newseq type="standard">
                    GUNCODE_4_YAXIS
                </newseq>
      </port>
      <port type="P2_LIGHTGUN_X">
        <newseq type="standard">
                        GUNCODE_2_XAXIS
                    </newseq>
      </port>
      <port type="P2_LIGHTGUN_Y">
        <newseq type="standard">
                        GUNCODE_2_YAXIS
                    </newseq>
      </port>
      <port type="P2_AD_STICK_X">
        <newseq type="standard">
                    GUNCODE_2_XAXIS
                </newseq>
      </port>
      <port type="P2_AD_STICK_Y">
        <newseq type="standard">
                    GUNCODE_2_YAXIS
                </newseq>
      </port>
    </input>
  </system>
</mameconfig>



[EDIT - Final solution] I finally just decided to just hard-code the JOYCODE buttons 2 & 3 on my lightguns for Player 1 and Player 2 in the Keyboard ID area as they come up in MAME. These buttons don't seem to get messed up like the GUNCODE IDs often do upon Windows bootup. I just mapped them directly and they seem to work fine. No need to try and map them as a joystick controller separately after all. Unless anyone else has a new idea or solution, I'm going with this one. I then created a BAT file to launch ControllerRemap.exe and put a shortcut to the BAT file in my Windows/Startup menu. Done.

Thought I'd post here in case anyone else was using AimTrak/Arcade Guns. Thanks again drventure for this utility. Definitely solves a concern I had for a long time. Nice work!!
« Last Edit: November 13, 2013, 01:34:17 pm by Wade007 »
My Super Arcade cabinet project:
Software blog article: http://bit.ly/1cWnoIC

Hardware blog article: http://bit.ly/1dWxjvP

YouTube video: http://bit.ly/1N818Xm

Super Arcade Cabinet Progress thread (Now Complete):
http://forum.arcadecontrols.com/index.php/topic,123292.0.html

Frontend Video Intro: http://bit.ly/1P9HPDN

MydknyteStyrm

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 331
  • Last login:March 20, 2024, 12:19:41 pm
  • Makeup FX Gamer
Re: New ControllerRemap utility, 7/11/13 update available (Version 0.0.11)
« Reply #138 on: November 26, 2013, 02:22:56 pm »
I was wondering if this utility was necessary if I was planning my cab to NOT have any control unplugged. Everything I put in is staying. Does Windows change my ID's on powering up and down? Thanks!

Wade007

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 309
  • Last login:April 06, 2017, 01:33:35 pm
  • A MAME cabinet at home is heaven
    • bit.ly/1cWnoIC
    • Cheapskategamer.com
Re: New ControllerRemap utility, 7/11/13 update available (Version 0.0.11)
« Reply #139 on: November 26, 2013, 07:05:30 pm »

Quote
I was wondering if this utility was necessary if I was planning my cab to NOT have any control unplugged. Everything I put in is staying. Does Windows change my ID's on powering up and down? Thanks!

Others can chime in here regarding their own situations, but for me the answer to your question is a resounding "YES".

I have two AimTrak guns that NEVER get unplugged, but Windows  often changes their IDs upon boot-up of my cabinet system, making MAME lightguns games temporarily not work. I knew how to fix it, but it was a bother to have to reconfigure the guns occasionally, and then cross my fingers that Windows wouldn't change the IDs again on the next boot-up. It was a concern I had for quite a while. One that I brought up to Arcade Guns owner, Eric Harbo. He's the one who showed me this thread.

This utility fixed the problem for me. :)
« Last Edit: November 26, 2013, 07:07:31 pm by Wade007 »
My Super Arcade cabinet project:
Software blog article: http://bit.ly/1cWnoIC

Hardware blog article: http://bit.ly/1dWxjvP

YouTube video: http://bit.ly/1N818Xm

Super Arcade Cabinet Progress thread (Now Complete):
http://forum.arcadecontrols.com/index.php/topic,123292.0.html

Frontend Video Intro: http://bit.ly/1P9HPDN

lemonflavoured

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 22
  • Last login:January 18, 2014, 11:57:28 am
  • I want to build my own arcade controls!
Re: New ControllerRemap utility, 7/11/13 update available (Version 0.0.11)
« Reply #140 on: December 03, 2013, 09:49:21 am »
I've just a quick question on the way this utility works. I have 2 trackballs in my cab which love changing ID so for instance trackball 1 is showing as mouse 4 in mame and on reboot it becomes mouse2. Does this utility simply rebind everything that was mouse 4 to mouse2 and just keeps the mame bindings up to date or does it perform some other kind of trickery where make still sees trackball 1 as mouse 4?

Connorsdad

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 268
  • Last login:December 22, 2018, 05:56:03 pm
  • I want to build my own arcade controls!
Re: New ControllerRemap utility, 7/11/13 update available (Version 0.0.11)
« Reply #141 on: December 03, 2013, 11:29:25 am »
I was wondering if this utility was necessary if I was planning my cab to NOT have any control unplugged. Everything I put in is staying. Does Windows change my ID's on powering up and down? Thanks!

I have each aimtrak and my spinner/trackball plugged into different USB ports/USB Controllers on the MB, as long as I don't unplug them the id's stick, most of the time. Roughly 1 out of every 5 boots, at least one of the id's has changed but if I reboot, the id's return as before. If you plan on using mame only then by all means this app is the best option, but, if you plan on also running model3/model2 emulators I would suggest trying out the different port trick.
    

eustonr

  • Trade Count: (0)
  • Newbie
  • *
  • Offline Offline
  • Posts: 1
  • Last login:April 03, 2014, 06:12:57 am
  • I want to build my own arcade controls!
Re: New ControllerRemap utility, 7/11/13 update available (Version 0.0.11)
« Reply #142 on: April 03, 2014, 05:41:18 am »
Hi,

I've had the issue with Mame, and USB controllers that ControllerRemap is designed to fix - My system consists of:

2 Ultra Sticks
2 Aimtrak lightguns
1 UTrak Trackball
1 MinI-PAC Board

I dont use the UTrak controller for the trackball - to save USB ports, I wired the trackball into the Mini-PAC board. The MiniPAC has an onboard mouse controller (designed for Trackballs), so a separate board becomes unnecessary.

The issue I have is :

ControllerRemap identifies the 2 Ultra sticks, and also the 2 Aimtraks - but it doesnt see the Mini-PAC.

That would be fine, but all 3 are USB controllers, and all 3 register as mouse controllers to Mame.

When I first installed ControllerMap and configured it, it worked ok for a while. Then after a few reboots Gun 1 stopped working, and Gun 2 was being seen by Mame as Gun 1. Drove me nuts for a while - until I realised that the Mini-PAC was being seen by Mame as the 3rd mouse controller. The 2 Ultra Sticks were being seen first (and always seemed to be) The lightguns were being seen as the 4th and 5th controllers.

But controllerremap ./list only shows the 2 sticks and 2 guns. ControllerRemap was therefore mapping (correctly) stick 1 and 2 to controller 1 & 2 - but incorrectly  remapping the guns to controllers 3 and 4. (instead of 4 and 5). It worked at first because the trackball (MiniPAC) was being seen last on those reboots where the setup worked..

After a few frustrating hours, I finally worked it out - and put in a temporary work around. I am able to force the MiniPAC to being seen last by windows on every reboot, by plugging the MiniPAC into a USB hub, and plugging that hub into the last numbered USB port on my motherboard. It works for now, but it would be nice not to have to use a hub in my Cabinet!

I could rewire the whole cabinet, and start using the seperate UTrack Trackball controller instead of the MiniPAC (and disable the onboard Trackball controller) - but there's no guarantee that will work either (as ControlerRemap may not see the UTrack controller either)

Any ideas?

thanks

stigzler

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 977
  • Last login:February 11, 2022, 03:01:48 pm
  • It seemed like a good idea at the time....
    • Mago Arcade
Re: New ControllerRemap utility, 7/11/13 update available (Version 0.0.11)
« Reply #143 on: April 10, 2014, 04:48:28 pm »
Hmmm, this looks great but cannot get working...

The DOS error:



The ctrlr cfg file:

Code: [Select]
<!--
Configuration Remap file
-->
<mameconfig version="10">
  <!--
    ############################################################
    Define controller aliases, This just makes the controller names
    a little easier to deal with for the rest of the file.
    ############################################################
    -->
  <controlleralias>
    <id>HID#VID_D209_PID_1603_MI_02#7_27d3a5f8</id>
    <alias>Lightgun1</alias>
  </controlleralias>
  <controlleralias>
    <id>HID#VID_D209_PID_1604_MI_02#7_37a156</id>
    <alias>Lightgun2</alias>
  </controlleralias>
  <!--
    ############################################################
    This is the System Default section
    It generally should be the FIRST system section in the cfg file
    ############################################################
    -->
  <system name="default">
    <!-- put a controller element here to have it copied into ONLY this particular
         system element
    -->
    <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>
    <controller id="Lightgun2">
      <input>
        <port type="P2_LIGHTGUN_X">
          <newseq type="standard">
                        GUNCODE_XAXIS
                    </newseq>
        </port>
        <port type="P2_LIGHTGUN_Y">
          <newseq type="standard">
                        GUNCODE_YAXIS
                    </newseq>
        </port>
      </input>
    </controller>
    <!--
        ###################################################
        ACTUAL INPUT MAPPING STARTS HERE
        DO NOT actually put anything in this section.
        It is completely cleared and regenerated!
        ###################################################
        -->
    <input>
      <port type="P1_LIGHTGUN_X">
        <newseq type="standard">
                        GUNCODE_3_XAXIS
                    </newseq>
      </port>
      <port type="P1_LIGHTGUN_Y">
        <newseq type="standard">
                        GUNCODE_3_YAXIS
                    </newseq>
      </port>
      <port type="P2_LIGHTGUN_X">
        <newseq type="standard">
                        GUNCODE_5_XAXIS
                    </newseq>
      </port>
      <port type="P2_LIGHTGUN_Y">
        <newseq type="standard">
                        GUNCODE_5_YAXIS
                    </newseq>
      </port>
    </input>
  </system>
  <!--
    ###################################################
    This is a GAME specific section
    Add additional <controller> sections here
    to define how those controllers should map for this
    particular game
    ###################################################
    -->
  <system name="ribbit">
    <!-- This would be stupid to actually use, but as an example
         For this game ("Ribbit"), reverse the UP and DOWN directions
         on the joystick -->
    <controller id="U360 Player1">
      <input>
        <port type="P1_JOYSTICK_UP">
          <newseq type="standard">
                        JOYCODE_YAXIS_DOWN_SWITCH
                    </newseq>
        </port>
        <port type="P1_JOYSTICK_DOWN">
          <newseq type="standard">
                        JOYCODE_YAXIS_UP_SWITCH
                    </newseq>
        </port>
      </input>
    </controller>
    <!--
        ###################################################
        ACTUAL INPUT MAPPING STARTS HERE
        DO NOT actually put anything in this section.
        It is completely cleared and regenerated!
        ###################################################
        -->
    <input></input>
  </system>
</mameconfig>

Command line:

C:\Emulators\Mame0149b\mame64.exe ptblank -rompath "J:\roms" -joy -skip_gameinfo -nowindow -video d3d -noswitchres -triplebuffer -ctrlr MyArcade2

 :dunno Any ideas??


nick3092

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 211
  • Last login:March 22, 2022, 03:57:28 pm
Re: New ControllerRemap utility, 7/11/13 update available (Version 0.0.11)
« Reply #144 on: April 12, 2014, 07:56:29 am »
Hmmm, this looks great but cannot get working...

The DOS error:



The ctrlr cfg file:

Code: [Select]
<!--
Configuration Remap file
-->
<mameconfig version="10">
  <!--
    ############################################################
    Define controller aliases, This just makes the controller names
    a little easier to deal with for the rest of the file.
    ############################################################
    -->
  <controlleralias>
    <id>HID#VID_D209_PID_1603_MI_02#7_27d3a5f8</id>
    <alias>Lightgun1</alias>
  </controlleralias>
  <controlleralias>
    <id>HID#VID_D209_PID_1604_MI_02#7_37a156</id>
    <alias>Lightgun2</alias>
  </controlleralias>
  <!--
    ############################################################
    This is the System Default section
    It generally should be the FIRST system section in the cfg file
    ############################################################
    -->
  <system name="default">
    <!-- put a controller element here to have it copied into ONLY this particular
         system element
    -->
    <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>
    <controller id="Lightgun2">
      <input>
        <port type="P2_LIGHTGUN_X">
          <newseq type="standard">
                        GUNCODE_XAXIS
                    </newseq>
        </port>
        <port type="P2_LIGHTGUN_Y">
          <newseq type="standard">
                        GUNCODE_YAXIS
                    </newseq>
        </port>
      </input>
    </controller>
    <!--
        ###################################################
        ACTUAL INPUT MAPPING STARTS HERE
        DO NOT actually put anything in this section.
        It is completely cleared and regenerated!
        ###################################################
        -->
    <input>
      <port type="P1_LIGHTGUN_X">
        <newseq type="standard">
                        GUNCODE_3_XAXIS
                    </newseq>
      </port>
      <port type="P1_LIGHTGUN_Y">
        <newseq type="standard">
                        GUNCODE_3_YAXIS
                    </newseq>
      </port>
      <port type="P2_LIGHTGUN_X">
        <newseq type="standard">
                        GUNCODE_5_XAXIS
                    </newseq>
      </port>
      <port type="P2_LIGHTGUN_Y">
        <newseq type="standard">
                        GUNCODE_5_YAXIS
                    </newseq>
      </port>
    </input>
  </system>
  <!--
    ###################################################
    This is a GAME specific section
    Add additional <controller> sections here
    to define how those controllers should map for this
    particular game
    ###################################################
    -->
  <system name="ribbit">
    <!-- This would be stupid to actually use, but as an example
         For this game ("Ribbit"), reverse the UP and DOWN directions
         on the joystick -->
    <controller id="U360 Player1">
      <input>
        <port type="P1_JOYSTICK_UP">
          <newseq type="standard">
                        JOYCODE_YAXIS_DOWN_SWITCH
                    </newseq>
        </port>
        <port type="P1_JOYSTICK_DOWN">
          <newseq type="standard">
                        JOYCODE_YAXIS_UP_SWITCH
                    </newseq>
        </port>
      </input>
    </controller>
    <!--
        ###################################################
        ACTUAL INPUT MAPPING STARTS HERE
        DO NOT actually put anything in this section.
        It is completely cleared and regenerated!
        ###################################################
        -->
    <input></input>
  </system>
</mameconfig>

Command line:

C:\Emulators\Mame0149b\mame64.exe ptblank -rompath "J:\roms" -joy -skip_gameinfo -nowindow -video d3d -noswitchres -triplebuffer -ctrlr MyArcade2

 :dunno Any ideas??

Unfortunately MAME doesn't differentiate between "could not load file" and "file not found".  Most likely you are experiencing the latter.  Make sure you have the file in your ctrlr folder.  If it is, maybe you have the ctrlr directory set wrong in your mame.ini file.  Should look something like this (which btw, you can shorten your command line by setting options that don't change in here):

Code: [Select]
#
# CORE SEARCH PATH OPTIONS
#
rompath                   roms;chds
hashpath                  hash
samplepath                samples
artpath                   artwork
ctrlrpath                 ctrlr
inipath                   .;ini
fontpath                  .
cheatpath                 cheat
crosshairpath             crosshair


stigzler

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 977
  • Last login:February 11, 2022, 03:01:48 pm
  • It seemed like a good idea at the time....
    • Mago Arcade
Re: New ControllerRemap utility, 7/11/13 update available (Version 0.0.11)
« Reply #145 on: April 12, 2014, 04:25:38 pm »
Thanks Nick, but that didn't work either. :(

I have two ini files - one in root mame directory and the other in the INI folder under root. I changed both to:

Code: [Select]
rompath                   J:\roms
hashpath                  hash
samplepath                samples
artpath                   artwork
ctrlrpath                 C:\Emulators\Mame0149b\ctrlr
inipath                   ini
fontpath                  .
cheatpath                 cheat
crosshairpath             crosshair

Still no joy. :( Any other ideas?

stigzler

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 977
  • Last login:February 11, 2022, 03:01:48 pm
  • It seemed like a good idea at the time....
    • Mago Arcade
Re: New ControllerRemap utility, 7/11/13 update available (Version 0.0.11)
« Reply #146 on: April 13, 2014, 03:35:05 am »
Update - it appears as though it is my MAME setup, somehow. I tried with the "Hotrod" ctrlr file and still no joy. Doesn't make any sense to me this, though. mame.ini is pointing towards the ctrlr folder in mame root. But appears not to be reading this.

My mame.ini file in mame root:

Code: [Select]
#
# CORE CONFIGURATION OPTIONS
#
readconfig                1
writeconfig               0

#
# CORE SEARCH PATH OPTIONS
#
rompath                   J:\roms
hashpath                  hash
samplepath                samples
artpath                   artwork
ctrlrpath                 ctrlr
inipath                   .;ini
fontpath                  .
cheatpath                 cheat
crosshairpath             crosshair

#
# CORE OUTPUT DIRECTORY OPTIONS
#
cfg_directory             cfg
nvram_directory           nvram
memcard_directory         memcard
input_directory           inp
state_directory           sta
snapshot_directory        snap
diff_directory            diff
comment_directory         comments

#
# CORE OUTPUT DIRECTORY OPTIONS
#
hiscore_directory         hi

#
# CORE STATE/PLAYBACK OPTIONS
#
state                     
autosave                  0
playback                 
record                   
mngwrite                 
aviwrite                 
wavwrite                 
snapname                  %g/%i
snapsize                  auto
snapview                  internal
burnin                    0

#
# CORE PERFORMANCE OPTIONS
#
autoframeskip             0
frameskip                 0
seconds_to_run            0
throttle                  1
sleep                     1
speed                     1.0
refreshspeed              0

#
# CORE ROTATION OPTIONS
#
rotate                    1
ror                       0
rol                       0
autoror                   0
autorol                   0
flipx                     0
flipy                     0

#
# CORE ARTWORK OPTIONS
#
artwork_crop              1
use_backdrops             1
use_overlays              1
use_bezels                1
use_cpanels               1
use_marquees              1

#
# CORE SCREEN OPTIONS
#
brightness                1.0
contrast                  1.0
gamma                     1.0
pause_brightness          0.65
effect                    none

#
# CORE VECTOR OPTIONS
#
antialias                 1
beam                      1.0
flicker                   0

#
# CORE SOUND OPTIONS
#
sound                     1
samplerate                48000
samples                   1
volume                    0

#
# CORE INPUT OPTIONS
#
coin_lockout              1
ctrlr                     
mouse                     1
joystick                  1
lightgun                  1
multikeyboard             0
multimouse                0
steadykey                 0
ui_active                 0
offscreen_reload          1
joystick_map              auto
joystick_deadzone         0.3
joystick_saturation       0.85
natural                   0
joystick_contradictory    0
coin_impulse              0

#
# CORE INPUT AUTOMATIC ENABLE OPTIONS
#
paddle_device             keyboard
adstick_device            keyboard
pedal_device              keyboard
dial_device               keyboard
trackball_device          keyboard
lightgun_device           keyboard
positional_device         keyboard
mouse_device              mouse

#
# CORE DEBUGGING OPTIONS
#
log                       0
verbose                   0
update_in_pause           0
debug                     0
debugscript               
debug_internal            0

#
# CORE MISC OPTIONS
#
bios                     
cheat                     0
skip_gameinfo             0
uifont                    default
ramsize                   
confirm_quit              0
ui_mouse                  0

#
# CORE MKChamp OPTIONS
#
disable_hiscore_patch     0
disable_nagscreen_patch   0
disable_loading_patch     0

#
# WINDOWS DEBUGGING OPTIONS
#
oslog                     0
watchdog                  0
debugger_font             "Lucida Console"
debugger_font_size        9

#
# WINDOWS PERFORMANCE OPTIONS
#
priority                  0
multithreading            1
numprocessors             auto
profile                   0
bench                     0

#
# WINDOWS VIDEO OPTIONS
#
video                     d3d
numscreens                1
window                    0
maximize                  1
keepaspect                1
prescale                  1
waitvsync                 0
syncrefresh               0
menu                      0

#
# DIRECTDRAW-SPECIFIC OPTIONS
#
hwstretch                 1

#
# DIRECT3D-SPECIFIC OPTIONS
#
d3dversion                8
filter                    1

#
# DIRECT3D POST-PROCESSING OPTIONS
#
hlsl_enable               1
hlslpath                  hlsl
hlsl_ini_read             0
hlsl_ini_write            0
hlslini                   %g
hlsl_prescale_x           0
hlsl_prescale_y           0
hlsl_preset               -1
hlsl_write               
hlsl_snap_width           2048
hlsl_snap_height          1536
shadow_mask_alpha         0.0
shadow_mask_texture       aperture.png
shadow_mask_x_count       320
shadow_mask_y_count       240
shadow_mask_usize         0.09375
shadow_mask_vsize         0.109375
curvature                 0.0
pincushion                0.0
scanline_alpha            0.0
scanline_size             1.0
scanline_height           0.7
scanline_bright_scale     1.0
scanline_bright_offset    0.0
scanline_jitter           0.0
defocus                   0.0,0.0
converge_x                0.0,0.0,0.0
converge_y                0.0,0.0,0.0
radial_converge_x         0.0,0.0,0.0
radial_converge_y         0.0,0.0,0.0
red_ratio                 1.0,0.0,0.0
grn_ratio                 0.0,1.0,0.0
blu_ratio                 0.0,0.0,1.0
saturation                1.0
offset                    0.0,0.0,0.0
scale                     1.0,1.0,1.0
power                     1.0,1.0,1.0
floor                     0.0,0.0,0.0
phosphor_life             0.0,0.0,0.0
yiq_enable                0
yiq_cc                    3.59754545
yiq_a                     0.5
yiq_b                     0.5
yiq_o                     0.0
yiq_p                     1.0
yiq_n                     1.0
yiq_y                     6.0
yiq_i                     1.2
yiq_q                     0.6
yiq_scan_time             52.6
yiq_phase_count           2

#
# PER-WINDOW VIDEO OPTIONS
#
screen                    auto
aspect                    auto
resolution                auto
view                      auto
screen0                   auto
aspect0                   auto
resolution0               auto
view0                     auto
screen1                   auto
aspect1                   auto
resolution1               auto
view1                     auto
screen2                   auto
aspect2                   auto
resolution2               auto
view2                     auto
screen3                   auto
aspect3                   auto
resolution3               auto
view3                     auto

#
# FULL SCREEN OPTIONS
#
triplebuffer              0
switchres                 0
full_screen_brightness    1.0
full_screen_contrast      1.0
full_screen_gamma         1.0

#
# WINDOWS SOUND OPTIONS
#
audio_latency             2

#
# INPUT DEVICE OPTIONS
#
dual_lightgun             0


Any ideas?
« Last Edit: April 13, 2014, 04:02:03 am by stigzler »

stigzler

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 977
  • Last login:February 11, 2022, 03:01:48 pm
  • It seemed like a good idea at the time....
    • Mago Arcade
Re: New ControllerRemap utility, 7/11/13 update available (Version 0.0.11)
« Reply #147 on: September 15, 2014, 12:31:58 pm »
Just come back to this, and getting stuck at exactly the same place.....

Again, has anyone had any success with this? Just can't get any further....

mmg1design

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 14
  • Last login:July 30, 2016, 03:22:09 pm
  • I want to build my own arcade controls!
    • My Website
Re: New ControllerRemap utility, 7/11/13 update available (Version 0.0.11)
« Reply #148 on: September 15, 2014, 05:29:36 pm »
Just come back to this, and getting stuck at exactly the same place.....

Again, has anyone had any success with this? Just can't get any further....


I ran into this problem a while back. I Can't remember exactly what I did to make it work, but once it worked I couldn't recreate the error again. Try this;

(you have your roms in a different drive, I would put just one rom in the default rom folder to test)


1. Delete the current mame.ini at the root of mame. (backup the file if you have custom settings)

2. Delete the mame.ini in the ini folder (don't have two mame.ini's because that just complicates it)

3. run mame to confirm that it runs without errors and it will load just the default settings. Exit out of mame.

4. create a new mame.ini, "mame.exe -cc"

5. Edit that new mame.ini that is in the root, Add the name of your controller to it.

6. Run mame again and see if it loads your controller


Hope that works.


Instruction Cards for Street fighter games and other fighting genre. Download Here

stigzler

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 977
  • Last login:February 11, 2022, 03:01:48 pm
  • It seemed like a good idea at the time....
    • Mago Arcade
Re: New ControllerRemap utility, 7/11/13 update available (Version 0.0.11)
« Reply #149 on: September 16, 2014, 09:28:54 am »

5. Edit that new mame.ini that is in the root, Add the name of your controller to it.

Hope that works.

thanks mmg1 - nice of someone to take the time to try and help. I'm a bit loathe to go messing with the ini's as have other settings in there that does various things and don't want to loose them!! However - getting nowhere fast with this + may have to give it a go.

However, I don't quite get your point 5 above - when you say add name of controller to it - what do I put where - can't see any section in the ini for this!

I'm wondering whether it's something wrong with the xml format and that's why mame can't load it - the xml is above.

thanks

stigzler

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 977
  • Last login:February 11, 2022, 03:01:48 pm
  • It seemed like a good idea at the time....
    • Mago Arcade
ControllerRemap ABC Guide
« Reply #150 on: September 24, 2014, 09:41:35 pm »
OK - bit the bullet and chased this down to the ground!! Took me a day and a half, but finally licked it! Great application DrVenture!! Soo sweet now set up and MAME's a happy beast with all my USB hot-swapping!

One thing I've gathered is that quite a few people have had difficulties getting their heads around how to set this up. So, I've made a simple A, B, C guide with screenshots and stuff to help anyone out who's approaching this for the first time. Doubled the time it took me, but I'm very much for helping out the next guy. :)

It also contains a script to make testing easier and also some other support files.

You can grab it here:
https://dl.dropboxusercontent.com/u/15144043/ControllerRemapGuide/ControllerRemapGuide.zip

I'm hoping it'll reduce the time to get this up and running from a day and a half to maybe even an hour!

Let me know if any mistakes/improvement needed. :)

« Last Edit: September 25, 2014, 10:24:53 am by stigzler »

drventure

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4152
  • Last login:June 25, 2023, 02:23:57 pm
  • Laser Death Ray Bargain Bin! Make me an offer!
Re: New ControllerRemap utility, 7/11/13 update available (Version 0.0.11)
« Reply #151 on: November 15, 2014, 03:07:41 pm »
Sorry guys, haven't had chance to visit much lately, but I'll try to hit on some questions now.

I was wondering if this utility was necessary if I was planning my cab to NOT have any control unplugged. Everything I put in is staying. Does Windows change my ID's on powering up and down? Thanks!

In my experience, YES. At least with Vista, and win7.

Haven't had a chance to work much with Win8 yet

drventure

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4152
  • Last login:June 25, 2023, 02:23:57 pm
  • Laser Death Ray Bargain Bin! Make me an offer!
Re: New ControllerRemap utility, 7/11/13 update available (Version 0.0.11)
« Reply #152 on: November 15, 2014, 03:10:13 pm »
I've just a quick question on the way this utility works. I have 2 trackballs in my cab which love changing ID so for instance trackball 1 is showing as mouse 4 in mame and on reboot it becomes mouse2. Does this utility simply rebind everything that was mouse 4 to mouse2 and just keeps the mame bindings up to date or does it perform some other kind of trickery where make still sees trackball 1 as mouse 4?

That's pretty much exactly what it does.

You add definitions (Controller aliases, etc) in the config file. Mame ignores it but ControllerRemap uses that to ID what device is what ID, then rewrites the rest of the config file to use the proper IDs for the controls, whatever they are at the point that it was run (it's not dynamic, it doesn't sit and monitor for device swaps or anything like that)

That's why you need to set up so that controllerremap is run right before you start mame.

drventure

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4152
  • Last login:June 25, 2023, 02:23:57 pm
  • Laser Death Ray Bargain Bin! Make me an offer!
Re: New ControllerRemap utility, 7/11/13 update available (Version 0.0.11)
« Reply #153 on: November 15, 2014, 03:29:30 pm »
Thanks Nick, but that didn't work either. :(
I have two ini files - one in root mame directory and the other in the INI folder under root. I changed both to:
Code: [Select]
rompath                   J:\roms
hashpath                  hash
samplepath                samples
artpath                   artwork
ctrlrpath                 C:\Emulators\Mame0149b\ctrlr
inipath                   ini
fontpath                  .
cheatpath                 cheat
crosshairpath             crosshair

Still no joy. :( Any other ideas?


Let's see if I can help any.

First, simple stuff (you've probably already done this but just in case...)
Mame.ini is in the \mame\ini folder

mame.ini contains a ctrlrpath line that should contain ctrlr as the value.

Create a file in ctrlr folder, call it MyController.cfg or somesuch

That's the CFG file that should contain the controllerremap configs, it's XML, and it'll need to be structured properly or mame won't load it (and I believe it fails silently, so you won't +know+ that it didn't load it. Ugh.


Get the CFG all set up and run
controllerremap /remap:{path}MyController.cfg

(I usually set the above up in a bat file called remap.bat, or just R.BAT so I don't have to type the command all the time.

First , If you look at that file, does it look like the INPUT sections got rewritten at all? Make a back up and compare them if you're not sure.
If that part appears to be working right copy and paste the XML file into one of the online XML checkers.

Like this one
http://www.xmlvalidation.com/

If it checks out, move on to the next step.



Ok. Just Saw Stigzler's write up. Very nice.

One thing to point out is that ControllerRemap has NOTHING to do with the mame.ini file.

It doesn't even use the MAME.INI file to locate the CFG file (you need to put the full path on the command line).


Another thing that can be VERY helpful, is to generate the MAP file (Via /save), then use that with the /TESTMAP command.
Check out the map file, it's a pretty straightforward file. Swap some sections around to +simulate+ controllers being unplugged and replugged, save several different MAP files, then use the /TESTMAP:filename command to swap between the maps and see out the INPUT ports are rewritten.

An editor that will automatically reload files when they're changed externally is a HUGE help for this (personally I like RJTextEd as a good free windows editor.

http://www.rj-texted.se/


drventure

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4152
  • Last login:June 25, 2023, 02:23:57 pm
  • Laser Death Ray Bargain Bin! Make me an offer!
Re: New ControllerRemap utility, 7/11/13 update available (Version 0.0.11)
« Reply #154 on: November 15, 2014, 03:33:36 pm »
@stigzler

Glad to see you got it working! I apologize that I wasn't more help earlier.

If you have any suggestions (other than adding a GUI  ;D ) feel free to throw em out there.

I know the app isn't the most user friendly of tools right now. I've been thinking of how I might "nice it up" a bit, but really, getting MAME controls configured right is kind of a tough thing to do, even in the best of circumstances, so I haven't had much luck coming up with improvements (over and above just adding this kind of remap capability to MAME directly, which I've seriously contemplated, but just don't have the time right now.)

Any hardcore C devs that want to take that on, I'd definitely throw in with, though!


drventure

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4152
  • Last login:June 25, 2023, 02:23:57 pm
  • Laser Death Ray Bargain Bin! Make me an offer!
Re: New ControllerRemap utility, 7/11/13 update available (Version 0.0.11)
« Reply #155 on: November 15, 2014, 03:38:07 pm »
@stigzler

Damn, nice job on that guide!

Would you mind if I included it in the ControllerRemap Zip?

Of course, I'd leave it as is with full attribution. I'm just thinking it might help people out to get two distinct views on the process.

Thanks again for writing that up!

stigzler

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 977
  • Last login:February 11, 2022, 03:01:48 pm
  • It seemed like a good idea at the time....
    • Mago Arcade
Re: New ControllerRemap utility, 7/11/13 update available (Version 0.0.11)
« Reply #156 on: November 15, 2014, 04:08:31 pm »
No worries and feel free to include. :)

Thanks for a good app.  :applaud:

bsong

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19
  • Last login:September 27, 2018, 06:28:53 pm
  • I want to build my own arcade controls!
Re: New ControllerRemap utility, 7/11/13 update available (Version 0.0.11)
« Reply #157 on: November 20, 2014, 02:36:15 pm »
Great utility you have here if i could get it to work ... its been driving me up the walls.  First off when i test it using the utility it remaps everything correctly, when i launch MAME it seems like nothing is getting remapped I have a smilier setup to WADE007,

also when i launch hyperspin and i press the start button all the keys go blank as if nothing got assigned at all

can someone please help?

drventure

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4152
  • Last login:June 25, 2023, 02:23:57 pm
  • Laser Death Ray Bargain Bin! Make me an offer!
Re: New ControllerRemap utility, 7/11/13 update available (Version 0.0.11)
« Reply #158 on: November 20, 2014, 02:53:13 pm »
Sorry you're having troubles. Let's take a look at a few things

also when i launch hyperspin and i press the start button all the keys go blank as if nothing got assigned at all

This one's likely the easiest, you'll need a <controller id='keyboard' section in <system name="default">, or no keys will be mapped. This is because ControllerRemap doesn't "merge" mappings into the configuration, it clears and then rewrites the entire <system><input> section and that's the only section that MAME reads when loading the configuration up.


First off when i test it using the utility it remaps everything correctly, when i launch MAME it seems like nothing is getting remapped I have a smilier setup to WADE007,

if it's working when you test it, but not when you actually launch mame, there's only a couple likely issues.

1) you're not launching mame with the -ctrlr YourFile.cfg option. If you don't, mame won't know to load your customized controller CFG file. if the CFG file is updated, but just doesn't contain any KEYMAPS, then this is likely the problem.

2) the way you're executing ControllerRemap is causing the remapped CFG file to be written to the wrong location. Normally, controller files are CFG files that should live in \Mame\ctrlr. A bit unlikely, esp if you have the CFG files inthe ctrlr dir, but it's worth mentioning.

3) the only other possibility I can think of is that you might not have however you're launching mame set up right to properly invoke ControllerRemap before launching mame, so the CFG file isn't getting updated at all. One clue here would be that the CFG file doesn't have an updated timestamp after you launch and quite mame. It should ALWAYS get updated by ControllerRemap if it's being run.

4) The only other possibility is that there's some kind of XML formatting issue with the CFG file that's preventing Mame from loading it. A bit unlikely, since usually ControllerRemap will also barf on the file, but it's possible.

Let me know if any of that doesn't make sense

bsong

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19
  • Last login:September 27, 2018, 06:28:53 pm
  • I want to build my own arcade controls!
Re: New ControllerRemap utility, 7/11/13 update available (Version 0.0.11)
« Reply #159 on: November 20, 2014, 09:14:14 pm »
still not working there are no other files in the ctrlr folder besides my own config file


Code: [Select]
<!--
Configuration Remap file
-->
<mameconfig version="10">
  <!--
    ############################################################
    Define controller aliases, This just makes the controller names
    a little easier to deal with for the rest of the file.
    ############################################################
    -->
  <controlleralias>
    <id>ATRAK Device #1 ID = 0</id>
    <alias>"Lightgun_Player1_joystickbuttons"</alias>
  </controlleralias>
  <controlleralias>
    <id>ATRAK Device #2 ID = 1</id>
    <alias>"Lightgun_Player2_joystickbuttons"</alias>
  </controlleralias>
  <controlleralias>
    <id>HID#VID_D209_PID_1601_MI_02#9_375eebb1_0_0000#</id>
    <alias>Lightgun_Player1</alias>
  </controlleralias>
  <controlleralias>
    <id>HID#VID_D209_PID_1602_MI_02#9_2f312172_0_0000#</id>
    <alias>Lightgun_Player2</alias>
  </controlleralias>
  <!--
    ############################################################
    This is the System Default section
    It generally should be the FIRST system section in the cfg file
    ############################################################
    -->
  <system name="default">
    <controller id="keyboard">
      <input>
        <port type="UI_UP">
          <newseq type="standard">KEYCODE_UP OR KEYCODE_8_PAD</newseq>
        </port>
        <port type="UI_DOWN">
          <newseq type="standard">KEYCODE_DOWN OR KEYCODE_2_PAD</newseq>
        </port>
        <port type="UI_LEFT">
          <newseq type="standard">KEYCODE_LEFT OR KEYCODE_4_PAD</newseq>
        </port>
        <port type="UI_RIGHT">
          <newseq type="standard">KEYCODE_RIGHT OR KEYCODE_6_PAD</newseq>
        </port>
        <port type="UI_SELECT">
          <newseq type="standard">KEYCODE_ENTER OR KEYCODE_LCONTROL</newseq>
        </port>
        <port type="UI_CONFIGURE">
          <newseq type="standard">KEYCODE_TAB</newseq>`0
        </port>
        <port type="UI_CANCEL">
          <newseq type="standard">KEYCODE_ESC</newseq>
        </port>
        <port type="START1">
          <newseq type="standard">KEYCODE_1</newseq>
        </port>
        <port type="START2">
          <newseq type="standard">KEYCODE_2</newseq>
        </port>
        <port type="COIN1">
          <newseq type="standard">KEYCODE_5</newseq>
        </port>
        <port type="COIN2">
          <newseq type="standard">KEYCODE_6</newseq>
        </port>
        <port type="P1_JOYSTICK_UP">
          <newseq type="standard">
                    KEYCODE_8PAD
                </newseq>
        </port>
        <port type="P1_JOYSTICK_DOWN">
          <newseq type="standard">
                    KEYCODE_2PAD
                </newseq>
        </port>
        <port type="P1_JOYSTICK_LEFT">
          <newseq type="standard">
                    KEYCODE_4PAD
                </newseq>
        </port>
        <port type="P1_JOYSTICK_RIGHT">
          <newseq type="standard">
                    KEYCODE_6PAD
                </newseq>
        </port>
        <port type="P2_JOYSTICK_UP">
          <newseq type="standard">
                    KEYCODE_UP
                </newseq>
        </port>
        <port type="P2_JOYSTICK_DOWN">
          <newseq type="standard">
                    KEYCODE_DOWN
                </newseq>
        </port>
        <port type="P2_JOYSTICK_LEFT">
          <newseq type="standard">
                    KEYCODE_LEFT
                </newseq>
        </port>
        <port type="P2_JOYSTICK_RIGHT">
          <newseq type="standard">
                    KEYCODE_RIGHT
                </newseq>
        </port>
        <port type="P1_BUTTON1">
          <newseq type="standard">
                    KEYCODE_Q
                </newseq>
        </port>
        <port type="P1_BUTTON2">
          <newseq type="standard">
                    KEYCODE_W
                </newseq>
        </port>
        <port type="P1_BUTTON3">
          <newseq type="standard">
                    KEYCODE_E
                </newseq>
        </port>
        <port type="P1_BUTTON4">
          <newseq type="standard">
                    KEYCODE_R
                </newseq>
        </port>
        <port type="P1_BUTTON5">
          <newseq type="standard">
                    KEYCODE_T
                </newseq>
        </port>
        <port type="P1_BUTTON6">
          <newseq type="standard">
                    KEYCODE_Y
                </newseq>
        </port>
        <port type="P2_BUTTON1">
          <newseq type="standard">
                    KEYCODE_A
                </newseq>
        </port>
        <port type="P2_BUTTON2">
          <newseq type="standard">
                    KEYCODE_S
                </newseq>
        </port>
        <port type="P2_BUTTON3">
          <newseq type="standard">
                    KEYCODE_D
                </newseq>
        </port>
        <port type="P2_BUTTON4">
          <newseq type="standard">
                    KEYCODE_F         
                </newseq>
        </port>
        <port type="P2_BUTTON5">
          <newseq type="standard">
                    KEYCODE_G         
                </newseq>
        </port>
        <port type="P2_BUTTON6">
          <newseq type="standard">
                    KEYCODE_H 
                </newseq>
        </port>
      </input>
    </controller>
    <controller id="Lightgun_Player1">
      <input>
        <port type="P1_BUTTON1">
          <newseq type="standard">
                        GUNCODE_BUTTON1
                    </newseq>
        </port>
        <port type="P1_LIGHTGUN_X">
          <newseq type="standard">
                        GUNCODE_XAXIS
                    </newseq>
        </port>
        <port type="P1_LIGHTGUN_Y">
          <newseq type="standard">
                        GUNCODE_YAXIS
                    </newseq>
        </port>
        <port type="P1_AD_STICK_X">
          <newseq type="standard">
                    GUNCODE_XAXIS
                </newseq>
        </port>
        <port type="P1_AD_STICK_Y">
          <newseq type="standard">
                    GUNCODE_YAXIS
                </newseq>
        </port>
      </input>
    </controller>
    <controller id="Lightgun_Player2">
      <input>
        <port type="P2_BUTTON1">
          <newseq type="standard">
                        GUNCODE_BUTTON1
                    </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_X">
          <newseq type="standard">
                    GUNCODE_XAXIS
                </newseq>
        </port>
        <port type="P2_AD_STICK_Y">
          <newseq type="standard">
                    GUNCODE_YAXIS
                </newseq>
        </port>
      </input>
    </controller>
    <!--
        ###################################################
        ACTUAL INPUT MAPPING STARTS HERE
        DO NOT actually put anything in this section.
        It is completely cleared and regenerated!
        ###################################################
        -->
    <input>
      <port type="UI_UP">
        <newseq type="standard">KEYCODE_UP OR KEYCODE_8_PAD</newseq>
      </port>
      <port type="UI_DOWN">
        <newseq type="standard">KEYCODE_DOWN OR KEYCODE_2_PAD</newseq>
      </port>
      <port type="UI_LEFT">
        <newseq type="standard">KEYCODE_LEFT OR KEYCODE_4_PAD</newseq>
      </port>
      <port type="UI_RIGHT">
        <newseq type="standard">KEYCODE_RIGHT OR KEYCODE_6_PAD</newseq>
      </port>
      <port type="UI_SELECT">
        <newseq type="standard">KEYCODE_ENTER OR KEYCODE_LCONTROL</newseq>
      </port>
      <port type="UI_CONFIGURE">
        <newseq type="standard">KEYCODE_TAB</newseq>
      </port>
      <port type="UI_CANCEL">
        <newseq type="standard">KEYCODE_ESC</newseq>
      </port>
      <port type="START1">
        <newseq type="standard">KEYCODE_1</newseq>
      </port>
      <port type="START2">
        <newseq type="standard">KEYCODE_2</newseq>
      </port>
      <port type="COIN1">
        <newseq type="standard">KEYCODE_5</newseq>
      </port>
      <port type="COIN2">
        <newseq type="standard">KEYCODE_6</newseq>
      </port>
      <port type="P1_JOYSTICK_UP">
        <newseq type="standard">
                    KEYCODE_8PAD
                </newseq>
      </port>
      <port type="P1_JOYSTICK_DOWN">
        <newseq type="standard">
                    KEYCODE_2PAD
                </newseq>
      </port>
      <port type="P1_JOYSTICK_LEFT">
        <newseq type="standard">
                    KEYCODE_4PAD
                </newseq>
      </port>
      <port type="P1_JOYSTICK_RIGHT">
        <newseq type="standard">
                    KEYCODE_6PAD
                </newseq>
      </port>
      <port type="P2_JOYSTICK_UP">
        <newseq type="standard">
                    KEYCODE_UP
                </newseq>
      </port>
      <port type="P2_JOYSTICK_DOWN">
        <newseq type="standard">
                    KEYCODE_DOWN
                </newseq>
      </port>
      <port type="P2_JOYSTICK_LEFT">
        <newseq type="standard">
                    KEYCODE_LEFT
                </newseq>
      </port>
      <port type="P2_JOYSTICK_RIGHT">
        <newseq type="standard">
                    KEYCODE_RIGHT
                </newseq>
      </port>
      <port type="P1_BUTTON1">
        <newseq type="standard">
                    KEYCODE_Q
                 OR
                        GUNCODE_3_BUTTON1
                    </newseq>
      </port>
      <port type="P1_BUTTON2">
        <newseq type="standard">
                    KEYCODE_W
                </newseq>
      </port>
      <port type="P1_BUTTON3">
        <newseq type="standard">
                    KEYCODE_E
                </newseq>
      </port>
      <port type="P1_BUTTON4">
        <newseq type="standard">
                    KEYCODE_R
                </newseq>
      </port>
      <port type="P1_BUTTON5">
        <newseq type="standard">
                    KEYCODE_T
                </newseq>
      </port>
      <port type="P1_BUTTON6">
        <newseq type="standard">
                    KEYCODE_Y
                </newseq>
      </port>
      <port type="P2_BUTTON1">
        <newseq type="standard">
                    KEYCODE_A
                 OR
                        GUNCODE_2_BUTTON1
                    </newseq>
      </port>
      <port type="P2_BUTTON2">
        <newseq type="standard">
                    KEYCODE_S
                </newseq>
      </port>
      <port type="P2_BUTTON3">
        <newseq type="standard">
                    KEYCODE_D
                </newseq>
      </port>
      <port type="P2_BUTTON4">
        <newseq type="standard">
                    KEYCODE_F         
                </newseq>
      </port>
      <port type="P2_BUTTON5">
        <newseq type="standard">
                    KEYCODE_G         
                </newseq>
      </port>
      <port type="P2_BUTTON6">
        <newseq type="standard">
                    KEYCODE_H 
                </newseq>
      </port>
      <port type="P1_LIGHTGUN_X">
        <newseq type="standard">
                        GUNCODE_3_XAXIS
                    </newseq>
      </port>
      <port type="P1_LIGHTGUN_Y">
        <newseq type="standard">
                        GUNCODE_3_YAXIS
                    </newseq>
      </port>
      <port type="P1_AD_STICK_X">
        <newseq type="standard">
                    GUNCODE_3_XAXIS
                </newseq>
      </port>
      <port type="P1_AD_STICK_Y">
        <newseq type="standard">
                    GUNCODE_3_YAXIS
                </newseq>
      </port>
      <port type="P2_LIGHTGUN_X">
        <newseq type="standard">
                        GUNCODE_2_XAXIS
                    </newseq>
      </port>
      <port type="P2_LIGHTGUN_Y">
        <newseq type="standard">
                        GUNCODE_2_YAXIS
                    </newseq>
      </port>
      <port type="P2_AD_STICK_X">
        <newseq type="standard">
                    GUNCODE_2_XAXIS
                </newseq>
      </port>
      <port type="P2_AD_STICK_Y">
        <newseq type="standard">
                    GUNCODE_2_YAXIS
                </newseq>
      </port>
    </input>
  </system>
  <!--
    ###################################################
    This is a GAME specific section
    Add additional <controller> sections here
    to define how those controllers should map for this
    particular game
    ###################################################
        -->
  <input></input>
</mameconfig>

I also notice when i don't run controller remap in my hyperpsin setup everything runs fine
« Last Edit: November 21, 2014, 12:53:51 pm by bsong »