Main > Main Forum

Button Mapping Graphic Display

Pages: << < (6/13) > >>

u_rebelscum:


--- Quote ---It seems to me that we're getting a bit carried away with all these databases.  For one, the "re-mapping" DB seems to be unnecessary. [snip]

... if we have a GUI for laying out the controls, we could also tell it which buttons are connected to which input (which key it is mapped to).  If we had a basic 1 stick, 3 button panel, we could create a BASE control panel image that would look like this:



It would seem that we could somehow have the FE take the button labels from the Mame code, cross referencing their mappings in the Mame menu (i.e. "1 Player Start = 1", "P1 Button 1 = LCtrl" etc.):
[snip]

What do you think?
--- End quote ---

I agree that remapping table is a little much (even though I'm sort of "pushing" it).  It's there mostly because lots of people think: "that's my control panel's player 1 button 1" and not "that's LCTRL".   [shrug]  I am all for dropping that table and letting the FE graphically map "LCTRL", "Left Arrow" instead of the "cp1b1' and 'cp1joy' stuff.

SirPoonga:

Right, you don't need to know the key stroke a button on your CP uses.

1UP:

I see, so you're just making friendly names from the get-go!  Sounds good to me.  I don't know what I can do besides donating graphics, but I'd love to see this implemented ASAP!

)p(:


--- Quote ---dkong
"P1 Button1" = "Jump"

This would simply substitute a different label for "P1 Button1" in the image.

What do you think?
--- End quote ---


I agree with 1-up a simple label substituting database is all we need. Because all the relevant stuff comes directly from mame itself it will be much easier to maintain the database...

peter


u_rebelscum:


--- Quote ---I see, so you're just making friendly names from the get-go!  Sounds good to me.  I don't know what I can do besides donating graphics, but I'd love to see this implemented ASAP!
--- End quote ---


I think the FE should handle parent/clones.  It would cut the table size greatly.

Here's a tab delimited text file with this format:

gamename [tab] mame input name [tab] label, if any (driver given name)

notes:
1.  The list includes all inputs, including cheats & custom inputs, for all games.

2.  If the input is a cheat, "CHEAT" is added to the third column.  If it's a cheat with a driver given name, the "CHEAT" is added to the end of the string.  Example: an cheat input given the name "super speed" in the driver, will have "super speedCHEAT" in the label column.

3.  If the input is a custom input, mame does not have an internal name for it.  In these cases, the second column contains "custom".  Most custom inputs have a label, and are mostly from mahjong games.

4.  If the input uses the default name in mame, the third column is blank (except item 2 condition).  Mame uses the same name listed in the second column, so no need to repeat it.  These are the ones that need the labeling.

5.  The file is >1.3 megs (~185kB zipped) with 59311 total inputs listed.

example lines:
pacman      P1_JOYSTICK_UP      
pacman      P1_JOYSTICK_LEFT      
pacman      P1_JOYSTICK_RIGHT      
pacman      P1_JOYSTICK_DOWN      
pacman      COIN1      
pacman      COIN2      
pacman      P2_JOYSTICK_UP      
pacman      P2_JOYSTICK_LEFT      
pacman      P2_JOYSTICK_RIGHT      
pacman      P2_JOYSTICK_DOWN      
pacman      START1      
pacman      START2      
defender      P1_BUTTON1      Fire
defender      P1_BUTTON2      Thrust
defender      P1_BUTTON3      Smart Bomb
defender      P1_BUTTON4      Hyperspace
defender      START2      
defender      START1      
defender      P1_BUTTON6      Reverse
defender      P1_JOYSTICK_DOWN      
defender      P1_JOYSTICK_UP      
defender      custom      Auto Up
defender      custom      Advance
defender      custom      High Score Reset
defender      COIN1      
defender      COIN2      
defender      P1_JOYSTICK_RIGHT      CHEAT
defender      P1_JOYSTICK_LEFT      CHEAT


more notes:
1.  I think parent/clone handling in the FE would be a Good Idea:  most clones have the exact inputs as the parent.  This makes a lot of the data in this file redundant, and adding labels to the parent & each clone is extra work.  The clone should only have its own list if it has different inputs than the parent (example: cabal uses trackballs, but the bootleg version uses 8way joysticks + one more button, so should have its own inputs listed).  The code I used to generate the list does not check for this in any way; all inputs for all games are listed.

2.  The source changes are available in the same zip as the list.  All changes were in src/info.c, and replaces the -listinfo output, so should only be used on a mame that you don't need the normal -listinfo list.  Quick compile suggestion: make temp folder and copy makefile, src folder, and obj folder into it.  Replace temp/src/info.c with the supplied info.c.  Type make.  Rename the resulting temp/mame.exe to something else (example: InputListMame.exe).  Move the new named mame into normal mame folder.  Delete temp folder.

3.  To get the list, type [InputListMame] -listinfo > filename

4.  The changes work for both dos and windows mame, and should work for all ports.

5.  It would be nice to make this as a new option instead of replacing -infolist.  

Pages: << < (6/13) > >>

Go to full version