From 23f7b9cacd98e89486a8e6ca88cd29a92427e772 Mon Sep 17 00:00:00 2001 From: AJR Date: Fri, 1 Dec 2023 22:36:43 -0500 Subject: shtstar: Hook up DUART IRQs; get the self-test one step closer to passing --- src/mame/misc/artmagic.cpp | 17 +++++++++++++++-- src/mame/misc/artmagic.h | 1 + 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/mame/misc/artmagic.cpp b/src/mame/misc/artmagic.cpp index 4fddb18ed63..555b0f0b82d 100644 --- a/src/mame/misc/artmagic.cpp +++ b/src/mame/misc/artmagic.cpp @@ -490,12 +490,19 @@ void artmagic_state::stonebal_tms_map(address_map &map) void artmagic_state::shtstar_subcpu_map(address_map &map) { map(0x000000, 0x03ffff).rom(); + map(0x8000c0, 0x8000c1).nopw(); // ? + map(0x800100, 0x800101).noprw(); // ? map(0x800141, 0x800141).w("aysnd", FUNC(ym2149_device::address_w)); map(0x800143, 0x800143).rw("aysnd", FUNC(ym2149_device::data_r), FUNC(ym2149_device::data_w)); map(0x800180, 0x80019f).rw("subduart", FUNC(mc68681_device::read), FUNC(mc68681_device::write)).umask16(0x00ff); map(0xffc000, 0xffffff).ram(); } +void artmagic_state::shtstar_subcpu_vector_map(address_map &map) +{ + map(0xfffff9, 0xfffff9).r("subduart", FUNC(mc68681_device::get_irq_vector)); +} + void artmagic_state::shtstar_guncpu_map(address_map &map) { map(0x0000, 0x7fff).rom(); @@ -858,13 +865,19 @@ void artmagic_state::shtstar(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &artmagic_state::shtstar_map); - MC68681(config, "mainduart", 3686400); + m_tms->output_int().set_inputline("maincpu", M68K_IRQ_4); + + mc68681_device &mainduart(MC68681(config, "mainduart", 3686400)); + mainduart.irq_cb().set_inputline("maincpu", M68K_IRQ_5); + mainduart.set_clocks(500000, 500000, 500000, 500000); // external clocking required for self-test; values probably wrong /* sub cpu*/ m68000_device &subcpu(M68000(config, "subcpu", MASTER_CLOCK_25MHz/2)); subcpu.set_addrmap(AS_PROGRAM, &artmagic_state::shtstar_subcpu_map); + subcpu.set_addrmap(m68000_device::AS_CPU_SPACE, &artmagic_state::shtstar_subcpu_vector_map); - MC68681(config, "subduart", 3686400); + mc68681_device &subduart(MC68681(config, "subduart", 3686400)); + subduart.irq_cb().set_inputline("subcpu", M68K_IRQ_4); YM2149(config, "aysnd", 3686400/2).add_route(ALL_OUTPUTS, "mono", 0.10); diff --git a/src/mame/misc/artmagic.h b/src/mame/misc/artmagic.h index e05de763803..635dd5c294f 100644 --- a/src/mame/misc/artmagic.h +++ b/src/mame/misc/artmagic.h @@ -87,6 +87,7 @@ private: void shtstar_guncpu_map(address_map &map); void shtstar_map(address_map &map); void shtstar_subcpu_map(address_map &map); + void shtstar_subcpu_vector_map(address_map &map); void stonebal_map(address_map &map); void stonebal_tms_map(address_map &map); void tms_map(address_map &map); -- cgit v1.2.3