reimplement codemem

i dont feel like i actually had a good reason for disabling this...
This commit is contained in:
Jaklyy 2024-10-13 10:14:54 -04:00
parent 206fc94d68
commit 801f43dfc5
2 changed files with 3 additions and 3 deletions

View File

@ -327,7 +327,7 @@ void ARMv5::JumpTo(u32 addr, bool restorecpsr)
addr &= ~0x1;
R[15] = addr+2;
//if (newregion != oldregion) SetupCodeMem(addr);
if (newregion != oldregion) SetupCodeMem(addr);
// two-opcodes-at-once fetch
// doesn't matter if we put garbage in the MSbs there
@ -352,7 +352,7 @@ void ARMv5::JumpTo(u32 addr, bool restorecpsr)
addr &= ~0x3;
R[15] = addr+4;
//if (newregion != oldregion) SetupCodeMem(addr);
if (newregion != oldregion) SetupCodeMem(addr);
NextInstr[0] = CodeRead32(addr, true);
Cycles += CodeCycles;

View File

@ -979,8 +979,8 @@ u32 ARMv5::CodeRead32(u32 addr, bool branch)
NDS.ARM9Timestamp += CodeCycles;
if (NDS.ARM9Timestamp < TimestampActual) NDS.ARM9Timestamp = TimestampActual;
//if (CodeMem.Mem) return *(u32*)&CodeMem.Mem[addr & CodeMem.Mask];
DataRegion = Mem9_Null;
if (CodeMem.Mem) return *(u32*)&CodeMem.Mem[addr & CodeMem.Mask];
return BusRead32(addr);
}