SMS: add option to disable noise phase reset

issue #83
This commit is contained in:
tildearrow 2022-02-07 23:05:50 -05:00
parent a3beab6815
commit 8d45236cce
3 changed files with 16 additions and 7 deletions

View file

@ -211,6 +211,7 @@ void DivPlatformSMS::forceIns() {
chan[i].freqChanged=true;
}
}
updateSNMode=true;
}
void* DivPlatformSMS::getChanState(int ch) {

View file

@ -136,11 +136,13 @@ struct DivSong {
// - 0: NTSC (3.58MHz)
// - 1: PAL (3.55MHz)
// - 2: Other (4MHz)
// - 3: half NTSC (1.79MHz)
// - bit 2-3: noise type
// - 0: Sega VDP (16-bit noise)
// - 1: real SN76489 (15-bit noise)
// - 2: real SN76489 with Atari-like short noise buzz (15-bit noise)
// - 3: Game Gear (16-bit noise, stereo)
// - bit 4: disable noise phase reset
// - YM2612:
// - bit 0-1: clock rate
// - 0: Genesis NTSC (7.67MHz)

View file

@ -5688,7 +5688,7 @@ bool FurnaceGUI::loop() {
}
break;
}
case DIV_SYSTEM_SMS:
case DIV_SYSTEM_SMS: {
ImGui::Text("Clock rate:");
if (ImGui::RadioButton("NTSC (3.58MHz)",(flags&3)==0)) {
e->setSysFlags(i,(flags&(~3))|0,restart);
@ -5700,19 +5700,25 @@ bool FurnaceGUI::loop() {
e->setSysFlags(i,(flags&(~3))|2,restart);
}
ImGui::Text("Chip type:");
if (ImGui::RadioButton("Sega VDP/Master System",(flags>>2)==0)) {
e->setSysFlags(i,(flags&3)|0,restart);
if (ImGui::RadioButton("Sega VDP/Master System",((flags>>2)&3)==0)) {
e->setSysFlags(i,(flags&(~12))|0,restart);
}
if (ImGui::RadioButton("TI SN76489",(flags>>2)==1)) {
e->setSysFlags(i,(flags&3)|4,restart);
if (ImGui::RadioButton("TI SN76489",((flags>>2)&3)==1)) {
e->setSysFlags(i,(flags&(~12))|4,restart);
}
if (ImGui::RadioButton("TI SN76489 with Atari-like short noise",(flags>>2)==2)) {
e->setSysFlags(i,(flags&3)|8,restart);
if (ImGui::RadioButton("TI SN76489 with Atari-like short noise",((flags>>2)&3)==2)) {
e->setSysFlags(i,(flags&(~12))|8,restart);
}
/*if (ImGui::RadioButton("Game Gear",(flags>>2)==3)) {
e->setSysFlags(i,(flags&3)|12);
}*/
bool noPhaseReset=flags&16;
if (ImGui::Checkbox("Disable noise period change phase reset",&noPhaseReset)) {
e->setSysFlags(i,(flags&(~16))|(noPhaseReset<<4),restart);
}
break;
}
case DIV_SYSTEM_ARCADE:
case DIV_SYSTEM_YM2151:
if (ImGui::RadioButton("NTSC (3.58MHz)",flags==0)) {