Awesome, you can totally do this it seems.
Did some playing around. You have to specify a file from the # CORE INPUT OPTIONS (the 'ctrlrl' line) of your mame.ini (or in my case, the horizont.ini since I have a separate config file for horizont games - I prefer stretch to screen display on those).
You can easily create a ctrlr file by copying the 'default' file that gets created (in your cfg folder) after you map all of your controls, and copying it to your 'ctrlr' folder. I'm not sure if this is the 'right' way to do this but it works. And there is also one distinct advantage to doing this. If you map multiple controllers, MAME will erase all the data for every controller that isn't plugged or turned on the next time you load MAME. Only way around this is to change the default.cfg file to 'read only.' But if you have a file in your 'ctrlr' folder, and point mame to it (as specified above), mame will look there first, then *override* any of those settings with whatever is in your default.cfg.
It's brilliant really. You can make changes this way to your default.cfg, and the changed entries (from your file in the 'ctrlr' folder) will be grey instead of white. You can then choose to delete that file altogether, and you will still have all of your default settings from the 'ctrlr' folder.
But back to the main objective.
If you open up your ctrlr file, you will see xml data. All you have to do really is copy everything between the lines "system name="default"" and /system, paste it, then change the system name for the new section you've just created to whatever you need it to be. In my case, it would be system name="tg16".
From there you just need to edit entries for whatever you need changed from the section. In my case, I needed to change the "toggle_autofire" section. So I changed:
port type="UI_TOGGLE_AUTOFIRE"
newseq type="standard"
KEYCODE_F7
/newseq
/port
to
port type="UI_TOGGLE_AUTOFIRE"
newseq type="standard"
JOYCODE_1_ZAXIS_POS_SWITCH
/newseq
/port
Everything is working as expected.
I hope this helps someone. I have a tendency to ask questions and then answer them later on because I have OCD until I figure something out, and my reasoning is, someone else will probably have a similar problem later on and google this page.
Edit: And after further testing, any subsequent alterations, e.g. you added a system name="tg16" section, you only need to add entries that are going to be different from the system name="default" section. They simply work as "overrides" (kinda like the way RetroArch works).
Edited by Typhon (02/22/17 12:59 PM)
|