From f9acb0c97bc0515fa1700bca58f9fcc1501a68cc Mon Sep 17 00:00:00 2001 From: smf- Date: Wed, 5 Oct 2016 23:35:10 +0100 Subject: [PATCH] reinstate lines removed in error (nw) --- src/devices/cpu/sh4/sh4.cpp | 12 +++++++++++- src/devices/cpu/sh4/sh4.h | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/devices/cpu/sh4/sh4.cpp b/src/devices/cpu/sh4/sh4.cpp index 2708c02314c..e716512ae6d 100644 --- a/src/devices/cpu/sh4/sh4.cpp +++ b/src/devices/cpu/sh4/sh4.cpp @@ -4222,7 +4222,7 @@ void sh34_base_device::device_start() state_add(SH4_XF14, "XF14", m_debugger_temp).callimport().formatstr("%25s"); state_add(SH4_XF15, "XF15", m_debugger_temp).callimport().formatstr("%25s"); - state_add(STATE_GENPC, "GENPC", m_debugger_temp).callimport().noshow(); + state_add(STATE_GENPC, "GENPC", m_debugger_temp).callimport().callexport().noshow(); state_add(STATE_GENPCBASE, "CURPC", m_ppc).noshow(); state_add(STATE_GENSP, "GENSP", m_r[15]).noshow(); state_add(STATE_GENFLAGS, "GENFLAGS", m_sr).formatstr("%20s").noshow(); @@ -4381,6 +4381,16 @@ void sh34_base_device::state_import(const device_state_entry &entry) } } +void sh34_base_device::state_export(const device_state_entry &entry) +{ + switch (entry.index()) + { + case STATE_GENPC: + m_debugger_temp = (m_pc & AM); + break; + } +} + void sh34_base_device::state_string_export(const device_state_entry &entry, std::string &str) const { #ifdef LSB_FIRST diff --git a/src/devices/cpu/sh4/sh4.h b/src/devices/cpu/sh4/sh4.h index da4d1885080..badaacd4558 100644 --- a/src/devices/cpu/sh4/sh4.h +++ b/src/devices/cpu/sh4/sh4.h @@ -219,6 +219,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