From 3db4a1e5956cc00fec8b6e78214c0eac1d7f154f Mon Sep 17 00:00:00 2001 From: zilmar Date: Wed, 26 Sep 2012 17:10:47 +1000 Subject: [PATCH] added main look for the Recompiler where we are using Lookup and validate with TLB on --- .../N64 System/Recompiler/Recompiler Class.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Source/Project64/N64 System/Recompiler/Recompiler Class.cpp b/Source/Project64/N64 System/Recompiler/Recompiler Class.cpp index be0660224..41e1a1f25 100644 --- a/Source/Project64/N64 System/Recompiler/Recompiler Class.cpp +++ b/Source/Project64/N64 System/Recompiler/Recompiler Class.cpp @@ -599,8 +599,6 @@ void CRecompiler::RecompilerMain_Lookup_validate( void ) void CRecompiler::RecompilerMain_Lookup_validate_TLB( void ) { - _Notify->BreakPoint(__FILE__,__LINE__); -#ifdef tofix DWORD PhysicalAddr; while(!m_EndEmulation) @@ -631,6 +629,14 @@ void CRecompiler::RecompilerMain_Lookup_validate_TLB( void ) _MMU->ProtectMemory(PROGRAM_COUNTER & ~0xFFF,PROGRAM_COUNTER | 0xFFF); } JumpTable()[PhysicalAddr >> 2] = info; + } else { + if (*(info->MemLocation(0)) != info->MemContents(0) || + *(info->MemLocation(1)) != info->MemContents(1)) + { + ClearRecompCode_Virt((info->EnterPC() - 0x1000) & ~0xFFF,0x3000,Remove_ValidateFunc); + info = NULL; + continue; + } } (info->Function())(); } else { @@ -649,7 +655,6 @@ void CRecompiler::RecompilerMain_Lookup_validate_TLB( void ) } } } -#endif } void CRecompiler::Reset()