diff options
| author | SND\shalma_cp <SND\shalma_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2011-02-04 23:23:41 +0000 |
|---|---|---|
| committer | SND\shalma_cp <SND\shalma_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2011-02-04 23:23:41 +0000 |
| commit | 2d34422469ec621c6c74dd349356a96236f3eee1 (patch) | |
| tree | f3d43740b6db07c699f97a7a58231e8bc459d541 /plugins | |
| parent | a7fb0c3b0d0b51b58ea8d0d20ae50104dc944998 (diff) | |
| download | pcsxr-2d34422469ec621c6c74dd349356a96236f3eee1.tar.gz | |
dfsound
-spu.c- use different async math (usable precision)
experimental patch
-dma.c- r/w irq (spu2-x)
disabled by default
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@62926 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/dfsound/dma.c | 25 | ||||
| -rw-r--r-- | plugins/dfsound/spu.c | 8 |
2 files changed, 27 insertions, 6 deletions
diff --git a/plugins/dfsound/dma.c b/plugins/dfsound/dma.c index f92d0666..d46afa55 100644 --- a/plugins/dfsound/dma.c +++ b/plugins/dfsound/dma.c @@ -46,7 +46,18 @@ void CALLBACK SPUreadDMAMem(unsigned short * pusPSXMem,int iSize) for(i=0;i<iSize;i++)
{
- *pusPSXMem++=spuMem[spuAddr>>1]; // spu addr got by writeregister
+#if 0
+ if(irqCallback && (spuCtrl&0x40)) // some callback and irq active?
+ {
+ // SPU2-X
+ if(pSpuIrq == spuMemC+spuAddr) {
+ irqCallback(); // -> call main emu
+ }
+ }
+#endif
+
+
+ *pusPSXMem++=spuMem[spuAddr>>1]; // spu addr got by writeregister
spuAddr+=2; // inc spu addr
if(spuAddr>0x7ffff) spuAddr=0; // wrap
}
@@ -86,7 +97,17 @@ void CALLBACK SPUwriteDMAMem(unsigned short * pusPSXMem,int iSize) for(i=0;i<iSize;i++)
{
- spuMem[spuAddr>>1] = *pusPSXMem++; // spu addr got by writeregister
+#if 0
+ if(irqCallback && (spuCtrl&0x40)) // some callback and irq active?
+ {
+ // SPU2-X
+ if(pSpuIrq == spuMemC+spuAddr) {
+ irqCallback(); // -> call main emu
+ }
+ }
+#endif
+
+ spuMem[spuAddr>>1] = *pusPSXMem++; // spu addr got by writeregister
spuAddr+=2; // inc spu addr
if(spuAddr>0x7ffff) spuAddr=0; // wrap
}
diff --git a/plugins/dfsound/spu.c b/plugins/dfsound/spu.c index 40e32094..232c1c46 100644 --- a/plugins/dfsound/spu.c +++ b/plugins/dfsound/spu.c @@ -1005,9 +1005,9 @@ void CALLBACK SPUasync(unsigned long cycle) if(iUseTimer==2) // special mode, only used in Linux by this spu (or if you enable the experimental Windows mode) { if(!bSpuInit) return; // -> no init, no call - - // 1 ms updates - while( cpu_cycles >= CPU_CLOCK / INTERVAL_TIME ) +
+ // note: usable precision difference (not using interval_time) + while( cpu_cycles >= CPU_CLOCK / 44100 * NSSIZE ) { #ifdef _WINDOWS MAINProc(0,0,0,0,0); // -> experimental win mode... not really tested... don't like the drawbacks @@ -1015,7 +1015,7 @@ void CALLBACK SPUasync(unsigned long cycle) MAINThread(0); // -> linux high-compat mode #endif - cpu_cycles -= CPU_CLOCK / INTERVAL_TIME; + cpu_cycles -= CPU_CLOCK / 44100 * NSSIZE; } } } |
