diff --git a/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/Cart/mapper_HANG.cs b/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/Cart/mapper_HANG.cs index 15816c65c7..602f015ae0 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/Cart/mapper_HANG.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/Cart/mapper_HANG.cs @@ -10,7 +10,7 @@ public mapper_HANG(byte[] rom) { - ROM = new byte[0xFFFF - 0x800]; + ROM = new byte[0x10000 - 0x800]; for (int i = 0; i < rom.Length; i++) { ROM[i] = rom[i]; @@ -26,6 +26,10 @@ public override byte ReadBus(ushort addr) { var off = addr - 0x800; + if (off >= ROM.Length) + { + System.Diagnostics.Debugger.Break(); + } return ROM[off]; } diff --git a/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/Cart/mapper_MAZE.cs b/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/Cart/mapper_MAZE.cs index 391a84cc1c..79eab02e6f 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/Cart/mapper_MAZE.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/Cart/mapper_MAZE.cs @@ -9,7 +9,7 @@ public mapper_MAZE(byte[] rom) { - ROM = new byte[0xFFFF - 0x800]; + ROM = new byte[0x10000 - 0x800]; for (int i = 0; i < rom.Length; i++) { ROM[i] = rom[i]; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/Cart/mapper_RIDDLE.cs b/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/Cart/mapper_RIDDLE.cs index d62326ef67..c15ac11282 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/Cart/mapper_RIDDLE.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/Cart/mapper_RIDDLE.cs @@ -9,7 +9,7 @@ public mapper_RIDDLE(byte[] rom) { - ROM = new byte[0xFFFF - 0x800]; + ROM = new byte[0x10000 - 0x800]; for (int i = 0; i < rom.Length; i++) { ROM[i] = rom[i]; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/Cart/mapper_SCHACH.cs b/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/Cart/mapper_SCHACH.cs index 35a527d44f..128828758f 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/Cart/mapper_SCHACH.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/Cart/mapper_SCHACH.cs @@ -11,7 +11,7 @@ public mapper_SCHACH(byte[] rom) { - ROM = new byte[0xFFFF - 0x800]; + ROM = new byte[0x10000 - 0x800]; for (int i = 0; i < rom.Length; i++) { ROM[i] = rom[i]; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/Cart/mapper_STD.cs b/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/Cart/mapper_STD.cs index 93ddc4d786..03aae45a39 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/Cart/mapper_STD.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/Cart/mapper_STD.cs @@ -10,7 +10,7 @@ public mapper_STD(byte[] rom) { - ROM = new byte[0xFFFF - 0x800]; + ROM = new byte[0x10000 - 0x800]; for (int i = 0; i < rom.Length; i++) { ROM[i] = rom[i];