XMDB Specifications

General No-Intro related discussions.
Post Reply
Posts: 3
Joined: 04 Jul 2016 04:03

XMDB Specifications

Post by Jacko » 11 Apr 2017 19:30

I'm writing a crossplatform tool which verify and merge sets, I needed it because I'm not a Windows owner so I needed something different (and I don't like the idea of using multiple tools to manage everything).

My tool works nicely but it seems like there are some XMDB implementation details which are unclear to me. Actually the procedure goes as, let's say for example (all examples are taken from SNES dat):

Code: Select all

<zoned type="deferred">
	<bias zone="U" name="Romance of the Three Kingdoms II"/>
	<bias zone="J" name="Super Sangokushi II"/>
	<clone name="Romance of the Three Kingdoms II (USA)"/>
	<clone name="Super Sangokushi II (Japan) (Rev 1)"/>
This means that there are two clones, one for USA region and one for Japan. Since the name specified in the <bias> node is trimmed of any specification, to find the corresponding game you need to search between all games by trimming all the specification between parenthesis for the exact name. Eg, to find the zoned game Super Sangokushi II you need to find a game which is considered of region Japan (so it has Japan in the name) which name starts with Super Sangokushi II.

Ok in this situation this is trivial but let's consider another situation:

Code: Select all

<zoned type="deferred">
	<bias zone="U" name="Romance of the Three Kingdoms III - Dragon of Destiny"/>
	<bias zone="Cn" name="Sangokushi III"/>
	<bias zone="J" name="Sangokushi III"/>
	<clone name="Romance of the Three Kingdoms III - Dragon of Destiny (USA)"/>
	<clone name="Sangokushi III (Hong Kong)"/>
	<clone name="Sangokushi III (Japan) (Rev 1)"/>
In this situation the bias for China is Sangokushi III which means that a game named Sangokushi III (China) should be present but it isn't since we have (Hong Kong) so how can I algorithmically determine which is the right game to use: there are two games with a name starting with

Code: Select all

Sangokushi III
and noone of them is strictly China so there is no way to distinguish one from the other.

Another similar situation:

Code: Select all

<zoned type="deferred">
	<bias zone="E" name="Boxing Legends of the Ring"/>
	<bias zone="U" name="Boxing Legends of the Ring"/>
	<bias zone="S" name="Chavez II"/>
	<bias zone="J" name="Final Knockout"/>
	<clone name="Boxing Legends of the Ring (Europe)"/>
	<clone name="Boxing Legends of the Ring (USA)"/>
	<clone name="Chavez II (USA) (Es)"/>
	<clone name="Final Knockout (Japan)"/>
Here there is a similar problem, we have Chavez II biased on Spain, so we expect a Chavez II (Spain) in the romset. But there is no such game, there is a Chavez II (USA) (Es) which is probably the spanish version released in USA.

So there is no algorithmic way to retrieve the correct game for a zone directly, this because, bias zone names are trimmed of specifications so you need to "guess" which is the correct referring game.

A similar problem which I'm not able to understand is the following:
<zoned type="deferred">
<bias zone="U" name="Batman (USA) (Proto) "/>
<clone name="Batman (USA) (Proto)"/>

Why a bad dump has the corresponding [ b ] in the bias (which makes sense since all single game clones have the bias exactly as the game name) but it disappears in the clone name underneath?

I'm trying to find the correct algorithm to generate the game clone structure starting from the .dat and the .xmdb so that my tool is then able to correctly merge everything into archives but I'm not able to figure how I should proceed with these specific situations.

Post Reply