From 0d3b44c99cf40e50a420016d8907ba06eecf34bb Mon Sep 17 00:00:00 2001 From: NewRisingSun <8vytz1+dhp372pv94ebg@sharklasers.com> Date: Mon, 20 Oct 2025 21:28:45 +0200 Subject: [PATCH] Mapper 277: The UNROM game must take its mirroring from the NES header. --- src/boards/277.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/boards/277.c b/src/boards/277.c index 4f6549c..e37a5d8 100644 --- a/src/boards/277.c +++ b/src/boards/277.c @@ -22,6 +22,8 @@ #include "mapinc.h" #include "latch.h" +static uint8 inesMirroring; + static void Sync(void) { if (!(latch.data & 1) && (latch.data & 8)) { setprg16(0x8000, latch.data & ~1); @@ -36,7 +38,10 @@ static void Sync(void) { } } setchr8(0); - setmirror(((latch.data >> 4) & 1) ^ 1); + if (latch.data &8) + setmirror(latch.data &0x10? MI_H: MI_V); + else + setmirror(inesMirroring); /* The UNROM game's mirroring is set via solder pad and not via hardware register, so use the mirroring setting from the iNES header. */ } static DECLFW(M277Write) { @@ -58,6 +63,7 @@ static void M277Reset() { } void Mapper277_Init(CartInfo *info) { + inesMirroring = info->mirror; Latch_Init(info, Sync, NULL, 0, 0); info->Power = M277Power; info->Reset = M277Reset;