From a6cfe578fbbd0dccd28540e61b188d9ec95727a2 Mon Sep 17 00:00:00 2001 From: Persune <54422576+Gumball2415@users.noreply.github.com> Date: Sat, 14 Aug 2021 17:23:26 +0800 Subject: [PATCH 1/2] Fix interference audio phase relative to 2A03 --- Core/Console.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/Console.cpp b/Core/Console.cpp index 8d1cbc6f..fb6a1c4e 100644 --- a/Core/Console.cpp +++ b/Core/Console.cpp @@ -473,10 +473,10 @@ void Console::ProcessCpuClock() void Console::ProcessInterferenceAudio() { - _InvA13 = _ppu->_A13pinLow; + _InvA13 = (_ppu->_A13pinLow == 1) ? 0 : 1; // invert relative to 2A03 _controlManager->GetInvOE1(_controlManager->_address); - _InvOE1 = _controlManager->_OE1pinLow; + _InvOE1 = (_controlManager->_OE1pinLow == 1) ? 0 : 1; // invert relative to 2A03 if (_controlManager->_strobed == true) _controlManager->_strobed = false; From 5077180c55d3bcb3af8e853efffc58f35e99d1b4 Mon Sep 17 00:00:00 2001 From: Persune <54422576+Gumball2415@users.noreply.github.com> Date: Sat, 14 Aug 2021 17:24:06 +0800 Subject: [PATCH 2/2] Adjust audio interference mix to match better TODO: add highpass filter to /OE1 --- Core/SoundMixer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/SoundMixer.cpp b/Core/SoundMixer.cpp index be8c9b17..7446f193 100644 --- a/Core/SoundMixer.cpp +++ b/Core/SoundMixer.cpp @@ -277,8 +277,8 @@ int16_t SoundMixer::GetOutputVolume(bool forRightChannel) #endif GetChannelOutput(AudioChannel::EPSM_L, forRightChannel) * 4 + GetChannelOutput(AudioChannel::EPSM_R, forRightChannel) * 4 + - GetChannelOutput(AudioChannel::InvA13, forRightChannel) * 500 + - GetChannelOutput(AudioChannel::InvOE1, forRightChannel) * 500 + GetChannelOutput(AudioChannel::InvA13, forRightChannel) * 20 + + GetChannelOutput(AudioChannel::InvOE1, forRightChannel) * 1000 ); }