uint8 JaguarReadByte(uint32 offset, uint32 who/*=UNKNOWN*/)
{
uint8 data = 0x00;
-
offset &= 0xFFFFFF;
- if (offset < 0x200000)
- data = jaguarMainRAM[offset & 0x3FFFFF];
- else if ((offset >= 0x800000) && (offset < 0xC00000))
+
+ // First 2M is mirrored in the $0 - $7FFFFF range
+ if (offset < 0x800000)
+ data = jaguarMainRAM[offset & 0x1FFFFF];
+ else if ((offset >= 0x800000) && (offset < 0xDFFF00))
data = jaguarMainROM[offset - 0x800000];
else if ((offset >= 0xDFFF00) && (offset <= 0xDFFFFF))
data = CDROMReadByte(offset, who);
uint16 JaguarReadWord(uint32 offset, uint32 who/*=UNKNOWN*/)
{
offset &= 0xFFFFFF;
- if (offset <= 0x1FFFFE)
+
+ // First 2M is mirrored in the $0 - $7FFFFF range
+ if (offset < 0x800000)
{
return (jaguarMainRAM[(offset+0) & 0x1FFFFF] << 8) | jaguarMainRAM[(offset+1) & 0x1FFFFF];
}
- else if ((offset >= 0x800000) && (offset <= 0xBFFFFE))
+ else if ((offset >= 0x800000) && (offset < 0xDFFF00))
{
offset -= 0x800000;
return (jaguarMainROM[offset+0] << 8) | jaguarMainROM[offset+1];
WriteLog("JWB: Byte %02X written at %08X by %s\n", data, offset, whoName[who]);//*/
offset &= 0xFFFFFF;
- if (offset < 0x200000)
+
+ // First 2M is mirrored in the $0 - $7FFFFF range
+ if (offset < 0x800000)
{
jaguarMainRAM[offset & 0x1FFFFF] = data;
return;
offset &= 0xFFFFFF;
- if (offset <= 0x1FFFFE)
+ // First 2M is mirrored in the $0 - $7FFFFF range
+ if (offset <= 0x7FFFFE)
{
/*
GPU Table (CD BIOS)