summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSND\shalma_cp <SND\shalma_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2010-11-05 01:26:34 +0000
committerSND\shalma_cp <SND\shalma_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2010-11-05 01:26:34 +0000
commitff6c04a6bb5c60ac7187a388092eb615cf98e65e (patch)
treea9ff65f261d9305d9fa9a24a7462920d2ad550d2
parent2b6ea02233738cb25672f4286e4e4da076208ce6 (diff)
downloadpcsxr-ff6c04a6bb5c60ac7187a388092eb615cf98e65e.tar.gz
mdec.c
- Turn off MDEC1_BUSY idea - experimental: not in use git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@59191 e17a0e51-4ae3-4d35-97c3-1a29b211df97
-rw-r--r--libpcsxcore/mdec.c49
1 files changed, 48 insertions, 1 deletions
diff --git a/libpcsxcore/mdec.c b/libpcsxcore/mdec.c
index 28a03fb5..2f4c565e 100644
--- a/libpcsxcore/mdec.c
+++ b/libpcsxcore/mdec.c
@@ -607,7 +607,54 @@ void mdec1Interrupt() {
// MDECOUTDMA_INT(psxRegs.intCycle[PSXINT_MDECOUTDMA].cycle * 8);
HW_DMA1_CHCR &= SWAP32(~0x01000000);
- DMA_INTERRUPT(1);
+ DMA_INTERRUPT(1);
+
+
+#if 0
+ /*
+ Destruction Derby Raw: stall 4+ blocks
+ - Fixes boot movies
+
+ Final Fantasy 9: stall 4+ blocks
+ - Prevent Dali video from infinite stall, corruption
+
+ Rebel Assault 2: stall 8+ blocks
+ - Fixes boot movies, stage 6 play
+ */
+
+ {
+ int blk[DSIZE2 * 6];
+ int lcv, size;
+ u16 *img;
+
+
+#define PRECACHE_STALL 8
+
+ img = mdec.rl;
+ size = mdec.rlsize * 4;
+ for( lcv = 0; lcv < PRECACHE_STALL; lcv++ ) {
+ u8 *old_img;
+
+ old_img = (u8 *) img;
+ img = rl2blk(blk, img);
+
+ size -= (u8 *) img - old_img;
+ if( size < 0 ) break;
+ }
+
+ // pre-cache input stall - turn off mdec
+ if( size < 0 )
+ {
+ #ifdef CDR_LOG
+ CDR_LOG( "BUSY STALL %X [IN = %X, SIZE = %X]\n",
+ lcv, ((u8 *)img - (u8 *)mdec.rl)/4, mdec.rlsize );
+ #endif
+
+ // drain input + wait before timing out
+ MDECOUTDMA_INT( (PRECACHE_STALL * 1) * (16 * 16 * 3) );
+ }
+ }
+#endif
} else {
mdec.reg1 &= ~MDEC1_BUSY;
}