Skip to content

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

Open
Abdess wants to merge 1 commit into
RetroDECK:mainfrom
Abdess:fix-unmatchable-bios-hashes
Open

Fix two BIOS hashes that no file can match#88
Abdess wants to merge 1 commit into
RetroDECK:mainfrom
Abdess:fix-unmatchable-bios-hashes

Conversation

@Abdess

@Abdess Abdess commented Aug 6, 2026

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 MD5 ROMs Notes
c50072cbab75673e1b1a6b94355e6fa8 15 MAME 0.222 to 0.259
843c0d51237dc945f57237c4b9872b1d 21 MAME 0.260 to 0.282
339c59ece7d4d6803880c91bbb44ac93 22 includes epr-23610b
dfaae8d206ffb390ed1cf9529ccc123d 21

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

Lazorne commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Please rebase to 0.11.0 and update there

Sign up for free to 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