From 0fc046bea930c90e3a5e8b0cafbe8589e67cad39 Mon Sep 17 00:00:00 2001 From: alyosha-tas Date: Mon, 9 Apr 2018 10:35:23 -0400 Subject: [PATCH] GBHawk: MBC7: Fix Command Master --- .../Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC7.cs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC7.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC7.cs index db01d14f6d..41b9dd1506 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC7.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Mappers/Mapper_MBC7.cs @@ -66,7 +66,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk } else if (addr < 0xB000) { - if (RAM_enable_2) + if (RAM_enable_1 && RAM_enable_2) { return Register_Access_Read(addr); } @@ -107,15 +107,12 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk } else if (addr < 0x6000) { - if (RAM_enable_1) - { - RAM_enable_2 = (value & 0xF0) == 0x40; - } + RAM_enable_2 = (value & 0xF0) == 0x40; } } else { - if (RAM_enable_2) + if (RAM_enable_1 && RAM_enable_2) { Register_Access_Write(addr, value); }