From ca92c6f7b2ef1cbe058a803db768b0a1c22c3f2c Mon Sep 17 00:00:00 2001 From: ramapcsx2 Date: Thu, 21 Jan 2010 23:25:54 +0000 Subject: [PATCH] Fix some bad/flickering textures, caused by a too big GIF interrupt delay. Fixes Drakan and a Tekken 5 game mode. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2465 96395faa-99c1-11dd-bbfe-3dabce05a288 --- pcsx2/Gif.cpp | 2 +- pcsx2/R3000A.cpp | 5 ++++- pcsx2/R5900.cpp | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/pcsx2/Gif.cpp b/pcsx2/Gif.cpp index 99160ceebe..ccf1359082 100644 --- a/pcsx2/Gif.cpp +++ b/pcsx2/Gif.cpp @@ -103,7 +103,7 @@ static u32 WRITERING_DMA(u32 *pMem, u32 qwc) memcpy_aligned(pgsmem, pMem, size<<4); GetMTGS().SendDataPacket(); - return size; + return size>>2; } static u32 WRITERING_DMA(tDMA_TAG *pMem, u32 qwc) diff --git a/pcsx2/R3000A.cpp b/pcsx2/R3000A.cpp index d1207bc0f9..b6e4ebf5a8 100644 --- a/pcsx2/R3000A.cpp +++ b/pcsx2/R3000A.cpp @@ -171,7 +171,10 @@ __forceinline void PSX_INT( IopEventId n, s32 ecycle ) // Exception: IRQ16 - SIO - it drops ints like crazy when handling PAD stuff. if( /*n!=16 &&*/ psxRegs.interrupt & (1< 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 ); + psxRegs.interrupt |= 1 << n; psxRegs.sCycle[n] = psxRegs.cycle; diff --git a/pcsx2/R5900.cpp b/pcsx2/R5900.cpp index 489a72a610..fdf07022c0 100644 --- a/pcsx2/R5900.cpp +++ b/pcsx2/R5900.cpp @@ -539,6 +539,8 @@ __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 ); + cpuRegs.interrupt|= 1 << n; cpuRegs.sCycle[n] = cpuRegs.cycle; cpuRegs.eCycle[n] = ecycle;