mirror of
https://github.com/tildearrow/furnace.git
synced 2025-01-06 23:51:21 +00:00
NES: fix arp macro
This commit is contained in:
parent
893b48b9bb
commit
37c2ea3097
1 changed files with 14 additions and 3 deletions
|
@ -271,9 +271,20 @@ void DivPlatformNES::tick(bool sysTick) {
|
|||
if (chan[i].freqChanged || chan[i].keyOn || chan[i].keyOff) {
|
||||
if (i==3) { // noise
|
||||
int ntPos=chan[i].baseFreq;
|
||||
if (ntPos<0) ntPos=0;
|
||||
if (ntPos>252) ntPos=252;
|
||||
chan[i].freq=(parent->song.properNoiseLayout)?(15-(chan[i].baseFreq&15)):(noiseTable[ntPos]);
|
||||
if (NEW_ARP_STRAT) {
|
||||
if (chan[i].fixedArp) {
|
||||
ntPos=chan[i].baseNoteOverride;
|
||||
} else {
|
||||
ntPos+=chan[i].arpOff;
|
||||
}
|
||||
}
|
||||
if (parent->song.properNoiseLayout) {
|
||||
if (ntPos<0) ntPos=0;
|
||||
if (ntPos>252) ntPos=252;
|
||||
chan[i].freq=noiseTable[ntPos];
|
||||
} else {
|
||||
chan[i].freq=15-(ntPos&15);
|
||||
}
|
||||
} else {
|
||||
chan[i].freq=parent->calcFreq(chan[i].baseFreq,chan[i].pitch,chan[i].fixedArp?chan[i].baseNoteOverride:chan[i].arpOff,chan[i].fixedArp,true,0,chan[i].pitch2,chipClock,CHIP_DIVIDER)-1;
|
||||
if (chan[i].freq>2047) chan[i].freq=2047;
|
||||
|
|
Loading…
Reference in a new issue