finally do EFxx right

took a while to figure out...
This commit is contained in:
tildearrow 2021-12-28 00:51:38 -05:00
parent b246000f0e
commit d766c4aaf0
13 changed files with 23 additions and 37 deletions

View file

@ -69,7 +69,7 @@ void DivPlatformC64::tick() {
rWrite(i*7+4,(isMuted[i]?0:(chan[i].wave<<4))|(chan[i].ring<<2)|(chan[i].sync<<1)|chan[i].active);
}
if (chan[i].freqChanged || chan[i].keyOn || chan[i].keyOff) {
chan[i].freq=(chan[i].baseFreq*pow(2,(double)chan[i].pitch/(12.0*128.0)));
chan[i].freq=parent->calcFreq(chan[i].baseFreq,chan[i].pitch);
if (chan[i].freq>0xffff) chan[i].freq=0xffff;
if (chan[i].keyOn) {
rWrite(i*7+5,(chan[i].attack<<4)|(chan[i].decay));