mirror of
https://github.com/tildearrow/furnace.git
synced 2024-12-29 02:51:24 +00:00
NES: enable duty and'ing on properNoiseLayout
This commit is contained in:
parent
76beedae0c
commit
1bb81394aa
2 changed files with 8 additions and 2 deletions
|
@ -307,7 +307,7 @@ int DivPlatformGB::dispatch(DivCommand c) {
|
|||
chan[c.chan].freqChanged=true;
|
||||
chan[c.chan].note=c.value;
|
||||
break;
|
||||
case DIV_CMD_PRE_PORTA: // aaaaaaaa
|
||||
case DIV_CMD_PRE_PORTA:
|
||||
if (chan[c.chan].active) {
|
||||
chan[c.chan].std.init(parent->getIns(chan[c.chan].ins));
|
||||
}
|
||||
|
|
|
@ -139,7 +139,13 @@ void DivPlatformNES::tick() {
|
|||
}
|
||||
if (chan[i].std.hadDuty) {
|
||||
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) {
|
||||
rWrite(0x4000+i*4,0x30|chan[i].outVol|((chan[i].duty&3)<<6));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue