mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-04-13 12:22:33 -05:00
feat: recalbox 346/346 via md5_composite, add mame variants
Add md5_composite() to verify.py replicating Recalbox Zip::Md5Composite (sorted filenames, sequential content hash). Independent of ZIP compression level, resolves all 9 MAME arcade untested entries. Add Recalbox-specific MAME ZIP variants from Recalbox 10 pack. Batocera 671/680 (9 untested MAME-specific), all others 100%.
This commit is contained in:
@@ -54,6 +54,21 @@ def md5sum(filepath: str | Path) -> str:
|
||||
return h.hexdigest()
|
||||
|
||||
|
||||
def md5_composite(filepath: str | Path) -> str:
|
||||
"""Compute composite MD5 of a ZIP - matches Recalbox's Zip::Md5Composite().
|
||||
|
||||
Sorts filenames alphabetically, reads each file's contents in order,
|
||||
feeds everything into a single MD5 hasher. The result is independent
|
||||
of ZIP compression level or metadata.
|
||||
"""
|
||||
with zipfile.ZipFile(filepath) as zf:
|
||||
names = sorted(n for n in zf.namelist() if not n.endswith("/"))
|
||||
h = hashlib.md5()
|
||||
for name in names:
|
||||
h.update(zf.read(name))
|
||||
return h.hexdigest()
|
||||
|
||||
|
||||
def load_platform_config(platform_name: str, platforms_dir: str = "platforms") -> dict:
|
||||
"""Load a platform config with inheritance and shared group resolution.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user