NES: alternative fix

This commit is contained in:
tildearrow 2022-10-24 22:57:32 -05:00
parent 5cfd74b45f
commit f9209506e1

View file

@ -490,8 +490,8 @@ int DivPlatformNES::dispatch(DivCommand c) {
chan[c.chan].duty=c.value; chan[c.chan].duty=c.value;
if (c.chan==3) { // noise if (c.chan==3) { // noise
chan[c.chan].freqChanged=true; chan[c.chan].freqChanged=true;
} else if (c.chan<2 && chan[c.chan].active) { } else if (c.chan<2) {
rWrite(0x4000+c.chan*4,0x30|chan[c.chan].outVol|((chan[c.chan].duty&3)<<6)); rWrite(0x4000+c.chan*4,0x30|(chan[c.chan].active?chan[c.chan].outVol:0)|((chan[c.chan].duty&3)<<6));
} }
break; break;
case DIV_CMD_NES_SWEEP: case DIV_CMD_NES_SWEEP: