[Project64] Add Load32SerialInterface

This commit is contained in:
zilmar 2015-12-22 06:59:17 +11:00
parent e3caeb8b07
commit f8619bb6e4
2 changed files with 24 additions and 14 deletions

View File

@ -2543,13 +2543,8 @@ bool CMipsMemoryVM::LW_NonMemory(uint32_t PAddr, uint32_t* Value)
*Value = m_MemLookupValue.UW[0];
break;
case 0x04800000:
switch (PAddr)
{
case 0x04800018: *Value = g_Reg->SI_STATUS_REG; break;
default:
*Value = 0;
return false;
}
Load32SerialInterface();
*Value = m_MemLookupValue.UW[0];
break;
case 0x05000000:
*Value = PAddr & 0xFFFF;
@ -2641,10 +2636,10 @@ bool CMipsMemoryVM::SB_NonMemory(uint32_t PAddr, uint8_t Value)
break;
default:
return false;
}
}
return true;
}
}
bool CMipsMemoryVM::SH_NonMemory(uint32_t PAddr, uint16_t Value)
{
@ -2681,10 +2676,10 @@ bool CMipsMemoryVM::SH_NonMemory(uint32_t PAddr, uint16_t Value)
break;
default:
return false;
}
}
return true;
}
}
bool CMipsMemoryVM::SW_NonMemory(uint32_t PAddr, uint32_t Value)
{
@ -3084,7 +3079,7 @@ bool CMipsMemoryVM::SW_NonMemory(uint32_t PAddr, uint32_t Value)
break;
default:
return false;
}
}
break;
case 0x04400000:
switch (PAddr)
@ -3298,10 +3293,10 @@ bool CMipsMemoryVM::SW_NonMemory(uint32_t PAddr, uint32_t Value)
default:
return false;
break;
}
}
return true;
}
}
void CMipsMemoryVM::UpdateHalfLine()
{
@ -5698,4 +5693,18 @@ void CMipsMemoryVM::Load32RDRAMInterface(void)
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
}
void CMipsMemoryVM::Load32SerialInterface(void)
{
switch (m_MemLookupAddress & 0x1FFFFFFF)
{
case 0x04800018: m_MemLookupValue.UW[0] = g_Reg->SI_STATUS_REG; break;
default:
m_MemLookupValue.UW[0] = 0;
if (bHaveDebugger())
{
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
}

View File

@ -190,6 +190,7 @@ private:
static void Load32AudioInterface(void);
static void Load32PeripheralInterface(void);
static void Load32RDRAMInterface(void);
static void Load32SerialInterface(void);
CMipsMemory_CallBack * const m_CBClass;