summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/ym2148.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/machine/ym2148.cpp')
-rw-r--r--src/devices/machine/ym2148.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/devices/machine/ym2148.cpp b/src/devices/machine/ym2148.cpp
index 04a3e53e97e..24e486e1012 100644
--- a/src/devices/machine/ym2148.cpp
+++ b/src/devices/machine/ym2148.cpp
@@ -22,7 +22,7 @@ ym2148_device::ym2148_device(const machine_config &mconfig, const char *tag, dev
, m_txd_handler(*this)
, m_irq_handler(*this)
, m_port_write_handler(*this)
- , m_port_read_handler(*this)
+ , m_port_read_handler(*this, 0xff)
, m_irq_state(CLEAR_LINE)
, m_irq_vector(0xff) // guess
, m_external_irq_vector(0xff) // guess
@@ -38,14 +38,9 @@ ym2148_device::ym2148_device(const machine_config &mconfig, const char *tag, dev
void ym2148_device::device_start()
{
- m_txd_handler.resolve_safe();
- m_irq_handler.resolve_safe();
- m_port_write_handler.resolve_safe();
- m_port_read_handler.resolve_safe(0xff);
-
// Start a timer to trigger at clock / 8 / 16
const attotime rate = clocks_to_attotime(8 * 16);
- m_timer = timer_alloc(0);
+ m_timer = timer_alloc(FUNC(ym2148_device::serial_clock_tick), this);
m_timer->adjust(rate, 0, rate);
}
@@ -136,7 +131,7 @@ void ym2148_device::update_irq()
}
-void ym2148_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
+TIMER_CALLBACK_MEMBER(ym2148_device::serial_clock_tick)
{
receive_clock();
transmit_clock();
@@ -212,7 +207,7 @@ uint8_t ym2148_device::get_irq_vector()
}
-WRITE_LINE_MEMBER(ym2148_device::write_rxd)
+void ym2148_device::write_rxd(int state)
{
m_rxd = state;
}