diff options
author | 2020-01-23 16:45:51 -0500 | |
---|---|---|
committer | 2020-01-23 16:45:51 -0500 | |
commit | 0f052a51f8418510a8fefabe42b3b6cf370a8c2d (patch) | |
tree | d16f5c8790b81c85541cae82bf9443195319c492 /src/devices/cpu/m88000/m88000.cpp | |
parent | 9235797b5c4ed06f7c823268319a54a4bb211154 (diff) |
New machines marked as NOT_WORKING
----------------------------------
NCD19c [Don Maslin Archive]
Add disassemblers for Motorola MC88100 and MC88110 [AJR]
Diffstat (limited to 'src/devices/cpu/m88000/m88000.cpp')
-rw-r--r-- | src/devices/cpu/m88000/m88000.cpp | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/src/devices/cpu/m88000/m88000.cpp b/src/devices/cpu/m88000/m88000.cpp new file mode 100644 index 00000000000..ddf42f3b9ac --- /dev/null +++ b/src/devices/cpu/m88000/m88000.cpp @@ -0,0 +1,75 @@ +// license:BSD-3-Clause +// copyright-holders:AJR +/*************************************************************************** + + Motorola M88000 RISC microprocessors + + Currently this device is just a stub with no actual execution core. + +***************************************************************************/ + +#include "emu.h" +#include "m88000.h" +#include "m88000d.h" + +// device type definitions +DEFINE_DEVICE_TYPE(MC88100, mc88100_device, "mc88100", "Motorola MC88100") + +mc88100_device::mc88100_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : cpu_device(mconfig, MC88100, tag, owner, clock) + , m_space_config("program", ENDIANNESS_BIG, 32, 32, 0) + , m_pc(0) + , m_r{0} + , m_cr{0} + , m_icount(0) +{ + m_cr[0] = 0x00000001; +} + +std::unique_ptr<util::disasm_interface> mc88100_device::create_disassembler() +{ + return std::make_unique<mc88100_disassembler>(); +} + +device_memory_interface::space_config_vector mc88100_device::memory_space_config() const +{ + return space_config_vector { + std::make_pair(AS_PROGRAM, &m_space_config), + }; +} + +void mc88100_device::device_start() +{ + m_space = &space(AS_PROGRAM); + m_cache = m_space->cache<2, 0, ENDIANNESS_BIG>(); + + set_icountptr(m_icount); + + state_add(M88000_PC, "PC", m_pc); + state_add(STATE_GENPC, "GENPC", m_pc).noshow(); + state_add(STATE_GENPCBASE, "CURPC", m_pc).noshow(); + state_add(STATE_GENFLAGS, "CURFLAGS", m_cr[1]).mask(0xf00003ff).noshow(); + for (int i = 1; i < 32; i++) + state_add(M88000_R1 + i - 1, string_format("r%d", i).c_str(), m_r[i]); + state_add(M88000_PSR, "PSR", m_cr[1]).mask(0xf00003ff); + state_add(M88000_VBR, "VBR", m_cr[7]).mask(0xfffff000); +} + +void mc88100_device::device_reset() +{ + m_pc = 0; + m_cr[1] = 0x800003fb; + m_cr[7] = 0; +} + +void mc88100_device::execute_run() +{ + debugger_instruction_hook(m_pc); + + m_icount = 0; +} + +void mc88100_device::execute_set_input(int inputnum, int state) +{ + // TODO +} |