Game Database¶
Snapshot: 2026-11-05
5DO uses the 4DO-compatible game database to identify a disc by the MD5 of its first two 2048-byte data sectors. The same ID drives game titles, per-game fixes, BIOS selection, input defaults, library deduplication, cheats, save states, and NVRAM paths.
Because the ID is content-based, renamed copies and GoodTools/Redump/No-Intro variants of the same release share one ID. The desktop library collapses those copies by default and shows the total image count; Settings > Paths > Show duplicate disc images lists every file instead.
The embedded database is src/FiveDo.Storage/Data/GameDatabase.xml. It contains metadata facts only; it does not contain disc data or copyrighted assets.
1. Record schema¶
<game>
<id>14F7638D</id>
<checkSum>14F7638D69EC532C2104E55C02DDC3D7</checkSum>
<name>Powers Kingdom</name>
<releaseYear>1994</releaseYear>
<publisher>Panasonic</publisher>
<regions>EU</regions>
<revision>Rev 1</revision>
<discNumber>2</discNumber>
<discTotal>3</discTotal>
<bios>a48e6746bd7edec0f40cff078f0bb19f</bios>
<bios2>c23fb5d5e6bb1c240d02cf968972be37</bios2>
<fixMode>0x00000010</fixMode>
<inputDevices>1=lightgun</inputDevices>
<nvram>per-game</nvram>
<cheats>starter-pack</cheats>
</game>
| Element | Required | Meaning |
|---|---|---|
id | yes | First eight uppercase hex characters of checkSum. |
checkSum | yes | Uppercase MD5 of sectors 0 and 1 (4,096 bytes of user data). |
name | yes | Display title. |
releaseYear | no | Four-digit year. |
publisher | no | Publisher or developer. |
regions | no | US, JP, EU, KR, and combinations such as EU-US. |
revision | no | Revision or release type (Rev 1, RE2, Beta, Alpha). |
discNumber / discTotal | no | Multi-disc set position. |
bios | no | Preferred primary BIOS MD5 or file name. |
bios2 | no | Preferred secondary ROM (Kanji font, arcade support) MD5 or file name. |
fixMode | no | Per-game FixMode mask. The database value wins over the built-in fallback table. |
inputDevices | no | Compact per-port list such as 1=lightgun,2=mouse. Ports are one-based; omitted ports are joypads. |
nvram | no | Preferred NVRAM mode (auto, persistent, per-game, or disabled). Reserved for profile seeding. |
cheats | no | Named cheat bundle. Reserved for profile seeding. |
Older 4DO files without the optional elements load unchanged. The writer omits empty optional elements.
2. Current coverage¶
gamedb stats --folder "J:\Panasonic 3DO" on the local 1,366-image collection:
| Metric | Value |
|---|---|
| Disc images found | 1,366 |
| Readable images | 1,366 |
| Unique game IDs | 653 |
| Images with metadata | 1,366 (100%) |
| Unreadable images | 0 |
The three former exceptions were the [CD-Audio] bonus discs (A&M Music Sampler, D's Diner - The Director's Cut, and Oyaji Hunter Mahjong). They have no data track, but ChdDiscImage now opens audio-only discs and GameId derives a stable ID from the table of contents, so they are catalogued alongside the data discs. The BIOS still needs a data track to boot them; in-emulator CD-DA playback remains SYS-01 work.
The 653 records include the original 518 4DO entries plus 135 local entries generated by gamedb scan. Filename-derived records keep the original title, region, year, publisher, disc number, and revision when the filename provides them. A record with the same title as a curated 4DO entry inherits its publisher/year/BIOS/fix/input fields when the derived record does not have its own value.
3. Commands¶
5do gamedb stats [folder] [--json] [--no-recursive] [--max-parallel N]
5do gamedb scan <folder> --out <fragment.xml> [--include-known] [--json]
5do gamedb export --out <GameDatabase.xml> [--json]
5do gamedb merge <fragment.xml> --out <GameDatabase.xml> [--overwrite] [--json]
statsreports the embedded record count and, with a folder, image/unique/match coverage. Files that cannot be opened are listed inerrors.scancomputes IDs for every.chd,.cue, or.isobelow the folder, derives metadata from the filename, and writes an XML fragment for records not already in the database.--include-knownwrites every scanned record instead.exportwrites the complete embedded database.mergecombines a fragment with the embedded database. Existing records win unless--overwriteis supplied; the result is written to--outfor review before replacing the embedded file.
The scan is parallel by default (at most eight readers). CHDSharp can report transient open errors when many CHDs are read at once, so failed files are retried serially before they are reported.
4. Contribution workflow¶
- Scan the discs and write a fragment:
- Review the generated names, regions, disc numbers, and revisions. The parser keeps unknown parenthetical groups in the title and leaves uncertain fields empty; edit the XML rather than guessing.
- Add curated fields (
bios,fixMode,inputDevices) only with a reproducible compatibility reason indocs/Compatibility.md. - Merge into the embedded database and rebuild:
5do gamedb merge local-gamedb.xml --out src/FiveDo.Storage/Data/GameDatabase.xml
dotnet test 5DO.sln -c Debug
- Submit the XML change with the evidence. Do not add disc images or BIOS files.
The filename parser recognizes Redump, GoodTools, and No-Intro layouts. It consumes release years and dates, region lists, language lists, disc numbers (Disc 2 of 3, Disk B), revisions (Rev 1, RE2, v2.2), and common dump/edition tags ([!], [b], [tr ...], Beta, Proto, Unl, Alt, Not for Resale). Unknown groups stay in the title.
5. Runtime consumers¶
GameCompatibility.ForGameIdreadsfixModebefore its built-in fallback table.BiosLibrary.SelectForGamereadsbios/bios2before the filename-based known-title requirements; a per-game BIOS override still wins.GameControlDefaultsreadsinputDevicesbefore its title-prefix fallback, so a new lightgun or trackball title needs data rather than code.info --jsonexposesrevision,discNumber,discTotal,bios,bios2,inputDevices,nvram, andcheats.nvramandcheatsare parsed, exported, and displayed.GameProfile.CheatBundlecarries a user-supplied bundle name; no cheat data is bundled with 5DO.