Chip config UI: Indent radio buttons.

Similarly, stuff is indented for clarity. This includes the chip clock rate selector.
This commit is contained in:
Electric Keet 2023-08-05 11:50:17 -07:00
parent 3f80231f24
commit 543d18b8d5
1 changed files with 100 additions and 0 deletions

View File

@ -44,6 +44,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
bool fbAllOps=flags.getBool("fbAllOps",false); bool fbAllOps=flags.getBool("fbAllOps",false);
ImGui::Text("Clock rate:"); ImGui::Text("Clock rate:");
ImGui::Indent();
if (ImGui::RadioButton("NTSC (7.67MHz)",clockSel==0)) { if (ImGui::RadioButton("NTSC (7.67MHz)",clockSel==0)) {
clockSel=0; clockSel=0;
altered=true; altered=true;
@ -64,8 +65,10 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
clockSel=4; clockSel=4;
altered=true; altered=true;
} }
ImGui::Unindent();
ImGui::Text("Chip type:"); ImGui::Text("Chip type:");
ImGui::Indent();
if (ImGui::RadioButton("YM3438 (9-bit DAC)",chipType==0)) { if (ImGui::RadioButton("YM3438 (9-bit DAC)",chipType==0)) {
chipType=0; chipType=0;
altered=true; altered=true;
@ -78,6 +81,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
chipType=2; chipType=2;
altered=true; altered=true;
} }
ImGui::Unindent();
if (type==DIV_SYSTEM_YM2612_EXT || type==DIV_SYSTEM_YM2612_DUALPCM_EXT || type==DIV_SYSTEM_YM2612_CSM) { if (type==DIV_SYSTEM_YM2612_EXT || type==DIV_SYSTEM_YM2612_DUALPCM_EXT || type==DIV_SYSTEM_YM2612_CSM) {
if (ImGui::Checkbox("Disable ExtCh FM macros (compatibility)",&noExtMacros)) { if (ImGui::Checkbox("Disable ExtCh FM macros (compatibility)",&noExtMacros)) {
@ -105,6 +109,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
bool noEasyNoise=flags.getBool("noEasyNoise",false); bool noEasyNoise=flags.getBool("noEasyNoise",false);
ImGui::Text("Clock rate:"); ImGui::Text("Clock rate:");
ImGui::Indent();
if (ImGui::RadioButton("3.58MHz (NTSC)",clockSel==0)) { if (ImGui::RadioButton("3.58MHz (NTSC)",clockSel==0)) {
clockSel=0; clockSel=0;
altered=true; altered=true;
@ -133,7 +138,9 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
clockSel=6; clockSel=6;
altered=true; altered=true;
} }
ImGui::Unindent();
ImGui::Text("Chip type:"); ImGui::Text("Chip type:");
ImGui::Indent();
if (ImGui::RadioButton("Sega VDP/Master System",chipType==0)) { if (ImGui::RadioButton("Sega VDP/Master System",chipType==0)) {
chipType=0; chipType=0;
altered=true; altered=true;
@ -174,6 +181,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
chipType=9; chipType=9;
altered=true; altered=true;
} }
ImGui::Unindent();
if (ImGui::Checkbox("Disable noise period change phase reset",&noPhaseReset)) { if (ImGui::Checkbox("Disable noise period change phase reset",&noPhaseReset)) {
altered=true; altered=true;
@ -205,6 +213,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
altered=true; altered=true;
} }
ImGui::Text("Chip revision:"); ImGui::Text("Chip revision:");
ImGui::Indent();
if (ImGui::RadioButton("HuC6280 (original)",chipType==0)) { if (ImGui::RadioButton("HuC6280 (original)",chipType==0)) {
chipType=0; chipType=0;
altered=true; altered=true;
@ -213,6 +222,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
chipType=1; chipType=1;
altered=true; altered=true;
} }
ImGui::Unindent();
if (altered) { if (altered) {
e->lockSave([&]() { e->lockSave([&]() {
@ -235,6 +245,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
int echoVol=(signed char)flags.getInt("echoVol",0); int echoVol=(signed char)flags.getInt("echoVol",0);
ImGui::Text("CPU rate:"); ImGui::Text("CPU rate:");
ImGui::Indent();
if (ImGui::RadioButton("6.18MHz (NTSC)",clockSel==0)) { if (ImGui::RadioButton("6.18MHz (NTSC)",clockSel==0)) {
clockSel=0; clockSel=0;
altered=true; altered=true;
@ -243,7 +254,9 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
clockSel=1; clockSel=1;
altered=true; altered=true;
} }
ImGui::Unindent();
ImGui::Text("Sample memory:"); ImGui::Text("Sample memory:");
ImGui::Indent();
if (ImGui::RadioButton("8K (rev A/B/E)",sampleMemSize==0)) { if (ImGui::RadioButton("8K (rev A/B/E)",sampleMemSize==0)) {
sampleMemSize=0; sampleMemSize=0;
altered=true; altered=true;
@ -252,7 +265,9 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
sampleMemSize=1; sampleMemSize=1;
altered=true; altered=true;
} }
ImGui::Unindent();
ImGui::Text("DAC resolution:"); ImGui::Text("DAC resolution:");
ImGui::Indent();
if (ImGui::RadioButton("16-bit (rev A/B/D/F)",pdm==0)) { if (ImGui::RadioButton("16-bit (rev A/B/D/F)",pdm==0)) {
pdm=false; pdm=false;
altered=true; altered=true;
@ -261,6 +276,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
pdm=true; pdm=true;
altered=true; altered=true;
} }
ImGui::Unindent();
if (ImGui::Checkbox("Enable echo",&echo)) { if (ImGui::Checkbox("Enable echo",&echo)) {
altered=true; altered=true;
} }
@ -317,6 +333,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
altered=true; altered=true;
} }
ImGui::Text("Chip revision:"); ImGui::Text("Chip revision:");
ImGui::Indent();
if (ImGui::RadioButton("Original (DMG)",chipType==0)) { if (ImGui::RadioButton("Original (DMG)",chipType==0)) {
chipType=0; chipType=0;
altered=true; altered=true;
@ -333,8 +350,10 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
chipType=3; chipType=3;
altered=true; altered=true;
} }
ImGui::Unindent();
ImGui::Text("Wave channel orientation:"); ImGui::Text("Wave channel orientation:");
if (chipType==3) { if (chipType==3) {
ImGui::Indent();
if (ImGui::RadioButton("Normal",!invertWave)) { if (ImGui::RadioButton("Normal",!invertWave)) {
invertWave=false; invertWave=false;
altered=true; altered=true;
@ -343,7 +362,9 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
invertWave=true; invertWave=true;
altered=true; altered=true;
} }
ImGui::Unindent();
} else { } else {
ImGui::Indent();
if (ImGui::RadioButton("Exact data (inverted)",!invertWave)) { if (ImGui::RadioButton("Exact data (inverted)",!invertWave)) {
invertWave=false; invertWave=false;
altered=true; altered=true;
@ -352,6 +373,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
invertWave=true; invertWave=true;
altered=true; altered=true;
} }
ImGui::Unindent();
} }
if (ImGui::Checkbox("Pretty please one more compat flag when I use arpeggio and my sound length",&enoughAlready)) { if (ImGui::Checkbox("Pretty please one more compat flag when I use arpeggio and my sound length",&enoughAlready)) {
altered=true; altered=true;
@ -375,6 +397,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
bool noTopHatFreq=flags.getBool("noTopHatFreq",false); bool noTopHatFreq=flags.getBool("noTopHatFreq",false);
ImGui::Text("Clock rate:"); ImGui::Text("Clock rate:");
ImGui::Indent();
if (ImGui::RadioButton("NTSC (3.58MHz)",clockSel==0)) { if (ImGui::RadioButton("NTSC (3.58MHz)",clockSel==0)) {
clockSel=0; clockSel=0;
altered=true; altered=true;
@ -391,8 +414,10 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
clockSel=3; clockSel=3;
altered=true; altered=true;
} }
ImGui::Unindent();
if (type!=DIV_SYSTEM_VRC7) { if (type!=DIV_SYSTEM_VRC7) {
ImGui::Text("Patch set:"); ImGui::Text("Patch set:");
ImGui::Indent();
if (ImGui::RadioButton("Yamaha YM2413",patchSet==0)) { if (ImGui::RadioButton("Yamaha YM2413",patchSet==0)) {
patchSet=0; patchSet=0;
altered=true; altered=true;
@ -409,6 +434,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
patchSet=3; patchSet=3;
altered=true; altered=true;
} }
ImGui::Unindent();
} }
if (type==DIV_SYSTEM_OPLL_DRUMS) { if (type==DIV_SYSTEM_OPLL_DRUMS) {
@ -431,6 +457,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
case DIV_SYSTEM_YM2151: { case DIV_SYSTEM_YM2151: {
int clockSel=flags.getInt("clockSel",0); int clockSel=flags.getInt("clockSel",0);
ImGui::Indent();
if (ImGui::RadioButton("NTSC/X16 (3.58MHz)",clockSel==0)) { if (ImGui::RadioButton("NTSC/X16 (3.58MHz)",clockSel==0)) {
clockSel=0; clockSel=0;
altered=true; altered=true;
@ -443,6 +470,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
clockSel=2; clockSel=2;
altered=true; altered=true;
} }
ImGui::Unindent();
if (altered) { if (altered) {
e->lockSave([&]() { e->lockSave([&]() {
@ -460,6 +488,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
ImGui::Text("Clock rate:"); ImGui::Text("Clock rate:");
ImGui::Indent();
if (ImGui::RadioButton("NTSC (1.79MHz)",clockSel==0)) { if (ImGui::RadioButton("NTSC (1.79MHz)",clockSel==0)) {
clockSel=0; clockSel=0;
altered=true; altered=true;
@ -472,9 +501,11 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
clockSel=2; clockSel=2;
altered=true; altered=true;
} }
ImGui::Unindent();
ImGui::Text("DPCM channel mode:"); ImGui::Text("DPCM channel mode:");
ImGui::Indent();
if (ImGui::RadioButton("DPCM (muffled samples; low CPU usage)",dpcmMode)) { if (ImGui::RadioButton("DPCM (muffled samples; low CPU usage)",dpcmMode)) {
dpcmMode=true; dpcmMode=true;
altered=true; altered=true;
@ -483,6 +514,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
dpcmMode=false; dpcmMode=false;
altered=true; altered=true;
} }
ImGui::Unindent();
if (altered) { if (altered) {
e->lockSave([&]() { e->lockSave([&]() {
@ -503,6 +535,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
ImGui::Text("Clock rate:"); ImGui::Text("Clock rate:");
ImGui::Indent();
if (ImGui::RadioButton("NTSC (1.02MHz)",clockSel==0)) { if (ImGui::RadioButton("NTSC (1.02MHz)",clockSel==0)) {
clockSel=0; clockSel=0;
altered=true; altered=true;
@ -515,9 +548,11 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
clockSel=2; clockSel=2;
altered=true; altered=true;
} }
ImGui::Unindent();
ImGui::Text("Global parameter priority:"); ImGui::Text("Global parameter priority:");
ImGui::Indent();
if (ImGui::RadioButton("Left to right",!keyPriority)) { if (ImGui::RadioButton("Left to right",!keyPriority)) {
keyPriority=false; keyPriority=false;
altered=true; altered=true;
@ -526,6 +561,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
keyPriority=true; keyPriority=true;
altered=true; altered=true;
} }
ImGui::Unindent();
ImGui::Text("Hard reset envelope:"); ImGui::Text("Hard reset envelope:");
@ -576,6 +612,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
int ssgVol=flags.getInt("ssgVol",128); int ssgVol=flags.getInt("ssgVol",128);
int fmVol=flags.getInt("fmVol",256); int fmVol=flags.getInt("fmVol",256);
ImGui::Indent();
if (ImGui::RadioButton("8MHz (Neo Geo MVS)",clockSel==0)) { if (ImGui::RadioButton("8MHz (Neo Geo MVS)",clockSel==0)) {
clockSel=0; clockSel=0;
altered=true; altered=true;
@ -584,6 +621,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
clockSel=1; clockSel=1;
altered=true; altered=true;
} }
ImGui::Unindent();
if (type==DIV_SYSTEM_YM2610_EXT || type==DIV_SYSTEM_YM2610_FULL_EXT || type==DIV_SYSTEM_YM2610B_EXT || type==DIV_SYSTEM_YM2610_CSM || type==DIV_SYSTEM_YM2610B_CSM) { if (type==DIV_SYSTEM_YM2610_EXT || type==DIV_SYSTEM_YM2610_FULL_EXT || type==DIV_SYSTEM_YM2610B_EXT || type==DIV_SYSTEM_YM2610_CSM || type==DIV_SYSTEM_YM2610B_CSM) {
if (ImGui::Checkbox("Disable ExtCh FM macros (compatibility)",&noExtMacros)) { if (ImGui::Checkbox("Disable ExtCh FM macros (compatibility)",&noExtMacros)) {
@ -626,6 +664,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
int stereoSep=flags.getInt("stereoSep",0); int stereoSep=flags.getInt("stereoSep",0);
ImGui::Text("Clock rate:"); ImGui::Text("Clock rate:");
ImGui::Indent();
if (ImGui::RadioButton("1.79MHz (ZX Spectrum NTSC/MSX)",clockSel==0)) { if (ImGui::RadioButton("1.79MHz (ZX Spectrum NTSC/MSX)",clockSel==0)) {
clockSel=0; clockSel=0;
altered=true; altered=true;
@ -686,8 +725,10 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
clockSel=14; clockSel=14;
altered=true; altered=true;
} }
ImGui::Unindent();
if (type==DIV_SYSTEM_AY8910) { if (type==DIV_SYSTEM_AY8910) {
ImGui::Text("Chip type:"); ImGui::Text("Chip type:");
ImGui::Indent();
if (ImGui::RadioButton("AY-3-8910",chipType==0)) { if (ImGui::RadioButton("AY-3-8910",chipType==0)) {
chipType=0; chipType=0;
altered=true; altered=true;
@ -704,6 +745,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
chipType=3; chipType=3;
altered=true; altered=true;
} }
ImGui::Unindent();
if (ImGui::IsItemHovered()) { if (ImGui::IsItemHovered()) {
ImGui::SetTooltip("note: AY-3-8914 is not supported by the VGM format!"); ImGui::SetTooltip("note: AY-3-8914 is not supported by the VGM format!");
} }
@ -744,6 +786,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
case DIV_SYSTEM_SAA1099: { case DIV_SYSTEM_SAA1099: {
int clockSel=flags.getInt("clockSel",0); int clockSel=flags.getInt("clockSel",0);
ImGui::Indent();
if (ImGui::RadioButton("SAM Coupé (8MHz)",clockSel==0)) { if (ImGui::RadioButton("SAM Coupé (8MHz)",clockSel==0)) {
clockSel=0; clockSel=0;
altered=true; altered=true;
@ -756,6 +799,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
clockSel=2; clockSel=2;
altered=true; altered=true;
} }
ImGui::Unindent();
if (altered) { if (altered) {
e->lockSave([&]() { e->lockSave([&]() {
@ -779,6 +823,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
} rightClickable } rightClickable
ImGui::Text("Model:"); ImGui::Text("Model:");
ImGui::Indent();
if (ImGui::RadioButton("Amiga 500 (OCS)",chipType==0)) { if (ImGui::RadioButton("Amiga 500 (OCS)",chipType==0)) {
chipType=0; chipType=0;
altered=true; altered=true;
@ -787,8 +832,10 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
chipType=1; chipType=1;
altered=true; altered=true;
} }
ImGui::Unindent();
ImGui::Text("Chip memory:"); ImGui::Text("Chip memory:");
ImGui::Indent();
if (ImGui::RadioButton("2MB (ECS/AGA max)",chipMem==21)) { if (ImGui::RadioButton("2MB (ECS/AGA max)",chipMem==21)) {
chipMem=21; chipMem=21;
altered=true; altered=true;
@ -805,6 +852,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
chipMem=18; chipMem=18;
altered=true; altered=true;
} }
ImGui::Unindent();
if (ImGui::Checkbox("PAL",&clockSel)) { if (ImGui::Checkbox("PAL",&clockSel)) {
@ -830,6 +878,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
int mixingType=flags.getInt("mixingType",0); int mixingType=flags.getInt("mixingType",0);
ImGui::Text("Mixing mode:"); ImGui::Text("Mixing mode:");
ImGui::Indent();
if (ImGui::RadioButton("Mono",mixingType==0)) { if (ImGui::RadioButton("Mono",mixingType==0)) {
mixingType=0; mixingType=0;
altered=true; altered=true;
@ -842,6 +891,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
mixingType=2; mixingType=2;
altered=true; altered=true;
} }
ImGui::Unindent();
if (ImGui::Checkbox("PAL",&clockSel)) { if (ImGui::Checkbox("PAL",&clockSel)) {
altered=true; altered=true;
@ -860,6 +910,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
int speakerType=flags.getInt("speakerType",0); int speakerType=flags.getInt("speakerType",0);
ImGui::Text("Clock rate:"); ImGui::Text("Clock rate:");
ImGui::Indent();
if (ImGui::RadioButton("1.19MHz (PC)",clockSel==0)) { if (ImGui::RadioButton("1.19MHz (PC)",clockSel==0)) {
clockSel=0; clockSel=0;
altered=true; altered=true;
@ -872,8 +923,10 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
clockSel=2; clockSel=2;
altered=true; altered=true;
} }
ImGui::Unindent();
ImGui::Text("Speaker type:"); ImGui::Text("Speaker type:");
ImGui::Indent();
if (ImGui::RadioButton("Unfiltered",speakerType==0)) { if (ImGui::RadioButton("Unfiltered",speakerType==0)) {
speakerType=0; speakerType=0;
altered=true; altered=true;
@ -890,6 +943,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
speakerType=3; speakerType=3;
altered=true; altered=true;
} }
ImGui::Unindent();
if (altered) { if (altered) {
e->lockSave([&]() { e->lockSave([&]() {
@ -933,6 +987,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
bool stereo=flags.getBool("stereo",false); bool stereo=flags.getBool("stereo",false);
ImGui::Text("Clock rate:"); ImGui::Text("Clock rate:");
ImGui::Indent();
if (ImGui::RadioButton("16MHz (Seta 1)",clockSel==0)) { if (ImGui::RadioButton("16MHz (Seta 1)",clockSel==0)) {
clockSel=0; clockSel=0;
altered=true; altered=true;
@ -945,6 +1000,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
clockSel=2; clockSel=2;
altered=true; altered=true;
} }
ImGui::Unindent();
if (ImGui::Checkbox("Stereo",&stereo)) { if (ImGui::Checkbox("Stereo",&stereo)) {
altered=true; altered=true;
@ -965,6 +1021,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
bool lenCompensate=flags.getBool("lenCompensate",false); bool lenCompensate=flags.getBool("lenCompensate",false);
ImGui::Text("Clock rate:"); ImGui::Text("Clock rate:");
ImGui::Indent();
if (ImGui::RadioButton("NTSC (1.79MHz)",clockSel==0)) { if (ImGui::RadioButton("NTSC (1.79MHz)",clockSel==0)) {
clockSel=0; clockSel=0;
altered=true; altered=true;
@ -977,6 +1034,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
clockSel=2; clockSel=2;
altered=true; altered=true;
} }
ImGui::Unindent();
ImGui::Text("Initial channel limit:"); ImGui::Text("Initial channel limit:");
if (CWSliderInt("##N163_InitialChannelLimit",&channels,1,8)) { if (CWSliderInt("##N163_InitialChannelLimit",&channels,1,8)) {
if (channels<1) channels=1; if (channels<1) channels=1;
@ -1037,6 +1095,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
int fmVol=flags.getInt("fmVol",256); int fmVol=flags.getInt("fmVol",256);
ImGui::Text("Clock rate:"); ImGui::Text("Clock rate:");
ImGui::Indent();
if (ImGui::RadioButton("3.58MHz (NTSC)",clockSel==0)) { if (ImGui::RadioButton("3.58MHz (NTSC)",clockSel==0)) {
clockSel=0; clockSel=0;
altered=true; altered=true;
@ -1061,7 +1120,9 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
clockSel=5; clockSel=5;
altered=true; altered=true;
} }
ImGui::Unindent();
ImGui::Text("Output rate:"); ImGui::Text("Output rate:");
ImGui::Indent();
if (ImGui::RadioButton("FM: clock / 72, SSG: clock / 16",prescale==0)) { if (ImGui::RadioButton("FM: clock / 72, SSG: clock / 16",prescale==0)) {
prescale=0; prescale=0;
altered=true; altered=true;
@ -1074,6 +1135,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
prescale=2; prescale=2;
altered=true; altered=true;
} }
ImGui::Unindent();
if (CWSliderInt("SSG Volume",&ssgVol,0,256)) { if (CWSliderInt("SSG Volume",&ssgVol,0,256)) {
if (ssgVol<0) ssgVol=0; if (ssgVol<0) ssgVol=0;
@ -1119,6 +1181,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
int fmVol=flags.getInt("fmVol",256); int fmVol=flags.getInt("fmVol",256);
ImGui::Text("Clock rate:"); ImGui::Text("Clock rate:");
ImGui::Indent();
if (ImGui::RadioButton("8MHz (Arcade)",clockSel==0)) { if (ImGui::RadioButton("8MHz (Arcade)",clockSel==0)) {
clockSel=0; clockSel=0;
altered=true; altered=true;
@ -1127,7 +1190,9 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
clockSel=1; clockSel=1;
altered=true; altered=true;
} }
ImGui::Unindent();
ImGui::Text("Output rate:"); ImGui::Text("Output rate:");
ImGui::Indent();
if (ImGui::RadioButton("FM: clock / 144, SSG: clock / 32",prescale==0)) { if (ImGui::RadioButton("FM: clock / 144, SSG: clock / 32",prescale==0)) {
prescale=0; prescale=0;
altered=true; altered=true;
@ -1140,6 +1205,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
prescale=2; prescale=2;
altered=true; altered=true;
} }
ImGui::Unindent();
if (CWSliderInt("SSG Volume",&ssgVol,0,256)) { if (CWSliderInt("SSG Volume",&ssgVol,0,256)) {
if (ssgVol<0) ssgVol=0; if (ssgVol<0) ssgVol=0;
@ -1179,6 +1245,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
int chipType=flags.getInt("chipType",0); int chipType=flags.getInt("chipType",0);
ImGui::Text("Clock rate:"); ImGui::Text("Clock rate:");
ImGui::Indent();
if (ImGui::RadioButton("8MHz (FM Towns)",clockSel==0)) { if (ImGui::RadioButton("8MHz (FM Towns)",clockSel==0)) {
clockSel=0; clockSel=0;
altered=true; altered=true;
@ -1191,7 +1258,9 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
clockSel=2; clockSel=2;
altered=true; altered=true;
} }
ImGui::Unindent();
ImGui::Text("Chip type:"); ImGui::Text("Chip type:");
ImGui::Indent();
if (ImGui::RadioButton("RF5C68 (10-bit output)",chipType==0)) { if (ImGui::RadioButton("RF5C68 (10-bit output)",chipType==0)) {
chipType=0; chipType=0;
altered=true; altered=true;
@ -1200,6 +1269,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
chipType=1; chipType=1;
altered=true; altered=true;
} }
ImGui::Unindent();
if (altered) { if (altered) {
e->lockSave([&]() { e->lockSave([&]() {
@ -1213,6 +1283,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
int clockSel=flags.getInt("clockSel",0); int clockSel=flags.getInt("clockSel",0);
ImGui::Text("Clock rate:"); ImGui::Text("Clock rate:");
ImGui::Indent();
if (ImGui::RadioButton("4MHz",clockSel==0)) { if (ImGui::RadioButton("4MHz",clockSel==0)) {
clockSel=0; clockSel=0;
altered=true; altered=true;
@ -1229,6 +1300,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
clockSel=3; clockSel=3;
altered=true; altered=true;
} }
ImGui::Unindent();
if (altered) { if (altered) {
e->lockSave([&]() { e->lockSave([&]() {
@ -1242,6 +1314,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
bool rateSel=flags.getBool("rateSel",false); bool rateSel=flags.getBool("rateSel",false);
ImGui::Text("Clock rate:"); ImGui::Text("Clock rate:");
ImGui::Indent();
if (ImGui::RadioButton("1MHz",clockSel==0)) { if (ImGui::RadioButton("1MHz",clockSel==0)) {
clockSel=0; clockSel=0;
altered=true; altered=true;
@ -1302,7 +1375,9 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
clockSel=14; clockSel=14;
altered=true; altered=true;
} }
ImGui::Unindent();
ImGui::Text("Output rate:"); ImGui::Text("Output rate:");
ImGui::Indent();
if (ImGui::RadioButton("clock / 132",rateSel==0)) { if (ImGui::RadioButton("clock / 132",rateSel==0)) {
rateSel=false; rateSel=false;
altered=true; altered=true;
@ -1311,6 +1386,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
rateSel=true; rateSel=true;
altered=true; altered=true;
} }
ImGui::Unindent();
if (altered) { if (altered) {
e->lockSave([&]() { e->lockSave([&]() {
@ -1325,6 +1401,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
int clockSel=flags.getInt("clockSel",0); int clockSel=flags.getInt("clockSel",0);
ImGui::Text("Clock rate:"); ImGui::Text("Clock rate:");
ImGui::Indent();
if (ImGui::RadioButton("1.79MHz (NTSC/MSX)",clockSel==0)) { if (ImGui::RadioButton("1.79MHz (NTSC/MSX)",clockSel==0)) {
clockSel=0; clockSel=0;
altered=true; altered=true;
@ -1341,6 +1418,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
clockSel=3; clockSel=3;
altered=true; altered=true;
} }
ImGui::Unindent();
if (altered) { if (altered) {
e->lockSave([&]() { e->lockSave([&]() {
@ -1358,6 +1436,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
int clockSel=flags.getInt("clockSel",0); int clockSel=flags.getInt("clockSel",0);
ImGui::Text("Clock rate:"); ImGui::Text("Clock rate:");
ImGui::Indent();
if (ImGui::RadioButton("3.58MHz (NTSC)",clockSel==0)) { if (ImGui::RadioButton("3.58MHz (NTSC)",clockSel==0)) {
clockSel=0; clockSel=0;
altered=true; altered=true;
@ -1382,6 +1461,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
clockSel=5; clockSel=5;
altered=true; altered=true;
} }
ImGui::Unindent();
if (altered) { if (altered) {
e->lockSave([&]() { e->lockSave([&]() {
@ -1396,6 +1476,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
bool compatPan=flags.getBool("compatPan",false); bool compatPan=flags.getBool("compatPan",false);
ImGui::Text("Clock rate:"); ImGui::Text("Clock rate:");
ImGui::Indent();
if (ImGui::RadioButton("14.32MHz (NTSC)",clockSel==0)) { if (ImGui::RadioButton("14.32MHz (NTSC)",clockSel==0)) {
clockSel=0; clockSel=0;
altered=true; altered=true;
@ -1416,6 +1497,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
clockSel=4; clockSel=4;
altered=true; altered=true;
} }
ImGui::Unindent();
if (ImGui::Checkbox("Compatible panning (0800)",&compatPan)) { if (ImGui::Checkbox("Compatible panning (0800)",&compatPan)) {
altered=true; altered=true;
@ -1433,6 +1515,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
int clockSel=flags.getInt("clockSel",0); int clockSel=flags.getInt("clockSel",0);
ImGui::Text("Clock rate:"); ImGui::Text("Clock rate:");
ImGui::Indent();
if (ImGui::RadioButton("16.9344MHz",clockSel==0)) { if (ImGui::RadioButton("16.9344MHz",clockSel==0)) {
clockSel=0; clockSel=0;
altered=true; altered=true;
@ -1457,6 +1540,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
clockSel=5; clockSel=5;
altered=true; altered=true;
} }
ImGui::Unindent();
if (altered) { if (altered) {
e->lockSave([&]() { e->lockSave([&]() {
@ -1489,6 +1573,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
} }
ImGui::Text("Interpolation:"); ImGui::Text("Interpolation:");
ImGui::Indent();
if (ImGui::RadioButton("None",interpolation==0)) { if (ImGui::RadioButton("None",interpolation==0)) {
interpolation=0; interpolation=0;
altered=true; altered=true;
@ -1505,6 +1590,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
interpolation=3; interpolation=3;
altered=true; altered=true;
} }
ImGui::Unindent();
if (altered) { if (altered) {
e->lockSave([&]() { e->lockSave([&]() {
@ -1741,6 +1827,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
} }
ImGui::Text("Envelope mode (channel 1-4):"); ImGui::Text("Envelope mode (channel 1-4):");
ImGui::Indent();
if (ImGui::RadioButton("Capacitor (attack/decay)##EM00",groupEnv[0])) { if (ImGui::RadioButton("Capacitor (attack/decay)##EM00",groupEnv[0])) {
groupEnv[0]=true; groupEnv[0]=true;
altered=true; altered=true;
@ -1749,8 +1836,10 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
groupEnv[0]=false; groupEnv[0]=false;
altered=true; altered=true;
} }
ImGui::Unindent();
ImGui::Text("Envelope mode (channel 5-8):"); ImGui::Text("Envelope mode (channel 5-8):");
ImGui::Indent();
if (ImGui::RadioButton("Capacitor (attack/decay)##EM10",groupEnv[1])) { if (ImGui::RadioButton("Capacitor (attack/decay)##EM10",groupEnv[1])) {
groupEnv[1]=true; groupEnv[1]=true;
altered=true; altered=true;
@ -1759,6 +1848,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
groupEnv[1]=false; groupEnv[1]=false;
altered=true; altered=true;
} }
ImGui::Unindent();
ImGui::Text("Global vibrato:"); ImGui::Text("Global vibrato:");
@ -1834,6 +1924,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
bool romMode=flags.getBool("romMode",false); bool romMode=flags.getBool("romMode",false);
ImGui::Text("Waveform storage mode:"); ImGui::Text("Waveform storage mode:");
ImGui::Indent();
if (ImGui::RadioButton("RAM",!romMode)) { if (ImGui::RadioButton("RAM",!romMode)) {
romMode=false; romMode=false;
altered=true; altered=true;
@ -1842,6 +1933,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
romMode=true; romMode=true;
altered=true; altered=true;
} }
ImGui::Unindent();
if (altered) { if (altered) {
e->lockSave([&]() { e->lockSave([&]() {
@ -1897,6 +1989,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
int clockSel=flags.getInt("clockSel",0); int clockSel=flags.getInt("clockSel",0);
ImGui::Text("Clock rate:"); ImGui::Text("Clock rate:");
ImGui::Indent();
if (ImGui::RadioButton("3.58MHz (NTSC)",clockSel==0)) { if (ImGui::RadioButton("3.58MHz (NTSC)",clockSel==0)) {
clockSel=0; clockSel=0;
altered=true; altered=true;
@ -1905,6 +1998,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
clockSel=1; clockSel=1;
altered=true; altered=true;
} }
ImGui::Unindent();
if (altered) { if (altered) {
e->lockSave([&]() { e->lockSave([&]() {
@ -1919,6 +2013,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
ImGui::Text("Clock rate:"); ImGui::Text("Clock rate:");
ImGui::Indent();
if (ImGui::RadioButton("NTSC (1.79MHz)",clockSel==0)) { if (ImGui::RadioButton("NTSC (1.79MHz)",clockSel==0)) {
clockSel=0; clockSel=0;
altered=true; altered=true;
@ -1927,9 +2022,11 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
clockSel=1; clockSel=1;
altered=true; altered=true;
} }
ImGui::Unindent();
ImGui::Text("Global parameter priority:"); ImGui::Text("Global parameter priority:");
ImGui::Indent();
if (ImGui::RadioButton("Left to right",!keyPriority)) { if (ImGui::RadioButton("Left to right",!keyPriority)) {
keyPriority=false; keyPriority=false;
altered=true; altered=true;
@ -1938,6 +2035,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
keyPriority=true; keyPriority=true;
altered=true; altered=true;
} }
ImGui::Unindent();
if (altered) { if (altered) {
e->lockSave([&]() { e->lockSave([&]() {
@ -1988,11 +2086,13 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
} }
altered=true; altered=true;
} }
ImGui::Indent();
if (ImGui::InputInt("Hz",&customClock)) { if (ImGui::InputInt("Hz",&customClock)) {
if (customClock<MIN_CUSTOM_CLOCK) customClock=0; if (customClock<MIN_CUSTOM_CLOCK) customClock=0;
if (customClock>MAX_CUSTOM_CLOCK) customClock=MAX_CUSTOM_CLOCK; if (customClock>MAX_CUSTOM_CLOCK) customClock=MAX_CUSTOM_CLOCK;
altered=true; altered=true;
} }
ImGui::Unindent();
if (altered) { if (altered) {
e->lockSave([&]() { e->lockSave([&]() {