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: new rom list generator thingy.  (Read 18864 times)

0 Members and 1 Guest are viewing this topic.

NOP

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 916
  • Last login:September 19, 2017, 08:22:27 pm
  • I stole my avatar.
    • winterMAME
new rom list generator thingy.
« on: July 11, 2006, 06:19:52 pm »
http://www.waste.org/~winkles/rl.zip

Dunno if anyone would be interested in this, but here's yet another tool that I've generated to help create lists of roms to put onto your machine.  There are other utilities that do this, and websites too, but, none of the ones I found worked quite the way I was thinking, and being the engineer that I am, I just had to create my own utility.

It's a command line app, but requires windows for long filename support.
It could easily be ported to a windows GUI if there is any interest.

This utility digs through MAME's -listxml feature and is a simple text string finder, outputting another XML file which contains only matches found from the source file.


Background:
I have a cocktail machine with a vertical monitor, and a 4way joystick with 1 button for each player 1 and 2.
I wanted a listing of all the games that support those criteria, no clones please.

It took a few passes through this program, but eventually it was able to help me trim down the master list of all games down to just the ones I was interested in.



Steps:

1) generate the master list of games from MAME:  mame -listxml > allgames.xml
2) find all the cocktail cabinets:  rl -in:allgames.xml -out:cocktail.xml -find:cocktail
3) find all the vertical cabinets:  rl -in:cocktail.xml -out:vertical.xml -find:vertical
4) remove all the clones:           rl -in:vertical.xml -out:noclones.xml -find:-cloneof
5) find all the games that have 1 button: rl -in:noclones.xml -out:1button.xml -find:buttons=1
6) find all the games that have 4way joysticks: rl -in:1button.xml -out:finallist.xml -find:joy4way
7) list only the rom names from the final output xml file so they can be copied to my ROMs folder on my machine:   rl -in:finallist.xml -out:romlist.txt -r
   
 
You could use this utility to locate only neogeo games, games with only spinners, etc. 
Anything that is inside the <game name> and </game> tags is fair game to search on.

It's free, open source, source included, very lightly tested.  You get what you pay for.  ;)

-jeff!

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: new rom list generator thingy.
« Reply #1 on: July 11, 2006, 06:41:50 pm »
Heads up. They're changing a couple of fields in the XML info in v0.107. So your application may need to change once that happens.

Also, you might want to check out my ListGen utility which implements a SQL-based search on the XML information.

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:June 24, 2025, 10:25:04 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: new rom list generator thingy.
« Reply #2 on: July 13, 2006, 04:07:56 pm »
Yeah, everything I'm doing is sorta on hold until .107  they are changing a LOT of stuff.

Bill Mote

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 202
  • Last login:May 29, 2010, 11:04:28 pm
  • Focus on making things better not bigger.
    • Things That Make Me Mad and How To Fix Them
Re: new rom list generator thingy.
« Reply #3 on: October 27, 2006, 10:19:25 pm »
check out my ListGen utility which implements a SQL-based search on the XML information.

I just can't figure this beast out.  I have downloaded the listgen.zip file and put it in a directory \listgen on the same drive as the mame installation.  There are *no* instructions that I can find in the .zip file.  So, at the prompt I type listgen and I get an .XML file with all the games in it along with a couple of errors:

D:\ListGen>listgen
Calling MAME to get version
MAME version is 0.109
Calling MAME to build listxml.txt
Calling MAME to build gamelist.txt
Error: unknown option: -gamelist
Calling MAME to build listfull.txt
Error: unknown option: -gamelist
Scanning MAME XML game info
parse error, unexpected LT
Failed to find catver.ini, list may be inaccurate
Failed to find nplayers.ini, list may be inaccurate
Failed to find gameplay.ini, list may be inaccurate
Processing gamelist.txt
Processing listfull.txt
Could not find controls.xml, is_in_controls_dat will be inaccurate
Processing boundary file .\ssf.txt
Writing intermediate file listgen.tmp
Reading intermediate file into filter database
Filtering database into result.tmp
Writing game list to makemovies.bat

D:\ListGen>


Any help would be *greatly* appreciated.

dot

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: new rom list generator thingy.
« Reply #4 on: October 27, 2006, 11:05:26 pm »
Okay,

What kind of list do you want to generate?

Also, it's possible the XML changed again in v0.109 and ListGen needs to be updated.

Please contact me at buddabing AT houston DOT rr DOT com and I'll help you out.

Regards,
Buddabing
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!

Bill Mote

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 202
  • Last login:May 29, 2010, 11:04:28 pm
  • Focus on making things better not bigger.
    • Things That Make Me Mad and How To Fix Them
Re: new rom list generator thingy.
« Reply #5 on: October 27, 2006, 11:34:17 pm »
I'm okay with SQL.  I just can't figure out what to do ...

dot

rockin_rick

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 495
  • Last login:May 27, 2017, 09:20:20 am
Re: new rom list generator thingy.
« Reply #6 on: December 23, 2006, 12:39:40 am »
NOP-

Thanks for the useful tool.

I was wondering about your example of your your cab (with the 4-way & 1 button) - your resultant list would have only games with one button, but no games with zero buttons, correct?  How did you handle this (as I assume that you wanted a list of games that could be played on your cab, not just games that actually used that one button)?  I'm guessing you've already ran into this, as [ms.] pac-man would have gotten filter out...

This leads me to wonder if there is a way to exclude/include a range of button amounts, IOW create a list of games that used 2 or less buttons.  Is it possible to "-find:buttons<=2" to get the output to have all games that have 0, 1, or 2 buttons?

Or is it necessary to run multiple passes first excluding 10 button games "-find:-buttons=10", then on the next pass "-find:-buttons=9", then "-find:-buttons=8", then "-find:-buttons=7", then "-find:-buttons=6", then "-find:-buttons=5", then "-find:-buttons=4", and finally "-find:-buttons=3"?

Thanks,
Rick
If I do not respond to your post in a timely manner, feel free to PM me.

NOP

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 916
  • Last login:September 19, 2017, 08:22:27 pm
  • I stole my avatar.
    • winterMAME
Re: new rom list generator thingy.
« Reply #7 on: December 28, 2006, 10:29:33 am »
Just use the - operator on the search criteria to find a not condition.
I did a "rl -in:allgames.xml -out:nobuttons.xml -find:-"buttons="

and it appears to have found all the roms where there is no entry for "buttons=x" which should give you what you're looking for.  Dumping out the rom list from that output gave me all the pacman and variants, frogger, crushroller, and all the others. 

I see that I didn't mention that there's a NOT operator on the search in my example. (sorry!)
If you do a RL /? on the command line, you'll get all the features.

Hope that helps.

-jeff!

rockin_rick

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 495
  • Last login:May 27, 2017, 09:20:20 am
Re: new rom list generator thingy.
« Reply #8 on: December 28, 2006, 11:13:15 pm »
I did some testing with this and mame 0.110.  Your example instructions to sort cocktail games don't work with the xml format generated with 110.  When I did the steps you listed in the first post, the generated list contained 0 games.  Here's what I discovered with those search terms:

  • "cocktail" - This term is only used in dipswitch settings, so this seems effective to find games for your cocktail.  I'm not sure if there are other games that don't have a dipswitch labeled cocktail - if so they wouldn't make the list.  RL found 1997 matches (of 6283)
  • "vertical" - This term is only used in dipswitch settings on games that allowed you to change the orientation.  Searching for vertical in the resultant cocktail list only found 15 matches (of 1997)
  • "-cloneof" - Works fine.  Reduced list from 15 to 10.
  • "buttons=1" - Seems to work as expected, even though the xml is buttons="1".  Hmmm   List is down to 3.
  • "joy4way" - found 0.

The main problem is the orientation.  Perhaps the xml format changed this info from saying horizontal or vertical to what it is now (plus number of sets that have those attributes):

  • rotate="0" (4370 of 6283) horizontal
  • rotate="90" (890 of 6283) vertical
  • rotate="180" (116 of 6283) horizontal
  • rotate="270" (907 of 6283) vertical

I found that to generate a list of only vertical games, you need to do 2 steps:

  • rl -in:cocktail.xml -out:not180.xml -find:-rotate="180" (1979 of 1997)
  • rl -in:not180.xml -out:vertical.xml -find:-rotate="0" (1192 of 1979)

This results in a list that includes 1192 sets rather than the 15!

Next up is parents only:

  • rl -in:vertical.xml -out:noclones.xml -find:-cloneof (540 of 1192)

Now for buttons.  Using -find:buttons=1 only generates a list that includes sets that have buttons="1" in the input field.  I'm no expert on the mame xml format nor did I check each set (!), but it appears that when a set doesn't have any buttons, there is no buttons="x" tag in the input field.  IOW- it doesn't say buttons="0", rather the buttons="x" doesn't exist.  Going with:

  • rl -in:noclones.xml -out:1button.xml -find:buttons=1 (222 of 540)
 

This list filters out sets that don't have a button="x" tag - for example, Crush Roller and Frogger are not in the resultant list.  However, Ms. Pac-Man is since it has a tag that (incorrectly?) says buttons="1".  :shrug:

It seems that if you want the games with zero buttons in your list, you have to either add them in manually at the end (which would be time consuming to do), or do a progressive button removal such as:

  • rl -in:noclones.xml -out:lessthan10buttons.xml -find:-buttons=10 (found 0)(540 of 540)
  • rl -in:lessthan10buttons.xml -out:lessthan9buttons.xml -find:-buttons=9 (found 0)(540 of 540)
  • rl -in:lessthan9buttons.xml -out:lessthan8buttons.xml -find:-buttons=8 (found 3)(537 of 540)
  • rl -in:lessthan8buttons.xml -out:lessthan7buttons.xml -find:-buttons=7 (found 0)(537 of 537)
  • rl -in:lessthan7buttons.xml -out:lessthan6buttons.xml -find:-buttons=6 (found 2)(535 of 537)
  • rl -in:lessthan6buttons.xml -out:lessthan5buttons.xml -find:-buttons=5 (found 5)(530 of 535)
  • rl -in:lessthan5buttons.xml -out:lessthan4buttons.xml -find:-buttons=4 (found 12)(518 of 530)
  • rl -in:lessthan4buttons.xml -out:lessthan3buttons.xml -find:-buttons=3 (found 33)(485 of 518)
  • rl -in:lessthan3buttons.xml -out:lessthan2buttons.xml -find:-buttons=2 (found 238)(247 of 485)
  • ***just checking***rl -in:lessthan2buttons.xml -out:lessthan1buttons.xml -find:-buttons=1 (found 222)(22 of 247)

You wouldn't want to use that last one, as it filters down to 0 buttons.  It does show that there are 22 sets that have zero buttons that would not be in the list had you only ran the single "-find:buttons=1".  These 22 would also have to be found and inserted manually if you don't do the progressive filter shown above.

Let's go on to joy4way:

  • rl -in:lessthan2buttons.xml -out:4wayonly.xml -find:joy4way (73 of 247)

73 with 4 way joysticks.  This excludes both up/down and right/left 2 way sets, such as galaga, mappy, space invaders, pooyan, zzyzzyxx.

Well, I've come this far so....  I manually searched through the "lessthan2buttons.xml" to find just what other controls were listed in that file to be excluded.  They were:

  • rl -in:lessthan2buttons.xml -out:no8way.xml -find:-joy8way (found 99)(148 of 247)
  • rl -in:no8way.xml -out:no8wayorpaddle.xml -find:-paddle (found 5)(143 of 148)
  • rl -in:no8wayorpaddle.xml -out:no8wayorpaddleorball.xml -find:-trackball (found 7)(136 of 143)
  • rl -in:no8wayorpaddleorball.xml -out:no8wayorpaddleorballordial.xml -find:-dial (found 3)(133 of 136)
  • rl -in:no8wayorpaddleorballordial.xml -out:2or4ways.xml -find:-doublejoy4way (found 2)(131 of 133)

That finds 58 more parents that don't have a 4 way joystick, but can be used with the 4 way.

This gives a grand total list of 131 parent sets that can be used with a control panel that has a 4 way joystick and 1 button on a vertically orientated cocktail that has dipswitch settings for cocktail mode.

Hope this helps someone!

Rick
« Last Edit: December 28, 2006, 11:15:23 pm by rockin_rick »
If I do not respond to your post in a timely manner, feel free to PM me.

rockin_rick

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 495
  • Last login:May 27, 2017, 09:20:20 am
Re: new rom list generator thingy.
« Reply #9 on: December 28, 2006, 11:30:32 pm »
I'll condense what I just did to only the actual steps...

  • mame -listxml > allgames.xml
  • rl -in:allgames.xml -out:cocktail.xml -find:cocktail
  • rl -in:cocktail.xml -out:not180.xml -find:-rotate="180" (1979 of 1997)
  • rl -in:not180.xml -out:vertical.xml -find:-rotate="0" (1192 of 1979)
  • rl -in:vertical.xml -out:noclones.xml -find:-cloneof (540 of 1192)
  • rl -in:noclones.xml -out:lessthan10buttons.xml -find:-buttons=10 (found 0)(540 of 540)
  • rl -in:lessthan10buttons.xml -out:lessthan9buttons.xml -find:-buttons=9 (found 0)(540 of 540)
  • rl -in:lessthan9buttons.xml -out:lessthan8buttons.xml -find:-buttons=8 (found 3)(537 of 540)
  • rl -in:lessthan8buttons.xml -out:lessthan7buttons.xml -find:-buttons=7 (found 0)(537 of 537)
  • rl -in:lessthan7buttons.xml -out:lessthan6buttons.xml -find:-buttons=6 (found 2)(535 of 537)
  • rl -in:lessthan6buttons.xml -out:lessthan5buttons.xml -find:-buttons=5 (found 5)(530 of 535)
  • rl -in:lessthan5buttons.xml -out:lessthan4buttons.xml -find:-buttons=4 (found 12)(518 of 530)
  • rl -in:lessthan4buttons.xml -out:lessthan3buttons.xml -find:-buttons=3 (found 33)(485 of 518)
  • rl -in:lessthan3buttons.xml -out:lessthan2buttons.xml -find:-buttons=2 (found 238)(247 of 485)
  • rl -in:lessthan2buttons.xml -out:no8way.xml -find:-joy8way (found 99)(148 of 247)
  • rl -in:no8way.xml -out:no8wayorpaddle.xml -find:-paddle (found 5)(143 of 148)
  • rl -in:no8wayorpaddle.xml -out:no8wayorpaddleorball.xml -find:-trackball (found 7)(136 of 143)
  • rl -in:no8wayorpaddleorball.xml -out:no8wayorpaddleorballordial.xml -find:-dial (found 3)(133 of 136)
  • rl -in:no8wayorpaddleorballordial.xml -out:finallist.xml -find:-doublejoy4way (found 2)(131 of 133)
  • rl -in:finallist.xml -out:romlist.txt -r

You may need to change the section that does the control weeding if you decide to change any of the searches before getting to the control section.  Perhaps if you only filter the buttons down to 2 or less, there may be some set that uses a different control that I didn't find when I looked through the sets with 1 button or less.  This could also apply to the orientation, or whatever....  Maybe a doublejoy8way would sneak in there! :shrug:

Thanks again, Jeff for offering this to us!

Rick
If I do not respond to your post in a timely manner, feel free to PM me.

NOP

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 916
  • Last login:September 19, 2017, 08:22:27 pm
  • I stole my avatar.
    • winterMAME
Re: new rom list generator thingy.
« Reply #10 on: December 29, 2006, 10:55:08 am »
I did some testing with this and mame 0.110.  Your example instructions to sort cocktail games don't work with the xml format generated with 110. 

That's plenty irritating.  As warned by buddabing that some of the fields were going to change since I wrote this using MAME 103, but I had no idea that the implications were going to be this much of a headache.

Quote
  • "cocktail" - This term is only used in dipswitch settings, so this seems effective to find games for your cocktail.  I'm not sure if there are other games that don't have a dipswitch labeled cocktail - if so they wouldn't make the list.  RL found 1997 matches (of 6283)

True, any game that was cocktail only (no dipswitch setting) would be missed by this.  I don't know of any offhand, so hopefully we're not missing out on something.  I suspect the possibility of this would be pretty slim.


Quote
  • "vertical" - This term is only used in dipswitch settings on games that allowed you to change the orientation.  Searching for vertical in the resultant cocktail list only found 15 matches (of 1997)
The main problem is the orientation.  Perhaps the xml format changed this info from saying horizontal or vertical to what it is now (plus number of sets that have those attributes):

  • rotate="0" (4370 of 6283) horizontal
  • rotate="90" (890 of 6283) vertical
  • rotate="180" (116 of 6283) horizontal
  • rotate="270" (907 of 6283) vertical

Yeah, that's certainly changed in the later versions.  It used to be REALLY easy to pull out all the vertical games or horizontal games in 1 pass by just looking for those keywords. 

I think adding an option to do multiple -find: statements on the cmd line to produce an OR condition would work:

rl -in:blah -out:blahout -find:rotate=90 -find:rotate=270   would produce the same results as the old "-find:vertical"   I may have to add some kind of operators to it so you could do something fancier like finding THIS and THAT but not THOSE types of conditions. 
With a big OR/AND list, you could probably knock your entire selection criteria into 1 extremely long command line.


Quote
  • "buttons=1" - Seems to work as expected, even though the xml is buttons="1".  Hmmm   List is down to 3.

I ignore quotes, which is why this works.  IIRC (been awhile since I looked at the code) I treat quotes on the input as a single item, but ignore them in the actual xml file.  At least that's the way I'd like it to work.   :D


Quote
Now for buttons.  Using -find:buttons=1 only generates a list that includes sets that have buttons="1" in the input field.  I'm no expert on the mame xml format nor did I check each set (!), but it appears that when a set doesn't have any buttons, there is no buttons="x" tag in the input field.  IOW- it doesn't say buttons="0", rather the buttons="x" doesn't exist.

Right.  That's what I was getting at in my above post.  If there's no "buttons=x" line, then a "-find:-buttons=" should pick out all the games that DON'T have that field, and should give you all the froggers, pacmans and the like. (minus the Ms. Pacman which actually has an incorrect buttons fields.)  At least that worked for me on my pre-110 xml file I have handy here.

So maybe I'm over or under thinking this, but I don't see a problem with the way the buttons stuff is handled.  If you wanted to find all the games that support 0 or 1 buttons, you'd only have to run the utility twice on your list. 

This is likewise with the joystick tags.  Once you take the master list and strip out all the vertical, cocktail games, you then need to branch off that to strip it down to the various button and joystick combos that you support.  You wouldn't end up with all of the games in 1 final xml output file in the end, but (for me anyway) the xml file was a temporary file to begin with.  The final list, generated from the -r command was what the ultimate goal was, and it's easy enough to splice together those lists.

Anyway, the source is currently open on my desktop, so it's time to start implementing some new features...

-jeff!

rockin_rick

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 495
  • Last login:May 27, 2017, 09:20:20 am
Re: new rom list generator thingy.
« Reply #11 on: December 29, 2006, 07:40:19 pm »
This topic has branched out into another thread, let's keep all further discussion of rl HERE IN THIS THREAD!

Here's where that other info is:
http://forum.arcadecontrols.com/index.php?topic=61261.msg610080#msg610080

Jeff posted an update to rl there, but let's discuss it here!

Rick
If I do not respond to your post in a timely manner, feel free to PM me.

rockin_rick

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 495
  • Last login:May 27, 2017, 09:20:20 am
Re: new rom list generator thingy.
« Reply #12 on: December 29, 2006, 07:41:25 pm »
Jeff,

Thanks for the update!  I think that the boolean switches will help a lot.  I have some other ideas, if you are interested...  (I've yet to try the new version)

------------------------------------------

Maybe you could add -v and -h switches to "automate" the orientation filter?  Like:

rl -in:allgames.xml -out:vertical.xml -v

would internally generate:

rl -in:allgames.xml -out:vertical.xml -find:"rotate=270 | rotate=90"

(Likewise with the horizontal...)


This may be a nice "shortcut" as I'd imagine that most users of rl would filter to orientation for their list...

This would work with the current xml format, and for compatibility with the older format, the user can just use:

rl -in:allgames.xml -out:vertical.xml -find:vertical

------------------------------------------

I like the batch file copy switch.  Perhaps you could add the path to copy to (what is outputted) after the -b switch, such as:

rl -in:8wayand4way.xml -out:copyroms.bat -b:q:\path\

would produce your example, and:

rl -in:8wayand4way.xml -out:copyroms.bat -b:F:\filtered_roms

would produce:

copy rugrats.zip F:\filtered_roms
copy friskyt.zip F:\filtered_roms
copy friskyta.zip F:\filtered_roms
copy seicross.zip F:\filtered_roms
copy sectrzon.zip F:\filtered_roms

That would be a nice touch, but I don't really have any problem with a global search and replace...

------------------------------

I assume that spaces are not allowed in the -in and -out filenames, right?  Can spaces be used if the filename is enclosed in quotes?  Such as:

rl -in:"8way and 4way.xml" -out:copyroms.bat -b:q:\path\

Perhaps this would be a good addition?  Not that I need this change, I don't have a problem with not using spaces - just wondering.

-----------------------------------

Can the path be changed in the -in and -out?  This is not necessary as it's fine if not - just wondering...  not sure if it's worth the trouble of modifying...

rl -in:q:\mame\rl\8wayand4way.xml -out:q:\mame\rl\lists\copyroms.bat -b:q:\path\

or

rl -in:..\8wayand4way.xml -out:copyroms.bat -b:q:\path\

Perhaps enclose in quotes?  Like

rl -in:"q:\mame\rl\8wayand4way.xml" -out:"q:\mame\rl\lists\copyroms.bat" -b:q:\path\

-----------------------------------

Reading your post on the unrunnable tags makes me think that maybe you don't quite understand (apologies if you do...)

You said runnable a few times, but I think that you meant unrunnable?

MORE IMPORTANTLY - If a game is not runnable, then the game is at the end of the list with all the other unrunnable games.  It is NOT duplicated in the list above.  IOW - there is only ONE instance of the game (in only ONE <game></game> field.  So IT IS NOT that the game is in the "top" part of the file (without the runnable="no"), and then at the "bottom" lists it as unrunnable - IT ONLY lists the game in the "bottom" with the runnable="no" field.  So you shouldn't need to "pull out" a game that you previously let through the filter once you encounter the runnable="no" - it hasn't been through the filter to begin with!

Do I not understand what you mean?

BUT - I don't know if you need to change anything, as rl now ignores the unrunnable games and excludes them from the list.  So even if you do a:

rl -in:allgames.xml -out:all_runnable_games.xml -find:source  (source is in all games including unrunnables)

then rl will still report "found 6283 of 6283" BUT will take out the unrunnables.  I don't see a need to want unrunnables in my list, but perhaps others would.  :shrug:

-------------------------------------------

Perhaps a alphabetize switch for the -r and -d?  Since you don't load the entire file in memory, this would require you to do this (and major reprogramming, I assume).  I don't expect you to really do this, perhaps this is an idea to keep in mind if you ever change to loading it all in memory (or are really bored and want to go for it!).

OK, I don't expect this in the program, so is there a freeware utility out there that will do this for me with the output of either the -r or -d switches?

----------------------------------------------

I'll try to find time tonight to test out the new version, and I'll ponder some more...

Thanks again,
Rick
If I do not respond to your post in a timely manner, feel free to PM me.

rockin_rick

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 495
  • Last login:May 27, 2017, 09:20:20 am
Re: new rom list generator thingy.
« Reply #13 on: December 29, 2006, 08:06:41 pm »
Now for buttons.  Using -find:buttons=1 only generates a list that includes sets that have buttons="1" in the input field.  I'm no expert on the mame xml format nor did I check each set (!), but it appears that when a set doesn't have any buttons, there is no buttons="x" tag in the input field.  IOW- it doesn't say buttons="0", rather the buttons="x" doesn't exist.

Right.  That's what I was getting at in my above post.  If there's no "buttons=x" line, then a "-find:-buttons=" should pick out all the games that DON'T have that field, and should give you all the froggers, pacmans and the like. (minus the Ms. Pacman which actually has an incorrect buttons fields.)  At least that worked for me on my pre-110 xml file I have handy here.

So maybe I'm over or under thinking this, but I don't see a problem with the way the buttons stuff is handled.  If you wanted to find all the games that support 0 or 1 buttons, you'd only have to run the utility twice on your list. 

This is likewise with the joystick tags.  Once you take the master list and strip out all the vertical, cocktail games, you then need to branch off that to strip it down to the various button and joystick combos that you support.  You wouldn't end up with all of the games in 1 final xml output file in the end, but (for me anyway) the xml file was a temporary file to begin with.  The final list, generated from the -r command was what the ultimate goal was, and it's easy enough to splice together those lists.

Anyway, the source is currently open on my desktop, so it's time to start implementing some new features...

-jeff!

It is true that this will work and generate multiple lists.  I was under the assumption that you were saying that your method only generated one list (and I was trying to achieve this).

While this may work OK with your 1 button example, the problem multiplies when you have say 3 or 4 buttons.  Then you end up with 4 or 5 lists.  This then multiplies once you do the same with the joysticks.  For example, if you have 3 buttons with a 4-way joy (as I intend to), then without doing the "subtraction" method that I described in the previous post, you end up with 12 lists which will all require stitching together later.  (4 button files x 3 joystick possibilities)  This would also require 12 passes just for the joystick filters + 4 passes for the buttons.  This negative effect is mitigated with the addition of the AND and OR functionality, though.   ;)

However, the multiple AND and OR functionality (as you said you were trying for) should take care of this problem and allow the generation of only one list without needing the user to stitch together multiple lists.  :applaud:


Don't get me wrong, I understand this is freeware and am willing to take what is given to me and do what it takes to get it to work - I'm not bitching!  I'm glad that you are taking the time to make this more convenient to use!

Rick
If I do not respond to your post in a timely manner, feel free to PM me.

rockin_rick

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 495
  • Last login:May 27, 2017, 09:20:20 am
Re: new rom list generator thingy.
« Reply #14 on: December 30, 2006, 07:37:43 pm »
Jeff,

I have a cool idea come to me in the middle of the night last night.  How about the ability to output a .csv file for use in a spreadsheet?  Perhaps something like:

  • rl -in:in.xml -out:out.xml -c:description,name,buttons,control,rotate

This would generate:

PuckMan (Japan set 2),puckmana,1,joy4way,90
Mappy (US),mappy,1,joy2way,90
Mario Bros. (US),mario,1,joy2way,180

(I'm not sure how the .csv file format generates a carriage return so there might me something needed at the end of each line)

Maybe you could allow the term "orientation" like:

  • rl -in:in.xml -out:out.xml -c:description,name,buttons,control,orientation

which would output:

PuckMan (Japan set 2),puckmana,1,joy4way,vertical
Mappy (US),mappy,1,joy2way,vertical
Mario Bros. (US),mario,1,joy2way,horizontal

To acomplish this, you'd have to check each for rotate values, then substitute vertical or horizontal in the output.


Certanily other keywords in the <game> section can be used, too, like year, manufacturer, coins, dipswitch name, driver status, etc.  The dipswitch name may be tricky as there can be more than one in the game...  Not sure how to handle that...


Also it would be nice if you could allow a null entry to create an empty column like:

  • rl -in:in.xml -out:out.xml -c:description,name,,buttons,control

Which would generate:

PuckMan (Japan set 2),puckmana,,1,joy4way
Mappy (US),mappy,,1,joy2way

This would be beneficial in a spreadsheet to create an empty column.  I suppose that you could just do a Insert Column in your spreadsheet (just realized that).


Allowing the output to be easily imported into a spreadsheet should also make for easy alphabetizing and not require the program to do it.  You could also sort other fields, too like year, or manufacturer.  Lots of sorting and comparing options open up.

A couple months ago, I created a spreadsheet file of games, orientations, controls, buttons, etc by wading through KLOV to get data.  It took quite a while, but I was able to sort the list to a specific control and see how many buttons each used.  Mainly I wanted to see just how many vertical games used how many buttons and how many used 8ways.  Using rl to generate a .csv would have helped a lot!

Later,
Rick



If I do not respond to your post in a timely manner, feel free to PM me.

rockin_rick

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 495
  • Last login:May 27, 2017, 09:20:20 am
Re: new rom list generator thingy.
« Reply #15 on: December 30, 2006, 07:47:11 pm »
edit:  the details of this post are a bit wrong and are clairified and better described in my next post...


Perhaps you could change the command line output to say something like:

Found 4172 ROMs out of 6283 total matching xxxxx - 4172 in output file.

The current method makes it easy to tell how many are left ONLY if you don't use the - (NOT) in the find (as in the above example).  If you were to do a -find: with the NOT (like -find:-buttons=1), then it tells you how many it found, but not how many are left.  Sure I could do the simple subtraction, but it would be nice if rl just did it for me!

So if you had done a -find:-buttons1 then

Found 2111 ROMs out of 6283 total matching xxxxx - 4172 in output file.


I think that this would be handy, and seems easy to implement (just a subtraction?)

Later,
Rick

« Last Edit: January 02, 2007, 05:47:07 pm by rockin_rick »
If I do not respond to your post in a timely manner, feel free to PM me.

rockin_rick

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 495
  • Last login:May 27, 2017, 09:20:20 am
Re: new rom list generator thingy.
« Reply #16 on: January 02, 2007, 05:44:19 pm »
I did some testing with the new version, and it seems to work as designed.

I discovered that my specifics of the number of "found" and "excluded" were a bit wrong in the previous post, however I think the jist of it was explained.  To me, when it is an inclusion search (without the NOT switch, like "-find:joy4way"), then the output makes good sense.  However, when it does an exclusion search (with the NOT switch), then it's mildly confusing.  Like:

  • rl -in:allgames.xml -out:noclones.xml -find:-cloneof

Says:

  • Found 3374 ROMs out of 6283 total matching -cloneof


It's an accurate statement, but it seems a bit odd.  To me, it would make more sense to say:

  • Found 3374 ROMs out of 6283 total that didn't match cloneof

Better yet:

  • Found 3374 ROMs out of 6283 total that didn't match cloneof - 2909 excluded

or:

  • Found 2909 ROMs out of 6283 total matching cloneof - 3374 remaining in output file.



Perhaps the inclusion search could also reflect the number excluded:


  • Found 1997 ROMs out of 6283 total matching cocktail - 4286 excluded
  • Found 1997 ROMs out of 6283 total matching cocktail - 1997 remaining in output file.

I suppose it's a small detail that may not matter enough to bother with...

---------------------------------------------

I also discovered that my text/hex editor makes for easy alphabetizing with what is output now, so I don't think that you need to bother with that.

---------------------------------------------

Still think that the .csv output would be cool!


Rick
« Last Edit: January 02, 2007, 05:47:53 pm by rockin_rick »
If I do not respond to your post in a timely manner, feel free to PM me.

NOP

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 916
  • Last login:September 19, 2017, 08:22:27 pm
  • I stole my avatar.
    • winterMAME
Re: new rom list generator thingy.
« Reply #17 on: January 03, 2007, 05:32:38 pm »
Got some more time today to work on it, and it's getting crazy pretty quick.
Added () operators, and the ability to do multiple & and |'s on the same command line:

-find:"((orientation=vertical & cocktail) & (joy4way | joy8way) & (buttons=1 | -buttons))"
should pull out all the vertical cocktail games that are 4way or 8way, and have 1 or 0 buttons.  sheesh.  (I realize the orientation=vertical stuff is now obsolete-I really need to get a fresh xml file to start with!)




This should also work:

-find:"((buttons=3 | buttons=2 | buttons=1 | -buttons=) & (joy4way | joy8way) & cocktail)"

Although I'm 2nd guessing myself that the straggling & will work there.  I've run out of development time for the day, but just wanted to give a status update.  I should be able to test this tomorrow, and I'll look at the csv format as well.  I still need to go through the "unplayable" feature as well, as mentioned in the other thread.   Yikes.  Lots of work to do! 

I should probably switch the not operator of - to a ! to be consistent with C programming languages. (I'll allow either)

rockin_rick, you are officially my guinea pig for testing this stuff, so get ready!   ;D

-jeff!

NOP

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 916
  • Last login:September 19, 2017, 08:22:27 pm
  • I stole my avatar.
    • winterMAME
Re: new rom list generator thingy.
« Reply #18 on: January 04, 2007, 03:53:44 pm »
ok, version 1.2 is finished. (and lightly tested)

http://www.waste.org/~winkles/rl_1p2.zip

New stuff:

-csv  Creates a file containing comma separated values (for importing in spreadsheets and databases) of any criteria you want.
      Specify the criteria in the -find: option.

rl -in:allgames.xml -out:outdata.csv -find:"year,game name=,description,buttons=,control=" -csv
 
Results in a file like this:

1981,froggers,Frog,-,joy4way
1982,amidars,Amidar (Scramble hardware),2,joy4way
1982,triplep,Triple Punch,1,joy4way
1982,knockout,Knock Out!!,1,joy4way
1981,mariner,Mariner,2,joy8way

The search routine will find any criteria located inside of quotes, such as buttons="3" or inside <> </> such as <year>1984</year>

Any field where no match was found, the program will simply insert a - to keep the separated fields in line when importing into a spreadsheet.  (such as froggers above, there was no "buttons=" statement in the ROM description.)


And as detailed in the previous post, support for multiple search criteria and operators is now fully implemented.  With this new support, my initial search for roms can now be done in nearly 1 command line:

rl -in:allgames.xml -out:jeffsgames.xml -find:"((orientation=vertical & cocktail) & (buttons=1 | !buttons=) & joy4way)"   :)


I don't think having detailed # of items found messages are going to work anymore now that you can do & and | operations all on the same command line.  It would just get ugly quick.

I've not had any inspiration for the runnable tags request yet either.   

-jeff!

Havok

  • Keeper of the __Blue_Stars___
  • Trade Count: (+17)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4530
  • Last login:June 22, 2025, 02:32:40 am
  • Insufficient facts always invite danger.
Re: new rom list generator thingy.
« Reply #19 on: January 05, 2007, 09:41:38 am »
This is quickly becoming an offline version of Maws! I love what you've done so far. Once that runnable search is implemented, we'll send you a major award!

 :applaud:

NOP

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 916
  • Last login:September 19, 2017, 08:22:27 pm
  • I stole my avatar.
    • winterMAME
Re: new rom list generator thingy.
« Reply #20 on: January 05, 2007, 03:01:59 pm »
I guess that was just the inspiration I needed! :D

version 1.3:

http://www.waste.org/~winkles/rl_1p3.zip

New stuff:

added -working switch.  Use this as the last parameter on the command line.

It'll now go through and catalog up all the ROM names listed as runnable="no" and then make the regular pass through the xml file matching your search criteria.
When it finds a criteria match, it then checks against the runnable=no database, and if the ROM is in there, it'll quietly skip over it.  Hopefully that's what you were after.

Likewise if you use -b, -r, or -d along with -working, it'll skip printing out the ROM name/description/batch file command if it finds that a ROM isn't runnable.

If you use -csv and -working together, you can then pull fields out of the runnable="no" section of the XML file.  For example, typing:

rl -in:allgames.xml -out:list.txt -find:"name=" -csv -working

will kick out a listing of all the ROMs that have runnable="no" flagged.

BTW: sorta forgot to mention that you can always skip the -out: argument altogether and it'll just list to the screen.


Hopefully that'll wrap it up for awhile.  Please kick this one around some and let me know if it doesn't do what you expect it to.

-jeff!

rockin_rick

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 495
  • Last login:May 27, 2017, 09:20:20 am
Re: new rom list generator thingy.
« Reply #21 on: January 06, 2007, 12:33:36 am »
Hi Jeff,

I just was able to check on this board and have found 2 updates, wow!  I will do some testing of this tomorrow night and give you some opinions.  Sounds good so far!

Rick
If I do not respond to your post in a timely manner, feel free to PM me.

rockin_rick

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 495
  • Last login:May 27, 2017, 09:20:20 am
Re: new rom list generator thingy.
« Reply #22 on: January 06, 2007, 12:35:22 am »
This is quickly becoming an offline version of Maws! I love what you've done so far. Once that runnable search is implemented, we'll send you a major award!

 :applaud:


Be careful, that thing is frageeley...

Rick
If I do not respond to your post in a timely manner, feel free to PM me.

rockin_rick

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 495
  • Last login:May 27, 2017, 09:20:20 am
Re: new rom list generator thingy.
« Reply #23 on: January 13, 2007, 03:01:53 am »
FINALLY got some time to try this out.  Working pretty good.  A bit complicated at first if you want to do it all on one line!

Seems to work fine, but there are a few issues.  One is outputting a csv of the description and the description includes a comma.  That screws up that row.  Perhaps a check for commas could be done and replace them with something else (perhaps a hyphen "-")?

Your instructions to output to csv for control should be "control type=" rather than "control=".

There are some games that have multiple controls and rl will only pull out the first for csv output.  I noticed this when I pulled out dial games, and there were just as many games that listed non-dial controls in the csv due to it being the first control listed in the xml.  Perhaps rl could output all of the listed controls with a "&" between each (so they all end up in the same column)?  I suppose that this should also apply for other fields, too (like dipswitch name).

I realize that this is a lot of work and not needed, but what are your plans for a gui?

I've been thinking about how mame reports controls wrong, and I wonder if controls.dat could somehow be integrated to allow more accurate lists to be generated.  As it is now, I'm left wondering just what isn't in the list that could be, and/or what is that shouldn't be...  Not rl's fault, it works with what mame gives it, but it would be a nice bonus if it could more accurately generate lists via controls.dat.  Perhaps there could be a seperate program that will take the allgames.xml from mame, and fix it by reading controls.dat and correcting the allgames.xml, then rl can do it's thing on the patched allgames.xml.  :shrug: 

Will have to test more later...

Looouuuking gooouud

BTW - I think that it is better than MAWS (online or offline) as it can search out more than one choice for each parameter (like number of buttons).  MAWS will only let you pick one of each parameter.  (not that I don't like MAWS or that it's not extremely useful)

Rick
If I do not respond to your post in a timely manner, feel free to PM me.

NOP

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 916
  • Last login:September 19, 2017, 08:22:27 pm
  • I stole my avatar.
    • winterMAME
Re: new rom list generator thingy.
« Reply #24 on: January 15, 2007, 02:26:52 pm »
Quote
Seems to work fine, but there are a few issues.  One is outputting a csv of the description and the description includes a comma.  That screws up that row.  Perhaps a check for commas could be done and replace them with something else (perhaps a hyphen "-")?

Ah!  yes, that would mess it up.  I can either replace commas in the description, or perhaps use a different delimiter for the deliminating.   I think an underscore would be best for comma replacement, otherwise I could switch to tab delimination or perhaps | ?
Either one is super easy to do.

Quote
Your instructions to output to csv for control should be "control type=" rather than "control=".

bah.  Another thing changed in later revisions of the xml file.  ok, I JUST downloaded mame111, so now my xml file will be in line with the rest of the world.  Dunno what took me so long.  My next release will have documentation that matches the current xml formatting.


Quote
There are some games that have multiple controls and rl will only pull out the first for csv output.  I noticed this when I pulled out dial games, and there were just as many games that listed non-dial controls in the csv due to it being the first control listed in the xml.  Perhaps rl could output all of the listed controls with a "&" between each (so they all end up in the same column)?  I suppose that this should also apply for other fields, too (like dipswitch name).

Can you give me an example of this?  Just the gamename and what you want it to pull out should be sufficient.

Quote
I realize that this is a lot of work and not needed, but what are your plans for a gui?

I'm really not good at doing GUIs, but I think a mostly text based one, where it'll show you an "entry" for a game (everything between <game> and </game>) in a window, and you can copy+paste text from there into other text entry fields to build your & and | search criteria.  Then a couple radio buttons to select the output format or other switches.

I dunno.  Now that it support (&|! operators, it's still going to be confusing to build up the criteria that you want.  How do you express "(8way | 4way) & cocktail & !cloneof" with a GUI without just typing that in?  Unless I did a bunch of fields where you'd paste in a criteria you were looking for and selected not/and/or between them, but then I'm not sure how you'd group up fields as if they were in parenthesis.  Stupid GUIs.   :D


Quote
could more accurately generate lists via controls.dat.  Perhaps there could be a seperate program that will take the allgames.xml from mame, and fix it by reading controls.dat and correcting the allgames.xml, then rl can do it's thing on the patched allgames.xml.  :shrug: 

heh.  that's an interesting idea.  It probably wouldn't be too hard to do either, but I often say that about projects and then I'm still working on them a year later...

-jeff!


BuZz880

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 201
  • Last login:November 16, 2023, 02:16:43 pm
  • I'm a llama!
Re: new rom list generator thingy.
« Reply #25 on: January 15, 2007, 11:15:50 pm »
Heads up. They're changing a couple of fields in the XML info in v0.107. So your application may need to change once that happens.

Also, you might want to check out my ListGen utility which implements a SQL-based search on the XML information.



Hey Budda, don't forget you did up a Listgen Beta in September or so, I'd post the link but maybe there is a reason you did not.  Whats unique about listgen is it outputs in Mamewah format though that latest release does not give me quite what I want on my controller based lists at least with recent mame versions.

rockin_rick

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 495
  • Last login:May 27, 2017, 09:20:20 am
Re: new rom list generator thingy.
« Reply #26 on: January 16, 2007, 10:41:46 pm »
The 'multiple controls only outputting one' issue is that when there is more than one control listed in the xml, the .csv generation only uses the first one listed.  RL will correctly find and sort and generate fine in normal (non-csv output) mode - I'm not saying that the second (or more) control type fields are deleted.  The "problem" is in the .csv output mode.  When making the .csv, rl must "look" for control type=, and once it finds it, it no longer looks any more.

I discovered this when I wanted a list of vertical spinner games.  I first made a xml:

  • -find:((rotate=90 | rotate=270) & dial)

Then I generated the .csv:

  • -find:"description,game name=,control type=,buttons=,year,rotate=" -csv

Here's a sample of the csv generated:

Code: [Select]
Street Heat - Cardinal Amusements,strtheat,joy2way,3,1985,90
Super Speed Race,sspeedr,dial,1,1979,270
Kick (upright),kick,dial,1,1981,90
Tron (set 1),tron,joy8way,1,1982,90
Mad Planets,mplanets,joy8way,2,1983,270
Grand Champion,grchamp,vjoy2way,-,1981,270
Buggy Challenge,buggychl,dial,2,1984,270
Arkanoid (World),arkanoid,dial,1,1986,90
Vs. Hot Smash,hotsmash,dial,-,1987,90
Arkanoid - Revenge of DOH (World),arknoid2,dial,1,1987,270
Drift Out (Japan),driftout,joy8way,2,1991,270
Grid Seeker: Project Storm Hammer (Ver 1.3O),gseeker,joy8way,4,1992,90
Gunlock (Ver 2.3O 1994/01/20),gunlock,joy8way,4,1993,90

I was surprised to see so many controls that weren't "dial"!!  Seems that there are many games that have more than just a dial...

While the list is correct, but it would be nice if it listed all the controls for the game.  With the current method, you can't tell what other controls are needed.

Example:

Here's the input section of tron. 

Code: [Select]
<input players="2" buttons="1" coins="2" tilt="yes">
<control type="joy8way"/>
<control type="dial" sensitivity="50" keydelta="10" reverse="yes"/>
</input>

The .csv record generated currently for tron is:

  • Tron (set 1),tron,joy8way,1,1982,90

Perhaps it should/could be:

  • Tron (set 1),tron,joy8way & dial,1,1982,90

There are also some that have more than two...

  • Grand Champion,grchamp,vjoy2way & dial & pedal,-,1981,270


***********************************************************


I also wish that it didn't use "-" for null.  I vote for null for null:

  • Redline Racer (2 players),redlin2p,dial,,1987,270

This leaves any empty record in the spreadsheet.  Tested fine with my spreadsheet (I don't use excel, BTW... I use 602 software suite, an office clone).


***********************************************************


As for the extra comma(s) causing alignment issues:

I tried using | and it worked with my spreadsheet - it allows me to pick the delimiter - I don't know if all do... 

It would be easy for me to say, "yeah change it to '|', it works for me"!  But I'm really trying to help you shape this into something that anyone/everyone can use...

Whatever the method, I vote for maximum compatibility.  It seems that would be a comma delimiter, though...  It seems that description is the only field that would cause issues (although I didn't scour the entire xml).  Replacing the commas in the description field only wouldn't have any negative effects, looks good and conveys the intended message, and maintains comma delimiting for the file.


***********************************************************


You just got 111 - I've been using 110, FWIW  (I'm not certain, but I don't think that there are any (significant) changes).

I vote for maintaining old mame version compatibility.  I think that this is important.  I can imagine that a lot of people wanting to make a custom list (for say their cocktail table), are expecting to use an older CPU and also an older version of MAME.

So far, it seems that this is how it is.  It's just documentation that causes issues...


***********************************************************


Is the dipswitch "flip screen" the same as "cocktail"?  Or is it an "all the time rotate 180°" switch used at cabinet setup as a convenient way to adapt to monitor mounting?  Looking at arkanoid, there is a flip screen dipswitch and no cocktail.  Arkanoid was available in a cocktail, AFAIK.  Looking at arknoid2 (Arkanoid - Revenge of DOH (World)), and it has both a cabinet (cocktail/upright settings) dipswitch and a flip screen (off/on settings) dipswitch.

If flip screen is also cocktail flipping, then why are there 2 dipswitches?
 
Perhaps for generating a list of cocktail games, flip screen should also be sought out?

I wouldn't doubt if flip screen dipswitch labels meant something for one game and something else for another.  I'm guessing that they are labeled in mame as they were labeled by the manufacturer and the manufacturer may have labeled the switch as such although it had different functionality.  :shrug:


***********************************************************


I think about the gui if you have any interest in perhaps giving it a whirl.


Later,
Rick
If I do not respond to your post in a timely manner, feel free to PM me.

Havok

  • Keeper of the __Blue_Stars___
  • Trade Count: (+17)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4530
  • Last login:June 22, 2025, 02:32:40 am
  • Insufficient facts always invite danger.
Re: new rom list generator thingy.
« Reply #27 on: January 17, 2007, 10:22:22 am »
rl -in:allgames.xml -out:list.txt -find:"name=" -csv -working

will kick out a listing of all the ROMs that have runnable="no" flagged.
This is not working for me - perhaps I am doing something wrong? If I understand you correctly, running this query will return a list of all games that don't work in Mame? When I run this against a 111 xml file, it returns 28 entries. According to Mame32, there are 708 not working titles. Am I missing something?

NOP

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 916
  • Last login:September 19, 2017, 08:22:27 pm
  • I stole my avatar.
    • winterMAME
Re: new rom list generator thingy.
« Reply #28 on: January 17, 2007, 10:33:23 am »
  • Tron (set 1),tron,joy8way,1,1982,90

Perhaps it should/could be:

  • Tron (set 1),tron,joy8way & dial,1,1982,90

Yep, that seems reasonable to me.  I'll add that to the queue.

Quote
I also wish that it didn't use "-" for null.  I vote for null for null:

ok.  Not sure why exactly I didn't do that in the first place.  Should be easy to fix.

Quote
I tried using | and it worked with my spreadsheet - it allows me to pick the delimiter - I don't know if all do... 

Just opened excel, and it allows: tab, space, comma, semicolon or other, and you can type in whatever you want in the field.  If/when the GUI becomes available, I will have a similar dialog.  If you pick comma, then I'll maybe pop up a warning that the descriptions could cause import errors.

Quote
Is the dipswitch "flip screen" the same as "cocktail"?  Or is it an "all the time rotate 180°"

I've always seen flip screen as simply a way to change the monitor mounting, not as a means to flip for player 2.

According to KLOV, the original arkanoid didn't have a cocktail mode:
"Technical
The original does not have a cocktail mode. Bootlegs use DIP switch 1 to enable cocktail mode (screen flips for player 2)."

DOH does though.

So yeah, cocktail != flip screen.

Here's a prototype GUI that I came up with last night:



1) shows a full rom description in the main window that you can look at, copy-n-paste from, etc.
2) has basic checkboxes and radio buttons to do a very quick search for what you're looking for.
3) has an advanced mode on the bottom where you can type in your own search criteria.
4) the gui will build the command line for you as you click stuff, so you can always edit it.
5) select various output types on the side, and hit the search button.
6) there will be another screen prior to this one where you point it to MAME.EXE.  It'll spawn out and generate the allgames.xml file for you.

At least that's what was in my head.  Hopefully I can get it out of my head in a couple days.

-jeff!

rockin_rick

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 495
  • Last login:May 27, 2017, 09:20:20 am
Re: new rom list generator thingy.
« Reply #29 on: January 17, 2007, 03:43:06 pm »
rl -in:allgames.xml -out:list.txt -find:"name=" -csv -working

will kick out a listing of all the ROMs that have runnable="no" flagged.
This is not working for me - perhaps I am doing something wrong? If I understand you correctly, running this query will return a list of all games that don't work in Mame? When I run this against a 111 xml file, it returns 28 entries. According to Mame32, there are 708 not working titles. Am I missing something?

The -working switch lists the 28 games that the xml output of the -listxml marks as runnable="no".  I don't know what mame (or mame32) considers to be the difference between runnable and working...  I did notice that there are 714 games marked as emulation=preliminary - perhaps this has something to do with it.

I also found this with a google search:

Quote from: Mame source code file "info.c"
/* The runnable entry is an hint for frontend authors */
   /* to easily know which game can be started. */
   /* Games marked as runnable=yes can be started putting */
   /* the game name as argument in the program command line, */
   /* games marked as runnable=no cannot be started. */

So PERHAPS runnable="no" games cannot even be run from the command line, but non-working games can, but they will not work once ran....  I don't know  :dunno  Perhaps runnable non-working games have drivers in mame that don't yet work, but with non-runnable there aren't any drivers for that game?  :dunno

Perhaps the -working switch would be better named -runnable?

Rick

If I do not respond to your post in a timely manner, feel free to PM me.

NOP

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 916
  • Last login:September 19, 2017, 08:22:27 pm
  • I stole my avatar.
    • winterMAME
Re: new rom list generator thingy.
« Reply #30 on: January 17, 2007, 05:44:03 pm »
Yeah, I've lately discovered that the runnable flag is actually used to tell mame that the .zip file in question is actually a set of BIOS files or support files, not an actual game.  So, supporting it in RL is actually kinda dumb, as since they aren't games, they won't be found by the normal -find method anyway.

I rather think the -working switch should be removed, since I see no need for it now.

You can pull out games that don't work by doing a "& !status=preliminary" at the end of your search criteria. (or as you suggest, !emulation=preliminary)

-jeff!



rockin_rick

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 495
  • Last login:May 27, 2017, 09:20:20 am
Re: new rom list generator thingy.
« Reply #31 on: January 17, 2007, 05:46:13 pm »
Wow, gui isn't looking bad...


Just opened excel, and it allows: tab, space, comma, semicolon or other, and you can type in whatever you want in the field.  If/when the GUI becomes available, I will have a similar dialog.  If you pick comma, then I'll maybe pop up a warning that the descriptions could cause import errors.

I just checked mine, the delimiter chooser is just like your number of buttons 'chooser'.  It has in the drop down: comma, semicolon, and "\t" (which seems to be TAB).  It also allows  you to highlight and type in what you want.  So if it was like your buttons, you could highlight the "3" and type "7" if you'd like.

Your gui delimiter plan sounds good, but it would still be nice if the command line version did something about the comma problem.  Maybe you could add the delimiter to the -csv switch?

  • -csv:";"  (or similar)

Then the gui could just pass that to the command line.  I'm guessing that's what you are planning?

Quote
1) shows a full rom description in the main window that you can look at, copy-n-paste from, etc.

That's cool.

Quote
2) has basic checkboxes and radio buttons to do a very quick search for what you're looking for.

IMO, I would not use the texts "Find ROMs for a machine that is..." and the "and is" "with" "and has:"  instead I would simply:

Use an outlined box (like you used for misc) for each.

Label the first 'cabinet'.  Add a third option - 'either'.

The second label 'orientation', change to radio buttons, and add an either/both.

The next outlined box label 'buttons'.  Keep the drop down like it is, support up to 10 buttons.  Perhaps put the 'or less' checkbox under the dropdown. (for horizontal compaction)

The forth label 'controls'.  Keep the controls as checkboxes but add all that are possible.  A quick -find:"control type=" -csv and then a column sort in the spreadsheet makes it easy to find out that they are:

'null'
dial
doublejoy2way
doublejoy4way
doublejoy8way
joy2way
joy4way
joy8way
lightgun
paddle
pedal
stick
trackball
vdoublejoy2way
vjoy2way

Fifth label 'misc' (as it is).  Perhaps another checkbox for named "Working" that would add an emulation="preliminary"?  (see previous post)  Perhaps we should verify that is the tag that determines working or not....

Change the Playable label to Runnable (expecting that there is also a 'working' checkbox)?

Perhaps a sixth box labeled 'savestate' with a set of 3 choices via radio buttons: "supported", "unsupported" "either"

Maybe a seventh labeled 'display' with a set of 3 radio buttons: "raster", "vector", "either"

Maybe an eighth labeled 'coins' with a setup like the buttons (drop down, or less checkbox)  FYI - checking the allgames.xml, there are 1,2,3,4,5,6,8,null choices.  I'm not sure how important this is in the end, as I don't know what mame means/does with this value.

Quote
3) has an advanced mode on the bottom where you can type in your own search criteria.

A must.

Quote
4) the gui will build the command line for you as you click stuff, so you can always edit it.

Nice.

Quote
5) select various output types on the side, and hit the search button.

Cool.

Quote
6) there will be another screen prior to this one where you point it to MAME.EXE.  It'll spawn out and generate the allgames.xml file for you.

Perhaps you could skip this and instead, when search is clicked check to see if allgames.xml is found, if not then open a dialog that does what this initial screen does.  That way, the 'generate allgames.xml' screen is not seen every time the program starts once you've done it once.

*************************************************************

What will the Prev and Next buttons do?  Next game for display in the example box?  If so, perhaps a game name entry box could be added to find the one you want to see.


What does No Samples equate to (what command line text is generated)?  Games that do not require/use samples?  So then an empty check box = all games, and a check is games that don't require/use samples (-find:!samples)?

I checked out a few sample searches:

-find:samples = 370
-find:sample = 371
-find:"sample name" = 237

Why do records have:

      <chip type="audio" name="Samples"/>

but no sample names listed?  Are these games that require samples, but none yet are available?

I think that the one extra found with "sample" is rom=jumpshtp  It's description is "Jump Shot Engineering Sample".  Make sure to search for samples, not just sample.

I'm assuming that you are going to have in/out file buttons that open dialogs to select and/or enter filenames, huh?

Gotta run,
Rick
If I do not respond to your post in a timely manner, feel free to PM me.

Havok

  • Keeper of the __Blue_Stars___
  • Trade Count: (+17)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4530
  • Last login:June 22, 2025, 02:32:40 am
  • Insufficient facts always invite danger.
Re: new rom list generator thingy.
« Reply #32 on: January 17, 2007, 10:26:28 pm »
Yeah, I've lately discovered that the runnable flag is actually used to tell mame that the .zip file in question is actually a set of BIOS files or support files, not an actual game.  So, supporting it in RL is actually kinda dumb, as since they aren't games, they won't be found by the normal -find method anyway.

I rather think the -working switch should be removed, since I see no need for it now.

You can pull out games that don't work by doing a "& !status=preliminary" at the end of your search criteria. (or as you suggest, !emulation=preliminary)

-jeff!




I got the list to match Mame32's non working list by just doing a driver status=preliminary & emulation=preliminary...

rockin_rick

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 495
  • Last login:May 27, 2017, 09:20:20 am
Re: new rom list generator thingy.
« Reply #33 on: January 17, 2007, 10:44:25 pm »

I got the list to match Mame32's non working list by just doing a driver status=preliminary & emulation=preliminary...

I just realized that my 714 was probably because I'm using 110...  I had tried doing the driver status=preliminary & emulation=preliminary before and it was also 714.

I guess I'll start working with 111 to avoid more confusion...

Rick
If I do not respond to your post in a timely manner, feel free to PM me.

rockin_rick

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 495
  • Last login:May 27, 2017, 09:20:20 am
Re: new rom list generator thingy.
« Reply #34 on: January 17, 2007, 11:00:03 pm »
OK, I just did a -find:"(driver status=preliminary & emulation=preliminary)" on 111 and it came up with 740.

Havok, did you get 708?

Rick
If I do not respond to your post in a timely manner, feel free to PM me.

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: new rom list generator thingy.
« Reply #35 on: January 18, 2007, 07:10:35 am »
6) there will be another screen prior to this one where you point it to MAME.EXE.  It'll spawn out and generate the allgames.xml file for you.

PM me if you want the code to do this.

Havok

  • Keeper of the __Blue_Stars___
  • Trade Count: (+17)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4530
  • Last login:June 22, 2025, 02:32:40 am
  • Insufficient facts always invite danger.
Re: new rom list generator thingy.
« Reply #36 on: January 18, 2007, 08:43:27 am »
OK, I just did a -find:"(driver status=preliminary & emulation=preliminary)" on 111 and it came up with 740.

Havok, did you get 708?

Rick


Doh! Just double-checked this, and my results are 780. I am using Mame 111u3 command line and Mame32 111u3 to compare. I interposed the numbers when comparing... I've gotta get more sleep! At least it seems to be pretty close. I'll take a look and see what the difference is.

NOP

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 916
  • Last login:September 19, 2017, 08:22:27 pm
  • I stole my avatar.
    • winterMAME
Re: new rom list generator thingy.
« Reply #37 on: January 18, 2007, 01:31:40 pm »
ok, this is getting a little nuts, but I'll try to respond to everything without doing so much quoting:

Rick, on the GUI version, I'd decided that I wanted a super simple interface that was easy to use for beginners, so I think the text between the checkboxes acts as a sort of "wizard" to help people comprehend what the tool does.  With that in mind, I didn't want too many checkboxes or combinations that would end up being overwhelming for first time users.  Of course, eventually we all would like to have all 16 different controller types and all the various monitor orientation filters, so perhaps an "advanced mode" checkbox is in order.  The more checkboxes the more potential bugs, so release 1.0 of the GUI will probably be as stripped down as what you see, or perhaps even more stripped down, but we'll grow it from there.   :)

--

As for browsing for MAME/generate the XML file, I currently have it so that you can browse for MAME or if you've already generated the xml file, you can browse for that instead.  The main reason that I need to do that (for now anyway) is that the program will need to know where the file is located on the hard drive.  Later revisions can save paths into the registry, but for now you'll have to browse every time to get it started.  (the standard file browser somehow figures out where the previous path was, so it's not that much of a headache.) 

headkaze: thanks for the code offer!  (and I didn't know anyone else was reading this thread!)
I'm currently just using: 

                        CString arg;
         arg = m_fileName+" -listxml >allgames.xml";
         system (arg);

Which seems to do just fine.  You do get the DOS black screen popping up, but I'm ok with that at the moment.

--

Yes, the next/prev buttons will jump to the next <game></game> in the xml file.  I like the idea of having a search box there.  I think I'm also going to have a "hide roms" so you don't end up seeing so much of the ROM names/CRC/SHA1's that clutter up the game description.  (probably not in release 1)


So the next question is, should I continue working on the GUI, or do I do another release of the cmd line app to fix up the delimiter in the CSV file output?  Rick, I have a feeling you're the only one using it at the moment, so if you don't mind waiting for the GUI, that might be the best use of my time.

-jeff!
 

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: new rom list generator thingy.
« Reply #38 on: January 18, 2007, 07:55:44 pm »
'null'
dial
doublejoy2way
doublejoy4way
doublejoy8way
joy2way
joy4way
joy8way
lightgun
paddle
pedal
stick
trackball
vdoublejoy2way
vjoy2way

This list will increase in the near future, if my submittals get accepted.  I'm hoping by two more within a couple versions, another soon after, and maybe a fourth farther off.  FWIW, the two I'm most sure about are the new 16way & double16way.
Robin
Knowledge is Power

rockin_rick

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 495
  • Last login:May 27, 2017, 09:20:20 am
Re: new rom list generator thingy.
« Reply #39 on: January 19, 2007, 07:13:06 pm »
It doesn't matter to me what you work on, I don't have a real pressing need.  So I say do whatever you are in the mood to do.  But if I had to choose, I'd say command line.  A fully working command line is needed for a fully working gui.  And if it's the only one done, then rl can still be used to it's fullest.  Plus being able to sort (with a fixed delimiter) is nice.

Rick
If I do not respond to your post in a timely manner, feel free to PM me.