Hope this helps. I had trouble understanding it at first, but once I got it,. it hasn't failed on me yet.
I saved this in my CFG folder, made sure Mame directory was pointed to the cfg folder, and type in this to start Mame in a command window
mame64 -ctrlr <filename of cfg>
To make it work with RocketLauncher, easy enough. In the MAME Modules Tab, Global Module Settings, Mame Tab, add the -ctrlr <filename>
in the Parameters section.
<?xml version="1.0"?>
<!-- This file is autogenerated; comments and unknown tags will be stripped -->
<mameconfig version="10">
<system name="default">
<input>
<!--Steering Wheel-->
<mapdevice device="FGT Rumble 3-in-1 product_b655044f-0000-0000-0000-504944564944 instance_6842f6c0-0aa8-11e4-8001-444553540000" controller="JOYCODE_1" />
<!--U360 P1-->
<mapdevice device="Ultimarc Ultra-Stik Player 1 product_0511d209-0000-0000-0000-504944564944 instance_f9ab30c0-0eba-11e5-8001-444553540000" controller="JOYCODE_2" />
<!--U360 P2-->
<mapdevice device="Ultimarc Ultra-Stik Player 2 product_0512d209-0000-0000-0000-504944564944 instance_baff0a80-21b2-11e5-8001-444553540000" controller="JOYCODE_3" />
<!--U360 P3-->
<mapdevice device="Ultimarc Ultra-Stik Player 3 product_0513d209-0000-0000-0000-504944564944 instance_23801d20-0ebb-11e5-8001-444553540000" controller="JOYCODE_4" />
<!--U360 P4-->
<mapdevice device="Ultimarc Ultra-Stik Player 4 product_0514d209-0000-0000-0000-504944564944 instance_6d89e5f0-21b1-11e5-8001-444553540000" controller="JOYCODE_5" />
<!--Aimtrak 1-->
<mapdevice device="ATRAK Device #1 product_1601d209-0000-0000-0000-504944564944 instance_d656eff0-0921-11e4-8002-444553540000" controller="GUNCODE_9" />
<!--Aimtrak 2-->
<mapdevice device="ATRAK Device #2 product_1602d209-0000-0000-0000-504944564944 instance_effc7d00-08fc-11e4-8002-444553540000" controller="GUNCODE_10" />
<!--Spinner-->
<mapdevice device="HID#VID_FAFA&PID_0060" controller="MOUSECODE_11" />
<!--Trackball-->
<mapdevice device="HID#VID_D209&PID_15A1" controller="MOUSECODE_8" />
<!--PLAYER ONE CONTROLS-->
<port type="P1_JOYSTICK_UP">
<newseq type="standard">
JOYCODE_2_YAXIS_UP_SWITCH
</newseq>
</port>
<port type="P1_JOYSTICK_DOWN">
<newseq type="standard">
JOYCODE_2_YAXIS_DOWN_SWITCH
</newseq>
</port>
<port type="P1_JOYSTICK_LEFT">
<newseq type="standard">
JOYCODE_2_XAXIS_LEFT_SWITCH
</newseq>
</port>
<port type="P1_JOYSTICK_RIGHT">
<newseq type="standard">
JOYCODE_2_XAXIS_RIGHT_SWITCH
</newseq>
</port>
<port type="P1_JOYSTICKRIGHT_UP">
<newseq type="standard">
JOYCODE_2_YAXIS_UP_SWITCH
</newseq>
</port>
<port type="P1_JOYSTICKRIGHT_DOWN">
<newseq type="standard">
JOYCODE_2_YAXIS_DOWN_SWITCH
</newseq>
</port>
<port type="P1_JOYSTICKRIGHT_LEFT">
<newseq type="standard">
JOYCODE_2_XAXIS_LEFT_SWITCH
</newseq>
</port>
<port type="P1_JOYSTICKRIGHT_RIGHT">
<newseq type="standard">
JOYCODE_2_XAXIS_RIGHT_SWITCH
</newseq>
</port>
<port type="P1_JOYSTICKLEFT_UP">
<newseq type="standard">
JOYCODE_4_YAXIS_UP_SWITCH
</newseq>
</port>
<port type="P1_JOYSTICKLEFT_DOWN">
<newseq type="standard">
JOYCODE_4_YAXIS_DOWN_SWITCH
</newseq>
</port>
<port type="P1_JOYSTICKLEFT_LEFT">
<newseq type="standard">
JOYCODE_4_XAXIS_LEFT_SWITCH
</newseq>
</port>
<port type="P1_JOYSTICKLEFT_RIGHT">
<newseq type="standard">
JOYCODE_4_XAXIS_RIGHT_SWITCH
</newseq>
</port>
<port type="P1_BUTTON1">
<newseq type="standard">
GUNCODE_9_BUTTON1 OR KEYCODE_A
</newseq>
</port>
<port type="P1_BUTTON2">
<newseq type="standard">
GUNCODE_9_BUTTON3 OR KEYCODE_B
</newseq>
</port>
<port type="P1_BUTTON3">
<newseq type="standard">
KEYCODE_C
</newseq>
</port>
<port type="P1_BUTTON4">
<newseq type="standard">
KEYCODE_D
</newseq>
</port>
<port type="P1_BUTTON5">
<newseq type="standard">
KEYCODE_E
</newseq>
</port>
<port type="P1_BUTTON6">
<newseq type="standard">
KEYCODE_F
</newseq>
</port>
<port type="P1_PEDAL">
<newseq type="standard">
JOYCODE_1_YAXIS
</newseq>
</port>
<port type="P1_PEDAL2">
<newseq type="standard">
JOYCODE_1_ZAXIS
</newseq>
</port>
<port type="P1_PADDLE">
<newseq type="standard">
JOYCODE_1_XAXIS
</newseq>
<newseq type="increment">
JOYCODE_1_XAXIS_RIGHT_SWITCH
</newseq>
<newseq type="decrement">
JOYCODE_1_XAXIS_LEFT_SWITCH
</newseq>
</port>
<port type="P1_DIAL">
<newseq type="standard">
MOUSECODE_11_XAXIS
</newseq>
</port>
<port type="P1_TRACKBALL_X">
<newseq type="standard">
MOUSECODE_8_XAXIS
</newseq>
</port>
<port type="P1_TRACKBALL_Y">
<newseq type="standard">
MOUSECODE_8_YAXIS
</newseq>
</port>
<port type="P1_AD_STICK_X">
<newseq type="standard">
GUNCODE_9_XAXIS OR JOYCODE_2_XAXIS
</newseq>
</port>
<port type="P1_AD_STICK_Y">
<newseq type="standard">
JOYCODE_2_YAXIS OR GUNCODE_9_YAXIS
</newseq>
</port>
<port type="P1_LIGHTGUN_X">
<newseq type="standard">
GUNCODE_9_XAXIS
</newseq>
</port>
<port type="P1_LIGHTGUN_Y">
<newseq type="standard">
GUNCODE_9_YAXIS
</newseq>
</port>
<!--PLAYER TWO CONTROLS-->
<port type="P2_JOYSTICK_UP">
<newseq type="standard">
JOYCODE_3_YAXIS_UP_SWITCH
</newseq>
</port>
<port type="P2_JOYSTICK_DOWN">
<newseq type="standard">
JOYCODE_3_YAXIS_DOWN_SWITCH
</newseq>
</port>
<port type="P2_JOYSTICK_LEFT">
<newseq type="standard">
JOYCODE_3_XAXIS_LEFT_SWITCH
</newseq>
</port>
<port type="P2_JOYSTICK_RIGHT">
<newseq type="standard">
JOYCODE_3_XAXIS_RIGHT_SWITCH
</newseq>
</port>
<port type="P2_JOYSTICKRIGHT_UP">
<newseq type="standard">
JOYCODE_5_YAXIS_UP_SWITCH
</newseq>
</port>
<port type="P2_JOYSTICKRIGHT_DOWN">
<newseq type="standard">
JOYCODE_5_YAXIS_DOWN_SWITCH
</newseq>
</port>
<port type="P2_JOYSTICKRIGHT_LEFT">
<newseq type="standard">
JOYCODE_5_XAXIS_LEFT_SWITCH
</newseq>
</port>
<port type="P2_JOYSTICKRIGHT_RIGHT">
<newseq type="standard">
JOYCODE_5_XAXIS_RIGHT_SWITCH
</newseq>
</port>
<port type="P2_JOYSTICKLEFT_UP">
<newseq type="standard">
JOYCODE_3_YAXIS_UP_SWITCH
</newseq>
</port>
<port type="P2_JOYSTICKLEFT_DOWN">
<newseq type="standard">
JOYCODE_3_YAXIS_DOWN_SWITCH
</newseq>
</port>
<port type="P2_JOYSTICKLEFT_LEFT">
<newseq type="standard">
JOYCODE_3_XAXIS_LEFT_SWITCH
</newseq>
</port>
<port type="P2_JOYSTICKLEFT_RIGHT">
<newseq type="standard">
JOYCODE_3_XAXIS_RIGHT_SWITCH
</newseq>
</port>
<port type="P2_BUTTON1">
<newseq type="standard">
GUNCODE_10_BUTTON1 OR KEYCODE_G
</newseq>
</port>
<port type="P2_BUTTON2">
<newseq type="standard">
KEYCODE_H OR GUNCODE_10_BUTTON3
</newseq>
</port>
<port type="P2_BUTTON3">
<newseq type="standard">
KEYCODE_I
</newseq>
</port>
<port type="P2_BUTTON4">
<newseq type="standard">
KEYCODE_J
</newseq>
</port>
<port type="P2_BUTTON5">
<newseq type="standard">
KEYCODE_K
</newseq>
</port>
<port type="P2_BUTTON6">
<newseq type="standard">
KEYCODE_L
</newseq>
</port>
<port type="P3_JOYSTICK_UP">
<newseq type="standard">
JOYCODE_4_YAXIS_UP_SWITCH
</newseq>
</port>
<port type="P3_JOYSTICK_DOWN">
<newseq type="standard">
JOYCODE_4_YAXIS_DOWN_SWITCH
</newseq>
</port>
<port type="P3_JOYSTICK_LEFT">
<newseq type="standard">
JOYCODE_4_XAXIS_LEFT_SWITCH
</newseq>
</port>
<port type="P3_JOYSTICK_RIGHT">
<newseq type="standard">
JOYCODE_4_XAXIS_RIGHT_SWITCH
</newseq>
</port>
<port type="P3_BUTTON1">
<newseq type="standard">
KEYCODE_M
</newseq>
</port>
<port type="P3_BUTTON2">
<newseq type="standard">
KEYCODE_N
</newseq>
</port>
<port type="P3_BUTTON3">
<newseq type="standard">
KEYCODE_O
</newseq>
</port>
<port type="P3_BUTTON4">
<newseq type="standard">
KEYCODE_Q
</newseq>
</port>
<port type="P4_JOYSTICK_UP">
<newseq type="standard">
JOYCODE_5_YAXIS_UP_SWITCH
</newseq>
</port>
<port type="P4_JOYSTICK_DOWN">
<newseq type="standard">
JOYCODE_5_YAXIS_DOWN_SWITCH
</newseq>
</port>
<port type="P4_JOYSTICK_LEFT">
<newseq type="standard">
JOYCODE_5_XAXIS_LEFT_SWITCH
</newseq>
</port>
<port type="P4_JOYSTICK_RIGHT">
<newseq type="standard">
JOYCODE_5_XAXIS_RIGHT_SWITCH
</newseq>
</port>
<port type="P4_BUTTON1">
<newseq type="standard">
KEYCODE_R
</newseq>
</port>
<port type="P4_BUTTON2">
<newseq type="standard">
KEYCODE_S
</newseq>
</port>
<port type="P4_BUTTON3">
<newseq type="standard">
KEYCODE_T
</newseq>
</port>
<port type="P4_BUTTON4">
<newseq type="standard">
KEYCODE_U
</newseq>
</port>
<port type="P2_DIAL">
<newseq type="standard">
MOUSECODE_11_XAXIS
</newseq>
<newseq type="increment">
NONE
</newseq>
<newseq type="decrement">
NONE
</newseq>
</port>
<port type="P3_DIAL">
<newseq type="standard">
MOUSECODE_6_XAXIS
</newseq>
</port>
<port type="P4_DIAL">
<newseq type="standard">
MOUSECODE_7_XAXIS
</newseq>
</port>
<port type="P2_TRACKBALL_X">
<newseq type="standard">
MOUSECODE_8_XAXIS
</newseq>
<newseq type="increment">
NONE
</newseq>
<newseq type="decrement">
NONE
</newseq>
</port>
<port type="P2_TRACKBALL_Y">
<newseq type="standard">
MOUSECODE_8_YAXIS
</newseq>
<newseq type="increment">
NONE
</newseq>
<newseq type="decrement">
NONE
</newseq>
</port>
<port type="P2_AD_STICK_X">
<newseq type="standard">
GUNCODE_10_XAXIS OR JOYCODE_3_XAXIS
</newseq>
<newseq type="increment">
NONE
</newseq>
<newseq type="decrement">
NONE
</newseq>
</port>
<port type="P2_AD_STICK_Y">
<newseq type="standard">
GUNCODE_10_YAXIS OR JOYCODE_3_YAXIS
</newseq>
<newseq type="increment">
NONE
</newseq>
<newseq type="decrement">
NONE
</newseq>
</port>
<port type="P2_LIGHTGUN_X">
<newseq type="standard">
GUNCODE_10_XAXIS
</newseq>
</port>
<port type="P2_LIGHTGUN_Y">
<newseq type="standard">
GUNCODE_10_YAXIS
</newseq>
</port>
<port type="UI_UP">
<newseq type="standard">
KEYCODE_UP
</newseq>
</port>
<port type="UI_DOWN">
<newseq type="standard">
KEYCODE_DOWN
</newseq>
</port>
<port type="UI_LEFT">
<newseq type="standard">
KEYCODE_LEFT
</newseq>
</port>
<port type="UI_RIGHT">
<newseq type="standard">
KEYCODE_RIGHT
</newseq>
</port>
<port type="UI_SELECT">
<newseq type="standard">
KEYCODE_ENTER
</newseq>
</port>
</input>
</system>
</mameconfig>