diff --git a/plugins/spu2-x/src/Reverb.cpp b/plugins/spu2-x/src/Reverb.cpp index 4022f1b41d..c16c539552 100644 --- a/plugins/spu2-x/src/Reverb.cpp +++ b/plugins/spu2-x/src/Reverb.cpp @@ -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 // interpolative, instead of the funky ^0x8000 stuff. (better result, faster) -#define A_HACK -#ifndef A_HACK + // A hack! Why? Because gigaherz decided the other version didn't make sense. --air +#define A_HACK 1 +#if A_HACK const s32 FB_A0 = _spu2mem[fb_src_a0] * 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_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_a1] = clamp_mix( acc_fb_mix_b >> 16 ); #endif diff --git a/plugins/spu2-x/src/spu2sys.cpp b/plugins/spu2-x/src/spu2sys.cpp index 1b7fa93a6a..727db8be19 100644 --- a/plugins/spu2-x/src/spu2sys.cpp +++ b/plugins/spu2-x/src/spu2sys.cpp @@ -163,7 +163,12 @@ void V_Core::Reset( int index ) 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; @@ -806,12 +811,19 @@ static void __fastcall RegWrite_VoiceAddr( u16 value ) thisvoice.LoopMode = 3; 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: thisvoice.NextA = ((value & 0x0F) << 16) | (thisvoice.NextA & 0xFFF8); + thisvoice.SCurrent = 28; break; case 5: thisvoice.NextA = (thisvoice.NextA & 0x0F0000) | (value & 0xFFF8); + thisvoice.SCurrent = 28; break; } }