some more crap emulated.

This commit is contained in:
StapleButter
2016-12-06 17:32:51 +01:00
parent c8a0058ebc
commit 9bb3537ede
11 changed files with 532 additions and 61 deletions

17
ARM.cpp
View File

@ -209,8 +209,6 @@ void ARM::TriggerIRQ()
if ((CPSR & 0x80) && (!Halted))
return;
Halted = 0;
u32 oldcpsr = CPSR;
CPSR &= ~0xFF;
CPSR |= 0xD2;
@ -223,7 +221,13 @@ void ARM::TriggerIRQ()
s32 ARM::Execute(s32 cycles)
{
if (Halted) return cycles;
if (Halted)
{
if (NDS::HaltInterrupted(Num))
Halted = false;
else
return cycles;
}
s32 cyclesrun = 0;
@ -269,6 +273,13 @@ s32 ARM::Execute(s32 cycles)
cyclesrun += 1; // 1S. todo: check
}
}
// zorp
if (NDS::HaltInterrupted(Num))
{
if (NDS::IME[Num]&1)
TriggerIRQ();
}
}
return cyclesrun;