fix: warn on an unknown nestopia fds bios

This commit is contained in:
Abdessamad Derraz committed 2026-10-16 07:03:28 +02:00
1 parent 7301c8605c
commit 6289c7ebf0
2 files changed
+13 -1

No files matched your search

+3 -1
View File
@@ -40,10 +40,12 @@ files:
description: "FDS BIOS ROM"
required: true
size: 8192
crc32: ["5e607dcf", "4df24a6c"]
validation: [crc32]
on_mismatch: warn
md5: "ca30b50f880eb660a320674ed365ef7a"
sha1: "57fe1bdee955bb48d357e463ccbf129496930b62"
source_ref: "libretro/libretro.cpp:2169-2197 (FDS load), source/core/NstFds.cpp:57-127 (Bios class, CRC32 validation)"
source_ref: "libretro/libretro.cpp:2169-2197 (FDS load), source/core/NstFds.cpp:57-127 (Bios class, CRC32 logged), source/core/api/NstApiFds.cpp:101-150 (iNES header skipped)"
note: "Mapped at 0xE000-0xFFFF (8 KB). retro_load_game returns false if missing when loading .fds files. CRC32 checked: Famicom 0x5E607DCF, Twin Famicom 0x4DF24A6C."
# --- NES game database (optional, overrides baked-in copy) ---
+10
View File
@@ -291,5 +291,15 @@ class MgbaGameBoyBootRoms(_Probe):
self.assertFalse(self.accepts("mgba", name, b"\0" * size))
class NestopiaFdsBios(_Probe):
"""Fds::Bios logs "warning, unknown BIOS ROM!" for a CRC32 other than the
Famicom and Twin Famicom ones and uses the ROM (source/core/NstFds.cpp
57-127 at b9fdc9c). The profile declared the check with no value."""
def test_an_unknown_bios_only_warns(self):
self.assertTrue(self.accepts("nestopia", "disksys.rom", b"\0" * 8192))
self.assertFalse(self.accepts("nestopia", "disksys.rom", b"\0" * 8192, strict=True))
if __name__ == "__main__":
unittest.main()