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.
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.