From 6b040084e08f0fca3201a01616b1302aa7b943bd Mon Sep 17 00:00:00 2001 From: tildearrow Date: Fri, 4 Feb 2022 21:35:24 -0500 Subject: [PATCH] Genesis: add alternate clock speed --- src/engine/platform/genesis.cpp | 4 +++- src/engine/song.h | 1 + src/gui/gui.cpp | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/engine/platform/genesis.cpp b/src/engine/platform/genesis.cpp index 4f487bb7f..9027a8777 100644 --- a/src/engine/platform/genesis.cpp +++ b/src/engine/platform/genesis.cpp @@ -794,7 +794,9 @@ void DivPlatformGenesis::setYMFM(bool use) { } void DivPlatformGenesis::setFlags(unsigned int flags) { - if (flags==2) { + if (flags==3) { + chipClock=COLOR_NTSC*12.0/7.0; + } else if (flags==2) { chipClock=8000000.0; } else if (flags==1) { chipClock=COLOR_PAL*12.0/7.0; diff --git a/src/engine/song.h b/src/engine/song.h index a04060182..4709566a5 100644 --- a/src/engine/song.h +++ b/src/engine/song.h @@ -146,6 +146,7 @@ struct DivSong { // - 0: Genesis NTSC (7.67MHz) // - 1: Genesis PAL (7.61MHz) // - 2: 8MHz + // - 3: AtGames Genesis (???) // - YM2151: // - bit 0-1: clock rate // - 0: 3.58MHz (NTSC) diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index ee2d4f958..559f9a9ab 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -5176,6 +5176,9 @@ bool FurnaceGUI::loop() { if (ImGui::RadioButton("FM Towns (8MHz)",(flags&3)==2)) { e->setSysFlags(i,(flags&0x80000000)|2); } + if (ImGui::RadioButton("AtGames Genesis",(flags&3)==3)) { + e->setSysFlags(i,(flags&0x80000000)|3); + } bool ladder=flags&0x80000000; if (ImGui::Checkbox("Enable DAC distortion",&ladder)) { e->setSysFlags(i,(flags&(~0x80000000))|(ladder?0x80000000:0));