Skip to content

Commit

Permalink
sfc: noise linear feedback shift register state constructed with or n…
Browse files Browse the repository at this point in the history
…ot xor
  • Loading branch information
jeffythedragonslayer committed Jun 12, 2023
1 parent c4863ef commit c4aea44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ares/sfc/dsp/misc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ auto DSP::misc30() -> void {
//noise
if(counterPoll(noise.frequency)) {
s32 feedback = noise.lfsr << 13 ^ noise.lfsr << 14;
noise.lfsr = feedback & 0x4000 ^ noise.lfsr >> 1;
noise.lfsr = feedback & 0x4000 | noise.lfsr >> 1;
}
}

0 comments on commit c4aea44

Please sign in to comment.