Software Support > PowerMAME

Speech

<< < (2/3) > >>

MikeQ:
So how do I know that Pacman's parent is pucman?

mahuti:
Mame's list xml is formatted like so;

<game name="pacman" sourcefile="pacman.c" cloneof="puckman" romof="puckman"

You have to read that item out of the listxml.

Buddabing:

--- Quote from: MikeQ on March 07, 2006, 08:40:25 am ---So how do I know that Pacman's parent is pucman?

--- End quote ---

You can find out the parent game within MAME as follows:


--- Code: ---if (Machine->gamedrv->clone_of==NULL)
{
   /* parent */
   printf("game %s is not a clone\n",Machine->gamedrv->name);
}
else
{
   printf("game %s is a clone of %s\n", Machine->gamedrv->name,
   Machine->gamedrv->clone_of->name);
}


--- End code ---


Of course, this only works once the Machine structure is fully initialized.



MikeQ:

--- Quote from: SirPoonga on March 07, 2006, 12:19:52 am ---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.


--- Code: ---[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
--- End code ---

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.


--- Code: ---[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
--- End code ---

--- End quote ---

Ok.  Cool.  This solves many of the problems I ran into. 

SirPoonga:
I skimmed over the readme in the fe dev file, it seems to have most of this info.

I just wanted to restate something.  usesService indicated if the game uses the SERVICE constants.  See playchoice 10.


--- Code: ---[playch10]
gamename=PlayChoice-10
numPlayers=2
alternating=0
mirrored=0
tilt=0
cocktail=0
usesService=1
miscDetails=The playchoice 10 system is a pay-per-play system based on the original nes console and plays the same titles.  Instead of purchasing lives, you purchase time on the machine.  The machine can hold 10 games at once and you switch using the game menu on the secondary monitor.   
P1NumButtons=2
P1Controls=8-way Joystick+joy8way|Lightgun+lightgun
P1_BUTTON2=B
P1_BUTTON1=A
P1_JOYSTICK_RIGHT=Right
P1_JOYSTICK_LEFT=Left
P1_JOYSTICK_DOWN=Down
P1_JOYSTICK_UP=Up
P1_LIGHTGUN_X_EXT=Right
P1_LIGHTGUN_X=Left
P1_LIGHTGUN_Y=Up
P1_LIGHTGUN_Y_EXT=Down
P2NumButtons=2
P2Controls=8-way Joystick+joy8way
P2_BUTTON1=A
P2_BUTTON2=B
P1_JOYSTICK_UP=Up
P1_JOYSTICK_DOWN=Down
P1_JOYSTICK_LEFT=Left
P1_JOYSTICK_RIGHT=Right
SERVICE1=Service Coin
SERVICE2=Channel Select
SERVICE3=Enter
SERVICE4=Reset
--- End code ---

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version