Build Your Own Arcade Controls Forum

Main => Main Forum => Topic started by: Beretta on May 06, 2010, 10:58:53 pm

Title: game input #
Post by: Beretta on May 06, 2010, 10:58:53 pm
im working on something and was curious is there a way to get game button numbers from mame?

IE have mame spit out a list of buttons used on every game..

EX:
mortalkombat=5
streetfighter=6
nbajam=3
Title: Re: game input #
Post by: nitz on May 06, 2010, 11:05:14 pm
You should be able to use RomLister to spit out a list of every 0 button game, every 1 button game, every 2 button game, etc.

Not exactly what you asked for, but maybe this would fill your need?
Title: Re: game input #
Post by: Beretta on May 07, 2010, 03:13:40 am
cool i'll look into it, not exactly what i wanted but i might be able to make that work.
Title: Re: game input #
Post by: NOP on May 07, 2010, 10:06:39 am
do this with romlister:

1) in the -find: window, replace the entire text string with just a  "=" (no quotes).  What we're doing here is searching for something that will come up in *every* game's XML data.

2) hit the Go! button to make a list.  It'll take awhile to chew on that big of a search.

3) from the selection window on your game list, select CSV output

4) save the file, and it will pop up a dialog for what output items you want in your list.  Select ROM name and # of buttons.  Change the text delimiter to = and you'll end up with a list like this:
ddragonb=3
ddragnba=3
ddragon=3
doubledr=4
pc_ddrgn=3
ddragonu=3
ddragoua=3
ddragonw=3
ddragnw1=3
ddrago3b=3
ddrago3j=3
ddragon3=3



I suspect however you're trying to do what romlister is really designed for; finding games that work on your machine based on your controls.  It might be easier to actually utilize it than doing the work yourself scanning through a list by hand!
Title: Re: game input #
Post by: Beretta on May 07, 2010, 01:30:57 pm
thanks guys sounds good i'll check it out later today when i get some time.
i've never used romlister before.

no im making something in autoit and so was looking for a way to generate a list of buttons each game uses.. save me a lot of time, i was hopping mame had a way of doing this.. so i could make it self updating but this will work.
Title: Re: game input #
Post by: NOP on May 07, 2010, 03:28:14 pm
I should probably mention a warning that you about using a merged file (a merged file takes MAME's -listXML output and merges in controls.xml and catver.ini and numplayers.ini files)  Just use the straight up MAME XML data and ignore all the warning that RL will spit at you about using a non merged file.

THe reason I say this is that when controls and mame's data get merged in, now you have 2 references to the number of buttons in a game, and your output will look something different, as in:

ddragonb=3 & 3
ddragnba=3 & 2
ddragon=3 & 3
etc.

What you're seeing there is MAME's xml data says there are 3 buttons.  Then controls.dat(or controls.xml) says no, wait, there are 2 buttons.  RL will give you both answers when they exist.

MAME's XML data is often inaccurate as to the actual number of buttons used, or they sometimes could the player start buttons as gameplay buttons.  There doesn't seem to be much consistency.  The data in the controls file is way more accurate, but it doesn't have data for every game, so pick your poison.

Also, you may see entries in your list that are without any number at all.  Those would be games that don't use buttons...

I have probably just muddied the waters.
Title: Re: game input #
Post by: Beretta on May 07, 2010, 05:26:14 pm
ah man you're absolutely right, it's saying pacman has 1 button i sure dont remember that.

it's a good start point though but ya im pretty disappointed there is no complete AND accurate way to do this.

i used only mame XML output and oddly RL spit out 2 copy of every game.. #-Z... and then another set #-Z.. easy to clean up but weird.
Title: Re: game input #
Post by: NOP on May 08, 2010, 09:54:11 am
and here's where I swoop in to save the day!
http://forum.arcadecontrols.com/index.php?topic=95145.0 (http://forum.arcadecontrols.com/index.php?topic=95145.0)

a very dedicated (ie, insane) user here has basically gone in and done a complete controls.xml replacement with thousands of entries.

Title: Re: game input #
Post by: Beretta on May 08, 2010, 01:13:07 pm
cool, he's not covering all games though.. and it's manually updated :(

i was hopping to do this automatically or semi automatically

but thanks for the link, i'll probably stick with the mame XML it's inaccurate but most of the games seem to be correct.
Title: Re: game input #
Post by: garwil on May 08, 2010, 05:13:46 pm
I'm the insane user  ;D, I've not had much time to work on this lately but the most up to date one is linked in my sig. IIRC I've done all games other than the adult/casino/mahjong/non-working. I'm tied up completely with my nursing degree until the end of June but after that I plan on getting it finished and in line with the most recent mame version. Hope that helps!

Edit: It would help if I had a sig set up for here lol! Here's the link http://forum.arcadecontrols.com/index.php?topic=98241.0 (http://forum.arcadecontrols.com/index.php?topic=98241.0)