From 913760289d9d6066090aa6a570f0d7f7b17ccb52 Mon Sep 17 00:00:00 2001 From: adelikat Date: Sat, 4 Jan 2014 16:30:26 +0000 Subject: [PATCH] GPGX - mask memory domains because tools depend on this behavior in domains --- BizHawk.Emulation.Cores/Consoles/Sega/gpgx/GPGX.cs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/gpgx/GPGX.cs b/BizHawk.Emulation.Cores/Consoles/Sega/gpgx/GPGX.cs index 1204af9ac8..0a0899b044 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sega/gpgx/GPGX.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sega/gpgx/GPGX.cs @@ -528,15 +528,11 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx mm.Add(new MemoryDomain(name, size, MemoryDomain.Endian.Unknown, delegate(int addr) { - if (addr < 0 || addr >= size) - throw new ArgumentOutOfRangeException(); - return p[addr]; + return p[addr & (size - 1)]; }, delegate(int addr, byte val) { - if (addr < 0 || addr >= size) - throw new ArgumentOutOfRangeException(); - p[addr] = val; + p[addr & (size - 1)] = val; })); }