From 19d4f61756165f9a836f4773a49c3c1d044e08c3 Mon Sep 17 00:00:00 2001 From: smf- Date: Thu, 27 Oct 2016 12:30:01 +0100 Subject: [PATCH] added boilerplate comments & removed unnecessary formatstr() (nw) --- src/devices/cpu/amis2000/amis2000.cpp | 17 ++++++++--------- src/devices/cpu/amis2000/amis2000.h | 2 ++ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/devices/cpu/amis2000/amis2000.cpp b/src/devices/cpu/amis2000/amis2000.cpp index 6409a8b1917..e5e9b3898fb 100644 --- a/src/devices/cpu/amis2000/amis2000.cpp +++ b/src/devices/cpu/amis2000/amis2000.cpp @@ -68,8 +68,11 @@ amis2152_cpu_device::amis2152_cpu_device(const machine_config &mconfig, const ch { } +//------------------------------------------------- +// state_string_export - export state as a string +// for the debugger +//------------------------------------------------- -// disasm void amis2000_base_device::state_string_export(const device_state_entry &entry, std::string &str) const { switch (entry.index()) @@ -81,11 +84,8 @@ void amis2000_base_device::state_string_export(const device_state_entry &entry, m_f & 0x08 ? '4':'.', m_f & 0x04 ? '3':'.', m_f & 0x02 ? '2':'.', - m_f & 0x01 ? '1':'.' - ); + m_f & 0x01 ? '1':'.'); break; - - default: break; } } @@ -103,7 +103,7 @@ offs_t amis2000_base_device::disasm_disassemble(char *buffer, offs_t pc, const u enum { - S2000_PC=1, S2000_BL, S2000_BU, + S2000_PC = STATE_GENPC, S2000_BL = 0, S2000_BU, S2000_ACC, S2000_E, S2000_CY }; @@ -170,9 +170,8 @@ void amis2000_base_device::device_start() state_add(S2000_E, "E", m_e ).formatstr("%01X"); state_add(S2000_CY, "CY", m_carry ).formatstr("%01X"); - state_add(STATE_GENPC, "GENPC", m_pc).formatstr("%04X").noshow(); - state_add(STATE_GENPCBASE, "CURPC", m_pc).formatstr("%04X").noshow(); - state_add(STATE_GENFLAGS, "GENFLAGS", m_f).formatstr("%6s").noshow(); + state_add(STATE_GENPCBASE, "CURPC", m_pc).noshow(); + state_add(STATE_GENFLAGS, "CURFLAGS", m_f).formatstr("%6s").noshow(); m_icountptr = &m_icount; } diff --git a/src/devices/cpu/amis2000/amis2000.h b/src/devices/cpu/amis2000/amis2000.h index 0e46c7d0dd7..5d7967eeb38 100644 --- a/src/devices/cpu/amis2000/amis2000.h +++ b/src/devices/cpu/amis2000/amis2000.h @@ -89,6 +89,8 @@ protected: virtual uint32_t disasm_min_opcode_bytes() const override { return 1; } virtual uint32_t disasm_max_opcode_bytes() const override { return 1; } virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override; + + // device_state_interface overrides virtual void state_string_export(const device_state_entry &entry, std::string &str) const override; address_space_config m_program_config;