mirror of https://github.com/PCSX2/pcsx2.git
SPU2-X: Re-enable resets, the games that were buggy with them enabled now seem to be fixed. This fixes music in Fatal Frame, FMVs in Devil May Cry PAL, and may fix music looping in God of War when run without the BIOS skip hack (or that might work without this change).
SPU2-X: Disable IRQs on reset. This is a guess, but it fixes the BIOS with resets re-enabled. SPU2-X: More detailed IRQ logging. CDVD: Ignore the disc type reported by the plugin, we have our own test and it's working more reliably. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2779 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
b9afcac346
commit
6dd23f3c8d
|
@ -241,6 +241,7 @@ static void DetectDiskType()
|
|||
|
||||
// Paranoid mode: do not trust the plugin's detection system to work correctly.
|
||||
// (.. and there's no reason plugins should be doing their own detection anyway).
|
||||
#if 0
|
||||
|
||||
switch(baseMediaType)
|
||||
{
|
||||
|
@ -267,6 +268,7 @@ static void DetectDiskType()
|
|||
diskTypeCached = CDVD_TYPE_NODISC;
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
diskTypeCached = FindDiskType(mType);
|
||||
}
|
||||
|
|
|
@ -103,8 +103,10 @@ static void __forceinline XA_decode_block(s16* buffer, const s16* block, s32& pr
|
|||
}
|
||||
}
|
||||
|
||||
static void __forceinline IncrementNextA( const V_Core& thiscore, V_Voice& vc )
|
||||
static void __forceinline IncrementNextA(V_Core& thiscore, uint voiceidx)
|
||||
{
|
||||
V_Voice &vc(thiscore.Voices[voiceidx]);
|
||||
|
||||
// Important! Both cores signal IRQ when an address is read, regardless of
|
||||
// which core actually reads the address.
|
||||
|
||||
|
@ -113,7 +115,7 @@ static void __forceinline IncrementNextA( const V_Core& thiscore, V_Voice& vc )
|
|||
if( Cores[i].IRQEnable && (vc.NextA==Cores[i].IRQA ) )
|
||||
{
|
||||
if( IsDevBuild )
|
||||
ConLog(" * SPU2 Core %d: IRQ Called (IRQ passed).\n", i);
|
||||
ConLog(" * SPU2 Core %d: IRQ Called (IRQA (%05X) passed; voice %d).\n", i, Cores[i].IRQA, thiscore.Index * 24 + voiceidx);
|
||||
|
||||
Spdif.Info |= 4 << i;
|
||||
SetIrqCall();
|
||||
|
@ -211,7 +213,7 @@ static __forceinline s32 __fastcall GetNextDataBuffered( V_Core& thiscore, uint
|
|||
if( (vc.SCurrent&3) == 3 )
|
||||
{
|
||||
_Increment:
|
||||
IncrementNextA( thiscore, vc );
|
||||
IncrementNextA( thiscore, voiceidx );
|
||||
}
|
||||
|
||||
return vc.SBuffer[vc.SCurrent++];
|
||||
|
@ -237,14 +239,14 @@ static __forceinline void __fastcall GetNextDataDummy(V_Core& thiscore, uint voi
|
|||
if ((vc.LoopFlags & XAFLAG_LOOP_START) && !vc.LoopMode)
|
||||
vc.LoopStartA = vc.NextA;
|
||||
|
||||
IncrementNextA(thiscore, vc);
|
||||
IncrementNextA(thiscore, voiceidx);
|
||||
|
||||
vc.SCurrent = 0;
|
||||
}
|
||||
|
||||
vc.SP -= 4096 * (4 - (vc.SCurrent & 3));
|
||||
vc.SCurrent += 4 - (vc.SCurrent & 3);
|
||||
IncrementNextA(thiscore, vc);
|
||||
IncrementNextA(thiscore, voiceidx);
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -135,7 +135,7 @@ void V_Core::Reset( int index )
|
|||
|
||||
FxEnable = 0;
|
||||
IRQA = 0xFFFF0;
|
||||
IRQEnable = 1;
|
||||
IRQEnable = 0;
|
||||
|
||||
for( uint v=0; v<NumVoices; ++v )
|
||||
{
|
||||
|
@ -304,13 +304,12 @@ __forceinline void TimeUpdate(u32 cClocks)
|
|||
{
|
||||
if(has_to_call_irq)
|
||||
{
|
||||
ConLog(" * SPU2: Irq Called (%04x).\n",Spdif.Info);
|
||||
ConLog(" * SPU2: Irq Called (%04x) at cycle %d.\n", Spdif.Info, Cycles);
|
||||
has_to_call_irq=false;
|
||||
if(_irqcallback) _irqcallback();
|
||||
}
|
||||
|
||||
// Part of the no core resets hack. See fixme in RegWrite_Core.
|
||||
/*if(Cores[0].InitDelay>0)
|
||||
if(Cores[0].InitDelay>0)
|
||||
{
|
||||
Cores[0].InitDelay--;
|
||||
if(Cores[0].InitDelay==0)
|
||||
|
@ -326,7 +325,7 @@ __forceinline void TimeUpdate(u32 cClocks)
|
|||
{
|
||||
Cores[1].Reset(1);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
#ifndef ENABLE_NEW_IOPDMA_SPU2
|
||||
//Update DMA4 interrupt delay counter
|
||||
|
@ -855,12 +854,9 @@ static void __fastcall RegWrite_Core( u16 value )
|
|||
{
|
||||
// When we have exact cycle update info from the Pcsx2 IOP unit, then use
|
||||
// the more accurate delayed initialization system.
|
||||
ConLog( " * SPU2: Runtime core%d reset requested, (but ignored. Hack.). \n", core );
|
||||
// Fixme:
|
||||
// Not initializing a core reset here fixes SH Shattered Memories and Silver Surfer audio.
|
||||
// This is a hack, but better than clearing the wrong bits.
|
||||
// Also check the commented out code in TimeUpdate() above.
|
||||
/*if(cyclePtr != NULL)
|
||||
ConLog( " * SPU2: Runtime core%d reset\n", core );
|
||||
|
||||
if(cyclePtr != NULL)
|
||||
{
|
||||
thiscore.InitDelay = 1;
|
||||
thiscore.Regs.STATX = 0;
|
||||
|
@ -868,7 +864,7 @@ static void __fastcall RegWrite_Core( u16 value )
|
|||
else
|
||||
{
|
||||
thiscore.Reset(thiscore.Index);
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
thiscore.AttrBit0 =(value>> 0) & 0x01; //1 bit
|
||||
|
|
Loading…
Reference in New Issue