From 0c31b782c3c27b439085e14c4914ef88259416d7 Mon Sep 17 00:00:00 2001 From: adelikat Date: Sat, 15 Aug 2015 19:58:52 -0400 Subject: [PATCH] NES - Mapper 91 - better support some junk --- .../Consoles/Nintendo/NES/Boards/Mapper091.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper091.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper091.cs index 985672c21f..dca774e1be 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper091.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper091.cs @@ -24,7 +24,13 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - chr_bank_mask_2k = Cart.chr_size / 2 - 1; + int chrSize = Cart.chr_size; + if (chrSize > 256) // Hack to support some bad dumps + { + chrSize = 512; + } + + chr_bank_mask_2k = chrSize / 2 - 1; prg_bank_mask_8k = Cart.prg_size / 8 - 1; prg_regs_8k[3] = 0xFF;