Skip to content

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]
  • stats reports the embedded record count and, with a folder, image/unique/match coverage. Files that cannot be opened are listed in errors.
  • scan computes IDs for every .chd, .cue, or .iso below the folder, derives metadata from the filename, and writes an XML fragment for records not already in the database. --include-known writes every scanned record instead.
  • export writes the complete embedded database.
  • merge combines a fragment with the embedded database. Existing records win unless --overwrite is supplied; the result is written to --out for 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

  1. Scan the discs and write a fragment:
5do gamedb scan "D:\3DO" --out local-gamedb.xml --json
  1. 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.
  2. Add curated fields (bios, fixMode, inputDevices) only with a reproducible compatibility reason in docs/Compatibility.md.
  3. 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
  1. 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.ForGameId reads fixMode before its built-in fallback table.
  • BiosLibrary.SelectForGame reads bios/bios2 before the filename-based known-title requirements; a per-game BIOS override still wins.
  • GameControlDefaults reads inputDevices before its title-prefix fallback, so a new lightgun or trackball title needs data rather than code.
  • info --json exposes revision, discNumber, discTotal, bios, bios2, inputDevices, nvram, and cheats.
  • nvram and cheats are parsed, exported, and displayed. GameProfile.CheatBundle carries a user-supplied bundle name; no cheat data is bundled with 5DO.