fix: cross-reference checks inside ZIP archives

_build_supplemental_index scans both data/ directories and
contents of bios/ ZIP files. Eliminates 197 false positives
where files existed inside archive ZIPs (neogeo.zip, pgm.zip,
stvbios.zip, etc.) but were counted as missing. True missing
drops from 645 to 448.
This commit is contained in:
Abdessamad Derraz
2026-03-28 18:00:11 +01:00
parent c6a24446ba
commit 76fe7dd76f
4 changed files with 29 additions and 16 deletions

View File

@@ -2,7 +2,7 @@
Complete BIOS and firmware packs for Batocera, BizHawk, EmuDeck, Lakka, Recalbox, RetroArch, RetroBat, RetroDECK, RetroPie, and RomM.
**7,532** verified files across **352** systems, ready to extract into your emulator's BIOS directory.
**7,545** verified files across **352** systems, ready to extract into your emulator's BIOS directory.
## Download BIOS packs
@@ -29,8 +29,8 @@ Each file is checked against the emulator's source code to match what the code a
- **10 platforms** supported with platform-specific verification
- **328 emulators** profiled from source (RetroArch cores + standalone)
- **352 systems** covered (NES, SNES, PlayStation, Saturn, Dreamcast, ...)
- **7,532 files** verified with MD5, SHA1, CRC32 checksums
- **8112 MB** total collection size
- **7,545 files** verified with MD5, SHA1, CRC32 checksums
- **8115 MB** total collection size
## Supported systems
@@ -113,4 +113,4 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
This repository provides BIOS files for personal backup and archival purposes.
*Auto-generated on 2026-03-28T16:30:00Z*
*Auto-generated on 2026-03-28T16:59:13Z*

View File

@@ -1,5 +1,5 @@
{
"generated_at": "2026-03-28T16:53:02Z",
"generated_at": "2026-03-28T16:58:50Z",
"total_files": 7545,
"total_size": 8508938896,
"files": {

View File

@@ -50,16 +50,29 @@ def load_platform_files(platforms_dir: str) -> tuple[dict[str, set[str]], dict[s
return declared, platform_data_dirs
def _build_data_dir_index(data_root: str = "data") -> set[str]:
"""Build a set of filenames available in data/ directories."""
def _build_supplemental_index(data_root: str = "data",
bios_root: str = "bios") -> set[str]:
"""Build a set of filenames in data/ directories and inside bios/ ZIPs."""
names: set[str] = set()
root_path = Path(data_root)
if not root_path.is_dir():
return names
for fpath in root_path.rglob("*"):
if fpath.is_file() and not fpath.name.startswith("."):
names.add(fpath.name)
names.add(fpath.name.lower())
if root_path.is_dir():
for fpath in root_path.rglob("*"):
if fpath.is_file() and not fpath.name.startswith("."):
names.add(fpath.name)
names.add(fpath.name.lower())
bios_path = Path(bios_root)
if bios_path.is_dir():
import zipfile
for zpath in bios_path.rglob("*.zip"):
try:
with zipfile.ZipFile(zpath) as zf:
for member in zf.namelist():
if not member.endswith("/"):
basename = member.rsplit("/", 1)[-1] if "/" in member else member
names.add(basename)
names.add(basename.lower())
except (zipfile.BadZipFile, OSError):
pass
return names
@@ -226,7 +239,7 @@ def main():
declared, plat_data_dirs = load_platform_files(args.platforms_dir)
db = load_database(args.db)
data_names = _build_data_dir_index()
data_names = _build_supplemental_index()
report = cross_reference(profiles, declared, db, plat_data_dirs, data_names)
if args.json:

View File

@@ -594,8 +594,8 @@ def verify_platform(
status_counts[s] = status_counts.get(s, 0) + 1
# Cross-reference undeclared files
from cross_reference import _build_data_dir_index
data_names = _build_data_dir_index()
from cross_reference import _build_supplemental_index
data_names = _build_supplemental_index()
undeclared = find_undeclared_files(config, emulators_dir, db, emu_profiles,
target_cores=target_cores, data_names=data_names)
exclusions = find_exclusion_notes(config, emulators_dir, emu_profiles, target_cores=target_cores)