diff --git a/src/boards/n106.cpp b/src/boards/n106.cpp index 71e189bf..abe8de5b 100644 --- a/src/boards/n106.cpp +++ b/src/boards/n106.cpp @@ -57,9 +57,23 @@ static SFORMAT N106_StateRegs[] = { { PRG, 3, "PRG" }, { CHR, 8, "CHR" }, { NTAPage, 4, "NTA" }, + { &gorfus, 1, "GORF" }, + { &dopol, 1, "DOPO" }, + { &gorko, 1, "GORK" }, { 0 } }; +static void SyncMirror() +{ + switch(gorko) { + case 0: setmirror(MI_0); break; + case 1: setmirror(MI_V); break; + case 2: setmirror(MI_H); break; + case 3: setmirror(MI_0); break; + } + +} + static void SyncPRG(void) { setprg8(0x8000, PRG[0]); setprg8(0xa000, PRG[1]); @@ -179,8 +193,11 @@ static DECLFW(Mapper19_write) { X6502_IRQEnd(FCEU_IQEXT); break; case 0xE000: - gorko = V & 0xC0; PRG[0] = V & 0x3F; + if(is210) { + gorko = V>>6; + SyncMirror(); + } SyncPRG(); break; case 0xE800: @@ -333,6 +350,7 @@ static void Mapper19_StateRestore(int version) { SyncPRG(); FixNTAR(); FixCRR(); + SyncMirror(); int x; for (x = 0x40; x < 0x80; x++) FixCache(x, IRAM[x]);