diff options
Diffstat (limited to 'src/devices/machine/gt913_io.h')
-rw-r--r-- | src/devices/machine/gt913_io.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/devices/machine/gt913_io.h b/src/devices/machine/gt913_io.h index 0db4037642f..0346d701230 100644 --- a/src/devices/machine/gt913_io.h +++ b/src/devices/machine/gt913_io.h @@ -22,10 +22,11 @@ class gt913_io_hle_device : public device_t public: // construction/destruction gt913_io_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); - gt913_io_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, const char *intc, int t0irq, int t1irq) - : gt913_io_hle_device(mconfig, tag, owner, 0) + template<typename T, typename U> gt913_io_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&cpu, U &&intc, int t0irq, int t1irq) + : gt913_io_hle_device(mconfig, tag, owner) { - m_intc_tag = intc; + m_cpu.set_tag(std::forward<T>(cpu)); + m_intc.set_tag(std::forward<U>(intc)); m_timer_irq[0] = t0irq; m_timer_irq[1] = t1irq; } @@ -47,13 +48,11 @@ protected: virtual void device_start() override; virtual void device_reset() override; - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; + TIMER_CALLBACK_MEMBER(irq_timer_tick); private: - required_device<cpu_device> m_cpu; - address_space *m_cpu_io; - h8_intc_device *m_intc; - const char *m_intc_tag; + required_device<h8_device> m_cpu; + required_device<h8_intc_device> m_intc; /* timers */ uint8_t m_timer_control[2]; |