From d4d1ade5134a5d49da216f8df034a5055dd70b62 Mon Sep 17 00:00:00 2001 From: cam900 Date: Thu, 3 Mar 2022 03:10:04 +0900 Subject: [PATCH 1/5] Add various system, Minor corrections YM2413 (drums mode) Standalone YM2413 with allows drum channel. Sound Expander for Commodore 64 OPL FM Sound expander cartridge for Commodore 64, it's placeholder until OPL is implemented. MSX-MUSIC: MSX's sound standard, appeared after MSX-AUDIO. it's basically OPLL FM sound expansion for MSX. SSI 2001: ISA Sound card with SID 6581. SID input clock is driven from ISA clock, so I modified flags value check routine. Sound Blaster w/Game Blaster Compatible Earliest Sound Blaster models has featured with Game Blaster compatiblity, It's has 2 SAA1099s like CMS/Game Blaster. It's removed at later models, but some hardware has just empty socket; you can restore this feature when you mount SAA1099 at empty socket. Sharp X1: Predecessor of X68000. it has built in AY PSG like competitors of the same period, but it has YM2151 FM sound addon in later models. FM sound is embedded in turbo Z, and that is succeeded by X68000. X68000 hasn't AY, instead OKI MSM6258. YM2151 in OutRun Board and X Board is 4MHz --- src/engine/platform/c64.cpp | 15 +++-- src/gui/gui.cpp | 113 ++++++++++++++++++++++++++++++++++-- 2 files changed, 119 insertions(+), 9 deletions(-) diff --git a/src/engine/platform/c64.cpp b/src/engine/platform/c64.cpp index 6257daead..889211332 100644 --- a/src/engine/platform/c64.cpp +++ b/src/engine/platform/c64.cpp @@ -509,10 +509,17 @@ void DivPlatformC64::setChipModel(bool is6581) { } void DivPlatformC64::setFlags(unsigned int flags) { - if (flags&1) { - rate=COLOR_PAL*2.0/9.0; - } else { - rate=COLOR_NTSC*2.0/7.0; + switch (flags&0xf) { + case 0x0: // NTSC C64 + rate=COLOR_NTSC*2.0/7.0; + break; + case 0x1: // PAL C64 + rate=COLOR_PAL*2.0/9.0; + break; + case 0x2: // SSI 2001 + default: + rate=14318180.0/16.0; + break; } chipClock=rate; } diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 0aeeb129e..5b4fc8134 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -4714,7 +4714,7 @@ bool FurnaceGUI::loop() { e->setSysFlags(i,1,restart); updateWindowTitle(); } - if (ImGui::RadioButton("X68000 (4MHz)",flags==2)) { + if (ImGui::RadioButton("X1/X68000 (4MHz)",flags==2)) { e->setSysFlags(i,2,restart); updateWindowTitle(); } @@ -4733,6 +4733,21 @@ bool FurnaceGUI::loop() { updateWindowTitle(); } break; + case DIV_SYSTEM_C64_8580: + case DIV_SYSTEM_C64_6581: + if (ImGui::RadioButton("NTSC (1.02MHz)",flags==0)) { + e->setSysFlags(i,0,restart); + updateWindowTitle(); + } + if (ImGui::RadioButton("PAL (0.99MHz)",flags==1)) { + e->setSysFlags(i,1,restart); + updateWindowTitle(); + } + if (ImGui::RadioButton("SSI 2001 (0.89MHz)",flags==2)) { + e->setSysFlags(i,2,restart); + updateWindowTitle(); + } + break; case DIV_SYSTEM_AY8910: case DIV_SYSTEM_AY8930: { ImGui::Text("Clock rate:"); @@ -4748,7 +4763,7 @@ bool FurnaceGUI::loop() { e->setSysFlags(i,(flags&(~15))|2,restart); updateWindowTitle(); } - if (ImGui::RadioButton("2MHz (Atari ST)",(flags&15)==3)) { + if (ImGui::RadioButton("2MHz (Atari ST/Sharp X1)",(flags&15)==3)) { e->setSysFlags(i,(flags&(~15))|3,restart); updateWindowTitle(); } @@ -6157,6 +6172,12 @@ FurnaceGUI::FurnaceGUI(): 0 } )); + cat.systems.push_back(FurnaceGUISysDef( + "Yamaha YM2413 (drums mode)", { + DIV_SYSTEM_OPLL_DRUMS, 64, 0, 0, + 0 + } + )); sysCategories.push_back(cat); cat=FurnaceGUISysCategory("Square"); @@ -6331,6 +6352,35 @@ FurnaceGUI::FurnaceGUI(): 0 } )); + /* + cat.systems.push_back(FurnaceGUISysDef( + "Commodore 64 (6581 SID + Sound Expander)", { + DIV_SYSTEM_OPL, 64, 0, 0, + DIV_SYSTEM_C64_6581, 64, 0, 1, + 0 + } + )); + cat.systems.push_back(FurnaceGUISysDef( + "Commodore 64 (6581 SID + Sound Expander with drums mode)", { + DIV_SYSTEM_OPL_DRUMS, 64, 0, 0, + DIV_SYSTEM_C64_6581, 64, 0, 1, + 0 + } + )); + cat.systems.push_back(FurnaceGUISysDef( + "Commodore 64 (8580 SID + Sound Expander)", { + DIV_SYSTEM_OPL, 64, 0, 0, + DIV_SYSTEM_C64_8580, 64, 0, 1, + 0 + } + )); + cat.systems.push_back(FurnaceGUISysDef( + "Commodore 64 (8580 SID + Sound Expander with drums mode)", { + DIV_SYSTEM_OPL_DRUMS, 64, 0, 0, + DIV_SYSTEM_C64_8580, 64, 0, 1, + 0 + } + ));*/ cat.systems.push_back(FurnaceGUISysDef( "Amiga", { DIV_SYSTEM_AMIGA, 64, 0, 0, @@ -6343,6 +6393,20 @@ FurnaceGUI::FurnaceGUI(): 0 } )); + cat.systems.push_back(FurnaceGUISysDef( + "MSX + MSX-MUSIC", { + DIV_SYSTEM_OPLL, 64, 0, 0, + DIV_SYSTEM_AY8910, 64, 0, 16, + 0 + } + )); + cat.systems.push_back(FurnaceGUISysDef( + "MSX + MSX-MUSIC (drums mode)", { + DIV_SYSTEM_OPLL_DRUMS, 64, 0, 0, + DIV_SYSTEM_AY8910, 64, 0, 16, + 0 + } + )); cat.systems.push_back(FurnaceGUISysDef( "ZX Spectrum (48K)", { DIV_SYSTEM_AY8910, 64, 0, 2, @@ -6386,6 +6450,13 @@ FurnaceGUI::FurnaceGUI(): 0 } )); + cat.systems.push_back(FurnaceGUISysDef( + "PC + SSI 2001", { + DIV_SYSTEM_C64_6581, 64, 0, 2, + DIV_SYSTEM_PCSPKR, 64, 0, 0, + 0 + } + )); cat.systems.push_back(FurnaceGUISysDef( "PC + Game Blaster", { DIV_SYSTEM_SAA1099, 64, -127, 1, @@ -6408,6 +6479,24 @@ FurnaceGUI::FurnaceGUI(): 0 } )); + cat.systems.push_back(FurnaceGUISysDef( + "PC + Sound Blaster w/Game Blaster Compatible", { + DIV_SYSTEM_OPL2, 64, 0, 0, + DIV_SYSTEM_SAA1099, 64, -127, 1, + DIV_SYSTEM_SAA1099, 64, 127, 1, + DIV_SYSTEM_PCSPKR, 64, 0, 0, + 0 + } + )); + cat.systems.push_back(FurnaceGUISysDef( + "PC + Sound Blaster w/Game Blaster Compatible (drums mode)", { + DIV_SYSTEM_OPL2_DRUMS, 64, 0, 0, + DIV_SYSTEM_SAA1099, 64, -127, 1, + DIV_SYSTEM_SAA1099, 64, 127, 1, + DIV_SYSTEM_PCSPKR, 64, 0, 0, + 0 + } + )); cat.systems.push_back(FurnaceGUISysDef( "PC + Sound Blaster Pro 2", { DIV_SYSTEM_OPL3, 64, 0, 0, @@ -6422,10 +6511,24 @@ FurnaceGUI::FurnaceGUI(): 0 } )); + cat.systems.push_back(FurnaceGUISysDef( + "Sharp X1", { + DIV_SYSTEM_AY8910, 64, 0, 3, + 0 + } + )); + cat.systems.push_back(FurnaceGUISysDef( + "Sharp X1 + FM Addon", { + DIV_SYSTEM_AY8910, 64, 0, 3, + DIV_SYSTEM_YM2151, 64, 0, 2, + 0 + } + )); /* cat.systems.push_back(FurnaceGUISysDef( "Sharp X68000", { - DIV_SYSTEM_AY8910, 64, 0, 16, + DIV_SYSTEM_YM2151, 64, 0, 2, + DIV_SYSTEM_MSM6258, 64, 0, 0, 0 } ));*/ @@ -6448,7 +6551,7 @@ FurnaceGUI::FurnaceGUI(): )); cat.systems.push_back(FurnaceGUISysDef( "Sega OutRun/X Board", { - DIV_SYSTEM_YM2151, 64, 0, 0, + DIV_SYSTEM_YM2151, 64, 0, 2, DIV_SYSTEM_SEGAPCM, 64, 0, 0, 0 } @@ -6552,7 +6655,7 @@ FurnaceGUI::FurnaceGUI(): )); cat.systems.push_back(FurnaceGUISysDef( "Arcade (YM2151 and SegaPCM)", { - DIV_SYSTEM_YM2151, 64, 0, 0, + DIV_SYSTEM_YM2151, 64, 0, 2, DIV_SYSTEM_SEGAPCM_COMPAT, 64, 0, 0, 0 } From 87561bf9cfd7d312aadce928e11535613d522384 Mon Sep 17 00:00:00 2001 From: cam900 Date: Thu, 3 Mar 2022 03:12:10 +0900 Subject: [PATCH 2/5] Fix spacing --- src/engine/platform/c64.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/engine/platform/c64.cpp b/src/engine/platform/c64.cpp index 889211332..49be60fb8 100644 --- a/src/engine/platform/c64.cpp +++ b/src/engine/platform/c64.cpp @@ -510,16 +510,16 @@ void DivPlatformC64::setChipModel(bool is6581) { void DivPlatformC64::setFlags(unsigned int flags) { switch (flags&0xf) { - case 0x0: // NTSC C64 + case 0x0: // NTSC C64 rate=COLOR_NTSC*2.0/7.0; - break; - case 0x1: // PAL C64 + break; + case 0x1: // PAL C64 rate=COLOR_PAL*2.0/9.0; - break; - case 0x2: // SSI 2001 - default: + break; + case 0x2: // SSI 2001 + default: rate=14318180.0/16.0; - break; + break; } chipClock=rate; } From c4f2090b48607c1773b748b0e0cacd8b51004262 Mon Sep 17 00:00:00 2001 From: cam900 Date: Thu, 3 Mar 2022 13:07:16 +0900 Subject: [PATCH 3/5] Deflemask compatibility --- src/gui/gui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 5b4fc8134..dd2349c25 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -6655,7 +6655,7 @@ FurnaceGUI::FurnaceGUI(): )); cat.systems.push_back(FurnaceGUISysDef( "Arcade (YM2151 and SegaPCM)", { - DIV_SYSTEM_YM2151, 64, 0, 2, + DIV_SYSTEM_YM2151, 64, 0, 0, DIV_SYSTEM_SEGAPCM_COMPAT, 64, 0, 0, 0 } From 5393b67c1d5e0bc3698e2f8e80b3ff7832f791da Mon Sep 17 00:00:00 2001 From: cam900 Date: Thu, 3 Mar 2022 16:03:40 +0900 Subject: [PATCH 4/5] Yamaha SFG-01 OPM FM sound expansion by Yamaha, for their CX series MSX computers: It's needs converter when connect it to standard MSX cartridge slot. Successor is SFG-05, It has YM2164 OPP instead YM2151 OPM. --- src/gui/gui.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index dd2349c25..e9e75980a 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -6393,6 +6393,13 @@ FurnaceGUI::FurnaceGUI(): 0 } )); + cat.systems.push_back(FurnaceGUISysDef( + "MSX + SFG-01", { + DIV_SYSTEM_YM2151, 64, 0, 0, + DIV_SYSTEM_AY8910, 64, 0, 16, + 0 + } + )); cat.systems.push_back(FurnaceGUISysDef( "MSX + MSX-MUSIC", { DIV_SYSTEM_OPLL, 64, 0, 0, From 406faaeeea8d3a12ec4c9d4d78284ac20d34a340 Mon Sep 17 00:00:00 2001 From: cam900 Date: Fri, 11 Mar 2022 04:07:11 +0900 Subject: [PATCH 5/5] Gamate Handheld game console by Taiwanese Bit Corporation that supports stereo headphone, with had a AY-3-8910 based sound. --- src/gui/gui.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index b3e21250a..b6a93a40f 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -6532,6 +6532,12 @@ FurnaceGUI::FurnaceGUI(): 0 } )); + cat.systems.push_back(FurnaceGUISysDef( + "Gamate", { + DIV_SYSTEM_AY8910, 64, 0, 73, + 0 + } + )); sysCategories.push_back(cat); cat=FurnaceGUISysCategory("Computers");