From 6798f27d4d7713d584b345055d4218f91a9829a3 Mon Sep 17 00:00:00 2001 From: ramapcsx2 Date: Mon, 16 Aug 2010 18:04:05 +0000 Subject: [PATCH] Found and fixed the issue causing some FFX battles to hang since ~400 revs ago. The same problem caused the hang in Phantasy Star 4 when pressing pause. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3645 96395faa-99c1-11dd-bbfe-3dabce05a288 --- pcsx2/Sif0.cpp | 18 ++++++++++++------ pcsx2/Sif1.cpp | 18 ++++++++++++------ 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/pcsx2/Sif0.cpp b/pcsx2/Sif0.cpp index 5cb93d78e7..af60bb60af 100644 --- a/pcsx2/Sif0.cpp +++ b/pcsx2/Sif0.cpp @@ -342,11 +342,17 @@ __fi void dmaSIF0() psHu32(SBUS_F240) |= 0x2000; sif0.ee.busy = true; - /*if (sif0.iop.busy) - {*/ - hwIntcIrq(INTC_SBUS); + // Okay, this here is needed currently (r3644). + // FFX battles in the thunder plains map die otherwise, Phantasy Star 4 as well + // These 2 games could be made playable again by increasing the time the EE or the IOP run, + // showing that this is very timing sensible. + // Doing this DMA unfortunately brings back an old warning in Legend of Legaia though, but it still works. + if (sif0.iop.busy) + { + //hwIntcIrq(INTC_SBUS); // not sure, so let's not SIF0Dma(); - psHu32(SBUS_F240) &= ~0x20; - psHu32(SBUS_F240) &= ~0x2000; - //} + // Do we really want to mess with the SIF flags like that? Nah. + //psHu32(SBUS_F240) &= ~0x20; + //psHu32(SBUS_F240) &= ~0x2000; + } } diff --git a/pcsx2/Sif1.cpp b/pcsx2/Sif1.cpp index 99f60d74d7..9581f15fca 100644 --- a/pcsx2/Sif1.cpp +++ b/pcsx2/Sif1.cpp @@ -341,11 +341,17 @@ __fi void dmaSIF1() psHu32(SBUS_F240) |= 0x4000; sif1.ee.busy = true; - /*if (sif1.iop.busy) - {*/ + // Okay, this here is needed currently (r3644). + // FFX battles in the thunder plains map die otherwise, Phantasy Star 4 as well + // These 2 games could be made playable again by increasing the time the EE or the IOP run, + // showing that this is very timing sensible. + // Doing this DMA unfortunately brings back an old warning in Legend of Legaia though, but it still works. + if (sif1.iop.busy) + { SIF1Dma(); - psHu32(SBUS_F240) &= ~0x40; - psHu32(SBUS_F240) &= ~0x100; - psHu32(SBUS_F240) &= ~0x4000; - //} + // Do we really want to mess with the SIF flags like that? Nah. + //psHu32(SBUS_F240) &= ~0x40; + //psHu32(SBUS_F240) &= ~0x100; + //psHu32(SBUS_F240) &= ~0x4000; + } }