summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/upd7004.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/machine/upd7004.cpp')
-rw-r--r--src/devices/machine/upd7004.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/devices/machine/upd7004.cpp b/src/devices/machine/upd7004.cpp
index e3cfb911864..8fcb49e9c62 100644
--- a/src/devices/machine/upd7004.cpp
+++ b/src/devices/machine/upd7004.cpp
@@ -40,7 +40,7 @@ ALLOW_SAVE_TYPE(upd7004_device::state);
upd7004_device::upd7004_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, UPD7004, tag, owner, clock),
m_eoc_cb(*this), m_eoc_ff_cb(*this),
- m_in_cb(*this),
+ m_in_cb(*this, 0x3ff),
m_state(STATE_IDLE),
m_cycle_timer(nullptr),
m_div(1), m_code(false), m_address(0), m_sar(0x3ff)
@@ -53,13 +53,8 @@ upd7004_device::upd7004_device(const machine_config &mconfig, const char *tag, d
void upd7004_device::device_start()
{
- // resolve callbacks
- m_eoc_cb.resolve_safe();
- m_eoc_ff_cb.resolve_safe();
- m_in_cb.resolve_all_safe(0x3ff);
-
// allocate timers
- m_cycle_timer = timer_alloc();
+ m_cycle_timer = timer_alloc(FUNC(upd7004_device::update_state), this);
m_cycle_timer->adjust(attotime::never);
// register for save states
@@ -71,10 +66,10 @@ void upd7004_device::device_start()
}
//-------------------------------------------------
-// device_timer - handler timer events
+// update_state -
//-------------------------------------------------
-void upd7004_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
+TIMER_CALLBACK_MEMBER(upd7004_device::update_state)
{
switch (m_state)
{