From 733e3daa182a344ec5a9b7ae499444ae85f8e7dc Mon Sep 17 00:00:00 2001 From: ramapcsx2 Date: Sat, 17 Oct 2009 14:15:33 +0000 Subject: [PATCH] Tested the cycle changes extensively on legacy_gui, they are fine. So bringing them over to pcsx2/wx now. They're tagged with "voodoocycles" in the source, to easily test for regressions (or improvements!) :p git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2018 96395faa-99c1-11dd-bbfe-3dabce05a288 --- pcsx2/CDVD/CDVD_internal.h | 7 ++++++- pcsx2/IPU/IPU.cpp | 9 ++++++++- pcsx2/Sif.cpp | 6 +++++- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/pcsx2/CDVD/CDVD_internal.h b/pcsx2/CDVD/CDVD_internal.h index 863de29a44..f77c4c6b00 100644 --- a/pcsx2/CDVD/CDVD_internal.h +++ b/pcsx2/CDVD/CDVD_internal.h @@ -115,7 +115,12 @@ static const uint tbl_ContigiousSeekDelta[3] = // concerned with accurate(ish) seek delays and less concerned with actual block read speeds. // Translation: it's a minor speedhack :D -static const uint PSX_CD_READSPEED = 153600; // 1 Byte Time @ x1 (150KB = cd x 1) +//Fixme ( voodoocycles ): +//The current CD mode gives a too low transfer rate. HDloader reports 900kb/s, while the theoretical max is 3600kb/s +//Silent Hill 2 videos starve of data and stall. +//So let's double that until the cause of the slow data rate is known. + +static const uint PSX_CD_READSPEED = 153600 * 2; // 1 Byte Time @ x1 (150KB = cd x 1) static const uint PSX_DVD_READSPEED = 1382400 + 256000; // normal is 1 Byte Time @ x1 (1350KB = dvd x 1). // Legacy Note: FullSeek timing causes many games to load very slow, but it likely not the real problem. diff --git a/pcsx2/IPU/IPU.cpp b/pcsx2/IPU/IPU.cpp index 8e4087e7b4..5596828925 100644 --- a/pcsx2/IPU/IPU.cpp +++ b/pcsx2/IPU/IPU.cpp @@ -1656,6 +1656,7 @@ void FIFOfrom_read(void *value, int size) int IPU0dma() { int readsize; + static int totalsize = 0; void* pMem; if ((!(ipu0dma->chcr.STR) || (cpuRegs.interrupt & (1 << DMAC_FROM_IPU))) || (ipu0dma->qwc == 0)) @@ -1670,6 +1671,7 @@ int IPU0dma() pMem = (u32*)dmaGetAddr(ipu0dma->madr); readsize = min(ipu0dma->qwc, (u16)ipuRegs->ctrl.OFC); + totalsize+=readsize; FIFOfrom_read(pMem, readsize); ipu0dma->madr += readsize << 4; @@ -1695,7 +1697,12 @@ int IPU0dma() break; } } - IPU_INT_FROM(readsize*BIAS); + //Fixme ( voodoocycles ): + //This was IPU_INT_FROM(readsize*BIAS ); + //This broke vids in Digital Devil Saga + //Note that interrupting based on totalsize is just guessing.. + IPU_INT_FROM(totalsize*BIAS ); + totalsize=0; } return readsize; diff --git a/pcsx2/Sif.cpp b/pcsx2/Sif.cpp index a8cf8c7714..69a0a4c9f3 100644 --- a/pcsx2/Sif.cpp +++ b/pcsx2/Sif.cpp @@ -382,7 +382,11 @@ __forceinline void SIF1Dma() SIF_LOG(" IOP SIF interrupt"); iopsifbusy[1] = false; - PSX_INT(IopEvt_SIF1, psxCycles); + + //Fixme ( voodoocycles ): + //The *50 are needed for ecco the dolphin (CDVD hangs) and silver surfer (Pad not detected) + + PSX_INT(IopEvt_SIF1, psxCycles * 50); sif1.tagMode = 0; done = true; }