diff options
Diffstat (limited to 'src/devices/cpu/dsp32/dsp32.cpp')
-rw-r--r-- | src/devices/cpu/dsp32/dsp32.cpp | 40 |
1 files changed, 12 insertions, 28 deletions
diff --git a/src/devices/cpu/dsp32/dsp32.cpp b/src/devices/cpu/dsp32/dsp32.cpp index 26310c760ad..d75b62e5acd 100644 --- a/src/devices/cpu/dsp32/dsp32.cpp +++ b/src/devices/cpu/dsp32/dsp32.cpp @@ -31,7 +31,6 @@ #include "emu.h" #include "dsp32.h" #include "dsp32dis.h" -#include "debugger.h" //************************************************************************** @@ -174,8 +173,6 @@ dsp32c_device::dsp32c_device(const machine_config &mconfig, const char *tag, dev m_icount(0), m_lastpins(0), m_ppc(0), - m_program(nullptr), - m_cache(nullptr), m_output_pins_changed(*this) { // set our instruction counter @@ -188,16 +185,13 @@ dsp32c_device::dsp32c_device(const machine_config &mconfig, const char *tag, dev void dsp32c_device::device_start() { - m_output_pins_changed.resolve_safe(); - // get our address spaces - m_program = &space(AS_PROGRAM); - m_cache = m_program->cache<2, 0, ENDIANNESS_LITTLE>(); + space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_program); // register our state for the debugger state_add(STATE_GENPC, "GENPC", m_r[15]).noshow(); state_add(STATE_GENPCBASE, "CURPC", m_ppc).noshow(); - state_add(STATE_GENSP, "GENSP", m_r[21]).noshow(); state_add(STATE_GENFLAGS, "GENFLAGS", m_iotemp).callimport().callexport().formatstr("%6s").noshow(); state_add(DSP32_PC, "PC", m_r[15]).mask(0xffffff); for (int regnum = 0; regnum <= 14; regnum++) @@ -415,17 +409,17 @@ std::unique_ptr<util::disasm_interface> dsp32c_device::create_disassembler() inline uint32_t dsp32c_device::ROPCODE(offs_t pc) { - return m_cache->read_dword(pc); + return m_cache.read_dword(pc); } inline uint8_t dsp32c_device::RBYTE(offs_t addr) { - return m_program->read_byte(addr); + return m_program.read_byte(addr); } inline void dsp32c_device::WBYTE(offs_t addr, uint8_t data) { - m_program->write_byte(addr, data); + m_program.write_byte(addr, data); } inline uint16_t dsp32c_device::RWORD(offs_t addr) @@ -434,7 +428,7 @@ inline uint16_t dsp32c_device::RWORD(offs_t addr) if (!WORD_ALIGNED(addr)) osd_printf_error("Unaligned word read @ %06X, PC=%06X\n", addr, PC); #endif - return m_program->read_word(addr); + return m_program.read_word(addr); } inline uint32_t dsp32c_device::RLONG(offs_t addr) @@ -443,7 +437,7 @@ inline uint32_t dsp32c_device::RLONG(offs_t addr) if (!DWORD_ALIGNED(addr)) osd_printf_error("Unaligned long read @ %06X, PC=%06X\n", addr, PC); #endif - return m_program->read_dword(addr); + return m_program.read_dword(addr); } inline void dsp32c_device::WWORD(offs_t addr, uint16_t data) @@ -452,7 +446,7 @@ inline void dsp32c_device::WWORD(offs_t addr, uint16_t data) if (!WORD_ALIGNED(addr)) osd_printf_error("Unaligned word write @ %06X, PC=%06X\n", addr, PC); #endif - m_program->write_word(addr, data); + m_program.write_word(addr, data); } inline void dsp32c_device::WLONG(offs_t addr, uint32_t data) @@ -461,7 +455,7 @@ inline void dsp32c_device::WLONG(offs_t addr, uint32_t data) if (!DWORD_ALIGNED(addr)) osd_printf_error("Unaligned long write @ %06X, PC=%06X\n", addr, PC); #endif - m_program->write_dword(addr, data); + m_program.write_dword(addr, data); } @@ -542,7 +536,7 @@ void dsp32c_device::update_pins(void) // cycles it takes for one instruction to execute //------------------------------------------------- -uint32_t dsp32c_device::execute_min_cycles() const +uint32_t dsp32c_device::execute_min_cycles() const noexcept { return 4; } @@ -553,23 +547,12 @@ uint32_t dsp32c_device::execute_min_cycles() const // cycles it takes for one instruction to execute //------------------------------------------------- -uint32_t dsp32c_device::execute_max_cycles() const +uint32_t dsp32c_device::execute_max_cycles() const noexcept { return 4; } -//------------------------------------------------- -// execute_input_lines - return the number of -// input/interrupt lines -//------------------------------------------------- - -uint32_t dsp32c_device::execute_input_lines() const -{ - return 2; -} - - void dsp32c_device::execute_set_input(int inputnum, int state) { } @@ -580,6 +563,7 @@ void dsp32c_device::execute_run() // skip if halted if ((m_pcr & PCR_RESET) == 0) { + debugger_wait_hook(); m_icount = 0; return; } |