fix: accept a longer a5200 bios image

This commit is contained in:
Abdessamad Derraz committed 2026-10-16 06:41:08 +02:00
1 parent 2810b13dac
commit 3766b1dd11
2 files changed
+13 -2

No files matched your search

+2 -2
View File
@@ -35,11 +35,11 @@ systems:
files:
- name: "5200.rom"
path: "5200.rom"
size: 2048
min_size: 2048
required: false
hle_fallback: true
validation: [size]
note: >
Atari 5200 OS ROM. Core option "a5200_bios" controls official vs internal.
Altirra replacement has lower compatibility with some titles.
source_ref: "libretro/libretro.c:58-59, libretro/libretro.c:416-507, emu/memory.c:46"
source_ref: "libretro/libretro.c:58-59, libretro/libretro.c:416-507, libretro/libretro.c:456-468, emu/memory.c:46"
+11
View File
@@ -148,5 +148,16 @@ class AresAtari5200Bios(unittest.TestCase):
)
class A5200Bios(_Probe):
"""The core reads 0x800 bytes and falls back to the Altirra OS on a short
read; bytes past them are never read (libretro/libretro.c:456-468 at
40c6f2f)."""
def test_short_falls_back_and_longer_is_read(self):
self.assertFalse(self.accepts("a5200", "5200.rom", b"\0" * 1024))
self.assertTrue(self.accepts("a5200", "5200.rom", b"\0" * 2048))
self.assertTrue(self.accepts("a5200", "5200.rom", b"\0" * 4096))
if __name__ == "__main__":
unittest.main()