Skip to content

Fix two BIOS hashes that no file can match - #88

Merged
Lazorne merged 1 commit into
RetroDECK:0.11.0from
Abdess:fix-unmatchable-bios-hashes
Aug 12, 2026
Merged

Fix two BIOS hashes that no file can match#88
Lazorne merged 1 commit into
RetroDECK:0.11.0from
Abdess:fix-unmatchable-bios-hashes

Conversation

@Abdess

Copy link
Copy Markdown
Contributor

Two entries in the manifests ask for a hash that no file can have, so the BIOS checker reports them as missing even when the user has the correct file.

1. yrw801.rom (retroarch/component_manifest.json)

The manifest expects MD5 32760893ce06db3e3930627755ba065c. MAME lists this ROM in src/devices/bus/msx/cart/moonsound.cpp:75:

ROM_LOAD("yrw801.rom", 0x0, 0x200000, CRC(2a9d8d43) SHA1(32760893ce06dbe3930627755ba065cc3d8ec6ca))

Line the two values up:

MAME SHA1 32760893ce06db e3930627755ba065cc3d8ec6ca
manifest 32760893ce06db 3e3930627755ba065c

The manifest value is that SHA1 with an extra 3 after the 14th character, cut to 32 characters so it has the shape of an MD5. This PR sets the real MD5 of the dump MAME declares: 42af93619160ef2116416f74a6cb12f2 (2097152 bytes, CRC32 2a9d8d43).

2. naomi2.zip (retroarch/ and archive_later/flycast/)

The manifest expects MD5 9b85e0de6ef359e5006c9b79a5a266b0 for the whole archive. Flycast does not read the archive that way.

core/hw/naomi/naomi_roms.cpp:182-201 defines the naomi2 BIOS as a list of ROMs, each with its own CRC32:

{
"naomi2",
{
// epr-23605c (Japan)
{ 0, "epr-23605c.ic27", 0x000000, 0x200000, 0x297ea6ed },
// epr-23605b (Japan)
{ 0, "epr-23605b.ic27", 0x000000, 0x200000, 0x3a3242d4 },
...

The struct in naomi_roms.h:53-64 gives the fields: region, filename, offset, length, crc. Flycast opens the ZIP, picks the ROM matching the region and checks that ROM's CRC32. MAME does the same, per ROM, in src/mame/sega/naomi.cpp (NAOMI2_BIOS). Neither defines an MD5 for the archive itself, and that value depends on how the ZIP was packed rather than on what is inside it, so the same correct ROMs re-zipped differently give a different archive MD5.

This PR replaces the single value with the standard MAME sets that contain all 8 ROMs Flycast can request, each verified CRC32 by CRC32 against the table above:

Archive MD5ROMsNotes
c50072cbab75673e1b1a6b94355e6fa815MAME 0.222 to 0.259
843c0d51237dc945f57237c4b9872b1d21MAME 0.260 to 0.282
339c59ece7d4d6803880c91bbb44ac9322includes epr-23610b
dfaae8d206ffb390ed1cf9529ccc123d21

A list is what the neighbouring naomi.zip entry already uses. Longer term, checking the ROMs inside the archive by CRC32 the way Flycast does would remove the packaging sensitivity entirely.

@Lazorne

Copy link
Copy Markdown
Contributor

Please rebase to 0.11.0 and update there

@XargonWan
XargonWan changed the base branch from main to 0.11.0August 10, 2026 11:59
@Abdess
Abdessforce-pushed the fix-unmatchable-bios-hashes branch from 9d4b1de to f4c03d1CompareAugust 11, 2026 23:24
@Abdess

Copy link
Copy Markdown
ContributorAuthor

Rebased onto 0.11.0. The flycast manifest moved out of archive_later so the fix now targets flycast/component_manifest.json.

@Lazorne
Lazorne merged commit 37dd832 into RetroDECK:0.11.0Aug 12, 2026
@Lazorne

Copy link
Copy Markdown
Contributor

Thank you!

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@Abdess@Lazorne