Skip to content

DatFile Formats

Matt Nadareski edited this page Jul 19, 2021 · 12 revisions

DatFile Formats

This page contains information about the various DatFile formats that are available.

For features that allow for writing out to a DatFile, see the following table for values and the DatFile formats they relate to:

Value Description
all All available DatFile types
ado, archive Archive.org
am, attractmode AttractMode
cmp, clrmamepro ClrMamePro
csv Standardized CSV
dc, doscenter DOSCenter
everdrive, smdb Everdrive SMDB
lr, listrom MAME Listrom
lx, listxml MAME ListXML
md5 MD5 Hashfile
miss, missfile Missfile
msx, openmsx openMSX
ol, offlinelist OfflineList
rc, romcenter RomCenter
ripemd160 RIPEMD160 Hashfile (Only available in .NET Framework 4.8 builds)
sj, sabrejson SabreDAT JSON Format
sx, sabrexml SabreDAT XML Format
sfv SFV Hashfile
sha1 SHA-1 Hashfile
sha256 SHA-256 Hashfile
sha384 SHA-384 Hashfile
sha512 SHA-512 Hashfile
sl, softwarelist SoftwareList
spamsum SpamSum Hashfile
ssv Standardized SSV
tsv Standardized TSV
xml, logiqx Logiqx

More formats may be supported in the future if they contain hash information. Please open a GitHub issue or a pull request to add more support.

Archive.org Format

Archive.org is a well-known and respected digital library for almost everything that you could possibly think of. Each of the uploads includes an XML file list that has a lot of the same information that can be found in other DAT formats, including size and hashes.

<?xml version="1.0" encoding="utf-8"?>
<files>
    <file name="rom.bin" source="original">
        <mtime>1621688177</mtime>
        <size>1024</size>
        <md5>c41d8cd98f00b204e9800998ecf8427e</md5>
        <crc32>deadbeef</crc32>
        <sha1>ca39a3ee5e6b4b0d3255bfef95601890afd80709</sha1>
        <format>Unknown</format>
        <original>rom2.bin</original>
        <rotation>0</rotation>
        <summation>md5</summation>
    </file>
</files>

AttractMode Format

AttractMode is an emulator frontend that allows an end user to set up multiple emulators for easy access. For some reason, AttractMode has its own DAT format that is SSV-derived. Here is the current list of fields in the order that they are parsed:

Name, Title, Emulator, CloneOf, Year, Manufacturer, Category, Players, Rotation, Control, Status, DisplayCount, DisplayType, AltRomname, AltTitle, Extra, Buttons

All of these are the column names that should be the first line of the DAT, with the exception of "emulator name / filename" where EITHER "emulator name" or "filename" will be recognized, but not both.

ClrMamePro Format

The ClrMamePro DAT format is considered to be easy to manually edit and create because of its straightforward syntax. However, because it is proprietary, a custom parser has to be written for it. All information below is sourced from http:https://www.logiqx.com/DatFAQs/CMPro.php

clrmamepro (
    name "DATNAME"
    description "DESCRIPTION"
    version "VERSION"
    comment "COMMENT"
    author "AUTHOR"
    forcemerging none|split|full
    forcezipping yes|no
)

game (
    name "NAME"
    romof "ROMPARENT"
    cloneof "CLONEPARENT"
    description "DESCRIPTION"
    year YEAR
    manufacturer "MANUFACTURER"
    rom ( name "ROMNAME" merge "PARENTROM" size SIZE crc CRC md5 MD5 sha1 SHA1 )
    disk ( name "DISKNAME" md5 MD5 sha1 SHA1 )
    sampleof "SAMPLE PARENT"
    sample 1.wav
    sample 2.wav
)

resource (
    name "NAME"
    description "DESCRIPTION"
    year YEAR
    rom ( name "ROMNAME" size SIZE crc CRC md5 MD5 sha1 SHA1 )
)

DOSCenter Format

The DOSCenter DAT format is heavily based on the above ClrMamePro format with the notable differences being the lack of higher-order hashes by default and the inclusion of a date field. It is largely compatible with ClrMamePro formats but tend to miss a lot of the more common fields, especially the disk and resource types

doscenter (
    name "DATNAME"
    description "DESCRIPTION"
    version "VERSION"
    comment "COMMENT"
    author "AUTHOR"
)

game (
    name "NAME"
    description "DESCRIPTION"
    year YEAR
    rom ( name "ROMNAME" size SIZE crc CRC date DATE )
)

Everdrive SMDB Format

The Everdrive SMDB format is a tab-separated format which has the unique feature of natively including SHA-256 hashes. This makes it largely incompatible with other existing formats since the highest-order hash usually supported is SHA-1. These are another tailor-made format specific to the associated project. Another notable aspect is that there are no sizes included by default, making the combination of hashes the only source of truth

11a486ccc36d81d435d97d50331cebbe7d62e3cfcdd582fed6e5c5b7cc5e0607	Atari 2600/1 US A-M/3-D Tic-Tac-Toe (USA).a26	21d983f2f52b84c22ecae84b0943678ae2c31c10	0db4f4150fecf77e4ce72ca4d04c052f	58805709
c9dfed23d2f3c23735b51d55d609179b686187669d458ffbb4f5960627e028d8	Atari 2600/1 US A-M/Acid Drop (USA).a26	d7c62df8300a68b21ce672cfaa4d0f2f4b3d0ce1	17ee23e5da931be82f733917adcb6386	14cddac7
f7dfe0d2deab3dedb62832d4648dae7159f7e2080ccec200333a63e2ab3659c4	Atari 2600/1 US A-M/Action Force (USA).a26	9e6fb047ee9fa0a454ca23673ed9693430032dc6	b9f6fa399b8cd386c235983ec45e4355	896446cf

Logiqx XML Format

Originally based on work by Logiqx, this file format that uses XML instead of the proprietary ClrMamePro format. This makes parsing it much easier since it can be read by any XML parser and requires a strict format to be followed. However, this same structure makes it difficult to add information to or create by hand since each item has to be wrapped in the proper XML tags. Also note that the newer versions of the RomCenter DAT format use this as a basis and can be used interchangeably.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE datafile PUBLIC "-//Logiqx//DTD ROM Management Datafile//EN" "http:https://www.logiqx.com/Dats/datafile.dtd">

<datafile build="" debug="no|yes">
	<header>
		<name>REQUIRED</name>
		<description>REQUIRED</description>
		<category></category>
		<version>REQUIRED</version>
		<date></date>
		<author>REQUIRED</author>
		<email></email>
		<homepage></homepage>
		<url></url>
		<comment></comment>
		<clrmamepro header="" forcemerging="split|none|full" forcenodump="obsolete|required|ignore" forcepacking="zip|unzip" />
		<romcenter plugin="" rommode="split|merged|unmerged" biosmode="split|merged|unmerged" samplemode="merged|unmerged" lockrommode="no|yes" lockbiosmode="no|yes" locksamplemode="no|yes" />
	</header>

	<game name="REQUIRED, MULTIPLE game ALLOWED" sourcefile="" isbios="no|yes" cloneof="" romof="" sampleof="" board="" rebuildto="">
		<comment>MULTIPLE ALLOWED</comment>
		<description>REQUIRED</description>
		<year></year>
		<manufacturer></manufacturer>
		<release name="REQUIRED, MULTIPLE release ALLOWED" region="REQUIRED" language="REQUIRED" date="REQUIRED" default="no|yes" />
		<biosset name="REQUIRED, MULTIPLE biosset ALLOWED" description="REQUIRED" default="no|yes" />
		<rom name="REQUIRED, MULTIPLE rom ALLOWED" size="REQUIRED" crc="" sha1="" md5="" merge="" status="good|baddump|nodump|verified" date="" />
		<disk name="REQUIRED, MULTIPLE disk ALLOWED" sha1="" md5="" merge="" status="good|baddump|nodump|verified" />
		<sample name="REQUIRED, MULTIPLE sample ALLOWED" />
		<archive name="REQUIRED, MULTIPLE archive ALLOWED" />
	</game>
</datafile>

The above XML DAT is based directly on the official DTD, as mirrored below:

<!--
   ROM Management Datafile - DTD

   For further information, see: http:https://www.logiqx.com/

   This DTD module is identified by the PUBLIC and SYSTEM identifiers:

   PUBLIC "-//Logiqx//DTD ROM Management Datafile//EN"
   SYSTEM "http:https://www.logiqx.com/Dats/datafile.dtd"

   $Revision: 1.5 $
   $Date: 2008/10/28 21:39:16 $

-->

<!ELEMENT datafile (header?, game+)>
	<!ATTLIST datafile build CDATA #IMPLIED>
	<!ATTLIST datafile debug (yes|no) "no">
	<!ELEMENT header (name, description, category?, version, date?, author, email?, homepage?, url?, comment?, clrmamepro?, romcenter?)>
		<!ELEMENT name (#PCDATA)>
		<!ELEMENT description (#PCDATA)>
		<!ELEMENT category (#PCDATA)>
		<!ELEMENT version (#PCDATA)>
		<!ELEMENT date (#PCDATA)>
		<!ELEMENT author (#PCDATA)>
		<!ELEMENT email (#PCDATA)>
		<!ELEMENT homepage (#PCDATA)>
		<!ELEMENT url (#PCDATA)>
		<!ELEMENT comment (#PCDATA)>
		<!ELEMENT clrmamepro EMPTY>
			<!ATTLIST clrmamepro header CDATA #IMPLIED>
			<!ATTLIST clrmamepro forcemerging (none|split|full) "split">
			<!ATTLIST clrmamepro forcenodump (obsolete|required|ignore) "obsolete">
			<!ATTLIST clrmamepro forcepacking (zip|unzip) "zip">
		<!ELEMENT romcenter EMPTY>
			<!ATTLIST romcenter plugin CDATA #IMPLIED>
			<!ATTLIST romcenter rommode (merged|split|unmerged) "split">
			<!ATTLIST romcenter biosmode (merged|split|unmerged) "split">
			<!ATTLIST romcenter samplemode (merged|unmerged) "merged">
			<!ATTLIST romcenter lockrommode (yes|no) "no">
			<!ATTLIST romcenter lockbiosmode (yes|no) "no">
			<!ATTLIST romcenter locksamplemode (yes|no) "no">
	<!ELEMENT game (comment*, description, year?, manufacturer?, release*, biosset*, rom*, disk*, sample*, archive*)>
		<!ATTLIST game name CDATA #REQUIRED>
		<!ATTLIST game sourcefile CDATA #IMPLIED>
		<!ATTLIST game isbios (yes|no) "no">
		<!ATTLIST game cloneof CDATA #IMPLIED>
		<!ATTLIST game romof CDATA #IMPLIED>
		<!ATTLIST game sampleof CDATA #IMPLIED>
		<!ATTLIST game board CDATA #IMPLIED>
		<!ATTLIST game rebuildto CDATA #IMPLIED>
		<!ELEMENT year (#PCDATA)>
		<!ELEMENT manufacturer (#PCDATA)>
		<!ELEMENT release EMPTY>
			<!ATTLIST release name CDATA #REQUIRED>
			<!ATTLIST release region CDATA #REQUIRED>
			<!ATTLIST release language CDATA #IMPLIED>
			<!ATTLIST release date CDATA #IMPLIED>
			<!ATTLIST release default (yes|no) "no">	
		<!ELEMENT biosset EMPTY>
			<!ATTLIST biosset name CDATA #REQUIRED>
			<!ATTLIST biosset description CDATA #REQUIRED>
			<!ATTLIST biosset default (yes|no) "no">
		<!ELEMENT rom EMPTY>
			<!ATTLIST rom name CDATA #REQUIRED>
			<!ATTLIST rom size CDATA #REQUIRED>
			<!ATTLIST rom crc CDATA #IMPLIED>
			<!ATTLIST rom sha1 CDATA #IMPLIED>
			<!ATTLIST rom md5 CDATA #IMPLIED>
			<!ATTLIST rom merge CDATA #IMPLIED>
			<!ATTLIST rom status (baddump|nodump|good|verified) "good">
			<!ATTLIST rom date CDATA #IMPLIED>
		<!ELEMENT disk EMPTY>
			<!ATTLIST disk name CDATA #REQUIRED>
			<!ATTLIST disk sha1 CDATA #IMPLIED>
			<!ATTLIST disk md5 CDATA #IMPLIED>
			<!ATTLIST disk merge CDATA #IMPLIED>
			<!ATTLIST disk status (baddump|nodump|good|verified) "good">
		<!ELEMENT sample EMPTY>
			<!ATTLIST sample name CDATA #REQUIRED>
		<!ELEMENT archive EMPTY>
			<!ATTLIST archive name CDATA #REQUIRED>

MAME Listroms Format

In more recent builds of MAME, it is possible to run the command mame.exe -listroms and have it output a human-readable format that shows what files are needed for a given game. This tends to be the only way that this type of file is generated and for good reason: it is probably the worst type of file to parse for a program even though it is well-structured. The only things included in this are the file names, their CRC and SHA-1 (if available) followed by some basic text for bad and missing dumps. For the sake of being complete, here is an example of a properly created MAME Listroms file. Note the complete absence of a header.

ROMs required for driver "GAMEWITHROMS".
Name                                   Size Checksum
goodfile.1                             2048 CRC(8e68533e) SHA1(a257c556d31691068ed5c991f1fb2b51da4826db)
badfile.u34                              32 BAD CRC(1d298cb0) SHA1(bb0bb62365402543e3154b9a77be9c75010e6abc) BAD_DUMP
whererufile.h1                          279 NO GOOD DUMP KNOWN

ROMs required for driver "GAMEWITHCHDS".
Name                                   Size Checksum
legitdisk                                   SHA1(0123456789012345678901234567890123456789)
notsolegitdisk                              BAD SHA1(da39a3ee5e6b4b0d3255bfef95601890afd80709) BAD_DUMP
missingdisk                                 NO GOOD DUMP KNOWN

No ROMs required for device "INTERNALDEVICE".

One final note: As far as I am aware, SabreTools is the only program that can read from and convert to this DAT format. Not that many users will be taking advantage of this.

MAME List XML Format

Due to the need to document an exceedingly high number of different pieces of data, MAME uses their own version of an XML DAT format to store their information. Nearly every version supports outputting this by running mame.exe -listxml. There are some parts that are similar and compatible with the Logiqx XML format, but overall, they should not be considered 100% interchangeable.

<!-- DTD normally goes here, see next section for more details -->
<mame build="0.189 (mame0189)" debug="no" mameconfig="10">
	<machine name="005" sourcefile="segag80r.cpp" sampleof="005">
		<description>005</description>
		<year>1981</year>
		<manufacturer>Sega</manufacturer>
		<rom name="1346b.cpu-u25" size="2048" crc="8e68533e" sha1="a257c556d31691068ed5c991f1fb2b51da4826db" region="maincpu" offset="0"/>
		...
		<device_ref name="z80"/>
		...
		<sample name="lexplode"/>
		...
		<chip type="cpu" tag="maincpu" name="Z80" clock="3867000"/>
		...
		<display tag="screen" type="raster" rotate="270" width="256" height="224" refresh="59.998138" pixclock="5156000" htotal="328" hbend="0" hbstart="256" vtotal="262" vbend="0" vbstart="224" />
		<sound channels="1"/>
		<input players="2" coins="2" service="yes">
			<control type="joy" player="1" buttons="1" ways="4"/>
			...
		</input>
		<dipswitch name="Coin A" tag="D1D0" mask="15">
			<diplocation name="SW2" number="8"/>
			...
			<dipvalue name="4 Coins/1 Credit" value="0"/>
			...
		</dipswitch>
		...
		<port tag=":D1D0">
		</port>
		...
		<driver status="imperfect" emulation="good" color="good" sound="imperfect" graphic="good" savestate="unsupported"/>
		<feature type="sound" status="imperfect"/>
	</machine>
	...
</mame>

Below is the DTD as included at the top of every Listxml generated DAT including the one above

<!DOCTYPE mame [
<!ELEMENT mame (machine+)>
	<!ATTLIST mame build CDATA #IMPLIED>
	<!ATTLIST mame debug (yes|no) "no">
	<!ATTLIST mame mameconfig CDATA #REQUIRED>
	<!ELEMENT machine (description, year?, manufacturer?, biosset*, rom*, disk*, device_ref*, sample*, chip*, display*, sound?, input?, dipswitch*, configuration*, port*, adjuster*, driver?, feature*, device*, slot*, softwarelist*, ramoption*)>
		<!ATTLIST machine name CDATA #REQUIRED>
		<!ATTLIST machine sourcefile CDATA #IMPLIED>
		<!ATTLIST machine isbios (yes|no) "no">
		<!ATTLIST machine isdevice (yes|no) "no">
		<!ATTLIST machine ismechanical (yes|no) "no">
		<!ATTLIST machine runnable (yes|no) "yes">
		<!ATTLIST machine cloneof CDATA #IMPLIED>
		<!ATTLIST machine romof CDATA #IMPLIED>
		<!ATTLIST machine sampleof CDATA #IMPLIED>
		<!ELEMENT description (#PCDATA)>
		<!ELEMENT year (#PCDATA)>
		<!ELEMENT manufacturer (#PCDATA)>
		<!ELEMENT biosset EMPTY>
			<!ATTLIST biosset name CDATA #REQUIRED>
			<!ATTLIST biosset description CDATA #REQUIRED>
			<!ATTLIST biosset default (yes|no) "no">
		<!ELEMENT rom EMPTY>
			<!ATTLIST rom name CDATA #REQUIRED>
			<!ATTLIST rom bios CDATA #IMPLIED>
			<!ATTLIST rom size CDATA #REQUIRED>
			<!ATTLIST rom crc CDATA #IMPLIED>
			<!ATTLIST rom sha1 CDATA #IMPLIED>
			<!ATTLIST rom merge CDATA #IMPLIED>
			<!ATTLIST rom region CDATA #IMPLIED>
			<!ATTLIST rom offset CDATA #IMPLIED>
			<!ATTLIST rom status (baddump|nodump|good) "good">
			<!ATTLIST rom optional (yes|no) "no">
		<!ELEMENT disk EMPTY>
			<!ATTLIST disk name CDATA #REQUIRED>
			<!ATTLIST disk sha1 CDATA #IMPLIED>
			<!ATTLIST disk merge CDATA #IMPLIED>
			<!ATTLIST disk region CDATA #IMPLIED>
			<!ATTLIST disk index CDATA #IMPLIED>
			<!ATTLIST disk writable (yes|no) "no">
			<!ATTLIST disk status (baddump|nodump|good) "good">
			<!ATTLIST disk optional (yes|no) "no">
		<!ELEMENT device_ref EMPTY>
			<!ATTLIST device_ref name CDATA #REQUIRED>
		<!ELEMENT sample EMPTY>
			<!ATTLIST sample name CDATA #REQUIRED>
		<!ELEMENT chip EMPTY>
			<!ATTLIST chip name CDATA #REQUIRED>
			<!ATTLIST chip tag CDATA #IMPLIED>
			<!ATTLIST chip type (cpu|audio) #REQUIRED>
			<!ATTLIST chip clock CDATA #IMPLIED>
		<!ELEMENT display EMPTY>
			<!ATTLIST display tag CDATA #IMPLIED>
			<!ATTLIST display type (raster|vector|lcd|unknown) #REQUIRED>
			<!ATTLIST display rotate (0|90|180|270) #IMPLIED>
			<!ATTLIST display flipx (yes|no) "no">
			<!ATTLIST display width CDATA #IMPLIED>
			<!ATTLIST display height CDATA #IMPLIED>
			<!ATTLIST display refresh CDATA #REQUIRED>
			<!ATTLIST display pixclock CDATA #IMPLIED>
			<!ATTLIST display htotal CDATA #IMPLIED>
			<!ATTLIST display hbend CDATA #IMPLIED>
			<!ATTLIST display hbstart CDATA #IMPLIED>
			<!ATTLIST display vtotal CDATA #IMPLIED>
			<!ATTLIST display vbend CDATA #IMPLIED>
			<!ATTLIST display vbstart CDATA #IMPLIED>
		<!ELEMENT sound EMPTY>
			<!ATTLIST sound channels CDATA #REQUIRED>
		<!ELEMENT input (control*)>
			<!ATTLIST input service (yes|no) "no">
			<!ATTLIST input tilt (yes|no) "no">
			<!ATTLIST input players CDATA #REQUIRED>
			<!ATTLIST input coins CDATA #IMPLIED>
			<!ELEMENT control EMPTY>
				<!ATTLIST control type CDATA #REQUIRED>
				<!ATTLIST control player CDATA #IMPLIED>
				<!ATTLIST control buttons CDATA #IMPLIED>
				<!ATTLIST control reqbuttons CDATA #IMPLIED>
				<!ATTLIST control minimum CDATA #IMPLIED>
				<!ATTLIST control maximum CDATA #IMPLIED>
				<!ATTLIST control sensitivity CDATA #IMPLIED>
				<!ATTLIST control keydelta CDATA #IMPLIED>
				<!ATTLIST control reverse (yes|no) "no">
				<!ATTLIST control ways CDATA #IMPLIED>
				<!ATTLIST control ways2 CDATA #IMPLIED>
				<!ATTLIST control ways3 CDATA #IMPLIED>
		<!ELEMENT dipswitch (diplocation*, dipvalue*)>
			<!ATTLIST dipswitch name CDATA #REQUIRED>
			<!ATTLIST dipswitch tag CDATA #REQUIRED>
			<!ATTLIST dipswitch mask CDATA #REQUIRED>
			<!ELEMENT diplocation EMPTY>
				<!ATTLIST diplocation name CDATA #REQUIRED>
				<!ATTLIST diplocation number CDATA #REQUIRED>
				<!ATTLIST diplocation inverted (yes|no) "no">
			<!ELEMENT dipvalue EMPTY>
				<!ATTLIST dipvalue name CDATA #REQUIRED>
				<!ATTLIST dipvalue value CDATA #REQUIRED>
				<!ATTLIST dipvalue default (yes|no) "no">
		<!ELEMENT configuration (conflocation*, confsetting*)>
			<!ATTLIST configuration name CDATA #REQUIRED>
			<!ATTLIST configuration tag CDATA #REQUIRED>
			<!ATTLIST configuration mask CDATA #REQUIRED>
			<!ELEMENT conflocation EMPTY>
				<!ATTLIST conflocation name CDATA #REQUIRED>
				<!ATTLIST conflocation number CDATA #REQUIRED>
				<!ATTLIST conflocation inverted (yes|no) "no">
			<!ELEMENT confsetting EMPTY>
				<!ATTLIST confsetting name CDATA #REQUIRED>
				<!ATTLIST confsetting value CDATA #REQUIRED>
				<!ATTLIST confsetting default (yes|no) "no">
		<!ELEMENT port (analog*)>
			<!ATTLIST port tag CDATA #REQUIRED>
			<!ELEMENT analog EMPTY>
				<!ATTLIST analog mask CDATA #REQUIRED>
		<!ELEMENT adjuster EMPTY>
			<!ATTLIST adjuster name CDATA #REQUIRED>
			<!ATTLIST adjuster default CDATA #REQUIRED>
		<!ELEMENT driver EMPTY>
			<!ATTLIST driver status (good|imperfect|preliminary) #REQUIRED>
			<!ATTLIST driver emulation (good|imperfect|preliminary) #REQUIRED>
			<!ATTLIST driver color (good|imperfect|preliminary) #REQUIRED>
			<!ATTLIST driver sound (good|imperfect|preliminary) #REQUIRED>
			<!ATTLIST driver graphic (good|imperfect|preliminary) #REQUIRED>
			<!ATTLIST driver cocktail (good|imperfect|preliminary) #IMPLIED>
			<!ATTLIST driver protection (good|imperfect|preliminary) #IMPLIED>
			<!ATTLIST driver savestate (supported|unsupported) #REQUIRED>
		<!ELEMENT feature EMPTY>
			<!ATTLIST feature type (protection|palette|graphics|sound|controls|keyboard|mouse|microphone|camera|disk|printer|lan|wan|timing) #REQUIRED>
			<!ATTLIST feature status (unemulated|imperfect) #IMPLIED>
			<!ATTLIST feature overall (unemulated|imperfect) #IMPLIED>
		<!ELEMENT device (instance*, extension*)>
			<!ATTLIST device type CDATA #REQUIRED>
			<!ATTLIST device tag CDATA #IMPLIED>
			<!ATTLIST device fixed_image CDATA #IMPLIED>
			<!ATTLIST device mandatory CDATA #IMPLIED>
			<!ATTLIST device interface CDATA #IMPLIED>
			<!ELEMENT instance EMPTY>
				<!ATTLIST instance name CDATA #REQUIRED>
				<!ATTLIST instance briefname CDATA #REQUIRED>
			<!ELEMENT extension EMPTY>
				<!ATTLIST extension name CDATA #REQUIRED>
		<!ELEMENT slot (slotoption*)>
			<!ATTLIST slot name CDATA #REQUIRED>
			<!ELEMENT slotoption EMPTY>
				<!ATTLIST slotoption name CDATA #REQUIRED>
				<!ATTLIST slotoption devname CDATA #REQUIRED>
				<!ATTLIST slotoption default (yes|no) "no">
		<!ELEMENT softwarelist EMPTY>
			<!ATTLIST softwarelist name CDATA #REQUIRED>
			<!ATTLIST softwarelist status (original|compatible) #REQUIRED>
			<!ATTLIST softwarelist filter CDATA #IMPLIED>
		<!ELEMENT ramoption (#PCDATA)>
			<!ATTLIST ramoption default CDATA #IMPLIED>
]>

The absolutely incredible number of options that any given item can have shows just how many different machine types this DAT format supports. Only MAME and similar projects currently create this DAT format due to most of the fields and options being unnecessary for other applications.

MAME Software List XML Format

Alongsize the ListXML format above, MAME and MESS both include software list DATs included in the hash folder. These have a semi-distinct set of features compared to ListXML and are not considered interchangable. Below is the DTD provided in each hash folder.

<!ELEMENT softwarelist (software+)>
	<!ATTLIST softwarelist name CDATA #REQUIRED>
	<!ATTLIST softwarelist description CDATA #IMPLIED>
	<!ELEMENT software (description, year, publisher, info*, sharedfeat*, part*)>
		<!ATTLIST software name CDATA #REQUIRED>
		<!ATTLIST software cloneof CDATA #IMPLIED>
		<!ATTLIST software supported (yes|partial|no) "yes">
		<!ELEMENT description (#PCDATA)>
		<!ELEMENT year (#PCDATA)>
		<!ELEMENT publisher (#PCDATA)>
		<!ELEMENT info EMPTY>
			<!ATTLIST info name CDATA #REQUIRED>
			<!ATTLIST info value CDATA #IMPLIED>
		<!ELEMENT sharedfeat EMPTY>
			<!ATTLIST sharedfeat name CDATA #REQUIRED>
			<!ATTLIST sharedfeat value CDATA #IMPLIED>
		<!ELEMENT part (feature*, dataarea*, diskarea*, dipswitch*)>
			<!ATTLIST part name CDATA #REQUIRED>
			<!ATTLIST part interface CDATA #REQUIRED>
			<!-- feature is used to store things like pcb-type, mapper type, etc. Specific values depend on the system. -->
			<!ELEMENT feature EMPTY>
				<!ATTLIST feature name CDATA #REQUIRED>
				<!ATTLIST feature value CDATA #IMPLIED>
			<!ELEMENT dataarea (rom*)>
				<!ATTLIST dataarea name CDATA #REQUIRED>
				<!ATTLIST dataarea size CDATA #REQUIRED>
				<!ATTLIST dataarea width (8|16|32|64) "8">
				<!ATTLIST dataarea endianness (big|little) "little">
				<!ELEMENT rom EMPTY>
					<!ATTLIST rom name CDATA #IMPLIED>
					<!ATTLIST rom size CDATA #IMPLIED>
					<!ATTLIST rom crc CDATA #IMPLIED>
					<!ATTLIST rom sha1 CDATA #IMPLIED>
					<!ATTLIST rom offset CDATA #IMPLIED>
					<!ATTLIST rom value CDATA #IMPLIED>
					<!ATTLIST rom status (baddump|nodump|good) "good">
					<!ATTLIST rom loadflag (load16_byte|load16_word|load16_word_swap|load32_byte|load32_word|load32_word_swap|load32_dword|load64_word|load64_word_swap|reload|fill|continue|reload_plain|ignore) #IMPLIED>
			<!ELEMENT diskarea (disk*)>
				<!ATTLIST diskarea name CDATA #REQUIRED>
				<!ELEMENT disk EMPTY>
					<!ATTLIST disk name CDATA #REQUIRED>
					<!ATTLIST disk sha1 CDATA #IMPLIED>
					<!ATTLIST disk status (baddump|nodump|good) "good">
					<!ATTLIST disk writeable (yes|no) "no">
			<!ELEMENT dipswitch (dipvalue*)>
				<!ATTLIST dipswitch name CDATA #REQUIRED>
				<!ATTLIST dipswitch tag CDATA #REQUIRED>
				<!ATTLIST dipswitch mask CDATA #REQUIRED>
				<!ELEMENT dipvalue EMPTY>
					<!ATTLIST dipvalue name CDATA #REQUIRED>
					<!ATTLIST dipvalue value CDATA #REQUIRED>
					<!ATTLIST dipvalue default (yes|no) "no">

Missfile Format

Missfiles are the simplest of the formats, generally only including a list of game or item names that are missing. This is based on the GoodTools missfile format where generally each "game" was associated with an item. The only additional support included in SabreTools is the ability to have SHA-1 missfiles, if based off of a Romba-style depot

gamename1
gamename2
gamename3
gamename4

OfflineList XML Format

Yet another XML-based format was used by the mostly-defunct file manager OfflineList and is wholly incompatible with other XML formats. This format is unique in a few ways that make it more desirable for frontends and scene releases: it includes information about screenshots, release info, emulation info, and allows for multiple file extensions. A major downside is that it only relies on the CRC hash for included files which makes it more prone to incorrect matches. At the time of this writing, I have been unable to find a proper DTD or XSD for the format, but the following example should suffice for now.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<dat xmlns:xsi="http:https://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="datas.xsd">
	<configuration>
		<datName>DATNAME</datName>
		<datVersion>VERSION</datVersion>
		<system>CONSOLE</system>
		<screenshotsWidth>1024</screenshotsWidth>
		<screenshotsHeight>768</screenshotsHeight>
		<infos>
			<title visible="false" inNamingOption="true" default="false"/>
			<location visible="true" inNamingOption="true" default="true"/>
			<publisher visible="true" inNamingOption="true" default="true"/>
			<sourceRom visible="true" inNamingOption="true" default="true"/>
			<saveType visible="true" inNamingOption="true" default="true"/>
			<romSize visible="true" inNamingOption="true" default="true"/>
			<releaseNumber visible="true" inNamingOption="true" default="false"/>
			<languageNumber visible="true" inNamingOption="true" default="false"/>
			<comment visible="true" inNamingOption="true" default="false"/>
			<romCRC visible="true" inNamingOption="true" default="true"/>
			<im1CRC visible="true" inNamingOption="false" default="false"/>
			<im2CRC visible="true" inNamingOption="false" default="false"/>
			<languages visible="true" inNamingOption="true" default="true"/>
		</infos>
		<canOpen>
			<extension>.bin</extension>
			<extension>.img</extension>
			<extension>.dsk</extension>
		</canOpen>
		<newDat>
 			<datVersionURL>URL_TO_VERSION_FILE</datVersionURL>
			<datURL fileName="FILENAME">URL_TO_NEWEST_VERSION</datURL>
			<imURL>URL_TO_IMAGES</imURL>
		</newDat>
		<search>
			<to value="location" default="true" auto="true"/>
			<to value="romSize" default="true" auto="false">
                <find operation="=" value="1048576">8Mbits</find>
                <find operation="=" value="2097152">16Mbits</find>
                <find operation="=" value="4194304">32Mbits</find>
				<find operation="=" value="8388608">64Mbits</find>
				<find operation="=" value="16777216">128Mbits</find>
				<find operation="=" value="33554432">256Mbits</find>
				<find operation="=" value="67108864">512Mbits</find>
				<find operation="=" value="134217728">1024Mbits</find>
                <find operation="=" value="268435456">2048Mbits</find>
                <find operation="=" value="536870912">4096Mbits</find>
			</to>
			<to value="languages" default="true" auto="true"/>
			<to value="saveType" default="true" auto="false">
				<find operation="inNoCase" value="EEPROM - 4 kbit">Eeprom - 4 kbit</find>
				<find operation="inNoCase" value="EEPROM - 64 kbit">Eeprom - 64 kbit</find>
				<find operation="inNoCase" value="EEPROM - 512 kbit">Eeprom - 512 kbit</find>
				<find operation="inNoCase" value="FLASH - 2 mbit">Flash - 2 mbit</find>
				<find operation="inNoCase" value="FLASH - 4 mbit">Flash - 4 mbit</find>
                <find operation="inNoCase" value="FLASH - 8 mbit">Flash - 8 mbit</find>
                <find operation="inNoCase" value="FLASH - 64 mbit">Flash - 64 mbit</find>
				<find operation="inNoCase" value="NONE">None</find>
				<find operation="inNoCase" value="TBC">TBC</find>
			</to>
			<to value="publisher" default="true" auto="true"/>
			<to value="sourceRom" default="true" auto="true"/>
		</search>
		<romTitle>%e %n %o%m</romTitle>
	</configuration>
	<games>
		<game>
			<imageNumber>1</imageNumber>
			<releaseNumber>1</releaseNumber>
			<title>GAMENAME</title>
			<saveType>None</saveType>
			<romSize>16777216</romSize>
			<publisher>PUBLISHER</publisher>
			<location>1</location>
			<sourceRom>RELEASE</sourceRom>
			<language>2</language>
			<files>
				<romCRC extension=".bin">ABCD01234</romCRC>
			</files>
			<im1CRC>789F71C4</im1CRC>
			<im2CRC>633C8693</im2CRC>
			<comment>x001</comment>
			<duplicateID>30</duplicateID>
		</game>
	</games>
	<gui>
		<images width="478" height="386">
			<image x="0" y="0" width="214" height="384"/>
			<image x="220" y="0" width="256" height="384"/>
		</images>
	</gui>
</dat>

There are not many file managers that still use this format, though as previously mentioned, there are some emulators and frontends that use its advanced features. SabreTools can read and partially write to this format.

openMSX XML Format

The openMSX XML format is unique to the openMSX emulator and contains many distinctions between items that are not available in other formats. These DATs tend to be used to catalog the available pieces of MSX software and have been tailor-made for this purpose.

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE softwaredb SYSTEM "softwaredb1.dtd">
<softwaredb timestamp="1590601761">
<!-- Credits -->
<![CDATA[
The softwaredb.xml file contains information about rom mapper types

- Copyright 2003 Nicolas Beyaert (Initial Database)
- Copyright 2004-2013 BlueMSX Team
- Copyright 2005-2020 openMSX Team
- Generation MSXIDs by www.generation-msx.nl

- Thanks go out to:
- - Generation MSX/Sylvester for the incredible source of information
- p_gimeno and diedel for their help adding and valdiating ROM additions
- GDX for additional ROM info and validations and corrections


]]>
<software>
	<title>Flipper Slipper</title>
	<system>SVI</system>
	<company>Spectravideo</company>
	<year>1983</year>
	<country>UK</country>
		<dump><rom><hash>7acd00c9053fbf7f7d698485759d170a483b123d</hash><remark>SD-291C</remark></rom></dump>
</software>
<software>
	<title>Frantic Freddie</title>
	<system>SVI</system>
	<company>Spectravideo</company>
	<year>1983</year>
	<country>UK</country>
		<dump><rom><hash>60adadb294d5492dfe6ada4b0710c5c31ef3e69c</hash><remark>SD-232C</remark></rom></dump>
</software>
</softwarelist>
<!-- Roms in this XML file:5821 - Created on Wed May 27 2020 - 9:49:32 AKDT-->

RomCenter Format

The RomCenter DAT format is not like most of the others since it is derived from standard INI files, but has a strict set of sections and possible name/value pairs. Similar to the ClrMamePro format above, it is meant to be easily created and edited manually but is more easily parsed (in theory) due to the standardized INI format that it follows. The only caveat is that individual file information lines use a special deliminating character (¬) that makes manual editing tricky unless you have that to hand.

The four different sections have similar usage to what can be found in all other DAT formats, with a special exception being DAT/plugin, which is unique to RomCenter. The CREDITS, DAT, and EMULATOR sections comprise of the header, which also includes the DAT/split and DAT/merge fields, which are the equivalent to forcemerging split and forcemerging merge in the other formats and are thus mutually exclusive.

Each individual game in the GAMES section are patterned off of the following format:

¬parent name¬parent description¬game name¬game description¬rom name¬rom crc¬rom size¬romof name¬merge name¬

Every part matches to something else that would be found in the other standardized formats. Note the usage of the special character to deliminate. Also note that every line has to contain a reference to the parent set name, so be careful when editing by hand. See below for a complete example of a sample DAT in this format. All information below is sourced from http:https://www.logiqx.com/DatFAQs/RomCenter.php.

[CREDITS]
author=AUTHOR
version=VERSION
comment=COMMENT
email=EMAIL (only in 2.50)
homepage=HOMEPAGE (only in 2.50)
url=URL (only in 2.50)
date=DATE (only in 2.50)

[DAT]
version=1.92|2.00|2.50
plugin=|arcade.dll
split=0|1
merge=0|1

[EMULATOR]
refname=DATNAME
version=DESCRIPTION

[GAMES]
¬invaders¬Space Invaders¬sisv¬Space Invaders (SV Version)¬sv0h.bin¬86bb8cb6¬1024¬invaders¬¬
¬invaders¬Space Invaders¬sisv¬Space Invaders (SV Version)¬sv02.bin¬0e159534¬1024¬invaders¬¬
¬invaders¬Space Invaders¬sisv¬Space Invaders (SV Version)¬invaders.g¬6bfaca4a¬2048¬invaders¬invaders.g¬
¬invaders¬Space Invaders¬sisv¬Space Invaders (SV Version)¬invaders.f¬0ccead96¬2048¬invaders¬invaders.f¬
¬invaders¬Space Invaders¬sisv¬Space Invaders (SV Version)¬tv04.m1¬cd2c67f6¬2048¬invaders¬¬

SabreDAT JSON Format

JSON is a standard object notation that is commonly used in a lot of applications. For the puproses of SabreTools, the SabreDAT JSON format is a near-direct serialization of all possible fields and types, resulting in a middle format that loses as little information as possible. No known managers outside of SabreTools can use this format natively.

SabreDAT XML Format

XML is a standard object notation that is commonly used in a lot of applications. For the puproses of SabreTools, the SabreDAT XML format is a near-direct serialization of all possible fields and types, resulting in a middle format that loses as little information as possible. No known managers outside of SabreTools can use this format natively.

SFV Hashing Formats

SFV files are commonly used with scene releases and include the name of the file and a simple CRC hash to compare against. Since SFV files were introduced, there have been other variants for higher-order hashes, such as MD5, RIPEMD160, SHA-1, SHA-256, SHA-384, SHA-512, and SpamSum. These provide a better, more secure hash to compare against, but generally does not take into account size.

These simple hashing files have an extension mirroring the hash that is being used inside, with the exception of SFV which uses CRC32. This means that an MD5 hash file would have the extension .md5, and so forth.

Below is a sample of an SFV file format:

file.part1 0123ABCD
file.part2 0123ABCD
file.part3 0123ABCD

Below is a sample of an MD5 (and other higher order hashes):

d41d8cd98f00b204e9800998ecf8427e file.part1
d41d8cd98f00b204e9800998ecf8427e file.part2
d41d8cd98f00b204e9800998ecf8427e file.part3

Standardized CSV, SSV, and TSV Formats

Comma-Separated Value (CSV), Semicolon-Separated Value (SSV), and Tab-Separated Value (TSV) files are typically used in generic data storage for numerous fields. Storing DAT data is one of the least common uses, but there is a "standardized" format that is used to convert rom data to a usable DAT. The only difference between how the data is stored is the delimiter between each of the pieces of data. Below is a list of recognized columns in the most common order:

file / filename / file name`, internal-name, description / dat description, game name / game / machine, game description, type, rom / romname / rom name / name, disk / diskname / disk name, size, crc / crc hash, md5 / md5 hash, sha1 / sha-1 / sha1 hash / sha-1 hash, sha256 / sha-256 / sha256 hash / sha-256 hash, sha384 / sha-384 / sha384 hash / sha-384 hash, sha512 / sha-512 / sha512 hash / sha-512 hash, nodump / no dump / status / item status

Any columns that have a '/' in the name mean that these are alternate titles for that column, so only one version is required. Please note that almost any reasonable selection of columns from those below in any order will be detected by SabreTools, but in general, the order that is shown is the one that is most standard.

It is also strongly recommended that this is only used as an input format, since there are no known managers outside of SabreTools that can use this format natively.