[Project64] Add Load32SPRegisters
This commit is contained in:
parent
4a0d9b640b
commit
9692ecf1b4
|
@ -2515,20 +2515,8 @@ bool CMipsMemoryVM::LW_NonMemory(uint32_t PAddr, uint32_t* Value)
|
||||||
*Value = m_MemLookupValue.UW[0];
|
*Value = m_MemLookupValue.UW[0];
|
||||||
break;
|
break;
|
||||||
case 0x04000000:
|
case 0x04000000:
|
||||||
switch (PAddr)
|
Load32SPRegisters();
|
||||||
{
|
*Value = m_MemLookupValue.UW[0];
|
||||||
case 0x04040010: *Value = g_Reg->SP_STATUS_REG; break;
|
|
||||||
case 0x04040014: *Value = g_Reg->SP_DMA_FULL_REG; break;
|
|
||||||
case 0x04040018: *Value = g_Reg->SP_DMA_BUSY_REG; break;
|
|
||||||
case 0x0404001C:
|
|
||||||
*Value = g_Reg->SP_SEMAPHORE_REG;
|
|
||||||
g_Reg->SP_SEMAPHORE_REG = 1;
|
|
||||||
break;
|
|
||||||
case 0x04080000: *Value = g_Reg->SP_PC_REG; break;
|
|
||||||
default:
|
|
||||||
*Value = 0;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 0x04100000:
|
case 0x04100000:
|
||||||
switch (PAddr)
|
switch (PAddr)
|
||||||
|
@ -5636,3 +5624,24 @@ void CMipsMemoryVM::Load32RDRAMRegisters(void)
|
||||||
}
|
}
|
||||||
m_MemLookupValid = true;
|
m_MemLookupValid = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CMipsMemoryVM::Load32SPRegisters(void)
|
||||||
|
{
|
||||||
|
switch (m_MemLookupAddress & 0x1FFFFFFF)
|
||||||
|
{
|
||||||
|
case 0x04040010: m_MemLookupValue.UW[0] = g_Reg->SP_STATUS_REG; break;
|
||||||
|
case 0x04040014: m_MemLookupValue.UW[0] = g_Reg->SP_DMA_FULL_REG; break;
|
||||||
|
case 0x04040018: m_MemLookupValue.UW[0] = g_Reg->SP_DMA_BUSY_REG; break;
|
||||||
|
case 0x0404001C:
|
||||||
|
m_MemLookupValue.UW[0] = g_Reg->SP_SEMAPHORE_REG;
|
||||||
|
g_Reg->SP_SEMAPHORE_REG = 1;
|
||||||
|
break;
|
||||||
|
case 0x04080000: m_MemLookupValue.UW[0] = g_Reg->SP_PC_REG; break;
|
||||||
|
default:
|
||||||
|
m_MemLookupValue.UW[0] = 0;
|
||||||
|
if (bHaveDebugger())
|
||||||
|
{
|
||||||
|
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -183,6 +183,7 @@ private:
|
||||||
void Compile_StoreInstructClean(x86Reg AddressReg, int32_t Length);
|
void Compile_StoreInstructClean(x86Reg AddressReg, int32_t Length);
|
||||||
|
|
||||||
static void Load32RDRAMRegisters(void);
|
static void Load32RDRAMRegisters(void);
|
||||||
|
static void Load32SPRegisters(void);
|
||||||
|
|
||||||
CMipsMemory_CallBack * const m_CBClass;
|
CMipsMemory_CallBack * const m_CBClass;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue