PC speaker: add PC-98 clock rate options
This commit is contained in:
parent
3f2f8a7197
commit
69bb628a8b
|
@ -587,7 +587,17 @@ bool DivPlatformPCSpeaker::keyOffAffectsArp(int ch) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void DivPlatformPCSpeaker::setFlags(const DivConfig& flags) {
|
void DivPlatformPCSpeaker::setFlags(const DivConfig& flags) {
|
||||||
chipClock=COLOR_NTSC/3.0;
|
switch (flags.getInt("clockSel",0)) {
|
||||||
|
case 1: // PC-98
|
||||||
|
chipClock=38400*52;
|
||||||
|
break;
|
||||||
|
case 2: // PC-98
|
||||||
|
chipClock=38400*64;
|
||||||
|
break;
|
||||||
|
default: // IBM PC
|
||||||
|
chipClock=COLOR_NTSC/3.0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
rate=chipClock/PCSPKR_DIVIDER;
|
rate=chipClock/PCSPKR_DIVIDER;
|
||||||
speakerType=flags.getInt("speakerType",0)&3;
|
speakerType=flags.getInt("speakerType",0)&3;
|
||||||
oscBuf->rate=rate;
|
oscBuf->rate=rate;
|
||||||
|
|
|
@ -683,8 +683,23 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DIV_SYSTEM_PCSPKR: {
|
case DIV_SYSTEM_PCSPKR: {
|
||||||
|
int clockSel=flags.getInt("clockSel",0);
|
||||||
int speakerType=flags.getInt("speakerType",0);
|
int speakerType=flags.getInt("speakerType",0);
|
||||||
|
|
||||||
|
ImGui::Text("Clock rate:");
|
||||||
|
if (ImGui::RadioButton("1.19MHz (PC)",clockSel==0)) {
|
||||||
|
clockSel=0;
|
||||||
|
altered=true;
|
||||||
|
}
|
||||||
|
if (ImGui::RadioButton("1.99MHz (PC-98)",clockSel==1)) {
|
||||||
|
clockSel=1;
|
||||||
|
altered=true;
|
||||||
|
}
|
||||||
|
if (ImGui::RadioButton("2.46MHz (PC-98)",clockSel==2)) {
|
||||||
|
clockSel=2;
|
||||||
|
altered=true;
|
||||||
|
}
|
||||||
|
|
||||||
ImGui::Text("Speaker type:");
|
ImGui::Text("Speaker type:");
|
||||||
if (ImGui::RadioButton("Unfiltered",speakerType==0)) {
|
if (ImGui::RadioButton("Unfiltered",speakerType==0)) {
|
||||||
speakerType=0;
|
speakerType=0;
|
||||||
|
@ -705,6 +720,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
|
||||||
|
|
||||||
if (altered) {
|
if (altered) {
|
||||||
e->lockSave([&]() {
|
e->lockSave([&]() {
|
||||||
|
flags.set("clockSel",clockSel);
|
||||||
flags.set("speakerType",speakerType);
|
flags.set("speakerType",speakerType);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue