From cf809cd1df3ef9cd84ea3de1f03f58f27c2115b0 Mon Sep 17 00:00:00 2001 From: ramapcsx2 Date: Fri, 22 Jan 2010 16:02:09 +0000 Subject: [PATCH] Limit EESIF1 scheduled interrupts to a maximum of 384 cycles, stops a lot of timeouts and subsequent reschedules. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2476 96395faa-99c1-11dd-bbfe-3dabce05a288 --- pcsx2/R3000A.cpp | 3 ++- pcsx2/R5900.cpp | 4 +++- pcsx2/Sif.cpp | 8 ++++---- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/pcsx2/R3000A.cpp b/pcsx2/R3000A.cpp index b6e4ebf5a8..120a4a99a0 100644 --- a/pcsx2/R3000A.cpp +++ b/pcsx2/R3000A.cpp @@ -173,7 +173,8 @@ __forceinline void PSX_INT( IopEventId n, s32 ecycle ) DevCon.Warning( "***** IOP > Twice-thrown int on IRQ %d", n ); // 19 is CDVD read int, it's supposed to be high. - //if (ecycle > 8192 && n != 19) DevCon.Warning( "IOP cycles high: %d, n %d", ecycle, n ); + //if (ecycle > 8192 && n != 19) + // DevCon.Warning( "IOP cycles high: %d, n %d", ecycle, n ); psxRegs.interrupt |= 1 << n; diff --git a/pcsx2/R5900.cpp b/pcsx2/R5900.cpp index fdf07022c0..5dfa1e014f 100644 --- a/pcsx2/R5900.cpp +++ b/pcsx2/R5900.cpp @@ -539,7 +539,9 @@ __forceinline void CPU_INT( u32 n, s32 ecycle) DevCon.Warning( "***** EE > Twice-thrown int on IRQ %d", n ); } - //if (ecycle > 8192) DevCon.Warning( "EE cycles high: %d, n %d", ecycle, n ); + //if (ecycle > 8192 && n != DMAC_TO_IPU && n != DMAC_FROM_IPU) { + // DevCon.Warning( "EE cycles high: %d, n %d", ecycle, n ); + //} cpuRegs.interrupt|= 1 << n; cpuRegs.sCycle[n] = cpuRegs.cycle; diff --git a/pcsx2/Sif.cpp b/pcsx2/Sif.cpp index ef5e5ed2db..b381da28fe 100644 --- a/pcsx2/Sif.cpp +++ b/pcsx2/Sif.cpp @@ -130,10 +130,10 @@ __forceinline void SIF1EEDma(int &cycles, int &psxCycles, bool &done) eesifbusy[1] = false; done = true; - // Voodoocycles : 4 cycles always, stops games from throwing double interrupts. - // Edit: Ok, one game (Okami) wants bad timing aparently, so revert this until I know which values it likes. - //CPU_INT(6, 4); - CPU_INT(6, cycles*BIAS); + // Voodoocycles : Okami wants around 100 cycles when booting up + // Other games reach like 50k cycles here, but the EE will long have given up by then and just retry. + // (Cause of double interrupts on the EE) + CPU_INT(6, min( (int)(cycles*BIAS), 384 ) ); sif1.end = 0; } else