summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2020-02-03 22:18:18 -0500
committer AJR <ajrhacker@users.noreply.github.com>2020-02-03 22:18:18 -0500
commit34cf491d146a2b06d9658714978a8c545bddc3a7 (patch)
treee9dc2b676da0f4013e325bc5c8f90ebfecb2820e
parent636315be5f4eefed133be67e64348522c78b9798 (diff)
i8251: Resolve callbacks at device_resolve_objects time (nw)
-rw-r--r--src/devices/machine/i8251.cpp14
-rw-r--r--src/devices/machine/i8251.h1
2 files changed, 13 insertions, 2 deletions
diff --git a/src/devices/machine/i8251.cpp b/src/devices/machine/i8251.cpp
index 2ef674ec1c0..03cba758bbf 100644
--- a/src/devices/machine/i8251.cpp
+++ b/src/devices/machine/i8251.cpp
@@ -85,10 +85,12 @@ v5x_scu_device::v5x_scu_device(const machine_config &mconfig, const char *tag, d
//-------------------------------------------------
-// device_start - device-specific startup
+// device_resolve_objects - resolve objects that
+// may be needed for other devices to set
+// initial conditions at start time
//-------------------------------------------------
-void i8251_device::device_start()
+void i8251_device::device_resolve_objects()
{
// resolve callbacks
m_txd_handler.resolve_safe();
@@ -98,6 +100,14 @@ void i8251_device::device_start()
m_txrdy_handler.resolve_safe();
m_txempty_handler.resolve_safe();
m_syndet_handler.resolve_safe();
+}
+
+//-------------------------------------------------
+// device_start - device-specific startup
+//-------------------------------------------------
+
+void i8251_device::device_start()
+{
save_item(NAME(m_flags));
save_item(NAME(m_sync_byte_count));
save_item(NAME(m_status));
diff --git a/src/devices/machine/i8251.h b/src/devices/machine/i8251.h
index 44f912eaa60..2bda850958e 100644
--- a/src/devices/machine/i8251.h
+++ b/src/devices/machine/i8251.h
@@ -67,6 +67,7 @@ protected:
uint32_t clock);
// device-level overrides
+ virtual void device_resolve_objects() override;
virtual void device_start() override;
virtual void device_reset() override;