From 84d100c56f5620f91e7b9a3c1613a93a4053015d Mon Sep 17 00:00:00 2001 From: CaH4e3 Date: Sat, 21 May 2016 19:30:37 +0000 Subject: [PATCH] mapper 69 - fix #731 --- trunk/src/boards/69.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/trunk/src/boards/69.cpp b/trunk/src/boards/69.cpp index 1baa6298..bc256211 100644 --- a/trunk/src/boards/69.cpp +++ b/trunk/src/boards/69.cpp @@ -41,7 +41,7 @@ static SFORMAT StateRegs[] = static void Sync(void) { uint8 i; if ((preg[3] & 0xC0) == 0xC0) - setprg8r(0x10, 0x6000, 0); + setprg8r(0x10, 0x6000, preg[3] & 0x3F); else setprg8(0x6000, preg[3] & 0x3F); setprg8(0x8000, preg[0]); @@ -258,7 +258,10 @@ void Mapper69_Init(CartInfo *info) { info->Power = M69Power; info->Close = M69Close; MapIRQHook = M69IRQHook; - WRAMSIZE = 8192; + if(info->ines2) + WRAMSIZE = info->wram_size + info->battery_wram_size; + else + WRAMSIZE = 8192; WRAM = (uint8*)FCEU_gmalloc(WRAMSIZE); SetupCartPRGMapping(0x10, WRAM, WRAMSIZE, 1); AddExState(WRAM, WRAMSIZE, 0, "WRAM");