From a529359993e6fee41c4099817ca991a340911795 Mon Sep 17 00:00:00 2001 From: richardg867 Date: Mon, 3 Jun 2024 22:40:46 -0300 Subject: [PATCH 1/2] config: Fix incorrect saving of cpu_override_interpreter --- src/config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.c b/src/config.c index 77ec89125..ab23ddb4f 100644 --- a/src/config.c +++ b/src/config.c @@ -1927,7 +1927,7 @@ save_machine(void) else ini_section_delete_var(cat, "cpu_override"); if (cpu_override_interpreter) - ini_section_set_int(cat, "cpu_override_interpreter", cpu_override); + ini_section_set_int(cat, "cpu_override_interpreter", cpu_override_interpreter); else ini_section_delete_var(cat, "cpu_override_interpreter"); From 0c6f54ac0e8656c9087fe3dd136984be9d0fc169 Mon Sep 17 00:00:00 2001 From: TC1995 Date: Wed, 5 Jun 2024 22:10:26 +0200 Subject: [PATCH 2/2] Ported the "latest" YMFM changes. To 86box. --- src/sound/ymfm/ymfm.h | 3 +++ src/sound/ymfm/ymfm_fm.ipp | 2 +- src/sound/ymfm/ymfm_ssg.h | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/sound/ymfm/ymfm.h b/src/sound/ymfm/ymfm.h index 4f8ba1243..c5986d66b 100644 --- a/src/sound/ymfm/ymfm.h +++ b/src/sound/ymfm/ymfm.h @@ -485,6 +485,8 @@ public: class ymfm_engine_callbacks { public: + virtual ~ymfm_engine_callbacks() = default; + // timer callback; called by the interface when a timer fires virtual void engine_timer_expired(uint32_t tnum) = 0; @@ -506,6 +508,7 @@ class ymfm_interface template friend class fm_engine_base; public: + virtual ~ymfm_interface() = default; // the following functions must be implemented by any derived classes; the // default implementations are sufficient for some minimal operation, but will // likely need to be overridden to integrate with the outside world; they are diff --git a/src/sound/ymfm/ymfm_fm.ipp b/src/sound/ymfm/ymfm_fm.ipp index 55cdd643d..a3ee8d333 100644 --- a/src/sound/ymfm/ymfm_fm.ipp +++ b/src/sound/ymfm/ymfm_fm.ipp @@ -1518,7 +1518,7 @@ void fm_engine_base::engine_timer_expired(uint32_t tnum) for (uint32_t chnum = 0; chnum < CHANNELS; chnum++) if (bitfield(RegisterType::CSM_TRIGGER_MASK, chnum)) { - m_channel[chnum]->keyonoff(1, KEYON_CSM, chnum); + m_channel[chnum]->keyonoff(0xf, KEYON_CSM, chnum); m_modified_channels |= 1 << chnum; } diff --git a/src/sound/ymfm/ymfm_ssg.h b/src/sound/ymfm/ymfm_ssg.h index 749ad146f..cb7ec9e7c 100644 --- a/src/sound/ymfm/ymfm_ssg.h +++ b/src/sound/ymfm/ymfm_ssg.h @@ -49,6 +49,8 @@ namespace ymfm class ssg_override { public: + virtual ~ssg_override() = default; + // reset our status virtual void ssg_reset() = 0;