Lynx: add phase reset macro

This commit is contained in:
tildearrow 2022-05-25 00:28:47 -05:00
parent 051cd6e966
commit 42a082b2a7
2 changed files with 9 additions and 1 deletions

View file

@ -195,6 +195,13 @@ void DivPlatformLynx::tick(bool sysTick) {
chan[i].freqChanged=true;
}
if (chan[i].std.phaseReset.had) {
if (chan[i].std.phaseReset.val==1) {
WRITE_LFSR(i, 0);
WRITE_OTHER(i, 0);
}
}
if (chan[i].freqChanged) {
if (chan[i].lfsr >= 0) {
WRITE_LFSR(i, (chan[i].lfsr&0xff));