mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-04 20:05:05 +00:00
more. SMS. fixes.
This commit is contained in:
parent
0caaa1629c
commit
53975349e5
3 changed files with 16 additions and 2 deletions
|
@ -12,6 +12,7 @@ enum DivDispatchCmds {
|
||||||
DIV_CMD_PITCH,
|
DIV_CMD_PITCH,
|
||||||
DIV_CMD_PANNING,
|
DIV_CMD_PANNING,
|
||||||
DIV_CMD_LEGATO,
|
DIV_CMD_LEGATO,
|
||||||
|
DIV_CMD_PRE_PORTA,
|
||||||
|
|
||||||
DIV_CMD_SAMPLE_MODE,
|
DIV_CMD_SAMPLE_MODE,
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,13 @@ void DivPlatformSMS::tick() {
|
||||||
}
|
}
|
||||||
chan[i].freqChanged=true;
|
chan[i].freqChanged=true;
|
||||||
}
|
}
|
||||||
|
if (chan[i].std.hadDuty) {
|
||||||
|
snNoiseMode=(snNoiseMode&2)|(chan[i].std.duty&1);
|
||||||
|
if (chan[i].std.duty<2) {
|
||||||
|
chan[3].freqChanged=false;
|
||||||
|
}
|
||||||
|
updateSNMode=true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
for (int i=0; i<3; i++) {
|
for (int i=0; i<3; i++) {
|
||||||
if (chan[i].freqChanged) {
|
if (chan[i].freqChanged) {
|
||||||
|
@ -74,8 +81,10 @@ int DivPlatformSMS::dispatch(DivCommand c) {
|
||||||
//chan[c.chan].std.init(parent->getIns(chan[c.chan].ins));
|
//chan[c.chan].std.init(parent->getIns(chan[c.chan].ins));
|
||||||
break;
|
break;
|
||||||
case DIV_CMD_VOLUME:
|
case DIV_CMD_VOLUME:
|
||||||
chan[c.chan].vol=c.value;
|
if (chan[c.chan].vol!=c.value) {
|
||||||
sn->write(0x90|c.chan<<5|(15-chan[c.chan].vol));
|
chan[c.chan].vol=c.value;
|
||||||
|
sn->write(0x90|c.chan<<5|(15-chan[c.chan].vol));
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case DIV_CMD_PITCH:
|
case DIV_CMD_PITCH:
|
||||||
chan[c.chan].pitch=c.value;
|
chan[c.chan].pitch=c.value;
|
||||||
|
@ -110,6 +119,9 @@ int DivPlatformSMS::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:
|
||||||
|
chan[c.chan].std.init(parent->getIns(chan[c.chan].ins));
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -190,6 +190,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
||||||
chan[i].portaNote=chan[i].note;
|
chan[i].portaNote=chan[i].note;
|
||||||
chan[i].portaSpeed=effectVal;
|
chan[i].portaSpeed=effectVal;
|
||||||
chan[i].doNote=false;
|
chan[i].doNote=false;
|
||||||
|
dispatch->dispatch(DivCommand(DIV_CMD_PRE_PORTA,i));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 0x04: // vibrato
|
case 0x04: // vibrato
|
||||||
|
|
Loading…
Reference in a new issue