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
This commit is contained in:
Sour 2025-04-01 17:40:17 +09:00
parent 7267e28e21
commit 0dfdbbdd9b

View file

@ -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;
}