diff options
Diffstat (limited to 'src/devices/machine/kb3600.cpp')
-rw-r--r-- | src/devices/machine/kb3600.cpp | 43 |
1 files changed, 14 insertions, 29 deletions
diff --git a/src/devices/machine/kb3600.cpp b/src/devices/machine/kb3600.cpp index 5400d8ac1a8..5ebc9c56e0c 100644 --- a/src/devices/machine/kb3600.cpp +++ b/src/devices/machine/kb3600.cpp @@ -40,17 +40,17 @@ DEFINE_DEVICE_TYPE(AY3600, ay3600_device, "ay3600", "AY-5-3600 Keyboard Encoder" ay3600_device::ay3600_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, AY3600, tag, owner, clock), - m_read_x0(*this), - m_read_x1(*this), - m_read_x2(*this), - m_read_x3(*this), - m_read_x4(*this), - m_read_x5(*this), - m_read_x6(*this), - m_read_x7(*this), - m_read_x8(*this), - m_read_shift(*this), - m_read_control(*this), + m_read_x0(*this, 0), + m_read_x1(*this, 0), + m_read_x2(*this, 0), + m_read_x3(*this, 0), + m_read_x4(*this, 0), + m_read_x5(*this, 0), + m_read_x6(*this, 0), + m_read_x7(*this, 0), + m_read_x8(*this, 0), + m_read_shift(*this, 0), + m_read_control(*this, 0), m_write_data_ready(*this), m_write_ako(*this) { @@ -66,23 +66,8 @@ ay3600_device::ay3600_device(const machine_config &mconfig, const char *tag, dev void ay3600_device::device_start() { - // resolve callbacks - m_read_x0.resolve_safe(0); - m_read_x1.resolve_safe(0); - m_read_x2.resolve_safe(0); - m_read_x3.resolve_safe(0); - m_read_x4.resolve_safe(0); - m_read_x5.resolve_safe(0); - m_read_x6.resolve_safe(0); - m_read_x7.resolve_safe(0); - m_read_x8.resolve_safe(0); - m_read_shift.resolve_safe(0); - m_read_control.resolve_safe(0); - m_write_data_ready.resolve_safe(); - m_write_ako.resolve_safe(); - // allocate timers - m_scan_timer = timer_alloc(); + m_scan_timer = timer_alloc(FUNC(ay3600_device::perform_scan), this); m_scan_timer->adjust(attotime::from_hz(60), 0, attotime::from_hz(60)); m_ako = 0; @@ -103,10 +88,10 @@ void ay3600_device::device_reset() } //------------------------------------------------- -// device_timer - handler timer events +// perform_scan - scan the keyboard matrix //------------------------------------------------- -void ay3600_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) +TIMER_CALLBACK_MEMBER(ay3600_device::perform_scan) { int ako = 0; |