mirror of
https://github.com/holub/mame
synced 2025-04-30 19:57:11 +03:00
Sync pc & curpc, remove superfluous callimport()/callexport() on STATE_GENFLAGS (nw)
This commit is contained in:
parent
1243f834cb
commit
14a7a262c9
@ -139,10 +139,9 @@ void m6809_base_device::device_start()
|
|||||||
m_lic_func.resolve_safe();
|
m_lic_func.resolve_safe();
|
||||||
|
|
||||||
// register our state for the debugger
|
// register our state for the debugger
|
||||||
state_add(STATE_GENPC, "GENPC", m_pc.w).noshow();
|
state_add(STATE_GENPCBASE, "CURPC", m_ppc.w).callimport().noshow();
|
||||||
state_add(STATE_GENPCBASE, "CURPC", m_ppc.w).noshow();
|
state_add(STATE_GENFLAGS, "CURFLAGS", m_cc).formatstr("%8s").noshow();
|
||||||
state_add(STATE_GENFLAGS, "GENFLAGS", m_cc).callimport().callexport().formatstr("%8s").noshow();
|
state_add(M6809_PC, "PC", m_pc.w).callimport().mask(0xffff);
|
||||||
state_add(M6809_PC, "PC", m_pc.w).mask(0xffff);
|
|
||||||
state_add(M6809_S, "S", m_s.w).mask(0xffff);
|
state_add(M6809_S, "S", m_s.w).mask(0xffff);
|
||||||
state_add(M6809_CC, "CC", m_cc).mask(0xff);
|
state_add(M6809_CC, "CC", m_cc).mask(0xff);
|
||||||
state_add(M6809_DP, "DP", m_dp).mask(0xff);
|
state_add(M6809_DP, "DP", m_dp).mask(0xff);
|
||||||
@ -304,6 +303,25 @@ const address_space_config *m6809_base_device::memory_space_config(address_space
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// state_import - import state into the device,
|
||||||
|
// after it has been set
|
||||||
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
void m6809_base_device::state_import(const device_state_entry &entry)
|
||||||
|
{
|
||||||
|
switch (entry.index())
|
||||||
|
{
|
||||||
|
case M6809_PC:
|
||||||
|
m_ppc.w = m_pc.w;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case STATE_GENPCBASE:
|
||||||
|
m_pc.w = m_ppc.w;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
// state_string_export - export state as a string
|
// state_string_export - export state as a string
|
||||||
// for the debugger
|
// for the debugger
|
||||||
|
@ -80,6 +80,7 @@ protected:
|
|||||||
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) override;
|
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) override;
|
||||||
|
|
||||||
// device_state_interface overrides
|
// device_state_interface overrides
|
||||||
|
virtual void state_import(const device_state_entry &entry) override;
|
||||||
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
|
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
|
||||||
|
|
||||||
virtual bool is_6809() { return true; };
|
virtual bool is_6809() { return true; };
|
||||||
@ -324,7 +325,7 @@ public:
|
|||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
M6809_PC=1, M6809_S, M6809_CC ,M6809_A, M6809_B, M6809_D, M6809_U, M6809_X, M6809_Y,
|
M6809_PC = STATE_GENPC, M6809_S = 0, M6809_CC ,M6809_A, M6809_B, M6809_D, M6809_U, M6809_X, M6809_Y,
|
||||||
M6809_DP
|
M6809_DP
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user