Skip to content

Commit

Permalink
PowerPC: Dedoublify CheckExternalExceptions.
Browse files Browse the repository at this point in the history
  • Loading branch information
degasus committed Jun 26, 2016
1 parent 4c5f8f9 commit ca96302
Showing 1 changed file with 2 additions and 37 deletions.
39 changes: 2 additions & 37 deletions Source/Core/Core/PowerPC/PowerPC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -418,44 +418,9 @@ void CheckExceptions()
}

// EXTERNAL INTERRUPT
else if (MSR & 0x0008000) // Handling is delayed until MSR.EE=1.
else
{
if (exceptions & EXCEPTION_EXTERNAL_INT)
{
// Pokemon gets this "too early", it hasn't a handler yet
SRR0 = NPC;
SRR1 = MSR & 0x87C0FFFF;
MSR |= (MSR >> 16) & 1;
MSR &= ~0x04EF36;
PC = NPC = 0x00000500;

INFO_LOG(POWERPC, "EXCEPTION_EXTERNAL_INT");
ppcState.Exceptions &= ~EXCEPTION_EXTERNAL_INT;

_dbg_assert_msg_(POWERPC, (SRR1 & 0x02) != 0, "EXTERNAL_INT unrecoverable???");
}
else if (exceptions & EXCEPTION_PERFORMANCE_MONITOR)
{
SRR0 = NPC;
SRR1 = MSR & 0x87C0FFFF;
MSR |= (MSR >> 16) & 1;
MSR &= ~0x04EF36;
PC = NPC = 0x00000F00;

INFO_LOG(POWERPC, "EXCEPTION_PERFORMANCE_MONITOR");
ppcState.Exceptions &= ~EXCEPTION_PERFORMANCE_MONITOR;
}
else if (exceptions & EXCEPTION_DECREMENTER)
{
SRR0 = NPC;
SRR1 = MSR & 0x87C0FFFF;
MSR |= (MSR >> 16) & 1;
MSR &= ~0x04EF36;
PC = NPC = 0x00000900;

INFO_LOG(POWERPC, "EXCEPTION_DECREMENTER");
ppcState.Exceptions &= ~EXCEPTION_DECREMENTER;
}
CheckExternalExceptions();
}
}

Expand Down

0 comments on commit ca96302

Please sign in to comment.