summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/melps4/m58846.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/cpu/melps4/m58846.cpp')
-rw-r--r--src/devices/cpu/melps4/m58846.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/devices/cpu/melps4/m58846.cpp b/src/devices/cpu/melps4/m58846.cpp
index 436dd312512..611f2d3af32 100644
--- a/src/devices/cpu/melps4/m58846.cpp
+++ b/src/devices/cpu/melps4/m58846.cpp
@@ -27,8 +27,8 @@ void m58846_device::data_128x4(address_map &map)
// device definitions
-m58846_device::m58846_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
- : melps4_cpu_device(mconfig, M58846, tag, owner, clock, 11, address_map_constructor(FUNC(m58846_device::program_2kx9), this), 7, address_map_constructor(FUNC(m58846_device::data_128x4), this), 12 /* number of D pins */, 2 /* subroutine page */, 1 /* interrupt page */), m_timer(nullptr)
+m58846_device::m58846_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
+ melps4_cpu_device(mconfig, M58846, tag, owner, clock, 11, address_map_constructor(FUNC(m58846_device::program_2kx9), this), 7, address_map_constructor(FUNC(m58846_device::data_128x4), this), 12 /* number of D pins */, 2 /* subroutine page */, 1 /* interrupt page */), m_timer(nullptr)
{ }
@@ -39,7 +39,7 @@ m58846_device::m58846_device(const machine_config &mconfig, const char *tag, dev
void m58846_device::device_start()
{
melps4_cpu_device::device_start();
- m_timer = timer_alloc(0);
+ m_timer = timer_alloc(FUNC(m58846_device::timer_update), this);
}
@@ -66,11 +66,8 @@ void m58846_device::reset_timer()
m_timer->adjust(base);
}
-void m58846_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
+TIMER_CALLBACK_MEMBER(m58846_device::timer_update)
{
- if (id != 0)
- return;
-
// timer 1: 7-bit fixed counter (manual specifically says 127)
if (++m_tmr_count[0] == 127)
{
@@ -93,7 +90,7 @@ void m58846_device::device_timer(emu_timer &timer, device_timer_id id, int param
reset_timer();
}
-void m58846_device::write_v(uint8_t data)
+void m58846_device::write_v(u8 data)
{
// d0: enable timer 1 irq
// d1: enable timer 2 irq? (TODO)