The NEW Build Your Own Arcade Controls
Main => Software Forum => Topic started by: mahuti on June 21, 2006, 10:41:13 am
-
Hey gang, long time no posts... I've been really, really, really busy. I think I'm ready to get back into the swing of things... so anyway...
Job Request: Modify Mame source to do the following;
1. Add new command line option "listxmlsmall"
2. When command line option "listxmlsmall" is passed with romname, XML info for that romname should be returned.
Basically, this operates in the same manner as -listxml, but returns a few lines of information on one game, rather than a 23mb file for ALL games.
Requirements:
1. Produce a working version of the current version of MAME with this functionality.
2. Provide basic documentation of changes you made to the source files, i.e. a document with the code you added, the name of the file where it was added, and the beginning & ending line numbers of your addition.
Project Goal: I need this modification for my personal use primarily, but I'll also use it to enhance my ledwiz helper app, and possibly other simple apps in the future. I would like the documentation so that I can add the modification to future versions of MAME, as well as submit the work to the MAME team for permanent inclusion (submitted with your name, not mine... I'm not a glory hog, I just want the work done to make my cabinet work the way I want)
Price: $50 to the first person that completes a working version.
For a seasoned programmer, this may be a simple addition... and you'll get paid a modest sum to do it. Please PM me with any questions about this project.
-
I'd just like to say, before anyone else does, paying for someone to do some coding work for you is A O K by me!
-
I'll take a peek at this when I get home tonight, seems like it shouldn't be too terribly difficult looking at mame's xml parsing functions.
This would be very easy to do in a .NET windows app or command line app as well, if you would want a GUI with it.
No money necessary, though, I just like to do what I can to help the community.
-
I'll take a peek at this when I get home tonight, seems like it shouldn't be too terribly difficult looking at mame's xml parsing functions.
This would be very easy to do in a .NET windows app or command line app as well, if you would want a GUI with it.
No money necessary, though, I just like to do what I can to help the community.
Proving that it is the thought that counts. :)
-
I'll take a peek at this when I get home tonight, seems like it shouldn't be too terribly difficult looking at mame's xml parsing functions.
This would be very easy to do in a .NET windows app or command line app as well, if you would want a GUI with it.
No money necessary, though, I just like to do what I can to help the community.
I don't think he is asking for a tool to parse the xml generated by mame. I think he wants MAME itself to be modified so that it can provide this information.
-
I think he wants MAME itself to be modified so that it can provide this information.
yep.
-
One would think that a standalone script/program would do the job just as well as mame could. There any particular reason that you want it to be integrated into mame? Portablity? Cross-Platform use?
The script would be quick and dirty, but if there is no interest, I'll just bypass that and go straight into the mame code.
-
One would think that a standalone script/program would do the job just as well as mame could. There any particular reason that you want it to be integrated into mame? Portablity? Cross-Platform use?
The script would be quick and dirty, but if there is no interest, I'll just bypass that and go straight into the mame code.
Also makes it so you can use it with any MAME version.
-
Link to zip file (http://cpmaker.mameprojects.com/files/xmlsmall.zip)
There is a line in src\windows\config.c which reads:
static const char *gamename;
Remove the static.
Then copy the two attachments, one is info.txt, rename to src\info.c and the other is fronthlp.txt, rename to src\windows\fronthlp.c. Then recompile. That should work for you.
I've also attached a sample output from pacman.
-
Link to zip file (http://cpmaker.mameprojects.com/files/xmlsmall.zip)
There is a line in src\windows\config.c which reads:
static const char *gamename;
Remove the static.
Then copy the two attachments, one is info.txt, rename to src\info.c and the other is fronthlp.txt, rename to src\windows\fronthlp.c. Then recompile. That should work for you.
I've also attached a sample output from pacman.
Show off.
-
One would think that a standalone script/program would do the job just as well as mame could.
If make a simple additional program it would require that you;
1. Would most likely require that you've output the listxml file at some point.
2. Supply the new app with the location of MAME or of the full LISTXML output file everytime you wanted to use it, or add the info to some sort of ini file.
3. For additional applications to use this app, it would require tracking yet another application & its location.
It's a matter of taste, but for my purposes, having an additional app seems unnecessary, when all I'm trying to get is the XML data for one game out of MAME. It seems that creating an additional application to do this isn't necessary, when MAME can easily do the job itself.
Also, the items that I'm working on already know the location of MAME, and I don't want to add additional files & programs to my MAME folders.
Buddabing, I'll take a look at what you upped tonight.
-
Good job, Budda. Guess it helps to be familiar with the MAME codebase, eh? I've only messed with it a few times, so that fix would've taken me quite a bit longer, most likely.
-
Thanks, man.
I have made a few small contributions to MAME, including to the XML list generation code, so I knew exactly what to change.
-
Thanks, man.
I have made a few small contributions to MAME, including to the XML list generation code, so I knew exactly what to change.
Very nice... :notworthy: wish I had time to contribute like that.
At least now I know who to bug when I can't figure out a change that I want to implement. ;)
-
Well, I tested, and it works as advertised. I'd tried to add it myself a few months ago, but I couldn't get it to work. I think the one thing that I did different was... I didn't remove the static char *gamename so it would always error out on the compile.
BTW, the current MAME vs, 105 (well, as current as I have handy) had the
static const char *gamename;
listed as
static char *gamename;
Should the change look like this
char *gamename;
or
const char *gamename;
In other news, to the victor belong the spoils... just PM me with an email address and I'll paypal you some dough. Oh, and thank you, thank you, thank you. :notworthy:
I've been trying to update my ledwiz helper app to light up joystick, trackball, spinner configurations, player 1 & 2 start buttons.... but without the ability to do a quick XML parse on a small file, I've been unable to. This will allow me to greatly enhance the usability and functionality of my ledwiz helper app.
-
Just remove the static from the gamename variable.
YGPM.
-
Wouldn't it be a good idea ot implement this in the official build? The only real reason I don't upgrade my apps to the listxml format is because it's frikkin huge! If I could pick and choose the games I needed to read, that woudl make it more viable.
-
I can prepare a patch for submission, but I'm guessing that it will be rejected. You never know, though.
-
Yeah, I don't know why this hasn't been implimented in the MAME core before. I've been wishing for this functionality for over a year now... maybe a lot longer. Everytime I did anything with the listxml... it just seemed rediculous.
To me this seems a no brainer addition to MAME... if I ever want to check out the listxml file it takes a long time for even the fastest XML reader I have to open and to search for info. Most of the time I'm just looking for info on one game. Not 6000.
-
Yeah, I don't know why this hasn't been implimented in the MAME core before. I've been wishing for this functionality for over a year now... maybe a lot longer. Everytime I did anything with the listxml... it just seemed rediculous.
To me this seems a no brainer addition to MAME... if I ever want to check out the listxml file it takes a long time for even the fastest XML reader I have to open and to search for info. Most of the time I'm just looking for info on one game. Not 6000.
IIRC, the single game xml output wasn't included as part of the "simplefy the options" line. I guess the idea was "run xml output once, let the other apps do what they want, the xml parsers are good enough", vs "ditto above and/or run mame over and over for each game"
[shrug] I agree it would be nice to be part of official mame, but when I use listxml, I usually need to look at enough games to make it worth while to do the whole shebang, so I never really worried about it.
Thanks Buddabing, for doing the work. :D
-
I'm going to submit a change to MAMEdev. Except I'm going to change Mahuti's specifications.
URebel's comment on command option pollution got me thinking that it would better to implement this functionality into the existing -listxml option.
If a game name is specified with -listxml: only that game is output.
If no game name is specified: all games are output.
There are a couple of advantages to this approach.
1) no command line option pollution
2) A program can just call MAME with -listxml gamename and parse the resulting XML, regardless of whether or not the new functionality has been implemented. If it has not, the XML file will be bigger, but it will still work.
-
That is a better idea. Originally, when I began working with listxml, that's how I thought it should work... I had just forgotten until now.
-
I'm going to submit a change to MAMEdev. Except I'm going to change Mahuti's specifications.
URebel's comment on command option pollution got me thinking that it would better to implement this functionality into the existing -listxml option.
If a game name is specified with -listxml: only that game is output.
If no game name is specified: all games are output.
There are a couple of advantages to this approach.
1) no command line option pollution
2) A program can just call MAME with -listxml gamename and parse the resulting XML, regardless of whether or not the new functionality has been implemented. If it has not, the XML file will be bigger, but it will still work.
And it's the way -listinfo worked before it was overtaken by -listxml.
-
right... which is why it always drove me nuts that listxml didn't work the same.
-
I've revised the code and submitted a patch to MAMEdev. Hopefully it will be accepted into 0.106u8.
A copy is attached. If you want, you can undo the previous code and apply this by copying it into the root directory of your MAME installation and running patch -p1 < patch.txt.
-
Mame 106u8 Whats new
http://mamedev.org/updates/whatsnew_0106u8.txt
Source Changes
--------------
Changed -listxml to accept a wildcard gamename like most other
frontend options to limit which games are output.
[Aaron Giles, Buddabing]
-
sweeeeeeet.
-
Aaron improved my code to support wildcards. I didn't think improving my code was possible. :laugh2: