NES: fix duty effect not working at all

This commit is contained in:
tildearrow 2022-05-04 22:04:18 -05:00
parent 10e8d71745
commit 6aefd392ff
2 changed files with 3 additions and 0 deletions

View file

@ -304,6 +304,7 @@ int DivPlatformMMC5::dispatch(DivCommand c) {
}
case DIV_CMD_STD_NOISE_MODE:
chan[c.chan].duty=c.value;
rWrite(0x5000+c.chan*4,0x30|chan[c.chan].outVol|((chan[c.chan].duty&3)<<6));
break;
case DIV_CMD_SAMPLE_BANK:
sampleBank=c.value;

View file

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