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; })); }