mirror of
https://github.com/jpd002/Play-.git
synced 2025-04-28 13:47:57 +03:00
Make sure reading COP0 COUNT always gives a different result.
This commit is contained in:
parent
8435915c01
commit
fff2be404c
1 changed files with 9 additions and 0 deletions
|
@ -116,6 +116,15 @@ void CCOP_SCU::MFC0()
|
|||
break;
|
||||
}
|
||||
break;
|
||||
case CCOP_SCU::COUNT:
|
||||
//Some games will have issues if subsequent reads of this register
|
||||
//give the same result. Increment its value by one to make sure
|
||||
//we don't trip some logic that would give a bad result.
|
||||
m_codeGen->PushRel(offsetof(CMIPS, m_State.nCOP0[CCOP_SCU::COUNT]));
|
||||
m_codeGen->PushCst(1);
|
||||
m_codeGen->Add();
|
||||
m_codeGen->PullRel(offsetof(CMIPS, m_State.nCOP0[CCOP_SCU::COUNT]));
|
||||
[[fallthrough]];
|
||||
default:
|
||||
m_codeGen->PushRel(offsetof(CMIPS, m_State.nCOP0[m_nRD]));
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue