Merge branch 'master' into ymf278b

This commit is contained in:
tildearrow 2024-09-05 19:32:48 -05:00
commit 5e5896fd52
69 changed files with 1993 additions and 4 deletions

View file

@ -51,6 +51,7 @@
#include "../engine/platform/pcmdac.h"
#include "../engine/platform/k007232.h"
#include "../engine/platform/ga20.h"
#include "../engine/platform/supervision.h"
#include "../engine/platform/sm8521.h"
#include "../engine/platform/pv1000.h"
#include "../engine/platform/k053260.h"

View file

@ -354,6 +354,8 @@ enum FurnaceGUIColors {
GUI_COLOR_INSTR_GBA_MINMOD,
GUI_COLOR_INSTR_BIFURCATOR,
GUI_COLOR_INSTR_SID2,
GUI_COLOR_INSTR_SUPERVISION,
GUI_COLOR_INSTR_UPD1771C,
GUI_COLOR_INSTR_UNKNOWN,
GUI_COLOR_CHANNEL_BG,

View file

@ -184,6 +184,8 @@ const char* insTypes[DIV_INS_MAX+1][3]={
{"GBA MinMod",ICON_FA_VOLUME_UP,ICON_FUR_INS_GBA_MINMOD},
{"Bifurcator",ICON_FA_LINE_CHART,ICON_FUR_INS_BIFURCATOR},
{"SID2",ICON_FA_KEYBOARD_O,ICON_FUR_INS_SID2},
{"Watara Supervision",ICON_FA_GAMEPAD,ICON_FUR_INS_SUPERVISION},
{"NEC μPD1771C",ICON_FA_BAR_CHART,ICON_FUR_INS_UPD1771C},
{NULL,ICON_FA_QUESTION,ICON_FA_QUESTION}
};
@ -1018,6 +1020,8 @@ const FurnaceGUIColorDef guiColors[GUI_COLOR_MAX]={
D(GUI_COLOR_INSTR_GBA_MINMOD,"",ImVec4(0.5f,0.45f,0.7f,1.0f)),
D(GUI_COLOR_INSTR_BIFURCATOR,"",ImVec4(0.8925f,0.8925f,0.8925f,1.0f)),
D(GUI_COLOR_INSTR_SID2,"",ImVec4(0.6f,0.75f,1.0f,1.0f)),
D(GUI_COLOR_INSTR_SUPERVISION,"",ImVec4(0.52f,1.0f,0.6f,1.0f)),
D(GUI_COLOR_INSTR_UPD1771C,"",ImVec4(0.94f,0.52f,0.6f,1.0f)),
D(GUI_COLOR_INSTR_UNKNOWN,"",ImVec4(0.3f,0.3f,0.3f,1.0f)),
D(GUI_COLOR_CHANNEL_BG,"",ImVec4(0.4f,0.6f,0.8f,1.0f)),
@ -1268,6 +1272,8 @@ const int availableSystems[]={
DIV_SYSTEM_SID2,
DIV_SYSTEM_OPL4,
DIV_SYSTEM_OPL4_DRUMS,
DIV_SYSTEM_SUPERVISION,
DIV_SYSTEM_UPD1771C,
0 // don't remove this last one!
};
@ -1365,6 +1371,8 @@ const int chipsSpecial[]={
DIV_SYSTEM_5E01,
DIV_SYSTEM_BIFURCATOR,
DIV_SYSTEM_SID2,
DIV_SYSTEM_SUPERVISION,
DIV_SYSTEM_UPD1771C,
0 // don't remove this last one!
};

View file

@ -2667,7 +2667,8 @@ void FurnaceGUI::insTabSample(DivInstrument* ins) {
ins->type==DIV_INS_AY8930 ||
ins->type==DIV_INS_VRC6 ||
ins->type==DIV_INS_SU ||
ins->type==DIV_INS_NDS) {
ins->type==DIV_INS_NDS ||
ins->type==DIV_INS_SUPERVISION) {
P(ImGui::Checkbox(_("Use sample"),&ins->amiga.useSample));
if (ins->type==DIV_INS_X1_010) {
if (ImGui::InputInt(_("Sample bank slot##BANKSLOT"),&ins->x1_010.bankSlot,1,4)) { PARAMETER
@ -6253,7 +6254,8 @@ void FurnaceGUI::drawInsEdit() {
ins->type==DIV_INS_C219 ||
ins->type==DIV_INS_NDS ||
ins->type==DIV_INS_GBA_DMA ||
ins->type==DIV_INS_GBA_MINMOD) {
ins->type==DIV_INS_GBA_MINMOD ||
ins->type==DIV_INS_SUPERVISION) {
insTabSample(ins);
}
if (ins->type==DIV_INS_N163) if (ImGui::BeginTabItem("Namco 163")) {
@ -7427,6 +7429,13 @@ void FurnaceGUI::drawInsEdit() {
macroList.push_back(FurnaceGUIMacroDesc(_("Pulse Width"),&ins->std.dutyMacro,0,255,160,uiColors[GUI_COLOR_MACRO_OTHER]));
macroList.push_back(FurnaceGUIMacroDesc(_("Pitch"),&ins->std.pitchMacro,-2048,2047,160,uiColors[GUI_COLOR_MACRO_PITCH],true,macroRelativeMode));
break;
case DIV_INS_SUPERVISION:
macroList.push_back(FurnaceGUIMacroDesc(_("Volume"),&ins->std.volMacro,0,15,160,uiColors[GUI_COLOR_MACRO_VOLUME]));
macroList.push_back(FurnaceGUIMacroDesc(_("Arpeggio"),&ins->std.arpMacro,-120,120,160,uiColors[GUI_COLOR_MACRO_PITCH],true,NULL,macroHoverNote,false,NULL,true,ins->std.arpMacro.val));
macroList.push_back(FurnaceGUIMacroDesc(_("Duty/Noise"),&ins->std.dutyMacro,0,3,160,uiColors[GUI_COLOR_MACRO_NOISE]));
macroList.push_back(FurnaceGUIMacroDesc(_("Noise/PCM Pan"),&ins->std.panLMacro,0,2,32,uiColors[GUI_COLOR_MACRO_OTHER],false,NULL,NULL,true,panBits));
macroList.push_back(FurnaceGUIMacroDesc(_("Pitch"),&ins->std.pitchMacro,-2048,2047,160,uiColors[GUI_COLOR_MACRO_PITCH],true,macroRelativeMode));
break;
case DIV_INS_SM8521:
macroList.push_back(FurnaceGUIMacroDesc(_("Volume"),&ins->std.volMacro,0,31,160,uiColors[GUI_COLOR_MACRO_VOLUME]));
macroList.push_back(FurnaceGUIMacroDesc(_("Arpeggio"),&ins->std.arpMacro,-120,120,160,uiColors[GUI_COLOR_MACRO_PITCH],true,NULL,macroHoverNote,false,NULL,true,ins->std.arpMacro.val));
@ -7569,7 +7578,14 @@ void FurnaceGUI::drawInsEdit() {
macroList.push_back(FurnaceGUIMacroDesc(_("Noise Mode"),&ins->std.fmsMacro,0,3,64,uiColors[GUI_COLOR_MACRO_NOISE]));
macroList.push_back(FurnaceGUIMacroDesc(_("Wave Mix"),&ins->std.amsMacro,0,3,64,uiColors[GUI_COLOR_MACRO_OTHER]));
break;
case DIV_INS_UPD1771C:
macroList.push_back(FurnaceGUIMacroDesc(_("Volume"),&ins->std.volMacro,0,31,160,uiColors[GUI_COLOR_MACRO_VOLUME]));
macroList.push_back(FurnaceGUIMacroDesc(_("Arpeggio"),&ins->std.arpMacro,-120,120,160,uiColors[GUI_COLOR_MACRO_PITCH],true,NULL,macroHoverNote,false,NULL,true,ins->std.arpMacro.val));
macroList.push_back(FurnaceGUIMacroDesc(_("Waveform"),&ins->std.waveMacro,0,7,160,uiColors[GUI_COLOR_MACRO_WAVE],false,NULL,NULL,false,NULL));
macroList.push_back(FurnaceGUIMacroDesc(_("Wave Pos"),&ins->std.ex1Macro,0,31,160,uiColors[GUI_COLOR_MACRO_OTHER]));
macroList.push_back(FurnaceGUIMacroDesc(_("Duty/Mode"),&ins->std.dutyMacro,0,1,160,uiColors[GUI_COLOR_MACRO_NOISE]));
macroList.push_back(FurnaceGUIMacroDesc(_("Pitch"),&ins->std.pitchMacro,-2048,2047,160,uiColors[GUI_COLOR_MACRO_PITCH],true,macroRelativeMode));
break;
case DIV_INS_MAX:
case DIV_INS_NULL:
break;

View file

@ -320,6 +320,11 @@ void FurnaceGUI::initSystemPresets() {
CH(DIV_SYSTEM_NDS, 1.0f, 0, "")
}
);
ENTRY(
"Watara Supervision", {
CH(DIV_SYSTEM_SUPERVISION, 1.0f, 0, "")
}
);
CATEGORY_END;
CATEGORY_BEGIN("Computers","let's get to work on chiptune today.");
@ -1331,6 +1336,11 @@ void FurnaceGUI::initSystemPresets() {
)
}
);
ENTRY(
"Epoch Super Cassette Vision", {
CH(DIV_SYSTEM_UPD1771C, 1.0f, 0, "")
}
);
CATEGORY_END;
CATEGORY_BEGIN("Arcade systems","INSERT COIN");
@ -3176,6 +3186,16 @@ void FurnaceGUI::initSystemPresets() {
CH(DIV_SYSTEM_SID2, 1.0f, 0, "")
}
);
ENTRY(
"Watara Supervision", {
CH(DIV_SYSTEM_SUPERVISION, 1.0f, 0, "")
}
);
ENTRY(
"NEC μPD1771C", {
CH(DIV_SYSTEM_UPD1771C, 1.0f, 0, "")
}
);
CATEGORY_END;
CATEGORY_BEGIN("DefleMask-compatible","these configurations are compatible with DefleMask.\nselect this if you need to save as .dmf or work with that program.");

View file

@ -419,6 +419,19 @@ void FurnaceGUI::drawSampleEdit() {
SAMPLE_WARN(warnLength,_("OPL4: maximum sample length is 65535"));
}
break;
case DIV_SYSTEM_SUPERVISION:
if (sample->loop) {
if (sample->loopStart!=0 || sample->loopEnd!=(int)(sample->samples)) {
SAMPLE_WARN(warnLoopPos,_("Supervision: loop point ignored on sample channel"));
}
}
if (sample->samples&31) {
SAMPLE_WARN(warnLength,_("Supervision: sample length will be padded to multiple of 32"));
}
if (sample->samples>8192) {
SAMPLE_WARN(warnLength,_("Supervision: maximum sample length is 8192"));
}
break;
default:
break;
}

View file

@ -4144,6 +4144,8 @@ void FurnaceGUI::drawSettings() {
UI_COLOR_CONFIG(GUI_COLOR_INSTR_GBA_MINMOD,_("GBA MinMod"));
UI_COLOR_CONFIG(GUI_COLOR_INSTR_BIFURCATOR,_("Bifurcator"));
UI_COLOR_CONFIG(GUI_COLOR_INSTR_SID2,_("SID2"));
UI_COLOR_CONFIG(GUI_COLOR_INSTR_SUPERVISION,_("Supervision"));
UI_COLOR_CONFIG(GUI_COLOR_INSTR_UPD1771C,_("μPD1771C"));
UI_COLOR_CONFIG(GUI_COLOR_INSTR_UNKNOWN,_("Other/Unknown"));
ImGui::TreePop();
}

View file

@ -2330,6 +2330,29 @@ bool FurnaceGUI::drawSysConf(int chan, int sysPos, DivSystem type, DivConfig& fl
}
break;
}
case DIV_SYSTEM_SUPERVISION: {
bool swapDuty=flags.getInt("swapDuty",true);
if (ImGui::Checkbox(_("Swap noise duty cycles"),&swapDuty)) {
altered=true;
}
bool sqStereo=flags.getInt("sqStereo",false);
if (ImGui::Checkbox(_("Stereo pulse waves"),&sqStereo)) {
altered=true;
}
if (altered) {
e->lockSave([&]() {
flags.set("swapDuty",(int)swapDuty);
});
e->lockSave([&]() {
flags.set("sqStereo",(int)sqStereo);
});
}
break;
}
case DIV_SYSTEM_SM8521:/* {
bool noAntiClick=flags.getBool("noAntiClick",false);
@ -2589,6 +2612,7 @@ bool FurnaceGUI::drawSysConf(int chan, int sysPos, DivSystem type, DivConfig& fl
case DIV_SYSTEM_C219:
case DIV_SYSTEM_BIFURCATOR:
case DIV_SYSTEM_POWERNOISE:
case DIV_SYSTEM_UPD1771C:
break;
case DIV_SYSTEM_YMU759:
case DIV_SYSTEM_ESFM:

View file

@ -279,6 +279,12 @@ const char* FurnaceGUI::getSystemPartNumber(DivSystem sys, DivConfig& flags) {
break;
case DIV_SYSTEM_ESFM:
return "ES1xxx";
case DIV_SYSTEM_SUPERVISION:
return "Watara Supervision";
break;
case DIV_SYSTEM_UPD1771C:
return "μPD1771C";
break;
default:
return FurnaceGUI::getSystemName(sys);
break;