feat: follow a clone to its parent set

MAME's search path for a set is the set and every ancestor
(src/emu/driver.cpp:31-38, src/emu/romload.cpp:67-84 at mame0289), so
a clone reads the ROMs it shares with its parent from the parent's
archive. games/arcade/<profile>.json now records, under parents, each
parent game set with ROMs and the clones whose romof chain reaches it
before any BIOS set, and rom_search_sets adds them to what a command
reads. The installer's index leaves them out, as it does the sources.

arcade_parent_importer --all is re-run: every profile gains parents,
and mame0258, mame0278, mame2010, mame2015, mame2016 and fbneo also
gain the sources their committed files lacked.

Manifests, EmuDeck and RetroDECK only: videopac.zip reaches
roms/odyssey2 beside i8244.zip, electron.zip roms/electron, and the 35 parent
sets the profile holds (a7800, apple2e, intv, videopac and others)
reach arcade, consolearcade and mame, the folders whose command starts
any machine. verify --all keeps its severity and status counts.
This commit is contained in:
Abdessamad Derraz committed 2026-11-11 15:21:10 +01:00
1 parent 114afee41b
commit bad9a7f601
16 files changed
+50 -13

No files matched your search

+5
View File
@@ -3618,6 +3618,10 @@ def _rom_search_sets(
if relation is None:
return frozenset()
bios, devices = relation.get("bios") or {}, relation.get("devices") or {}
# A clone reads the ROMs it shares with its parent from the parent's
# archive: the search path is the set and every ancestor
# (src/emu/driver.cpp:31-38, src/emu/romload.cpp:67-84 at mame0289).
parents = relation.get("parents") or {}
sources = relation.get("sources") or {}
members: set[str] = set(machines)
kind, keys = ANY_MACHINE_POPULATIONS.get(system, ("all", ())) if any_machine else ("", ())
@@ -3633,6 +3637,7 @@ def _rom_search_sets(
return kind == "all" or not members.isdisjoint(users)
found = {b for b, users in bios.items() if used(users)}
found |= {p for p, users in parents.items() if used(users)}
found |= {d for d, users in devices.items() if used(users)}
return frozenset(found | members)