From ec106c94b824d66068638c2ddeb3c12e1c7a25ee Mon Sep 17 00:00:00 2001 From: zilmar Date: Thu, 25 Oct 2012 19:37:52 +1100 Subject: [PATCH] Cleaned up clear related to tlb write --- .../Project64/N64 System/Recompiler/Recompiler Class.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Source/Project64/N64 System/Recompiler/Recompiler Class.cpp b/Source/Project64/N64 System/Recompiler/Recompiler Class.cpp index 646796a28..32792d567 100644 --- a/Source/Project64/N64 System/Recompiler/Recompiler Class.cpp +++ b/Source/Project64/N64 System/Recompiler/Recompiler Class.cpp @@ -632,8 +632,13 @@ void CRecompiler::RecompilerMain_Lookup_validate_TLB( void ) if (*(info->MemLocation(0)) != info->MemContents(0) || *(info->MemLocation(1)) != info->MemContents(1)) { - ClearRecompCode_Virt((info->EnterPC() - 0x1000) & ~0xFFF,0x3000,Remove_ValidateFunc); - info = NULL; + ClearRecompCode_Phys((PhysicalAddr - 0x1000) & ~0xFFF,0x3000,Remove_ValidateFunc); + info = JumpTable()[PhysicalAddr >> 2]; + if (info != NULL) + { + _Notify->BreakPoint(__FILE__,__LINE__); + info = NULL; + } continue; } }