[Feature] Per-ROM default EmulatorJS core, without the per-game choice overwriting the platform fallback
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- javascript, python
Research direction
The issue names resolveRememberedCore, rememberCore, and EmulatorJSPlayer.vue, and points to #4434 and #4452 for the current resolution order. Read those changes and trace how core preferences are resolved and saved for a ROM launch. Done means an admin can set a per-ROM core for all users, and a one-off game choice does not change the platform fallback.
Written by the indexing model from the issue text.
Description
Is your feature request related to a problem? Please describe.
In a mixed arcade folder, the right EmulatorJS core is a property of the individual ROM, not the platform. Most of a MAME 2003-era library runs best on mame2003_plus (which is what emulatorjs.default_cores can set), but a handful of sets only run on fbneo. Today there is no way for the server to say "this one ROM defaults to FBNeo", and choosing FBNeo by hand for that one ROM silently changes the default for every other arcade game in that browser.
Tested on RomM 5.4.1 (Docker image), EmulatorJS 4.2.3, v2 UI. I checked current master (4 commits past 5.4.1) and the resolution code is unchanged.
Concrete examples:
- Hammer Away (
hamaway.zip): crashes onmame2003_plus, plays fine onfbneo. - D.D. Crew (the US 4-player set): FBNeo matches the ROMs inside the zip by CRC, but picks the game by the archive name, so it only boots on
fbneowhen the file is namedddcrewud.zip. That entry should simply default tofbneofor everyone.
Current behaviour (5.4.1)
resolveRememberedCore picks the first valid core from:
player:<romId>:core(this browser + user)player:<platform_slug>:core(this browser + user)emulatorjs.default_cores[<platform_slug>]- the platform's first core
and every launch writes both 1 and 2 (rememberCore / EmulatorJSPlayer.vue).
Steps to reproduce:
- Set
emulatorjs.default_cores: { arcade: mame2003_plus }. Have two or more ROMs inarcade/, e.g.hamaway.zipandcentiped.zip. - In a fresh browser profile, open Hammer Away. The core is preselected as
mame2003_plusand the game crashes. - Pick
fbneoand play. It works. - Open Centipede, which has never been launched in this browser. Expected:
mame2003_plus(the configured platform default). Actual:fbneo, because step 3 wroteplayer:arcade:core = fbneo, which ranks abovedefault_cores. - Restarting the browser or RomM doesn't change this. Another browser or user is unaffected, and still gets
mame2003_plusfor Hammer Away and has to rediscover FBNeo. - Launching any arcade game with
mame2003_plusrestores the platform fallback, but also records a per-game choice for that game.
So for one odd ROM, an admin can't set the right core for everyone, and a user's one-off choice for that ROM changes the platform default.
Workaround tested: system.versions
I tried a separate arcade-fbneo/ folder in an isolated test instance, with system.versions: { arcade-fbneo: arcade } and emulatorjs.default_cores: { arcade-fbneo: fbneo }.
- The folder becomes its own platform row (
fs_slug: arcade-fbneo), butslug/platform_slugis stillarcade, and its name and metadata IDs are the same as Arcade's. default_coresand the browser keys are looked up byplatform_slug, sodefault_cores[arcade-fbneo]is never read. A fresh profile gotmame2003_plusfor every ROM in that folder, for two users and before and after a restart, and Hammer Away crashed again.- The
player:arcade:coreleak above applies across both folders. - Its ROMs are separate entries with identical metadata to the originals, shown under a second platform also called "Arcade".
- Save states were fine: they are stored per core (
.../states/arcade-fbneo/<romId>/fbneo) and the player only offers them under FBNeo.
Why the other workarounds aren't suitable
- Duplicate entries (a second copy of a ROM in a version or extra folder) give two entries with the same metadata in the same "Arcade" platform. That doubles the library and splits play history, favourites and states between them. It still doesn't give the copy a different default core.
- Binding a folder to a platform whose core list is only FBNeo (e.g.
neogeomvs) looks up metadata as the wrong platform. It can also collide with a real Neo Geo platform. - Moving the ROM to an
fbneo/folder (as #5273 would allow) works at folder level, but it means taking a ROM out of a mixed library or keeping two copies. It doesn't cover "this one ROM inarcade/needs a different core".
Describe the solution you'd like
Behaviour, not a specific design. Maintainers know best whether this belongs in config.yml, a per-ROM field or the admin UI.
- An admin can configure a preferred EmulatorJS core for an individual ROM. It applies to every user and browser.
- Resolution order: the user's explicit choice for that game, then the configured per-ROM default, then the platform default (
default_cores), then the platform's first core. - Launching a ROM with a per-ROM core, whether from the configured default or the user's choice for that game, doesn't overwrite the user's platform-wide fallback. Choosing FBNeo for Hammer Away mustn't change what Centipede opens with. (Whether the platform key should be written at all is up to you. The problem is only that a one-off per-game choice gets promoted to the platform default.)
- A fresh browser or another user gets the configured defaults without any manual selection.
- Save/state separation by core stays as it is.
- No duplicate ROM entries or fake platform identities are needed.
Describe alternatives you've considered
The workarounds above. Automatic per-ROM set matching against libretro DATs, as described in the follow-up section of #5272, would be an excellent complement for picking candidates. But an explicit admin override is still needed for cases set matching can't decide, like sets that match more than one core, or renamed archives such as D.D. Crew.
Additional context
Related:
- #4434 / #4452: added the platform-level
default_coresand the current resolution order. - #1029: originally asked for per-game overrides that persist for all users. Only the platform/per-device parts exist today.
- #3560: shared arcade core settings across systems. The maintainer comment there says it isn't possible with the way configuration works.
- #5272 / #5273: per-emulator-family slugs. Complementary. They explicitly leave the per-ROM question to a separate issue.
- Dominant language
- Python
- Stars
- 13.3k
- Forks
- 747
- Avg merge
- 20h 58m
- Merged PRs (30d)
- 207
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rommapp/romm
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
rommapp/romm#5857 · 3 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
rommapp/romm#4178 · 1 reaction ·
Maintainers usually reply within 1 day
-
[UI/UX] Misaligned number in searchPossibly taken @NevesHenry claimed this today. Openui/ux
Difficulty 2/5 1-3 hours Newbie friendliness 30/100
Maintainers usually reply within 1 day
-
[Bug] Games do not show up in search if more than 2 letters are used.Possibly taken @andest01 claimed this today. Open
Difficulty 3/5 1-2 days Newbie friendliness 58/100
rommapp/romm#5853 · 7 comments ·
Maintainers usually reply within 1 day
Similar issues
-
area:print-dispatch
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
area/geometry good first issue help wanted kind/doc-mismatch severity/4-minor
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Apich-Organization/rssn#295 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
chore claimed
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
schuyler/corvidae#1424 · 2 comments ·
Maintainers usually reply within 1 day