diff options
author | 2016-03-12 12:31:13 +0100 | |
---|---|---|
committer | 2016-03-12 12:31:13 +0100 | |
commit | a026a582f1a0ea8c1ede3acaddacef506ef3f3b0 (patch) | |
tree | e31573822f2359677de519f9f3b600d98e8764cd /src/devices/cpu/m68000/m68kcpu.cpp | |
parent | 477d2abd43984f076b7e45f5527591fa8fd0d241 (diff) | |
parent | dcab55bf53b94713a6f72e9633f5101c8dd6c08c (diff) |
Merge pull request #15 from mamedev/master
Sync to base master
Diffstat (limited to 'src/devices/cpu/m68000/m68kcpu.cpp')
-rw-r--r-- | src/devices/cpu/m68000/m68kcpu.cpp | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/src/devices/cpu/m68000/m68kcpu.cpp b/src/devices/cpu/m68000/m68kcpu.cpp index 02809436472..8e8e7a3eadb 100644 --- a/src/devices/cpu/m68000/m68kcpu.cpp +++ b/src/devices/cpu/m68000/m68kcpu.cpp @@ -659,19 +659,19 @@ static void set_irq_line(m68000_base_device *m68k, int irqline, int state) m68k->nmi_pending = TRUE; } -static void m68k_presave(m68000_base_device *m68k) +void m68000_base_device::presave() { - m68k->save_sr = m68ki_get_sr(m68k); - m68k->save_stopped = (m68k->stopped & STOP_LEVEL_STOP) != 0; - m68k->save_halted = (m68k->stopped & STOP_LEVEL_HALT) != 0; + save_sr = m68ki_get_sr(this); + save_stopped = (stopped & STOP_LEVEL_STOP) != 0; + save_halted = (stopped & STOP_LEVEL_HALT) != 0; } -static void m68k_postload(m68000_base_device *m68k) +void m68000_base_device::postload() { - m68ki_set_sr_noint_nosp(m68k, m68k->save_sr); + m68ki_set_sr_noint_nosp(this, save_sr); //fprintf(stderr, "Reloaded, pc=%x\n", REG_PC(m68k)); - m68k->stopped = (m68k->save_stopped ? STOP_LEVEL_STOP : 0) | (m68k->save_halted ? STOP_LEVEL_HALT : 0); - m68ki_jump(m68k, REG_PC(m68k)); + stopped = (save_stopped ? STOP_LEVEL_STOP : 0) | (save_halted ? STOP_LEVEL_HALT : 0); + m68ki_jump(this, REG_PC(this)); } static void m68k_cause_bus_error(m68000_base_device *m68k) @@ -742,7 +742,6 @@ WRITE_LINE_MEMBER( m68000_base_device::write_irq7 ) bool m68000_base_device::memory_translate(address_spacenum space, int intention, offs_t &address) { /* only applies to the program address space and only does something if the MMU's enabled */ - if (this) { /* 68040 needs to call the MMU even when disabled so transparent translation works */ if ((space == AS_PROGRAM) && ((pmmu_enabled) || (CPU_TYPE_IS_040_PLUS(cpu_type)))) @@ -1025,8 +1024,8 @@ void m68000_base_device::init_cpu_common(void) save_item(NAME(mmu_atc_data[i]), i); } - machine().save().register_presave(save_prepost_delegate(FUNC(m68k_presave), this)); - machine().save().register_postload(save_prepost_delegate(FUNC(m68k_postload), this)); + machine().save().register_presave(save_prepost_delegate(FUNC(m68000_base_device::presave), this)); + machine().save().register_postload(save_prepost_delegate(FUNC(m68000_base_device::postload), this)); m_icountptr = &remaining_cycles; remaining_cycles = 0; @@ -2646,7 +2645,6 @@ void m68020pmmu_device::device_start() bool m68020hmmu_device::memory_translate(address_spacenum space, int intention, offs_t &address) { /* only applies to the program address space and only does something if the MMU's enabled */ - if (this) { if ((space == AS_PROGRAM) && (hmmu_enabled)) { |