diff options
Diffstat (limited to 'src/devices/cpu/v60/v60.cpp')
-rw-r--r-- | src/devices/cpu/v60/v60.cpp | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/src/devices/cpu/v60/v60.cpp b/src/devices/cpu/v60/v60.cpp index 989e509ef2e..32cf642e34b 100644 --- a/src/devices/cpu/v60/v60.cpp +++ b/src/devices/cpu/v60/v60.cpp @@ -76,7 +76,6 @@ Package: 132-pin PGA, 200-pin QFP #include "emu.h" #include "v60.h" #include "v60d.h" -#include "debugger.h" DEFINE_DEVICE_TYPE(V60, v60_device, "v60", "NEC V60") DEFINE_DEVICE_TYPE(V70, v70_device, "v70", "NEC V70") @@ -359,7 +358,6 @@ uint32_t v60_device::v60_update_psw_for_exception(int is_interrupt, int target_l uint32_t v60_device::opUNHANDLED() { fatalerror("Unhandled OpCode found : %02x at %08x\n", OpRead16(PC), PC); - //return 0; /* never reached, fatalerror won't return */ } // Opcode jump table @@ -412,17 +410,17 @@ void v60_device::device_start() m_program = &space(AS_PROGRAM); if (m_program->data_width() == 16) { - auto cache = m_program->cache<1, 0, ENDIANNESS_LITTLE>(); - m_pr8 = [cache](offs_t address) -> u8 { return cache->read_byte(address); }; - m_pr16 = [cache](offs_t address) -> u16 { return cache->read_word_unaligned(address); }; - m_pr32 = [cache](offs_t address) -> u32 { return cache->read_dword_unaligned(address); }; + m_program->cache(m_cache16); + m_pr8 = [this](offs_t address) -> u8 { return m_cache16.read_byte(address); }; + m_pr16 = [this](offs_t address) -> u16 { return m_cache16.read_word_unaligned(address); }; + m_pr32 = [this](offs_t address) -> u32 { return m_cache16.read_dword_unaligned(address); }; } else { - auto cache = m_program->cache<2, 0, ENDIANNESS_LITTLE>(); - m_pr8 = [cache](offs_t address) -> u8 { return cache->read_byte(address); }; - m_pr16 = [cache](offs_t address) -> u16 { return cache->read_word_unaligned(address); }; - m_pr32 = [cache](offs_t address) -> u32 { return cache->read_dword_unaligned(address); }; + m_program->cache(m_cache32); + m_pr8 = [this](offs_t address) -> u8 { return m_cache32.read_byte(address); }; + m_pr16 = [this](offs_t address) -> u16 { return m_cache32.read_word_unaligned(address); }; + m_pr32 = [this](offs_t address) -> u32 { return m_cache32.read_dword_unaligned(address); }; } m_io = &space(AS_IO); @@ -497,7 +495,6 @@ void v60_device::device_start() state_add( STATE_GENPC, "GENPC", PC).noshow(); state_add( STATE_GENPCBASE, "CURPC", m_PPC ).noshow(); - state_add( STATE_GENSP, "GENSP", SP ).noshow(); state_add( STATE_GENFLAGS, "GENFLAGS", m_debugger_temp).callimport().formatstr("%7s").noshow(); set_icountptr(m_icount); @@ -562,6 +559,7 @@ void v60_device::stall() void v60_device::v60_do_irq(int vector) { + debugger_exception_hook(vector); uint32_t oldPSW = v60_update_psw_for_exception(1, 0); // Push PC and PSW onto the stack @@ -583,7 +581,7 @@ void v60_device::v60_try_irq() if(m_irq_line != ASSERT_LINE) m_irq_line = CLEAR_LINE; - vector = standard_irq_callback(0); + vector = standard_irq_callback(0, PC); v60_do_irq(vector + 0x40); } |