Somebody below posted the file format if you want... but why?
The whole point in doing this would be so you could configure a game once and have all games that are similar to this work right?
Well, do that by copying the default.cfg and only setting the defaults. Then keep track of your files. If you don't want to keep track of the files, you could create the default.cfg. But why generate a cfg file for each game?
With a little figuring out of the variables you have in hand (number of players, number of buttons, input types, ect) you can come up with an algorythm that will allow you to copy the defaults around for you.
What I use in jfront (about, don't remember the order)
1) custom <so I could create on called MK and set it in each MK game>
2) players_input_buttons (this was primarily to switch the punch and kick buttons on SF games in one shot)
3) players_input (I don't use it, but I added it
4) players (So 4 player games use the joystick on the far left, all 1,2,3 player games use the middle ones)
5) inputs (so all 4 way games can have up notleft notright setup)
This takes care of about 95% of the games with only a few configuration files I copy around.
so when I start a game, I check to see if these files exist
<input_property_value>.cfg
2p_8way_6b.cfg
2p_8way.cfg
2p.cfg
8way.cfg
I first check in the selected control panel directory, then a default directory for each until I find one. I copy it to cfg/default.cfg when starting and copy it back when I'm done.
I considered adding the config myself, but then I just figured that I would have to create screens to do it, would be a pain in the arshe to configure it since it wouldn't be ingame.... and I didn't want to spend any more time on it.
