fix: check the beetle lynx boot rom size

This commit is contained in:
Abdessamad Derraz committed 2026-10-16 06:35:06 +02:00
1 parent 5d0b36a3a7
commit 0d78a9e074
2 files changed
+13 -1

No files matched your search

+2 -1
View File
@@ -30,7 +30,8 @@ files:
description: "Atari Lynx boot ROM"
region: [world]
required: true
size: 512
min_size: 512
validation: [size]
crc32: "0d973c9d"
source_ref: "libretro.cpp:191, mednafen/lynx/rom.cpp:50-78, mednafen/lynx/cart.cpp:67"
note: "512-byte boot ROM. Core silently degrades without it but games will not run."
+11
View File
@@ -88,5 +88,16 @@ class BeebEmSidewaysRoms(_Probe):
self.assertFalse(self.accepts("beebem", "BASIC2.rom", b"\0" * 200000))
class BeetleLynxBootRom(_Probe):
"""CRom drops a boot ROM under 512 bytes and keeps the 0x88 fill, so no
game boots; a longer one is read for its first 512 bytes
(mednafen/lynx/rom.cpp:61-75 at fcdefcf)."""
def test_short_is_refused_and_longer_is_read(self):
self.assertFalse(self.accepts("beetle_lynx", "lynxboot.img", b"\0" * 256))
self.assertTrue(self.accepts("beetle_lynx", "lynxboot.img", b"\0" * 512))
self.assertTrue(self.accepts("beetle_lynx", "lynxboot.img", b"\0" * 1024))
if __name__ == "__main__":
unittest.main()