POKEY: it's the opposite

This commit is contained in:
tildearrow 2022-12-20 02:43:37 -05:00
parent f781d63ac2
commit 08f42f1ea0

View file

@ -125,6 +125,10 @@ void DivPlatformPOKEY::tick(bool sysTick) {
chan[i].freq/=7;
switch (chan[i].wave) {
case 6:
chan[i].freq/=5;
chan[i].freq>>=1;
break;
case 7:
if (audctl&1) {
chan[i].freq/=5;
} else {
@ -132,10 +136,6 @@ void DivPlatformPOKEY::tick(bool sysTick) {
}
chan[i].freq>>=1;
break;
case 7:
chan[i].freq/=5;
chan[i].freq>>=1;
break;
default:
chan[i].freq>>=2;
break;
@ -144,11 +144,11 @@ void DivPlatformPOKEY::tick(bool sysTick) {
switch (chan[i].wave) {
case 6:
chan[i].freq<<=1;
chan[i].freq/=15;
chan[i].freq/=5;
break;
case 7:
chan[i].freq<<=1;
chan[i].freq/=5;
chan[i].freq/=15;
break;
}
}
@ -161,13 +161,13 @@ void DivPlatformPOKEY::tick(bool sysTick) {
// snap buzz periods
int minFreq8=255;
if (chan[i].wave==6) {
if (chan[i].wave==7) {
if ((i==0 && audctl&64) || (i==2 && audctl&32)) {
chan[i].freq=15*(chan[i].freq/15)+snapPeriodLong16[(chan[i].freq%15)]+1;
} else {
if (!(audctl&1)) chan[i].freq=15*(chan[i].freq/15)+snapPeriodLong[(chan[i].freq%15)];
}
} else if (chan[i].wave==7) {
} else if (chan[i].wave==6) {
if ((i==0 && audctl&64) || (i==2 && audctl&32)) {
chan[i].freq=15*(chan[i].freq/15)+snapPeriodShort16[(chan[i].freq%15)]+1;
} else {