standlalone cutoff macro (with correct relative mode)

This commit is contained in:
LTVA1 2023-10-28 10:15:41 +03:00
parent 006f0d6f48
commit 0f760a365e
2 changed files with 22 additions and 0 deletions

View file

@ -173,6 +173,19 @@ void DivPlatformC64::tick(bool sysTick) {
willUpdateFilter=true;
}
}
if (chan[i].std.alg.had) { //new cutoff macro!
DivInstrument* ins = parent->getIns(chan[i].ins, DIV_INS_C64);
if (ins->c64.filterIsAbs) {
filtCut = MIN(2047, chan[i].std.alg.val);
}
else {
filtCut += ((signed char)chan[i].std.alg.val) * 7; //new macro should not be executed in inverted way when in relative mode jesus
if (filtCut > 2047) filtCut = 2047;
if (filtCut < 0) filtCut = 0;
}
willUpdateFilter = true;
}
if (NEW_ARP_STRAT) {
chan[i].handleArp();
} else if (chan[i].std.arp.had) {