Yes, we only have parent info in there, no need to to store useless information. As noted, pacman's parent is puckman.
Also, you use a combination of flags to determine how to label the controls. I think all this information is in the FE dev package. If not I willtry and update it.
For example, we'll take a game I own.
Double Dragon II - The Revenge (US) - ddragn2u
Controls aren't there (make sure you check as we will put clones in there that don't have the same controls as parents), well then. Look at the listxml's output (FE Dev) and determine cloneof value. It's ddragon2. Here's the controls.ini entry for that. XML format contains same data.
[ddragon2]
gamename=Double Dragon II - The Revenge (World)
numPlayers=2
alternating=0
mirrored=1
tilt=0
cocktail=1
usesService=0
miscDetails=
P1NumButtons=3
P1Controls=8-way Joystick+joy8way
P1_BUTTON1=Attack Left
P1_BUTTON2=Jump
P1_BUTTON3=Attack Right
P1_JOYSTICK_RIGHT=Right
P1_JOYSTICK_LEFT=Left
P1_JOYSTICK_DOWN=Down
P1_JOYSTICK_UP=Up
You need to look at these values
numPlayers=2
alternating=0
mirrored=1
2 players, simutaneous, mirrored controls. mirrored controls means player 2 has same labels as player 1 (again, keeping file sizes down, no need to store useless info).
A combination of those (and cocktail) can help you determine how the controls are used in the game and how to assign the labels.
Yes, double dragon 2 does have a cocktail switch, though I have no idea what it does as the book I have is the schematics and part numbers book, not operators manual.
After that you look at
P1NumButtons=3
P1Controls=8-way Joystick+joy8way
This will tell you how many button labels to look for (with the P1_ prefix). And what controls it uses. You determine the label key using one of the other files in the FE dev package (pie delimited files, direct dumps of a couple of tables).
Yeah, technically both the control description and constant don;t need to be there, but it simplifies things for some developers.
You can either look up 8-way Joystick which will return:
8-way Joystick|joy8way
Then look up joy8way in the other text file to get
joy8way|JOYSTICK_UP|Up|
joy8way|JOYSTICK_DOWN|Down|
joy8way|JOYSTICK_LEFT|Left|
joy8way|JOYSTICK_RIGHT|Right|
This will tell you label suffix (which is the mame contant used in the ctrlr files) along with default label (used for the submission wizard on fe.donkeyfly.com). The last field I forgot offhand, it was obsoleted. Kept there for backwards compatibility.
Then you can compare with your controller files and create something like johnny5 to display, accurately, the controls on your control panel, along with if you need to rotate your panel, what modules, whatever ever weird control setup you have.
An example of a game that doesn't use mirrored controls.
[wseries]
gamename=World Series: The Season
numPlayers=2
alternating=0
mirrored=0
tilt=0
cocktail=0
usesService=0
miscDetails=... Long description ...
P1NumButtons=3
P1Controls=Batter Control+stick
P1_BUTTON1=Go Back
P1_BUTTON2=Xtra Base
P1_BUTTON3=Aim
P1_AD_STICK_Y=Up
P1_AD_STICK_X_EXT=Swing
P1_AD_STICK_X=Swing
P1_AD_STICK_Y_EXT=Down
P2NumButtons=0
P2Controls=Baseball Pitcher+stick
P2_AD_STICK_X=Left
P2_AD_STICK_X_EXT=Right
P2_AD_STICK_Y=Pitch
P2_AD_STICK_Y_EXT=Windup