diff --git a/emulators/ares.yml b/emulators/ares.yml index 35623cf00..fe77a7e21 100644 --- a/emulators/ares.yml +++ b/emulators/ares.yml @@ -98,6 +98,53 @@ config_reads: - "PlayStation/Firmware/BIOS.Europe" source_ref: "desktop-ui/emulator/playstation.cpp:19-23, 87-101" condition: "the disc's region" + - file: "settings.bml" + platforms: [emudeck] + revision: "0aafd85789215e84e1e43415c07d4c88461b7899" + revision_from: "v148, the tarball the Flathub manifest dev.ares.ares builds at 1259ea09 (EmuDeck installs the Flathub app)" + source_ref: "desktop-ui/desktop-ui.cpp:9-35, 100-103, 114, desktop-ui/settings/settings.cpp:31-35, 42, 223-235, nall/nall/path.cpp:123-142" + keys: + - key: "ColecoVision/Firmware/BIOS.World" + source_ref: "desktop-ui/emulator/colecovision.cpp:10-12, 42-50, mia/system/colecovision.cpp:7-9" + - key: "MSX/Firmware/BIOS.Japan" + source_ref: "desktop-ui/emulator/msx.cpp:16-19, 44-53" + - key: "FamicomDiskSystem/Firmware/BIOS.Japan" + source_ref: "desktop-ui/emulator/famicom-disk-system.cpp:17-19, 89-97" + - key: + - "Nintendo64DD/Firmware/BIOS.Japan" + - "Nintendo64DD/Firmware/BIOS.US" + - "Nintendo64DD/Firmware/BIOS.DEV" + source_ref: "desktop-ui/emulator/nintendo-64dd.cpp:17-19, 59-79" + condition: "the game's region" + - key: "GameBoyAdvance/Firmware/BIOS.World" + source_ref: "desktop-ui/emulator/game-boy-advance.cpp:12-14, 55-63" + - key: + - "MasterSystem/Firmware/BIOS.US" + - "MasterSystem/Firmware/BIOS.Japan" + - "MasterSystem/Firmware/BIOS.Europe" + source_ref: "desktop-ui/emulator/master-system.cpp:12-16, 93-107" + condition: "the game's region" + - key: "GameGear/Firmware/BIOS.World" + source_ref: "desktop-ui/emulator/game-gear.cpp:10-12, 30-40" + - key: + - "MegaCD/Firmware/BIOS.US" + - "MegaCD/Firmware/BIOS.Japan" + - "MegaCD/Firmware/BIOS.Europe" + source_ref: "desktop-ui/emulator/mega-cd.cpp:17-19, 63-83" + condition: "the disc's region" + - key: "NeoGeoAES/Firmware/BIOS.World" + source_ref: "desktop-ui/emulator/neo-geo-aes.cpp:14, 37-51, mia/system/neo-geo-aes.cpp:8-34" + condition: "a .zip path is searched for neo-epo.bin, any other path is read whole" + - key: "NeoGeoPocket/Firmware/BIOS.World" + source_ref: "desktop-ui/emulator/neo-geo-pocket.cpp:10-12, 32-40" + - key: "NeoGeoPocketColor/Firmware/BIOS.World" + source_ref: "desktop-ui/emulator/neo-geo-pocket-color.cpp:10-12, 32-40" + - key: + - "PlayStation/Firmware/BIOS.US" + - "PlayStation/Firmware/BIOS.Japan" + - "PlayStation/Firmware/BIOS.Europe" + source_ref: "desktop-ui/emulator/playstation.cpp:18-20, 78-98" + condition: "the disc's region" notes: | Multi-system emulator by Near (byuu), successor to higan/bsnes. Focuses on diff --git a/emulators/gzdoom.yml b/emulators/gzdoom.yml index d958edfa8..92672ba40 100644 --- a/emulators/gzdoom.yml +++ b/emulators/gzdoom.yml @@ -27,6 +27,18 @@ config_reads: source_ref: "src/common/utility/findfile.cpp:224-260" - key: "[SoundfontSearch.Directories] Path" source_ref: "src/common/audio/music/i_soundfont.cpp:393-410" + - file: "gzdoom.ini" + platforms: [retrodeck] + revision: "99aa489d09015a95bb78df2b30ede29f328cc874" + revision_from: "GZDoom g4.14.2-m in the gzdoom binary RetroDECK's components carry at fcd0d729 (gzdoom/rd_assets/gzdoom_release/bin/gzdoom), the g4.14.2 tag" + source_ref: "src/gameconfigfile.cpp:89-102, 894-904, src/common/platform/posix/unix/i_specialpaths.cpp:166-169" + keys: + - key: "[IWADSearch.Directories] Path" + source_ref: "src/d_iwad.cpp:457-471" + - key: "[FileSearch.Directories] Path" + source_ref: "src/common/utility/findfile.cpp:224-260" + - key: "[SoundfontSearch.Directories] Path" + source_ref: "src/common/audio/music/i_soundfont.cpp:393-410" notes: | Doom-engine source port by Christoph Oelckers. Supports Doom, Heretic, diff --git a/emulators/lrps2.yml b/emulators/lrps2.yml index d8541e5d8..22c17833d 100644 --- a/emulators/lrps2.yml +++ b/emulators/lrps2.yml @@ -30,6 +30,15 @@ config_reads: keys: - key: "pcsx2_bios" source_ref: "libretro/main.cpp:525-536, 2552-2560" + - file: "core options" + platforms: [retrodeck] + revision: "14d19f8339e3646b645c1c33e612b1888e632145" + revision_from: "library_version 14d19f8 of pcsx2_libretro.so in the buildbot's stable 1.22.2 RetroArch_cores.7z (2025-11-20), which RetroDECK's retroarch component installs (retroarch/component_recipe.json at fcd0d729)" + source_ref: "libretro/main.cpp:341, 1915-1926, 2013" + keys: + - key: "pcsx2_bios" + source_ref: "libretro/main.cpp:360-365, 1801-1830, pcsx2/VMManager.cpp:247-256, 1076-1092, 601, pcsx2/Pcsx2Config.cpp:887-891, 995-1000, pcsx2/ps2/BiosTools.cpp:267-281" + condition: "the value is a file of system/pcsx2/bios; without the option the core scans that folder for a 4 to 8 MiB BIOS" notes: | Hard fork of PCSX2 (pre-Qt, 1.7-dev era) ported to libretro, x86_64 only, diff --git a/scripts/launchers.py b/scripts/launchers.py index 138014337..3111f4070 100644 --- a/scripts/launchers.py +++ b/scripts/launchers.py @@ -369,13 +369,17 @@ def pool_folders(profile: dict) -> dict[str, str]: def _reads_apply(read: dict, profile: dict, platform: str) -> bool: """Whether a config_reads entry describes the build ``platform`` ships. - An entry naming platforms is read at their pin_build revision. One that - names none is read at the profile's pin, the build of every platform - with no pin_build of its own or one pinning the same commit. + An entry naming platforms is read at their pin_build revision or its + revision. One that names none is read at the profile's pin, the build + of every platform no entry names and with no pin_build of its own or + one pinning the same commit. """ named = [str(p) for p in read.get("platforms") or []] if named: return platform in named + # A platform an entry names has its build read there, not at the pin. + if any(platform in (r.get("platforms") or []) for r in profile.get("config_reads") or []): + return False pin = str(profile.get("source_commit") or "") builds = [b for b in profile.get("pin_build") or [] if b.get("platform") == platform] return all(pin and str(b.get("value") or "").startswith(pin[:12]) for b in builds) diff --git a/tests/test_launcher_evidence.py b/tests/test_launcher_evidence.py index bce6fe7e7..18dbe8074 100644 --- a/tests/test_launcher_evidence.py +++ b/tests/test_launcher_evidence.py @@ -265,6 +265,23 @@ class Invariants(unittest.TestCase): self.assertEqual(_config_reads_without_build(path, {"config_reads": closed}), []) +class ShippedBuild(unittest.TestCase): + def test_a_platform_an_entry_names_is_read_there_only(self) -> None: + """RetroDECK ships GZDoom 4.14.2: the entry read at the pin does not + also stand for it, so a key only the pin reads proves nothing there.""" + duck = profile(config_reads=[ + {"file": "settings.ini", "source_ref": "src/core.cpp:10", + "keys": [{"key": "[BIOS] SearchDirectory", "source_ref": "src/settings.cpp:20"}, + {"key": ["[BIOS] PathPAL", "[BIOS] PathNTSCU"], "source_ref": "src/bios.cpp:30"}]}, + {"file": "settings.ini", "platforms": ["rocknix"], "revision": "a" * 40, + "revision_from": "the AppImage", "source_ref": "src/core.cpp:12", + "keys": [{"key": "[BIOS] SearchDirectory", "source_ref": "src/settings.cpp:22"}]}, + ]) + evidence = config_evidence(record(), {"duck": duck}, "rocknix") + self.assertEqual(evidence.missing, ("config_reads: no read of [BIOS] PathPAL",)) + self.assertTrue(config_evidence(record(), {"duck": duck}, "emuelec").proven) + + class CoreOptions(unittest.TestCase): def test_a_core_option_is_read_by_the_core_not_the_frontend(self) -> None: """RetroDECK's retroarch component writes pcsx2_bios: the frontend