added trace protected memory (changed from error to protected memory)

This commit is contained in:
zilmar 2012-10-05 19:10:18 +10:00
parent 8b151abd7b
commit 74066e0b04
2 changed files with 4 additions and 3 deletions

View File

@ -13,6 +13,7 @@ enum TraceType
TraceTLB = 0x00000080,
TraceValidate = 0x00000100,
TraceAudio = 0x00000200,
TraceProtectedMem = 0x00000400,
TraceNoHeader = 0x80000000,
};

View File

@ -2327,7 +2327,7 @@ void CMipsMemoryVM::UpdateHalfLine (void)
void CMipsMemoryVM::ProtectMemory( DWORD StartVaddr, DWORD EndVaddr )
{
WriteTraceF(TraceError,"ProtectMemory: StartVaddr: %X EndVaddr: %X",StartVaddr,EndVaddr);
WriteTraceF(TraceProtectedMem,"ProtectMemory: StartVaddr: %X EndVaddr: %X",StartVaddr,EndVaddr);
if (!ValidVaddr(StartVaddr) || !ValidVaddr(EndVaddr)) { return; }
//Get Physical Addresses passed
@ -2342,14 +2342,14 @@ void CMipsMemoryVM::ProtectMemory( DWORD StartVaddr, DWORD EndVaddr )
//Proect that memory address space
DWORD OldProtect;
BYTE * MemLoc = Rdram() + StartPAddr;
WriteTraceF(TraceError,"ProtectMemory: Paddr: %X Length: %X",StartPAddr,Length);
WriteTraceF(TraceProtectedMem,"ProtectMemory: Paddr: %X Length: %X",StartPAddr,Length);
VirtualProtect(MemLoc, Length, PAGE_READONLY, &OldProtect);
}
void CMipsMemoryVM::UnProtectMemory( DWORD StartVaddr, DWORD EndVaddr )
{
WriteTraceF(TraceError,"UnProtectMemory: StartVaddr: %X EndVaddr: %X",StartVaddr,EndVaddr);
WriteTraceF(TraceProtectedMem,"UnProtectMemory: StartVaddr: %X EndVaddr: %X",StartVaddr,EndVaddr);
if (!ValidVaddr(StartVaddr) || !ValidVaddr(EndVaddr)) { return; }
//Get Physical Addresses passed