summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2020-01-23 23:21:03 -0500
committer AJR <ajrhacker@users.noreply.github.com>2020-01-23 23:21:03 -0500
commitb5d622dceee8478d1533e1c5bb6e66fd9fc0cd7d (patch)
treef552647c7bce79f6ad860a09d9fd23f34f667b06
parent92bd148e05aa7a20888ebeb5c3a95326a5c621b7 (diff)
m88000: Use split memory spaces for MC88100; fix masking logic in disassembler (nw)
-rw-r--r--src/devices/cpu/m88000/m88000.cpp13
-rw-r--r--src/devices/cpu/m88000/m88000.h7
-rw-r--r--src/devices/cpu/m88000/m88000d.cpp5
-rw-r--r--src/mame/drivers/ncd88k.cpp12
4 files changed, 26 insertions, 11 deletions
diff --git a/src/devices/cpu/m88000/m88000.cpp b/src/devices/cpu/m88000/m88000.cpp
index ddf42f3b9ac..cb25ff35a38 100644
--- a/src/devices/cpu/m88000/m88000.cpp
+++ b/src/devices/cpu/m88000/m88000.cpp
@@ -17,7 +17,10 @@ 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_code_config("code", ENDIANNESS_BIG, 32, 32, 0)
+ , m_data_config("data", ENDIANNESS_BIG, 32, 32, 0)
+ , m_inst_cache(nullptr)
+ , m_data_space(nullptr)
, m_pc(0)
, m_r{0}
, m_cr{0}
@@ -33,15 +36,17 @@ std::unique_ptr<util::disasm_interface> mc88100_device::create_disassembler()
device_memory_interface::space_config_vector mc88100_device::memory_space_config() const
{
+ // MC88100 has physically separate code and data buses
return space_config_vector {
- std::make_pair(AS_PROGRAM, &m_space_config),
+ std::make_pair(AS_PROGRAM, &m_code_config),
+ std::make_pair(AS_DATA, &m_data_config)
};
}
void mc88100_device::device_start()
{
- m_space = &space(AS_PROGRAM);
- m_cache = m_space->cache<2, 0, ENDIANNESS_BIG>();
+ m_inst_cache = space(AS_PROGRAM).cache<2, 0, ENDIANNESS_BIG>();
+ m_data_space = &space(AS_DATA);
set_icountptr(m_icount);
diff --git a/src/devices/cpu/m88000/m88000.h b/src/devices/cpu/m88000/m88000.h
index 9e93c373884..1e277099718 100644
--- a/src/devices/cpu/m88000/m88000.h
+++ b/src/devices/cpu/m88000/m88000.h
@@ -47,9 +47,10 @@ protected:
private:
// address spaces
- address_space_config m_space_config;
- address_space *m_space;
- memory_access_cache<2, 0, ENDIANNESS_BIG> *m_cache;
+ address_space_config m_code_config;
+ address_space_config m_data_config;
+ memory_access_cache<2, 0, ENDIANNESS_BIG> *m_inst_cache;
+ address_space *m_data_space;
// register storage
u32 m_pc;
diff --git a/src/devices/cpu/m88000/m88000d.cpp b/src/devices/cpu/m88000/m88000d.cpp
index 2f718dba068..26ba54afc2a 100644
--- a/src/devices/cpu/m88000/m88000d.cpp
+++ b/src/devices/cpu/m88000/m88000d.cpp
@@ -23,6 +23,9 @@
byte ordering by setting bit 30 of PSR, this has no effect on
instruction decoding.
+ The MC88100 executes integer multiplication instructions by using the
+ floating-point multiply pipeline. This is not the case on the MC88110.
+
The extended register file added to the MC88110 is used mainly for
floating-point operations. Numbers of any precision can be stored in
any of these 80-bit registers except x0, which is fixed to contain
@@ -1011,7 +1014,7 @@ offs_t m88000_disassembler::dasm_fp(std::ostream &stream, const char *mnemonic,
if ((inst & 0xfc006000) == 0x84004000)
{
util::stream_format(stream, "%-12s%c%d,", mnemonic,
- /*(inst & 0xfc007c00) == 0x84004200 ? 'x' : */'r',
+ (inst & 0xfc007e00) == 0x84004200 ? 'x' : 'r',
(inst & 0x03e00000) >> 21);
}
else
diff --git a/src/mame/drivers/ncd88k.cpp b/src/mame/drivers/ncd88k.cpp
index 0330f0d644b..7cca778ad60 100644
--- a/src/mame/drivers/ncd88k.cpp
+++ b/src/mame/drivers/ncd88k.cpp
@@ -25,7 +25,8 @@ public:
private:
u32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
- void ncd19c_map(address_map &map);
+ void code_map(address_map &map);
+ void data_map(address_map &map);
required_device<cpu_device> m_maincpu;
required_device<screen_device> m_screen;
@@ -36,18 +37,23 @@ u32 ncd88k_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, con
return 0;
}
-void ncd88k_state::ncd19c_map(address_map &map)
+void ncd88k_state::code_map(address_map &map)
{
map(0x00000000, 0x000015fff).rom().region("program", 0);
}
+void ncd88k_state::data_map(address_map &map)
+{
+}
+
static INPUT_PORTS_START(ncd19c)
INPUT_PORTS_END
void ncd88k_state::ncd19c(machine_config &config)
{
MC88100(config, m_maincpu, 15'000'000);
- m_maincpu->set_addrmap(AS_PROGRAM, &ncd88k_state::ncd19c_map);
+ m_maincpu->set_addrmap(AS_PROGRAM, &ncd88k_state::code_map);
+ m_maincpu->set_addrmap(AS_DATA, &ncd88k_state::data_map);
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
m_screen->set_raw(125'000'000, 1680, 0, 1280, 1063, 0, 1024); // 74.4 kHz horizontal, 70 Hz vertical