User avatar
Dal1980
Posts: 3
Joined: Sat Jul 22, 2017 12:05 am
Location: UK
Contact: Website

Time Travel: Champion League

Hi guys

I'm new to the forum so be gentle with me please :P

I'm working on some projects that will help me to hopefully develop a nice graphics sets for use in a front-end.

My project began with needing to extract basic info from the mame.xml but the further I've got into it the more I've learnt about various things which is cool.

I came across this scenario and wondered if anyone could explain how this would work.

Master

Code: Select all

	<machine name="chleague" sourcefile="igspoker.cpp">
	<description>Champion League (v220I, Poker)</description>
	<year>2000</year>


Clone1

Code: Select all

	<machine name="chleagxa" sourcefile="igspoker.cpp" cloneof="chleague" romof="chleague">
	<description>Champion League (v220I, dual program, set 1)</description>
	<year>1998</year>


Clone2

Code: Select all

	<machine name="chleagxb" sourcefile="igspoker.cpp" cloneof="chleague" romof="chleague">
	<description>Champion League (v220I, dual program, set 2)</description>
	<year>1998</year>

As you can see Master was developed in 2000 which was then cloned in 1998.... :o
There's nothing like a Linux terminal to test your memory as you try to remember a command :?
User avatar
Tafoid
Posts: 351
Joined: Thu Nov 06, 2014 12:50 pm
Location: USA
Contact: Website

Re: Time Travel: Champion League

Dal1980 wrote: Sat Jul 22, 2017 11:51 pm Hi guys

I'm new to the forum so be gentle with me please :P

I'm working on some projects that will help me to hopefully develop a nice graphics sets for use in a front-end.

My project began with needing to extract basic info from the mame.xml but the further I've got into it the more I've learnt about various things which is cool.

I came across this scenario and wondered if anyone could explain how this would work.

Master

Code: Select all

	<machine name="chleague" sourcefile="igspoker.cpp">
	<description>Champion League (v220I, Poker)</description>
	<year>2000</year>


Clone1

Code: Select all

	<machine name="chleagxa" sourcefile="igspoker.cpp" cloneof="chleague" romof="chleague">
	<description>Champion League (v220I, dual program, set 1)</description>
	<year>1998</year>


Clone2

Code: Select all

	<machine name="chleagxb" sourcefile="igspoker.cpp" cloneof="chleague" romof="chleague">
	<description>Champion League (v220I, dual program, set 2)</description>
	<year>1998</year>

As you can see Master was developed in 2000 which was then cloned in 1998.... :o

It is important to note how Parents and Clones are set up in MAME. Parents status is, historically, given to machines which are the latest code or revision as well as being from an English region such as US/World/Euro.

This case, I think, is covered by Italian Gambling Laws and how they were pretty strict in what it allowed for gambling devices - in many cases "dual program" games were programmed in case they needed to be inspected they could quickly change the game or summarily swap out the game so that a poker game, for instance, became a 'skill' game. An example of such a machine are "jackie" Happy Jackie - hitting T will toggle the type of game between poker and a whack-a-mole game. The later version came after the need of having to allow an option to 'hide' the video poker game and is considered the parent.
User avatar
Dal1980
Posts: 3
Joined: Sat Jul 22, 2017 12:05 am
Location: UK
Contact: Website

Re: Time Travel: Champion League

Thanks Tafoid

I feel like I was picking sticking up off the ground and fell backwards down a rabbit hole :lol:

Thanks for the explanation. :D

Is there any documentation out there on the xml fields and how they are put together. I've looked around and there is tons of information but can't find anything on the xml itself.
There's nothing like a Linux terminal to test your memory as you try to remember a command :?
User avatar
Tafoid
Posts: 351
Joined: Thu Nov 06, 2014 12:50 pm
Location: USA
Contact: Website

Re: Time Travel: Champion League

Dal1980 wrote: Sun Jul 23, 2017 7:22 pm Thanks Tafoid

I feel like I was picking sticking up off the ground and fell backwards down a rabbit hole :lol:

Thanks for the explanation. :D

Is there any documentation out there on the xml fields and how they are put together. I've looked around and there is tons of information but can't find anything on the xml itself.

All the data comes from the driver/source files themselves. They should all be easily understood as to what each tag or elements means. Is there something in particular you are confused about?

I see you were recently posting issues on Github about control issues either showing too many buttons. improper controls or some other oddness as related to inputs or number of players - these levels are decided by the hardware it runs on and its potential. Some games don't poll/use all the input options available to it by the hardware yet the base board's hardware can handle them all by default. I can understand this making a difference to end users and their particular cabinet/button configurations, but not much can be done. Needless to say, inputs and other information shown in MAME are not absolute. Given the amount of hardware profiles possible it is almost 'im'possible to get everything 100% accurate.
User avatar
Dal1980
Posts: 3
Joined: Sat Jul 22, 2017 12:05 am
Location: UK
Contact: Website

Re: Time Travel: Champion League

Thank again Tafoid

My level of understanding with mame is limited. Some of the areas in this project go down deep dark tunnels that I simply don't have a powerful enough torch to illuminate. :(

That being said, I know a lot more than I did 2 years ago :)

It's difficult sometimes to find information on particular fields in the XML. Having to ask people wears down their patience as the questions normally start off simple then spiral down into a discussion about more factors than I initially anticipated. :lol:

It might be easier to see what it is I'm working on to understand why I need to know what does what and goes where. Ironically this path that I've needed to take was simply to illustrate some control panel illustrations based on a collection of data. This has grown into actually stripping the XML down to a more basic overview with some interesting deduction based on the information in the XML. It's all a journey I guess and I am learning all the time.

Here's a quick example:

XML

Code: Select all

<machine name="sailormn" sourcefile="cave.cpp">
		<description>Pretty Soldier Sailor Moon (Ver. 95/03/22B, Europe)</description>
		<year>1995</year>
		<manufacturer>Gazelle (Banpresto license)</manufacturer>
		<rom name="bpsm945a.u45" size="524288" crc="898c9515" sha1="0fe8d7f13f5cfe2f6e79a0a21b2e8e7e70e65c4b" region="maincpu" offset="0"/>
		<rom name="bpsm.u46" size="2097152" crc="32084e80" sha1="0ac503190d95009620b5ad7e7e0e63324f6fa4eb" region="maincpu" offset="200000"/>
		<rom name="bpsm945a.u9" size="524288" crc="438de548" sha1="81a0ca1cd662e2017aa980da162d39cfd0a19f14" region="audiocpu" offset="0"/>
		<rom name="bpsm.u76" size="2097152" crc="a243a5ba" sha1="3a32d685e53e0b75977f7acb187cf414a50c7f8b" region="sprites0" offset="0"/>
		<rom name="bpsm.u77" size="2097152" crc="5179a4ac" sha1="ceb8d3d889aae885debb2c9cf2263f60be3f1212" region="sprites0" offset="200000"/>
		<rom name="bpsm.u53" size="2097152" crc="b9b15f83" sha1="8c574c97d38fb9e2889648c8d677b171e80a4229" region="layer0" offset="0"/>
		<rom name="bpsm.u54" size="2097152" crc="8f00679d" sha1="4ea412f8ecdb9fd46f2d1378809919d1a62fcc2b" region="layer1" offset="0"/>
		<rom name="bpsm.u57" size="2097152" crc="86be7b63" sha1="6b7d3d41fb1e4045c765b3cc98304464d91e6e3d" region="layer2" offset="0"/>
		<rom name="bpsm.u58" size="2097152" crc="e0bba83b" sha1="9e1434814efd9321b2e5210b995d2fe66cca37dd" region="layer2" offset="200000"/>
		<rom name="bpsm.u62" size="2097152" crc="a1e3bfac" sha1="4528887d57e519df8dd60b2392db4c175c57b239" region="layer2" offset="400000"/>
		<rom name="bpsm.u61" size="2097152" crc="6a014b52" sha1="107c687479b59c455fc514cd61d290853c95ad9a" region="layer2" offset="600000"/>
		<rom name="bpsm.u60" size="2097152" crc="992468c0" sha1="3c66cc08313a9a326badc44f53a98cdfe0643da4" region="layer2" offset="800000"/>
		<rom name="bpsm.u65" size="2097152" crc="f60fb7b5" sha1="72cb8908cd687a330e14657664cd35037a52c39e" region="layer2" offset="a00000"/>
		<rom name="bpsm.u64" size="2097152" crc="6559d31c" sha1="bf688123a4beff625652cc1844bf0dc192f5c90f" region="layer2" offset="c00000"/>
		<rom name="bpsm.u63" size="2097152" crc="d57a56b4" sha1="e039b336887b66eba4e0630a3cb04cbd8fe14073" region="layer2" offset="e00000"/>
		<rom name="bpsm.u48" size="2097152" crc="498e4ed1" sha1="28d45a41702d9e5af4e214c1800b2e513ec84d51" region="oki1" offset="0"/>
		<rom name="bpsm.u47" size="524288" crc="0f2901b9" sha1="ebd3e9e39e8d2bc91688dac19b99548a28b4733c" region="oki2" offset="0"/>
		<rom name="sailormn_europe.nv" size="128" crc="59a7dc50" sha1="6b116bdfbde42192b01678cb0b9bab0f2e56fd28" region="eeprom" offset="0"/>
		<device_ref name="m68000"/>
		<device_ref name="timer"/>
		<device_ref name="z80"/>
		<device_ref name="93c46_16"/>
		<device_ref name="timer"/>
		<device_ref name="screen"/>
		<device_ref name="gfxdecode"/>
		<device_ref name="palette"/>
		<device_ref name="speaker"/>
		<device_ref name="generic_latch_16"/>
		<device_ref name="ym2151"/>
		<device_ref name="okim6295"/>
		<device_ref name="okim6295"/>
		<chip type="cpu" tag="maincpu" name="M68000" clock="16000000"/>
		<chip type="cpu" tag="audiocpu" name="Z80" clock="8000000"/>
		<chip type="audio" tag="mono" name="Speaker"/>
		<chip type="audio" tag="ymsnd" name="Yamaha YM2151 OPM" clock="4000000"/>
		<chip type="audio" tag="oki1" name="OKI MSM6295 ADPCM" clock="2112000"/>
		<chip type="audio" tag="oki2" name="OKI MSM6295 ADPCM" clock="2112000"/>
		<display tag="screen" type="raster" rotate="0" width="320" height="240" refresh="57.550645" />
		<sound channels="1"/>
		<input players="2" coins="2" service="yes">
			<control type="joy" player="1" buttons="3" ways="8"/>
			<control type="joy" player="2" buttons="3" ways="8"/>
		</input>
		<port tag=":IN0">
		</port>
		<port tag=":IN1">
		</port>
		<driver status="good" emulation="good" color="good" sound="good" graphic="good" savestate="supported"/>
	</machine>

JSON

Code: Select all

"sailormn": {
		"sourcefile": "cave.cpp",
		"description_part_1": "Pretty Soldier Sailor Moon",
		"description_part_2": "(Ver. 95/03/22B, Europe)",
		"ver": "95/03",
		"localisation": [
			"Europe"
		],
		"total_localisation": 1,
		"set": "0",
		"region": "Europe",
		"year": "1995",
		"licensee": "Banpresto",
		"manufacturers": [
			{
				"index": 103,
				"name": "Gazelle"
			}
		],
		"total_manufacturers": 1,
		"display": [
			{
				"tag": "screen",
				"type": "raster",
				"rotate": "0",
				"width": "320",
				"height": "240",
				"refresh": "57.550645"
			}
		],
		"total_displays": 1,
		"players": "2",
		"coins": "2",
		"service": "yes",
		"input": [
			{
				"player": "1",
				"controls": "joy",
				"buttons": "3",
				"ways": "8"
			},
			{
				"player": "2",
				"controls": "joy",
				"buttons": "3",
				"ways": "8"
			}
		],
		"total_inputs": 2,
		"status": 3,
		"emulation": 3,
		"color": 3,
		"sound": 3,
		"graphic": 3,
		"savestate": 1,
		"categories": {
			"primary": "Fighter",
			"secondary": "2.5D"
		},
		"nPlayers": "2P sim"
	},
This is then added to a database with various tables

Note: This table will be run against the latest Mame XML which means that relationship of numeric id's are always changing so external data needs to target the rom id instead.

manufacturers table
An index lookup table for all known manufacturers. This list has been through the rinse and although manufacturers such as "Able Corp Ltd" will still have other variants such as "Able", "Able Corp" and "Able Corp Ltd" I've tried to clean up the formatting particularly which has helped for things like:
"Able Corp., Ltd", "Able Corp, Ltd", "Able Corporation. Ltd." etc

The index of this field is currently used as a lookup key.


roms_info
A general table with information that would be regarded as headline information such as description, year, total players, status, category, licensee, set, ver, region bootleg mature, etc...


roms_tech
More of an extension to roms_info table that carries a little more of the technical details like localisation, sourcefile, cloneof, emulation status, sound status etc


roms_displays
Is a details table. Each rom may have multiple entries here for each display. This also holds information like tag, rotate, width, height, etc...


roms_controls
Another details table. Each rom may have multiple entries on this table for each of it's control/inputs. Information such as player number, control type, ways, sensitivity etc...


I exclude any information that I would regard as verbose in terms of actual application outside of Mame. This isn't meant to be a rom manager of any kind but information that could be used in a front end system to visually help with the details shown. I have also included nplayers.ini and catver.ini information into the mix which has helped broaden the information out. I would like also to include history.dat in there but I'll need a way to consolidate the information into sections rather than simply recording the entire entry as a single field.
There's nothing like a Linux terminal to test your memory as you try to remember a command :?

Return to “MAME Discussion”