From 17da2ae76fd6e7073fea5e4202c7521ed3e85b1f Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Sat, 8 Aug 2026 13:39:54 +0200 Subject: [PATCH] feat: follow refs to a unique declared value --- emulators/bsnes.yml | 36 ++++++++++++++--------------- emulators/cap32.yml | 6 ++--- emulators/dosbox_pure.yml | 28 +++++++++++------------ emulators/ep128emu.yml | 44 ++++++++++++++++++------------------ emulators/geargrafx.yml | 2 +- emulators/gearlynx.yml | 2 +- emulators/o2em.yml | 12 +++++----- emulators/prboom.yml | 4 ++-- emulators/snes9x2010.yml | 4 ++-- scripts/profile_sync.py | 46 +++++++++++++++++++++++++++++--------- tests/test_profile_sync.py | 34 ++++++++++++++++++++++++++-- 11 files changed, 137 insertions(+), 81 deletions(-) diff --git a/emulators/bsnes.yml b/emulators/bsnes.yml index d03cda9f..1d3065e0 100644 --- a/emulators/bsnes.yml +++ b/emulators/bsnes.yml @@ -36,7 +36,7 @@ files: required: false hle_fallback: true note: "NEC uPD7725 program ROM for DSP1" - source_ref: "sfc/cartridge/load.cpp:490-494, heuristics/super-famicom.cpp:601" + source_ref: "bsnes/sfc/cartridge/load.cpp:490-494, bsnes/heuristics/super-famicom.cpp:601" - name: "dsp1.data.rom" system: nintendo-snes @@ -45,7 +45,7 @@ files: required: false hle_fallback: true note: "NEC uPD7725 data ROM for DSP1" - source_ref: "sfc/cartridge/load.cpp:498-503" + source_ref: "bsnes/sfc/cartridge/load.cpp:498-503" - name: "dsp1b.program.rom" system: nintendo-snes @@ -54,7 +54,7 @@ files: required: false hle_fallback: true note: "NEC uPD7725 program ROM for DSP1B (default NEC identifier)" - source_ref: "heuristics/super-famicom.cpp:606" + source_ref: "bsnes/heuristics/super-famicom.cpp:606" - name: "dsp1b.data.rom" system: nintendo-snes @@ -63,7 +63,7 @@ files: required: false hle_fallback: true note: "NEC uPD7725 data ROM for DSP1B" - source_ref: "heuristics/super-famicom.cpp:606" + source_ref: "bsnes/heuristics/super-famicom.cpp:606" - name: "dsp2.program.rom" system: nintendo-snes @@ -72,7 +72,7 @@ files: required: false hle_fallback: true note: "NEC uPD7725 program ROM for DSP2 (Dungeon Master)" - source_ref: "sfc/cartridge/load.cpp:515-520, heuristics/super-famicom.cpp:602" + source_ref: "bsnes/sfc/cartridge/load.cpp:515-520, bsnes/heuristics/super-famicom.cpp:602" - name: "dsp2.data.rom" system: nintendo-snes @@ -81,7 +81,7 @@ files: required: false hle_fallback: true note: "NEC uPD7725 data ROM for DSP2" - source_ref: "sfc/cartridge/load.cpp:498-503" + source_ref: "bsnes/sfc/cartridge/load.cpp:498-503" - name: "dsp3.program.rom" system: nintendo-snes @@ -89,7 +89,7 @@ files: validation: [size] required: true note: "NEC uPD7725 program ROM for DSP3 (SD Gundam GX). No HLE fallback" - source_ref: "sfc/cartridge/load.cpp:531-534" + source_ref: "bsnes/sfc/cartridge/load.cpp:531-534" - name: "dsp3.data.rom" system: nintendo-snes @@ -97,7 +97,7 @@ files: validation: [size] required: true note: "NEC uPD7725 data ROM for DSP3. No HLE fallback" - source_ref: "sfc/cartridge/load.cpp:531-534" + source_ref: "bsnes/sfc/cartridge/load.cpp:531-534" - name: "dsp4.program.rom" system: nintendo-snes @@ -106,7 +106,7 @@ files: required: false hle_fallback: true note: "NEC uPD7725 program ROM for DSP4 (Top Gear 3000)" - source_ref: "sfc/cartridge/load.cpp:522-528, heuristics/super-famicom.cpp:604-605" + source_ref: "bsnes/sfc/cartridge/load.cpp:522-528, bsnes/heuristics/super-famicom.cpp:604-605" - name: "dsp4.data.rom" system: nintendo-snes @@ -115,7 +115,7 @@ files: required: false hle_fallback: true note: "NEC uPD7725 data ROM for DSP4" - source_ref: "sfc/cartridge/load.cpp:498-503" + source_ref: "bsnes/sfc/cartridge/load.cpp:498-503" # -- NEC uPD96050 coprocessor (ST010, ST011) -- # Used by: Exhaust Heat 2 / F1 ROC II (ST010), 2dan Morita Shougi (ST011) @@ -128,7 +128,7 @@ files: required: false hle_fallback: true note: "NEC uPD96050 program ROM for ST010" - source_ref: "sfc/cartridge/load.cpp:570-574, heuristics/super-famicom.cpp:583-587" + source_ref: "bsnes/sfc/cartridge/load.cpp:570-574, bsnes/heuristics/super-famicom.cpp:583-587" - name: "st010.data.rom" system: nintendo-snes @@ -137,7 +137,7 @@ files: required: false hle_fallback: true note: "NEC uPD96050 data ROM for ST010" - source_ref: "sfc/cartridge/load.cpp:578-583" + source_ref: "bsnes/sfc/cartridge/load.cpp:578-583" - name: "st011.program.rom" system: nintendo-snes @@ -145,7 +145,7 @@ files: validation: [size] required: true note: "NEC uPD96050 program ROM for ST011 (2dan Morita Shougi). No HLE fallback" - source_ref: "sfc/cartridge/load.cpp:599-601, heuristics/super-famicom.cpp:586" + source_ref: "bsnes/sfc/cartridge/load.cpp:599-601, bsnes/heuristics/super-famicom.cpp:586" - name: "st011.data.rom" system: nintendo-snes @@ -153,7 +153,7 @@ files: validation: [size] required: true note: "NEC uPD96050 data ROM for ST011. No HLE fallback" - source_ref: "sfc/cartridge/load.cpp:599-601" + source_ref: "bsnes/sfc/cartridge/load.cpp:599-601" # -- SETA ST018 (ARM6 coprocessor) -- # Used by: Hayazashi Nidan Morita Shougi @@ -165,7 +165,7 @@ files: validation: [size] required: true note: "ARM6 program ROM for ST018 (Hayazashi Nidan Morita Shougi). No HLE fallback" - source_ref: "sfc/cartridge/load.cpp:379-385, armdsp/armdsp.hpp:31, heuristics/super-famicom.cpp:580" + source_ref: "bsnes/sfc/cartridge/load.cpp:379-385, bsnes/sfc/coprocessor/armdsp/armdsp.hpp:31, bsnes/heuristics/super-famicom.cpp:580" - name: "st018.data.rom" system: nintendo-snes @@ -173,7 +173,7 @@ files: validation: [size] required: true note: "ARM6 data ROM for ST018. No HLE fallback" - source_ref: "sfc/cartridge/load.cpp:387-393, armdsp/armdsp.hpp:32" + source_ref: "bsnes/sfc/cartridge/load.cpp:387-393, bsnes/sfc/coprocessor/armdsp/armdsp.hpp:32" # -- Hitachi HG51BS169 (Cx4 coprocessor) -- # Used by: Mega Man X2, Mega Man X3 @@ -190,7 +190,7 @@ files: required: false hle_fallback: true note: "Hitachi HG51BS169 data ROM for Cx4 (Mega Man X2/X3). HLE fallback and built-in static ROM available" - source_ref: "sfc/cartridge/load.cpp:444-456, hitachidsp/hitachidsp.hpp:49, heuristics/super-famicom.cpp:597, hitachidsp/data-rom.cpp:3 (staticDataROM[3072])" + source_ref: "bsnes/sfc/cartridge/load.cpp:444-456, bsnes/sfc/coprocessor/hitachidsp/hitachidsp.hpp:49, bsnes/heuristics/super-famicom.cpp:597, bsnes/sfc/coprocessor/hitachidsp/data-rom.cpp:3 (staticDataROM[3072])" # -- Super Game Boy cartridge ROM -- # The SGB boot ROMs (256 bytes each) are embedded in icd/boot-roms.cpp. @@ -217,7 +217,7 @@ files: system: nintendo-satellaview required: true note: "BS-X Satellaview BIOS ROM, loaded from system_dir when running .bs games" - source_ref: "target-libretro/libretro.cpp:944-951 (system_dir + BS-X.bin hardcoded, .bs extension branch)" + source_ref: "bsnes/target-libretro/libretro.cpp:944-951 (system_dir + BS-X.bin hardcoded, .bs extension branch)" notes: hle_available: true diff --git a/emulators/cap32.yml b/emulators/cap32.yml index a718dcca..5868d6dc 100644 --- a/emulators/cap32.yml +++ b/emulators/cap32.yml @@ -55,7 +55,7 @@ files: mode: standalone size: 32768 note: "CPC 464 OS + BASIC 1.0" - source_ref: "src/cap32.cpp:213, rom/cpc464.rom" + source_ref: "src/cap32.cpp:214, rom/cpc464.rom" - name: cpc664.rom system: amstrad-cpc required: false @@ -76,7 +76,7 @@ files: mode: standalone size: 16384 note: "AMSDOS disc ROM (sideways slot 7)" - source_ref: "src/cap32.cpp:1190" + source_ref: "src/cap32.cpp:1202" - name: system.cpr system: amstrad-cpc required: false @@ -90,7 +90,7 @@ files: mode: standalone size: 8192 note: "Multiface 2 ROM" - source_ref: "caprice32/rom/MF2.rom, src/cap32.cpp:1268-1287" + source_ref: "caprice32/rom/MF2.rom, src/cap32.cpp:1280-1299" platform_details: bios_mapping: diff --git a/emulators/dosbox_pure.yml b/emulators/dosbox_pure.yml index 40a788c2..8812d033 100644 --- a/emulators/dosbox_pure.yml +++ b/emulators/dosbox_pure.yml @@ -48,7 +48,7 @@ files: size: 65536 sha1: "5a5cb5a77d7d55ee69657c2f870416daed52dea7" validation: [sha1, size] - source_ref: "mt32emu.h:5112, mt32emu.h:5129" + source_ref: "src/gui/mt32emu.h:5112, src/gui/mt32emu.h:5129" - name: "MT32_CONTROL.ROM" description: "MT-32 Control v1.05" @@ -57,7 +57,7 @@ files: size: 65536 sha1: "e17a3a6d265bf1fa150312061134293d2b58288c" validation: [sha1, size] - source_ref: "mt32emu.h:5113, mt32emu.h:5130" + source_ref: "src/gui/mt32emu.h:5113, src/gui/mt32emu.h:5130" - name: "MT32_CONTROL.ROM" description: "MT-32 Control v1.06" @@ -66,7 +66,7 @@ files: size: 65536 sha1: "a553481f4e2794c10cfe597fef154eef0d8257de" validation: [sha1, size] - source_ref: "mt32emu.h:5114, mt32emu.h:5131" + source_ref: "src/gui/mt32emu.h:5114, src/gui/mt32emu.h:5131" - name: "MT32_CONTROL.ROM" description: "MT-32 Control v1.07" @@ -75,7 +75,7 @@ files: size: 65536 sha1: "b083518fffb7f66b03c23b7eb4f868e62dc5a987" validation: [sha1, size] - source_ref: "mt32emu.h:5115, mt32emu.h:5132" + source_ref: "src/gui/mt32emu.h:5115, src/gui/mt32emu.h:5132" - name: "MT32_CONTROL.ROM" description: "MT-32 Control BlueRidge" @@ -84,7 +84,7 @@ files: size: 65536 sha1: "7b8c2a5ddb42fd0732e2f22b3340dcf5360edf92" validation: [sha1, size] - source_ref: "mt32emu.h:5116, mt32emu.h:5133" + source_ref: "src/gui/mt32emu.h:5116, src/gui/mt32emu.h:5133" # -- MT-32 v2.x Control ROMs (128 KB) -- @@ -95,7 +95,7 @@ files: size: 131072 sha1: "5837064c9df4741a55f7c4d8787ac158dff2d3ce" validation: [sha1, size] - source_ref: "mt32emu.h:5118, mt32emu.h:5135" + source_ref: "src/gui/mt32emu.h:5118, src/gui/mt32emu.h:5135" - name: "MT32_CONTROL.ROM" description: "MT-32 Control v2.04" @@ -104,7 +104,7 @@ files: size: 131072 sha1: "2c16432b6c73dd2a3947cba950a0f4c19d6180eb" validation: [sha1, size] - source_ref: "mt32emu.h:5119, mt32emu.h:5136" + source_ref: "src/gui/mt32emu.h:5119, src/gui/mt32emu.h:5136" - name: "MT32_CONTROL.ROM" description: "MT-32 Control v2.06" @@ -113,7 +113,7 @@ files: size: 131072 sha1: "2869cf4c235d671668cfcb62415e2ce8323ad4ed" validation: [sha1, size] - source_ref: "mt32emu.h:5120, mt32emu.h:5137" + source_ref: "src/gui/mt32emu.h:5120, src/gui/mt32emu.h:5137" - name: "MT32_CONTROL.ROM" description: "MT-32 Control v2.07" @@ -122,7 +122,7 @@ files: size: 131072 sha1: "47b52adefedaec475c925e54340e37673c11707c" validation: [sha1, size] - source_ref: "mt32emu.h:5121, mt32emu.h:5138" + source_ref: "src/gui/mt32emu.h:5121, src/gui/mt32emu.h:5138" # -- CM-32L / LAPC-I Control ROMs (64 KB) -- @@ -133,7 +133,7 @@ files: size: 65536 sha1: "73683d585cd6948cc19547942ca0e14a0319456d" validation: [sha1, size] - source_ref: "mt32emu.h:5122, mt32emu.h:5139" + source_ref: "src/gui/mt32emu.h:5122, src/gui/mt32emu.h:5139" - name: "CM32L_CONTROL.ROM" description: "CM-32L/LAPC-I Control v1.02" @@ -142,7 +142,7 @@ files: size: 65536 sha1: "a439fbb390da38cada95a7cbb1d6ca199cd66ef8" validation: [sha1, size] - source_ref: "mt32emu.h:5123, mt32emu.h:5140" + source_ref: "src/gui/mt32emu.h:5123, src/gui/mt32emu.h:5140" # -- CM-32LN / CM-500 / LAPC-N Control ROM (64 KB) -- @@ -153,7 +153,7 @@ files: size: 65536 sha1: "dc1c5b1b90a4646d00f7daf3679733c7badc7077" validation: [sha1, size] - source_ref: "mt32emu.h:5124, mt32emu.h:5141" + source_ref: "src/gui/mt32emu.h:5124, src/gui/mt32emu.h:5141" # -- PCM ROMs -- @@ -164,7 +164,7 @@ files: size: 524288 sha1: "f6b1eebc4b2d200ec6d3d21d51325d5b48c60252" validation: [sha1, size] - source_ref: "mt32emu.h:5126, mt32emu.h:5143" + source_ref: "src/gui/mt32emu.h:5126, src/gui/mt32emu.h:5143" note: > accepted by every MT-32 control ROM, v1.x and v2.x. Each control ROM fixes the PCM size it accepts through its pcmCount: 128 requires this @@ -178,7 +178,7 @@ files: sha1: "289cc298ad532b702461bfc738009d9ebe8025ea" validation: [sha1, size] aliases: ["CM32LN_PCM.ROM"] - source_ref: "mt32emu.h:5127, mt32emu.h:5144" + source_ref: "src/gui/mt32emu.h:5127, src/gui/mt32emu.h:5144" note: > accepted by the CM-32L and CM-32LN control ROMs, which carry pcmCount 256 and require this 1048576 byte image. The alias covers the name diff --git a/emulators/ep128emu.yml b/emulators/ep128emu.yml index 1aed0bbd..fd2fd1b9 100644 --- a/emulators/ep128emu.yml +++ b/emulators/ep128emu.yml @@ -2,7 +2,7 @@ emulator: ep128emu-core type: libretro source: "https://github.com/libretro/ep128emu-core" profiled_date: "2026-03-18" -source_commit: "52f1d521db460953fd0c28fb5a944dd725eb9974" +source_commit: "6af5d03de220e6effcd0ffcd99e0fb8e8c77cc9e" core_version: "v1.2.10" display_name: "Enterprise - 64/128 (ep128emu)" cores: @@ -74,7 +74,7 @@ files: system: enterprise-128 has_builtin: true note: "Enterprise 128 EXOS 2.1. Default OS for EP128 machines." - source_ref: "core/core.cpp:236-239" + source_ref: "core/core.cpp:237-240" - name: exos20.rom path: ep128emu/roms/exos20.rom @@ -84,7 +84,7 @@ files: system: enterprise-64 has_builtin: true note: "Enterprise 64 EXOS 2.0. Used when EP64 machine type is selected." - source_ref: "core/core.cpp:228-231" + source_ref: "core/core.cpp:229-232" - name: exos24uk.rom path: ep128emu/roms/exos24uk.rom @@ -94,7 +94,7 @@ files: system: enterprise-128 has_builtin: true note: "Enterprise 128 EXOS 2.4 (UK). Used when enhanced ROM mode is enabled. 64K, loaded across segments 0-3." - source_ref: "core/core.cpp:216-223" + source_ref: "core/core.cpp:217-224" # ============================================================ # Enterprise 64/128 - BASIC interpreter @@ -108,7 +108,7 @@ files: system: enterprise-128 has_builtin: true note: "Enterprise 128 BASIC 2.1. Loaded when cartridge mode is active (default)." - source_ref: "core/core.cpp:250, core/core.cpp:278" + source_ref: "core/core.cpp:251, core/core.cpp:279" - name: basic20.rom path: ep128emu/roms/basic20.rom @@ -118,7 +118,7 @@ files: system: enterprise-64 has_builtin: true note: "Enterprise 64 BASIC 2.0. Used with EP64 machine type." - source_ref: "core/core.cpp:248, core/core.cpp:266, core/core.cpp:276" + source_ref: "core/core.cpp:249, core/core.cpp:267, core/core.cpp:277" # ============================================================ # Enterprise 64/128 - disk controllers @@ -132,7 +132,7 @@ files: system: enterprise-128 has_builtin: true note: "EXDOS 1.3 disk controller. Loaded for EP128_DISK and EP64_DISK modes. 32K across segments 0x20-0x21." - source_ref: "core/core.cpp:305-308" + source_ref: "core/core.cpp:306-323" - name: exdos14isdos10uk.rom path: ep128emu/roms/exdos14isdos10uk.rom @@ -143,7 +143,7 @@ files: has_builtin: true size: 32768 note: "EXDOS 1.4 + IS-DOS 1.0 (UK). Used for IS-DOS disk mode instead of exdos13.rom." - source_ref: "core/core.cpp:254, roms/roms.hpp:30104 (built-in data, MD5 verified)" + source_ref: "core/core.cpp:255, roms/roms.hpp:30104 (built-in data, MD5 verified)" # ============================================================ # Enterprise 64/128 - file I/O and extensions @@ -158,7 +158,7 @@ files: has_builtin: true bundled: true note: "Direct file I/O extension. Loaded for EP128_FILE and EP64_FILE modes. Source included in roms/ directory." - source_ref: "core/core.cpp:285-286" + source_ref: "core/core.cpp:286-287" - name: zt19uk.rom path: ep128emu/roms/zt19uk.rom @@ -168,7 +168,7 @@ files: system: enterprise-128 has_builtin: true note: "ZozoTools 1.9 (UK). Loaded for DTF (direct tape file) mode. 32K across segments 0x40-0x41." - source_ref: "core/core.cpp:289-292" + source_ref: "core/core.cpp:290-293" # ============================================================ # Enterprise 64/128 - locale extensions @@ -182,7 +182,7 @@ files: system: enterprise-128 has_builtin: true note: "Hungarian language extension. Auto-loaded when content locale is Hungarian." - source_ref: "core/core.cpp:244-245" + source_ref: "core/core.cpp:245-246" - name: epdos16f.rom path: ep128emu/roms/epdos16f.rom @@ -193,7 +193,7 @@ files: has_builtin: true size: 32768 note: "EP-DOS 1.6f. Provides HFONT and CLKOFF for Hungarian locale. 32K across segments 0x06-0x07." - source_ref: "core/core.cpp:237-238, roms/roms.hpp:43780 (built-in data, MD5 verified)" + source_ref: "core/core.cpp:238-239, roms/roms.hpp:43780 (built-in data, MD5 verified)" - name: brd.rom path: ep128emu/roms/brd.rom @@ -203,7 +203,7 @@ files: system: enterprise-128 has_builtin: true note: "German (BRD) language extension. Auto-loaded when content locale is German." - source_ref: "core/core.cpp:262-263" + source_ref: "core/core.cpp:263-264" # epd19hft.rom and zt19hfnt.rom: listed in .info (firmware8, firmware9) but # NOT referenced in core source code and NOT in builtin_rom map (roms.hpp:46516-46538). @@ -231,7 +231,7 @@ files: system: videoton-tvc has_builtin: true note: "TVC extension ROM v2.2. Loaded alongside tvc22_sys.rom." - source_ref: "core/core.cpp:348-349" + source_ref: "core/core.cpp:366-367" - name: tvcfileio.rom path: ep128emu/roms/tvcfileio.rom @@ -242,7 +242,7 @@ files: has_builtin: true bundled: true note: "TVC direct file I/O extension. Used for TVC64_FILE mode. Source included in roms/ directory." - source_ref: "core/core.cpp:352-353" + source_ref: "core/core.cpp:370-371" - name: tvc_dos12d.rom path: ep128emu/roms/tvc_dos12d.rom @@ -252,7 +252,7 @@ files: system: videoton-tvc has_builtin: true note: "TVC DOS 1.2d. Loaded for TVC64_DISK mode." - source_ref: "core/core.cpp:357-358" + source_ref: "core/core.cpp:375-376" # ============================================================ # Amstrad CPC @@ -266,7 +266,7 @@ files: system: amstrad-cpc has_builtin: true note: "CPC 464 combined ROM (OS + BASIC). 32K loaded at segments 0x10 (OS) and 0x00 (BASIC) with offset." - source_ref: "core/core.cpp:371-374" + source_ref: "core/core.cpp:389-392" - name: cpc664.rom path: ep128emu/roms/cpc664.rom @@ -276,7 +276,7 @@ files: system: amstrad-cpc has_builtin: true note: "CPC 664 combined ROM (OS + BASIC). Used for CPC_664_DISK mode." - source_ref: "core/core.cpp:379-382" + source_ref: "core/core.cpp:397-400" - name: cpc6128.rom path: ep128emu/roms/cpc6128.rom @@ -286,7 +286,7 @@ files: system: amstrad-cpc has_builtin: true note: "CPC 6128 combined ROM (OS + BASIC). Default CPC machine when no specific model requested." - source_ref: "core/core.cpp:388-391" + source_ref: "core/core.cpp:406-409" - name: cpc_amsdos.rom path: ep128emu/roms/cpc_amsdos.rom @@ -296,7 +296,7 @@ files: system: amstrad-cpc has_builtin: true note: "AMSDOS disk controller ROM. Loaded for CPC_DISK and CPC_664_DISK modes." - source_ref: "core/core.cpp:395-396" + source_ref: "core/core.cpp:413-414" # ============================================================ # ZX Spectrum @@ -310,7 +310,7 @@ files: system: zx-spectrum has_builtin: true note: "ZX Spectrum 128K ROM. 32K loaded at segments 0x00-0x01." - source_ref: "core/core.cpp:418-421" + source_ref: "core/core.cpp:436-439" - name: zx48.rom path: ep128emu/roms/zx48.rom @@ -320,4 +320,4 @@ files: system: zx-spectrum has_builtin: true note: "ZX Spectrum 48K ROM. Used for ZX16 and ZX48 modes." - source_ref: "core/core.cpp:425-426" + source_ref: "core/core.cpp:443-444" diff --git a/emulators/geargrafx.yml b/emulators/geargrafx.yml index 872a5f92..e522b275 100644 --- a/emulators/geargrafx.yml +++ b/emulators/geargrafx.yml @@ -73,7 +73,7 @@ files: size: 32768 required: false validation: [size, crc32] - source_ref: "platforms/libretro/libretro.cpp:582, platforms/libretro/libretro.cpp:596-597, libretro.cpp:481-482, src/media.cpp:339-436, src/defines.h:53, src/game_db.h:53-54" + source_ref: "platforms/libretro/libretro.cpp:582, platforms/libretro/libretro.cpp:596-597, platforms/libretro/libretro.cpp:481-482, src/media.cpp:339-436, src/defines.h:53, src/game_db.h:53-54" note: > Always loaded alongside the selected System Card BIOS (libretro.cpp:481). Required for Game Express CD-ROM titles. game_db.h recognizes Blue Version diff --git a/emulators/gearlynx.yml b/emulators/gearlynx.yml index 197a548b..e7557467 100644 --- a/emulators/gearlynx.yml +++ b/emulators/gearlynx.yml @@ -44,5 +44,5 @@ files: md5: "fcd403db69f54290b51035d82f835e7b" crc32: "0d973c9d" validation: [size, crc32] - source_ref: "platforms/libretro/libretro.cpp:160-202 (load_bootroms), src/media.cpp:504-546 (LoadBios), defines.h:52 (GLYNX_BIOS_SIZE=0x200), game_db.h:38 (GLYNX_DB_BIOS_CRC=0x0D973C9D), gearlynx_core_inline.h:33-37 (no-bios guard)" + source_ref: "platforms/libretro/libretro.cpp:160-202 (load_bootroms), src/media.cpp:504-546 (LoadBios), src/defines.h:52 (GLYNX_BIOS_SIZE=0x200), src/game_db.h:38 (GLYNX_DB_BIOS_CRC=0x0D973C9D), src/gearlynx_core_inline.h:33-37 (no-bios guard)" note: "512-byte boot ROM validated by CRC32 after load. Invalid CRC logs a warning but still works. Missing or wrong-size file blocks emulation entirely (no HLE fallback)." diff --git a/emulators/o2em.yml b/emulators/o2em.yml index c2638530..fc2b0fdd 100644 --- a/emulators/o2em.yml +++ b/emulators/o2em.yml @@ -6,7 +6,7 @@ cores: [o2em_libretro] source: "https://github.com/libretro/libretro-o2em" upstream: "https://sourceforge.net/projects/o2em/" profiled_date: "2026-03-24" -source_commit: "3ba4231c1dc8dcdf487428712856b790d2e4b8f3" +source_commit: "679d6fec04963f6e70a7ec217e3d0ebb1fe472fc" core_version: "1.18" display_name: "Magnavox - Odyssey2 / Philips Videopac+ (O2EM)" systems: @@ -42,7 +42,7 @@ files: crc32: "8016a315" validation: [size, crc32] note: "Odyssey2 BIOS (G7000 NTSC). Default, vpp=0." - source_ref: "libretro.c:216-220" + source_ref: "libretro.c:233-237" - name: "c52.bin" system: videopac @@ -54,7 +54,7 @@ files: crc32: "a318e8d6" validation: [size, crc32] note: "Videopac G7000 European BIOS. vpp=0, auto-sets PAL." - source_ref: "libretro.c:226-231" + source_ref: "libretro.c:243-248" - name: "g7400.bin" system: videopac @@ -66,7 +66,7 @@ files: crc32: "e20a9f41" validation: [size, crc32] note: "Videopac+ G7400 European BIOS. vpp=1." - source_ref: "libretro.c:221-225" + source_ref: "libretro.c:238-242" - name: "jopac.bin" system: videopac @@ -78,10 +78,10 @@ files: crc32: "11647ca5" validation: [size, crc32] note: "Videopac+ G7400 French BIOS (JoPac). vpp=1." - source_ref: "libretro.c:232-237" + source_ref: "libretro.c:249-254" - name: "voice/" required: false category: game_data note: "The Voice speech synthesis WAV samples. 9 banks (E4, E8-EF) × 128 samples." - source_ref: "voice.c:38-79, libretro.c:1095-1102" + source_ref: "src/voice.c:38-90, libretro.c:1130-1137" diff --git a/emulators/prboom.yml b/emulators/prboom.yml index bbb55032..5b4b2411 100644 --- a/emulators/prboom.yml +++ b/emulators/prboom.yml @@ -4,7 +4,7 @@ core_classification: game_engine source: "https://github.com/libretro/libretro-prboom" upstream: "http://prboom.sourceforge.net/" profiled_date: "2026-03-24" -source_commit: "93c8e7a2074e4fd8410398e3d571c6d9afec1d84" +source_commit: "b4046cef3641d6bb28c0394915bfcc732cc49652" core_version: "v2.5.0" display_name: "Doom (PrBoom)" cores: [prboom] @@ -51,5 +51,5 @@ files: md5: "72ae1b47820fcc93cc0df9c428d0face" sha1: "5f4aed208301449c2e9514edfd325fe9dead76fa" crc32: "a5751b99" - source_ref: "d_main.c:1069-1078 (PACKAGE .wad load), libretro.c:1742-1784 (I_FindFile search), config.h:46 (PACKAGE=prboom)" + source_ref: "src/d_main.c:1402-1440 (PACKAGE .wad load), libretro/libretro.c:3974-4050 (I_FindFile search), src/config.h:39 (PACKAGE=prboom)" note: "Searched in system/prboom/ then system/. Falls back to internal defaults if missing, but menus and HUD may render incorrectly without it." diff --git a/emulators/snes9x2010.yml b/emulators/snes9x2010.yml index 9abae281..89c3cf3e 100644 --- a/emulators/snes9x2010.yml +++ b/emulators/snes9x2010.yml @@ -4,7 +4,7 @@ core_classification: frozen_snapshot source: "https://github.com/libretro/snes9x2010" upstream: "https://github.com/snes9xgit/snes9x" profiled_date: "2026-03-25" -source_commit: "f9ae8fd28b13070a945a829ccf41cbf90a21d0f7" +source_commit: "214cb51f22ddec66952c304fe1e5e01fd83a9ac6" core_version: "v1.52.4" display_name: "Nintendo - SNES / SFC (Snes9x 2010)" cores: @@ -34,7 +34,7 @@ files: size: 1048576 validation: [size] aliases: ["BS-X.bios"] - source_ref: "src/bsx.c:959-993 (BSX_LoadBIOS), src/bsx.c:1068 (caller in S9xInitBSX)" + source_ref: "src/bsx.c:1263-1295 (BSX_LoadBIOS), src/bsx.c:1317 (caller in S9xInitBSX)" note: | Loaded when a BS game is auto-detected (is_bsx checks ROM header at 0x7FC0/0xFFC0). Without this file, BSX.bootup is set to FALSE and diff --git a/scripts/profile_sync.py b/scripts/profile_sync.py index d8a70667..321228cd 100644 --- a/scripts/profile_sync.py +++ b/scripts/profile_sync.py @@ -379,6 +379,36 @@ def _narrow(matches: list[str], path: str) -> list[str]: return same if len(same) == 1 else matches +def locate_by_declared_value( + head_lines: list[str], anchored: AnchorResult, tokens +) -> tuple[int, int, str] | None: + """Follow a ref whose subject can still be pinpointed at HEAD. + + Two cases carry enough evidence to move a ref without judging the edit + itself: the mapped range already contains the declared value, or the value + occurs exactly once in the whole file. A value occurring several times is + left alone, since nothing says which one the ref meant. + """ + lowered = [line.lower() for line in head_lines] + if anchored.start is not None: + end = anchored.end or anchored.start + block = "\n".join(lowered[anchored.start - 1 : end]) + if any(token in block for token in tokens): + return ( + anchored.start, + end, + "content edited, declared value present in the new range", + ) + hits = [ + i + 1 + for i, line in enumerate(lowered) + if any(token in line for token in tokens) + ] + if len(hits) == 1: + return hits[0], hits[0], "declared value occurs once at HEAD" + return None + + def anchor_part( part: RefPart, fetch, rename_getter, describe=None, tokens=() ) -> PartResult: @@ -463,16 +493,12 @@ def anchor_part( anchored = retry note = f"cited line was {nudged[0] - part.start:+d} off its subject" status = anchored.status - if status == "CHANGED" and anchored.start is not None and tokens: - # The cited code changed, but the value the entry declares is provably - # inside the new range, so the ref can follow it without a judgement - # call on the edit itself. - block = "\n".join( - head_lines[anchored.start - 1 : (anchored.end or anchored.start)] - ).lower() - if any(token in block for token in tokens): - status = "MOVED" - note = "content edited, declared value present in the new range" + if status in ("CHANGED", "GONE") and tokens: + located = locate_by_declared_value(head_lines, anchored, tokens) + if located is not None: + start, end, why = located + anchored = AnchorResult("MOVED", start, end, []) + status, note = "MOVED", why if renamed and status in ("ANCHORED", "SHIFTED"): status = "RENAMED" return PartResult( diff --git a/tests/test_profile_sync.py b/tests/test_profile_sync.py index db64e7f7..e13302a7 100644 --- a/tests/test_profile_sync.py +++ b/tests/test_profile_sync.py @@ -646,8 +646,8 @@ class TestMovedStatus(unittest.TestCase): def test_declared_value_inside_the_new_range_gives_moved(self): fetch = make_fetch({ - (PIN, "a.c"): ["x", 'load("bios.bin", 0x1000)'], - (HEAD, "a.c"): ["pad", "pad", 'load("bios.bin", 0x2000, flags)'], + (PIN, "a.c"): ["ctx", 'load("bios.bin", 0x1000)', "tail"], + (HEAD, "a.c"): ["pad", "ctx", 'load("bios.bin", 0x2000, flags)', "tail"], }) result = anchor_part( RefPart("a.c", 2, 2, "a.c:2"), @@ -674,6 +674,36 @@ class TestMovedStatus(unittest.TestCase): ) self.assertEqual(result.status, "CHANGED") + def test_a_unique_occurrence_at_head_is_followed(self): + fetch = make_fetch({ + (PIN, "a.c"): ["unique marker"], + (HEAD, "a.c"): ["x"] * 40 + ['load("bios.bin")'] + ["y"] * 40, + }) + result = anchor_part( + RefPart("a.c", 1, 1, "a.c:1"), + fetch, + renamer(CompareResult([], False)), + None, + ["bios.bin"], + ) + self.assertEqual(result.status, "MOVED") + self.assertEqual(result.start, 41) + self.assertIn("occurs once", result.reason) + + def test_several_occurrences_are_left_alone(self): + fetch = make_fetch({ + (PIN, "a.c"): ["unique marker"], + (HEAD, "a.c"): ['load("bios.bin")', 'reload("bios.bin")'], + }) + result = anchor_part( + RefPart("a.c", 1, 1, "a.c:1"), + fetch, + renamer(CompareResult([], False)), + None, + ["bios.bin"], + ) + self.assertEqual(result.status, "GONE") + def test_moved_is_mechanically_recalable(self): self.assertIn("MOVED", profile_sync.REBASE_STATUSES) self.assertNotIn("MOVED", profile_sync.REVIEW_STATUSES)