diff --git a/src/engine/platform/sms.cpp b/src/engine/platform/sms.cpp index d22316865..af7629ecd 100644 --- a/src/engine/platform/sms.cpp +++ b/src/engine/platform/sms.cpp @@ -211,6 +211,7 @@ void DivPlatformSMS::forceIns() { chan[i].freqChanged=true; } } + updateSNMode=true; } void* DivPlatformSMS::getChanState(int ch) { diff --git a/src/engine/song.h b/src/engine/song.h index cd9c460d8..ab8c7daf9 100644 --- a/src/engine/song.h +++ b/src/engine/song.h @@ -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) diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 35bf2f81b..0fcb8c55b 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -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)) {