Move ParserTests to new namespace

This commit is contained in:
Matt Nadareski
2025-04-14 12:33:15 -04:00
parent 94d64c3f6e
commit 9be1daddd4
22 changed files with 2 additions and 3 deletions

View File

@@ -0,0 +1,250 @@
using System;
using System.IO;
using SabreTools.DatFiles;
using SabreTools.Reports;
using Xunit;
namespace SabreTools.DatTools.Test
{
public class ParserTests
{
[Fact]
public void CreateDatFile_Default_Logiqx()
{
var datFile = Parser.CreateDatFile();
Assert.Equal(DatFormat.Logiqx, datFile.Header.GetFieldValue<DatFormat>(DatHeader.DatFormatKey));
Assert.Equal(0, datFile.Items.DatStatistics.TotalCount);
Assert.Equal(0, datFile.ItemsDB.DatStatistics.TotalCount);
}
[Theory]
[InlineData((DatFormat)0x00, DatFormat.Logiqx)]
[InlineData(DatFormat.Logiqx, DatFormat.Logiqx)]
[InlineData(DatFormat.LogiqxDeprecated, DatFormat.LogiqxDeprecated)]
[InlineData(DatFormat.SoftwareList, DatFormat.SoftwareList)]
[InlineData(DatFormat.Listxml, DatFormat.Listxml)]
[InlineData(DatFormat.OfflineList, DatFormat.OfflineList)]
[InlineData(DatFormat.SabreXML, DatFormat.SabreXML)]
[InlineData(DatFormat.OpenMSX, DatFormat.OpenMSX)]
[InlineData(DatFormat.ArchiveDotOrg, DatFormat.ArchiveDotOrg)]
[InlineData(DatFormat.ClrMamePro, DatFormat.ClrMamePro)]
[InlineData(DatFormat.RomCenter, DatFormat.RomCenter)]
[InlineData(DatFormat.DOSCenter, DatFormat.DOSCenter)]
[InlineData(DatFormat.AttractMode, DatFormat.AttractMode)]
[InlineData(DatFormat.MissFile, DatFormat.MissFile)]
[InlineData(DatFormat.CSV, DatFormat.CSV)]
[InlineData(DatFormat.SSV, DatFormat.SSV)]
[InlineData(DatFormat.TSV, DatFormat.TSV)]
[InlineData(DatFormat.Listrom, DatFormat.Listrom)]
[InlineData(DatFormat.EverdriveSMDB, DatFormat.EverdriveSMDB)]
[InlineData(DatFormat.SabreJSON, DatFormat.SabreJSON)]
[InlineData(DatFormat.RedumpSFV, DatFormat.RedumpSFV)]
[InlineData(DatFormat.RedumpMD2, DatFormat.RedumpMD2)]
[InlineData(DatFormat.RedumpMD4, DatFormat.RedumpMD4)]
[InlineData(DatFormat.RedumpMD5, DatFormat.RedumpMD5)]
[InlineData(DatFormat.RedumpSHA1, DatFormat.RedumpSHA1)]
[InlineData(DatFormat.RedumpSHA256, DatFormat.RedumpSHA256)]
[InlineData(DatFormat.RedumpSHA384, DatFormat.RedumpSHA384)]
[InlineData(DatFormat.RedumpSHA512, DatFormat.RedumpSHA512)]
[InlineData(DatFormat.RedumpSpamSum, DatFormat.RedumpSpamSum)]
public void CreateDatFile_Format_NoBaseDat(DatFormat datFormat, DatFormat expected)
{
var datFile = Parser.CreateDatFile(datFormat, baseDat: null);
Assert.Equal(expected, datFile.Header.GetFieldValue<DatFormat>(DatHeader.DatFormatKey));
Assert.Equal(0, datFile.Items.DatStatistics.TotalCount);
Assert.Equal(0, datFile.ItemsDB.DatStatistics.TotalCount);
}
[Theory]
[InlineData((DatFormat)0x00, DatFormat.Logiqx)]
[InlineData(DatFormat.Logiqx, DatFormat.Logiqx)]
[InlineData(DatFormat.LogiqxDeprecated, DatFormat.LogiqxDeprecated)]
[InlineData(DatFormat.SoftwareList, DatFormat.SoftwareList)]
[InlineData(DatFormat.Listxml, DatFormat.Listxml)]
[InlineData(DatFormat.OfflineList, DatFormat.OfflineList)]
[InlineData(DatFormat.SabreXML, DatFormat.SabreXML)]
[InlineData(DatFormat.OpenMSX, DatFormat.OpenMSX)]
[InlineData(DatFormat.ArchiveDotOrg, DatFormat.ArchiveDotOrg)]
[InlineData(DatFormat.ClrMamePro, DatFormat.ClrMamePro)]
[InlineData(DatFormat.RomCenter, DatFormat.RomCenter)]
[InlineData(DatFormat.DOSCenter, DatFormat.DOSCenter)]
[InlineData(DatFormat.AttractMode, DatFormat.AttractMode)]
[InlineData(DatFormat.MissFile, DatFormat.MissFile)]
[InlineData(DatFormat.CSV, DatFormat.CSV)]
[InlineData(DatFormat.SSV, DatFormat.SSV)]
[InlineData(DatFormat.TSV, DatFormat.TSV)]
[InlineData(DatFormat.Listrom, DatFormat.Listrom)]
[InlineData(DatFormat.EverdriveSMDB, DatFormat.EverdriveSMDB)]
[InlineData(DatFormat.SabreJSON, DatFormat.SabreJSON)]
[InlineData(DatFormat.RedumpSFV, DatFormat.RedumpSFV)]
[InlineData(DatFormat.RedumpMD2, DatFormat.RedumpMD2)]
[InlineData(DatFormat.RedumpMD4, DatFormat.RedumpMD4)]
[InlineData(DatFormat.RedumpMD5, DatFormat.RedumpMD5)]
[InlineData(DatFormat.RedumpSHA1, DatFormat.RedumpSHA1)]
[InlineData(DatFormat.RedumpSHA256, DatFormat.RedumpSHA256)]
[InlineData(DatFormat.RedumpSHA384, DatFormat.RedumpSHA384)]
[InlineData(DatFormat.RedumpSHA512, DatFormat.RedumpSHA512)]
[InlineData(DatFormat.RedumpSpamSum, DatFormat.RedumpSpamSum)]
public void CreateDatFile_Format_BaseDat(DatFormat datFormat, DatFormat expected)
{
var baseDat = Parser.CreateDatFile();
baseDat.Header.SetFieldValue<string?>(DatHeader.FileNameKey, "filename");
var datFile = Parser.CreateDatFile(datFormat, baseDat);
Assert.Equal(expected, datFile.Header.GetFieldValue<DatFormat>(DatHeader.DatFormatKey));
Assert.Equal("filename", datFile.Header.GetFieldValue<string?>(DatHeader.FileNameKey));
Assert.Equal(0, datFile.Items.DatStatistics.TotalCount);
Assert.Equal(0, datFile.ItemsDB.DatStatistics.TotalCount);
}
[Theory]
[InlineData((DatFormat)0x00, (DatFormat)0x00)] // I think this is a bug
[InlineData(DatFormat.Logiqx, DatFormat.Logiqx)]
[InlineData(DatFormat.LogiqxDeprecated, DatFormat.LogiqxDeprecated)]
[InlineData(DatFormat.SoftwareList, DatFormat.SoftwareList)]
[InlineData(DatFormat.Listxml, DatFormat.Listxml)]
[InlineData(DatFormat.OfflineList, DatFormat.OfflineList)]
[InlineData(DatFormat.SabreXML, DatFormat.SabreXML)]
[InlineData(DatFormat.OpenMSX, DatFormat.OpenMSX)]
[InlineData(DatFormat.ArchiveDotOrg, DatFormat.ArchiveDotOrg)]
[InlineData(DatFormat.ClrMamePro, DatFormat.ClrMamePro)]
[InlineData(DatFormat.RomCenter, DatFormat.RomCenter)]
[InlineData(DatFormat.DOSCenter, DatFormat.DOSCenter)]
[InlineData(DatFormat.AttractMode, DatFormat.AttractMode)]
[InlineData(DatFormat.MissFile, DatFormat.MissFile)]
[InlineData(DatFormat.CSV, DatFormat.CSV)]
[InlineData(DatFormat.SSV, DatFormat.SSV)]
[InlineData(DatFormat.TSV, DatFormat.TSV)]
[InlineData(DatFormat.Listrom, DatFormat.Listrom)]
[InlineData(DatFormat.EverdriveSMDB, DatFormat.EverdriveSMDB)]
[InlineData(DatFormat.SabreJSON, DatFormat.SabreJSON)]
[InlineData(DatFormat.RedumpSFV, DatFormat.RedumpSFV)]
[InlineData(DatFormat.RedumpMD2, DatFormat.RedumpMD2)]
[InlineData(DatFormat.RedumpMD4, DatFormat.RedumpMD4)]
[InlineData(DatFormat.RedumpMD5, DatFormat.RedumpMD5)]
[InlineData(DatFormat.RedumpSHA1, DatFormat.RedumpSHA1)]
[InlineData(DatFormat.RedumpSHA256, DatFormat.RedumpSHA256)]
[InlineData(DatFormat.RedumpSHA384, DatFormat.RedumpSHA384)]
[InlineData(DatFormat.RedumpSHA512, DatFormat.RedumpSHA512)]
[InlineData(DatFormat.RedumpSpamSum, DatFormat.RedumpSpamSum)]
public void CreateDatFile_Format_FromHeader(DatFormat datFormat, DatFormat expected)
{
DatHeader datHeader = new DatHeader();
datHeader.SetFieldValue(DatHeader.DatFormatKey, datFormat);
datHeader.SetFieldValue<string?>(DatHeader.FileNameKey, "filename");
DatModifiers datModifiers = new DatModifiers();
datModifiers.Quotes = true;
var datFile = Parser.CreateDatFile(datHeader, datModifiers);
Assert.Equal(expected, datFile.Header.GetFieldValue<DatFormat>(DatHeader.DatFormatKey));
Assert.Equal("filename", datFile.Header.GetFieldValue<string?>(DatHeader.FileNameKey));
Assert.True(datFile.Modifiers.Quotes);
Assert.Equal(0, datFile.Items.DatStatistics.TotalCount);
Assert.Equal(0, datFile.ItemsDB.DatStatistics.TotalCount);
}
[Theory]
[InlineData(null, (DatFormat)0x00, 0)]
[InlineData("test-logiqx.xml", DatFormat.Logiqx, 6)]
//[InlineData(null, DatFormat.LogiqxDeprecated, 0)] // Not parsed separately
[InlineData("test-softwarelist.xml", DatFormat.SoftwareList, 6)]
[InlineData("test-listxml.xml", DatFormat.Listxml, 19)]
[InlineData("test-offlinelist.xml", DatFormat.OfflineList, 1)]
//[InlineData(null, DatFormat.SabreXML, 0)] // TODO: Create good-enough test file for this
[InlineData("test-openmsx.xml", DatFormat.OpenMSX, 3)]
[InlineData("test-archivedotorg.xml", DatFormat.ArchiveDotOrg, 1)]
[InlineData("test-cmp.dat", DatFormat.ClrMamePro, 6)]
[InlineData("test-romcenter.dat", DatFormat.RomCenter, 1)]
[InlineData("test-doscenter.dat", DatFormat.DOSCenter, 1)]
[InlineData("test-attractmode.txt", DatFormat.AttractMode, 1)]
//[InlineData(null, DatFormat.MissFile, 0)] // Parsing is not supported
//[InlineData(null, DatFormat.CSV, 0)] // TODO: Create good-enough test file for this
//[InlineData(null, DatFormat.SSV, 0)] // TODO: Create good-enough test file for this
//[InlineData(null, DatFormat.TSV, 0)] // TODO: Create good-enough test file for this
[InlineData("test-listrom.txt", DatFormat.Listrom, 6)]
[InlineData("test-smdb.txt", DatFormat.EverdriveSMDB, 1)]
//[InlineData(null, DatFormat.SabreJSON, 0)] // TODO: Create good-enough test file for this
[InlineData("test-sfv.sfv", DatFormat.RedumpSFV, 1)]
[InlineData("test-md2.md2", DatFormat.RedumpMD2, 1)]
[InlineData("test-md4.md4", DatFormat.RedumpMD4, 1)]
[InlineData("test-md5.md5", DatFormat.RedumpMD5, 1)]
[InlineData("test-sha1.sha1", DatFormat.RedumpSHA1, 1)]
[InlineData("test-sha256.sha256", DatFormat.RedumpSHA256, 1)]
[InlineData("test-sha384.sha384", DatFormat.RedumpSHA384, 1)]
[InlineData("test-sha512.sha512", DatFormat.RedumpSHA512, 1)]
[InlineData("test-spamsum.spamsum", DatFormat.RedumpSpamSum, 1)]
public void ParseIntoTest(string? filename, DatFormat datFormat, int totalCount)
{
// For all filenames, add the local path for test data
if (filename != null)
filename = Path.Combine(Environment.CurrentDirectory, "TestData", filename);
else
filename = string.Empty;
var datFile = Parser.CreateDatFile();
datFile.Header.RemoveField(DatHeader.DatFormatKey);
Parser.ParseInto(datFile, filename, throwOnError: true);
Assert.Equal(datFormat, datFile.Header.GetFieldValue<DatFormat>(DatHeader.DatFormatKey));
Assert.Equal(totalCount, datFile.Items.DatStatistics.TotalCount);
Assert.Equal(totalCount, datFile.ItemsDB.DatStatistics.TotalCount);
}
[Theory]
[InlineData(null, (DatFormat)0x00, 0)]
[InlineData("test-logiqx.xml", DatFormat.Logiqx, 6)]
//[InlineData(null, DatFormat.LogiqxDeprecated, 0)] // Not parsed separately
[InlineData("test-softwarelist.xml", DatFormat.SoftwareList, 6)]
[InlineData("test-listxml.xml", DatFormat.Listxml, 19)]
[InlineData("test-offlinelist.xml", DatFormat.OfflineList, 1)]
//[InlineData(null, DatFormat.SabreXML, 0)] // TODO: Create good-enough test file for this
[InlineData("test-openmsx.xml", DatFormat.OpenMSX, 3)]
[InlineData("test-archivedotorg.xml", DatFormat.ArchiveDotOrg, 1)]
[InlineData("test-cmp.dat", DatFormat.ClrMamePro, 6)]
[InlineData("test-romcenter.dat", DatFormat.RomCenter, 1)]
[InlineData("test-doscenter.dat", DatFormat.DOSCenter, 1)]
[InlineData("test-attractmode.txt", DatFormat.AttractMode, 1)]
//[InlineData(null, DatFormat.MissFile, 0)] // Parsing is not supported
//[InlineData(null, DatFormat.CSV, 0)] // TODO: Create good-enough test file for this
//[InlineData(null, DatFormat.SSV, 0)] // TODO: Create good-enough test file for this
//[InlineData(null, DatFormat.TSV, 0)] // TODO: Create good-enough test file for this
[InlineData("test-listrom.txt", DatFormat.Listrom, 6)]
[InlineData("test-smdb.txt", DatFormat.EverdriveSMDB, 1)]
//[InlineData(null, DatFormat.SabreJSON, 0)] // TODO: Create good-enough test file for this
[InlineData("test-sfv.sfv", DatFormat.RedumpSFV, 1)]
[InlineData("test-md2.md2", DatFormat.RedumpMD2, 1)]
[InlineData("test-md4.md4", DatFormat.RedumpMD4, 1)]
[InlineData("test-md5.md5", DatFormat.RedumpMD5, 1)]
[InlineData("test-sha1.sha1", DatFormat.RedumpSHA1, 1)]
[InlineData("test-sha256.sha256", DatFormat.RedumpSHA256, 1)]
[InlineData("test-sha384.sha384", DatFormat.RedumpSHA384, 1)]
[InlineData("test-sha512.sha512", DatFormat.RedumpSHA512, 1)]
[InlineData("test-spamsum.spamsum", DatFormat.RedumpSpamSum, 1)]
public void ParseStatisticsTest(string? filename, DatFormat datFormat, int totalCount)
{
// For all filenames, add the local path for test data
if (filename != null)
filename = Path.Combine(Environment.CurrentDirectory, "TestData", filename);
var datFile = Parser.ParseStatistics(filename, throwOnError: true);
Assert.Equal(datFormat, datFile.Header.GetFieldValue<DatFormat>(DatHeader.DatFormatKey));
Assert.Equal(totalCount, datFile.Items.DatStatistics.TotalCount);
Assert.Equal(totalCount, datFile.ItemsDB.DatStatistics.TotalCount);
}
[Theory]
[InlineData(StatReportFormat.None, typeof(Reports.Formats.ConsoleOutput))]
[InlineData(StatReportFormat.Textfile, typeof(Reports.Formats.Textfile))]
[InlineData(StatReportFormat.CSV, typeof(Reports.Formats.CommaSeparatedValue))]
[InlineData(StatReportFormat.HTML, typeof(Reports.Formats.Html))]
[InlineData(StatReportFormat.SSV, typeof(Reports.Formats.SemicolonSeparatedValue))]
[InlineData(StatReportFormat.TSV, typeof(Reports.Formats.TabSeparatedValue))]
[InlineData((StatReportFormat)0xFF, typeof(Reports.Formats.ConsoleOutput))]
public void CreateReportTest(StatReportFormat reportFormat, Type expected)
{
var report = Parser.CreateReport(reportFormat, []);
Assert.Equal(expected, report.GetType());
}
}
}

View File

@@ -0,0 +1,14 @@
<?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>

View File

@@ -0,0 +1,2 @@
#Name;Title;Emulator;CloneOf;Year;Manufacturer;Category;Players;Rotation;Control;Status;DisplayCount;DisplayType;AltRomname;AltTitle;Extra;Buttons
game-1;desc-1;MAME;game-2;1990;Big Manufacturer;Game;4;0;6-button;Verified;1;Horizontal;Game!;Game! (v2);Glitchy;6

View File

@@ -0,0 +1,48 @@
clrmamepro (
name "Internal DAT Name"
description "Internal DAT Name"
rootdir "root"
category "Games"
version "1.0"
date "1900-01-01"
author "Unknown"
email "email@email.email"
homepage "localhost"
url "127.0.0.1"
comment "Not real data, sorry"
header "match.xml"
type "SuperDAT"
forcemerging "split"
forcezipping "zip"
forcepacking "yes"
)
set (
name "game1"
description "Game! 1.0"
year "1980"
manufacturer "Manufacturer"
category "Arcade"
cloneof "game2"
romof "game2"
sampleof "genpin"
rom ( name "rom.bin" size 1024 crc DEADBEEF md5 b41d8cd98f00b204e9800998ecf8427e sha1 aa39a3ee5e6b4b0d3255bfef95601890afd80709 sha256 aa7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad sha384 cb00753f45a35e8bb5a03d699ac65007272c32ab0eded1631a8b605a43ff5bed8086072ba1e7cc2358baeca134c825a8 sha512 ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49d spamsum QXXY status baddump date "1980-01-01" )
disk ( name "disk" md5 b41d8cd98f00b204e9800998ecf8427e sha1 aa39a3ee5e6b4b0d3255bfef95601890afd80709 status baddump )
media ( name "media" md5 b41d8cd98f00b204e9800998ecf8427e sha1 aa39a3ee5e6b4b0d3255bfef95601890afd80709 sha256 aa7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad spamsum QXXY )
)
game (
name "game2"
release ( name "Release" date "1980-01-01" default yes region World language English )
)
machine (
name "game3"
biosset ( name "Universal BIOS" default yes description "Worldwide" )
)
resource (
name "genpin"
sample ( name "genericsample" )
)

View File

@@ -0,0 +1,14 @@
doscenter (
name "Internal DAT Name"
description "Internal DAT Name"
version "1.0"
date "1900-01-01"
author "Unknown"
homepage "127.0.0.1"
comment "Not real data, sorry"
)
game (
name "game1.zip"
file ( name "rom.bin" size 1024 crc DEADBEEF date 1980-01-01 12:00 )
)

View File

@@ -0,0 +1,8 @@
ROMs required for driver "game".
Name Size Checksum
diskname SHA1(a257c456d31681068ed5caa1f1fb2b51da4826db)
baddisk BAD SHA1(abcdc456d31681068ed5caa1f1fb2b51da4826db) BAD_DUMP
goodrom.bin 2048 CRC(8f68533e) SHA1(b257c556d31691068ed5c991f1fb2b51da4826db)
missingdisk NO GOOD DUMP KNOWN
badrom.bin 32 BAD CRC(000000b0) SHA1(bb0bb62365402543e3154b9a77be9c75010e6abc) BAD_DUMP
missingrom.bin 108 NO GOOD DUMP KNOWN

View File

@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Omitting DTD normally present here -->
<mame build="0.100" debug="yes" mameconfig="debug">
<machine name="game1" cloneof="game2" romof="game2" sampleof="genpin" sourcefile="blah.cpp" runnable="partial" isbios="no" isdevice="no" ismechanical="no">
<description>Game! (Version 1)</description>
<year>1980</year>
<manufacturer>Manufacturer</manufacturer>
<history>A long and storied history</history>
<adjuster name="adjuster" default="yes">
<condition tag="tag" mask="mask" relation="eq" value="value" />
</adjuster>
<biosset name="biosset" description="description" default="yes" />
<chip name="cpu" tag="cpu" type="cpu" clock="100000" />
<configuration name="configuration" tag="tag" mask="mask">
<condition tag="tag" mask="mask" relation="eq" value="value" />
<conflocation name="conflocation" number="1" inverted="no" />
<confsetting name="confsetting" value="value" default="yes" />
</configuration>
<device type="serial" tag="tag" fixed_image="abcd" mandatory="1" interface="serial">
<instance name="port_a" briefname="pa" />
<extension name=".123" />
</device>
<device_ref name="cport" />
<dipswitch name="dipswitch" tag="tag" mask="mask">
<condition tag="tag" mask="mask" relation="eq" value="value" />
<diplocation name="diplocation" number="1" inverted="no" />
<dipvalue name="dipvalue" value="value" default="yes" />
</dipswitch>
<disk name="disk" sha1="aa39a3ee5e6b4b0d3255bfef95601890afd80709" merge="disk2" region="USA" index="0" writable="no" status="good" optional="no" />
<display tag="tag" type="raster" rotate="0" flipx="no" width="1024" height="768" refresh="60.00" pixclock="10000" htotal="1092" hbend="1024" hbstart="0" vtotal="800" vbend="768" vbstart="0" />
<driver status="good" emulation="good" cocktail="good" savestate="supported" />
<feature type="camera" status="imperfect" overall="imperfect" />
<input service="yes" tilt="no" players="4" coins="2">
<control type="joy" player="1" buttons="6" reqbuttons="6" minimum="0" maximum="255" sensitivity="1" keydelta="2" reverse="no" ways="8" ways2="2" ways3="2" />
</input>
<port tag="tag">
<analog mask="mask" />
</port>
<ramoption name="ramoption" default="yes">1024KB</ramoption>
<rom name="rom.bin" bios="bios" size="1024" crc="deadbeef" sha1="ca39a3ee5e6b4b0d3255bfef95601890afd80709" merge="rom2.bin" region="USA" offset="0x0000" status="good" optional="no" />
<sample name="generic" />
<slot name="slot">
<slotoption name="slotoption" devname="devname" default="yes" />
</slot>
<softwarelist name="softwarelist" status="original" filter="filter" />
<sound channels="16" />
</machine>
</mame>

View File

@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE datafile PUBLIC "-//Logiqx//DTD ROM Management Datafile//EN" "http://www.logiqx.com/Dats/datafile.dtd">
<datafile build="1.0" debug="yes">
<header>
<name>Internal DAT Name</name>
<description>Internal DAT Name</description>
<rootdir>root</rootdir>
<category>Games</category>
<version>1.0</version>
<date>1900-01-01</date>
<author>Unknown</author>
<email>email@email.email</email>
<homepage>localhost</homepage>
<url>127.0.0.1</url>
<comment>Not real data, sorry</comment>
<type>SuperDAT</type>
<clrmamepro header="match.xml" forcemerging="split" forcenodump="ignore" forcepacking="unzip" />
<romcenter plugin="arcade" rommode="split" biosmode="split" samplemode="split" lockrommode="no" lockbiosmode="no" locksamplemode="no" />
</header>
<dir name="topdir">
<machine name="game1" sourcefile="blah.c" board="newboard" rebuildto="game1" runnable="partial" cloneof="game2" romof="game2" sampleof="game2" isbios="yes" isdevice="no" ismechanical="yes" id="0001">
<comment>Not a real game, sorry</comment>
<description>Game! (Version 1)</description>
<year>1980</year>
<manufacturer>Manufacturer</manufacturer>
<publisher>Publisher</publisher>
<category>Games</category>
<category>Arcade</category>
<trurip>
<titleid>0001</titleid>
<publisher>Publisher</publisher>
<developer>Developer</developer>
<year>1980</year>
<genre>Action</genre>
<subgenre>Adventure</subgenre>
<ratings>5</ratings>
<score>100</score>
<players>4</players>
<enabled>Yes</enabled>
<crc>DEADBEEF</crc>
<source>Official</source>
<cloneof>game2</cloneof>
<relatedto>game3</relatedto>
</trurip>
<disk name="disk" md5="a41d8cd98f00b204e9800998ecf8427e" sha1="aa39a3ee5e6b4b0d3255bfef95601890afd80709" merge="disk2" status="good" />
<media name="media" md5="b41d8cd98f00b204e9800998ecf8427e" sha1="ba39a3ee5e6b4b0d3255bfef95601890afd80709" sha256="aa7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad" spamsum="QXXY"/>
<rom name="rom.bin" size="1024" crc="deadbeef" md5="c41d8cd98f00b204e9800998ecf8427e" sha1="ca39a3ee5e6b4b0d3255bfef95601890afd80709" sha256="ca7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad" sha384="ab00753f45a35e8bb5a03d699ac65007272c32ab0eded1631a8b605a43ff5bed8086072ba1e7cc2358baeca134c825a7" sha512="cdaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f" spamsum="QXXZ" merge="rom2.bin" status="good" date="1980-01-01" inverted="true" mia="yes" />
</machine>
<game name="game2">
<archive name="archive" number="0001" clone="X" regparent="(PARENT)" region="World" langauges="Xx,Yy,Zz" />
<biosset name="biosset" description="Described" default="yes" />
<release name="release" region="World" Language="English" date="1900-01-01" default="yes" />
</game>
</dir>
</datafile>

View File

@@ -0,0 +1 @@
8350e5a3e24c153df2275c9f80692773 rom.bin

View File

@@ -0,0 +1 @@
31d6cfe0d16ae931b73c59d7e0c089c0 rom.bin

View File

@@ -0,0 +1 @@
d41d8cd98f00b204e9800998ecf8427e rom.bin

View File

@@ -0,0 +1,68 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<dat xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="datas.xsd">
<configuration>
<datName>Internal DAT Name</datName>
<datVersion>1</datVersion>
<system>Arcade</system>
<screenshotsWidth>224</screenshotsWidth>
<screenshotsHeight>224</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"/>
<romSize visible="true" inNamingOption="true" default="true"/>
<releaseNumber visible="true" inNamingOption="true" default="false"/>
<imageNumber visible="true" inNamingOption="false" default="false"/>
<languageNumber visible="true" inNamingOption="true" default="false"/>
<comment visible="true" inNamingOption="true" default="false"/>
<romCRC visible="true" inNamingOption="true" default="false"/>
<im1CRC visible="false" inNamingOption="false" default="false"/>
<im2CRC visible="false" inNamingOption="false" default="false"/>
<languages visible="true" inNamingOption="true" default="true"/>
</infos>
<canOpen>
<extension>.bin</extension>
<extension>.rom</extension>
</canOpen>
<newDat>
<datVersionURL>127.0.0.1</datVersionURL>
<datURL fileName="DatName.zip">127.0.0.1/DatName.zip</datURL>
<imURL>127.0.0.1/img/</imURL>
</newDat>
<search>
<to value="location" default="true" auto="true"/>
<to value="romSize" default="true" auto="false">
<find operation="&lt;" value="524288">&lt; 4Mbits</find>
<find operation="=" value="524288">4Mbits</find>
<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>
</to>
<to value="languages" default="true" auto="true"/>
</search>
<romTitle>%u - %n</romTitle>
</configuration>
<games>
<game>
<imageNumber>1</imageNumber>
<releaseNumber>1</releaseNumber>
<title>Game! (Version 1)</title>
<saveType>Default</saveType>
<romSize>1024</romSize>
<publisher>Publisher</publisher>
<location>1</location>
<sourceRom>Source</sourceRom>
<language>256</language>
<files>
<romCRC extension=".bin">DEBEADEF</romCRC>
</files>
<im1CRC>deadbeef</im1CRC>
<im2CRC>beefdead</im2CRC>
<comment>Not a real release, sorry</comment>
<duplicateID>0</duplicateID>
</game>
</games>
</dat>

View File

@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE softwaredb SYSTEM "softwaredb1.dtd">
<softwaredb timestamp="1608157456">
<!-- 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>Game Name</title>
<genmsxid>0001</genmsxid>
<system>MSX1</system>
<company>Manufacturer</company>
<year>19xx</year>
<country>World</country>
<dump><rom><hash>7acd00c9053fbf7f7d698485759d170a483b123d</hash><start>0x8000</start><type>ASCII8</type><remark>Comment Here</remark></rom></dump>
<dump><megarom><hash>da58f56d4b1660bc36d74bfb29776ef8ec61a831</hash><start>0x4000</start><type>ASCII16</type><remark>Comment Too</remark></megarom></dump>
<dump><original value="true">Good</original><boot>LOAD(8)</boot><sccpluscart><type>KonamiSCC</type><hash>afb1aef44a67cf7c9232f8a1c8587c66dd820caa</hash><remark>Comment Three</remark></sccpluscart></dump>
</software>
</softwaredb>

View File

@@ -0,0 +1,21 @@
[CREDITS]
author=Unknown
version=1.0
email=email@email.email
homepage=localhost
url=127.0.0.1
date=1900-01-01
comment=Not real data, sorry
[DAT]
version=2.50
plugin=Arcade
split=0
merge=0
[EMULATOR]
refname=Internal DAT Name
version=Internal DAT Name
[GAMES]
¬game2¬Game! (Version 2)¬game1¬Game! (Version 1)¬rom.bin¬deadbeef¬1024¬game2¬rom2.bin¬

View File

@@ -0,0 +1 @@
rom.bin 00000000

View File

@@ -0,0 +1 @@
da39a3ee5e6b4b0d3255bfef95601890afd80709 rom.bin

View File

@@ -0,0 +1 @@
ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad rom.bin

View File

@@ -0,0 +1 @@
cb00753f45a35e8bb5a03d699ac65007272c32ab0eded1631a8b605a43ff5bed8086072ba1e7cc2358baeca134c825a7 rom.bin

View File

@@ -0,0 +1 @@
ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f rom.bin

View File

@@ -0,0 +1 @@
ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad test/rom.bin da39a3ee5e6b4b0d3255bfef95601890afd80709 d41d8cd98f00b204e9800998ecf8427e 00000000 0

View File

@@ -0,0 +1,25 @@
<?xml version="1.0"?>
<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
<!-- Omitting license information and comments normally here -->
<softwarelist name="softwarelist" description="Test Software List">
<software name="game1" cloneof="game2" supported="partial">
<description>Game! (Version 1)</description>
<year>1980</year>
<publisher>Publisher</publisher>
<info name="name" value="value" />
<sharedfeat name="name" value="value" />
<part name="part" interface="interface">
<feature name="name" value="value" />
<dataarea name="name" size="1024" width="16" endianness="big">
<rom name="rom.bin" size="1024" crc="deadbeef" sha1="ca39a3ee5e6b4b0d3255bfef95601890afd80709" offset="0x0000" value="value" status="good" loadflag="load16_byte" />
</dataarea>
<diskarea name="diskarea">
<disk name="disk" sha1="aa39a3ee5e6b4b0d3255bfef95601890afd80709" status="good" writable="no" />
</diskarea>
<dipswitch name="dipswitch" tag="tag" mask="mask">
<dipvalue name="dipvalue" value="value" default="yes" />
</dipswitch>
</part>
</software>
</softwarelist>

View File

@@ -0,0 +1 @@
QXX rom.bin