Posts: 1
Joined: Sun Jul 17, 2016 6:17 pm

I can't seem to map certain ports to a custom configuration file.

I have a custom controller file I use to map buttons and keys for MAME. It works great except for one recent addition. I'm trying to add Space Wars to my configuration but it's not behaving how I expect it to. Here's the entry.

<system name="spacewar">
<port type="P1_JOYSTICK_LEFT">
<newseq type="standard">KEYCODE_LEFT OR JOYCODE_1_XAXIS_LEFT_SWITCH</newseq>
<port type="P1_JOYSTICK_RIGHT">
<newseq type="standard">KEYCODE_RIGHT OR JOYCODE_1_XAXIS_RIGHT_SWITCH</newseq>
<port type="P1_BUTTON1"> <!-- Fire -->
<newseq type="standard">KEYCODE_LCONTROL OR JOYCODE_1_BUTTON1</newseq>
<port type="P1_BUTTON2"> <!-- Forward -->
<newseq type="standard">KEYCODE_LALT OR JOYCODE_1_BUTTON2</newseq>
<port type="P1_BUTTON3"> <!-- Hyperspace -->
<newseq type="standard">KEYCODE_SPACE OR JOYCODE_1_BUTTON3</newseq>
<port type="P2_JOYSTICK_LEFT">
<newseq type="standard">KEYCODE_D OR JOYCODE_2_XAXIS_LEFT_SWITCH</newseq>
<port type="P2_JOYSTICK_RIGHT">
<newseq type="standard">KEYCODE_G OR JOYCODE_2_XAXIS_RIGHT_SWITCH</newseq>
<port type="P2_BUTTON1"> <!-- Fire -->
<newseq type="standard">KEYCODE_A OR JOYCODE_2_BUTTON1</newseq>
<port type="P2_BUTTON2"> <!-- Forward -->
<newseq type="standard">KEYCODE_N OR JOYCODE_2_BUTTON2</newseq>
<port type="P2_BUTTON3"> <!-- Hyperspace -->
<newseq type="standard">KEYCODE_Q OR JOYCODE_2_BUTTON3</newseq>
<port type="OTHER" mask="2048" defvalue="2048"> <!-- Option 0 -->
<newseq type="standard">KEYCODE_Q</newseq>
<port type="OTHER" mask="16" defvalue="16"> <!-- Option 1 -->
<newseq type="standard">KEYCODE_W</newseq>
<port type="OTHER" mask="64" defvalue="64"> <!-- Option 2 -->
<newseq type="standard">KEYCODE_E</newseq>
<port type="OTHER" mask="1" defvalue="1"> <!-- Option 3 -->
<newseq type="standard">KEYCODE_R</newseq>
<port type="OTHER" mask="4" defvalue="4"> <!-- Option 4 -->
<newseq type="standard">KEYCODE_T</newseq>
<port type="OTHER" mask="1024" defvalue="1024"> <!-- Option 5 -->
<newseq type="standard">KEYCODE_Y</newseq>
<port type="OTHER" mask="32" defvalue="32"> <!-- Option 6 -->
<newseq type="standard">KEYCODE_U</newseq>
<port type="OTHER" mask="128" defvalue="128"> <!-- Option 7 -->
<newseq type="standard">KEYCODE_I</newseq>
<port type="OTHER" mask="2" defvalue="2"> <!-- Option 8 -->
<newseq type="standard">KEYCODE_O</newseq>
<port type="OTHER" mask="8" defvalue="8"> <!-- Option 9 -->
<newseq type="standard">KEYCODE_P</newseq>

The joysticks and buttons map correctly. It's the "options" that aren't working. When I launch the game they are all set to their MAME default values even though they're specified differently here. Even more confusing is if I remove this from my custom controller and past it into the spacewar.cfg file MAME creates it works perfectly. I know it's reading the entry from my configuration file because if I set different settings for the joysticks or buttons there they will override what I paste into the spacewar.cfg file.

Any input? (Pun intended)

Return to “MAME Discussion”