mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-16 08:23:28 -05:00
fix: check gambatte boot roms from the shipped core
This commit is contained in:
1 parent
e100e50095
commit
b92189e393
2 files changed
+19
-6
No files matched your search
@@ -40,9 +40,9 @@ files:
|
||||
description: "Original Game Boy (DMG-01) boot ROM"
|
||||
required: false
|
||||
hle_fallback: true
|
||||
size: 256
|
||||
validation: {core: [size], upstream: [size, crc32]}
|
||||
source_ref: "libgambatte/libretro/libretro.cpp:1303-1363 (get_bootloader_from_file), libgambatte/src/bootloader.cpp:20-55 (load)"
|
||||
min_size: 256
|
||||
validation: [size]
|
||||
source_ref: "libgambatte/libretro/libretro.cpp:1426-1486 (get_bootloader_from_file), libgambatte/libretro/libretro.cpp:1734-1742, libgambatte/src/bootloader.cpp:30-65 (load)"
|
||||
note: "Mapped at 0x0000-0x00FF, swapped out when register 0xFF50 is written."
|
||||
|
||||
- name: "gbc_bios.bin"
|
||||
@@ -50,7 +50,7 @@ files:
|
||||
description: "Game Boy Color (CGB-001) boot ROM"
|
||||
required: false
|
||||
hle_fallback: true
|
||||
size: 2304
|
||||
validation: {core: [size], upstream: [size, crc32]}
|
||||
source_ref: "libgambatte/libretro/libretro.cpp:1303-1363 (get_bootloader_from_file), libgambatte/src/bootloader.cpp:20-55 (load)"
|
||||
min_size: 2304
|
||||
validation: [size]
|
||||
source_ref: "libgambatte/libretro/libretro.cpp:1426-1486 (get_bootloader_from_file), libgambatte/libretro/libretro.cpp:1734-1742, libgambatte/src/bootloader.cpp:30-65 (load)"
|
||||
note: "Mapped at 0x0000-0x08FF with cartridge data preserved at 0x0100-0x01FF. Also used for GBA mode with a patch at 0xF2. Presence required for FORCE_CGB flag when hw mode is GBC or GBA."
|
||||
@@ -250,5 +250,18 @@ class DolphinForksIplDumps(_Probe):
|
||||
self.assertFalse(self.accepts(emulator, "IPL.bin", data, strict=True))
|
||||
|
||||
|
||||
class GambatteBootRoms(_Probe):
|
||||
"""get_bootloader_from_file reads 0x100 or 0x900 bytes and gives up on a
|
||||
short read; it never reads past them (libgambatte/libretro/libretro.cpp
|
||||
1426-1486 at d9d6cd0). The upstream crc32 check the profile claimed has
|
||||
no code behind it: sinamas/gambatte was reset to a README in 2021."""
|
||||
|
||||
def test_short_is_refused_and_longer_is_read(self):
|
||||
for name, size in (("gb_bios.bin", 256), ("gbc_bios.bin", 2304)):
|
||||
with self.subTest(name=name):
|
||||
self.assertFalse(self.accepts("gambatte", name, b"\0" * (size - 1)))
|
||||
self.assertTrue(self.accepts("gambatte", name, b"\0" * (size + 512)))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in new issue
Block a user