mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-17 07:07:52 -06:00
feat: publish board sets and sets with no bios
The games index now names, per arcade core, the game sets that load no BIOS set and every BIOS set, so a set on a card the DAT does not know is told apart from one that needs nothing. Each board default core of a rom folder gets its own fallback set, and index.json maps every folder name a setup uses to its systems, for a games folder on a computer.
This commit is contained in:
1 parent
d955e86a5b
commit
b69b33178b
41 files changed
+146
-51
No files matched your search
@@ -61,6 +61,14 @@ class ListxmlIndex(unittest.TestCase):
|
||||
self.assertEqual(counts["games_with_bios"], 3)
|
||||
self.assertEqual(counts["bios_sets"], 3)
|
||||
|
||||
def test_games_without_a_bios_and_the_bios_sets_are_named(self) -> None:
|
||||
# A set on a card is then a game that needs nothing, a BIOS set,
|
||||
# or a name the DAT does not hold: only the last falls back.
|
||||
self.assertEqual(self.index["no_bios"], ["pacman"])
|
||||
self.assertEqual(len(self.index["bios_sets"]), self.index["counts"]["bios_sets"])
|
||||
self.assertIn("neogeo", self.index["bios_sets"])
|
||||
self.assertNotIn("orphan", self.index["no_bios"])
|
||||
|
||||
def test_small_window_reads_the_same(self) -> None:
|
||||
small = api.build_index(_sets("listxml.xml", chunk=64), "isbios")
|
||||
self.assertEqual(api.dump(small), api.dump(self.index))
|
||||
|
||||
@@ -34,7 +34,8 @@ case_sensitive: true
|
||||
skip:
|
||||
- {name: bios, source_ref: os main.c:20}
|
||||
folders:
|
||||
- {folder: psx, extensions: [.cue, .chd], core: mednafen_psx_hw, source_ref: os es_systems.cfg:10}
|
||||
- {folder: psx, extensions: [.cue, .chd], core: mednafen_psx_hw, source_ref: os es_systems.cfg:10,
|
||||
board_defaults: {rpi1: {core: pcsx_rearmed}}}
|
||||
- {folder: mame, extensions: [.zip], core: mame, arcade: true, source_ref: os es_systems.cfg:30}
|
||||
- {folder: zzunknownzz, extensions: [.bin], core: nosuchcore, source_ref: os es_systems.cfg:40}
|
||||
"""
|
||||
@@ -125,6 +126,22 @@ class GamesIndexFixture(unittest.TestCase):
|
||||
self.assertEqual(kept, ["psxonpsp660.bin", "scph5501.bin"])
|
||||
self.assertEqual(chosen["bytes"], 2 * 524288)
|
||||
|
||||
def test_a_board_default_core_has_its_own_fallback_set(self) -> None:
|
||||
files, _ = self.render()
|
||||
folders = {f["folder"]: f for f in self.doc(files, "setups/fixture.json")["folders"]}
|
||||
board = folders["psx"]["board_defaults"]["rpi1"]
|
||||
self.assertEqual(board["profile"], "pcsx_rearmed")
|
||||
self.assertEqual(board["fallback"], ["sony-playstation|pcsx_rearmed"])
|
||||
table = self.doc(files, "fallback/fixtureplat.json")
|
||||
self.assertIn("sony-playstation|pcsx_rearmed", table["sets"])
|
||||
|
||||
def test_index_names_the_systems_of_every_folder_name(self) -> None:
|
||||
files, _ = self.render()
|
||||
folders = self.doc(files, "index.json")["folders"]
|
||||
self.assertEqual(folders["psx"], ["sony-playstation"])
|
||||
self.assertEqual(folders["sony-playstation"], ["sony-playstation"])
|
||||
self.assertNotIn("zzunknownzz", folders)
|
||||
|
||||
def test_catalog_rows_are_published_sorted_with_serials(self) -> None:
|
||||
files, _ = self.render()
|
||||
system = self.doc(files, "systems/sony-playstation.json")
|
||||
|
||||
Reference in new issue
Block a user