summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2021-06-05 20:38:56 -0700
committer Aaron Giles <aaron@aarongiles.com>2021-06-05 20:38:56 -0700
commite38c112c9b943bc1d50ab4ae62cccefc982ed6fa (patch)
treeac8f42f73cfb97c9dc36c742521817b968eb7ed3
parent217003b7c947ee9ccb79fe569ae3def64d159353 (diff)
Some cleanups
-rw-r--r--src/devices/sound/ymfm_mame.h11
-rw-r--r--src/mame/drivers/enmirage.cpp2
2 files changed, 6 insertions, 7 deletions
diff --git a/src/devices/sound/ymfm_mame.h b/src/devices/sound/ymfm_mame.h
index 9efd5542337..fe4ab11bfcb 100644
--- a/src/devices/sound/ymfm_mame.h
+++ b/src/devices/sound/ymfm_mame.h
@@ -76,8 +76,7 @@ protected:
{
// if we're currently executing a CPU, schedule the interrupt check;
// otherwise, do it directly
- auto &scheduler = machine().scheduler();
- if (scheduler.currently_executing())
+ if (machine().scheduler().currently_executing())
m_fm_check_interrupts.synchronize();
else
m_engine->engine_check_interrupts();
@@ -90,7 +89,7 @@ protected:
virtual void ymfm_set_timer(uint32_t tnum, int32_t duration_in_clocks) override
{
if (duration_in_clocks >= 0)
- m_timer[tnum].adjust(attotime::from_ticks(duration_in_clocks, device_t::clock()), tnum);
+ m_timer[tnum].adjust(attotime::from_ticks(duration_in_clocks, device_t::clock()));
else
m_timer[tnum].enable(false);
}
@@ -141,8 +140,8 @@ protected:
virtual void device_start() override
{
// allocate our timers
- for (int tnum = 0; tnum < 2; tnum++)
- m_timer[tnum].init(*this, FUNC(ym_generic_device::fm_timer_handler));
+ m_timer[0].init(*this, FUNC(ym_generic_device::fm_timer_handler<0>));
+ m_timer[1].init(*this, FUNC(ym_generic_device::fm_timer_handler<1>));
m_fm_mode_write.init(*this, FUNC(ym_generic_device::fm_mode_write));
m_fm_check_interrupts.init(*this, FUNC(ym_generic_device::fm_check_interrupts));
@@ -157,7 +156,7 @@ protected:
// timer callbacks
void fm_mode_write(timer_instance const &timer) { m_engine->engine_mode_write(timer.param()); }
void fm_check_interrupts(timer_instance const &timer) { m_engine->engine_check_interrupts(); }
- void fm_timer_handler(timer_instance const &timer) { m_engine->engine_timer_expired(timer.param()); }
+ template<int Num> void fm_timer_handler(timer_instance const &timer) { m_engine->engine_timer_expired(Num); }
// internal state
attotime m_busy_end; // busy end time
diff --git a/src/mame/drivers/enmirage.cpp b/src/mame/drivers/enmirage.cpp
index 25e99612d95..40a1a2321c4 100644
--- a/src/mame/drivers/enmirage.cpp
+++ b/src/mame/drivers/enmirage.cpp
@@ -171,7 +171,7 @@ static void ensoniq_floppies(device_slot_interface &device)
uint8_t enmirage_state::mirage_adc_read()
{
- uint8_t value;
+ uint8_t value = 0;
switch(m_mux_value & 0x03)
{
case 0: