Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: MAME modification request; $50 for you  (Read 3341 times)

0 Members and 1 Guest are viewing this topic.

mahuti

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 2757
  • Last login:September 18, 2024, 01:16:22 pm
  • I dare anything! I am Skeletor!
MAME modification request; $50 for you
« 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.
Raspberry Pi, AttractMode, and Skeletor enthusiast.

leapinlew

  • Some questionable things going on in this room with cheetos
  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7919
  • Last login:June 29, 2025, 08:37:44 pm
Re: MAME modification request; $50 for you
« Reply #1 on: June 21, 2006, 11:26:50 am »
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!

bleemus

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 184
  • Last login:September 01, 2016, 12:53:24 pm
  • Party Pengo in the house.
Re: MAME modification request; $50 for you
« Reply #2 on: June 21, 2006, 11:27:51 am »
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.
Reality is overrated.

Circo

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 849
  • Last login:May 11, 2020, 03:27:51 am
  • Still using screenshots? Try EmuMovies instead.
    • EmuMovies
Re: MAME modification request; $50 for you
« Reply #3 on: June 21, 2006, 11:30:23 am »
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.  :)
My Websites

lokki

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 647
  • Last login:May 05, 2025, 06:18:51 pm
Re: MAME modification request; $50 for you
« Reply #4 on: June 21, 2006, 12:22:18 pm »
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.

mahuti

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 2757
  • Last login:September 18, 2024, 01:16:22 pm
  • I dare anything! I am Skeletor!
Re: MAME modification request; $50 for you
« Reply #5 on: June 21, 2006, 12:54:24 pm »
Quote
I think he wants MAME itself to be modified so that it can provide this information.

yep.
« Last Edit: June 21, 2006, 12:56:50 pm by mahuti »
Raspberry Pi, AttractMode, and Skeletor enthusiast.

bleemus

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 184
  • Last login:September 01, 2016, 12:53:24 pm
  • Party Pengo in the house.
Re: MAME modification request; $50 for you
« Reply #6 on: June 21, 2006, 01:53:34 pm »
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.
Reality is overrated.

2600

  • Trade Count: (+7)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1630
  • Last login:June 05, 2017, 10:20:56 am
  • I want my own arcade controls!
Re: MAME modification request; $50 for you
« Reply #7 on: June 21, 2006, 02:04:54 pm »
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.

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re: MAME modification request; $50 for you
« Reply #8 on: June 21, 2006, 02:50:26 pm »
Link to zip file

There is a line in src\windows\config.c which reads:

Code: [Select]
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.
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

2600

  • Trade Count: (+7)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1630
  • Last login:June 05, 2017, 10:20:56 am
  • I want my own arcade controls!
Re: MAME modification request; $50 for you
« Reply #9 on: June 21, 2006, 02:56:01 pm »
Link to zip file

There is a line in src\windows\config.c which reads:

Code: [Select]
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.

mahuti

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 2757
  • Last login:September 18, 2024, 01:16:22 pm
  • I dare anything! I am Skeletor!
Re: MAME modification request; $50 for you
« Reply #10 on: June 21, 2006, 03:05:41 pm »
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.
Raspberry Pi, AttractMode, and Skeletor enthusiast.

bleemus

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 184
  • Last login:September 01, 2016, 12:53:24 pm
  • Party Pengo in the house.
Re: MAME modification request; $50 for you
« Reply #11 on: June 21, 2006, 03:18:14 pm »
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.
Reality is overrated.

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re: MAME modification request; $50 for you
« Reply #12 on: June 21, 2006, 03:31:40 pm »
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.



I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

bleemus

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 184
  • Last login:September 01, 2016, 12:53:24 pm
  • Party Pengo in the house.
Re: MAME modification request; $50 for you
« Reply #13 on: June 21, 2006, 03:34:52 pm »
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.  ;)
Reality is overrated.

mahuti

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 2757
  • Last login:September 18, 2024, 01:16:22 pm
  • I dare anything! I am Skeletor!
Re: MAME modification request; $50 for you
« Reply #14 on: June 21, 2006, 04:25:17 pm »
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

Code: [Select]
static const char *gamename;
listed as

Code: [Select]
static char *gamename;
Should the change look like this

Code: [Select]
char *gamename;
or

Code: [Select]
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.
« Last Edit: June 21, 2006, 04:27:59 pm by mahuti »
Raspberry Pi, AttractMode, and Skeletor enthusiast.

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re: MAME modification request; $50 for you
« Reply #15 on: June 21, 2006, 04:51:14 pm »
Just remove the static from the gamename variable.

YGPM.
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:July 03, 2025, 06:36:13 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: MAME modification request; $50 for you
« Reply #16 on: June 21, 2006, 05:51:28 pm »
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. 

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re: MAME modification request; $50 for you
« Reply #17 on: June 21, 2006, 05:57:46 pm »
I can prepare a patch for submission, but I'm guessing that it will be rejected. You never know, though.
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

mahuti

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 2757
  • Last login:September 18, 2024, 01:16:22 pm
  • I dare anything! I am Skeletor!
Re: MAME modification request; $50 for you
« Reply #18 on: June 21, 2006, 06:28:25 pm »
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.
Raspberry Pi, AttractMode, and Skeletor enthusiast.

u_rebelscum

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3633
  • Last login:April 21, 2010, 03:06:26 pm
  • You rebel scum
    • Mame:Analog+
Re: MAME modification request; $50 for you
« Reply #19 on: June 22, 2006, 01:05:37 am »
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
Robin
Knowledge is Power

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re: MAME modification request; $50 for you
« Reply #20 on: June 22, 2006, 03:24:56 pm »
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.
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

mahuti

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 2757
  • Last login:September 18, 2024, 01:16:22 pm
  • I dare anything! I am Skeletor!
Re: MAME modification request; $50 for you
« Reply #21 on: June 22, 2006, 04:29:53 pm »
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.
Raspberry Pi, AttractMode, and Skeletor enthusiast.

u_rebelscum

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3633
  • Last login:April 21, 2010, 03:06:26 pm
  • You rebel scum
    • Mame:Analog+
Re: MAME modification request; $50 for you
« Reply #22 on: June 22, 2006, 08:37:56 pm »
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.
Robin
Knowledge is Power

mahuti

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 2757
  • Last login:September 18, 2024, 01:16:22 pm
  • I dare anything! I am Skeletor!
Re: MAME modification request; $50 for you
« Reply #23 on: June 22, 2006, 10:59:07 pm »
right... which is why it always drove me nuts that listxml didn't work the same.
Raspberry Pi, AttractMode, and Skeletor enthusiast.

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re: MAME modification request; $50 for you
« Reply #24 on: June 24, 2006, 10:12:53 am »
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.

I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

lokki

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 647
  • Last login:May 05, 2025, 06:18:51 pm
Re: MAME modification request; $50 for you
« Reply #25 on: June 26, 2006, 11:04:44 am »
Mame 106u8 Whats new

http://mamedev.org/updates/whatsnew_0106u8.txt
Quote
Source Changes
--------------
Changed -listxml to accept a wildcard gamename like most other
frontend options to limit which games are output.
[Aaron Giles, Buddabing]

mahuti

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 2757
  • Last login:September 18, 2024, 01:16:22 pm
  • I dare anything! I am Skeletor!
Re: MAME modification request; $50 for you
« Reply #26 on: June 26, 2006, 11:45:49 am »
sweeeeeeet.
Raspberry Pi, AttractMode, and Skeletor enthusiast.

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re: MAME modification request; $50 for you
« Reply #27 on: June 27, 2006, 10:49:47 am »
Aaron improved my code to support wildcards. I didn't think improving my code was possible.  :laugh2:
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!