fix: file mame sets under their systems

934 of the 1,563 mame.yml entries named no system and so served every
system of the profile: each MAME-run system's set was the whole profile.

The 65 BIOS root sets written by hand take the system groovymame.yml
gives the same 0.289 archive (sega-systemsp, konami-gx, taito-gnet and
41 more ids, added to systems:). The 19 XaviX sets take tvgames, the
directory MAME keeps xavix.cpp in. They seed the device walk.

mame_hash_scraper --devices files a device set under arcade when a
machine no entry places loads it: MAME starts such a machine from its
set name, as an arcade folder passes it. 1,106 of the 1,254 device sets
now carry arcade, alone or beside the systems of their placed machines.
qsound, ym2413 and ym2608, written by hand, take the same answer.

Left without a system: 41 device sets no machine of the listxml
instantiates (a software list slot selects them), and the hash/,
plugins/ and floppy/ trees every machine reads.
This commit is contained in:
Abdessamad Derraz committed 2026-11-03 15:23:03 +01:00
1 parent 5cb4db61d8
commit ae8aae8469
4 files changed
+2392 -198

No files matched your search

+27
View File
@@ -272,6 +272,33 @@ def attribute_systems(
return {name: sorted(found) for name, found in systems.items()}
def device_systems(
machines: dict[str, MachineLinks],
seeds: dict[str, str],
fallback: str,
) -> dict[str, list[str]]:
"""Systems whose machines can load each set, unplaced machines under *fallback*.
attribute_systems files a set under the systems of the machines a seed
places. A machine no seed places (a computer no platform runs through
this profile, a game outside every BIOS family) still loads its devices,
and MAME starts it from its set name, the way an arcade folder passes a
game: it counts as a machine of *fallback*. A set only such machines
load (an Amiga keyboard, an ISA card) then goes under *fallback* alone,
and a set both kinds load (ym2413, for the CoCo and for arcade games)
under both. A set no runnable machine of the release instantiates keeps
no system: the document never names its machine.
"""
if not fallback:
return attribute_systems(machines, seeds)
unplaced = {
name: fallback
for name, links in machines.items()
if not links.isdevice and not _seed_system(name, machines, seeds)
}
return attribute_systems(machines, {**seeds, **unplaced})
def platform_seeds(
stated: Iterable[tuple[str, str]],
machines: dict[str, MachineLinks],