summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author arbee <rb6502@users.noreply.github.com>2019-12-26 16:09:25 -0500
committer arbee <rb6502@users.noreply.github.com>2019-12-26 16:09:25 -0500
commit4e5ad62b914fd8d843c4c95730e7702748959095 (patch)
treec0e511f5bc5e7d3a30eac3c0fdde4b68cdf316f1
parentee9bc765ab5de861e3f695480c50b07a9bcb469f (diff)
v60 updates: [R. Belmont, Tahg]
- Fixed XOR instructions to not change the carry flag - Added friendlier flags display in the debugger
-rw-r--r--src/devices/cpu/v60/v60.cpp20
-rw-r--r--src/devices/cpu/v60/v60.h1
2 files changed, 17 insertions, 4 deletions
diff --git a/src/devices/cpu/v60/v60.cpp b/src/devices/cpu/v60/v60.cpp
index 9fb8374ae1b..21f83803e72 100644
--- a/src/devices/cpu/v60/v60.cpp
+++ b/src/devices/cpu/v60/v60.cpp
@@ -160,9 +160,9 @@ std::unique_ptr<util::disasm_interface> v60_device::create_disassembler()
#define ANDW(dst, src) { (dst) &= (src); _CY = _OV = 0; SetSZPF_Word(dst); }
#define ANDL(dst, src) { (dst) &= (src); _CY = _OV = 0; SetSZPF_Long(dst); }
-#define XORB(dst, src) { (dst) ^= (src); _CY = _OV = 0; SetSZPF_Byte(dst); }
-#define XORW(dst, src) { (dst) ^= (src); _CY = _OV = 0; SetSZPF_Word(dst); }
-#define XORL(dst, src) { (dst) ^= (src); _CY = _OV = 0; SetSZPF_Long(dst); }
+#define XORB(dst, src) { (dst) ^= (src); _OV = 0; SetSZPF_Byte(dst); }
+#define XORW(dst, src) { (dst) ^= (src); _OV = 0; SetSZPF_Word(dst); }
+#define XORL(dst, src) { (dst) ^= (src); _OV = 0; SetSZPF_Long(dst); }
#define SUBB(dst, src) { unsigned res = (dst) - (src); SetCFB(res); SetOFB_Sub(res, src, dst); SetSZPF_Byte(res); dst = (uint8_t)res; }
#define SUBW(dst, src) { unsigned res = (dst) - (src); SetCFW(res); SetOFW_Sub(res, src, dst); SetSZPF_Word(res); dst = (uint16_t)res; }
@@ -498,7 +498,7 @@ void v60_device::device_start()
state_add( STATE_GENPC, "GENPC", PC).noshow();
state_add( STATE_GENPCBASE, "CURPC", m_PPC ).noshow();
state_add( STATE_GENSP, "GENSP", SP ).noshow();
- state_add( STATE_GENFLAGS, "GENFLAGS", m_debugger_temp).noshow();
+ state_add( STATE_GENFLAGS, "GENFLAGS", m_debugger_temp).callimport().formatstr("%7s").noshow();
set_icountptr(m_icount);
}
@@ -514,6 +514,18 @@ void v60_device::state_export(const device_state_entry &entry)
}
}
+void v60_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",
+ PSW & 1 ? 'Z' : '.',
+ PSW & 2 ? 'S' : '.',
+ PSW & 4 ? 'O' : '.',
+ PSW & 8 ? 'C' : '.');
+ break;
+ }
+}
void v60_device::state_import(const device_state_entry &entry)
{
diff --git a/src/devices/cpu/v60/v60.h b/src/devices/cpu/v60/v60.h
index 805028fb0c7..35c5843c487 100644
--- a/src/devices/cpu/v60/v60.h
+++ b/src/devices/cpu/v60/v60.h
@@ -109,6 +109,7 @@ protected:
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
virtual void state_export(const device_state_entry &entry) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
virtual std::unique_ptr<util::disasm_interface> create_disassembler() override;