From a3d4db6b1a0617c83445b1eb7c43dcf3f2d714a7 Mon Sep 17 00:00:00 2001 From: g0me3 Date: Mon, 22 Jul 2019 13:32:42 +0300 Subject: [PATCH] fix for #68 (mapper 227 chr write protection emulation) --- src/boards/addrlatch.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/boards/addrlatch.cpp b/src/boards/addrlatch.cpp index 44480ae9..10839821 100644 --- a/src/boards/addrlatch.cpp +++ b/src/boards/addrlatch.cpp @@ -354,6 +354,7 @@ static void M227Sync(void) { uint32 L = (latche >> 9) & 1; if ((latche >> 7) & 1) { + SetupCartCHRMapping(0, CHRptr[0], 0x2000, 0); // hacky hacky write protection for CHR if (S) { setprg32(0x8000, p >> 1); } else { @@ -361,6 +362,7 @@ static void M227Sync(void) { setprg16(0xC000, p); } } else { + SetupCartCHRMapping(0, CHRptr[0], 0x2000, 1); // hacky hacky write protection for CHR if (S) { if (L) { setprg16(0x8000, p & 0x3E);