mirror of
https://github.com/holub/mame
synced 2025-04-21 16:01:56 +03:00
Implemented sound hand-shake flag for Hot Chase, and removed irq hack. Fixes for good gameplay speed in it. [Angelo Salese]
Added SOUND-ON and SOUND-RST preliminary mechanisms for WEC Le Mans 24/Hot Chase HW, fixes hanging sound if entering into service mode for both. [Angelo Salese]
This commit is contained in:
parent
0dc453ea69
commit
7de5e75777
@ -336,16 +336,25 @@ WRITE16_MEMBER(wecleman_state::irqctrl_w)
|
||||
m_subcpu->set_input_line(4, HOLD_LINE);
|
||||
|
||||
// Bit 1 : NSUBRST
|
||||
if (data & 2)
|
||||
m_subcpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
|
||||
else
|
||||
m_subcpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
|
||||
|
||||
// Bit 2 : SOUND-ON
|
||||
// Bit 3 : SOUNDRST
|
||||
m_subcpu->set_input_line(INPUT_LINE_RESET, (data & 2) ? CLEAR_LINE : ASSERT_LINE);
|
||||
|
||||
// Bit 2 : SOUND-ON: send a interrupt to sound CPU, 0 -> 1 transition
|
||||
if ( (m_irqctrl & 4) && (!(data & 4)) )
|
||||
{
|
||||
if(m_sound_hw_type == 0) // wec le mans
|
||||
m_audiocpu->set_input_line(0, HOLD_LINE);
|
||||
else // hot chase
|
||||
{
|
||||
m_hotchase_sound_hs = false;
|
||||
// TODO: ASSERT_LINE here?
|
||||
m_audiocpu->set_input_line(M6809_IRQ_LINE, HOLD_LINE);
|
||||
}
|
||||
}
|
||||
// Bit 3 : SOUNDRST, pc=0x18ea in Hot Chase POST, 1 -> 0 -> 1
|
||||
m_audiocpu->set_input_line(INPUT_LINE_RESET, (data & 8) ? CLEAR_LINE : ASSERT_LINE);
|
||||
// Bit 4 : SCR-HCNT
|
||||
// Bit 5 : SCR-VCNT
|
||||
// Bit 6 : TV-KILL
|
||||
// Bit 5 : SCR-VCNT: active in WEC Le Mans, disabled in Hot Chase (where's the latch anyway?)
|
||||
// Bit 6 : TV-KILL: active low, disables screen.
|
||||
m_irqctrl = data; // latch the value
|
||||
}
|
||||
}
|
||||
@ -545,7 +554,7 @@ static ADDRESS_MAP_START( hotchase_map, AS_PROGRAM, 16, wecleman_state )
|
||||
AM_RANGE(0x140014, 0x140015) AM_READ_PORT("DSW2") // DSW 2
|
||||
AM_RANGE(0x140016, 0x140017) AM_READ_PORT("DSW1") // DSW 1
|
||||
AM_RANGE(0x140020, 0x140021) AM_READ(selected_ip_r) AM_WRITENOP // Paired with writes to $140003
|
||||
AM_RANGE(0x140022, 0x140023) AM_READNOP // ??
|
||||
AM_RANGE(0x140022, 0x140023) AM_READNOP // read and written at $601c0, unknown purpose
|
||||
AM_RANGE(0x140030, 0x140031) AM_WRITENOP // signal to cabinet vibration motors?
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -584,7 +593,6 @@ WRITE16_MEMBER(wecleman_state::wecleman_soundlatch_w)
|
||||
if (ACCESSING_BITS_0_7)
|
||||
{
|
||||
soundlatch_byte_w(space, 0, data & 0xFF);
|
||||
m_audiocpu->set_input_line(0, HOLD_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -650,7 +658,6 @@ WRITE16_MEMBER(wecleman_state::hotchase_soundlatch_w)
|
||||
if (ACCESSING_BITS_0_7)
|
||||
{
|
||||
soundlatch_byte_w(space, 0, data & 0xFF);
|
||||
m_audiocpu->set_input_line(M6809_IRQ_LINE, HOLD_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -704,6 +711,11 @@ WRITE8_MEMBER(wecleman_state::hotchase_sound_control_w)
|
||||
}
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(wecleman_state::hotchase_sound_hs_w)
|
||||
{
|
||||
m_hotchase_sound_hs = true;
|
||||
}
|
||||
|
||||
/* Read and write handlers for one K007232 chip:
|
||||
even and odd register are mapped swapped */
|
||||
READ8_MEMBER(wecleman_state::hotchase_1_k007232_r)
|
||||
@ -742,9 +754,9 @@ static ADDRESS_MAP_START( hotchase_sound_map, AS_PROGRAM, 8, wecleman_state )
|
||||
AM_RANGE(0x2000, 0x200d) AM_READWRITE(hotchase_2_k007232_r, hotchase_2_k007232_w)
|
||||
AM_RANGE(0x3000, 0x300d) AM_READWRITE(hotchase_3_k007232_r, hotchase_3_k007232_w)
|
||||
AM_RANGE(0x4000, 0x4007) AM_WRITE(hotchase_sound_control_w) // Sound volume, banking, etc.
|
||||
AM_RANGE(0x5000, 0x5000) AM_WRITENOP // ? (written with 0 on IRQ, 1 on FIRQ)
|
||||
AM_RANGE(0x5000, 0x5000) AM_WRITENOP // 0 at start of IRQ service, 1 at end (irq mask?)
|
||||
AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_byte_r) // From main CPU (Read on IRQ)
|
||||
AM_RANGE(0x7000, 0x7000) AM_WRITENOP // Command acknowledge ?
|
||||
AM_RANGE(0x7000, 0x7000) AM_WRITE(hotchase_sound_hs_w) // Command acknowledge ?
|
||||
AM_RANGE(0x8000, 0xffff) AM_ROM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -765,9 +777,9 @@ static INPUT_PORTS_START( wecleman )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
|
||||
PORT_START("IN1") /* Motor? - $140013.b */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE2 ) // right sw
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE3 ) // left sw
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE4 ) // thermo
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Right SW") // right sw
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE3 ) PORT_NAME("Left SW") // left sw
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE4 ) PORT_NAME("Thermo SW") // thermo
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) // from sound cpu ?
|
||||
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
|
||||
@ -845,6 +857,11 @@ INPUT_PORTS_END
|
||||
Hot Chase Input Ports
|
||||
***************************************************************************/
|
||||
|
||||
CUSTOM_INPUT_MEMBER(wecleman_state::hotchase_sound_status_r)
|
||||
{
|
||||
return m_hotchase_sound_hs;
|
||||
}
|
||||
|
||||
static INPUT_PORTS_START( hotchase )
|
||||
PORT_START("IN0") /* $140011.b */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||
@ -857,11 +874,12 @@ static INPUT_PORTS_START( hotchase )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("IN1") /* Motor? - $140013.b */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE2 ) // right sw
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE3 ) // left sw
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE4 ) // thermo
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) // from sound cpu ?
|
||||
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Right SW") // right sw
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE3 ) PORT_NAME("Left SW") // left sw
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE4 ) PORT_NAME("Thermo SW") // thermo
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) // from sound cpu
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, wecleman_state,hotchase_sound_status_r, NULL)
|
||||
PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
|
||||
PORT_START("DSW2") /* $140015.b */
|
||||
PORT_DIPNAME( 0x01, 0x01, "Speed Unit" )
|
||||
@ -1026,7 +1044,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(wecleman_state::wecleman_scanline)
|
||||
|
||||
if(scanline == 232) // vblank irq
|
||||
m_maincpu->set_input_line(4, HOLD_LINE);
|
||||
else if(((scanline % 64) == 0)) // timer irq TODO: timings
|
||||
else if(((scanline % 64) == 0)) // timer irq TODO: timings (and actually I believe it's from the blitter device)
|
||||
m_maincpu->set_input_line(5, HOLD_LINE);
|
||||
}
|
||||
|
||||
@ -1036,8 +1054,6 @@ TIMER_DEVICE_CALLBACK_MEMBER(wecleman_state::hotchase_scanline)
|
||||
|
||||
if(scanline == 224) // vblank irq
|
||||
m_maincpu->set_input_line(4, HOLD_LINE);
|
||||
else if(((scanline % 64) == 0)) // timer irq TODO: timings
|
||||
m_maincpu->set_input_line(5, HOLD_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -1403,6 +1419,7 @@ DRIVER_INIT_MEMBER(wecleman_state,wecleman)
|
||||
20,19,18,17,16,15,14,7,12,4,2,5,6,13,8,9,11,3,10,1,0);
|
||||
|
||||
m_spr_color_offs = 0x40;
|
||||
m_sound_hw_type = 0;
|
||||
}
|
||||
|
||||
|
||||
@ -1680,6 +1697,7 @@ DRIVER_INIT_MEMBER(wecleman_state,hotchase)
|
||||
hotchase_sprite_decode(3,0x80000*2); // num banks, bank len
|
||||
|
||||
m_spr_color_offs = 0;
|
||||
m_sound_hw_type = 1;
|
||||
}
|
||||
|
||||
|
||||
|
@ -59,6 +59,8 @@ public:
|
||||
int m_cloud_blend;
|
||||
int m_cloud_ds;
|
||||
int m_cloud_visible;
|
||||
int m_sound_hw_type;
|
||||
bool m_hotchase_sound_hs;
|
||||
pen_t m_black_pen;
|
||||
struct sprite *m_sprite_list;
|
||||
struct sprite **m_spr_ptr_list;
|
||||
@ -112,6 +114,8 @@ public:
|
||||
void hotchase_draw_road(bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
K051316_CB_MEMBER(hotchase_zoom_callback_1);
|
||||
K051316_CB_MEMBER(hotchase_zoom_callback_2);
|
||||
DECLARE_CUSTOM_INPUT_MEMBER(hotchase_sound_status_r);
|
||||
DECLARE_WRITE8_MEMBER(hotchase_sound_hs_w);
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<cpu_device> m_audiocpu;
|
||||
|
Loading…
Reference in New Issue
Block a user