mirror of https://github.com/PCSX2/pcsx2.git
SPU2-X: Added IRQA testing to Reverb Effects Processing.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2729 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
4c700bc17e
commit
c173002be0
|
@ -108,7 +108,7 @@ static void __forceinline IncrementNextA( const V_Core& thiscore, V_Voice& vc )
|
|||
// Important! Both cores signal IRQ when an address is read, regardless of
|
||||
// which core actually reads the address.
|
||||
|
||||
for( int i=0; i<2; i++ )
|
||||
for( uint i=0; i<2; i++ )
|
||||
{
|
||||
if( Cores[i].IRQEnable && (vc.NextA==Cores[i].IRQA ) )
|
||||
{
|
||||
|
@ -533,7 +533,7 @@ static s32 __forceinline __fastcall GetNoiseValues( V_Core& thiscore, uint voice
|
|||
static __forceinline void spu2M_WriteFast( u32 addr, s16 value )
|
||||
{
|
||||
// Fixes some of the oldest hangs in pcsx2's history! :p
|
||||
for( int i=0; i<2; i++ )
|
||||
for( uint i=0; i<2; i++ )
|
||||
{
|
||||
if( Cores[i].IRQEnable && Cores[i].IRQA == addr )
|
||||
{
|
||||
|
|
|
@ -120,6 +120,46 @@ StereoOut32 V_Core::DoReverb( const StereoOut32& Input )
|
|||
const u32 mix_dest_b0 = RevbGetIndexer( RevBuffers.MIX_DEST_B0 );
|
||||
const u32 mix_dest_b1 = RevbGetIndexer( RevBuffers.MIX_DEST_B1 );
|
||||
|
||||
// -----------------------------------------
|
||||
// Optimized IRQ Testing !
|
||||
// -----------------------------------------
|
||||
|
||||
// This test is enhanced by using the reverb effects area begin/end test as a
|
||||
// shortcut, since all buffer addresses are within that area. If the IRQA isn't
|
||||
// within that zone then the "bulk" of the test is skipped, so this should only
|
||||
// be a slowdown on a few evil games.
|
||||
|
||||
for( uint i=0; i<2; i++ )
|
||||
{
|
||||
if( Cores[i].IRQEnable && ((Cores[i].IRQA >= EffectsStartA) && (Cores[i].IRQA <= EffectsEndA)) )
|
||||
{
|
||||
if( (Cores[i].IRQA == src_a0) || (Cores[i].IRQA == src_a1) ||
|
||||
(Cores[i].IRQA == src_b0) || (Cores[i].IRQA == src_b1) ||
|
||||
|
||||
(Cores[i].IRQA == dest_a0) || (Cores[i].IRQA == dest_a1) ||
|
||||
(Cores[i].IRQA == dest_b0) || (Cores[i].IRQA == dest_b1) ||
|
||||
|
||||
(Cores[i].IRQA == dest2_a0) || (Cores[i].IRQA == dest2_a1) ||
|
||||
(Cores[i].IRQA == dest2_b0) || (Cores[i].IRQA == dest2_b1) ||
|
||||
|
||||
(Cores[i].IRQA == acc_src_a0) || (Cores[i].IRQA == acc_src_a1) ||
|
||||
(Cores[i].IRQA == acc_src_b0) || (Cores[i].IRQA == acc_src_b1) ||
|
||||
(Cores[i].IRQA == acc_src_c0) || (Cores[i].IRQA == acc_src_c1) ||
|
||||
(Cores[i].IRQA == acc_src_d0) || (Cores[i].IRQA == acc_src_d1) ||
|
||||
|
||||
(Cores[i].IRQA == fb_src_a0) || (Cores[i].IRQA == fb_src_a1) ||
|
||||
(Cores[i].IRQA == fb_src_b0) || (Cores[i].IRQA == fb_src_b1) ||
|
||||
|
||||
(Cores[i].IRQA == mix_dest_a0) || (Cores[i].IRQA == mix_dest_a1) ||
|
||||
(Cores[i].IRQA == mix_dest_b0) || (Cores[i].IRQA == mix_dest_b1) )
|
||||
{
|
||||
//printf("Core %d IRQ Called (Reverb). IRQA = %x\n",i,addr);
|
||||
Spdif.Info |= 4 << i;
|
||||
SetIrqCall();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// -----------------------------------------
|
||||
// Begin Reverb Processing !
|
||||
// -----------------------------------------
|
||||
|
|
Loading…
Reference in New Issue