Configuring per-game MAME buttons on nvidia shield controller

I am having issues understanding how controller input configuration should be done.

My goal is to map different buttons on my controller for a single MAME game. I would like to use trigger 1 and 2 for button 1 and 2

It seems that whenever a controller is detected, it resets the current configuration by rereading the autoconf files. I can change some mappings in the settings -> input menu, but if I leave the shield controller for a few minutes, when I pick it up again (or press a button), the controls are reset to defaults again. Similarly, if I am using the shield gamepad, and pick up the shield remote, controller#0 is remapped to the remote and when controller#0 switches back to the gamepad (if I leave the remote alone) all customisations are lost.

Also, There are no per-game controller remapping options in the game menu for MAME. Is this to be expected?

While you have the game loaded, go back into the quick menu and go to the ‘controls’ submenu. From here, you can move the core’s buttons around on the retropad. Once it’s set up how you want it, save the per-game remap from that same menu and it should load it up any time the game is loaded.

In the game’s controls menu, I don’t seem to have any specific option for remapping the inputs

The menu consists of:

  • User 1 Device Type (Retropad/Retropad w analog/None)
  • User 1 Analog to Digital Type
  • User 2 Device Type (Retropad/Retropad w analog/None)
  • User 2 Analog to Digital Type
  • User 3 Device Type (Retropad/Retropad w analog/None)
  • User 3 Analog to Digital Type
  • User 4 Device Type (Retropad/Retropad w analog/None)
  • User 4 Analog to Digital Type
  • User 5 Device Type (Retropad/Retropad w analog/None)
  • User 5 Analog to Digital Type
  • Load core remap file
  • Save core remap file
  • Save game remap file

If there’s no support for remapping, you can try creating a ‘mame’ subdirectory in your ‘system’ directory and then use the MAME OSD to save a per-game button change, just like you would in the standalone program.