diff options
Diffstat (limited to 'src/devices/cpu/nec/v25.cpp')
-rw-r--r-- | src/devices/cpu/nec/v25.cpp | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/src/devices/cpu/nec/v25.cpp b/src/devices/cpu/nec/v25.cpp index f851717aaf2..6d96206f0ed 100644 --- a/src/devices/cpu/nec/v25.cpp +++ b/src/devices/cpu/nec/v25.cpp @@ -38,8 +38,6 @@ #include "v25.h" #include "necdasm.h" -#include "debugger.h" - typedef uint8_t BOOLEAN; typedef uint8_t BYTE; typedef uint16_t WORD; @@ -59,10 +57,10 @@ v25_common_device::v25_common_device(const machine_config &mconfig, device_type , m_io_config("io", ENDIANNESS_LITTLE, is_16bit ? 16 : 8, 16, 0) , m_internal_ram(*this, "internal_ram") , m_PCK(8) - , m_pt_in(*this) - , m_p0_in(*this) - , m_p1_in(*this) - , m_p2_in(*this) + , m_pt_in(*this, 0xff) + , m_p0_in(*this, 0xff) + , m_p1_in(*this, 0xff) + , m_p2_in(*this, 0xff) , m_p0_out(*this) , m_p1_out(*this) , m_p2_out(*this) @@ -260,7 +258,7 @@ void v25_common_device::nec_interrupt(unsigned int_num, int /*INTSOURCES*/ sourc logerror("%06x: BRKS executed with no decryption table\n",PC()); break; case INT_IRQ: /* get vector */ - int_num = standard_irq_callback(0); + int_num = standard_irq_callback(0, PC()); break; default: break; @@ -453,7 +451,10 @@ void v25_common_device::external_int() m_IRQS = vector; m_ISPR |= (1 << i); if (m_bankswitch_irq & source) + { + debugger_exception_hook(vector); nec_bankswitch(i); + } else nec_interrupt(vector, source); } @@ -557,7 +558,7 @@ void v25_common_device::device_start() m_E16 = 0; for (i = 0; i < 4; i++) - m_timers[i] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(v25_common_device::v25_timer_callback),this)); + m_timers[i] = timer_alloc(FUNC(v25_common_device::v25_timer_callback), this); std::fill_n(&m_intp_state[0], 3, 0); std::fill_n(&m_ems[0], 3, 0); @@ -629,18 +630,9 @@ void v25_common_device::device_start() m_program->cache(m_cache16); m_dr8 = [this](offs_t address) -> u8 { return m_cache16.read_byte(address); }; } - m_data = &space(AS_DATA); + space(AS_DATA).specific(m_data); m_io = &space(AS_IO); - m_pt_in.resolve_safe(0xff); - m_p0_in.resolve_safe(0xff); - m_p1_in.resolve_safe(0xff); - m_p2_in.resolve_safe(0xff); - - m_p0_out.resolve_safe(); - m_p1_out.resolve_safe(); - m_p2_out.resolve_safe(); - state_add( V25_PC, "PC", m_ip).formatstr("%04X"); state_add<uint16_t>( V25_PSW, "PSW", [this]() { return CompressFlags(); }, [this](uint16_t data) { ExpandFlags(data); }); |