Skip to content

naomi: detect Naomi 2 for decrypted .bin/.dat roms - #2551

Open
JoeMatt wants to merge 1 commit into
flyinghead:devfrom
Provenance-Emu:naomi/bin-naomi2-platform
Open

JoeMatt wants to merge 1 commit into
flyinghead:devfrom
Provenance-Emu:naomi/bin-naomi2-platform

Conversation

@JoeMatt

@JoeMatt JoeMatt commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

A decrypted single-file rom isn't in the romset table, so it was always
loaded as Naomi with the Naomi BIOS. A Naomi 2 game then ran without
the Elan and with the wrong BIOS.

The cartridge header starts with the board name ("NAOMI" or
"Naomi2"), the same field the loader already checks with GetBootId().
Read it before setPlatform() so a Naomi 2 rom gets the Naomi 2 platform,
and load naomi2.zip for it.

Only the game load path reads the header. getGamePlatform() is also
called by the boxart scrapers with just a file name, so it is unchanged.

Testing, libretro core on macOS (Vulkan/MoltenVK) with naomi2.zip:

  • All 19 Naomi 2 dumps I have (Beach Spikers, Club Kart, Initial D 1-3, King of Route 66, VF4 / Evolution / Final Tuned, Virtua Striker 3, Wild Riders) have "Naomi2" at offset 0. Virtual-On, a Naomi 1 game, has "NAOMI" and still loads as Naomi.
  • Beach Spikers and Initial D now load as Naomi 2 with naomi2.zip and run 1800 frames without errors in most runs (I did not check the picture).
  • Beach Spikers intermittently loses the Vulkan device on MoltenVK (GPU page fault). That isn't from this change: unmodified dev does the same with the MAME romset (beachspi.zip + gds-0014.chd), 1 run in 5. Initial D didn't hit it in 3 runs.

🤖 Generated with Claude Code

A decrypted single-file rom isn't in the romset table, so it was always
loaded as Naomi with the Naomi BIOS. A Naomi 2 game then ran without
the Elan and with the wrong BIOS.

The cartridge header starts with the board name ("NAOMI" or
"Naomi2"), the same field the loader already checks with GetBootId().
Read it before setPlatform() so a Naomi 2 rom gets the Naomi 2 platform,
and load naomi2.zip for it.

Only the game load path reads the header. getGamePlatform() is also
called by the boxart scrapers with just a file name, so it is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 13, 2026 22:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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