Repository navigation
DAT file generator - #398
Merged
Merged
Conversation
EPROMs 18 and 20 of this set were corrupted, and a patch kept attract mode rendering. magtruck, the redump from September 2022, replaces it. The two sets also use the same names for different files, so they cannot be in one merged ROM set.
The Virtua Racing Extended builds give their files the names of vr's files, but the contents are different. File names must be unique in a parent/clone family, because a merged ROM set keeps the parent and its clones in one zip file. Supermodel finds files by CRC, thus zip files with the names from the build continue to load.
ROM auditing tools need the size of each file in a DAT file. The sizes come from MAME 0.289's -listxml output, found by CRC32. Files that MAME does not have: - vrextsat, vrextps2: the sizes of vr's files with the same names, because the builds keep vr's layout. - vs298 epr-20917.17: 0x100000. MAME 0.289 has the old bad dump; the redump (MAME commit c35bfdf) has the same size. - pro1000: the sizes from the pro1000.zip set. The sizes agree with all 722 matching files in a local ROM collection.
ROM auditing tools need each file's size, and a merged ROM set needs file names that are unique in a parent/clone family. Now the loader checks both, thus a new Games.xml entry that breaks a DAT file shows errors at startup: - The size attribute of <file> is required. - A file in a zip file must have the size that Games.xml gives. - Two different files in a parent/clone family must not have the same name.
LoadZipArchive() set ZippedFile::zipfilename to the name of the file in the zip archive, thus errors gave the ROM file name two times, for example "File 'epr-14870a.7' in 'epr-14870a.7' is not sized in 2-byte chunks."
A DAT file writer needs each ROM set's files, but the regions of the game definitions are private. GetROMSetFiles() gives the ROM sets in the order of the XML file. Each has its files with name, size, and CRC32, one time each. A clone's list includes the files that it uses from its parent, as the loader merges them. HasXMLErrors() tells if the XML file has errors, because the constructor did not keep the result.
-output-dat=<file> writes all ROM sets as a Logiqx XML DAT file and quits. ROM auditing tools such as ClrMamePro and RomVault use it to check ROM sets and to rebuild them as merged, split, or non-merged sets. A clone has cloneof and romof attributes, and each file that it shares with its parent has a merge attribute with the parent's file name. If Games.xml has errors, no file is written and the exit code is 1.
The Virtua Racing Extended ROM sets are too esoteric to be included in the mainstream game list. Also, I was not able to obtain the PS2 ISO needed to build the PS2 version of vrext.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added a DAT file generator. Use the
--output-datoption to produce an DAT XML file suitable for use with ROM auditing tools like clrmamepro.