fix: drop the atari800 config key aliases

ROM_5200_A, ROM_BASIC_A and six more are atari800.cfg keys, not names
atari800 opens: MatchByName knows only atariosa.rom and its kin
(sysrom.c:278-294), and the keys are config_key since 969907e29. The
twelve labels the scan identifies by CRC32 are found_by: content, and a
platform declaration of a file such an entry accepts by hash, in the
folder the core scans, now meets it: RetroDECK's ROM_BASIC_A answers
atari-basic-rev-a.rom without the alias.
This commit is contained in:
Abdessamad Derraz committed 2026-11-09 18:22:55 +01:00
1 parent a9fdf6eefc
commit 5794ed4178
6 files changed
+152 -10

No files matched your search

+13
View File
@@ -606,9 +606,15 @@ def declaration_settles(
declared_names: Mapping[str, list[tuple[int | None, str]]] | set[str],
dest: str = "",
folded_slots: frozenset[str] = frozenset(),
declared_contents: Mapping[str, set[str]] | None = None,
) -> bool:
"""Whether a platform declaration meets a core's requirement.
An entry the core finds by content (``found_by: content`` on the entry)
is met by any declaration of a file it accepts by hash, in the folder it
scans: atari800 takes RetroDECK's ROM_BASIC_A by its CRC32, so its own
label for that ROM is not one more file to ship.
A platform declaring the name the core reads has met the requirement
where the declaration fills the entry's own slot, whose content the slot
arbitration decides, or elsewhere at a size the core accepts: the builder
@@ -630,6 +636,13 @@ def declaration_settles(
return True
slot = sanitize_pack_path(dest or fname).lower()
directory = slot if dest.endswith("/") else slot.rpartition("/")[0]
if declared_contents and file_entry.get("found_by") == "content":
for field in ("md5", "sha1", "crc32"):
values = file_entry.get(field) or []
for value in values if isinstance(values, list) else str(values).split(","):
folders = declared_contents.get(f"{field}:{str(value).strip().lower()}")
if folders and directory in folders:
return True
if not dest.endswith("/") and slot in folded_slots:
return True
for name in (fname, *file_entry.get("aliases", [])):