From f8e9c20664f3a155ef1335e57a7421bf5e110a27 Mon Sep 17 00:00:00 2001 From: ramapcsx2 Date: Tue, 23 Feb 2010 13:42:58 +0000 Subject: [PATCH] SIF does status communication as well, which we detected as null transfers. Not interrupting on that seems to be bad for a couple games. This commit should fix Persona3 again. (The Eternal Poison problem is something else, will have to look at it more.) git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2629 96395faa-99c1-11dd-bbfe-3dabce05a288 --- pcsx2/Sif0.cpp | 24 ++++++++---------------- pcsx2/Sif1.cpp | 20 ++++++-------------- 2 files changed, 14 insertions(+), 30 deletions(-) diff --git a/pcsx2/Sif0.cpp b/pcsx2/Sif0.cpp index 3232da0c11..3e125a6c45 100644 --- a/pcsx2/Sif0.cpp +++ b/pcsx2/Sif0.cpp @@ -164,14 +164,10 @@ static __forceinline void EndEE() sif0.ee.busy = false; if (sif0.ee.cycles == 0) { - // No transfer happened, DevCon.Warning("SIF0 EE: cycles = 0"); + sif0.ee.cycles = 1; } - else - { - // hence no Interrupt. - CPU_INT(DMAC_SIF0, sif0.ee.cycles*BIAS); - } + CPU_INT(DMAC_SIF0, sif0.ee.cycles*BIAS); } // Stop transferring iop, and signal an interrupt. @@ -184,17 +180,13 @@ static __forceinline void EndIOP() if (sif0.iop.cycles == 0) { - // No transfer happened, - DevCon.Warning("SIF0 IOP: cycles = 0"); - } - else - { - // hence no Interrupt. - // iop is 1/8th the clock rate of the EE and psxcycles is in words (not quadwords) - // So when we're all done, the equation looks like thus: - //PSX_INT(IopEvt_SIF0, ( ( sif0.iop.cycles*BIAS ) / 4 ) / 8); - PSX_INT(IopEvt_SIF0, sif0.iop.cycles); + DevCon.Warning("SIF0 IOP: cycles = 0"); + sif0.iop.cycles = 1; } + // iop is 1/8th the clock rate of the EE and psxcycles is in words (not quadwords) + // So when we're all done, the equation looks like thus: + //PSX_INT(IopEvt_SIF0, ( ( sif0.iop.cycles*BIAS ) / 4 ) / 8); + PSX_INT(IopEvt_SIF0, sif0.iop.cycles); } // Handle the EE transfer. diff --git a/pcsx2/Sif1.cpp b/pcsx2/Sif1.cpp index a64e158cf4..398ea7f0b9 100644 --- a/pcsx2/Sif1.cpp +++ b/pcsx2/Sif1.cpp @@ -185,14 +185,10 @@ static __forceinline void EndEE() // (Cause of double interrupts on the EE) if (sif1.ee.cycles == 0) { - // No transfer happened DevCon.Warning("SIF1 EE: cycles = 0"); + sif1.ee.cycles = 1; } - else - { - // Hence no Interrupt (fixes Eternal Poison reboot when selecting new game) - CPU_INT(DMAC_SIF1, min((int)(sif1.ee.cycles*BIAS), 384)); - } + CPU_INT(DMAC_SIF1, min((int)(sif1.ee.cycles*BIAS), 384)); } // Stop processing IOP, and signal an interrupt. @@ -209,15 +205,11 @@ static __forceinline void EndIOP() //Total cycles over 1024 makes SIF too slow to keep up the sound stream in so3... if (sif1.iop.cycles == 0) { - // No transfer happened - DevCon.Warning("SIF1 IOP: cycles = 0"); - } - else - { - // Hence no Interrupt - // iop is 1/8th the clock rate of the EE and psxcycles is in words (not quadwords) - PSX_INT(IopEvt_SIF1, min((sif1.iop.cycles * 26), 1024)); + DevCon.Warning("SIF1 IOP: cycles = 0"); + sif1.iop.cycles = 1; } + // iop is 1/8th the clock rate of the EE and psxcycles is in words (not quadwords) + PSX_INT(IopEvt_SIF1, min((sif1.iop.cycles * 26), 1024)); } // Handle the EE transfer.