Feature Request for Mame: The ability to set multiple controller configs that load depending on the button setup the loaded game uses.

Issue #6696 open
Fugus created an issue

Mame stores the button layout in MAME 0.240\cfg\default.cfg

Request that Launchbox allows you to set multiple controller layouts depending on the game and just replace that file with the appropriate cfg file based on the layout of the game it’s loading.

That way players don’t have to reconfigure their inputs when they transition from a 4 button game to a 6 button game and so on. Looked for the option to setup multiple configurations in mame and it isn’t there, unless I just missed it.

Comments (15)

  1. Retro808

    Unless I am misunderstanding what you are asking Mame already has functions that allows you to set game specific controls. The machine specific controls are used when that game is loaded and overrides the general controls mapping.

    When in a game hit “Tab” key. You can now set inputs for that game. The config file will be saved in the /cfg folder within Mame in the name of the rom. Example if you made a machine specific map for Mortal Kombat the mk.cfg file will be saved and that automatically gets loaded when you launch Mortal Kombat.

    If this is not what you are looking for let me know and I will reopen the ticket.

  2. Fugus reporter

    No sir, I understand that they have the ability to set new configuration files on a per machine basis. That wasn’t what I was talking about.

    With a library that can span thousands of games, that would be a lot to try and redo the layouts for every machine, especially if you don’t know exactly what the layout is when you are toying with stuff you have never played.

    What I am talking about is for you to be able to setup maybe 3 configuration files for controls in launchbox, a configuration for 2 button games, a configuration for 3 to 4 button games, and a configuration for 5-6 button games. Then, when you load a game up, it detects how many buttons it has and then swaps out that config file with one meant for the appropriate controller scheme.

    That way a person wouldn’t need to make a million controller config files, one for every new game they play that isn’t the same number of buttons as their default. Thought about this going from Tekken to Street Fighter to Virtua Fighter (This one ran like crap on my PC) and each one of them had to have a completely different setup, then multiply that across 1,000+ games.

    Thank you for your time.

  3. Retro808

    Hi!

    We understand your request. The ticket will remain open until there is a decision. Unfortunately, this is something that will likely need a lot of user requests to consider tackling. In the mean time feel free to post a link to this ticket on our forum and possible steer others that may interested in up voting it. I recommend you vote for your own ticket as well.

    Our dev team is a team of 2 and things have to be triaged.

  4. Christian

    Not sure I understand why the need for the request. Mappings are already for specific button number. So anything we would do would mimic what MAME is already doing. You assign input to that button number and on a game that uses that button count your inputs are applied. Only time your input needs changed is if you want to move what physical button is assigned to the virtual one for that specific game. Button number is usually in priority order for most games as well. I can count on one hand how many games in the 2800 full set imports where I’ve needed to change my input for a specific game instead of using the global setting so I am a bit confused why you see this is as a need at all.

  5. Fugus reporter

    Mame doesn’t do what I am suggesting. Mame will allow you to setup a controller configuration for a specific game or maybe game type (Not sure on that last part).

    Lets assume you are using an Xbox controller:

    I am talking about say going from Street Fighter (A 6 button game) to Tekken (A 4 button game), now you have to create a new controller configuration because of that unless you want one of your kicks bound to your left trigger button in Tekken or having 2 of your kicks bound to your triggers in Street Fighter. Now imagine having to redo that a hundred plus unique controller configurations every time you wanted to move to a new game.

    What I am suggesting is that you setup multiple controller configurations in Launchbox which then detects how many buttons the game you are loading uses and then loads up the appropriate controller configuration for that many buttons automatically. It is something that could be scripted I believe, I remember someone telling me on the Mame Discord that someone could create a plugin for it that would query the button setup of the game and then swap out the default.cfg file while loading the game.

    Mame doesn’t include this feature that I know of, so requesting launchbox be able to add it as a feature that many would love and an major added selling point to any mame cabinet perspectives.

    So, with this suggestion, you could load up any game off the list, even if you have no clue what the controller setup is and launchbox would select the appropriate controller setup for that number of buttons.

  6. Christian

    If you open MAME itself without loading a game and go into input options you can configure global input settings that work for all games. Several fighting games even have their own input options for things like High Kick and Low Punch that can be set (though I admit not ALL games use that input and still use buttons 1-6)

  7. Fugus reporter

    I know I can set default inputs, the issue is that the issue is that those inputs don’t work the moment you choose a game with a different number of buttons.
    Using the Xbox 1 Controller, Buttons 1-4 are the A,B,X,Y buttons with 5 and 6 being the triggers.

    If you have your defaults set up for 6 button games like Street Fighter, you will have to bind your 3,4 and 5 button to use the the punches and your 1,2 and 6 for the kicks (Assuming you want to match the old SNES setup where the heavy hits were on the triggers), how I originally had mine setup.

    Then you move to Tekken, your buttons now one of your kicks being on the trigger instead all on the main buttons.
    Or you move to Virtual Fight for similar because if you have your controller setup for a 6 button game, you bound your 3 button to your left trigger for 6 button games.

    My suggestion bypasses that issue with mame where you can entire multiple configurations, then when it launches mame, it read how many buttons it has and swaps out the controller configurations for one you setup for games with that many buttons. So you can jump from game to game to game without having to worry about making countless different configurations for each one of them.

    There is no feature I know of in Mame that allows you to setup multiple controller configurations that depend on the number of buttons the game uses. Can set them up for specific games but something so general as how many buttons the game being loaded has.

  8. Elvis Martini

    The problem with having control configs based only on the number of buttons is that not every six-button game has the same setup. The best control scheme for Street Fighter II, for instance, won’t work at all with the Mortal Kombat series. (Not to mention that MK III has 7-buttons.) There’s not a good way to automate it that will save the user from having to customize schemes on their own.

    You can use advanced configuration files to set controls based on broader categories, like Neo Geo, for example. See here:

    https://www.reddit.com/r/MAME/comments/5pqhja/custom_controller_configuration_for_neogeo_games/

    Alternatively, you can use ROMLister to generate a list of games with a specific number of buttons (if LB doesn’t have this in a filter) and go through that list to determine which games are likely to need similar setups. Instead of going into each game individually in MAME, you can set up a controls scheme for one game and then copy/paste the config file and rename it for similar games.

    I’m surprised I can’t find any community-driven repository of downloadable control schemes anywhere, honestly. I would have thought for sure somebody would have put something like that together.

  9. Fugus reporter

    No one has that I know of, but I figure making preset configurations with just those 3 cases would solve the vast majority of the use cases on the games, leaving the edge cases that truly needed their own unique files.

    Most games either go with a 2 by 2 layout for 4 buttons or a 3 by 2 for six buttons.

  10. Elvis Martini

    Is it even possible to filter arcade games based on button-bumbers in LB?

    It would be extremely useful to be able to pass internally-recognized tags to external executables; then your problem could be solved by using a batch file or AHK script in place of the MAME.exe. That would be a broader and more flexible approach, so I’d vote for that.

    In the meantime, you could write a batch, powershell, or AHK script to parse the output from ROMLister and automatically generate copies of a file based on the filenames of the games that use a specific number of controls.

  11. Fugus reporter

    While I don’t know how, I made a suggestion on the Mame discord for this feature in a future release and had one person respond that I could just make a plugin that queried mame about a rom before it is loaded and than change the config based on what controller setup it responds with, but that is WAY above my skill set. So figure that a person more knowledgeable than me could do something similar. While I learned programmed in high school and college, my last year of that was in 2002 and I basically most of it.

  12. Log in to comment