fix: serve the dump a name's hashes prove

dsi_bios7.bin and dsi_bios9.bin hold the DSi Panda devkit boot ROMs, eMMC
key-Y zeroed. Every md5 and crc32 declared under those names designates
a retail dump in the same directory, yet hashless entries (RetroBat,
dsperate) got the devkit ROMs by name. by_proven_name maps such a name to
the proven primaries beside it. kick13.rom, dsi_firmware.bin and
spectrum.zip follow the same rule.
This commit is contained in:
Abdessamad Derraz committed 2026-11-06 15:00:28 +01:00
1 parent 8d7b4cd4e4
commit 13a10da993
28 files changed
+538 -371

No files matched your search

+7 -1
View File
@@ -1701,9 +1701,15 @@ def resolve_local_file(
# none of them answers. melonDS Nightly's dsi_nand.bin is read at
# dsi/nand.bin: with the DSi image absent from the checkout, the
# basename let the Wii nand.bin outrank the entry's own DSi variant.
# A name whose held file no declaration proves, while declarations
# of that name prove another dump beside it, means that dump: the
# DSi devkit boot ROMs filed as dsi_bios7.bin went to RetroBat.
by_proven_name = db.get("indexes", {}).get("by_proven_name", {})
for tier in (own_names, names_to_try[len(own_names):]):
for try_name in tier:
for match_sha1 in by_name.get(try_name, []):
for match_sha1 in (
by_proven_name.get(try_name) or by_name.get(try_name, [])
):
if match_sha1 in files_db and _size_ok(match_sha1):
path = files_db[match_sha1]["path"]
if os.path.exists(path) and path not in candidates: