From b8049f757bc2d7d8ceaa4cdd51972c836c43df05 Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Fri, 16 Oct 2026 06:46:56 +0200 Subject: [PATCH] fix: drop archive checks mame forks never run --- emulators/a7800.yml | 3 --- emulators/cdi2015.yml | 1 - emulators/mame.yml | 4 ---- tests/test_profile_checks.py | 25 ++++++++++++++++++++++--- 4 files changed, 22 insertions(+), 11 deletions(-) diff --git a/emulators/a7800.yml b/emulators/a7800.yml index 4971417f..ceb0bf9d 100644 --- a/emulators/a7800.yml +++ b/emulators/a7800.yml @@ -67,7 +67,6 @@ files: Merged console BIOS archive documented by the manual at bios/a7800.zip. Serves all eight machines through the parent chain, since the PAL machines are clones of a7800 rather than of a7800p. - validation: [size, crc32, sha1] contents: - name: 7800.u7 description: NTSC BIOS, default system BIOS "a7800", mapped at 0x3000 @@ -94,7 +93,6 @@ files: Software list set for the High Score Cartridge configuration (CX78HSC, slot a78_hsc). Fatal when that configuration is selected and the set is absent. - validation: [size, crc32, sha1] contents: - name: highscre.bin description: High Score Cartridge ROM, read through the pass-through cart @@ -112,7 +110,6 @@ files: a78_xm), which reuses the High Score Cartridge ROM alongside 128KB RAM, POKEY and YM2151. Fatal when that configuration is selected and the set is absent. - validation: [size, crc32, sha1] contents: - name: highscre.bin description: High Score Cartridge ROM, gated by XM control register bit 3 diff --git a/emulators/cdi2015.yml b/emulators/cdi2015.yml index cd9818a0..a05e97ba 100644 --- a/emulators/cdi2015.yml +++ b/emulators/cdi2015.yml @@ -22,7 +22,6 @@ files: required: true category: bios_zip source_ref: "src/osd/retro/retromain.c:1989, src/mame/drivers/cdi.c:421" - validation: [crc32, sha1] contents: - name: cdi200.rom description: Magnavox CD-i 200 BIOS (default) diff --git a/emulators/mame.yml b/emulators/mame.yml index 34fed7fc..eba742f6 100644 --- a/emulators/mame.yml +++ b/emulators/mame.yml @@ -3709,7 +3709,6 @@ files: system: vtech-vsmile source_ref: "src/mame/vtech/vsmile.cpp:364-394" note: "MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS. Clone: vsmilem (V.Smile Motion)." - validation: [crc32] contents: - name: "vsmile_v103.bin" description: "System ROM v1.03 (default, also used on V.Smile Pocket)" @@ -4340,7 +4339,6 @@ files: note: >- QSound DSP program ROM. Required by qsound_device and qsound_hle_device for Capcom QSound audio (CPS-2, CPS-3, ZN). - validation: [crc32] contents: - name: "dl-1425.bin" description: "QSound DSP microcode" @@ -4354,7 +4352,6 @@ files: note: >- YM2413 (OPLL) instrument ROM table. Required by ym2413_device for FM synthesis preset instruments. - validation: [crc32] contents: - name: "ym2413_instruments.bin" description: "OPLL preset instrument table" @@ -4369,7 +4366,6 @@ files: YM2608 (OPNA) ADPCM rhythm sample ROM. Required by ym2608_device for internal rhythm sound source (bass drum, snare, cymbal, hi-hat, tom, rim shot). - validation: [crc32] contents: - name: "ym2608_adpcm_rom.bin" description: "OPNA ADPCM rhythm samples" diff --git a/tests/test_profile_checks.py b/tests/test_profile_checks.py index 2cff83b3..767da315 100644 --- a/tests/test_profile_checks.py +++ b/tests/test_profile_checks.py @@ -197,12 +197,31 @@ class AdvanceMameArchives(_Probe): archive values.""" def test_no_archive_level_check(self): - for entry in _profile("advancemame")["files"]: - if entry.get("category") == "bios_zip": - with self.subTest(name=entry["name"]): + # a7800's MAME warns the same way (src/emu/romload.cpp:427-452 at 7a2afdc). + for emulator in ("advancemame", "a7800"): + for entry in _profile(emulator)["files"]: + if entry.get("category") != "bios_zip": + continue + with self.subTest(emulator=emulator, name=entry["name"]): self.assertFalse(entry.get("validation")) self.assertTrue(entry.get("contents")) +class MameMemberChecksOnlyWarn(unittest.TestCase): + """libretro MAME and mame2015 warn on a member's wrong length or checksums + and run (src/emu/romload.cpp:602-625 at 9069f39, src/emu/romload.c:501-519 + at 7adbf44); an archive-level check with no archive value ran nothing.""" + + def test_no_valueless_archive_check(self): + for emulator, names in ( + ("mame", ("vsmile.zip", "qsound.zip", "ym2413.zip", "ym2608.zip")), + ("cdi2015", ("cdimono1.zip",)), + ): + entries = {f["name"]: f for f in _profile(emulator)["files"]} + for name in names: + with self.subTest(emulator=emulator, name=name): + self.assertFalse(entries[name].get("validation")) + + if __name__ == "__main__": unittest.main()