aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWohlstand <admin@wohlnet.ru>2025-03-26 03:11:00 +0300
committerWohlstand <admin@wohlnet.ru>2025-03-26 03:11:00 +0300
commit255996096aa9807405cc828e171ffe200c07f015 (patch)
tree19e6bcdce844605a5d5bc6b160e5b91738802f65
parent42f4d4cfb692466b73737b97dfc4166278856bec (diff)
downloadlibADLMIDI-255996096aa9807405cc828e171ffe200c07f015.tar.gz
libADLMIDI-255996096aa9807405cc828e171ffe200c07f015.tar.bz2
libADLMIDI-255996096aa9807405cc828e171ffe200c07f015.zip
ymfm.h: Make everything non-virtual
Polymorphism is not used here, but this makes more problems than good.
-rw-r--r--src/chips/ymfm/ymfm.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/chips/ymfm/ymfm.h b/src/chips/ymfm/ymfm.h
index ccd0d6c..2cc2ac1 100644
--- a/src/chips/ymfm/ymfm.h
+++ b/src/chips/ymfm/ymfm.h
@@ -505,7 +505,6 @@ class ymfm_interface
template<typename RegisterType> friend class fm_engine_base;
public:
- virtual ~ymfm_interface() {}
// 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
@@ -519,31 +518,31 @@ public:
// register, which could affect timers and interrupts; our responsibility
// is to ensure the system is up to date before calling the engine's
// engine_mode_write() method
- virtual void ymfm_sync_mode_write(uint8_t data) { m_engine->engine_mode_write(data); }
+ void ymfm_sync_mode_write(uint8_t data) { m_engine->engine_mode_write(data); }
// the chip implementation calls this when the chip's status has changed,
// which may affect the interrupt state; our responsibility is to ensure
// the system is up to date before calling the engine's
// engine_check_interrupts() method
- virtual void ymfm_sync_check_interrupts() { m_engine->engine_check_interrupts(); }
+ void ymfm_sync_check_interrupts() { m_engine->engine_check_interrupts(); }
// the chip implementation calls this when one of the two internal timers
// has changed state; our responsibility is to arrange to call the engine's
// engine_timer_expired() method after the provided number of clocks; if
// duration_in_clocks is negative, we should cancel any outstanding timers
- virtual void ymfm_set_timer(uint32_t tnum, int32_t duration_in_clocks) { (void)tnum; (void)duration_in_clocks; }
+ void ymfm_set_timer(uint32_t tnum, int32_t duration_in_clocks) { (void)tnum; (void)duration_in_clocks; }
// the chip implementation calls this to indicate that the chip should be
// considered in a busy state until the given number of clocks has passed;
// our responsibility is to compute and remember the ending time based on
// the chip's clock for later checking
- virtual void ymfm_set_busy_end(uint32_t clocks) { (void)clocks; }
+ void ymfm_set_busy_end(uint32_t clocks) { (void)clocks; }
// the chip implementation calls this to see if the chip is still currently
// is a busy state, as specified by a previous call to ymfm_set_busy_end();
// our responsibility is to compare the current time against the previously
// noted busy end time and return true if we haven't yet passed it
- virtual bool ymfm_is_busy() { return false; }
+ bool ymfm_is_busy() { return false; }
//
// I/O functions
@@ -552,15 +551,15 @@ public:
// the chip implementation calls this when the state of the IRQ signal has
// changed due to a status change; our responsibility is to respond as
// needed to the change in IRQ state, signaling any consumers
- virtual void ymfm_update_irq(bool asserted) { (void)asserted; }
+ void ymfm_update_irq(bool asserted) { (void)asserted; }
// the chip implementation calls this whenever data is read from outside
// of the chip; our responsibility is to provide the data requested
- virtual uint8_t ymfm_external_read(access_class type, uint32_t address) { (void)type; (void)address; return 0; }
+ uint8_t ymfm_external_read(access_class type, uint32_t address) { (void)type; (void)address; return 0; }
// the chip implementation calls this whenever data is written outside
// of the chip; our responsibility is to pass the written data on to any consumers
- virtual void ymfm_external_write(access_class type, uint32_t address, uint8_t data) { (void)type; (void)address; (void)data; }
+ void ymfm_external_write(access_class type, uint32_t address, uint8_t data) { (void)type; (void)address; (void)data; }
protected:
// pointer to engine callbacks -- this is set directly by the engine at