Well honestly you are not going to be able to get away with making just two cfg files. However I did just that so I could test each game and made sure it ran on my system deleted clones and doubles (Took me awhile!
). The cfg files will be written regardless if you change anything or not. (The ini files you have to tell mame to write them if you want them.) However there is a way..I'd forgotten about this. Its called a ctrl file. You set up your buttons and then point the mame.ini to it it will use that file to ctrl everything no matter what happens to the cfg files. It will be some work (i.e. it won't be "one or two confg files" but it will be MUCH faster as you can copy and paste.
http://wiki.arcadecontrols.com/wiki/Ctrlr_file just so you or others can read it. But "simply" put..here is what i did:
First I made a "default" config. This means I set up all my buttons to most of my games in one go. (I use a controller (and an old one at that) not a keyboard encoder.)) So I made my lower left my main button (fire/jump/ect) then my lower right my second..upper left my third..upper right my fourth..so that was my "neo-geo" set up. (it' is set up like a neo geo CD rom system) It also sets up almost all my games. That set up 90% of my set right there in 1.5 minutes. Then I copied it to the ctrlr folder (you have to make sure your path is set right in the mame.ini like this:
#
# CORE SEARCH PATH OPTIONS
#
rompath .....
ctrlrpath $HOME/.mame/ctrlr (C:\mame\ctrlr for windows) <-- set your path here (the folder should already be in the main mame folder with some controller cfgs in it)
inipath ....
now rename your file to what ever you want (name.cfg)
then back in your mame.ini set this
#
# CORE INPUT OPTIONS
#
coin_lockout 1
ctrlr example <-- put the name here. [b]Leave the .cfg off![/b]
mouse.....
Now I set up my cps2 and cps3 roms (that is the "driver" that runs most sfa and sfiii roms. So I deleted my new configs from the cfg folder,
not the new ctrl file! I started street fighter alpha then set up all the buttons the way I wanted using the DEFAULT button set up (not the "input this game") then I opened the default copied everything the tags from <system> to </system> Then I pasted that under the default settings making sure that the </mameconfig> tag was always the last thing on the page. Then I renamed the <system name="default"> to <system name=cps2.c">. Then I pasted it again under that one and renamed it to "cps3.c" that knocked out all the street fighter games from street fighter alpha to street fighter III: 3rd strike (and other capcom fighting games) in 5 minutes. Now problem is/was that Street Fighter II (and others) use the cps1 driver. I had to do those games individually. But all I had to do was copy the code for the number of games I had renaming the <system mame> tag to the rom name. Took me 15 minutes from start to finish and I had 98% of my games set like I want.
This was a lot easier honestly then setting up each game! I'll post my files so that you can see them. I don't know if it will do any good to try it..but it can't hurt anything i know. If you (or anybody) needs help just ask.