SPU2-X: Implemented SPU2reset method for handling a PS2 reset.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4721 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
sudonim1@gmail.com 2011-06-08 20:30:57 +00:00
parent f423da573f
commit 555e9ee039
3 changed files with 12 additions and 4 deletions

View File

@ -296,6 +296,14 @@ EXPORT_C_(void) CALLBACK SPU2writeDMA7Mem(u16* pMem, u32 size)
Cores[1].DoDMAwrite(pMem,size);
}
EXPORT_C_(void) SPU2reset()
{
memset(spu2regs, 0, 0x010000);
memset(_spu2mem, 0, 0x200000);
Cores[0].Init(0);
Cores[1].Init(1);
}
EXPORT_C_(s32) SPU2init()
{
assert( regtable[0x400] == NULL );
@ -349,10 +357,7 @@ EXPORT_C_(s32) SPU2init()
}
}
memset(spu2regs, 0, 0x010000);
memset(_spu2mem, 0, 0x200000);
Cores[0].Init(0);
Cores[1].Init(1);
SPU2reset();
DMALogOpen();
InitADSR();

View File

@ -34,6 +34,7 @@
// We have our own versions that have the DLLExport attribute configured:
EXPORT_C_(s32) SPU2init();
EXPORT_C_(void) SPU2reset();
EXPORT_C_(s32) SPU2open(void *pDsp);
EXPORT_C_(void) SPU2close();
EXPORT_C_(void) SPU2shutdown();

View File

@ -61,3 +61,5 @@ EXPORTS
SPU2setDMABaseAddr @32
SPU2replay = s2r_replay @33
SPU2reset @34