-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Right now, the noise LFSR is clocked on every cycle. So, after PSG channel 0 is updated, the LFSR will shift 512 times before the channel is updated again.
This produces an undesirable (to me at least) ringing sound when you play noise with a frequency at a multiple of $400 (i.e., $F800, $FC00, etc). It also produces a lower-pitched (but still noticeable) ringing sound at multiples of $400 plus an offset of $200 (i.e., $FA00, $FE00, etc), and a third at offsets of $100 and $300.
This does not appear in the emulator, which only clocks the LFSR when it goes to update each PSG channel (a total of 16 times only).
I propose the LFSR clocking strategy is changed such that it is only clocked during CALC_CH or FETCH_CH. I'm not fluent in Verilog, but it looks like you'd just need to move two lines of code (the reset, and the shift itself) to accomplish this (EDIT: Maybe just the shift itself, so just one line), and it'd remove the ringing sound while keeping the rest of the noise waveform's characteristics intact (like how it sounds in the emulator).
I acknowledge that this is more of a cosmetic change than a critical bug, but I'd like to throw my hat in as a user who'd appreciate it.