Skip to content

Commit

Permalink
Core: Open debugger on unknown opcode
Browse files Browse the repository at this point in the history
  • Loading branch information
project64 committed Jul 25, 2022
1 parent 1a8a4dd commit c3cae35
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions Source/Project64-core/N64System/Interpreter/InterpreterOps.cpp
Expand Up @@ -2613,11 +2613,19 @@ void R4300iOp::COP1_L_CVT_D()

void R4300iOp::UnknownOpcode()
{
R4300iInstruction Opcode(*_PROGRAM_COUNTER, m_Opcode.Value);
g_Notify->DisplayError(stdstr_f("%s: %08X\n%s %s\n\nStopping emulation", GS(MSG_UNHANDLED_OP), (*_PROGRAM_COUNTER), Opcode.Name(), Opcode.Param()).c_str());
g_System->m_EndEmulation = true;
if (HaveDebugger())
{
g_Settings->SaveBool(Debugger_SteppingOps, true);
g_Debugger->WaitForStep();
}
else
{
R4300iInstruction Opcode(*_PROGRAM_COUNTER, m_Opcode.Value);
g_Notify->DisplayError(stdstr_f("%s: %08X\n%s %s\n\nStopping emulation", GS(MSG_UNHANDLED_OP), (*_PROGRAM_COUNTER), Opcode.Name(), Opcode.Param()).c_str());
g_System->m_EndEmulation = true;

g_Notify->BreakPoint(__FILE__, __LINE__);
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}

bool R4300iOp::MemoryBreakpoint()
Expand Down

0 comments on commit c3cae35

Please sign in to comment.