parent
05d101e42e
commit
677f7fe682
|
@ -360,26 +360,6 @@ void DivPlatformES5506::tick(bool sysTick) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (chan[i].pcm.isNoteMap) {
|
|
||||||
// note map macros
|
|
||||||
if (chan[i].std.wave.had) {
|
|
||||||
if (chan[i].std.wave.val>=0 && chan[i].std.wave.val<120) {
|
|
||||||
if (chan[i].pcm.next!=chan[i].std.wave.val) {
|
|
||||||
chan[i].pcm.next=chan[i].std.wave.val;
|
|
||||||
chan[i].pcmChanged.index=1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (!chan[i].pcm.isNoteMap) {
|
|
||||||
if (chan[i].std.wave.had) {
|
|
||||||
if (chan[i].std.wave.val>=0 && chan[i].std.wave.val<parent->song.sampleLen) {
|
|
||||||
if (chan[i].pcm.next!=chan[i].std.wave.val) {
|
|
||||||
chan[i].pcm.next=chan[i].std.wave.val;
|
|
||||||
chan[i].pcmChanged.index=1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// update registers
|
// update registers
|
||||||
if (chan[i].volChanged.changed) {
|
if (chan[i].volChanged.changed) {
|
||||||
// calculate volume (16 bit)
|
// calculate volume (16 bit)
|
||||||
|
@ -432,7 +412,7 @@ void DivPlatformES5506::tick(bool sysTick) {
|
||||||
off=(double)center/8363.0;
|
off=(double)center/8363.0;
|
||||||
}
|
}
|
||||||
if (ins->amiga.useNoteMap) {
|
if (ins->amiga.useNoteMap) {
|
||||||
chan[i].pcm.note=next;
|
//chan[i].pcm.note=next;
|
||||||
}
|
}
|
||||||
// get loop mode
|
// get loop mode
|
||||||
DivSampleLoopMode loopMode=s->isLoopable()?s->loopMode:DIV_SAMPLE_LOOP_MAX;
|
DivSampleLoopMode loopMode=s->isLoopable()?s->loopMode:DIV_SAMPLE_LOOP_MAX;
|
||||||
|
@ -748,13 +728,13 @@ int DivPlatformES5506::dispatch(DivCommand c) {
|
||||||
if (((ins->amiga.useNoteMap) && (c.value>=0 && c.value<120)) ||
|
if (((ins->amiga.useNoteMap) && (c.value>=0 && c.value<120)) ||
|
||||||
((!ins->amiga.useNoteMap) && (ins->amiga.initSample>=0 && ins->amiga.initSample<parent->song.sampleLen))) {
|
((!ins->amiga.useNoteMap) && (ins->amiga.initSample>=0 && ins->amiga.initSample<parent->song.sampleLen))) {
|
||||||
int sample=ins->amiga.getSample(c.value);
|
int sample=ins->amiga.getSample(c.value);
|
||||||
c.value=ins->amiga.getFreq(c.value);
|
|
||||||
if (sample>=0 && sample<parent->song.sampleLen) {
|
if (sample>=0 && sample<parent->song.sampleLen) {
|
||||||
sampleValid=true;
|
sampleValid=true;
|
||||||
chan[c.chan].volMacroMax=ins->type==DIV_INS_AMIGA?64:0xfff;
|
chan[c.chan].volMacroMax=ins->type==DIV_INS_AMIGA?64:0xfff;
|
||||||
chan[c.chan].panMacroMax=ins->type==DIV_INS_AMIGA?127:0xfff;
|
chan[c.chan].panMacroMax=ins->type==DIV_INS_AMIGA?127:0xfff;
|
||||||
chan[c.chan].pcm.note=c.value;
|
|
||||||
chan[c.chan].pcm.next=ins->amiga.useNoteMap?c.value:sample;
|
chan[c.chan].pcm.next=ins->amiga.useNoteMap?c.value:sample;
|
||||||
|
c.value=ins->amiga.getFreq(c.value);
|
||||||
|
chan[c.chan].pcm.note=c.value;
|
||||||
chan[c.chan].filter=ins->es5506.filter;
|
chan[c.chan].filter=ins->es5506.filter;
|
||||||
chan[c.chan].envelope=ins->es5506.envelope;
|
chan[c.chan].envelope=ins->es5506.envelope;
|
||||||
}
|
}
|
||||||
|
@ -870,20 +850,6 @@ int DivPlatformES5506::dispatch(DivCommand c) {
|
||||||
chan[c.chan].pitch=c.value;
|
chan[c.chan].pitch=c.value;
|
||||||
chan[c.chan].freqChanged=true;
|
chan[c.chan].freqChanged=true;
|
||||||
break;
|
break;
|
||||||
// sample commands
|
|
||||||
case DIV_CMD_WAVE:
|
|
||||||
if (!chan[c.chan].useWave) {
|
|
||||||
if (chan[c.chan].active) {
|
|
||||||
DivInstrument* ins=parent->getIns(chan[c.chan].ins,DIV_INS_ES5506);
|
|
||||||
if (((ins->amiga.useNoteMap) && (c.value>=0 && c.value<120)) ||
|
|
||||||
((!ins->amiga.useNoteMap) && (c.value>=0 && c.value<parent->song.sampleLen))) {
|
|
||||||
chan[c.chan].pcm.next=c.value;
|
|
||||||
chan[c.chan].pcmChanged.index=1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// reserved for useWave
|
|
||||||
break;
|
|
||||||
// Filter commands
|
// Filter commands
|
||||||
case DIV_CMD_ES5506_FILTER_MODE:
|
case DIV_CMD_ES5506_FILTER_MODE:
|
||||||
if (!chan[c.chan].active) {
|
if (!chan[c.chan].active) {
|
||||||
|
|
|
@ -1542,7 +1542,6 @@ void DivEngine::registerSystems() {
|
||||||
);
|
);
|
||||||
|
|
||||||
EffectHandlerMap es5506PreEffectHandlerMap={
|
EffectHandlerMap es5506PreEffectHandlerMap={
|
||||||
{0x10, {DIV_CMD_WAVE, "10xx: Change waveform (00 to FF)",effectVal}},
|
|
||||||
{0x11, {DIV_CMD_ES5506_FILTER_MODE, "11xx: Set filter mode (00 to 03)",effectValAnd<3>}},
|
{0x11, {DIV_CMD_ES5506_FILTER_MODE, "11xx: Set filter mode (00 to 03)",effectValAnd<3>}},
|
||||||
{0x14, {DIV_CMD_ES5506_FILTER_K1, "14xx: Set filter coefficient K1 low byte (00 to FF)",effectValShift<0>,constVal<0x00ff>}},
|
{0x14, {DIV_CMD_ES5506_FILTER_K1, "14xx: Set filter coefficient K1 low byte (00 to FF)",effectValShift<0>,constVal<0x00ff>}},
|
||||||
{0x15, {DIV_CMD_ES5506_FILTER_K1, "15xx: Set filter coefficient K1 high byte (00 to FF)",effectValShift<8>,constVal<0xff00>}},
|
{0x15, {DIV_CMD_ES5506_FILTER_K1, "15xx: Set filter coefficient K1 high byte (00 to FF)",effectValShift<8>,constVal<0xff00>}},
|
||||||
|
|
|
@ -5563,6 +5563,7 @@ void FurnaceGUI::drawInsEdit() {
|
||||||
if (ins->type==DIV_INS_MSM6295) waveMax=0;
|
if (ins->type==DIV_INS_MSM6295) waveMax=0;
|
||||||
if (ins->type==DIV_INS_SEGAPCM) waveMax=0;
|
if (ins->type==DIV_INS_SEGAPCM) waveMax=0;
|
||||||
if (ins->type==DIV_INS_K007232) waveMax=0;
|
if (ins->type==DIV_INS_K007232) waveMax=0;
|
||||||
|
if (ins->type==DIV_INS_ES5506) waveMax=0;
|
||||||
if (ins->type==DIV_INS_GA20) waveMax=0;
|
if (ins->type==DIV_INS_GA20) waveMax=0;
|
||||||
if (ins->type==DIV_INS_K053260) waveMax=0;
|
if (ins->type==DIV_INS_K053260) waveMax=0;
|
||||||
if (ins->type==DIV_INS_POKEMINI) waveMax=0;
|
if (ins->type==DIV_INS_POKEMINI) waveMax=0;
|
||||||
|
|
Loading…
Reference in a new issue