Forgot this in the last commit.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2575 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
arcum42 2010-02-07 13:04:37 +00:00
parent dc79e34ac9
commit fbbe9c3299
1 changed files with 16 additions and 0 deletions

View File

@ -94,8 +94,10 @@ void InitADSR();
// functions of main emu, called on spu irq
void (*irqCallbackSPU2)()=0;
#ifndef ENABLE_NEW_IOPDMA_SPU2
void (*irqCallbackDMA4)()=0;
void (*irqCallbackDMA7)()=0;
#endif
uptr g_pDMABaseAddr=0;
@ -402,7 +404,9 @@ void CALLBACK SPU2async(u32 cycle)
if (SPUCycles - SPUStartCycle[1] >= SPUTargetCycle[1])
{
interrupt &= ~(1<<2);
#ifndef ENABLE_NEW_IOPDMA_SPU2
irqCallbackDMA7();
#endif
}
}
@ -412,7 +416,9 @@ void CALLBACK SPU2async(u32 cycle)
if (SPUCycles - SPUStartCycle[0] >= SPUTargetCycle[0])
{
interrupt &= ~(1<<1);
#ifndef ENABLE_NEW_IOPDMA_SPU2
irqCallbackDMA4();
#endif
}
}
@ -600,10 +606,12 @@ void MixChannels(s32 core)
interrupt &= ~(0x2 * (core + 1));
WARN_LOG("Stopping double interrupt DMA7\n");
}
#ifndef ENABLE_NEW_IOPDMA_SPU2
if (core == 0)
irqCallbackDMA4();
else
irqCallbackDMA7();
#endif
}
if (core == 1) Adma->Enabled = 2;
@ -1386,6 +1394,13 @@ void CALLBACK SPU2setDMABaseAddr(uptr baseaddr)
g_pDMABaseAddr = baseaddr;
}
#ifdef ENABLE_NEW_IOPDMA_SPU2
void CALLBACK SPU2irqCallback(void (*SPU2callback)())
{
LOG_CALLBACK("SPU2irqCallback()\n");
irqCallbackSPU2 = SPU2callback;
}
#else
void CALLBACK SPU2irqCallback(void (*SPU2callback)(),void (*DMA4callback)(),void (*DMA7callback)())
{
LOG_CALLBACK("SPU2irqCallback()\n");
@ -1393,6 +1408,7 @@ void CALLBACK SPU2irqCallback(void (*SPU2callback)(),void (*DMA4callback)(),void
irqCallbackDMA4 = DMA4callback;
irqCallbackDMA7 = DMA7callback;
}
#endif
s32 CALLBACK SPU2test()
{