From 2d34422469ec621c6c74dd349356a96236f3eee1 Mon Sep 17 00:00:00 2001 From: "SND\\shalma_cp" Date: Fri, 4 Feb 2011 23:23:41 +0000 Subject: 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 --- plugins/dfsound/dma.c | 25 +++++++++++++++++++++++-- plugins/dfsound/spu.c | 8 ++++---- 2 files changed, 27 insertions(+), 6 deletions(-) (limited to 'plugins') 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>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>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; } } } -- cgit v1.2.3