fix: place amiberry ROMs in rom_path

The standalone Amiberry scans rom_path, ROMs below its content root by
default, for the ROMs of its database, without descending into
folders, and reads rom.key beside the Kickstart and the MT-32 ROMs
from mt32-roms. Those entries now carry standalone_path relative to
it, the four Kickstart labels holding slashes flattened. The kick*.rom
names stay the libretro build's.

Batocera's config_directories reads its rom_path save, KNULLI reuses
it. On Batocera, KNULLI and RetroPie the ROMs move from the BIOS root
to bios/amiga.
This commit is contained in:
Abdessamad Derraz committed 2026-11-09 19:48:22 +01:00
1 parent 8ec0c5482c
commit 5bf8aa8a3e
6 files changed
+168 -14

No files matched your search

+34
View File
@@ -594,3 +594,37 @@ class XroarOnEachPlatform(unittest.TestCase):
folder = folders[entry["system"]]
expected = f"{folder}/{entry['name']}" if folder else entry["name"]
self.assertEqual(entry["standalone_path"], expected)
class AmiberryOnEachPlatform(unittest.TestCase):
"""The standalone Amiberry scans rom_path for its ROMs. Batocera, KNULLI
and RetroPie set rom_path to bios/amiga."""
BOUND = ("batocera", "knulli", "retropie")
@classmethod
def setUpClass(cls) -> None:
cls.profile = load_emulator_profiles(str(REPO_ROOT / "emulators"))["amiberry"]
def test_rom_path_is_bios_amiga(self) -> None:
for platform in self.BOUND:
with self.subTest(platform=platform):
cfg = load_platform_config(platform, str(REPO_ROOT / "platforms"))
self.assertEqual(
standalone_bindings_for("amiberry", self.profile, standalone_set(cfg)),
{"": ("", "amiga")},
)
def test_every_rom_path_entry_lands_in_bios_amiga(self) -> None:
for platform in self.BOUND:
cfg = load_platform_config(platform, str(REPO_ROOT / "platforms"))
(view, _standalone), = platform_layouts(
"amiberry", self.profile, standalone_set(cfg)
)
for own, entry in zip(self.profile["files"], view["files"]):
layout = own.get("standalone_path")
if not layout:
continue
with self.subTest(platform=platform, name=entry["name"]):
self.assertEqual(entry["standalone_path"], f"amiga/{layout}")
self.assertNotIn("/", layout.removeprefix("mt32-roms/"))