Played MAME much? You can remap "keys" (button) in the MAME menu when you start a game. you can do that for each game or for all games. It will save that setting so you only have to do it once.
Lots of games let you set difficulty, # of lives, etc.
If you're talking about editing config files, you must want to do more than just play with game settings.
So, what are you trying to do???