el diego 2 finally plays back correctly

ALMOST
This commit is contained in:
tildearrow 2021-12-27 16:31:16 -05:00
parent 4f2ce0f907
commit 65444d4a99
10 changed files with 20 additions and 13 deletions

View file

@ -241,7 +241,7 @@ void DivPlatformGenesisExt::tick() {
unsigned char writeMask=2;
if (extMode) for (int i=0; i<4; i++) {
if (opChan[i].freqChanged) {
opChan[i].freq=(opChan[i].baseFreq*(ONE_SEMITONE+opChan[i].pitch))/ONE_SEMITONE;
opChan[i].freq=(opChan[i].baseFreq*pow(2,(double)opChan[i].pitch/(12.0*128.0)));
if (opChan[i].freq>=82432) {
opChan[i].freqH=((opChan[i].freq>>15)&7)|0x38;
opChan[i].freqL=(opChan[i].freq>>7)&0xff;