From 6f56336031ab36284d0e6015c08169b44c5547e0 Mon Sep 17 00:00:00 2001 From: zilmar Date: Fri, 22 May 2015 06:09:33 +1000 Subject: [PATCH] [Project64] handle F3 A4 rep movs byte ptr es:[edi],byte ptr [esi] in exception handler --- Source/Project64/N64 System/Mips/Memory Virtual Mem.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Source/Project64/N64 System/Mips/Memory Virtual Mem.cpp b/Source/Project64/N64 System/Mips/Memory Virtual Mem.cpp index b0c7c6eaf..03da90f8e 100644 --- a/Source/Project64/N64 System/Mips/Memory Virtual Mem.cpp +++ b/Source/Project64/N64 System/Mips/Memory Virtual Mem.cpp @@ -1962,11 +1962,10 @@ int CMipsMemoryVM::MemoryFilter( DWORD dwExptCode, void * lpExceptionPointer ) BYTE * TypePos = (unsigned char *)lpEP->ContextRecord->Eip; EXCEPTION_RECORD exRec = *lpEP->ExceptionRecord; - if (*TypePos == 0xF3 && *(TypePos + 1) == 0xA5) + if (*TypePos == 0xF3 && (*(TypePos + 1) == 0xA4 || *(TypePos + 1) == 0xA5)) { - DWORD Start, End; - Start = (lpEP->ContextRecord->Edi - (DWORD)m_RDRAM); - End = (Start + (lpEP->ContextRecord->Ecx << 2) - 1); + DWORD Start = (lpEP->ContextRecord->Edi - (DWORD)m_RDRAM); + DWORD End = Start + lpEP->ContextRecord->Ecx; if ((int)Start < 0) { if (bHaveDebugger())