Core: let the stack pointer equal end of rdram
This commit is contained in:
parent
7199096748
commit
ab03916a70
|
@ -1484,7 +1484,7 @@ void CN64System::SyncCPU(CN64System * const SecondCPU)
|
|||
{
|
||||
uint32_t StackPointer = (m_Reg.m_GPR[29].W[0] & 0x1FFFFFFF);
|
||||
uint8_t * TargetStackPos = nullptr;
|
||||
if (StackPointer < m_MMU_VM.RdramSize())
|
||||
if (StackPointer <= m_MMU_VM.RdramSize())
|
||||
{
|
||||
TargetStackPos = m_MMU_VM.Rdram() + StackPointer;
|
||||
}
|
||||
|
@ -1669,7 +1669,7 @@ void CN64System::DumpSyncErrors(CN64System * SecondCPU)
|
|||
{
|
||||
uint32_t StackPointer = (m_Reg.m_GPR[29].W[0] & 0x1FFFFFFF);
|
||||
uint8_t * TargetStackPos = nullptr;
|
||||
if (StackPointer < m_MMU_VM.RdramSize())
|
||||
if (StackPointer <= m_MMU_VM.RdramSize())
|
||||
{
|
||||
TargetStackPos = m_MMU_VM.Rdram() + StackPointer;
|
||||
}
|
||||
|
|
|
@ -535,7 +535,7 @@ void CRecompiler::ResetMemoryStackPos()
|
|||
uint32_t pAddr = 0;
|
||||
if (m_MMU.VAddrToPAddr(m_Registers.m_GPR[29].UW[0], pAddr))
|
||||
{
|
||||
if (pAddr < m_MMU.RdramSize())
|
||||
if (pAddr <= m_MMU.RdramSize())
|
||||
{
|
||||
m_MemoryStack = m_MMU.Rdram() + pAddr;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue