Core: Allow reading from ISViewerHandler
This commit is contained in:
parent
305648f02f
commit
9186dcab39
|
@ -15,7 +15,14 @@ ISViewerHandler::ISViewerHandler(CN64System & System) :
|
||||||
|
|
||||||
bool ISViewerHandler::Read32(uint32_t Address, uint32_t & Value)
|
bool ISViewerHandler::Read32(uint32_t Address, uint32_t & Value)
|
||||||
{
|
{
|
||||||
Value = ((Address & 0xFFFF) << 16) | (Address & 0xFFFF);
|
if (!m_Data.empty())
|
||||||
|
{
|
||||||
|
Value = Swap32by8(*((uint32_t *)&m_Data[Address & 0xFFFC]));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Value = ((Address & 0xFFFF) << 16) | (Address & 0xFFFF);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -730,6 +730,7 @@ bool CMipsMemoryVM::LW_NonMemory(uint32_t VAddr, uint32_t & Value)
|
||||||
case 0x05000000: m_CartridgeDomain2Address1Handler.Read32(PAddr, Value); break;
|
case 0x05000000: m_CartridgeDomain2Address1Handler.Read32(PAddr, Value); break;
|
||||||
case 0x06000000: m_CartridgeDomain1Address1Handler.Read32(PAddr, Value); break;
|
case 0x06000000: m_CartridgeDomain1Address1Handler.Read32(PAddr, Value); break;
|
||||||
case 0x08000000: m_CartridgeDomain2Address2Handler.Read32(PAddr, Value); break;
|
case 0x08000000: m_CartridgeDomain2Address2Handler.Read32(PAddr, Value); break;
|
||||||
|
case 0x13F00000: m_ISViewerHandler.Read32(PAddr, Value); break;
|
||||||
case 0x1FC00000: m_PifRamHandler.Read32(PAddr, Value); break;
|
case 0x1FC00000: m_PifRamHandler.Read32(PAddr, Value); break;
|
||||||
case 0x1FF00000: m_CartridgeDomain1Address3Handler.Read32(PAddr, Value); break;
|
case 0x1FF00000: m_CartridgeDomain1Address3Handler.Read32(PAddr, Value); break;
|
||||||
default:
|
default:
|
||||||
|
@ -737,6 +738,11 @@ bool CMipsMemoryVM::LW_NonMemory(uint32_t VAddr, uint32_t & Value)
|
||||||
{
|
{
|
||||||
m_RomMemoryHandler.Read32(PAddr, Value);
|
m_RomMemoryHandler.Read32(PAddr, Value);
|
||||||
}
|
}
|
||||||
|
else if (BreakOnUnhandledMemory())
|
||||||
|
{
|
||||||
|
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||||
|
Value = ((PAddr & 0xFFFF) << 16) | (PAddr & 0xFFFF);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Value = ((PAddr & 0xFFFF) << 16) | (PAddr & 0xFFFF);
|
Value = ((PAddr & 0xFFFF) << 16) | (PAddr & 0xFFFF);
|
||||||
|
|
Loading…
Reference in New Issue