From 37edbb7d48a17b7321ebeb5bcf992c7d77fd2662 Mon Sep 17 00:00:00 2001 From: "SND\\shalma_cp" Date: Sun, 5 Sep 2010 00:59:20 +0000 Subject: Vib Ribbon CD swapping needed fixing (CDROM) - Game still not working (SPU CDDA timing problems.. maybe) dfsound: feed CDDA data to SPU RAM for decoded buffer IRQs git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@56823 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- plugins/dfsound/xa.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/dfsound/xa.c b/plugins/dfsound/xa.c index 0c1ae57a..a121f62f 100644 --- a/plugins/dfsound/xa.c +++ b/plugins/dfsound/xa.c @@ -395,6 +395,8 @@ INLINE void FeedXA(xa_decode_t *xap) // FEED CDDA //////////////////////////////////////////////////////////////////////// +unsigned int cdda_ptr; + INLINE void FeedCDDA(unsigned char *pcm, int nBytes) { while(nBytes>0) @@ -414,7 +416,17 @@ INLINE void FeedCDDA(unsigned char *pcm, int nBytes) *CDDAFeed++=(*pcm | (*(pcm+1)<<8) | (*(pcm+2)<<16) | (*(pcm+3)<<24)); nBytes-=4; pcm+=4; - } + + + spuMem[ cdda_ptr ] = *pcm | (*(pcm+1)<<8); + spuMem[ cdda_ptr+0x400 ] = *(pcm+2) | (*(pcm+3)<<8); + + cdda_ptr++; + if( cdda_ptr >= 0x400 ) + { + cdda_ptr &= 0x3ff; + } + } } #endif -- cgit v1.2.3