nvmnvmnvm

This commit is contained in:
Jaklyy 2024-10-14 22:48:25 -04:00
parent 026719acef
commit 263dd20ec3
1 changed files with 14 additions and 9 deletions

View File

@ -916,6 +916,7 @@ u32 ARMv5::CodeRead32(u32 addr, bool branch)
//return *(u32*)&CurICacheLine[addr & 0x1C]; //return *(u32*)&CurICacheLine[addr & 0x1C];
} }
if (PU_Map[addr>>12] & 0x30)
WriteBufferDrain(); WriteBufferDrain();
NDS.ARM9Timestamp = NDS.ARM9Timestamp + ((1<<NDS.ARM9ClockShift)-1) & ~((1<<NDS.ARM9ClockShift)-1); NDS.ARM9Timestamp = NDS.ARM9Timestamp + ((1<<NDS.ARM9ClockShift)-1) & ~((1<<NDS.ARM9ClockShift)-1);
@ -962,6 +963,7 @@ bool ARMv5::DataRead8(u32 addr, u32* val)
return true; return true;
} }
if (PU_Map[addr>>12] & 0x30)
WriteBufferDrain(); WriteBufferDrain();
NDS.ARM9Timestamp = NDS.ARM9Timestamp + ((1<<NDS.ARM9ClockShift)-1) & ~((1<<NDS.ARM9ClockShift)-1); NDS.ARM9Timestamp = NDS.ARM9Timestamp + ((1<<NDS.ARM9ClockShift)-1) & ~((1<<NDS.ARM9ClockShift)-1);
@ -1009,6 +1011,7 @@ bool ARMv5::DataRead16(u32 addr, u32* val)
return true; return true;
} }
if (PU_Map[addr>>12] & 0x30)
WriteBufferDrain(); WriteBufferDrain();
NDS.ARM9Timestamp = NDS.ARM9Timestamp + ((1<<NDS.ARM9ClockShift)-1) & ~((1<<NDS.ARM9ClockShift)-1); NDS.ARM9Timestamp = NDS.ARM9Timestamp + ((1<<NDS.ARM9ClockShift)-1) & ~((1<<NDS.ARM9ClockShift)-1);
@ -1056,6 +1059,7 @@ bool ARMv5::DataRead32(u32 addr, u32* val)
return true; return true;
} }
if (PU_Map[addr>>12] & 0x30)
WriteBufferDrain(); WriteBufferDrain();
NDS.ARM9Timestamp = NDS.ARM9Timestamp + ((1<<NDS.ARM9ClockShift)-1) & ~((1<<NDS.ARM9ClockShift)-1); NDS.ARM9Timestamp = NDS.ARM9Timestamp + ((1<<NDS.ARM9ClockShift)-1) & ~((1<<NDS.ARM9ClockShift)-1);
@ -1102,6 +1106,7 @@ bool ARMv5::DataRead32S(u32 addr, u32* val)
return true; return true;
} }
if (PU_Map[addr>>12] & 0x30)
WriteBufferDrain(); WriteBufferDrain();
NDS.ARM9Timestamp += DataCycles; NDS.ARM9Timestamp += DataCycles;