Build Your Own Arcade Controls Forum
Main => Software Forum => Topic started by: TheShanMan on April 10, 2008, 01:43:38 am
-
I'm working on my key mappings right now and I'm reminded once again that whenever I want to assign a key to some function I always worry "what else is this key assigned to", and then I have to go on a hunt through the "input (general)" menus.
I'd really ultimately like a way to list mappings in one complete list based on key, not function. In other words, "x is mapped to function1 and function2" kind of thing.
I don't supposed there's some program out there that can do this, is there?
I'm tempted to write a program to do it, but the problem is getting that information to begin with. Default.cfg only lists the changes, not ALL the mappings. Is there some way to call into mame for the full list, or some file other than default.cfg that contains a full list?
If not, I guess the alternative would be to "import" the defaults from the mame source. But that's not ideal because I would either have to assume that the inputs never change from one release of mame to the next, or rebuild the program for every release. I know the mappings don't change frequently, but you never know, and I'd hate to generate incorrect information because I didn't update the program after a default mapping change.
-
I'm working on my key mappings right now and I'm reminded once again that whenever I want to assign a key to some function I always worry "what else is this key assigned to", and then I have to go on a hunt through the "input (general)" menus.
I'd really ultimately like a way to list mappings in one complete list based on key, not function. In other words, "x is mapped to function1 and function2" kind of thing.
I don't supposed there's some program out there that can do this, is there?
I'm tempted to write a program to do it, but the problem is getting that information to begin with. Default.cfg only lists the changes, not ALL the mappings. Is there some way to call into mame for the full list, or some file other than default.cfg that contains a full list?
If not, I guess the alternative would be to "import" the defaults from the mame source. But that's not ideal because I would either have to assume that the inputs never change from one release of mame to the next, or rebuild the program for every release. I know the mappings don't change frequently, but you never know, and I'd hate to generate incorrect information because I didn't update the program after a default mapping change.
Yup, the best source for the full list is, ehem, the source files (src/emu/inptport.c, line ~450, default_ports_builtin[] array). I think easyemu has a very old list. The defaults rarely changes, but as you say, you never can predict when it will happen.
I've thought of hacking mame to output all defaults to default.cfg a few times, but it's pretty easy to cut and paste from the source to a spreadsheet or DB and sort from there. If you edit the source to save all maps, I'd edit save_default_inputs() (if just the defaults) or save_game_inputs() (if all games). You might want to do it differently, but that's the quickest hack, IMO.
-
Well that's a bummer, but at least I know what I have to work with. It would be nice if mame actually prompted the user when they change a mapping and cause a conflict - "x is already mapped to function1. Would you like to delete that mapping?"
Maybe if I decide to write a little program, I'll have it prompt for the location of the mame source (for default mappings) as well as the mame install (for changed mappings). That way the program won't become outdated and misleading if a default mapping does change.
Thanks for the info!
-
Well that's a bummer, but at least I know what I have to work with. It would be nice if mame actually prompted the user when they change a mapping and cause a conflict - "x is already mapped to function1. Would you like to delete that mapping?"
I know what you mean, but ...
I'd rather have mamedev code the harder emulation stuff than spend their limited voluntary time working on UI bells and whistles. And if you look at the defaults, there are a lot of double/multiple mapped keys already; just most people don't notice. Examples: the left stick of player 1's dual joysticks overlaps keys with player 2's buttons, and the arrow keys are mapped to 8-way 4-way, analog stick, spinner, TB, lightgun, and the in-game UI. So doing so might add confusion in some places even if done correctly.
Maybe if I decide to write a little program, I'll have it prompt for the location of the mame source (for default mappings) as well as the mame install (for changed mappings). That way the program won't become outdated and misleading if a default mapping does change.
That would be cool. You might want it to read the ctrlr file (and mame.ini for which ctrlr file if any is used), as well as the normal cfg files. (But then you'd need to parent-clone and game-driver relationships is you wanted to parse the ctrlr like mame does.) If you have any questions on mame's input structure and how it works, be sure to ask. :) (Not that it's hard, just sort of different than most people think of inputs.)
If you do decide to, good luck and please post it here; I'm sure others are interested. :applaud:
-
TheShanMan: Check out CPWizards Data folder it has a file called std.ini that contains the Mame default keys.