From 3f97b8eaa8da22711e291b1c5100e7469aaebb9e Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Wed, 5 Aug 2020 02:10:21 +0300 Subject: [PATCH] Even more regressions --- Core/memory.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/memory.c b/Core/memory.c index a75c382c..e1ebeddd 100644 --- a/Core/memory.c +++ b/Core/memory.c @@ -684,7 +684,7 @@ static void write_mbc_ram(GB_gameboy_t *gb, uint16_t addr, uint8_t value) return; } - if ((!gb->mbc_ram_enable || !gb->mbc_ram_size) + if ((!gb->mbc_ram_enable) && gb->cartridge_type->mbc_type != GB_HUC1) return; if (gb->cartridge_type->mbc_type == GB_HUC1 && gb->huc1.ir_mode) { @@ -705,7 +705,7 @@ static void write_mbc_ram(GB_gameboy_t *gb, uint16_t addr, uint8_t value) return; } - if (!gb->mbc_ram) { + if (!gb->mbc_ram || !gb->mbc_ram_size) { return; }