From d73825f393bdfabc507dac8012f4563e8191d082 Mon Sep 17 00:00:00 2001 From: darq Date: Thu, 8 Dec 2016 23:02:45 +0100 Subject: [PATCH] Fixed missing title screen music (parent set), normalized YM volumes --- src/mame/drivers/shootout.cpp | 19 ++++++++++++++----- src/mame/includes/shootout.h | 1 + 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/mame/drivers/shootout.cpp b/src/mame/drivers/shootout.cpp index 13c31bd4079..03459f7948c 100644 --- a/src/mame/drivers/shootout.cpp +++ b/src/mame/drivers/shootout.cpp @@ -49,10 +49,19 @@ WRITE8_MEMBER(shootout_state::bankswitch_w) membank("bank1")->set_entry(data & 0x0f); } +READ8_MEMBER(shootout_state::sound_cpu_command_r) +{ + m_audiocpu->set_input_line (INPUT_LINE_NMI, CLEAR_LINE); + return (m_soundlatch->read (space, 0)); +} + WRITE8_MEMBER(shootout_state::sound_cpu_command_w) { m_soundlatch->write( space, offset, data ); - m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE ); + m_audiocpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE); + + // Allow the other CPU to reply. This fix the missing music on the title screen (parent set). + space.device ().execute ().spin_until_time (attotime :: from_usec (200)); } WRITE8_MEMBER(shootout_state::flipscreen_w) @@ -102,9 +111,9 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( shootout_sound_map, AS_PROGRAM, 8, shootout_state ) AM_RANGE(0x0000, 0x07ff) AM_RAM AM_RANGE(0x4000, 0x4001) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write) - AM_RANGE(0xa000, 0xa000) AM_DEVREAD("soundlatch", generic_latch_8_device, read) + AM_RANGE(0xa000, 0xa000) AM_READ(sound_cpu_command_r) AM_RANGE(0xc000, 0xffff) AM_ROM - AM_RANGE(0xd000, 0xd000) AM_WRITENOP // unknown, NOT irq/nmi mask + AM_RANGE(0xd000, 0xd000) AM_WRITENOP // Unknown, NOT irq/nmi mask (Always 0x80 ???) ADDRESS_MAP_END /*******************************************************************************/ @@ -262,7 +271,7 @@ static MACHINE_CONFIG_START( shootout, shootout_state ) MCFG_SOUND_ADD("ymsnd", YM2203, 1500000) MCFG_YM2203_IRQ_HANDLER(INPUTLINE("audiocpu", M6502_IRQ_LINE)) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) MACHINE_CONFIG_END @@ -294,7 +303,7 @@ static MACHINE_CONFIG_START( shootouj, shootout_state ) MCFG_YM2203_IRQ_HANDLER(INPUTLINE("maincpu", M6502_IRQ_LINE)) MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(shootout_state, bankswitch_w)) MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(shootout_state, flipscreen_w)) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( shootouk, shootouj ) diff --git a/src/mame/includes/shootout.h b/src/mame/includes/shootout.h index fc1486b03fb..4fd5d8c9c47 100644 --- a/src/mame/includes/shootout.h +++ b/src/mame/includes/shootout.h @@ -32,6 +32,7 @@ public: int m_bFlicker; DECLARE_WRITE8_MEMBER(bankswitch_w); + DECLARE_READ8_MEMBER(sound_cpu_command_r); DECLARE_WRITE8_MEMBER(sound_cpu_command_w); DECLARE_WRITE8_MEMBER(flipscreen_w); DECLARE_WRITE8_MEMBER(coincounter_w);