From e1410ef4a6a508fb454457dd0e48861bb7853c2b Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Thu, 19 Mar 2026 13:17:55 +0100 Subject: [PATCH] fix: exclusion reasons from YAML, not hardcoded in Python Added exclusion_note field to emulator profiles. verify.py reads this field instead of parsing notes text with fragile keywords. desmume2015: explains .info vs code discrepancy dolphin_launcher: explains standalone BIOS management All exclusion messages now come from YAML data, not Python strings. --- emulators/desmume2015.yml | 2 +- emulators/dolphin_launcher.yml | 1 + scripts/verify.py | 19 +++++++++---------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/emulators/desmume2015.yml b/emulators/desmume2015.yml index 4712afd9..55b20148 100644 --- a/emulators/desmume2015.yml +++ b/emulators/desmume2015.yml @@ -6,11 +6,11 @@ core_version: "SVN (2015 snapshot)" display_name: "Nintendo - DS (DeSmuME 2015)" cores: [desmume2015] systems: [nintendo-ds] +exclusion_note: ".info declares firmware_count=3 but code never loads external BIOS (desmume_use_external_bios absent)" notes: | Frozen 2015 snapshot of DeSmuME. The external BIOS loading feature (desmume_use_external_bios) does NOT exist in this version. - The .info declares firmware_count=3 but the code never loads them. Verified: libretro.cpp has no bios7/bios9/firmware path construction. ref: desmume2015/desmume/src/frontend/libretro/libretro.cpp diff --git a/emulators/dolphin_launcher.yml b/emulators/dolphin_launcher.yml index 85230e4f..4b0ceda8 100644 --- a/emulators/dolphin_launcher.yml +++ b/emulators/dolphin_launcher.yml @@ -1,5 +1,6 @@ emulator: "Dolphin Launcher" type: launcher +exclusion_note: "stub core calls standalone Dolphin — all BIOS in Dolphin's own directory" source: "https://github.com/RobLoach/libretro-dolphin-launcher" profiled_date: "2026-03-18" core_version: "1.2.0" diff --git a/scripts/verify.py b/scripts/verify.py index d3e8f9dd..85a0cf03 100644 --- a/scripts/verify.py +++ b/scripts/verify.py @@ -286,19 +286,18 @@ def find_exclusion_notes( if profile.get("type") == "launcher": notes.append({ "emulator": emu_display, "reason": "launcher", - "detail": "BIOS managed by standalone emulator, not system_dir", + "detail": profile.get("exclusion_note", "BIOS managed by standalone emulator"), }) continue - # Frozen snapshot with empty files - if not profile.get("files") and profile.get("notes"): - note_text = profile.get("notes", "") - if "frozen" in note_text.lower() or "snapshot" in note_text.lower() or "never loads" in note_text.lower(): - notes.append({ - "emulator": emu_display, "reason": "frozen_snapshot", - "detail": "code does not load external firmware despite .info declaration", - }) - continue + # Profile-level exclusion note (frozen snapshots, etc.) + exclusion_note = profile.get("exclusion_note") + if exclusion_note: + notes.append({ + "emulator": emu_display, "reason": "exclusion_note", + "detail": exclusion_note, + }) + continue # Count standalone-only files standalone_files = [f for f in profile.get("files", []) if f.get("mode") == "standalone"]