added trace protected memory (changed from error to protected memory)
This commit is contained in:
parent
8b151abd7b
commit
74066e0b04
|
@ -13,6 +13,7 @@ enum TraceType
|
|||
TraceTLB = 0x00000080,
|
||||
TraceValidate = 0x00000100,
|
||||
TraceAudio = 0x00000200,
|
||||
TraceProtectedMem = 0x00000400,
|
||||
TraceNoHeader = 0x80000000,
|
||||
};
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue