imma be real, i have no idea what is going on here

This commit is contained in:
Jaklyy
2024-06-08 22:12:44 -04:00
parent 659763f903
commit 849d4e51ac
3 changed files with 60 additions and 15 deletions

View File

@ -177,6 +177,8 @@ void ARM::Reset()
ExceptionBase = Num ? 0x00000000 : 0xFFFF0000;
BuggyJump = 0;
CodeMem.Mem = NULL;
#ifdef JIT_ENABLED
@ -284,6 +286,32 @@ void ARM::SetupCodeMem(u32 addr)
}
}
void ARMv5::BuggedJumpTo32(const u32 addr)
{
if (BuggyJump == 1)
{
BuggyJump = 2;
JumpTo(addr);
}
else
{
JumpTo(addr & ~0x1);
}
}
void ARMv5::BuggedJumpTo(const u32 addr)
{
if ((BuggyJump == 0) && (addr & 0x3))
{
BuggyJump = 1;
PrefetchAbort(); // checkme
}
else
{
JumpTo(addr);
}
}
void ARMv5::JumpTo(u32 addr, bool restorecpsr)
{
if (restorecpsr)
@ -352,6 +380,16 @@ void ARMv5::JumpTo(u32 addr, bool restorecpsr)
NDS.MonitorARM9Jump(addr);
}
void ARMv4::BuggedJumpTo32(const u32 addr)
{
JumpTo(addr); // todo
}
void ARMv4::BuggedJumpTo(const u32 addr)
{
JumpTo(addr); // todo
}
void ARMv4::JumpTo(u32 addr, bool restorecpsr)
{
if (restorecpsr)