diff --git a/emulators/fbneo.yml b/emulators/fbneo.yml index f5bbc201c..191fae452 100644 --- a/emulators/fbneo.yml +++ b/emulators/fbneo.yml @@ -52,12 +52,19 @@ data_directories: unread_on: [romm] destination: fbneo/cheats required: false - source_ref: "source src/burner/conc.cpp:167" + # The running driver's .ini and .dat, and cheat.dat, cheatnes.dat + # (NES drivers) or cheatsnes.dat (SNES drivers), which name drivers: + # the tree holds arcade sets and md_, pce_, tg_ and sgx_ drivers. + systems: [arcade, sega-megadrive, nec-pc-engine, nec-supergrafx, nintendo-nes, nintendo-snes] + source_ref: "source src/burner/conc.cpp:167, src/burner/conc.cpp:815-828, src/burner/conc.cpp:1059-1083, src/burn/drv/megadrive/d_megadrive.cpp:495-498, src/burn/drv/pce/d_pce.cpp:204-207, src/burn/drv/pce/d_pce.cpp:280, src/burn/drv/pce/d_pce.cpp:9203" - ref: fbneo-samples unread_on: [romm] destination: fbneo required: false - source_ref: "source src/burn/snd/samples.cpp:21-35" + # A driver's sample names, read when it declares any: the 49 sets are + # arcade boards (tr606drumkit is Irem M62's). + systems: [arcade] + source_ref: "source src/burn/snd/samples.cpp:21-35, src/burn/snd/samples.cpp:886-899" notes: | FinalBurn Neo is a multi-system arcade and console emulator. BIOS files are diff --git a/install.ps1 b/install.ps1 index 345d07c29..2a58488e7 100644 --- a/install.ps1 +++ b/install.ps1 @@ -16,7 +16,7 @@ # and Invoke-WebRequest throws on a cut transfer before the hash is read: # the site's build rewrites this line there (scripts/sitebootstrap.py). $mismatchAdvice = "The download was most likely cut short: try again. Within minutes of an update of this project the two files can come from caches of different ages. Waiting five minutes settles that." - $defaultInstallSha256 = "1d6c36d12d2cb728020e8a4cf0994e7c1779a5f2903163a83ed4caea6c54cc42" + $defaultInstallSha256 = "eb617bc1d0a220cc887e7763611a95cac9d3abd33acc1f115f7c048e51f218c7" $maximumInstallerBytes = 2MB $installerExit = 0 $installer = if ($PSScriptRoot) { Join-Path $PSScriptRoot "install.py" } else { $null } diff --git a/install.py b/install.py index de16057b6..4dd001460 100644 --- a/install.py +++ b/install.py @@ -7556,8 +7556,13 @@ def _install_data_member( def select_data_directories(manifest: dict, files: list[dict], narrowed: bool, required_only: bool = False, - games: GamesPlan | None = None) -> list[dict]: + games: GamesPlan | None = None, + systems: list[str] | None = None) -> list[dict]: """The data trees this install keeps: all, or those of a kept system. + systems, the systems chosen by name, decide when given: a file several + systems share named them all, and the arcade choice took blueMSX's + machines through FBNeo's msx.zip, which the pack built with --system + arcade leaves out. --required-only leaves out a tree every core reading it runs without (`optional`): a GBA and a SNES game took FBNeo's cheats and samples, 3,472 files no game opened. For the games of a card, a tree only cores @@ -7571,8 +7576,14 @@ def select_data_directories(manifest: dict, files: list[dict], narrowed: bool, or set(e.get("systems") or []) & games.any_core] if not narrowed: return entries - kept = {system for f in files for system in entry_systems(f)} - return [e for e in entries if kept & set(e.get("systems") or [])] + kept = (set(systems) if systems else + {system for f in files for system in entry_systems(f)}) + # A tree no platform system serves goes with the files of none, as the + # pack built with --system puts it in the part of its own. + other = (OTHER_SYSTEMS in kept if systems else + any(not entry_systems(f) for f in files)) + return [e for e in entries if kept & set(e.get("systems") or []) + or (other and not e.get("systems"))] def _copy_targets( @@ -9001,7 +9012,8 @@ def _prompt_custom_selection( kept_trees = select_data_directories({"data_directories": trees}, kept, narrowed or current is not None, isinstance(current, GamesChoice) and current.required, - current.plan if isinstance(current, GamesChoice) else None) + current.plan if isinstance(current, GamesChoice) else None, + chosen_systems(current)) if kept and all_in_place(kept, kept_trees, bios_path): # Read before the menu, as the screen reads before it asks: a # rerun was offered an install that installs nothing, then told @@ -9132,7 +9144,8 @@ def _print_menu_head( kept_trees = select_data_directories({"data_directories": trees}, shown, narrowed or current is not None, isinstance(current, GamesChoice) and current.required, - current.plan if isinstance(current, GamesChoice) else None) + current.plan if isinstance(current, GamesChoice) else None, + chosen_systems(current)) data = sum(len(entry.get("files") or {}) for entry in kept_trees) data_size = sum(meta.get("size", 0) for entry in kept_trees for meta in (entry.get("files") or {}).values()) @@ -9318,6 +9331,11 @@ def read_in_place(pairs: list[tuple[dict, Path]]) -> list[str]: return verdicts +def chosen_systems(choice: object) -> list[str] | None: + """The systems a choice names, None for one that names none.""" + return list(choice[0]) or None if isinstance(choice, tuple) else None + + def menu_choice( files: list[dict], omitted: list[dict], installed: tuple[list[dict], list[dict]] | None, current: object, cut: bool, @@ -15900,7 +15918,8 @@ def _install(args: argparse.Namespace, real_stdout: TextIO) -> None: ) data_dirs = select_data_directories(manifest, files, narrowed, bool(args.required_only), - games_plan if games_applied else None) + games_plan if games_applied else None, + chosen_systems(selection)) # The kinds as the plan and the menu head say them (parts_words), # the data files of the folders kept among them: this head said # BIOS files and game data beside a plan of three kinds, neither @@ -22054,7 +22073,10 @@ def _plan_data(state: TuiState, check: dict) -> tuple[int, int | None]: data = check.get("data_missing", 0) return data, check.get("data_bytes") if data else None required = any(flag == "--required-only" for flag, _value in tui_flags(state)) - trees = select_data_directories(state.manifest or {}, _choice_entries(state), True, required) + named = [name for _flag, name in _tui_system_flags(state) if name] + known = {row["system"] for row in state.systems} + trees = select_data_directories(state.manifest or {}, _choice_entries(state), True, required, + systems=named if named and set(named) <= known else None) sizes = [meta.get("size", 0) for entry in trees for meta in (entry.get("files") or {}).values()] return len(sizes), sum(sizes) diff --git a/install.sh b/install.sh index 5742d9a2f..a0503dd30 100755 --- a/install.sh +++ b/install.sh @@ -23,7 +23,7 @@ DEFAULT_INSTALL_URL="https://raw.githubusercontent.com/Abdess/retrobios/main/ins # curl or wget stop on a cut transfer before the hash is read: the site's # build rewrites this line there (scripts/sitebootstrap.py). MISMATCH_ADVICE="The download was most likely cut short: try again. Within minutes of an update of this project the two files can come from caches of different ages. Waiting five minutes settles that." -DEFAULT_INSTALL_SHA256="1d6c36d12d2cb728020e8a4cf0994e7c1779a5f2903163a83ed4caea6c54cc42" +DEFAULT_INSTALL_SHA256="eb617bc1d0a220cc887e7763611a95cac9d3abd33acc1f115f7c048e51f218c7" MAX_INSTALLER_BYTES=2097152 cleanup() { diff --git a/install/amberelec.json b/install/amberelec.json index c95f27662..5570c6ed8 100644 --- a/install/amberelec.json +++ b/install/amberelec.json @@ -62867,15 +62867,9 @@ "url": "https://buildbot.libretro.com/assets/system/blueMSX.zip", "type": "zip", "systems": [ - "msx", - "msx2", - "msx2plus", - "msxturboR", - "colecovision", - "sega-sg1000", - "sega-sc3000", - "sega-sf7000", - "spectravideo" + "microsoft-msx", + "coleco-colecovision", + "sc-3000" ], "files": { "Machines/MSX - Canon V-10/config.ini": { @@ -63687,32 +63681,7 @@ "url": "https://github.com/finalburnneo/FBNeo-cheats/archive/refs/heads/master.zip", "type": "zip", "systems": [ - "snk-neogeo-mvs", - "snk-neogeo-aes", - "snk-neogeo-cd", - "snk-ngp", - "capcom-cps3", - "igs-pgm", - "fairchild-channelf", - "coleco-colecovision", - "sinclair-zx-spectrum", - "msx", - "nintendo-fds", - "super-kaneko-nova", - "deco-cassette", - "namco-na1", - "namco-nb1", - "sega-system16b", - "konami-bubsys", - "nmk16", - "midway-mcr", - "snes", - "taito-cchip", - "ym2608", - "arcade", - "nintendo-gba", - "atari-system1", - "bally-astrocade" + "nec-pc-engine" ], "files": { "README.md": { @@ -77420,34 +77389,7 @@ "dest": "bios/fbneo", "url": "https://github.com/Abdess/retrobios/releases/download/large-files/fbneo-samples.zip", "type": "zip", - "systems": [ - "snk-neogeo-mvs", - "snk-neogeo-aes", - "snk-neogeo-cd", - "snk-ngp", - "capcom-cps3", - "igs-pgm", - "fairchild-channelf", - "coleco-colecovision", - "sinclair-zx-spectrum", - "msx", - "nintendo-fds", - "super-kaneko-nova", - "deco-cassette", - "namco-na1", - "namco-nb1", - "sega-system16b", - "konami-bubsys", - "nmk16", - "midway-mcr", - "snes", - "taito-cchip", - "ym2608", - "arcade", - "nintendo-gba", - "atari-system1", - "bally-astrocade" - ], + "systems": [], "files": { "samples/seawolf.zip": { "sha1": "1a27515c480192b7337f720ece2c159264dd4804", @@ -77659,7 +77601,7 @@ "url": "https://github.com/libretro/FreeIntv/raw/master/Assets/Overlays.zip", "type": "zip", "systems": [ - "intellivision" + "mattel-intellivision" ], "files": { "B-17 Bomber (USA, Europe).png": { diff --git a/install/batocera.json b/install/batocera.json index 16d9a5345..ef2f68a9e 100644 --- a/install/batocera.json +++ b/install/batocera.json @@ -212985,32 +212985,7 @@ "url": "https://github.com/finalburnneo/FBNeo-cheats/archive/refs/heads/master.zip", "type": "zip", "systems": [ - "snk-neogeo-mvs", - "snk-neogeo-aes", - "snk-neogeo-cd", - "snk-ngp", - "capcom-cps3", - "igs-pgm", - "fairchild-channelf", - "coleco-colecovision", - "sinclair-zx-spectrum", - "msx", - "nintendo-fds", - "super-kaneko-nova", - "deco-cassette", - "namco-na1", - "namco-nb1", - "sega-system16b", - "konami-bubsys", - "nmk16", - "midway-mcr", - "snes", - "taito-cchip", - "ym2608", - "arcade", - "nintendo-gba", - "atari-system1", - "bally-astrocade" + "nec-pc-engine" ], "files": { "README.md": { @@ -226718,34 +226693,7 @@ "dest": "fbneo", "url": "https://github.com/Abdess/retrobios/releases/download/large-files/fbneo-samples.zip", "type": "zip", - "systems": [ - "snk-neogeo-mvs", - "snk-neogeo-aes", - "snk-neogeo-cd", - "snk-ngp", - "capcom-cps3", - "igs-pgm", - "fairchild-channelf", - "coleco-colecovision", - "sinclair-zx-spectrum", - "msx", - "nintendo-fds", - "super-kaneko-nova", - "deco-cassette", - "namco-na1", - "namco-nb1", - "sega-system16b", - "konami-bubsys", - "nmk16", - "midway-mcr", - "snes", - "taito-cchip", - "ym2608", - "arcade", - "nintendo-gba", - "atari-system1", - "bally-astrocade" - ], + "systems": [], "files": { "samples/seawolf.zip": { "sha1": "1a27515c480192b7337f720ece2c159264dd4804", diff --git a/install/emudeck.json b/install/emudeck.json index f65a45730..b813ac648 100644 --- a/install/emudeck.json +++ b/install/emudeck.json @@ -101336,15 +101336,7 @@ "url": "https://buildbot.libretro.com/assets/system/blueMSX.zip", "type": "zip", "systems": [ - "msx", - "msx2", - "msx2plus", - "msxturboR", - "colecovision", - "sega-sg1000", - "sega-sc3000", - "sega-sf7000", - "spectravideo" + "coleco-colecovision" ], "files": { "Machines/MSX - Canon V-10/config.ini": { @@ -102231,9 +102223,7 @@ "dest": "", "url": "https://buildbot.libretro.com/assets/system/Dinothawr.zip", "type": "zip", - "systems": [ - "dinothawr" - ], + "systems": [], "files": { "dinothawr/level_7-1.tmx": { "sha1": "4c1a17e027714cb686ed6a296aa4634dd3668da5", @@ -102683,9 +102673,7 @@ "dest": "", "url": "https://buildbot.libretro.com/assets/system/DirkSimple.zip", "type": "zip", - "systems": [ - "laserdisc-arcade" - ], + "systems": [], "files": { "DirkSimple/LICENSE.txt": { "sha1": "212b5eb5026a76a73408fcf58df635fa4dbeabd1", @@ -102744,8 +102732,7 @@ "url": "https://buildbot.libretro.com/assets/system/Dolphin.zip", "type": "zip", "systems": [ - "nintendo-gamecube", - "nintendo-wii" + "nintendo-gamecube" ], "files": { "wiitdb-pt.txt": { @@ -111424,32 +111411,7 @@ "url": "https://github.com/finalburnneo/FBNeo-cheats/archive/refs/heads/master.zip", "type": "zip", "systems": [ - "snk-neogeo-mvs", - "snk-neogeo-aes", - "snk-neogeo-cd", - "snk-ngp", - "capcom-cps3", - "igs-pgm", - "fairchild-channelf", - "coleco-colecovision", - "sinclair-zx-spectrum", - "msx", - "nintendo-fds", - "super-kaneko-nova", - "deco-cassette", - "namco-na1", - "namco-nb1", - "sega-system16b", - "konami-bubsys", - "nmk16", - "midway-mcr", - "snes", - "taito-cchip", - "ym2608", - "arcade", - "nintendo-gba", - "atari-system1", - "bally-astrocade" + "nintendo-nes" ], "files": { "README.md": { @@ -125157,34 +125119,7 @@ "dest": "fbneo", "url": "https://github.com/Abdess/retrobios/releases/download/large-files/fbneo-samples.zip", "type": "zip", - "systems": [ - "snk-neogeo-mvs", - "snk-neogeo-aes", - "snk-neogeo-cd", - "snk-ngp", - "capcom-cps3", - "igs-pgm", - "fairchild-channelf", - "coleco-colecovision", - "sinclair-zx-spectrum", - "msx", - "nintendo-fds", - "super-kaneko-nova", - "deco-cassette", - "namco-na1", - "namco-nb1", - "sega-system16b", - "konami-bubsys", - "nmk16", - "midway-mcr", - "snes", - "taito-cchip", - "ym2608", - "arcade", - "nintendo-gba", - "atari-system1", - "bally-astrocade" - ], + "systems": [], "files": { "samples/seawolf.zip": { "sha1": "1a27515c480192b7337f720ece2c159264dd4804", @@ -125395,9 +125330,7 @@ "dest": "freeintv_overlays", "url": "https://github.com/libretro/FreeIntv/raw/master/Assets/Overlays.zip", "type": "zip", - "systems": [ - "intellivision" - ], + "systems": [], "files": { "B-17 Bomber (USA, Europe).png": { "sha1": "e9c55f64ab9c92b1ffda4ed0228cc29be19b834a", diff --git a/install/emuelec.json b/install/emuelec.json index 16c5814a1..6f0cdea6d 100644 --- a/install/emuelec.json +++ b/install/emuelec.json @@ -68656,15 +68656,9 @@ "url": "https://buildbot.libretro.com/assets/system/blueMSX.zip", "type": "zip", "systems": [ - "msx", - "msx2", - "msx2plus", - "msxturboR", - "colecovision", - "sega-sg1000", - "sega-sc3000", - "sega-sf7000", - "spectravideo" + "microsoft-msx", + "coleco-colecovision", + "sc-3000" ], "files": { "Machines/MSX - Canon V-10/config.ini": { @@ -69928,32 +69922,7 @@ "url": "https://github.com/finalburnneo/FBNeo-cheats/archive/refs/heads/master.zip", "type": "zip", "systems": [ - "snk-neogeo-mvs", - "snk-neogeo-aes", - "snk-neogeo-cd", - "snk-ngp", - "capcom-cps3", - "igs-pgm", - "fairchild-channelf", - "coleco-colecovision", - "sinclair-zx-spectrum", - "msx", - "nintendo-fds", - "super-kaneko-nova", - "deco-cassette", - "namco-na1", - "namco-nb1", - "sega-system16b", - "konami-bubsys", - "nmk16", - "midway-mcr", - "snes", - "taito-cchip", - "ym2608", - "arcade", - "nintendo-gba", - "atari-system1", - "bally-astrocade" + "nec-pc-engine" ], "files": { "README.md": { @@ -83661,34 +83630,7 @@ "dest": "bios/fbneo", "url": "https://github.com/Abdess/retrobios/releases/download/large-files/fbneo-samples.zip", "type": "zip", - "systems": [ - "snk-neogeo-mvs", - "snk-neogeo-aes", - "snk-neogeo-cd", - "snk-ngp", - "capcom-cps3", - "igs-pgm", - "fairchild-channelf", - "coleco-colecovision", - "sinclair-zx-spectrum", - "msx", - "nintendo-fds", - "super-kaneko-nova", - "deco-cassette", - "namco-na1", - "namco-nb1", - "sega-system16b", - "konami-bubsys", - "nmk16", - "midway-mcr", - "snes", - "taito-cchip", - "ym2608", - "arcade", - "nintendo-gba", - "atari-system1", - "bally-astrocade" - ], + "systems": [], "files": { "samples/seawolf.zip": { "sha1": "1a27515c480192b7337f720ece2c159264dd4804", @@ -83900,7 +83842,7 @@ "url": "https://github.com/libretro/FreeIntv/raw/master/Assets/Overlays.zip", "type": "zip", "systems": [ - "intellivision" + "mattel-intellivision" ], "files": { "B-17 Bomber (USA, Europe).png": { diff --git a/install/knulli.json b/install/knulli.json index 5f5172044..00f71bdb8 100644 --- a/install/knulli.json +++ b/install/knulli.json @@ -144248,32 +144248,7 @@ "url": "https://github.com/finalburnneo/FBNeo-cheats/archive/refs/heads/master.zip", "type": "zip", "systems": [ - "snk-neogeo-mvs", - "snk-neogeo-aes", - "snk-neogeo-cd", - "snk-ngp", - "capcom-cps3", - "igs-pgm", - "fairchild-channelf", - "coleco-colecovision", - "sinclair-zx-spectrum", - "msx", - "nintendo-fds", - "super-kaneko-nova", - "deco-cassette", - "namco-na1", - "namco-nb1", - "sega-system16b", - "konami-bubsys", - "nmk16", - "midway-mcr", - "snes", - "taito-cchip", - "ym2608", - "arcade", - "nintendo-gba", - "atari-system1", - "bally-astrocade" + "nec-pc-engine" ], "files": { "README.md": { @@ -157981,34 +157956,7 @@ "dest": "fbneo", "url": "https://github.com/Abdess/retrobios/releases/download/large-files/fbneo-samples.zip", "type": "zip", - "systems": [ - "snk-neogeo-mvs", - "snk-neogeo-aes", - "snk-neogeo-cd", - "snk-ngp", - "capcom-cps3", - "igs-pgm", - "fairchild-channelf", - "coleco-colecovision", - "sinclair-zx-spectrum", - "msx", - "nintendo-fds", - "super-kaneko-nova", - "deco-cassette", - "namco-na1", - "namco-nb1", - "sega-system16b", - "konami-bubsys", - "nmk16", - "midway-mcr", - "snes", - "taito-cchip", - "ym2608", - "arcade", - "nintendo-gba", - "atari-system1", - "bally-astrocade" - ], + "systems": [], "files": { "samples/seawolf.zip": { "sha1": "1a27515c480192b7337f720ece2c159264dd4804", @@ -158239,9 +158187,7 @@ "dest": "PPSSPP", "url": "https://buildbot.libretro.com/assets/system/PPSSPP.zip", "type": "zip", - "systems": [ - "sony-psp" - ], + "systems": [], "files": { "adhoc-servers.json": { "sha1": "a77c56a3516a32138d1197a73cacd68473b4ec87", diff --git a/install/lakka.json b/install/lakka.json index 2d46ab9fa..c3162cbb5 100644 --- a/install/lakka.json +++ b/install/lakka.json @@ -115954,9 +115954,7 @@ "dest": "Cemu/gameProfiles/default", "url": "https://github.com/cemu-project/Cemu/archive/3310f3b8b184d64a62b89fd59088c799432badf5.tar.gz", "type": "tarball", - "systems": [ - "nintendo-wiiu" - ], + "systems": [], "files": { "000500001012BD00.ini": { "sha1": "8aff44d69915d20266fee368fd1e3e4efa3f5b59", @@ -116914,9 +116912,7 @@ "dest": "", "url": "https://buildbot.libretro.com/assets/system/DirkSimple.zip", "type": "zip", - "systems": [ - "laserdisc-arcade" - ], + "systems": [], "files": { "DirkSimple/LICENSE.txt": { "sha1": "212b5eb5026a76a73408fcf58df635fa4dbeabd1", @@ -116975,32 +116971,11 @@ "url": "https://github.com/finalburnneo/FBNeo-cheats/archive/refs/heads/master.zip", "type": "zip", "systems": [ - "snk-neogeo-mvs", - "snk-neogeo-aes", - "snk-neogeo-cd", - "snk-ngp", - "capcom-cps3", - "igs-pgm", - "fairchild-channelf", - "coleco-colecovision", - "sinclair-zx-spectrum", - "msx", - "nintendo-fds", - "super-kaneko-nova", - "deco-cassette", - "namco-na1", - "namco-nb1", - "sega-system16b", - "konami-bubsys", - "nmk16", - "midway-mcr", - "snes", - "taito-cchip", - "ym2608", "arcade", - "nintendo-gba", - "atari-system1", - "bally-astrocade" + "sega-mega-drive", + "nec-pc-engine", + "nintendo-nes", + "nintendo-snes" ], "files": { "README.md": { @@ -130709,32 +130684,7 @@ "url": "https://github.com/Abdess/retrobios/releases/download/large-files/fbneo-samples.zip", "type": "zip", "systems": [ - "snk-neogeo-mvs", - "snk-neogeo-aes", - "snk-neogeo-cd", - "snk-ngp", - "capcom-cps3", - "igs-pgm", - "fairchild-channelf", - "coleco-colecovision", - "sinclair-zx-spectrum", - "msx", - "nintendo-fds", - "super-kaneko-nova", - "deco-cassette", - "namco-na1", - "namco-nb1", - "sega-system16b", - "konami-bubsys", - "nmk16", - "midway-mcr", - "snes", - "taito-cchip", - "ym2608", - "arcade", - "nintendo-gba", - "atari-system1", - "bally-astrocade" + "arcade" ], "files": { "samples/seawolf.zip": { diff --git a/install/launchers/index.json b/install/launchers/index.json index a0c5a8eb9..e898a2e75 100644 --- a/install/launchers/index.json +++ b/install/launchers/index.json @@ -27,8 +27,8 @@ { "dest": "roms/ports/retrobios/install.py", "repo_path": "install.py", - "size": 1126510, - "sha256": "1d6c36d12d2cb728020e8a4cf0994e7c1779a5f2903163a83ed4caea6c54cc42", + "size": 1127774, + "sha256": "eb617bc1d0a220cc887e7763611a95cac9d3abd33acc1f115f7c048e51f218c7", "executable": false }, { @@ -71,8 +71,8 @@ "muos": { "archive": { "dest": "ARCHIVE/RetroBIOS.muxapp", - "size": 1180137, - "sha256": "193463b29e96c5380fe026134c8d0c76aa79b938b7f40de4a579bda7cec2b630" + "size": 1181401, + "sha256": "375818f2c4dbfe5345d381f7281514168af4b94114af9a2d251862ee7cca8292" }, "members": [ { @@ -92,8 +92,8 @@ { "name": "RetroBIOS/install.py", "repo_path": "install.py", - "size": 1126510, - "sha256": "1d6c36d12d2cb728020e8a4cf0994e7c1779a5f2903163a83ed4caea6c54cc42", + "size": 1127774, + "sha256": "eb617bc1d0a220cc887e7763611a95cac9d3abd33acc1f115f7c048e51f218c7", "executable": false }, { @@ -166,8 +166,8 @@ { "dest": ".config/modules/retrobios/install.py", "repo_path": "install.py", - "size": 1126510, - "sha256": "1d6c36d12d2cb728020e8a4cf0994e7c1779a5f2903163a83ed4caea6c54cc42", + "size": 1127774, + "sha256": "eb617bc1d0a220cc887e7763611a95cac9d3abd33acc1f115f7c048e51f218c7", "executable": false }, { diff --git a/install/myminui.json b/install/myminui.json index 48d6a2bd6..d6769985c 100644 --- a/install/myminui.json +++ b/install/myminui.json @@ -5235,34 +5235,7 @@ "dest": "Bios/FBN/fbneo/cheats", "url": "https://github.com/finalburnneo/FBNeo-cheats/archive/refs/heads/master.zip", "type": "zip", - "systems": [ - "snk-neogeo-mvs", - "snk-neogeo-aes", - "snk-neogeo-cd", - "snk-ngp", - "capcom-cps3", - "igs-pgm", - "fairchild-channelf", - "coleco-colecovision", - "sinclair-zx-spectrum", - "msx", - "nintendo-fds", - "super-kaneko-nova", - "deco-cassette", - "namco-na1", - "namco-nb1", - "sega-system16b", - "konami-bubsys", - "nmk16", - "midway-mcr", - "snes", - "taito-cchip", - "ym2608", - "arcade", - "nintendo-gba", - "atari-system1", - "bally-astrocade" - ], + "systems": [], "files": { "README.md": { "sha1": "b1ae986964da09a1c026867745f4681b09d4c69e", @@ -18969,34 +18942,7 @@ "dest": "Bios/NG/fbneo/cheats", "url": "https://github.com/finalburnneo/FBNeo-cheats/archive/refs/heads/master.zip", "type": "zip", - "systems": [ - "snk-neogeo-mvs", - "snk-neogeo-aes", - "snk-neogeo-cd", - "snk-ngp", - "capcom-cps3", - "igs-pgm", - "fairchild-channelf", - "coleco-colecovision", - "sinclair-zx-spectrum", - "msx", - "nintendo-fds", - "super-kaneko-nova", - "deco-cassette", - "namco-na1", - "namco-nb1", - "sega-system16b", - "konami-bubsys", - "nmk16", - "midway-mcr", - "snes", - "taito-cchip", - "ym2608", - "arcade", - "nintendo-gba", - "atari-system1", - "bally-astrocade" - ], + "systems": [], "files": { "README.md": { "sha1": "b1ae986964da09a1c026867745f4681b09d4c69e", @@ -32703,34 +32649,7 @@ "dest": "Bios/FBN/fbneo", "url": "https://github.com/Abdess/retrobios/releases/download/large-files/fbneo-samples.zip", "type": "zip", - "systems": [ - "snk-neogeo-mvs", - "snk-neogeo-aes", - "snk-neogeo-cd", - "snk-ngp", - "capcom-cps3", - "igs-pgm", - "fairchild-channelf", - "coleco-colecovision", - "sinclair-zx-spectrum", - "msx", - "nintendo-fds", - "super-kaneko-nova", - "deco-cassette", - "namco-na1", - "namco-nb1", - "sega-system16b", - "konami-bubsys", - "nmk16", - "midway-mcr", - "snes", - "taito-cchip", - "ym2608", - "arcade", - "nintendo-gba", - "atari-system1", - "bally-astrocade" - ], + "systems": [], "files": { "samples/seawolf.zip": { "sha1": "1a27515c480192b7337f720ece2c159264dd4804", @@ -32941,34 +32860,7 @@ "dest": "Bios/NG/fbneo", "url": "https://github.com/Abdess/retrobios/releases/download/large-files/fbneo-samples.zip", "type": "zip", - "systems": [ - "snk-neogeo-mvs", - "snk-neogeo-aes", - "snk-neogeo-cd", - "snk-ngp", - "capcom-cps3", - "igs-pgm", - "fairchild-channelf", - "coleco-colecovision", - "sinclair-zx-spectrum", - "msx", - "nintendo-fds", - "super-kaneko-nova", - "deco-cassette", - "namco-na1", - "namco-nb1", - "sega-system16b", - "konami-bubsys", - "nmk16", - "midway-mcr", - "snes", - "taito-cchip", - "ym2608", - "arcade", - "nintendo-gba", - "atari-system1", - "bally-astrocade" - ], + "systems": [], "files": { "samples/seawolf.zip": { "sha1": "1a27515c480192b7337f720ece2c159264dd4804", diff --git a/install/nextui.json b/install/nextui.json index 421e5d649..a6a4e692f 100644 --- a/install/nextui.json +++ b/install/nextui.json @@ -4750,17 +4750,7 @@ "dest": "Bios/MSX", "url": "https://buildbot.libretro.com/assets/system/blueMSX.zip", "type": "zip", - "systems": [ - "msx", - "msx2", - "msx2plus", - "msxturboR", - "colecovision", - "sega-sg1000", - "sega-sc3000", - "sega-sf7000", - "spectravideo" - ], + "systems": [], "files": { "Machines/MSX - Canon V-10/config.ini": { "sha1": "eb287d4eae5d90f47e7ba8f94b430e2e52c61249", @@ -5646,34 +5636,7 @@ "dest": "Bios/FBN/fbneo/cheats", "url": "https://github.com/finalburnneo/FBNeo-cheats/archive/refs/heads/master.zip", "type": "zip", - "systems": [ - "snk-neogeo-mvs", - "snk-neogeo-aes", - "snk-neogeo-cd", - "snk-ngp", - "capcom-cps3", - "igs-pgm", - "fairchild-channelf", - "coleco-colecovision", - "sinclair-zx-spectrum", - "msx", - "nintendo-fds", - "super-kaneko-nova", - "deco-cassette", - "namco-na1", - "namco-nb1", - "sega-system16b", - "konami-bubsys", - "nmk16", - "midway-mcr", - "snes", - "taito-cchip", - "ym2608", - "arcade", - "nintendo-gba", - "atari-system1", - "bally-astrocade" - ], + "systems": [], "files": { "README.md": { "sha1": "b1ae986964da09a1c026867745f4681b09d4c69e", @@ -19380,34 +19343,7 @@ "dest": "Bios/FBN/fbneo", "url": "https://github.com/Abdess/retrobios/releases/download/large-files/fbneo-samples.zip", "type": "zip", - "systems": [ - "snk-neogeo-mvs", - "snk-neogeo-aes", - "snk-neogeo-cd", - "snk-ngp", - "capcom-cps3", - "igs-pgm", - "fairchild-channelf", - "coleco-colecovision", - "sinclair-zx-spectrum", - "msx", - "nintendo-fds", - "super-kaneko-nova", - "deco-cassette", - "namco-na1", - "namco-nb1", - "sega-system16b", - "konami-bubsys", - "nmk16", - "midway-mcr", - "snes", - "taito-cchip", - "ym2608", - "arcade", - "nintendo-gba", - "atari-system1", - "bally-astrocade" - ], + "systems": [], "files": { "samples/seawolf.zip": { "sha1": "1a27515c480192b7337f720ece2c159264dd4804", diff --git a/install/recalbox.json b/install/recalbox.json index 9ae8ba841..d03b3fca2 100644 --- a/install/recalbox.json +++ b/install/recalbox.json @@ -50491,32 +50491,8 @@ "url": "https://github.com/finalburnneo/FBNeo-cheats/archive/refs/heads/master.zip", "type": "zip", "systems": [ - "snk-neogeo-mvs", - "snk-neogeo-aes", - "snk-neogeo-cd", - "snk-ngp", - "capcom-cps3", - "igs-pgm", - "fairchild-channelf", - "coleco-colecovision", - "sinclair-zx-spectrum", - "msx", - "nintendo-fds", - "super-kaneko-nova", - "deco-cassette", - "namco-na1", - "namco-nb1", - "sega-system16b", - "konami-bubsys", - "nmk16", - "midway-mcr", - "snes", - "taito-cchip", - "ym2608", - "arcade", - "nintendo-gba", - "atari-system1", - "bally-astrocade" + "sega-mega-drive", + "nec-pc-engine" ], "files": { "README.md": { @@ -64224,34 +64200,7 @@ "dest": "fbneo", "url": "https://github.com/Abdess/retrobios/releases/download/large-files/fbneo-samples.zip", "type": "zip", - "systems": [ - "snk-neogeo-mvs", - "snk-neogeo-aes", - "snk-neogeo-cd", - "snk-ngp", - "capcom-cps3", - "igs-pgm", - "fairchild-channelf", - "coleco-colecovision", - "sinclair-zx-spectrum", - "msx", - "nintendo-fds", - "super-kaneko-nova", - "deco-cassette", - "namco-na1", - "namco-nb1", - "sega-system16b", - "konami-bubsys", - "nmk16", - "midway-mcr", - "snes", - "taito-cchip", - "ym2608", - "arcade", - "nintendo-gba", - "atari-system1", - "bally-astrocade" - ], + "systems": [], "files": { "samples/seawolf.zip": { "sha1": "1a27515c480192b7337f720ece2c159264dd4804", diff --git a/install/retroarch.json b/install/retroarch.json index e1789c820..80be550a6 100644 --- a/install/retroarch.json +++ b/install/retroarch.json @@ -118899,9 +118899,7 @@ "dest": "Cemu/gameProfiles/default", "url": "https://github.com/cemu-project/Cemu/archive/3310f3b8b184d64a62b89fd59088c799432badf5.tar.gz", "type": "tarball", - "systems": [ - "nintendo-wiiu" - ], + "systems": [], "files": { "000500001012BD00.ini": { "sha1": "8aff44d69915d20266fee368fd1e3e4efa3f5b59", @@ -120311,9 +120309,7 @@ "dest": "", "url": "https://buildbot.libretro.com/assets/system/DirkSimple.zip", "type": "zip", - "systems": [ - "laserdisc-arcade" - ], + "systems": [], "files": { "DirkSimple/LICENSE.txt": { "sha1": "212b5eb5026a76a73408fcf58df635fa4dbeabd1", @@ -129044,32 +129040,11 @@ "url": "https://github.com/finalburnneo/FBNeo-cheats/archive/refs/heads/master.zip", "type": "zip", "systems": [ - "snk-neogeo-mvs", - "snk-neogeo-aes", - "snk-neogeo-cd", - "snk-ngp", - "capcom-cps3", - "igs-pgm", - "fairchild-channelf", - "coleco-colecovision", - "sinclair-zx-spectrum", - "msx", - "nintendo-fds", - "super-kaneko-nova", - "deco-cassette", - "namco-na1", - "namco-nb1", - "sega-system16b", - "konami-bubsys", - "nmk16", - "midway-mcr", - "snes", - "taito-cchip", - "ym2608", "arcade", - "nintendo-gba", - "atari-system1", - "bally-astrocade" + "sega-mega-drive", + "nec-pc-engine", + "nintendo-nes", + "nintendo-snes" ], "files": { "README.md": { @@ -142778,32 +142753,7 @@ "url": "https://github.com/Abdess/retrobios/releases/download/large-files/fbneo-samples.zip", "type": "zip", "systems": [ - "snk-neogeo-mvs", - "snk-neogeo-aes", - "snk-neogeo-cd", - "snk-ngp", - "capcom-cps3", - "igs-pgm", - "fairchild-channelf", - "coleco-colecovision", - "sinclair-zx-spectrum", - "msx", - "nintendo-fds", - "super-kaneko-nova", - "deco-cassette", - "namco-na1", - "namco-nb1", - "sega-system16b", - "konami-bubsys", - "nmk16", - "midway-mcr", - "snes", - "taito-cchip", - "ym2608", - "arcade", - "nintendo-gba", - "atari-system1", - "bally-astrocade" + "arcade" ], "files": { "samples/seawolf.zip": { diff --git a/install/retrobat.json b/install/retrobat.json index f85f0653b..13da7d80e 100644 --- a/install/retrobat.json +++ b/install/retrobat.json @@ -76710,32 +76710,7 @@ "url": "https://github.com/finalburnneo/FBNeo-cheats/archive/refs/heads/master.zip", "type": "zip", "systems": [ - "snk-neogeo-mvs", - "snk-neogeo-aes", - "snk-neogeo-cd", - "snk-ngp", - "capcom-cps3", - "igs-pgm", - "fairchild-channelf", - "coleco-colecovision", - "sinclair-zx-spectrum", - "msx", - "nintendo-fds", - "super-kaneko-nova", - "deco-cassette", - "namco-na1", - "namco-nb1", - "sega-system16b", - "konami-bubsys", - "nmk16", - "midway-mcr", - "snes", - "taito-cchip", - "ym2608", - "arcade", - "nintendo-gba", - "atari-system1", - "bally-astrocade" + "nec-pc-engine" ], "files": { "README.md": { @@ -90443,34 +90418,7 @@ "dest": "fbneo", "url": "https://github.com/Abdess/retrobios/releases/download/large-files/fbneo-samples.zip", "type": "zip", - "systems": [ - "snk-neogeo-mvs", - "snk-neogeo-aes", - "snk-neogeo-cd", - "snk-ngp", - "capcom-cps3", - "igs-pgm", - "fairchild-channelf", - "coleco-colecovision", - "sinclair-zx-spectrum", - "msx", - "nintendo-fds", - "super-kaneko-nova", - "deco-cassette", - "namco-na1", - "namco-nb1", - "sega-system16b", - "konami-bubsys", - "nmk16", - "midway-mcr", - "snes", - "taito-cchip", - "ym2608", - "arcade", - "nintendo-gba", - "atari-system1", - "bally-astrocade" - ], + "systems": [], "files": { "samples/seawolf.zip": { "sha1": "1a27515c480192b7337f720ece2c159264dd4804", @@ -90682,7 +90630,7 @@ "url": "https://github.com/libretro/FreeIntv/raw/master/Assets/Overlays.zip", "type": "zip", "systems": [ - "intellivision" + "mattel-intellivision" ], "files": { "B-17 Bomber (USA, Europe).png": { diff --git a/install/retrodeck.json b/install/retrodeck.json index 4f8a09d4d..b45a570ba 100644 --- a/install/retrodeck.json +++ b/install/retrodeck.json @@ -140404,9 +140404,7 @@ "dest": "bios/Cemu/gameProfiles/default", "url": "https://github.com/cemu-project/Cemu/archive/3310f3b8b184d64a62b89fd59088c799432badf5.tar.gz", "type": "tarball", - "systems": [ - "nintendo-wiiu" - ], + "systems": [], "files": { "000500001012BD00.ini": { "sha1": "8aff44d69915d20266fee368fd1e3e4efa3f5b59", @@ -141365,32 +141363,11 @@ "url": "https://github.com/finalburnneo/FBNeo-cheats/archive/refs/heads/master.zip", "type": "zip", "systems": [ - "snk-neogeo-mvs", - "snk-neogeo-aes", - "snk-neogeo-cd", - "snk-ngp", - "capcom-cps3", - "igs-pgm", - "fairchild-channelf", - "coleco-colecovision", - "sinclair-zx-spectrum", - "msx", - "nintendo-fds", - "super-kaneko-nova", - "deco-cassette", - "namco-na1", - "namco-nb1", - "sega-system16b", - "konami-bubsys", - "nmk16", - "midway-mcr", - "snes", - "taito-cchip", - "ym2608", "arcade", - "nintendo-gba", - "atari-system1", - "bally-astrocade" + "sega-mega-drive", + "nec-pc-engine", + "nintendo-nes", + "nintendo-snes" ], "files": { "README.md": { @@ -155099,32 +155076,7 @@ "url": "https://github.com/Abdess/retrobios/releases/download/large-files/fbneo-samples.zip", "type": "zip", "systems": [ - "snk-neogeo-mvs", - "snk-neogeo-aes", - "snk-neogeo-cd", - "snk-ngp", - "capcom-cps3", - "igs-pgm", - "fairchild-channelf", - "coleco-colecovision", - "sinclair-zx-spectrum", - "msx", - "nintendo-fds", - "super-kaneko-nova", - "deco-cassette", - "namco-na1", - "namco-nb1", - "sega-system16b", - "konami-bubsys", - "nmk16", - "midway-mcr", - "snes", - "taito-cchip", - "ym2608", - "arcade", - "nintendo-gba", - "atari-system1", - "bally-astrocade" + "arcade" ], "files": { "samples/seawolf.zip": { @@ -155337,7 +155289,7 @@ "url": "https://github.com/libretro/FreeIntv/raw/master/Assets/Overlays.zip", "type": "zip", "systems": [ - "intellivision" + "mattel-intellivision" ], "files": { "B-17 Bomber (USA, Europe).png": { diff --git a/install/retropie.json b/install/retropie.json index a174a653e..378fcb797 100644 --- a/install/retropie.json +++ b/install/retropie.json @@ -123126,9 +123126,7 @@ "dest": "Cemu/gameProfiles/default", "url": "https://github.com/cemu-project/Cemu/archive/3310f3b8b184d64a62b89fd59088c799432badf5.tar.gz", "type": "tarball", - "systems": [ - "nintendo-wiiu" - ], + "systems": [], "files": { "000500001012BD00.ini": { "sha1": "8aff44d69915d20266fee368fd1e3e4efa3f5b59", @@ -132759,32 +132757,11 @@ "url": "https://github.com/finalburnneo/FBNeo-cheats/archive/refs/heads/master.zip", "type": "zip", "systems": [ - "snk-neogeo-mvs", - "snk-neogeo-aes", - "snk-neogeo-cd", - "snk-ngp", - "capcom-cps3", - "igs-pgm", - "fairchild-channelf", - "coleco-colecovision", - "sinclair-zx-spectrum", - "msx", - "nintendo-fds", - "super-kaneko-nova", - "deco-cassette", - "namco-na1", - "namco-nb1", - "sega-system16b", - "konami-bubsys", - "nmk16", - "midway-mcr", - "snes", - "taito-cchip", - "ym2608", "arcade", - "nintendo-gba", - "atari-system1", - "bally-astrocade" + "sega-mega-drive", + "nec-pc-engine", + "nintendo-nes", + "nintendo-snes" ], "files": { "README.md": { @@ -146493,32 +146470,7 @@ "url": "https://github.com/Abdess/retrobios/releases/download/large-files/fbneo-samples.zip", "type": "zip", "systems": [ - "snk-neogeo-mvs", - "snk-neogeo-aes", - "snk-neogeo-cd", - "snk-ngp", - "capcom-cps3", - "igs-pgm", - "fairchild-channelf", - "coleco-colecovision", - "sinclair-zx-spectrum", - "msx", - "nintendo-fds", - "super-kaneko-nova", - "deco-cassette", - "namco-na1", - "namco-nb1", - "sega-system16b", - "konami-bubsys", - "nmk16", - "midway-mcr", - "snes", - "taito-cchip", - "ym2608", - "arcade", - "nintendo-gba", - "atari-system1", - "bally-astrocade" + "arcade" ], "files": { "samples/seawolf.zip": { diff --git a/install/rocknix.json b/install/rocknix.json index db9d151ae..b0079d595 100644 --- a/install/rocknix.json +++ b/install/rocknix.json @@ -85631,17 +85631,7 @@ "dest": "", "url": "https://buildbot.libretro.com/assets/system/blueMSX.zip", "type": "zip", - "systems": [ - "msx", - "msx2", - "msx2plus", - "msxturboR", - "colecovision", - "sega-sg1000", - "sega-sc3000", - "sega-sf7000", - "spectravideo" - ], + "systems": [], "files": { "Machines/MSX - Canon V-10/config.ini": { "sha1": "eb287d4eae5d90f47e7ba8f94b430e2e52c61249", @@ -86527,9 +86517,7 @@ "dest": "", "url": "https://buildbot.libretro.com/assets/system/Dinothawr.zip", "type": "zip", - "systems": [ - "dinothawr" - ], + "systems": [], "files": { "dinothawr/level_7-1.tmx": { "sha1": "4c1a17e027714cb686ed6a296aa4634dd3668da5", @@ -86979,9 +86967,7 @@ "dest": "", "url": "https://buildbot.libretro.com/assets/system/DirkSimple.zip", "type": "zip", - "systems": [ - "laserdisc-arcade" - ], + "systems": [], "files": { "DirkSimple/LICENSE.txt": { "sha1": "212b5eb5026a76a73408fcf58df635fa4dbeabd1", @@ -87040,9 +87026,7 @@ "url": "https://buildbot.libretro.com/assets/system/Dolphin.zip", "type": "zip", "systems": [ - "nintendo-gamecube", - "nintendo-wii", - "sega-triforce" + "nintendo-gamecube" ], "files": { "wiitdb-pt.txt": { @@ -95721,34 +95705,7 @@ "dest": "fbneo/cheats", "url": "https://github.com/finalburnneo/FBNeo-cheats/archive/refs/heads/master.zip", "type": "zip", - "systems": [ - "snk-neogeo-mvs", - "snk-neogeo-aes", - "snk-neogeo-cd", - "snk-ngp", - "capcom-cps3", - "igs-pgm", - "fairchild-channelf", - "coleco-colecovision", - "sinclair-zx-spectrum", - "msx", - "nintendo-fds", - "super-kaneko-nova", - "deco-cassette", - "namco-na1", - "namco-nb1", - "sega-system16b", - "konami-bubsys", - "nmk16", - "midway-mcr", - "snes", - "taito-cchip", - "ym2608", - "arcade", - "nintendo-gba", - "atari-system1", - "bally-astrocade" - ], + "systems": [], "files": { "README.md": { "sha1": "b1ae986964da09a1c026867745f4681b09d4c69e", @@ -109455,34 +109412,7 @@ "dest": "fbneo", "url": "https://github.com/Abdess/retrobios/releases/download/large-files/fbneo-samples.zip", "type": "zip", - "systems": [ - "snk-neogeo-mvs", - "snk-neogeo-aes", - "snk-neogeo-cd", - "snk-ngp", - "capcom-cps3", - "igs-pgm", - "fairchild-channelf", - "coleco-colecovision", - "sinclair-zx-spectrum", - "msx", - "nintendo-fds", - "super-kaneko-nova", - "deco-cassette", - "namco-na1", - "namco-nb1", - "sega-system16b", - "konami-bubsys", - "nmk16", - "midway-mcr", - "snes", - "taito-cchip", - "ym2608", - "arcade", - "nintendo-gba", - "atari-system1", - "bally-astrocade" - ], + "systems": [], "files": { "samples/seawolf.zip": { "sha1": "1a27515c480192b7337f720ece2c159264dd4804", @@ -109693,9 +109623,7 @@ "dest": "freeintv_overlays", "url": "https://github.com/libretro/FreeIntv/raw/master/Assets/Overlays.zip", "type": "zip", - "systems": [ - "intellivision" - ], + "systems": [], "files": { "B-17 Bomber (USA, Europe).png": { "sha1": "e9c55f64ab9c92b1ffda4ed0228cc29be19b834a", @@ -110090,9 +110018,7 @@ "dest": "PPSSPP", "url": "https://buildbot.libretro.com/assets/system/PPSSPP.zip", "type": "zip", - "systems": [ - "sony-psp" - ], + "systems": [], "files": { "adhoc-servers.json": { "sha1": "a77c56a3516a32138d1197a73cacd68473b4ec87", diff --git a/schemas/emulator.schema.json b/schemas/emulator.schema.json index dab1a1d7a..5887aac6c 100644 --- a/schemas/emulator.schema.json +++ b/schemas/emulator.schema.json @@ -390,6 +390,11 @@ "items": {"type": "string"}, "description": "Platforms (registry keys) whose launcher points the emulator at other files, so this entry is never opened there." }, + "systems": { + "type": "array", + "items": {"type": "string"}, + "description": "The systems whose games the tree serves, when fewer than the profile's: an install for some systems keeps the tree only with one of them." + }, "load_from": { "description": "Where the emulator reads the tree when not below the system directory, keyed by build when the builds differ (content_dir: beside the content). A platform pack carries only a tree read from the system directory.", "oneOf": [ diff --git a/scripts/generate_pack.py b/scripts/generate_pack.py index 25b9f97ca..8e9a31305 100644 --- a/scripts/generate_pack.py +++ b/scripts/generate_pack.py @@ -78,6 +78,7 @@ from common import ( load_platform_config, without_profile_blind, MANUFACTURER_PREFIXES, + _norm_system_id, require_yaml, ProfileSelectionError, core_system_dirs, @@ -5113,7 +5114,7 @@ def generate_manifest( data_sizes = pack_only_sizes + [os.path.getsize(src) for src, _dest in data_members] data_directories = _manifest_data_directories( data_members, data_refs, data_registry or {}, base_dest, - tree_readers(pack_systems, core_trees), + tree_readers(pack_systems, core_trees), pack_systems, ) now = _build_timestamp(db) @@ -5219,6 +5220,7 @@ def _manifest_data_directories( registry: dict, base_dest: str, readers: dict[str, list[str]] | None = None, + platform_systems: Iterable[str] | None = None, ) -> list[dict]: """Each data directory the pack carries, as the installer rebuilds it. @@ -5229,6 +5231,11 @@ def _manifest_data_directories( changed since is refused rather than installed. archive_size is the size of the archive refresh_data_dirs last downloaded, what fetching the tree costs: a tarball whose tree is 10 KB is a download of 21 MB. + ``systems`` are the platform's ids (``platform_systems``) the tree's + systems normalize to, as a core extra's are: a tree no platform system + serves has none, and goes with the files of no system, as the pack + built with --system puts it in the part of its own. FBNeo's cheats + carried sega-megadrive where RetroArch's list says sega-mega-drive. ``optional`` marks a tree every core reading it runs without (``required: false``): install.py --required-only leaves it out, as the pack built with --required-only does. ``cores`` names the cores that @@ -5237,8 +5244,13 @@ def _manifest_data_directories( """ grouped: dict[tuple[str, str], dict] = {} versions: dict[str, dict[str, dict]] = {} + by_norm: dict[str, list[str]] = {} + for sys_id in sorted(platform_systems or ()): + by_norm.setdefault(_norm_system_id(sys_id), []).append(sys_id) for src, full in members: ref, systems, prefix, needed = refs[full] + if platform_systems is not None: + systems = tuple(own for sid in systems for own in by_norm.get(_norm_system_id(sid), ())) entry = registry.get(ref, {}) key = (ref, prefix) group = grouped.get(key) diff --git a/tests/test_install_selection.py b/tests/test_install_selection.py index 6231aa866..0f2e768db 100644 --- a/tests/test_install_selection.py +++ b/tests/test_install_selection.py @@ -913,6 +913,57 @@ class InstallMatchesASystemPack(unittest.TestCase): ) +class DataTreesFollowTheSystemsTheyServe(InstallMatchesASystemPack): + """The data trees a system choice keeps, installer against pack. GBA + alone took FBNeo's cheats and samples, 3,472 files, because the trees + listed every FBNeo system. The Mega Drive took no cheat: the tree said + sega-megadrive where RetroArch's list says sega-mega-drive.""" + + CASES = ((["nintendo-gba"], []), (["sega-mega-drive"], []), (["arcade"], [])) + + def _packed(self, systems, regions) -> set[str]: + import zipfile + + from common import load_data_dir_registry + + # The trees come from the registry the manifest reads by itself. + with tempfile.TemporaryDirectory(dir=REPO_ROOT / "tmp") as out: + zip_path = self.gp.generate_pack( + self.PLATFORM, str(REPO_ROOT / "platforms"), self.db, + str(REPO_ROOT / "bios"), out, + emulators_dir=str(REPO_ROOT / "emulators"), + emu_profiles=self.profiles, system_filter=systems, + regions=regions or None, offline=True, + data_registry=load_data_dir_registry(str(REPO_ROOT / "platforms")), + ) + with zipfile.ZipFile(zip_path) as zf: + names = set(zf.namelist()) + prefix = f"{self.base}/" if self.base else "" + return {n[len(prefix):] if prefix and n.startswith(prefix) else n for n in names} + + def _members(self, trees) -> set[str]: + return {f"{tree['dest']}/{rel}" if tree["dest"] else rel + for tree in trees for rel in tree["files"]} + + def test_each_case(self): + everything = self._members(self.full.get("data_directories") or []) + for systems, regions in self.CASES: + with self.subTest(systems=systems): + files, _omitted = install.narrow( + self.full["files"], self.full["omitted_files"], systems, [], regions) + trees = install.select_data_directories(self.full, files, True, systems=systems) + refs = {tree["ref"] for tree in trees} + if systems == ["nintendo-gba"]: + self.assertFalse({"fbneo-cheats", "fbneo-samples"} & refs) + if systems == ["sega-mega-drive"]: + self.assertIn("fbneo-cheats", refs) + self.assertNotIn("fbneo-samples", refs) + if systems == ["arcade"]: + self.assertTrue({"fbneo-cheats", "fbneo-samples"} <= refs) + self.assertEqual(self._members(trees), + self._packed(systems, regions) & everything) + + class InstallMatchesATargetManifest(unittest.TestCase): """`install.py --target T` against the manifest the builder writes for T.