mirror of
https://github.com/holub/mame
synced 2025-04-24 09:20:02 +03:00
timers: Periodic timers are not adjustable, be a little more affirmative about it [O. Galibert]
This commit is contained in:
parent
65d8c68737
commit
157a37994c
@ -85,7 +85,7 @@ public:
|
||||
bool enabled() const { return m_timer->enabled(); }
|
||||
|
||||
// property setters
|
||||
void set_param(int param) const { assert(m_type == TIMER_TYPE_GENERIC); m_timer->set_param(param); }
|
||||
void set_param(int param) const { if(m_type != TIMER_TYPE_GENERIC) fatalerror("Cannot change parameter on a non-generic timer.\n"); m_timer->set_param(param); }
|
||||
void set_ptr(void *ptr) { m_ptr = ptr; }
|
||||
void enable(bool enable = true) const { m_timer->enable(enable); }
|
||||
|
||||
@ -93,7 +93,8 @@ public:
|
||||
void reset() { adjust(attotime::never, 0, attotime::never); }
|
||||
void adjust(const attotime &duration, s32 param = 0, const attotime &period = attotime::never) const
|
||||
{
|
||||
assert(m_type == TIMER_TYPE_GENERIC);
|
||||
if(m_type != TIMER_TYPE_GENERIC)
|
||||
fatalerror("Cannot adjust a non-generic timer.\n");
|
||||
m_timer->adjust(duration, param, period);
|
||||
}
|
||||
|
||||
|
@ -577,7 +577,7 @@ void nes_sh6578_state::nes_sh6578(machine_config& config)
|
||||
m_screen->set_visarea(0*8, 32*8-1, 0*8, 30*8-1);
|
||||
m_screen->set_screen_update(FUNC(nes_sh6578_state::screen_update));
|
||||
|
||||
TIMER(config, m_timer).configure_periodic(FUNC(nes_sh6578_state::timer_expired), attotime::never);
|
||||
TIMER(config, m_timer).configure_generic(FUNC(nes_sh6578_state::timer_expired));
|
||||
|
||||
/* sound hardware */
|
||||
SPEAKER(config, "mono").front_center();
|
||||
|
@ -5487,7 +5487,7 @@ void vt_vt1682_state::vt_vt1682_palbase(machine_config& config)
|
||||
void vt_vt1682_state::vt_vt1682_common(machine_config& config)
|
||||
{
|
||||
TIMER(config, "scantimer").configure_scanline(FUNC(vt_vt1682_state::scanline), "screen", 0, 1);
|
||||
TIMER(config, m_render_timer).configure_periodic(FUNC(vt_vt1682_state::line_render_start), attotime::never);
|
||||
TIMER(config, m_render_timer).configure_generic(FUNC(vt_vt1682_state::line_render_start));
|
||||
|
||||
VT_VT1682_ALU(config, m_maincpu_alu, 0);
|
||||
VT_VT1682_ALU(config, m_soundcpu_alu, 0);
|
||||
|
@ -199,7 +199,7 @@ WRITE8_MEMBER(vrt_vt1682_timer_device::vt1682_timer_irqclear_w)
|
||||
|
||||
void vrt_vt1682_timer_device::device_add_mconfig(machine_config& config)
|
||||
{
|
||||
TIMER(config, m_timer).configure_periodic(FUNC(vrt_vt1682_timer_device::timer_expired), attotime::never);
|
||||
TIMER(config, m_timer).configure_generic(FUNC(vrt_vt1682_timer_device::timer_expired));
|
||||
}
|
||||
|
||||
void vrt_vt1682_timer_device::change_clock()
|
||||
|
Loading…
Reference in New Issue
Block a user