summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorSND\shalma_cp <SND\shalma_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2011-02-10 16:21:30 +0000
committerSND\shalma_cp <SND\shalma_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2011-02-10 16:21:30 +0000
commit0d0c354caca3db41fec09e3ea471d31a2b7692be (patch)
treefd00f448aa22094818db68836f66e268afad44ad /plugins
parenta1d7de1f72b5adcbf9bd1c782f4a185c0a02b6ec (diff)
downloadpcsxr-0d0c354caca3db41fec09e3ea471d31a2b7692be.tar.gz
Undo shalma damage
- cdrom.c- Vib Ribbon (decoded buffer - do in spu) - cdrom.c- Crash Team Racing (decoded buffer - do in spu) - xa.c- xa+cdda decoded buffer (fix mistakes) - spu.c- voice 1/3 decoded buffer (optional) Disabled > Please treat all shalma-hopkat work as suspicious (faulty + not hw-accurate) git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@63195 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'plugins')
-rw-r--r--plugins/dfsound/spu.c11
-rw-r--r--plugins/dfsound/xa.c67
2 files changed, 41 insertions, 37 deletions
diff --git a/plugins/dfsound/spu.c b/plugins/dfsound/spu.c
index 9650f45c..3a37f7c5 100644
--- a/plugins/dfsound/spu.c
+++ b/plugins/dfsound/spu.c
@@ -801,6 +801,17 @@ GOON: ;
if(s_chan[ch].bNoise)
fa=iGetNoiseVal(ch); // get noise val
else fa=iGetInterpolationVal(ch); // get sample val
+
+
+#if 0
+ // Voice 1/3 decoded buffer
+ if( ch == 0 ) {
+ spuMem[ (0x800 + voice_dbuf_ptr) / 2 ] = (short) fa;
+ } else if( ch == 2 ) {
+ spuMem[ (0xc00 + voice_dbuf_ptr) / 2 ] = (short) fa;
+ }
+#endif
+
s_chan[ch].sval = (MixADSR(ch) * fa) / 1023; // mix adsr
diff --git a/plugins/dfsound/xa.c b/plugins/dfsound/xa.c
index b7adacf7..32614a29 100644
--- a/plugins/dfsound/xa.c
+++ b/plugins/dfsound/xa.c
@@ -59,16 +59,6 @@ long cdxa_dbuf_ptr;
// MIX XA & CDDA
////////////////////////////////////////////////////////////////////////
-/*
-Attenuation
-- Blade_Arma (edgbla) (PCSX-reloaded)
-- accurate (!)
-
-
-s32 lc = (spsound[i ] * attenuators.val0 + spsound[i+1] * attenuators.val3]) / 128;
-s32 rc = (spsound[i+1] * attenuators.val2 + spsound[i ] * attenuators.val1]) / 128;
-*/
-
static int lastxa_lc, lastxa_rc;
static int lastcd_lc, lastcd_rc;
@@ -103,11 +93,13 @@ INLINE void MixXA(void)
lastxa_rc = rc;
- // Tales of Phantasia - voice meter
- if( cdxa_dbuf_ptr >= 0x800 )
+#if 0
+ if( cdxa_dbuf_ptr >= 0x400 )
cdxa_dbuf_ptr = 0;
- spuMem[ cdxa_dbuf_ptr++ ] = lc;
- spuMem[ cdxa_dbuf_ptr++ ] = rc;
+ spuMem[ (cdxa_dbuf_ptr + 0)/2 ] = lc;
+ spuMem[ (cdxa_dbuf_ptr + 0x400)/2 ] = rc;
+ cdxa_dbuf_ptr += 2;
+#endif
}
if(XAPlay==XAFeed && XARepeat)
@@ -118,12 +110,14 @@ INLINE void MixXA(void)
SSumL[ns]+=lastxa_rc;
SSumR[ns]+=lastxa_rc;
-
+#if 0
// Tales of Phantasia - voice meter
- if( cdxa_dbuf_ptr >= 0x800 )
+ if( cdxa_dbuf_ptr >= 0x400 )
cdxa_dbuf_ptr = 0;
- spuMem[ cdxa_dbuf_ptr++ ] = lastxa_rc;
- spuMem[ cdxa_dbuf_ptr++ ] = lastxa_rc;
+ spuMem[ (cdxa_dbuf_ptr + 0)/2 ] = lastxa_rc;
+ spuMem[ (cdxa_dbuf_ptr + 0x400)/2 ] = lastxa_rc;
+ cdxa_dbuf_ptr += 2;
+#endif
}
}
@@ -143,6 +137,15 @@ INLINE void MixXA(void)
SSumL[ns]+=lc;
SSumR[ns]+=rc;
+#if 0
+ // Vib Ribbon - playback
+ if( cdxa_dbuf_ptr >= 0x400 )
+ cdxa_dbuf_ptr = 0;
+ spuMem[ (cdxa_dbuf_ptr + 0)/2 ] = lc;
+ spuMem[ (cdxa_dbuf_ptr + 0x400)/2 ] = rc;
+ cdxa_dbuf_ptr += 2;
+#endif
+
// improve crackle - buffer under
// - not update fast enough
lastcd_lc = lc;
@@ -155,6 +158,15 @@ INLINE void MixXA(void)
//XARepeat--;
for(;ns<NSSIZE;ns++)
{
+#if 0
+ // Vib Ribbon - playback
+ if( cdxa_dbuf_ptr >= 0x400 )
+ cdxa_dbuf_ptr = 0;
+ spuMem[ (cdxa_dbuf_ptr + 0)/2 ] = lastcd_lc;
+ spuMem[ (cdxa_dbuf_ptr + 0x400)/2 ] = lastcd_rc;
+ cdxa_dbuf_ptr += 2;
+#endif
+
SSumL[ns]+=lastcd_lc;
SSumR[ns]+=lastcd_rc;
}
@@ -390,25 +402,6 @@ INLINE void FeedCDDA(unsigned char *pcm, int nBytes)
*CDDAFeed++=(*pcm | (*(pcm+1)<<8) | (*(pcm+2)<<16) | (*(pcm+3)<<24));
nBytes-=4;
pcm+=4;
-
-
-#if 0
- /*
- Vib Ribbon
- $00000-$003ff CD audio left
- $00400-$007ff CD audio right
- */
-
- // TIMING: perform in PCSX-r
- // - gets data from reverb buffer, only update this at intervals (not real-time)
-
- // remember: 16-bit ptrs
- spuMem[ cdda_ptr ] = (l >> 0) & 0xffff;
- spuMem[ cdda_ptr+0x200 ] = (l >> 16) & 0xffff;
-
- cdda_ptr++;
- cdda_ptr &= 0x1ff;
-#endif
}
}