summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/distate.h
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2012-09-11 15:58:04 +0000
committer Aaron Giles <aaron@aarongiles.com>2012-09-11 15:58:04 +0000
commit0aa418e85b7f7aad5088bc96c9da0c371b15b2f2 (patch)
treee13bbdf8a2ff82faf97aaa23351668d817628966 /src/emu/distate.h
parent6d8c3c9f2d5d30848751a12c2925fbe53ac8bfec (diff)
In device_state_interface, rename state() to state_int()
and set_state() to set_state_int() for consistency. Update all callers. Also add set_pc() helper and updated all callers to use that instead of set_state_int(STATE_GENPC) [Aaron Giles] Added device_t::state() method to get the state interface. Added redundant device_state_interface::state() method to catch redundant use of it. [Aaron Giles] Removed cpu_get_reg() and cpu_set_reg() macros in favor of using the above methods. [Aaron Giles]
Diffstat (limited to 'src/emu/distate.h')
-rw-r--r--src/emu/distate.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/emu/distate.h b/src/emu/distate.h
index 29470cd707a..286ca2f8823 100644
--- a/src/emu/distate.h
+++ b/src/emu/distate.h
@@ -151,20 +151,22 @@ public:
const device_state_entry *state_first() const { return m_state_list.first(); }
// state getters
- UINT64 state(int index);
- offs_t pc() { return state(STATE_GENPC); }
- offs_t pcbase() { return state(STATE_GENPCBASE); }
- offs_t sp() { return state(STATE_GENSP); }
- UINT64 flags() { return state(STATE_GENFLAGS); }
+ UINT64 state_int(int index);
astring &state_string(int index, astring &dest);
int state_string_max_length(int index);
+ offs_t pc() { return state_int(STATE_GENPC); }
+ offs_t pcbase() { return state_int(STATE_GENPCBASE); }
+ offs_t sp() { return state_int(STATE_GENSP); }
+ UINT64 flags() { return state_int(STATE_GENFLAGS); }
// state setters
- void set_state(int index, UINT64 value);
+ void set_state_int(int index, UINT64 value);
void set_state_string(int index, const char *string);
+ void set_pc(offs_t pc) { set_state_int(STATE_GENPC, pc); }
// deliberately ambiguous functions; if you have the state interface
- // just use pc() and pcbase() directly
+ // just use it or pc() and pcbase() directly
+ device_state_interface &state() { return *this; }
offs_t safe_pc() { return pc(); }
offs_t safe_pcbase() { return pcbase(); }