diff --git a/emulators/a5200.yml b/emulators/a5200.yml index 015f839a..a4de1b28 100644 --- a/emulators/a5200.yml +++ b/emulators/a5200.yml @@ -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" diff --git a/tests/test_profile_checks.py b/tests/test_profile_checks.py index b38c0ce4..46b0c18d 100644 --- a/tests/test_profile_checks.py +++ b/tests/test_profile_checks.py @@ -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()