RL tutorial Advanced Searching

From BYOAC OLD Wiki
Revision as of 14:09, 7 March 2008 by Jeffleyda (talk | contribs)
Jump to navigation Jump to search

ROMLister is a search tool. The fun part is that you can search for an unlimited number of items, and group those items any way you'd like to.

You may have noticed when playing around with the Quick-find wizard that the text on the bottom of the screen changed as you clicked various options.

ROMLister -find criteria

That text in the -find window is what gets sent into the search engine. Any ROM that meets all of the criteria supplied, gets put into the output list.
Let's examine a simple search query of "Any game that is 3 buttons or less, and uses an 8-way joystick"
The following text is what gets built by the quick-find wizard: (yeah, there's a little more text, but this is the core of it)

(numButtons=3 | numButtons=2 | numButtons=1 | numButtons=0) & joy8way

Here's the same query in slightly more human-readable format:

( numButtons=3 OR numButtons=2 OR numButtons=1 OR numButtons=0 ) AND joy8way

Remember back in math class with order of operations? You do stuff in the parenthesis first, then take the results of that "group" and continue working through the problem. Same deal here.
In this example, ROMLister will check each game and see if it is a 3,2,1 or 0 button game. If it is, then it checks to see if the game uses an 8-way joystick. If yes, then the game is added to the output list. If either the game is more than 3 buttons, or the game is not 8-way, then it doesn't get added. This search criteria is checked against every game, and only the ones that match are outputted.

So, with ROMLister, you can put as many of these search parameters as you want in, and you can build up some pretty unique searches. The quick-find wizard at the top of the GUI is only a starting point to show you how to create the -find search items. Because the possible search items is nearly limitless, and the combinations of search items can be grouped in any way, there is no way all the possibilities can be represented with drop-down lists or checkboxes-if you want something complex, you need to do it by hand by tweaking the -find options yourself. Don't worry, it's not that hard to do.

  • Note: Once you start changing the -find text by hand, if you use the Quick-find Wizard again, it will overwrite (trash) anything you've typed in, so be careful!



Keep the following key in mind: & means AND. | means OR. ! means NOT
Let's go back to our search from above for 3 buttons or less and an 8way joystick. Now let's put a filter on the results to remove all the vector based games.

To remove vector graphics monitors from showing up, all we need to do is add "& !vector" to the -find list.

(numButtons=3 | numButtons=2 | numButtons=1 | numButtons=0) & joy8way & !vector

That should reduce the number of games by a few.

Let's also take out the games that don't support save states. The tag for that is 'savestate="unsupported"'

ROMLister ignores quote marks, so just add it like this:

(numButtons=3 | numButtons=2 | numButtons=1 | numButtons=0) & joy8way & !vector & !savestate=unsupported

Ok, let's just look for maze games only. If you have imported catver data into your input file, you have access to the category data that is provided. Let's look for some maze games now:

(numButtons=3 | numButtons=2 | numButtons=1 | numButtons=0) & joy8way & !vector & !savestate=unsupported & maze

But wait, I like platform games too, so I want maze and platform games to come up. The quick find wizard only allows 1 category to be searched on, so we need to add more of them by hand:

(numButtons=3 | numButtons=2 | numButtons=1 | numButtons=0) & joy8way & !vector & !savestate=unsupported & (maze | platform)

If you'll notice here, we added "& (maze | platform)". So we put the types of games we want (maze or platform) into a group by surrounding those with parenthesis. So now when ROMLister is checking each game, it looks to see if it is either a maze OR a platform, but only those 2 types.

So how do I know what tings can be searched on?
The stuff that you can search on is specified by the input XML file. When you first bring up ROMLister, it'll show you a single game entry (the first one in the XML file), which is typically Puckman, it looks like this:

<game name="puckmana" sourcefile="pacman.c" cloneof="puckman" romof="puckman">
	<description>PuckMan (Japan set 2)</description>
	<year>1980</year>
	<manufacturer>Namco</manufacturer>
	<category>Maze</category>
	<controls info>numPlayers="2" alternating="1" mirrored="1" usesService="0" tilt="0" cocktail="1"</controls info>
	<player number="1" numButtons="0">
		<controls>
			<control name="4-way Joystick">
				<constant name="joy4way"/>
			</control>
		</controls>
	<labels>
			<label name="P1_JOYSTICK_RIGHT" value="Right"/>
			<label name="P1_JOYSTICK_LEFT" value="Left"/>
			<label name="P1_JOYSTICK_DOWN" value="Down"/>
			<label name="P1_JOYSTICK_UP" value="Up"/>
		</labels>
	</player>
	<rom name="pacman.6e" size="4096" crc="c1e6ab10" sha1="e87e059c5be45753f7e9f33dff851f16d6751181" region="cpu1" offset="0"/>
	<rom name="pacman.6f" size="4096" crc="1a6fb2d4" sha1="674d3a7f00d8be5e38b1fdc208ebef5a92d38329" region="cpu1" offset="1000"/>
	<rom name="pacman.6h" size="4096" crc="bcdd1beb" sha1="8e47e8c2c4d6117d174cdac150392042d3e0a881" region="cpu1" offset="2000"/>
	<rom name="prg7" size="2048" crc="b6289b26" sha1="d249fa9cdde774d5fee7258147cd25fa3f4dc2b3" region="cpu1" offset="3000"/>
	<rom name="prg8" size="2048" crc="17a88c13" sha1="eb462de79f49b7aa8adb0cc6d31535b10550c0ce" region="cpu1" offset="3800"/>
	<rom name="chg1" size="2048" crc="2066a0b7" sha1="6d4ccc27d6be185589e08aa9f18702b679e49a4a" region="gfx1" dispose="yes" offset="0"/>
	<rom name="chg2" size="2048" crc="3591b89d" sha1="79bb456be6c39c1ccd7d077fbe181523131fb300" region="gfx1" dispose="yes" offset="800"/>
	<rom name="pacman.5f" merge="pacman.5f" size="4096" crc="958fedf9" sha1="4a937ac02216ea8c96477d4a15522070507fb599" region="gfx1" dispose="yes" offset="1000"/>
	<rom name="82s123.7f" merge="82s123.7f" size="32" crc="2fc650bd" sha1="8d0268dee78e47c712202b0ec4f1f51109b1f2a5" region="proms" offset="0"/>
	<rom name="82s126.4a" merge="82s126.4a" size="256" crc="3eb3a8e4" sha1="19097b5f60d1030f8b82d9f1d3a241f93e5c75d6" region="proms" offset="20"/>
	<rom name="82s126.1m" merge="82s126.1m" size="256" crc="a9cc86bf" sha1="bbcec0570aeceb582ff8238a4bc8546a23430081" region="sound1" offset="0"/>
	<rom name="82s126.3m" merge="82s126.3m" size="256" crc="77245b66" sha1="0c4d0bee858b97632411c440bea6948a74759746" region="sound1" offset="100"/>
	<chip type="cpu" name="Z80" clock="3072000"/>
	<chip type="audio" name="Namco" clock="96000"/>
	<display type="raster" rotate="90" width="288" height="224" refresh="60.606061" />
	<sound channels="1"/>
	<input players="2" buttons="1" coins="2">
		<control type="joy4way"/>
	</input>
	<dipswitch name="Rack Test (Cheat)">
		<dipvalue name="Off" default="yes"/>
		<dipvalue name="On"/>
	</dipswitch>
	<dipswitch name="Service Mode">
		<dipvalue name="Off" default="yes"/>
		<dipvalue name="On"/>
	</dipswitch>
	<dipswitch name="Cabinet">
		<dipvalue name="Upright" default="yes"/>
		<dipvalue name="Cocktail"/>
	</dipswitch>
	<dipswitch name="Coinage">
		<dipvalue name="2 Coins/1 Credit"/>
		<dipvalue name="1 Coin/1 Credit" default="yes"/>
		<dipvalue name="1 Coin/2 Credits"/>
		<dipvalue name="Free Play"/>
	</dipswitch>
	<dipswitch name="Lives">
		<dipvalue name="1"/>
		<dipvalue name="2"/>
		<dipvalue name="3" default="yes"/>
		<dipvalue name="5"/>
	</dipswitch>
	<dipswitch name="Bonus Life">
		<dipvalue name="10000" default="yes"/>
		<dipvalue name="15000"/>
		<dipvalue name="20000"/>
		<dipvalue name="None"/>
	</dipswitch>
	<dipswitch name="Difficulty">
		<dipvalue name="Normal" default="yes"/>
		<dipvalue name="Hard"/>
	</dipswitch>
	<dipswitch name="Ghost Names">
		<dipvalue name="Normal" default="yes"/>
		<dipvalue name="Alternate"/>
	</dipswitch>
	<driver status="good" emulation="good" color="good" sound="good" graphic="good" savestate="supported" palettesize="512"/>
</game>

Anything in the above text can be a search parameter. You've got screen orientation, screen refresh rate, resolution, joystick/control types, emulation status, cocktail support, manufacturer, year of release, category, clone or parent, even actual ROM names. You can pick anything in there to search on, and combine multiple searches into a single query.

You can use the [next] and [prev] buttons to move forward and backward through the listing of games in the XML file. If you need to dig up a particular game, click on the "ROM Lookup" (search in earlier versions) button and type in the name of the game. For example, "tron". If found in the input XML file, the game description will be displayed in the large main window. You can then use this information to help refine the search criteria you're interested in.


Return to ROMLister tutorials