SPU2-X: Reverb tweaks. Still shooting in the dark, so no promises on if this helps or hurts. -_-

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3227 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
Jake.Stine 2010-06-19 03:33:41 +00:00
parent aaedf7ac6e
commit 29fc645157
2 changed files with 17 additions and 4 deletions

View File

@ -211,8 +211,9 @@ StereoOut32 V_Core::DoReverb( const StereoOut32& Input )
// The following code differs from Neill's doc as it uses the more natural single-mul // The following code differs from Neill's doc as it uses the more natural single-mul
// interpolative, instead of the funky ^0x8000 stuff. (better result, faster) // interpolative, instead of the funky ^0x8000 stuff. (better result, faster)
#define A_HACK // A hack! Why? Because gigaherz decided the other version didn't make sense. --air
#ifndef A_HACK #define A_HACK 1
#if A_HACK
const s32 FB_A0 = _spu2mem[fb_src_a0] * Revb.FB_ALPHA; const s32 FB_A0 = _spu2mem[fb_src_a0] * Revb.FB_ALPHA;
const s32 FB_A1 = _spu2mem[fb_src_a1] * Revb.FB_ALPHA; const s32 FB_A1 = _spu2mem[fb_src_a1] * Revb.FB_ALPHA;
@ -223,7 +224,7 @@ StereoOut32 V_Core::DoReverb( const StereoOut32& Input )
const s32 acc_fb_mix_a = ACC0 + ( (_spu2mem[fb_src_a0] - (ACC0>>16)) * Revb.FB_ALPHA ); const s32 acc_fb_mix_a = ACC0 + ( (_spu2mem[fb_src_a0] - (ACC0>>16)) * Revb.FB_ALPHA );
const s32 acc_fb_mix_b = ACC1 + ( (_spu2mem[fb_src_a1] - (ACC1>>16)) * Revb.FB_ALPHA ); const s32 acc_fb_mix_b = ACC1 + ( (_spu2mem[fb_src_a1] - (ACC1>>16)) * Revb.FB_ALPHA );
#ifdef A_HACK #if A_HACK
_spu2mem[mix_dest_a0] = clamp_mix( acc_fb_mix_a >> 16 ); _spu2mem[mix_dest_a0] = clamp_mix( acc_fb_mix_a >> 16 );
_spu2mem[mix_dest_a1] = clamp_mix( acc_fb_mix_b >> 16 ); _spu2mem[mix_dest_a1] = clamp_mix( acc_fb_mix_b >> 16 );
#endif #endif

View File

@ -163,7 +163,12 @@ void V_Core::Reset( int index )
s32 V_Core::EffectsBufferIndexer( s32 offset ) const s32 V_Core::EffectsBufferIndexer( s32 offset ) const
{ {
offset *= 4; // Should offsets be multipled by 4 or not? Reverse-engineering of IOP code reveals
// that it *4's all addresses before upping them to the SPU2 -- so our buffers are
// already x4'd. It doesn't really make sense that we should x4 them again, and this
// seems to work. (feedback-free in bios and DDS) --air
//offset *= 4;
u32 pos = EffectsStartA + offset; u32 pos = EffectsStartA + offset;
@ -806,12 +811,19 @@ static void __fastcall RegWrite_VoiceAddr( u16 value )
thisvoice.LoopMode = 3; thisvoice.LoopMode = 3;
break; break;
// Note that there's no proof that I know of that writing to NextA is
// even allowed or handled by the SPU2 (it might be disabled or ignored,
// for example). Tests should be done to find games that write to this
// reg, and see if they're buggy or not. --air
case 4: case 4:
thisvoice.NextA = ((value & 0x0F) << 16) | (thisvoice.NextA & 0xFFF8); thisvoice.NextA = ((value & 0x0F) << 16) | (thisvoice.NextA & 0xFFF8);
thisvoice.SCurrent = 28;
break; break;
case 5: case 5:
thisvoice.NextA = (thisvoice.NextA & 0x0F0000) | (value & 0xFFF8); thisvoice.NextA = (thisvoice.NextA & 0x0F0000) | (value & 0xFFF8);
thisvoice.SCurrent = 28;
break; break;
} }
} }