Merge pull request #248 from ItzWarty/master

virtual memory block reads/writes properly fail if address is out of bounds
This commit is contained in:
B1ackDaemon 2014-05-21 18:22:01 +03:00
commit e569de73d6
5 changed files with 73 additions and 44 deletions

View file

@ -11,7 +11,10 @@ u32 GetAddress(u32 offset, u8 location)
switch(location)
{
case CELL_GCM_LOCATION_LOCAL: return Memory.RSXFBMem.GetStartAddr() + offset;
case CELL_GCM_LOCATION_MAIN: return Memory.RSXIOMem.getRealAddr(Memory.RSXIOMem.GetStartAddr() + offset);
case CELL_GCM_LOCATION_MAIN:
u64 realAddr;
Memory.RSXIOMem.getRealAddr(Memory.RSXIOMem.GetStartAddr() + offset, realAddr); // TODO: Error Check?
return realAddr;
}
ConLog.Error("GetAddress(offset=0x%x, location=0x%x)", location);