This is a cool idea! I grabbed it now and I'll check it out later when I have access to my own computer (my work machine doesn't read 7zip files). I was thinking about another way to do this that wouldn't require modifying so many files. Maybe your way is better, so let me know what you think. Since MAME supports controller files (slik stik, x-arcade, ipac, etc), I was thinking that I could make a controller file for 5 button and 6 button games. Then, in combination with the MAME_Loader script, I could have a list for 5 and 6 button games that simply added a -ctrl xbutton switch that would call the right config. I haven't used these files before, so I could be wrong on how to implement this. Any thoughts?