git.y1.nz

SameBoy

Accurate GB/GBC emulator
download: https://git.y1.nz/archives/sameboy.tar.gz
README | Files | Log | Refs | LICENSE

commit 8d063391a474b6a5bcaf60cf11f2616fc6a6d3fd
parent 9f53fcc30bcbb069cfd172c1bd54cdd8d03e5258
Author: Lior Halphon <LIJI32@gmail.com>
Date:   Sat, 13 Jan 2024 18:06:22 +0200

Support for certain bootlag games with malformed headers, fixes #585

Diffstat:
MCore/mbc.c8++++++++
1 file changed, 8 insertions(+), 0 deletions(-)

diff --git a/Core/mbc.c b/Core/mbc.c @@ -195,6 +195,14 @@ void GB_configure_cart(GB_gameboy_t *gb) GB_log(gb, "Cartridge type %02x is not yet supported.\n", gb->rom[0x147]); } } + + if (!gb->cartridge_type->has_ram && + gb->cartridge_type->mbc_type != GB_NO_MBC && + gb->cartridge_type->mbc_type != GB_TPP1 && + gb->rom[0x149]) { + GB_log(gb, "ROM header reports no RAM, but also reports a non-zero RAM size. Assuming cartridge has RAM.\n"); + gb->cartridge_type++; + } size_t old_mbc_ram_size = gb->mbc_ram_size; gb->mbc_ram_size = 0;

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.