[Project64] Add Write32RDRAMInterface

This commit is contained in:
zilmar 2015-12-22 16:57:18 +11:00
parent 07f43c3a46
commit d30e09c73f
2 changed files with 22 additions and 15 deletions

View File

@ -2666,21 +2666,7 @@ bool CMipsMemoryVM::SW_NonMemory(uint32_t PAddr, uint32_t Value)
case 0x04400000: Write32VideoInterface(); break;
case 0x04500000: Write32AudioInterface(); break;
case 0x04600000: Write32PeripheralInterface(); break;
case 0x04700000:
switch (PAddr)
{
case 0x04700000: g_Reg->RI_MODE_REG = Value; break;
case 0x04700004: g_Reg->RI_CONFIG_REG = Value; break;
case 0x04700008: g_Reg->RI_CURRENT_LOAD_REG = Value; break;
case 0x0470000C: g_Reg->RI_SELECT_REG = Value; break;
case 0x04700010: g_Reg->RI_REFRESH_REG = Value; break;
case 0x04700014: g_Reg->RI_LATENCY_REG = Value; break;
case 0x04700018: g_Reg->RI_RERROR_REG = Value; break;
case 0x0470001C: g_Reg->RI_WERROR_REG = Value; break;
default:
return false;
}
break;
case 0x04700000: Write32RDRAMInterface(); break;
case 0x04800000:
switch (PAddr)
{
@ -5762,3 +5748,23 @@ void CMipsMemoryVM::Write32PeripheralInterface(void)
}
}
}
void CMipsMemoryVM::Write32RDRAMInterface(void)
{
switch (m_MemLookupAddress & 0xFFFFFFF)
{
case 0x04700000: g_Reg->RI_MODE_REG = m_MemLookupValue.UW[0]; break;
case 0x04700004: g_Reg->RI_CONFIG_REG = m_MemLookupValue.UW[0]; break;
case 0x04700008: g_Reg->RI_CURRENT_LOAD_REG = m_MemLookupValue.UW[0]; break;
case 0x0470000C: g_Reg->RI_SELECT_REG = m_MemLookupValue.UW[0]; break;
case 0x04700010: g_Reg->RI_REFRESH_REG = m_MemLookupValue.UW[0]; break;
case 0x04700014: g_Reg->RI_LATENCY_REG = m_MemLookupValue.UW[0]; break;
case 0x04700018: g_Reg->RI_RERROR_REG = m_MemLookupValue.UW[0]; break;
case 0x0470001C: g_Reg->RI_WERROR_REG = m_MemLookupValue.UW[0]; break;
default:
if (bHaveDebugger())
{
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
}

View File

@ -203,6 +203,7 @@ private:
static void Write32VideoInterface(void);
static void Write32AudioInterface(void);
static void Write32PeripheralInterface(void);
static void Write32RDRAMInterface(void);
CMipsMemory_CallBack * const m_CBClass;