From 5cc6a91a419c7c13929d7a9a3f2231fe9dc1f2e7 Mon Sep 17 00:00:00 2001 From: zilmar Date: Sat, 22 Dec 2012 19:44:26 +1100 Subject: [PATCH] CCodeBlock::AnalyzeInstruction: better handling of R4300i_REGIMM_BLTZ --- .../N64 System/Recompiler/Code Block.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/Source/Project64/N64 System/Recompiler/Code Block.cpp b/Source/Project64/N64 System/Recompiler/Code Block.cpp index b65aa4787..97d677828 100644 --- a/Source/Project64/N64 System/Recompiler/Code Block.cpp +++ b/Source/Project64/N64 System/Recompiler/Code Block.cpp @@ -409,14 +409,15 @@ bool CCodeBlock::AnalyzeInstruction ( DWORD PC, DWORD & TargetPC, DWORD & Contin TargetPC = PC + ((short)Command.offset << 2) + 4; if (TargetPC == PC + 8) { - g_Notify->BreakPoint(__FILE__,__LINE__); + TargetPC = (DWORD)-1; + } else { + if (TargetPC == PC && !DelaySlotEffectsCompare(PC,Command.rs,0)) + { + PermLoop = true; + } + ContinuePC = PC + 8; + IncludeDelaySlot = true; } - if (TargetPC == PC) - { - g_Notify->BreakPoint(__FILE__,__LINE__); - } - ContinuePC = PC + 8; - IncludeDelaySlot = true; break; case R4300i_REGIMM_BGEZ: case R4300i_REGIMM_BGEZAL: @@ -624,7 +625,8 @@ bool CCodeBlock::AnalyzeInstruction ( DWORD PC, DWORD & TargetPC, DWORD & Contin IncludeDelaySlot = true; break; default: - if (Command.Hex == 0x7C1C97C0) + if (Command.Hex == 0x7C1C97C0 || + Command.Hex == 0xF1F3F5F7) { EndBlock = true; break;