Merge branch 'master' of https://github.com/tildearrow/furnace into pv1000

This commit is contained in:
cam900 2023-03-06 08:39:02 +09:00
commit 46bce25a34
2 changed files with 23 additions and 2 deletions

View File

@ -169,7 +169,7 @@ void DivPlatformSM8521::tick(bool sysTick) {
int DivPlatformSM8521::dispatch(DivCommand c) {
switch (c.cmd) {
case DIV_CMD_NOTE_ON: {
DivInstrument* ins=parent->getIns(chan[c.chan].ins,DIV_INS_PCE);
DivInstrument* ins=parent->getIns(chan[c.chan].ins,DIV_INS_SM8521);
if (c.value!=DIV_NOTE_NULL) {
chan[c.chan].baseFreq=NOTE_PERIODIC(c.value);
chan[c.chan].freqChanged=true;
@ -263,7 +263,7 @@ int DivPlatformSM8521::dispatch(DivCommand c) {
break;
case DIV_CMD_PRE_PORTA:
if (chan[c.chan].active && c.value2) {
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_PCE));
if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_SM8521));
}
if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_PERIODIC(chan[c.chan].note);
chan[c.chan].inPorta=c.value;

View File

@ -51,6 +51,7 @@
#include "../engine/platform/pcmdac.h"
#include "../engine/platform/k007232.h"
#include "../engine/platform/ga20.h"
#include "../engine/platform/sm8521.h"
#include "../engine/platform/dummy.h"
#define COMMON_CHIP_DEBUG \
@ -528,6 +529,14 @@ void putDispatchChip(void* data, int type) {
COMMON_CHIP_DEBUG_BOOL;
break;
}
case DIV_SYSTEM_SM8521: {
DivPlatformSM8521* ch=(DivPlatformSM8521*)data;
ImGui::Text("> SM8521");
COMMON_CHIP_DEBUG;
COMMON_CHIP_DEBUG_BOOL;
ImGui::TextColored(ch->antiClickEnabled?colorOn:colorOff,">> AntiClickEnabled");
break;
}
default:
ImGui::Text("Unimplemented chip! Help!");
break;
@ -1047,6 +1056,18 @@ void putDispatchChan(void* data, int chanNum, int type) {
ImGui::TextColored(ch->setPos?colorOn:colorOff,">> SetPos");
break;
}
case DIV_SYSTEM_SM8521: {
DivPlatformSM8521::Channel* ch=(DivPlatformSM8521::Channel*)data;
ImGui::Text("> SM8521");
COMMON_CHAN_DEBUG;
ImGui::Text("* AntiClick:");
ImGui::Text(" - periodCount: %d",ch->antiClickPeriodCount);
ImGui::Text(" - wavePos: %d",ch->antiClickWavePos);
ImGui::Text("- wave: %d",ch->wave);
COMMON_CHAN_DEBUG_BOOL;
ImGui::TextColored(ch->volumeChanged?colorOn:colorOff,">> VolumeChanged");
break;
}
default:
ImGui::Text("Unimplemented chip! Help!");
break;