m88000: Use split memory spaces for MC88100; fix masking logic in disassembler (nw)

This commit is contained in:
AJR 2020-01-23 23:21:03 -05:00
parent 92bd148e05
commit b5d622dcee
4 changed files with 26 additions and 11 deletions

View File

@ -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) mc88100_device::mc88100_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: cpu_device(mconfig, MC88100, tag, owner, 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_pc(0)
, m_r{0} , m_r{0}
, m_cr{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 device_memory_interface::space_config_vector mc88100_device::memory_space_config() const
{ {
// MC88100 has physically separate code and data buses
return space_config_vector { 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() void mc88100_device::device_start()
{ {
m_space = &space(AS_PROGRAM); m_inst_cache = space(AS_PROGRAM).cache<2, 0, ENDIANNESS_BIG>();
m_cache = m_space->cache<2, 0, ENDIANNESS_BIG>(); m_data_space = &space(AS_DATA);
set_icountptr(m_icount); set_icountptr(m_icount);

View File

@ -47,9 +47,10 @@ protected:
private: private:
// address spaces // address spaces
address_space_config m_space_config; address_space_config m_code_config;
address_space *m_space; address_space_config m_data_config;
memory_access_cache<2, 0, ENDIANNESS_BIG> *m_cache; memory_access_cache<2, 0, ENDIANNESS_BIG> *m_inst_cache;
address_space *m_data_space;
// register storage // register storage
u32 m_pc; u32 m_pc;

View File

@ -23,6 +23,9 @@
byte ordering by setting bit 30 of PSR, this has no effect on byte ordering by setting bit 30 of PSR, this has no effect on
instruction decoding. 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 The extended register file added to the MC88110 is used mainly for
floating-point operations. Numbers of any precision can be stored in floating-point operations. Numbers of any precision can be stored in
any of these 80-bit registers except x0, which is fixed to contain 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) if ((inst & 0xfc006000) == 0x84004000)
{ {
util::stream_format(stream, "%-12s%c%d,", mnemonic, util::stream_format(stream, "%-12s%c%d,", mnemonic,
/*(inst & 0xfc007c00) == 0x84004200 ? 'x' : */'r', (inst & 0xfc007e00) == 0x84004200 ? 'x' : 'r',
(inst & 0x03e00000) >> 21); (inst & 0x03e00000) >> 21);
} }
else else

View File

@ -25,7 +25,8 @@ public:
private: private:
u32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); 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<cpu_device> m_maincpu;
required_device<screen_device> m_screen; required_device<screen_device> m_screen;
@ -36,18 +37,23 @@ u32 ncd88k_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, con
return 0; 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); map(0x00000000, 0x000015fff).rom().region("program", 0);
} }
void ncd88k_state::data_map(address_map &map)
{
}
static INPUT_PORTS_START(ncd19c) static INPUT_PORTS_START(ncd19c)
INPUT_PORTS_END INPUT_PORTS_END
void ncd88k_state::ncd19c(machine_config &config) void ncd88k_state::ncd19c(machine_config &config)
{ {
MC88100(config, m_maincpu, 15'000'000); 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); 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 m_screen->set_raw(125'000'000, 1680, 0, 1280, 1063, 0, 1024); // 74.4 kHz horizontal, 70 Hz vertical