Skip to content

Offer compatible ROMs when the table's ROM is missing - #55

Merged
freezy merged 2 commits into
masterfrom
feat/compatible-roms
Nov 17, 2026
Merged

freezy merged 2 commits into
masterfrom
feat/compatible-roms

Conversation

@freezy

@freezy freezy commented Nov 17, 2026

Copy link
Copy Markdown
Member

When a table's PinMAME ROM isn't in the user's ROM folder but other ROMs of the same machine are, the player now offers to play the table with one of those.

Editor and package

  • The component keeps the machine's other ROMs that can run the table, taken from the games catalog (drivers[].physical_compatibility): identical, compatible, or unverified when the catalog doesn't know. ROMs marked different are never offered, and a table made for one gets no alternatives.
  • The list is set when a machine or ROM is selected, filled in when the inspector loads the definition of an older table, and refreshed from the catalog at export. It's written to the package as PinMameGamelogicEnginePackable.CompatibleRoms.
  • Package format: case 1 of "Versioning the items schema" in Packaging/FORMAT.md, an optional field older readers ignore, so no schema bump.

Player

  • The PinMAME plugin is now an IPluginLaunchCheck. Before a table loads, it reads the package's ROM list and blocks the launch only when the table's ROM zip is missing, at least one listed ROM zip is present, and no present choice is saved. The existing launch setup dialog then shows a "Compatible ROM" choice (the present ROMs, identical ones first) and saves it for the table.
  • In PrepareGameAsync the plugin hands the choice to the engine, which then starts that ROM. NVRAM, AltSound, diagnostics and IRomNameProvider.RomName follow the running ROM; the game identity, and so the table's saved settings, stay with the table's own ROM.
  • "Reset ROM memory" resets the ROM the table plays.
  • Without any compatible ROM present, the existing missing-ROM flow applies unchanged.

Related: the DMD plugin takes the colorization of the running ROM (VisualPinball/VisualPinball.Engine.DMD, branch feat/compatible-roms), and the player applies the ROM folder before plugin launch checks.

Testing

  • Compatibility rules checked on live catalog data, including a machine with a ROM marked different; packable round trip, and older payloads without the list.
  • In the player: a package whose ROM was missing, with three compatible ROMs present, showed the dialog with those three; the chosen ROM started and was saved per table. A second launch used the saved choice without asking.

The component now keeps the other ROMs of its machine that can run the table, taken from the games catalog (identical, compatible or unverified; ROMs marked "different" are left out both ways), and writes them into the .vpe package. Export refreshes the list from the catalog.

In the player, the PinMAME plugin checks before a launch whether the table's ROM is in the ROM folder. When it's missing and at least one compatible ROM is there, the launch asks which one to play with and saves the choice for the table. The engine then starts that ROM, and its NVRAM, AltSound, diagnostics and ROM name follow it, while the table's settings stay with its own ROM. Resetting ROM memory resets the ROM that plays.

Package format: case 1 of "Versioning the items schema" in Packaging/FORMAT.md, an optional field older readers ignore, so no schema bump.
@greptile-apps

greptile-apps Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; the previous compile issue is fixed and no new actionable issues remain.

Summary

The PR lets players choose an available compatible ROM when a table’s own ROM is missing.

  • Tables carry an ordered list of ROMs that can run on the same machine.
  • The player can start a table with an installed compatible ROM.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Read packaged ROM choices] --> B{Table ROM present?}
  B -->|Yes| C[Run table ROM]
  B -->|No| D{Saved choice present?}
  D -->|Yes| E[Run chosen ROM]
  D -->|No| F{Compatible ROM present?}
  F -->|Yes| G[Ask player and save choice]
  G --> E
  F -->|No| H[Keep existing missing-ROM flow]
Loading

Reviews (2) · Last reviewed commit: "pinmame: let the definition tests build ..." · Reviewed by Greptile

The test project links the definition and its converter, which now use the compatible ROM types, so these move to a file without Unity dependencies that the project links too. Adds tests for the compatibility rules.
@freezy
freezy merged commit 71693d8 into master Nov 17, 2026
17 checks passed
@freezy
freezy deleted the feat/compatible-roms branch November 17, 2026 14:48
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.

1 participant