From 464097252bd714578d8ea283734ba343ccf6ec7a Mon Sep 17 00:00:00 2001 From: alyosha-tas Date: Mon, 5 Sep 2016 08:09:13 -0400 Subject: [PATCH] Fix Somari --- .../Consoles/Nintendo/NES/Boards/Mapper116.cs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper116.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper116.cs index 1ac564f368..243cd695b7 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper116.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper116.cs @@ -83,7 +83,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES vrc2.Configure(origin); //not exactly the same as fceu-mm. is it important? for(int i=0;i<16;i++) - vrc2.chr_bank_reg_1k[i] = 0x0F; + vrc2.chr_bank_reg_1k[i] = 0xFF; vrc2.SyncCHR(); mmc3 = new MMC3_CustomBoard(this); @@ -146,7 +146,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES void WriteModeControl(int addr, byte value) { - if ((addr & 0x4100) != 0x4100) return; + if (((addr & 0x4100) != 0x4100) || addr>=0x4200) return; mode = value & 3; bool chr_base = value.Bit(2); @@ -233,7 +233,14 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override void ClockPPU() { - mmc3.ClockPPU(); + switch (mode) + { + case 0: break; + case 1: mmc3.ClockPPU(); break; + case 2: + case 3: mmc1.ClockPPU(); break; + + } } } }