mirror of
https://github.com/rommapp/romm.git
synced 2026-06-27 22:35:57 +00:00
PSP games stored as .cso (and .ciso/.zso/.dax) never matched on RetroAchievements because RomM hands these files to the external RAHasher binary, which can't read CSO/ZISO/DAX compressed-ISO containers and fails with "Could not open track". The game was then left without an RA link. The PSP RA hash does not depend on the whole disc: rcheevos computes it as MD5(PSP_GAME/PARAM.SFO + PSP_GAME/SYSDIR/EBOOT.BIN), each file capped at 64 MiB. Those containers are block-indexed, so we can decompress just the blocks those two files occupy and hash them in-process, producing the identical hash RA stores (and PPSSPP computes). Add utils/psp_hasher.py: a seekable block-decoder for CISO/ZISO (deflate and LZ4) and DAX containers, a minimal ISO9660 reader to locate the two files, and calculate_psp_ra_hash(). RAHasherService now computes the hash natively for PSP .cso/.ciso/.zso/.dax files, falling back to RAHasher on any failure. Raw .iso PSP discs still go to RAHasher, which reads them fine. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KsyrT6n8WYWWxR2XGoEASs