mirror of https://github.com/PCSX2/pcsx2.git
SPU2-X:
- Added an interrupt call on a special register write, which mimics peops spu2 behavior. This lets Silent Hill Origins get further when booting up. Note that it's not complete and hackish, need someone with spu2 experience to make it right :p - Also added various logging stuff git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2600 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
839d5b37f4
commit
8d7971466d
|
@ -32,3 +32,6 @@ static const s64 PSXCLK = 36864000; /* 36.864 Mhz */
|
|||
//#define PSXCLK 9216000 /* 36.864 Mhz */
|
||||
//#define PSXCLK 186864000 /* 36.864 Mhz */
|
||||
|
||||
// Uncomment to make pcsx2 print each spu2 interrupt it receives
|
||||
//#define SPU2IRQTEST
|
||||
|
||||
|
|
|
@ -84,6 +84,9 @@ void psxDma4(u32 madr, u32 bcr, u32 chcr) // SPU2's Core 0
|
|||
|
||||
int psxDma4Interrupt()
|
||||
{
|
||||
#ifdef SPU2IRQTEST
|
||||
Console.Warning("psxDma4Interrupt()");
|
||||
#endif
|
||||
HW_DMA4_CHCR &= ~0x01000000;
|
||||
psxDmaInterrupt(4);
|
||||
iopIntcIrq(9);
|
||||
|
@ -92,6 +95,9 @@ int psxDma4Interrupt()
|
|||
|
||||
void spu2DMA4Irq()
|
||||
{
|
||||
#ifdef SPU2IRQTEST
|
||||
Console.Warning("spu2DMA4Irq()");
|
||||
#endif
|
||||
SPU2interruptDMA4();
|
||||
HW_DMA4_CHCR &= ~0x01000000;
|
||||
psxDmaInterrupt(4);
|
||||
|
@ -104,6 +110,9 @@ void psxDma7(u32 madr, u32 bcr, u32 chcr) // SPU2's Core 1
|
|||
|
||||
int psxDma7Interrupt()
|
||||
{
|
||||
#ifdef SPU2IRQTEST
|
||||
Console.Warning("psxDma7Interrupt()");
|
||||
#endif
|
||||
HW_DMA7_CHCR &= ~0x01000000;
|
||||
psxDmaInterrupt2(0);
|
||||
return 1;
|
||||
|
@ -112,6 +121,9 @@ int psxDma7Interrupt()
|
|||
|
||||
void spu2DMA7Irq()
|
||||
{
|
||||
#ifdef SPU2IRQTEST
|
||||
Console.Warning("spu2DMA7Irq()");
|
||||
#endif
|
||||
SPU2interruptDMA7();
|
||||
HW_DMA7_CHCR &= ~0x01000000;
|
||||
psxDmaInterrupt2(0);
|
||||
|
|
|
@ -52,6 +52,9 @@ void fwIrq()
|
|||
|
||||
void spu2Irq()
|
||||
{
|
||||
#ifdef SPU2IRQTEST
|
||||
Console.Warning("spu2Irq");
|
||||
#endif
|
||||
iopIntcIrq(9);
|
||||
hwIntcIrq(INTC_SBUS);
|
||||
}
|
||||
|
|
|
@ -1198,7 +1198,7 @@ void recompileNextInstruction(int delayslot)
|
|||
const OPCODE& opcode = GetCurrentInstruction();
|
||||
|
||||
//pxAssert( !(g_pCurInstInfo->info & EEINSTINFO_NOREC) );
|
||||
|
||||
//Console.Warning("opcode name = %s, it's cycles = %d\n",opcode.Name,opcode.cycles);
|
||||
// if this instruction is a jump or a branch, exit right away
|
||||
if( delayslot ) {
|
||||
switch(_Opcode_) {
|
||||
|
|
|
@ -1429,6 +1429,15 @@ static RegWriteHandler * const tbl_reg_writes[0x401] =
|
|||
|
||||
__forceinline void SPU2_FastWrite( u32 rmem, u16 value )
|
||||
{
|
||||
// Check for these 2 adresses and schedule an interrupt when they get written with 0x3fff.
|
||||
// This is what peops spu2 does, and it helps silent hill origins start a bit more stuff.
|
||||
if (value == 0x3fff && (rmem == 0x1f900500 || rmem == 0x1f900400) ) {
|
||||
// no idea which core ><
|
||||
Spdif.Info |= 4 << 0;
|
||||
SetIrqCall();
|
||||
ConLog( "SPU2-X: Schedule IRQ for odd register write. rmem = %x , value = %x \n", rmem, value);
|
||||
}
|
||||
|
||||
tbl_reg_writes[(rmem&0x7ff)/2]( value );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue