diff --git a/src/devices/cpu/m6805/m68hc05.cpp b/src/devices/cpu/m6805/m68hc05.cpp index 545451c90da..a0f459a20f8 100644 --- a/src/devices/cpu/m6805/m68hc05.cpp +++ b/src/devices/cpu/m6805/m68hc05.cpp @@ -94,6 +94,7 @@ DEFINE_DEVICE_TYPE(M68HC05C4, m68hc05c4_device, "m68hc05c4", "Motorola MC6 DEFINE_DEVICE_TYPE(M68HC05C8, m68hc05c8_device, "m68hc05c8", "Motorola MC68HC05C8") DEFINE_DEVICE_TYPE(M68HC705C8A, m68hc705c8a_device, "m68hc705c8a", "Motorola MC68HC705C8A") DEFINE_DEVICE_TYPE(M68HC05L9, m68hc05l9_device, "m68hc05l9", "Motorola MC68HC05L9") +DEFINE_DEVICE_TYPE(M68HC05L11, m68hc05l11_device, "m68hc05l11", "Motorola MC68HC05L11") @@ -955,7 +956,7 @@ void m68hc05l9_device::l9_map(address_map &map) // 0x000c hour alarm // 0x000d BAUD // 0x000e SCCR1 - // 0x000f SCCR2l9_device + // 0x000f SCCR2 // 0x0010 SCSR // 0x0011 SCDR map(0x0012, 0x0012).rw(FUNC(m68hc05l9_device::tcr_r), FUNC(m68hc05l9_device::tcr_w)); @@ -1008,3 +1009,85 @@ std::unique_ptr m68hc05l9_device::create_disassembler() { return std::make_unique(m68hc05c4_syms); } + + + +/**************************************************************************** + * MC68HC05L11 device + ****************************************************************************/ + +void m68hc05l11_device::l11_map(address_map &map) +{ + map(0x0000, 0x0003).rw(FUNC(m68hc05l11_device::port_read), FUNC(m68hc05l11_device::port_latch_w)); + // 0x0004 port E + // 0x0005 port F + map(0x0006, 0x0008).rw(FUNC(m68hc05l11_device::port_ddr_r), FUNC(m68hc05l11_device::port_ddr_w)); + // 0x0009 port E direction + // 0x000a port F direction + // 0x000b minute alarm + // 0x000c hour alarm + // 0x000d BAUD + // 0x000e SCCR1 + // 0x000f SCCR2 + // 0x0010 SCSR + // 0x0011 SCDR + map(0x0012, 0x0012).rw(FUNC(m68hc05l11_device::tcr_r), FUNC(m68hc05l11_device::tcr_w)); + map(0x0013, 0x0013).r(FUNC(m68hc05l11_device::tsr_r)); + map(0x0014, 0x0015).r(FUNC(m68hc05l11_device::icr_r)); + map(0x0016, 0x0017).rw(FUNC(m68hc05l11_device::ocr_r), FUNC(m68hc05l11_device::ocr_w)); + map(0x0018, 0x001b).r(FUNC(m68hc05l11_device::timer_r)); + // 0x001c-0x001d output compare 2 + // 0x001e reserved + // 0x001f RTC interrupt status + // 0x0020 count down + // 0x0021 control 1 + // 0x0022 SPCR + // 0x0023 SPSR + // 0x0024 SPDR + // 0x0025 control 2 + // 0x0026 TONEA + // 0x0027 TONEB + // 0x0028-0x0033 LCD registers + // 0x0033 reserved + // 0x0034-0x003b MMU registers + // 0x003c hours + // 0x003d minutes + // 0x003e seconds + // 0x003f reserved + map(0x0040, 0x01ff).ram(); // RAM/stack + // 0x0200-0x6fff external memory (common area) + map(0x7000, 0x7dff).rom().region(DEVICE_SELF, 0); // user ROM + map(0x7e00, 0x7fef).rom().region(DEVICE_SELF, 0xe00); // self-check (incl. vectors) + map(0x7ff0, 0x7fff).rom().region(DEVICE_SELF, 0xff0); // user vectors + // 0x8000-0x7fffff external memory (banked in four 8K segments) +} + + +m68hc05l11_device::m68hc05l11_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + : m68hc05_device( + mconfig, + tag, + owner, + clock, + M68HC05L11, + 16, // FIXME: 16 logical mapped to 23 physical + address_map_constructor(FUNC(m68hc05l11_device::l11_map), this)) +{ + set_port_bits(std::array{{ 0xff, 0xff, 0xff, 0xff }}); +} + + + +void m68hc05l11_device::device_start() +{ + m68hc05_device::device_start(); + + add_port_state(std::array{{ true, true, true, false }}); + add_timer_state(); +} + + +std::unique_ptr m68hc05l11_device::create_disassembler() +{ + return std::make_unique(m68hc05c4_syms); +} diff --git a/src/devices/cpu/m6805/m68hc05.h b/src/devices/cpu/m6805/m68hc05.h index 4cc90c97a78..4b01e964c31 100644 --- a/src/devices/cpu/m6805/m68hc05.h +++ b/src/devices/cpu/m6805/m68hc05.h @@ -18,6 +18,7 @@ DECLARE_DEVICE_TYPE(M68HC05C4, m68hc05c4_device) DECLARE_DEVICE_TYPE(M68HC05C8, m68hc05c8_device) DECLARE_DEVICE_TYPE(M68HC705C8A, m68hc705c8a_device) DECLARE_DEVICE_TYPE(M68HC05L9, m68hc05l9_device) +DECLARE_DEVICE_TYPE(M68HC05L11, m68hc05l11_device) //************************************************************************** @@ -251,6 +252,22 @@ protected: }; +// ======================> m68hc05l11_device + +class m68hc05l11_device : public m68hc05_device +{ +public: + m68hc05l11_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + +protected: + void l11_map(address_map &map); + + virtual void device_start() override; + + virtual std::unique_ptr create_disassembler() override; +}; + + /**************************************************************************** * 68HC05 section ****************************************************************************/ diff --git a/src/mame/drivers/comquest.cpp b/src/mame/drivers/comquest.cpp index acec184d755..78ee3a4f452 100644 --- a/src/mame/drivers/comquest.cpp +++ b/src/mame/drivers/comquest.cpp @@ -44,7 +44,7 @@ icq3250a-d #include "emu.h" #include "includes/comquest.h" -#include "cpu/m6805/m6805.h" +#include "cpu/m6805/m68hc05.h" #include "emupal.h" #include "screen.h" @@ -65,8 +65,7 @@ WRITE8_MEMBER(comquest_state::comquest_write) void comquest_state::comquest_mem(address_map &map) { -// { 0x0000, 0x7fff, SMH_BANK(1) }, - map(0x0000, 0xfff).rom(); + map(0x8000, 0xffff).rom().region("gfx1", 0x4000); } static INPUT_PORTS_START( comquest ) @@ -217,9 +216,7 @@ void comquest_state::machine_reset() void comquest_state::comquest(machine_config &config) { /* basic machine hardware */ - M6805(config, m_maincpu, 4000000); /* 4000000? */ - /* HD63705(config, m_maincpu, 4000000); instruction set looks like m6805/m6808 */ - /* M68705(config, m_maincpu, 4000000); instruction set looks like m6805/m6808 */ + M68HC05L11(config, m_maincpu, 4000000); /* 4000000? */ /* 8 bit bus, integrated io, serial io?, @@ -266,10 +263,8 @@ void comquest_state::comquest(machine_config &config) } ROM_START(comquest) -// ROM_REGION(0x10000,"maincpu",0) -// ROM_REGION(0x80000,"user1",0) - ROM_REGION(0x100000,"maincpu",0) - ROM_LOAD("comquest.bin", 0x00000, 0x80000, CRC(2bf4b1a8) SHA1(8d1821cbde37cca2055b18df001438f7d138a8c1)) + ROM_REGION(0x1000,"maincpu",0) + ROM_LOAD("hc05_internal.bin", 0x0000, 0x1000, NO_DUMP) /* 000 +16kbyte graphics data? (first bytes: 80 0d 04 00 00 08 04 00 0f 02 04 01 00 10 04 01) 040 16kbyte code (first bytes: 00 00 00 00 9a cd 7c 9b cd 7c 98 4f c7 f1 1d 4f)