Even more regressions

This commit is contained in:
Lior Halphon 2020-08-05 02:10:21 +03:00
parent d3664d5da0
commit 3f97b8eaa8

View File

@ -684,7 +684,7 @@ static void write_mbc_ram(GB_gameboy_t *gb, uint16_t addr, uint8_t value)
return; return;
} }
if ((!gb->mbc_ram_enable || !gb->mbc_ram_size) if ((!gb->mbc_ram_enable)
&& gb->cartridge_type->mbc_type != GB_HUC1) return; && gb->cartridge_type->mbc_type != GB_HUC1) return;
if (gb->cartridge_type->mbc_type == GB_HUC1 && gb->huc1.ir_mode) { 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; return;
} }
if (!gb->mbc_ram) { if (!gb->mbc_ram || !gb->mbc_ram_size) {
return; return;
} }