From b687a33d6a8496759ad4f9e6d3b90ad43d594ee2 Mon Sep 17 00:00:00 2001 From: hap Date: Sat, 3 Jun 2023 13:02:24 +0200 Subject: 1943: don't ignore audiocpu reset line --- src/mame/capcom/1943.cpp | 13 ++++++------- src/mame/capcom/1943.h | 2 ++ src/mame/capcom/1943_v.cpp | 3 ++- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/mame/capcom/1943.cpp b/src/mame/capcom/1943.cpp index 26c7e7938c3..4bf36c17d86 100644 --- a/src/mame/capcom/1943.cpp +++ b/src/mame/capcom/1943.cpp @@ -266,10 +266,9 @@ void _1943_state::machine_start() void _1943_state::machine_reset() { - m_char_on = 0; - m_obj_on = 0; - m_bg1_on = 0; - m_bg2_on = 0; + // these latches are cleared at RESET + c804_w(0); + d806_w(0); } void _1943_state::_1943(machine_config &config) @@ -279,9 +278,9 @@ void _1943_state::_1943(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &_1943_state::c1943_map); m_maincpu->set_vblank_int("screen", FUNC(_1943_state::irq0_line_hold)); - z80_device &audiocpu(Z80(config, "audiocpu", XTAL(24'000'000)/8)); /* verified on pcb */ - audiocpu.set_addrmap(AS_PROGRAM, &_1943_state::sound_map); - audiocpu.set_periodic_int(FUNC(_1943_state::irq0_line_hold), attotime::from_hz(4*60)); + Z80(config, m_audiocpu, XTAL(24'000'000)/8); /* verified on pcb */ + m_audiocpu->set_addrmap(AS_PROGRAM, &_1943_state::sound_map); + m_audiocpu->set_periodic_int(FUNC(_1943_state::irq0_line_hold), attotime::from_hz(4*60)); I8751(config, m_mcu, XTAL(24'000'000)/4); // clock unknown m_mcu->port_in_cb<0>().set([this](){ return m_cpu_to_mcu; }); diff --git a/src/mame/capcom/1943.h b/src/mame/capcom/1943.h index 0dd19536070..dc01b49fc51 100644 --- a/src/mame/capcom/1943.h +++ b/src/mame/capcom/1943.h @@ -21,6 +21,7 @@ public: _1943_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"), m_mcu(*this, "mcu"), m_videoram(*this, "videoram"), m_colorram(*this, "colorram"), @@ -44,6 +45,7 @@ public: private: /* devices / memory pointers */ required_device m_maincpu; + required_device m_audiocpu; optional_device m_mcu; required_shared_ptr m_videoram; required_shared_ptr m_colorram; diff --git a/src/mame/capcom/1943_v.cpp b/src/mame/capcom/1943_v.cpp index b5c73f1575b..8e747b4a3b3 100644 --- a/src/mame/capcom/1943_v.cpp +++ b/src/mame/capcom/1943_v.cpp @@ -140,7 +140,8 @@ void _1943_state::c804_w(u8 data) /* bits 2, 3 and 4 select the ROM bank */ m_mainbank->set_entry((data & 0x1c) >> 2); - /* bit 5 resets the sound CPU - we ignore it */ + /* bit 5 resets the sound CPU */ + m_audiocpu->set_input_line(INPUT_LINE_RESET, (data & 0x20) ? ASSERT_LINE : CLEAR_LINE); /* bit 6 flips screen */ flip_screen_set(data & 0x40); -- cgit v1.2.3