make nocashprint work from ARM code too.

fixes #315
This commit is contained in:
StapleButter
2018-12-31 20:58:58 +01:00
parent eec27ebf69
commit b6481a28ac
4 changed files with 18 additions and 4 deletions

View File

@ -646,6 +646,21 @@ A_IMPLEMENT_ALU_OP(ORR,_S)
A_IMPLEMENT_ALU_OP(MOV,_S)
// debug hook
void A_MOV_REG_LSL_IMM_DBG(ARM* cpu)
{
A_MOV_REG_LSL_IMM(cpu);
// nocash-style debugging hook
if ( cpu->CurInstr == 0xE1A0C00C && // mov r12, r12
(cpu->NextInstr[0] & 0xFF000000) == 0xEA000000 && // branch
(cpu->NextInstr[1] & 0xFFFF) == 0x6464)
{
u32 addr = cpu->R[15] + 2;
NDS::NocashPrint(cpu->Num, addr);
}
}
#define A_BIC(c) \
u32 a = cpu->R[(cpu->CurInstr>>16) & 0xF]; \