From 4ff77456e49c662612fe7a57200ff935d490a545 Mon Sep 17 00:00:00 2001 From: alyosha-tas Date: Fri, 28 Jan 2022 21:02:49 -0500 Subject: [PATCH] NESHawk: only add ines v2 submapper if it is non-zero, fixes #3082 --- .../Consoles/Nintendo/NES/NES.iNES.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.iNES.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.iNES.cs index 757646148b..1b1dbdc786 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.iNES.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.iNES.cs @@ -48,7 +48,17 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES int mapper = data[6] >> 4 | data[7] & 0xf0 | data[8] << 8 & 0xf00; int submapper = data[8] >> 4; - CartV2.BoardType = $"MAPPER{mapper:d4}-{submapper:d2}"; + + // only add submapper if it is non-zero + if (submapper != 0) + { + CartV2.BoardType = $"MAPPER{mapper:d4}-{submapper:d2}"; + } + else + { + CartV2.BoardType = $"MAPPER{mapper:d4}"; + } + int vrambat = iNES2Wram(data[11] >> 4); int vramnon = iNES2Wram(data[11] & 15);