Merge pull request #1844 from akumanatt/bifurcator

Add Bifurcator support
This commit is contained in:
tildearrow 2024-04-21 03:28:55 -05:00 committed by GitHub
commit a6357525d9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 513 additions and 2 deletions

View file

@ -319,6 +319,7 @@ enum FurnaceGUIColors {
GUI_COLOR_INSTR_NDS,
GUI_COLOR_INSTR_GBA_DMA,
GUI_COLOR_INSTR_GBA_MINMOD,
GUI_COLOR_INSTR_BIFURCATOR,
GUI_COLOR_INSTR_UNKNOWN,
GUI_COLOR_CHANNEL_BG,

View file

@ -182,6 +182,7 @@ const char* insTypes[DIV_INS_MAX+1][3]={
{"Nintendo DS",ICON_FA_BAR_CHART,ICON_FUR_INS_NDS},
{"GBA DMA",ICON_FA_GAMEPAD,ICON_FUR_INS_GBA_DMA},
{"GBA MinMod",ICON_FA_VOLUME_UP,ICON_FUR_INS_GBA_MINMOD},
{"Bifurcator",ICON_FA_LINE_CHART,ICON_FA_QUESTION},
{NULL,ICON_FA_QUESTION,ICON_FA_QUESTION}
};
@ -999,6 +1000,7 @@ const FurnaceGUIColorDef guiColors[GUI_COLOR_MAX]={
D(GUI_COLOR_INSTR_NDS,"",ImVec4(0.7f,0.7f,0.8f,1.0f)),
D(GUI_COLOR_INSTR_GBA_DMA,"",ImVec4(0.6f,0.4f,1.0f,1.0f)),
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_UNKNOWN,"",ImVec4(0.3f,0.3f,0.3f,1.0f)),
D(GUI_COLOR_CHANNEL_BG,"",ImVec4(0.4f,0.6f,0.8f,1.0f)),
@ -1245,6 +1247,7 @@ const int availableSystems[]={
DIV_SYSTEM_DAVE,
DIV_SYSTEM_NDS,
DIV_SYSTEM_5E01,
DIV_SYSTEM_BIFURCATOR,
0 // don't remove this last one!
};
@ -1338,6 +1341,7 @@ const int chipsSpecial[]={
DIV_SYSTEM_DAVE,
DIV_SYSTEM_NDS,
DIV_SYSTEM_5E01,
DIV_SYSTEM_BIFURCATOR,
0 // don't remove this last one!
};

View file

@ -6782,7 +6782,8 @@ void FurnaceGUI::drawInsEdit() {
volMax=31;
}
if (ins->type==DIV_INS_ADPCMB || ins->type==DIV_INS_YMZ280B || ins->type==DIV_INS_RF5C68 ||
ins->type==DIV_INS_GA20 || ins->type==DIV_INS_C140 || ins->type==DIV_INS_C219 || ins->type==DIV_INS_GBA_MINMOD) {
ins->type==DIV_INS_GA20 || ins->type==DIV_INS_C140 || ins->type==DIV_INS_C219 || ins->type==DIV_INS_GBA_MINMOD ||
ins->type==DIV_INS_BIFURCATOR) {
volMax=255;
}
if (ins->type==DIV_INS_QSOUND) {
@ -6942,6 +6943,10 @@ void FurnaceGUI::drawInsEdit() {
dutyLabel="Duty";
dutyMax=ins->amiga.useSample?0:7;
}
if (ins->type==DIV_INS_BIFURCATOR) {
dutyLabel="Parameter";
dutyMax=65535;
}
const char* waveLabel="Waveform";
int waveMax=(ins->type==DIV_INS_VERA)?3:(MAX(1,e->song.waveLen-1));
@ -6981,6 +6986,7 @@ void FurnaceGUI::drawInsEdit() {
if (ins->type==DIV_INS_SU || ins->type==DIV_INS_POKEY) waveMax=7;
if (ins->type==DIV_INS_DAVE) waveMax=4;
if (ins->type==DIV_INS_NDS) waveMax=0;
if (ins->type==DIV_INS_BIFURCATOR) waveMax=0;
if (ins->type==DIV_INS_PET) {
waveMax=8;
waveBitMode=true;
@ -7056,6 +7062,9 @@ void FurnaceGUI::drawInsEdit() {
if (ins->type==DIV_INS_GBA_MINMOD) {
ex1Max=2;
}
if (ins->type==DIV_INS_BIFURCATOR) {
ex1Max=65535;
}
int panMin=0;
int panMax=0;
@ -7121,7 +7130,8 @@ void FurnaceGUI::drawInsEdit() {
panMin=0;
panMax=127;
}
if (ins->type==DIV_INS_C140 || ins->type==DIV_INS_C219 || ins->type==DIV_INS_GBA_MINMOD) {
if (ins->type==DIV_INS_C140 || ins->type==DIV_INS_C219 || ins->type==DIV_INS_GBA_MINMOD ||
ins->type==DIV_INS_BIFURCATOR) {
panMin=0;
panMax=255;
}
@ -7275,6 +7285,8 @@ void FurnaceGUI::drawInsEdit() {
macroList.push_back(FurnaceGUIMacroDesc("Load LFSR",&ins->std.ex1Macro,0,12,160,uiColors[GUI_COLOR_MACRO_OTHER],false,NULL,NULL,true));
} else if (ins->type==DIV_INS_GBA_MINMOD) {
macroList.push_back(FurnaceGUIMacroDesc("Special",&ins->std.ex1Macro,0,ex1Max,96,uiColors[GUI_COLOR_MACRO_OTHER],false,NULL,NULL,true,minModModeBits));
} else if (ins->type==DIV_INS_BIFURCATOR) {
macroList.push_back(FurnaceGUIMacroDesc("Load Value",&ins->std.ex1Macro,0,ex1Max,160,uiColors[GUI_COLOR_MACRO_OTHER]));
} else {
macroList.push_back(FurnaceGUIMacroDesc("Duty",&ins->std.ex1Macro,0,ex1Max,160,uiColors[GUI_COLOR_MACRO_OTHER]));
}

View file

@ -3031,6 +3031,11 @@ void FurnaceGUI::initSystemPresets() {
CH(DIV_SYSTEM_NDS, 1.0f, 0, "")
}
);
ENTRY(
"Bifurcator", {
CH(DIV_SYSTEM_BIFURCATOR, 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

@ -3750,6 +3750,7 @@ void FurnaceGUI::drawSettings() {
UI_COLOR_CONFIG(GUI_COLOR_INSTR_NDS,"Nintendo DS");
UI_COLOR_CONFIG(GUI_COLOR_INSTR_GBA_DMA,"GBA DMA");
UI_COLOR_CONFIG(GUI_COLOR_INSTR_GBA_MINMOD,"GBA MinMod");
UI_COLOR_CONFIG(GUI_COLOR_INSTR_BIFURCATOR,"Bifurcator");
UI_COLOR_CONFIG(GUI_COLOR_INSTR_UNKNOWN,"Other/Unknown");
ImGui::TreePop();
}

View file

@ -2431,6 +2431,7 @@ bool FurnaceGUI::drawSysConf(int chan, int sysPos, DivSystem type, DivConfig& fl
case DIV_SYSTEM_PV1000:
case DIV_SYSTEM_VERA:
case DIV_SYSTEM_C219:
case DIV_SYSTEM_BIFURCATOR:
break;
case DIV_SYSTEM_YMU759:
case DIV_SYSTEM_ESFM: