fixed noise pitch

This commit is contained in:
AArt1256 2024-08-08 23:07:40 +03:00
parent 9d279ceadb
commit 6f370e9d62

View file

@ -151,7 +151,7 @@ void DivPlatformSupervision::tick(bool sysTick) {
} }
} }
ntPos+=chan[i].pitch2; ntPos+=chan[i].pitch2;
chan[i].freq=ntPos&15; chan[i].freq=15-(ntPos&15);
unsigned char r = (chan[i].freq<<4)|(chan[i].outVol&0xf); unsigned char r = (chan[i].freq<<4)|(chan[i].outVol&0xf);
if (noiseReg[0] != r) rWrite(0x28,r); if (noiseReg[0] != r) rWrite(0x28,r);
noiseReg[0] = r; noiseReg[0] = r;