From 0dfdbbdd9b5bc4c5d501ea691116019266651aff Mon Sep 17 00:00:00 2001 From: Sour Date: Tue, 1 Apr 2025 17:40:17 +0900 Subject: [PATCH] WS: APU - Revert LSFR behavior change when noise flag is clear This seems to be incorrect despite the test rom's results - Card Captor's intro sequence freezes for a few seconds because of this --- Core/WS/APU/WsApuCh4.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/WS/APU/WsApuCh4.h b/Core/WS/APU/WsApuCh4.h index 3075f7e9..62915fc4 100644 --- a/Core/WS/APU/WsApuCh4.h +++ b/Core/WS/APU/WsApuCh4.h @@ -26,7 +26,7 @@ public: _state->Timer = 2047 - _state->Frequency; _state->SamplePosition = (_state->SamplePosition + 1) & 0x1F; //todows does this happen even when lfsr is enabled? - if(_state->LfsrEnabled && _state->NoiseEnabled) { + if(_state->LfsrEnabled) { uint8_t newBit = ((_state->Lfsr >> 7) ^ (_state->Lfsr >> _state->TapShift) ^ 0x01) & 0x01; _state->Lfsr = ((_state->Lfsr << 1) | newBit) & 0x7FFF; }