From 81f90cf509ab736a50b2a2d276b85f05b61e24de Mon Sep 17 00:00:00 2001 From: NewRisingSun <8vytz1+dhp372pv94ebg@sharklasers.com> Date: Mon, 27 Mar 2023 20:47:27 +0200 Subject: [PATCH] M380: Add submapper 2. --- src/boards/380.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/boards/380.c b/src/boards/380.c index 912e266..c2cfca4 100644 --- a/src/boards/380.c +++ b/src/boards/380.c @@ -26,6 +26,7 @@ static uint16 latche; static uint8 dipswitch; static uint8 isKN35A; +static uint8 is4K1; static SFORMAT StateRegs[] = { { &latche, 2 | FCEUSTATE_RLSB, "LATC" }, @@ -50,7 +51,7 @@ static void Sync(void) setprg16(0x8000, latche >> 2); setprg16(0xC000, (latche >> 2) | 7 | (isKN35A && latche &0x100? 8: 0)); } - setmirror(((latche >> 1) & 1) ^ 1); + setmirror(latche &(is4K1? 0x040: 0x002)? MI_H: MI_V); } static DECLFR(M380Read) @@ -91,6 +92,7 @@ static void StateRestore(int version) void Mapper380_Init(CartInfo *info) { isKN35A = info->iNES2 && info->submapper == 1; + is4K1 = info->iNES2 && info->submapper == 2; info->Power = M380Power; info->Reset = M380Reset; GameStateRestore = StateRestore;