virtual memory block reads/writes properly fail if address is out of bounds.

Fixes Solar v2.1 http://puu.sh/8ScXK.jpg
This commit is contained in:
Michael Yu 2014-05-18 23:12:28 -07:00
parent 0d0df4b491
commit 9e791da7bd
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);