fix: swanstation ps1_rom.bin accepts multiple sizes

SwanStation accepts PS1 (512KB), PS2 (4MB), and PS3 (0x3E66F0)
BIOS sizes but only uses the first 512KB. MD5 validates the
extracted content, not the full file. List all accepted sizes
to eliminate the false size mismatch discrepancy.

validation.py: support size as list in emulator profiles.
generate_site.py: handle list sizes in emulator page display.

All 18 original hash mismatches are now resolved: 0 discrepancies.
This commit is contained in:
Abdessamad Derraz
2026-04-02 07:39:30 +02:00
parent fa0ed63718
commit 9e184f76fc
3 changed files with 14 additions and 6 deletions

View File

@@ -1176,7 +1176,10 @@ def generate_emulator_page(
if fsystem:
details.append(f"System: {_system_link(fsystem, '../')}")
if size:
size_str = _fmt_size(size)
if isinstance(size, list):
size_str = " / ".join(_fmt_size(s) for s in size)
else:
size_str = _fmt_size(size)
if fmin or fmax:
bounds = []
if fmin:

View File

@@ -102,8 +102,12 @@ def _build_validation_index(profiles: dict) -> dict[str, dict]:
index[fname]["crypto_only"].update(c for c in checks if c in _CRYPTO_CHECKS)
# Size checks
if "size" in checks:
if f.get("size") is not None:
index[fname]["sizes"].add(f["size"])
raw_size = f.get("size")
if raw_size is not None:
if isinstance(raw_size, list):
index[fname]["sizes"].update(raw_size)
else:
index[fname]["sizes"].add(raw_size)
if f.get("min_size") is not None:
cur = index[fname]["min_size"]
index[fname]["min_size"] = (