contra.cpp: Acknowledge sound IRQ (nw)

This commit is contained in:
AJR 2018-04-09 00:24:56 -04:00
parent 1763d95881
commit 1f6c67fc85
2 changed files with 14 additions and 2 deletions

View File

@ -42,7 +42,12 @@ WRITE8_MEMBER(contra_state::contra_bankswitch_w)
WRITE8_MEMBER(contra_state::contra_sh_irqtrigger_w)
{
m_audiocpu->set_input_line(M6809_IRQ_LINE, HOLD_LINE);
m_audiocpu->set_input_line(M6809_IRQ_LINE, ASSERT_LINE);
}
WRITE8_MEMBER(contra_state::sirq_clear_w)
{
m_audiocpu->set_input_line(M6809_IRQ_LINE, CLEAR_LINE);
}
WRITE8_MEMBER(contra_state::contra_coin_counter_w)
@ -97,7 +102,7 @@ void contra_state::sound_map(address_map &map)
{
map(0x0000, 0x0000).r("soundlatch", FUNC(generic_latch_8_device::read));
map(0x2000, 0x2001).rw("ymsnd", FUNC(ym2151_device::read), FUNC(ym2151_device::write));
map(0x4000, 0x4000).nopw(); /* read triggers irq reset and latch read (in the hardware only). */
map(0x4000, 0x4000).w(this, FUNC(contra_state::sirq_clear_w)); /* read triggers irq reset and latch read (in the hardware only). */
map(0x6000, 0x67ff).ram();
map(0x8000, 0xffff).rom();
}
@ -196,6 +201,11 @@ void contra_state::machine_start()
membank("bank1")->configure_entries(0, 16, &ROM[0x10000], 0x2000);
}
void contra_state::machine_reset()
{
m_audiocpu->set_input_line(M6809_IRQ_LINE, CLEAR_LINE);
}
MACHINE_CONFIG_START(contra_state::contra)
/* basic machine hardware */

View File

@ -54,6 +54,7 @@ public:
required_device<k007121_device> m_k007121_2;
DECLARE_WRITE8_MEMBER(contra_bankswitch_w);
DECLARE_WRITE8_MEMBER(contra_sh_irqtrigger_w);
DECLARE_WRITE8_MEMBER(sirq_clear_w);
DECLARE_WRITE8_MEMBER(contra_coin_counter_w);
DECLARE_WRITE8_MEMBER(contra_fg_vram_w);
DECLARE_WRITE8_MEMBER(contra_fg_cram_w);
@ -67,6 +68,7 @@ public:
TILE_GET_INFO_MEMBER(get_bg_tile_info);
TILE_GET_INFO_MEMBER(get_tx_tile_info);
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
DECLARE_PALETTE_INIT(contra);
uint32_t screen_update_contra(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);