From 9c3661379d6f3314665d4cb0dacda0c3ddadd2c2 Mon Sep 17 00:00:00 2001 From: Patrick Mackinlay Date: Thu, 1 Aug 2019 14:44:32 +0700 Subject: wtl3132: output callback (nw) --- src/devices/machine/wtl3132.cpp | 9 +++++++-- src/devices/machine/wtl3132.h | 2 ++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/devices/machine/wtl3132.cpp b/src/devices/machine/wtl3132.cpp index bc7088aa24f..7fdfc61a8b3 100644 --- a/src/devices/machine/wtl3132.cpp +++ b/src/devices/machine/wtl3132.cpp @@ -21,7 +21,7 @@ #define LOG_IO (1U << 2) #define LOG_BYPASS (1U << 3) -#define VERBOSE (LOG_GENERAL|LOG_REGS|LOG_IO|LOG_BYPASS) +//#define VERBOSE (LOG_GENERAL|LOG_REGS|LOG_IO|LOG_BYPASS) #include "logmacro.h" ALLOW_SAVE_TYPE(float32_t); @@ -36,6 +36,7 @@ wtl3132_device::wtl3132_device(machine_config const &mconfig, char const *tag, d , m_fpcn_cb(*this) , m_fpex_cb(*this) , m_zero_cb(*this) + , m_port_x_cb(*this) { } @@ -44,6 +45,7 @@ void wtl3132_device::device_start() m_fpcn_cb.resolve_safe(); m_fpex_cb.resolve_safe(); m_zero_cb.resolve_safe(); + m_port_x_cb.resolve_safe(); save_item(NAME(m_fpcn_state)); save_item(NAME(m_fpex_state)); @@ -286,7 +288,10 @@ void wtl3132_device::stage2(unsigned const index) // complete fstore if (OPF(code, IOCT) == 2) { - m_x_port = m_x_out; + // FIXME: work out what should happen when the X port is being + // read/written in the same cycle + //m_x_port = m_x_out; + m_port_x_cb(m_x_out.v); LOGMASKED(LOG_IO, "slot %d stage 2 fstore %f\n", index, u2f(m_x_out.v)); } } diff --git a/src/devices/machine/wtl3132.h b/src/devices/machine/wtl3132.h index 23bf9e17744..0d782e7375d 100644 --- a/src/devices/machine/wtl3132.h +++ b/src/devices/machine/wtl3132.h @@ -17,6 +17,7 @@ public: auto out_fpcn() { return m_fpcn_cb.bind(); } auto out_fpex() { return m_fpex_cb.bind(); } auto out_zero() { return m_zero_cb.bind(); } + auto out_port_x() { return m_port_x_cb.bind(); } // code and data ports void c_port_w(u64 data) { m_c_port = data; } @@ -119,6 +120,7 @@ private: devcb_write_line m_fpcn_cb; devcb_write_line m_fpex_cb; devcb_write_line m_zero_cb; + devcb_write32 m_port_x_cb; // output line state bool m_fpcn_state; -- cgit v1.2.3