diff options
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; } } } |
