NES: enable duty and'ing on properNoiseLayout
This commit is contained in:
parent
76beedae0c
commit
1bb81394aa
|
@ -307,7 +307,7 @@ int DivPlatformGB::dispatch(DivCommand c) {
|
||||||
chan[c.chan].freqChanged=true;
|
chan[c.chan].freqChanged=true;
|
||||||
chan[c.chan].note=c.value;
|
chan[c.chan].note=c.value;
|
||||||
break;
|
break;
|
||||||
case DIV_CMD_PRE_PORTA: // aaaaaaaa
|
case DIV_CMD_PRE_PORTA:
|
||||||
if (chan[c.chan].active) {
|
if (chan[c.chan].active) {
|
||||||
chan[c.chan].std.init(parent->getIns(chan[c.chan].ins));
|
chan[c.chan].std.init(parent->getIns(chan[c.chan].ins));
|
||||||
}
|
}
|
||||||
|
|
|
@ -139,7 +139,13 @@ void DivPlatformNES::tick() {
|
||||||
}
|
}
|
||||||
if (chan[i].std.hadDuty) {
|
if (chan[i].std.hadDuty) {
|
||||||
chan[i].duty=chan[i].std.duty;
|
chan[i].duty=chan[i].std.duty;
|
||||||
if (i==3 && chan[i].duty>1) chan[i].duty=1;
|
if (i==3) {
|
||||||
|
if (parent->song.properNoiseLayout) {
|
||||||
|
chan[i].duty&=1;
|
||||||
|
} else if (chan[i].duty>1) {
|
||||||
|
chan[i].duty=1;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (i!=2) {
|
if (i!=2) {
|
||||||
rWrite(0x4000+i*4,0x30|chan[i].outVol|((chan[i].duty&3)<<6));
|
rWrite(0x4000+i*4,0x30|chan[i].outVol|((chan[i].duty&3)<<6));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue