summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/m68000/m68000.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/cpu/m68000/m68000.cpp')
-rw-r--r--src/devices/cpu/m68000/m68000.cpp22
1 files changed, 17 insertions, 5 deletions
diff --git a/src/devices/cpu/m68000/m68000.cpp b/src/devices/cpu/m68000/m68000.cpp
index 7ebc5731bac..4864c9980ea 100644
--- a/src/devices/cpu/m68000/m68000.cpp
+++ b/src/devices/cpu/m68000/m68000.cpp
@@ -33,6 +33,14 @@ m68000_device::m68000_device(const machine_config &mconfig, device_type type, co
{
}
+void m68000_device::set_current_mmu(mmu *mmu)
+{
+ m_mmu = mmu;
+
+ if(m_mmu)
+ m_mmu->set_super(m_sr & SR_S);
+}
+
void m68000_device::abort_access(u32 reason)
{
m_post_run = reason;
@@ -116,7 +124,7 @@ void m68000_device::execute_run()
m_ipc = m_pc - 2;
m_irdi = m_ird;
- if(machine().debug_flags & DEBUG_FLAG_ENABLED)
+ if(debugger_enabled())
debugger_instruction_hook(m_ipc);
}
(this->*(m_handlers_f[m_inst_state]))();
@@ -285,9 +293,9 @@ void m68000_device::device_start()
m_post_run = 0;
m_post_run_cycles = 0;
- state_add(STATE_GENPCBASE, "PC", m_ipc).callimport();
- state_add(STATE_GENPC, "rPC", m_pc);
- state_add(M68K_IR, "IR", m_ir);
+ state_add(STATE_GENPCBASE, "CURPC", m_ipc).callimport();
+ state_add(STATE_GENPC, "PC", m_pc).callimport();
+ state_add(M68K_IR, "IR", m_ir);
state_add(STATE_GENFLAGS, "GENFLAGS", m_sr).noshow().callexport().formatstr("%16s");
state_add(M68K_SR, "SR", m_sr).callimport();
for(int r = 0; r != 8; r++)
@@ -303,11 +311,15 @@ void m68000_device::device_start()
void m68000_device::state_import(const device_state_entry &entry)
{
switch(entry.index()) {
+ case STATE_GENPC:
+ m_ipc = m_pc;
+ [[fallthrough]];
+
case STATE_GENPCBASE: {
m_pc = m_ipc+2;
m_au = m_ipc+4;
auto dis = machine().disable_side_effects();
- m_ir = m_ird = m_opcodes.read_word(m_ipc);
+ m_ir = m_ird = m_irdi = m_opcodes.read_word(m_ipc);
m_irc = m_dbin = m_opcodes.read_word(m_pc);
set_ftu_const();
m_inst_state = m_decode_table[m_ird];