mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-15 14:33:47 -06:00
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:
1 parent
114afee41b
commit
bad9a7f601
16 files changed
+50
-13
No files matched your search
@@ -205,6 +205,7 @@ def build_index(
|
||||
if n not in bios_names and not e.isdevice and e.runnable and (e.has_roms or e.disks)
|
||||
}
|
||||
bios: dict[str, set[str]] = {}
|
||||
parents: dict[str, set[str]] = {}
|
||||
devices: dict[str, set[str]] = {}
|
||||
missing: dict[str, str] = {}
|
||||
for name, entry in games.items():
|
||||
@@ -218,6 +219,12 @@ def build_index(
|
||||
break
|
||||
if current in bios_names and parent.has_roms:
|
||||
bios.setdefault(archive(current, current), set()).add(name)
|
||||
elif current not in bios_names and parent.has_roms:
|
||||
# A clone's ROM shared with its parent is looked up in the
|
||||
# parent's archive too: MAME's search path is the set and
|
||||
# every ancestor (src/emu/driver.cpp:31-38,
|
||||
# src/emu/romload.cpp:67-84 at mame0289).
|
||||
parents.setdefault(archive(current, current), set()).add(name)
|
||||
current = parent.romof
|
||||
for device in set(entry.devices) & device_roms:
|
||||
devices.setdefault(device, set()).add(name)
|
||||
@@ -231,6 +238,7 @@ def build_index(
|
||||
sources.setdefault(entry.source, set()).add(archive(name, name))
|
||||
return {
|
||||
"bios": {k: sorted(v) for k, v in sorted(bios.items())},
|
||||
"parents": {k: sorted(v) for k, v in sorted(parents.items())},
|
||||
"devices": {k: sorted(v) for k, v in sorted(devices.items())},
|
||||
"chd": sorted(n for n, e in games.items() if e.disks),
|
||||
"missing_parents": dict(sorted(missing.items())),
|
||||
|
||||
Reference in new issue
Block a user