Make sure MADR is within MFIFO's buffer limits.

Prevents Tekken Tag Tournament from crashing.
This commit is contained in:
Jean-Philip Desjardins 2018-06-14 06:50:54 -04:00
parent 24c0ff7117
commit aa4f946dcf

View File

@ -168,6 +168,9 @@ void CChannel::ExecuteNormal()
if(isMfifo)
{
m_nMADR &= m_dmac.m_D_RBSR;
m_nMADR |= m_dmac.m_D_RBOR;
//Adjust QWC if we're in MFIFO mode
uint32 ringBufferAddr = m_nMADR - m_dmac.m_D_RBOR;
uint32 ringBufferSize = m_dmac.m_D_RBSR + 0x10;