fix: one id per machine for the games fallback

muOS names its GBA folder gameboyadvance first, which resolved to ares's
game-boy-advance. mgba lists nintendo-gba, so the fallback set was empty
and an unrecognised GBA game got no file. ares, dgen, picodrive, fbneo,
fbalpha2019 and emux_sms now use the ids the other profiles use, with
their old spellings kept as SYSTEM_ALIASES (bios.sms and fbneo's
Spectrum sets had fallen to the other bucket of the RetroArch list).

A folder whose name spells a machine its core does not run now also
holds the core's machines: a PC Engine CD folder run by mednafen_pce_fast
got no System Card. Install lists and install/games regenerated.
This commit is contained in:
Abdessamad Derraz committed 2026-11-09 06:13:24 +01:00
1 parent 6692cf908c
commit fcd6753b9e
77 files changed
+493 -198

No files matched your search

+21
View File
@@ -3144,6 +3144,27 @@ SYSTEM_ALIASES: dict[str, str] = {
"snesmsu": "nintendo-snes",
"megadrivemsu": "sega-megadrive",
"sgb-msu1": "nintendo-sgb",
# Spellings profiles gave a machine the others call by another id:
# ares's own system names, dgen and picodrive's sega-genesis beside
# sega-megadrive, fbneo's sinclair-spectrum and snk-neogeo-pocket,
# emux_sms's sms. muOS names its GBA folder gameboyadvance first, the
# folder resolved to ares's game-boy-advance, and an unrecognised GBA
# game got no file of the nintendo-gba list.
"famicom": "nintendo-nes",
"famicom-disk-system": "nintendo-fds",
"super-famicom": "nintendo-snes",
"game-boy": "nintendo-gb",
"game-boy-color": "nintendo-gbc",
"game-boy-advance": "nintendo-gba",
"neo-geo-pocket": "snk-ngp",
"snk-neogeo-pocket": "snk-ngp",
"neo-geo-pocket-color": "snk-ngpc",
"wonderswan": "bandai-wswan",
"wonderswan-color": "bandai-wswanc",
"sega-genesis": "sega-megadrive",
"genesis": "sega-megadrive",
"sinclair-spectrum": "sinclair-zx-spectrum",
"sms": "sega-mastersystem",
}
+10
View File
@@ -282,9 +282,19 @@ def resolve_folder(
An arcade core is the exception: the arcade index names each set's
files, and its hundred machines would make any unknown file a fallback
for all of them.
A name that spells a machine its core does not run adds the core's
machines to it: the games run on that core. Mednafen's PC Engine core
lists nec-pc-engine, the CD folder resolved to nec-pc-engine-cd alone,
and an unrecognised CD game got no System Card.
"""
resolution = resolver.resolve(folder_names(row), platform)
own = [str(s) for s in profiles.profiles.get(profile or "", {}).get("systems") or []]
if resolution.systems and own and profile not in arcade:
runs = {sid for s in own for sid in resolver.equivalents(s)}
if not runs & set(resolution.systems):
systems = set(resolution.systems) | {resolver.canonical(s) for s in own}
return Resolution(sorted(systems), f"{resolution.basis}, and systems of {profile}")
if resolution.systems or not own:
return resolution
if len(own) == 1: