summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/z80sio.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/machine/z80sio.cpp')
-rw-r--r--src/devices/machine/z80sio.cpp34
1 files changed, 26 insertions, 8 deletions
diff --git a/src/devices/machine/z80sio.cpp b/src/devices/machine/z80sio.cpp
index a18be27d9c0..8cf9169c6b2 100644
--- a/src/devices/machine/z80sio.cpp
+++ b/src/devices/machine/z80sio.cpp
@@ -164,11 +164,12 @@ i8274_new_device::i8274_new_device(const machine_config &mconfig, const char *ta
}
//-------------------------------------------------
-// device_start - device-specific startup
+// device_resolve_objects - device-specific setup
//-------------------------------------------------
-void z80sio_device::device_start()
+void z80sio_device::device_resolve_objects()
{
LOG("%s\n", FUNCNAME);
+
// resolve callbacks
m_out_txda_cb.resolve_safe();
m_out_dtra_cb.resolve_safe();
@@ -185,6 +186,14 @@ void z80sio_device::device_start()
m_out_txdrqa_cb.resolve_safe();
m_out_rxdrqb_cb.resolve_safe();
m_out_txdrqb_cb.resolve_safe();
+}
+
+//-------------------------------------------------
+// device_start - device-specific startup
+//-------------------------------------------------
+void z80sio_device::device_start()
+{
+ LOG("%s\n", FUNCNAME);
// configure channel A
m_chanA->m_rxc = m_rxca;
@@ -530,21 +539,30 @@ z80sio_channel::z80sio_channel(const machine_config &mconfig, const char *tag, d
, m_sync(0)
{
LOG("%s\n",FUNCNAME);
- // Reset all registers
- m_rr0 = m_rr1 = m_rr2 = 0;
- m_wr0 = m_wr1 = m_wr2 = m_wr3 = m_wr4 = m_wr5 = m_wr6 = m_wr7 = 0;
+
+ // Reset all registers
+ m_rr0 = m_rr1 = m_rr2 = 0;
+ m_wr0 = m_wr1 = m_wr2 = m_wr3 = m_wr4 = m_wr5 = m_wr6 = m_wr7 = 0;
}
//-------------------------------------------------
-// start - channel startup
+// resove_objects - channel setup
//-------------------------------------------------
-void z80sio_channel::device_start()
+void z80sio_channel::device_resolve_objects()
{
LOG("%s\n",FUNCNAME);
m_uart = downcast<z80sio_device *>(owner());
m_index = m_uart->get_channel_index(this);
- m_variant = ((z80sio_device *)owner())->m_variant;
+ m_variant = m_uart->m_variant;
+}
+
+//-------------------------------------------------
+// start - channel startup
+//-------------------------------------------------
+void z80sio_channel::device_start()
+{
+ LOG("%s\n",FUNCNAME);
// state saving
save_item(NAME(m_rr0));