summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2020-01-23 17:41:17 -0500
committer AJR <ajrhacker@users.noreply.github.com>2020-01-23 17:41:17 -0500
commitac1eac4a6a65680b257924bd2a006e76c7bb93ce (patch)
treef74b9f4d9187717a13e7901761033320e2048cdc
parent7d524eb33837bc6675276ded74997ed6f9bf0749 (diff)
pace: Add flag display (nw)
-rw-r--r--src/devices/cpu/pace/pace.cpp31
-rw-r--r--src/devices/cpu/pace/pace.h3
2 files changed, 33 insertions, 1 deletions
diff --git a/src/devices/cpu/pace/pace.cpp b/src/devices/cpu/pace/pace.cpp
index 91e105548f0..478a690d38a 100644
--- a/src/devices/cpu/pace/pace.cpp
+++ b/src/devices/cpu/pace/pace.cpp
@@ -144,7 +144,7 @@ void pace_device::device_start()
state_add(STATE_GENPC, "GENPC", m_pc).noshow();
state_add(STATE_GENPCBASE, "GENPCBASE", m_ppc).noshow();
state_add<u16>(PACE_FR, "FR", [this]() { return m_fr; }, [this](u16 data) { set_fr(data); });
- state_add(STATE_GENFLAGS, "GENFLAGS", m_fr).noshow();
+ state_add(STATE_GENFLAGS, "GENFLAGS", m_fr).noshow().formatstr("%14s");
for (int i = 0; i < 4; i++)
state_add(PACE_AC0 + i, string_format("AC%d", i).c_str(), m_ac[i]);
state_add<u8>(PACE_STKD, "STKD", [this]() { return m_stack_depth; }, [this](u8 data) { m_stack_depth = data >= 10 ? 10 : data; }).mask(0xf);
@@ -973,3 +973,32 @@ void pace_device::execute_run()
m_icount--;
}
}
+
+
+//-------------------------------------------------
+// state_string_export -
+//-------------------------------------------------
+
+void pace_device::state_string_export(const device_state_entry &entry, std::string &str) const
+{
+ switch (entry.index())
+ {
+ case STATE_GENFLAGS:
+ str = string_format("%c%c%c%c%c%c%c%c%c%c%c%c%c%c",
+ BIT(m_fr, 14) ? 'F' : '.',
+ BIT(m_fr, 13) ? 'F' : '.',
+ BIT(m_fr, 12) ? 'F' : '.',
+ BIT(m_fr, 11) ? 'F' : '.',
+ BIT(m_fr, 10) ? 'B' : '.',
+ BIT(m_fr, 9) ? 'I' : '.',
+ BIT(m_fr, 8) ? 'L' : '.',
+ BIT(m_fr, 7) ? 'C' : '.',
+ BIT(m_fr, 6) ? 'O' : '.',
+ BIT(m_fr, 5) ? '5' : '.',
+ BIT(m_fr, 4) ? '4' : '.',
+ BIT(m_fr, 3) ? '3' : '.',
+ BIT(m_fr, 2) ? '2' : '.',
+ BIT(m_fr, 1) ? '1' : '.');
+ break;
+ }
+}
diff --git a/src/devices/cpu/pace/pace.h b/src/devices/cpu/pace/pace.h
index c97b92aff0f..5fdbcdb7e57 100644
--- a/src/devices/cpu/pace/pace.h
+++ b/src/devices/cpu/pace/pace.h
@@ -87,6 +87,9 @@ protected:
// device_memory_interface overrides
virtual space_config_vector memory_space_config() const override;
+ // device_state_interface overrides
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
+
private:
enum class cycle {
IFETCH_M1, LEA_M2, RDEA_M3,