From 316e9390786b8997c55298b16819a7734b147aa3 Mon Sep 17 00:00:00 2001 From: Patrick Mackinlay Date: Fri, 13 Sep 2019 11:32:01 +0700 Subject: [PATCH] wtl3132: expose register state (nw) --- src/devices/machine/wtl3132.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/devices/machine/wtl3132.h b/src/devices/machine/wtl3132.h index 0d782e7375d..deca6dd7f26 100644 --- a/src/devices/machine/wtl3132.h +++ b/src/devices/machine/wtl3132.h @@ -37,6 +37,17 @@ public: static std::string abin(u64 const code); static std::string adst(u64 const code); + void state_add(device_state_interface &parent, unsigned base = 0) + { + parent.state_add(base + 0, "MODE", m_mode).formatstr("%04X"); + parent.state_add(base + 1, "T1", m_t1.v).formatstr("%08X"); + parent.state_add(base + 2, "T2", m_t2.v).formatstr("%08X"); + parent.state_add(base + 3, "T3", m_t3.v).formatstr("%08X"); + + for (unsigned i = 0; i < 32; i++) + parent.state_add(base + i + 4, util::string_format("F%d", i).c_str(), m_f[i].v).formatstr("%08X"); + } + enum code_mask : u64 { // opcode is 34 bits wide