mirror of
https://github.com/ARMSX2/ARMSX2.git
synced 2026-08-24 16:50:16 -07:00
Implemented memory mode check in cop0.cpp (#3324)
This makes Next Generation Tennis 2003 (Roland Garros French Open 2003) and Spongebob Battle for Bikini Bottom (PAL) work.
This commit is contained in:
+3
-4
@@ -121,10 +121,9 @@ __fi void COP0_UpdatePCCR()
|
||||
{
|
||||
//if( cpuRegs.CP0.n.Status.b.ERL || !cpuRegs.PERF.n.pccr.b.CTE ) return;
|
||||
|
||||
// TODO : Implement memory mode checks here (kernel/super/user)
|
||||
// For now we just assume kernel mode.
|
||||
// Implemented memory mode check (kernel/super/user)
|
||||
|
||||
if( cpuRegs.PERF.n.pccr.val & 0xf )
|
||||
if( cpuRegs.PERF.n.pccr.val & ((1 << (cpuRegs.CP0.n.Status.b.KSU + 2)) | (cpuRegs.CP0.n.Status.b.EXL << 1)))
|
||||
{
|
||||
// ----------------------------------
|
||||
// Update Performance Counter 0
|
||||
@@ -175,7 +174,7 @@ __fi void COP0_UpdatePCCR()
|
||||
}
|
||||
}
|
||||
|
||||
if( cpuRegs.PERF.n.pccr.b.U1 )
|
||||
if( cpuRegs.PERF.n.pccr.val & ((1 << (cpuRegs.CP0.n.Status.b.KSU + 12)) | (cpuRegs.CP0.n.Status.b.EXL << 11)))
|
||||
{
|
||||
// ----------------------------------
|
||||
// Update Performance Counter 1
|
||||
|
||||
Reference in New Issue
Block a user