Skip to content

feat(platforms): split arcade aliases into per-emulator-family slugs - #5273

Open
Spinnich wants to merge 8 commits into
rommapp:masterfrom
Spinnich:feat/arcade-platform-slugs
Open

Spinnich wants to merge 8 commits into
rommapp:masterfrom
Spinnich:feat/arcade-platform-slugs

Conversation

@Spinnich

@Spinnich Spinnich commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Description

Closes #5272

Arcade folders no longer all collapse into one arcade platform. A system gets its own slug when its games need an emulator outside the MAME/FinalBurn family, or when it is one of those families. Boards that only MAME runs stay aliases of arcade.

New slugs:

  • Emulator families: mame, mame-advmame, fbneo, fba. Their romsets differ, so none aliases another.
  • Boards with their own emulator: atomiswave, chihiro, daphne (with laserdisc as an alias), dice, gaelco, lindbergh, namco2x6, namco3xx, naomi, naomi2, naomigd, singe, triforce. The existing hikaru, model2, model3, stv and type-x keep their slugs.
  • Retired slugs: cps1, cps2, cps3, model1, system16, system32 and system-32 become folder aliases of arcade. system-32 was actually Namco System 22. Migration 0154 moves existing rows onto arcade, and its downgrade restores a row's slug from fs_slug.

How providers handle the new slugs:

  • backend/utils/arcade_platforms.py holds the groupings. A provider with no entry of its own for a board uses its Arcade entry (Moby, TGDB, HLTB, LaunchBox, Hasheous). RetroAchievements only gets that fallback for the MAME/FinalBurn set platforms, since it hashes nothing else. Hasheous drops ra_id for boards for the same reason.
  • ScreenScraper has explicit entries with verified system ids (Atomiswave 53, Daphne 49, Gaelco 194, NAOMI 56, NAOMI 2 230, NAOMI GD-ROM 227, Singe 170), and the rest use Arcade 75. ScreenScraper supplies the display names. IGDB's arcade path deliberately returns no name.
  • IGDB maps hikaru, naomi2 and stv to their IGDB platform versions.
  • LaunchBox gains Atomiswave 98, NAOMI 99, NAOMI 2 100 and Triforce 207. libretro thumbnails gain Atomiswave, FBNeo, MAME and the two NAOMI repos. For MAME-shortname platforms, art is looked up by MAME's full title.
  • MAME shortname expansion now keys on the ROM's platform slug, covering the set platforms, the boards MAME runs, and Neo Geo. Daphne, Singe, Type X, Lindbergh, Chihiro, Triforce, Namco 3xx and DICE are excluded. The per-provider arcade id lists are gone.
  • Player and feeds: EmulatorJS and WebRcade offer arcade, mame, fbneo and fba. mame-advmame is excluded because no browser core runs AdvanceMAME sets. The fba core list starts with fbneo.
  • Firmware: the known BIOS list files every arcade BIOS under arcade:, so verification on any arcade platform checks those entries.
  • Each new slug gets a placeholder icon copied from arcade (fba copies fba2012).

Side effects worth a look:

  • The stv display name becomes "Sega Titan Video" (IGDB's platform version name).
  • A cps2 (or other retired-board) folder appears as a second "Arcade" tile next to arcade/, as in the screenshot below.
  • generate_supported_platforms.py now uses resolve_platform_name, so 15 non-arcade names in the generated docs table change to the names the app actually shows.
  • ScreenScraper's Arcade alternative names (Mame, FBA, AdvMAME, ...) are dropped, because those are now real slugs.
  • Existing mame, fbneo and naomi platform rows stored as arcade are not migrated. Their folder name alone can't distinguish them from a real arcade/ folder. They move to the new slug on the next scan that isn't a new-platforms-only scan, since that rewrites the platform row.
  • Until that next scan, platforms migrated off a retired slug keep their old name and provider ids.

Follow-ups, not in this PR:

  • Frontend ARCADE_SYSTEMS duplicates the backend set. It should come from the API (an is_arcade field).
  • The streaming core labels have no entries for mame, fbneo and fba, so they show "RA FBNEO" and similar. They have to match the broker's retroarch_platforms.json.
  • Per-ROM romset version matching (mame2003 vs current) is a separate issue.
  • Docs: rommapp/docs needs updates to the EmulatorJS cores table, the supported-platforms alias note, the configuration-file.md examples and the "Arcade games playable in browser" smart collection.

AI assistance: Claude Code (Claude Opus 5.5) did the provider id research and wrote most of the implementation, tests and this description. I made the design decisions, reviewed the diff and checked the results.

Checklist

  • I've tested the changes locally
  • I've updated relevant comments
  • I've assigned reviewers for this PR
  • I've added unit tests that cover the changes

Screenshots (if applicable)

The same 12-folder library (arcade, atomiswave, cps2, daphne, fba, fbneo, mame, model2, model3, naomi, naomi2, snes) scanned on master and on this branch.

Before: seven folders read as "Arcade", and the NAOMI and Atomiswave ones show a Play badge that EmulatorJS can't honor.

[
arcade-platforms-before
]

After: each family and board has its own tile, and Play shows only where a browser core runs the sets.

[arcade-platforms-after]

🤖 Generated with Claude Code

Spinnich and others added 7 commits October 19, 2026 17:48
Give MAME, AdvanceMAME, FBNeo, FBA, Daphne, Singe and the arcade boards
that need their own emulator (NAOMI/NAOMI 2/NAOMI GD-ROM, Model 2/3,
Hikaru, Triforce, Lindbergh, Namco System 246/3xx, Gaelco, ...) their own
slugs with verified provider IDs. Providers without a dedicated entry fall
back to their Arcade platform via arcade_fallbacks(). MAME-only boards
(CPS1-3, System 16/32, Model 1, Namco 22) stay aliases of arcade.

Refs rommapp#5272

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Retry IGDB on unmatched scans for every platform IGDB resolves, not
  just slugs in IGDB_PLATFORM_LIST.
- Resolve config binding/version values through the alias table, so a
  binding to a retired slug (cps2, model1, ...) still lands on a platform.
- Alias the Batocera `typex` folder to type-x.
- Build provider id->slug reverse maps before merging Arcade fallbacks.
- Share one MAME title lookup between base_handler and libretro.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Alias the three RomM-keyed IGDB versions inside IGDB_PLATFORM_VERSIONS,
  dropping IGDB_VERSION_SLUGS and _version_slug.
- Derive EmulatorJS arcade entries from ARCADE_SET_PLATFORMS.
- Remove the unused provider id->slug reverse maps, so the Arcade
  fallback merge no longer has an ordering constraint.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Migration 0154 moves platforms still on a retired MAME-only board slug
  (cps1-3, model1, system16, system32, system-32) to arcade, so no row
  carries a slug the enum no longer has.
- MAME shortname expansion keys off the RomM slug via
  MAME_SHORTNAME_PLATFORMS instead of per-provider arcade ids, so Daphne,
  Singe, Type X and Lindbergh sets are no longer read as MAME sets. Neo Geo
  now expands at ScreenScraper too, as it already did at IGDB and Moby.
- fba offers fbneo before the FinalBurn Alpha CPS cores.
- AdvanceMAME leaves the WebRcade feed; EmulatorJS and WebRcade share
  PLAYABLE_ARCADE_SET_PLATFORMS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Verify arcade-board BIOS files against the known list's arcade entries,
and make migration 0154 match retired slugs case-insensitively.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Apply IGDB family overrides once in get_platform instead of on each
return path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

Splits arcade folders into emulator-family and board-specific platforms.

  • Arcade folders keep distinct slugs for emulator families and independently emulated boards.
  • Metadata providers use board-specific arcade entries or fall back to their Arcade entry.
  • Metadata lookups expand MAME short names on arcade platforms that use them.
  • Browser players and feeds offer cores only for arcade sets they can run.

Explicitly acknowledged or deferred by Spinnich:

  • Duplicate “Arcade” tiles and old names/provider IDs until the next scan are intentional.
  • Existing rows stored as arcade move to their new slugs on a scan other than new-platforms-only.
  • Sharing the frontend arcade list through the API, streaming core labels, per-ROM romset matching, and related docs updates are follow-ups.
  • The stv display name and generated non-arcade display-name changes are intentional.

Reviews (1) · Last reviewed commit: "refactor(platforms): simplify pass on ar..." · Reviewed by Greptile

singe now ships an icon, so the no-icon prefetch test needs a slug that never will.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Spinnich
Spinnich requested a review from gantoine October 19, 2026 22:06

This branch has not been deployed

No deployments
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.

[Feature] Give arcade sub-systems (MAME, FBNeo, NAOMI, ...) their own platform slugs and fix their metadata IDs

1 participant