Main > Software Forum

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

<< < (32/47) > >>

drventure:
@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:
No worries and feel free to include. :)

Thanks for a good app.  :applaud:

bsong:
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:
Sorry you're having troubles. Let's take a look at a few things


--- Quote from: bsong on November 20, 2014, 02:36:15 pm ---also when i launch hyperspin and i press the start button all the keys go blank as if nothing got assigned at all

--- End quote ---

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.



--- Quote from: bsong on November 20, 2014, 02:36:15 pm ---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,

--- End quote ---

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:
still not working there are no other files in the ctrlr folder besides my own config file



--- Code: ---<!--
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>
--- End code ---

I also notice when i don't run controller remap in my hyperpsin setup everything runs fine

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version