mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
vicdual: rewrote carnival music board emulation, copy-pasted samples handling from audio/pulsar.cpp. Kept sample names and function names the same.
This commit is contained in:
parent
486e623e9f
commit
01cf7ed61a
@ -1,79 +1,28 @@
|
||||
// license:???
|
||||
// copyright-holders:Peter J.C.Clare
|
||||
/*****************************************************************************/
|
||||
/* */
|
||||
/* (C) Copyright Peter J.C.Clare */
|
||||
/* */
|
||||
/*****************************************************************************/
|
||||
/* */
|
||||
/* */
|
||||
/* Module name: carnival.c */
|
||||
/* */
|
||||
/* Creation date: 15/03/98 Revision date: 09/01/99 */
|
||||
/* */
|
||||
/* Produced by: Peter J.C.Clare */
|
||||
/* */
|
||||
/* */
|
||||
/* Abstract: */
|
||||
/* */
|
||||
/* MAME sound & music driver for Sega/Gremlin Carnival. */
|
||||
/* */
|
||||
/*****************************************************************************/
|
||||
/* */
|
||||
/* Acknowledgements: */
|
||||
/* */
|
||||
/* Mike Coates, for the original Carnival MAME sound driver. */
|
||||
/* Virtu-Al, for the sound samples & hardware information. */
|
||||
/* The MAME Team, for the emulator framework. */
|
||||
/* */
|
||||
/*****************************************************************************/
|
||||
/* */
|
||||
/* Revision history */
|
||||
/* ================ */
|
||||
/* */
|
||||
/* Date Vsn. Initials Description */
|
||||
/* ~~~~ ~~~~ ~~~~~~~~ ~~~~~~~~~~~ */
|
||||
/* 03/20/2007 1.1 ZV Moved structures from driver to make */
|
||||
/* file more self contained. */
|
||||
/* */
|
||||
/*****************************************************************************/
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Zsolt Vasvari, hap
|
||||
/*
|
||||
* Carnival audio routines
|
||||
*/
|
||||
|
||||
#include "emu.h"
|
||||
#include "includes/vicdual.h"
|
||||
|
||||
|
||||
#define PSG_CLOCK (3579545 / 3) /* Hz */
|
||||
|
||||
|
||||
/* output port 0x01 definitions - sound effect drive outputs */
|
||||
#define OUT_PORT_1_RIFLE_SHOT 0x01
|
||||
#define OUT_PORT_1_RIFLE 0x01
|
||||
#define OUT_PORT_1_CLANG 0x02
|
||||
#define OUT_PORT_1_DUCK_1 0x04
|
||||
#define OUT_PORT_1_DUCK_2 0x08
|
||||
#define OUT_PORT_1_DUCK_3 0x10
|
||||
#define OUT_PORT_1_PIPE_HIT 0x20
|
||||
#define OUT_PORT_1_BONUS_1 0x40
|
||||
#define OUT_PORT_1_BONUS_2 0x80
|
||||
|
||||
#define OUT_PORT_1_DUCK1 0x04
|
||||
#define OUT_PORT_1_DUCK2 0x08
|
||||
#define OUT_PORT_1_DUCK3 0x10
|
||||
#define OUT_PORT_1_PIPEHIT 0x20
|
||||
#define OUT_PORT_1_BONUS1 0x40
|
||||
#define OUT_PORT_1_BONUS2 0x80
|
||||
|
||||
/* output port 0x02 definitions - sound effect drive outputs */
|
||||
#define OUT_PORT_2_BEAR 0x04
|
||||
#define OUT_PORT_2_MUSIC_T1 0x08
|
||||
#define OUT_PORT_2_MUSIC_RESET 0x10
|
||||
#define OUT_PORT_2_RANKING 0x20
|
||||
|
||||
|
||||
/* music CPU port definitions */
|
||||
#define MUSIC_PORT2_PSG_BDIR 0x40 /* bit 6 on P2 */
|
||||
#define MUSIC_PORT2_PSG_BC1 0x80 /* bit 7 on P2 */
|
||||
|
||||
|
||||
#define PSG_BC_INACTIVE 0
|
||||
#define PSG_BC_READ MUSIC_PORT2_PSG_BC1
|
||||
#define PSG_BC_WRITE MUSIC_PORT2_PSG_BDIR
|
||||
#define PSG_BC_LATCH_ADDRESS ( MUSIC_PORT2_PSG_BDIR | MUSIC_PORT2_PSG_BC1 )
|
||||
|
||||
|
||||
#define PLAY(samp,id,loop) samp->start( id, id, loop )
|
||||
#define STOP(samp,id) samp->stop( id )
|
||||
|
||||
@ -95,49 +44,38 @@ static const char *const carnival_sample_names[] =
|
||||
nullptr
|
||||
};
|
||||
|
||||
|
||||
/* sample IDs - must match sample file name table above */
|
||||
enum
|
||||
{
|
||||
SND_BEAR = 0,
|
||||
SND_BONUS_1,
|
||||
SND_BONUS_2,
|
||||
SND_BONUS1,
|
||||
SND_BONUS2,
|
||||
SND_CLANG,
|
||||
SND_DUCK_1,
|
||||
SND_DUCK_2,
|
||||
SND_DUCK_3,
|
||||
SND_PIPE_HIT,
|
||||
SND_DUCK1,
|
||||
SND_DUCK2,
|
||||
SND_DUCK3,
|
||||
SND_PIPEHIT,
|
||||
SND_RANKING,
|
||||
SND_RIFLE_SHOT
|
||||
SND_RIFLE
|
||||
};
|
||||
|
||||
|
||||
WRITE8_MEMBER( vicdual_state::carnival_audio_1_w )
|
||||
{
|
||||
static int port1State = 0;
|
||||
int bitsChanged;
|
||||
int bitsGoneHigh;
|
||||
int bitsGoneLow;
|
||||
|
||||
|
||||
/* U64 74LS374 8 bit latch */
|
||||
|
||||
/* bit 0: connector pin 36 - rifle shot */
|
||||
/* bit 1: connector pin 35 - clang */
|
||||
/* bit 2: connector pin 33 - duck #1 */
|
||||
/* bit 3: connector pin 34 - duck #2 */
|
||||
/* bit 4: connector pin 32 - duck #3 */
|
||||
/* bit 5: connector pin 31 - pipe hit */
|
||||
/* bit 6: connector pin 30 - bonus #1 */
|
||||
/* bit 7: connector pin 29 - bonus #2 */
|
||||
|
||||
bitsChanged = port1State ^ data;
|
||||
bitsChanged = m_port1State ^ data;
|
||||
bitsGoneHigh = bitsChanged & data;
|
||||
bitsGoneLow = bitsChanged & ~data;
|
||||
|
||||
port1State = data;
|
||||
m_port1State = data;
|
||||
|
||||
if ( bitsGoneLow & OUT_PORT_1_RIFLE_SHOT )
|
||||
if ( bitsGoneLow & OUT_PORT_1_RIFLE )
|
||||
{
|
||||
PLAY( m_samples, SND_RIFLE_SHOT, 0 );
|
||||
PLAY( m_samples, SND_RIFLE, 0 );
|
||||
}
|
||||
|
||||
if ( bitsGoneLow & OUT_PORT_1_CLANG )
|
||||
@ -145,46 +83,46 @@ WRITE8_MEMBER( vicdual_state::carnival_audio_1_w )
|
||||
PLAY( m_samples, SND_CLANG, 0 );
|
||||
}
|
||||
|
||||
if ( bitsGoneLow & OUT_PORT_1_DUCK_1 )
|
||||
if ( bitsGoneLow & OUT_PORT_1_DUCK1 )
|
||||
{
|
||||
PLAY( m_samples, SND_DUCK_1, 1 );
|
||||
PLAY( m_samples, SND_DUCK1, 1 );
|
||||
}
|
||||
if ( bitsGoneHigh & OUT_PORT_1_DUCK_1 )
|
||||
if ( bitsGoneHigh & OUT_PORT_1_DUCK1 )
|
||||
{
|
||||
STOP( m_samples, SND_DUCK_1 );
|
||||
STOP( m_samples, SND_DUCK1 );
|
||||
}
|
||||
|
||||
if ( bitsGoneLow & OUT_PORT_1_DUCK_2 )
|
||||
if ( bitsGoneLow & OUT_PORT_1_DUCK2 )
|
||||
{
|
||||
PLAY( m_samples, SND_DUCK_2, 1 );
|
||||
PLAY( m_samples, SND_DUCK2, 1 );
|
||||
}
|
||||
if ( bitsGoneHigh & OUT_PORT_1_DUCK_2 )
|
||||
if ( bitsGoneHigh & OUT_PORT_1_DUCK2 )
|
||||
{
|
||||
STOP( m_samples, SND_DUCK_2 );
|
||||
STOP( m_samples, SND_DUCK2 );
|
||||
}
|
||||
|
||||
if ( bitsGoneLow & OUT_PORT_1_DUCK_3 )
|
||||
if ( bitsGoneLow & OUT_PORT_1_DUCK3 )
|
||||
{
|
||||
PLAY( m_samples, SND_DUCK_3, 1 );
|
||||
PLAY( m_samples, SND_DUCK3, 1 );
|
||||
}
|
||||
if ( bitsGoneHigh & OUT_PORT_1_DUCK_3 )
|
||||
if ( bitsGoneHigh & OUT_PORT_1_DUCK3 )
|
||||
{
|
||||
STOP( m_samples, SND_DUCK_3 );
|
||||
STOP( m_samples, SND_DUCK3 );
|
||||
}
|
||||
|
||||
if ( bitsGoneLow & OUT_PORT_1_PIPE_HIT )
|
||||
if ( bitsGoneLow & OUT_PORT_1_PIPEHIT )
|
||||
{
|
||||
PLAY( m_samples, SND_PIPE_HIT, 0 );
|
||||
PLAY( m_samples, SND_PIPEHIT, 0 );
|
||||
}
|
||||
|
||||
if ( bitsGoneLow & OUT_PORT_1_BONUS_1 )
|
||||
if ( bitsGoneLow & OUT_PORT_1_BONUS1 )
|
||||
{
|
||||
PLAY( m_samples, SND_BONUS_1, 0 );
|
||||
PLAY( m_samples, SND_BONUS1, 0 );
|
||||
}
|
||||
|
||||
if ( bitsGoneLow & OUT_PORT_1_BONUS_2 )
|
||||
if ( bitsGoneLow & OUT_PORT_1_BONUS2 )
|
||||
{
|
||||
PLAY( m_samples, SND_BONUS_2, 0 );
|
||||
PLAY( m_samples, SND_BONUS2, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
@ -192,106 +130,91 @@ WRITE8_MEMBER( vicdual_state::carnival_audio_1_w )
|
||||
WRITE8_MEMBER( vicdual_state::carnival_audio_2_w )
|
||||
{
|
||||
int bitsChanged;
|
||||
int bitsGoneHigh;
|
||||
//int bitsGoneHigh;
|
||||
int bitsGoneLow;
|
||||
|
||||
/* U63 74LS374 8 bit latch */
|
||||
|
||||
/* bit 0: connector pin 48 */
|
||||
/* bit 1: connector pin 47 */
|
||||
/* bit 2: connector pin 45 - bear */
|
||||
/* bit 3: connector pin 46 - Music !T1 input */
|
||||
/* bit 4: connector pin 44 - Music reset */
|
||||
/* bit 5: connector pin 43 - ranking */
|
||||
/* bit 6: connector pin 42 */
|
||||
/* bit 7: connector pin 41 */
|
||||
|
||||
bitsChanged = m_port2State ^ data;
|
||||
bitsGoneHigh = bitsChanged & data;
|
||||
//bitsGoneHigh = bitsChanged & data;
|
||||
bitsGoneLow = bitsChanged & ~data;
|
||||
|
||||
m_port2State = data;
|
||||
|
||||
if ( bitsGoneLow & OUT_PORT_2_BEAR )
|
||||
{
|
||||
PLAY( m_samples, SND_BEAR, 0 );
|
||||
}
|
||||
|
||||
if ( bitsGoneLow & OUT_PORT_2_RANKING )
|
||||
{
|
||||
PLAY( m_samples, SND_RANKING, 0 );
|
||||
}
|
||||
|
||||
if ( bitsGoneHigh & OUT_PORT_2_MUSIC_RESET )
|
||||
/* reset output is no longer asserted active low */
|
||||
m_audiocpu->set_input_line(INPUT_LINE_RESET, PULSE_LINE );
|
||||
// d4: music board MCU reset
|
||||
m_audiocpu->set_input_line(INPUT_LINE_RESET, (data & 0x10) ? CLEAR_LINE : ASSERT_LINE);
|
||||
}
|
||||
|
||||
|
||||
/* Music board */
|
||||
|
||||
void vicdual_state::carnival_psg_latch(address_space &space)
|
||||
{
|
||||
if (m_psgBus & 1)
|
||||
{
|
||||
// BDIR W, BC1 selects address or data
|
||||
if (m_psgBus & 2)
|
||||
m_psg->address_w(space, 0, m_psgData);
|
||||
else
|
||||
m_psg->data_w(space, 0, m_psgData);
|
||||
}
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( vicdual_state::carnival_music_port_1_w )
|
||||
{
|
||||
// P1: ay8912 d0-d7
|
||||
m_psgData = data;
|
||||
carnival_psg_latch(space);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( vicdual_state::carnival_music_port_2_w )
|
||||
{
|
||||
// P2 d6: AY8912 BDIR(R/W)
|
||||
// P2 d7: AY8912 BC1
|
||||
m_psgBus = data >> 6 & 3;
|
||||
carnival_psg_latch(space);
|
||||
}
|
||||
|
||||
|
||||
READ8_MEMBER( vicdual_state::carnival_music_port_t1_r )
|
||||
{
|
||||
/* note: 8039 T1 signal is inverted on music board */
|
||||
return ( m_port2State & OUT_PORT_2_MUSIC_T1 ) ? 0 : 1;
|
||||
// T1: comms from audio port 2 d3
|
||||
return ~m_port2State >> 3 & 1;
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER( vicdual_state::carnival_music_port_1_w )
|
||||
{
|
||||
m_psgData = data;
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER( vicdual_state::carnival_music_port_2_w )
|
||||
{
|
||||
static int psgSelect = 0;
|
||||
int newSelect;
|
||||
|
||||
newSelect = data & ( MUSIC_PORT2_PSG_BDIR | MUSIC_PORT2_PSG_BC1 );
|
||||
if ( psgSelect != newSelect )
|
||||
{
|
||||
psgSelect = newSelect;
|
||||
|
||||
switch ( psgSelect )
|
||||
{
|
||||
case PSG_BC_INACTIVE:
|
||||
/* do nowt */
|
||||
break;
|
||||
|
||||
case PSG_BC_READ:
|
||||
/* not very sensible for a write */
|
||||
break;
|
||||
|
||||
case PSG_BC_WRITE:
|
||||
m_psg->data_w(space, 0, m_psgData);
|
||||
break;
|
||||
|
||||
case PSG_BC_LATCH_ADDRESS:
|
||||
m_psg->address_w(space, 0, m_psgData);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static ADDRESS_MAP_START( carnival_audio_map, AS_PROGRAM, 8, vicdual_state )
|
||||
AM_RANGE(0x0000, 0x07ff) AM_ROM
|
||||
static ADDRESS_MAP_START( mboard_map, AS_PROGRAM, 8, vicdual_state )
|
||||
AM_RANGE(0x0000, 0x03ff) AM_ROM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( carnival_audio_io_map, AS_IO, 8, vicdual_state )
|
||||
AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_READ(carnival_music_port_t1_r)
|
||||
static ADDRESS_MAP_START( mboard_io_map, AS_IO, 8, vicdual_state )
|
||||
AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_WRITE(carnival_music_port_1_w)
|
||||
AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_WRITE(carnival_music_port_2_w)
|
||||
AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_READ(carnival_music_port_t1_r)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
MACHINE_CONFIG_FRAGMENT( carnival_audio )
|
||||
MCFG_CPU_ADD("audiocpu", I8039, 3579545)
|
||||
MCFG_CPU_PROGRAM_MAP(carnival_audio_map)
|
||||
MCFG_CPU_IO_MAP(carnival_audio_io_map)
|
||||
|
||||
/* music board */
|
||||
MCFG_CPU_ADD("audiocpu", I8039, XTAL_3_579545MHz)
|
||||
MCFG_CPU_PROGRAM_MAP(mboard_map)
|
||||
MCFG_CPU_IO_MAP(mboard_io_map)
|
||||
|
||||
MCFG_QUANTUM_TIME(attotime::from_hz(600))
|
||||
|
||||
MCFG_SOUND_ADD("psg", AY8910, PSG_CLOCK)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10)
|
||||
MCFG_SOUND_ADD("psg", AY8912, XTAL_3_579545MHz/3)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
|
||||
|
||||
/* samples */
|
||||
MCFG_SOUND_ADD("samples", SAMPLES, 0)
|
||||
MCFG_SAMPLES_CHANNELS(10)
|
||||
MCFG_SAMPLES_NAMES(carnival_sample_names)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5)
|
||||
MACHINE_CONFIG_END
|
||||
|
@ -30,15 +30,6 @@ static const char *const depthch_sample_names[] =
|
||||
};
|
||||
|
||||
|
||||
MACHINE_CONFIG_FRAGMENT( depthch_audio )
|
||||
|
||||
MCFG_SOUND_ADD("samples", SAMPLES, 0)
|
||||
MCFG_SAMPLES_CHANNELS(4)
|
||||
MCFG_SAMPLES_NAMES(depthch_sample_names)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
/* sample IDs - must match sample file name table above */
|
||||
enum
|
||||
{
|
||||
@ -51,17 +42,15 @@ enum
|
||||
|
||||
WRITE8_MEMBER( vicdual_state::depthch_audio_w )
|
||||
{
|
||||
static int port1State = 0;
|
||||
int bitsChanged;
|
||||
int bitsGoneHigh;
|
||||
int bitsGoneLow;
|
||||
|
||||
|
||||
bitsChanged = port1State ^ data;
|
||||
bitsChanged = m_port1State ^ data;
|
||||
bitsGoneHigh = bitsChanged & data;
|
||||
bitsGoneLow = bitsChanged & ~data;
|
||||
|
||||
port1State = data;
|
||||
m_port1State = data;
|
||||
|
||||
if ( bitsGoneHigh & OUT_PORT_1_LONGEXPL )
|
||||
{
|
||||
@ -87,3 +76,13 @@ WRITE8_MEMBER( vicdual_state::depthch_audio_w )
|
||||
STOP( m_samples, SND_SONAR );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
MACHINE_CONFIG_FRAGMENT( depthch_audio )
|
||||
|
||||
/* samples */
|
||||
MCFG_SOUND_ADD("samples", SAMPLES, 0)
|
||||
MCFG_SAMPLES_CHANNELS(4)
|
||||
MCFG_SAMPLES_NAMES(depthch_sample_names)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5)
|
||||
MACHINE_CONFIG_END
|
||||
|
@ -36,15 +36,6 @@ static const char *const invinco_sample_names[] =
|
||||
};
|
||||
|
||||
|
||||
|
||||
MACHINE_CONFIG_FRAGMENT( invinco_audio )
|
||||
MCFG_SOUND_ADD("samples", SAMPLES, 0)
|
||||
MCFG_SAMPLES_CHANNELS(8)
|
||||
MCFG_SAMPLES_NAMES(invinco_sample_names)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
/* sample IDs - must match sample file name table above */
|
||||
enum
|
||||
{
|
||||
@ -61,17 +52,15 @@ enum
|
||||
|
||||
WRITE8_MEMBER( vicdual_state::invinco_audio_w )
|
||||
{
|
||||
static int port2State = 0;
|
||||
int bitsChanged;
|
||||
//int bitsGoneHigh;
|
||||
int bitsGoneLow;
|
||||
|
||||
|
||||
bitsChanged = port2State ^ data;
|
||||
bitsChanged = m_port2State ^ data;
|
||||
//bitsGoneHigh = bitsChanged & data;
|
||||
bitsGoneLow = bitsChanged & ~data;
|
||||
|
||||
port2State = data;
|
||||
m_port2State = data;
|
||||
|
||||
if ( bitsGoneLow & OUT_PORT_2_SAUCER )
|
||||
{
|
||||
@ -102,8 +91,14 @@ WRITE8_MEMBER( vicdual_state::invinco_audio_w )
|
||||
{
|
||||
PLAY( m_samples, SND_SHIPHIT, 0 );
|
||||
}
|
||||
|
||||
#if 0
|
||||
logerror("Went LO: %02X %04X\n", bitsGoneLow, space.device().safe_pc());
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
MACHINE_CONFIG_FRAGMENT( invinco_audio )
|
||||
|
||||
/* samples */
|
||||
MCFG_SOUND_ADD("samples", SAMPLES, 0)
|
||||
MCFG_SAMPLES_CHANNELS(8)
|
||||
MCFG_SAMPLES_NAMES(invinco_sample_names)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5)
|
||||
MACHINE_CONFIG_END
|
||||
|
@ -53,14 +53,6 @@ static const char *const pulsar_sample_names[] =
|
||||
};
|
||||
|
||||
|
||||
MACHINE_CONFIG_FRAGMENT( pulsar_audio )
|
||||
MCFG_SOUND_ADD("samples", SAMPLES, 0)
|
||||
MCFG_SAMPLES_CHANNELS(12)
|
||||
MCFG_SAMPLES_NAMES(pulsar_sample_names)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
/* sample IDs - must match sample file name table above */
|
||||
enum
|
||||
{
|
||||
@ -85,7 +77,6 @@ WRITE8_MEMBER( vicdual_state::pulsar_audio_1_w )
|
||||
//int bitsGoneHigh;
|
||||
int bitsGoneLow;
|
||||
|
||||
|
||||
bitsChanged = m_port1State ^ data;
|
||||
//bitsGoneHigh = bitsChanged & data;
|
||||
bitsGoneLow = bitsChanged & ~data;
|
||||
@ -131,17 +122,15 @@ WRITE8_MEMBER( vicdual_state::pulsar_audio_1_w )
|
||||
|
||||
WRITE8_MEMBER( vicdual_state::pulsar_audio_2_w )
|
||||
{
|
||||
static int port2State = 0;
|
||||
int bitsChanged;
|
||||
int bitsGoneHigh;
|
||||
int bitsGoneLow;
|
||||
|
||||
|
||||
bitsChanged = port2State ^ data;
|
||||
bitsChanged = m_port2State ^ data;
|
||||
bitsGoneHigh = bitsChanged & data;
|
||||
bitsGoneLow = bitsChanged & ~data;
|
||||
|
||||
port2State = data;
|
||||
m_port2State = data;
|
||||
|
||||
if ( bitsGoneLow & OUT_PORT_2_SIZZLE )
|
||||
{
|
||||
@ -180,3 +169,13 @@ WRITE8_MEMBER( vicdual_state::pulsar_audio_2_w )
|
||||
STOP( m_samples, SND_MOVMAZE );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
MACHINE_CONFIG_FRAGMENT( pulsar_audio )
|
||||
|
||||
/* samples */
|
||||
MCFG_SOUND_ADD("samples", SAMPLES, 0)
|
||||
MCFG_SAMPLES_CHANNELS(12)
|
||||
MCFG_SAMPLES_NAMES(pulsar_sample_names)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5)
|
||||
MACHINE_CONFIG_END
|
||||
|
@ -235,12 +235,14 @@ void vicdual_state::machine_start()
|
||||
m_port1State = 0;
|
||||
m_port2State = 0;
|
||||
m_psgData = 0;
|
||||
m_psgBus = 0;
|
||||
|
||||
save_item(NAME(m_coin_status));
|
||||
save_item(NAME(m_palette_bank));
|
||||
save_item(NAME(m_port1State));
|
||||
save_item(NAME(m_port2State));
|
||||
save_item(NAME(m_psgData));
|
||||
save_item(NAME(m_psgBus));
|
||||
}
|
||||
|
||||
|
||||
@ -1991,6 +1993,7 @@ static MACHINE_CONFIG_DERIVED( invds, vicdual_dualgame_root )
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
static MACHINE_CONFIG_DERIVED( carhntds, vicdual_dualgame_root )
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_MODIFY("maincpu")
|
||||
MCFG_CPU_PROGRAM_MAP(carhntds_dualgame_map)
|
||||
@ -2024,24 +2027,21 @@ static MACHINE_CONFIG_DERIVED( carnival, vicdual_dualgame_root )
|
||||
MCFG_CPU_MODIFY("maincpu")
|
||||
MCFG_CPU_IO_MAP(carnival_io_map)
|
||||
|
||||
MCFG_QUANTUM_PERFECT_CPU("maincpu")
|
||||
|
||||
/* audio hardware */
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
MCFG_FRAGMENT_ADD(carnival_audio)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
static MACHINE_CONFIG_DERIVED( carnivalh, vicdual_dualgame_root )
|
||||
static MACHINE_CONFIG_DERIVED( carnivalh, carnival )
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_MODIFY("maincpu")
|
||||
MCFG_CPU_IO_MAP(headon_io_map)
|
||||
|
||||
/* audio hardware */
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
MCFG_FRAGMENT_ADD(carnival_audio)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
|
||||
static MACHINE_CONFIG_DERIVED( tranqgun, vicdual_dualgame_root )
|
||||
|
||||
/* basic machine hardware */
|
||||
@ -2093,7 +2093,6 @@ MACHINE_CONFIG_END
|
||||
*
|
||||
*************************************/
|
||||
|
||||
|
||||
WRITE8_MEMBER(vicdual_state::samurai_protection_w)
|
||||
{
|
||||
m_samurai_protection_data = data;
|
||||
@ -3126,10 +3125,6 @@ ROM_START( tranqgun )
|
||||
ROM_LOAD( "316-0042.u88", 0x0020, 0x0020, CRC(a1506b9d) SHA1(037c3db2ea40eca459e8acba9d1506dd28d72d10) ) /* sequence PROM */
|
||||
ROM_END
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ROM_START( spacetrk )
|
||||
ROM_REGION( 0x10000, "maincpu", 0 )
|
||||
ROM_LOAD( "u33.bin", 0x0000, 0x0400, CRC(9033fe50) SHA1(0a9b86af03956575403d8b494963f55887fc4dc3) )
|
||||
@ -3206,7 +3201,7 @@ ROM_START( carnival )
|
||||
ROM_REGION( 0x0020, "proms", 0 )
|
||||
ROM_LOAD( "316-633", 0x0000, 0x0020, CRC(f0084d80) SHA1(95ec912ac2c64cd58a50c68afc0993746841a531) )
|
||||
|
||||
ROM_REGION( 0x0800, "audiocpu", 0 ) /* sound ROM */
|
||||
ROM_REGION( 0x0400, "audiocpu", 0 ) /* sound ROM */
|
||||
ROM_LOAD( "epr-412", 0x0000, 0x0400, CRC(0dbaa2b0) SHA1(eae7fc362a0ff8f908c42e093c7dbb603659373c) )
|
||||
|
||||
ROM_REGION( 0x0020, "user1", 0 ) /* timing PROM */
|
||||
@ -3235,7 +3230,7 @@ ROM_START( carnivalc )
|
||||
ROM_REGION( 0x0020, "proms", 0 )
|
||||
ROM_LOAD( "316-633", 0x0000, 0x0020, CRC(f0084d80) SHA1(95ec912ac2c64cd58a50c68afc0993746841a531) )
|
||||
|
||||
ROM_REGION( 0x0800, "audiocpu", 0 ) /* sound ROM */
|
||||
ROM_REGION( 0x0400, "audiocpu", 0 ) /* sound ROM */
|
||||
ROM_LOAD( "epr-412", 0x0000, 0x0400, CRC(0dbaa2b0) SHA1(eae7fc362a0ff8f908c42e093c7dbb603659373c) )
|
||||
|
||||
ROM_REGION( 0x0020, "user1", 0 ) /* timing PROM */
|
||||
@ -3256,7 +3251,7 @@ ROM_START( carnivalh )
|
||||
ROM_REGION( 0x0020, "proms", 0 )
|
||||
ROM_LOAD( "pr-62.u44", 0x0000, 0x0020, CRC(f0084d80) SHA1(95ec912ac2c64cd58a50c68afc0993746841a531) ) /* Same as 316-633 */
|
||||
|
||||
ROM_REGION( 0x0800, "audiocpu", 0 ) /* sound ROM */
|
||||
ROM_REGION( 0x0400, "audiocpu", 0 ) /* sound ROM */
|
||||
ROM_LOAD( "epr-412.u5", 0x0000, 0x0400, CRC(0dbaa2b0) SHA1(eae7fc362a0ff8f908c42e093c7dbb603659373c) )
|
||||
|
||||
ROM_REGION( 0x0040, "user1", 0 ) /* misc PROMs (type n82s123) */
|
||||
@ -3278,7 +3273,7 @@ ROM_START( carnivalha )
|
||||
ROM_REGION( 0x0020, "proms", 0 )
|
||||
ROM_LOAD( "pr-62.u44", 0x0000, 0x0020, CRC(f0084d80) SHA1(95ec912ac2c64cd58a50c68afc0993746841a531) ) /* Same as 316-633 */
|
||||
|
||||
ROM_REGION( 0x0800, "audiocpu", 0 ) /* sound ROM */
|
||||
ROM_REGION( 0x0400, "audiocpu", 0 ) /* sound ROM */
|
||||
ROM_LOAD( "epr-412.u5", 0x0000, 0x0400, CRC(0dbaa2b0) SHA1(eae7fc362a0ff8f908c42e093c7dbb603659373c) )
|
||||
|
||||
ROM_REGION( 0x0040, "user1", 0 ) /* misc PROMs (type n82s123) */
|
||||
@ -3308,7 +3303,7 @@ ROM_START( brdrline )
|
||||
ROM_REGION( 0x0020, "proms", 0 )
|
||||
ROM_LOAD( "borderc.49", 0x0000, 0x0020, CRC(bc6be94e) SHA1(34e113ec25e19212b74907d35be5cb8714a8249c) )
|
||||
|
||||
ROM_REGION( 0x0800, "cpu1", 0 ) /* sound ROM */
|
||||
ROM_REGION( 0x0400, "audiocpu", 0 ) /* sound ROM */
|
||||
ROM_LOAD( "au.bin", 0x0000, 0x0400, CRC(a23e1d9f) SHA1(ce209571f6341aa6f036a015e666673098bc98ea) )
|
||||
|
||||
ROM_REGION( 0x0100, "user1", 0 ) /* misc PROM */
|
||||
@ -3379,7 +3374,7 @@ ROM_START( starrkr )
|
||||
ROM_REGION( 0x0020, "proms", 0 )
|
||||
ROM_LOAD( "pr-23.u49", 0x0000, 0x0020, CRC(0a2156b3) SHA1(504abe8e253ff9b12ac6ffacd92722f8ee8a30ae) )
|
||||
|
||||
ROM_REGION( 0x0800, "cpu1", 0 ) /* sound ROM */
|
||||
ROM_REGION( 0x0400, "audiocpu", 0 ) /* sound ROM */
|
||||
ROM_LOAD( "epr-613.1", 0x0000, 0x0400, CRC(ff4be0c7) SHA1(7311c34aa88f6ba905a01e7a9f2ed99a0353a06b) )
|
||||
|
||||
ROM_REGION( 0x0800, "user1", 0 ) /* misc PROM */
|
||||
@ -3453,7 +3448,7 @@ ROM_START( brdrlins )
|
||||
ROM_REGION( 0x0020, "proms", 0 )
|
||||
ROM_LOAD( "5610.49", 0x0000, 0x0020, CRC(bc6be94e) SHA1(34e113ec25e19212b74907d35be5cb8714a8249c) )
|
||||
|
||||
ROM_REGION( 0x0800, "cpu1", 0 ) /* sound ROM */
|
||||
ROM_REGION( 0x0400, "audiocpu", 0 ) /* sound ROM */
|
||||
ROM_LOAD( "au.bin", 0x0000, 0x0400, CRC(a23e1d9f) SHA1(ce209571f6341aa6f036a015e666673098bc98ea) )
|
||||
|
||||
ROM_REGION( 0x0100, "user1", 0 ) /* misc PROM */
|
||||
@ -3479,7 +3474,7 @@ ROM_START( brdrlinb )
|
||||
ROM_REGION( 0x0020, "proms", 0 )
|
||||
ROM_LOAD( "borderc.49", 0x0000, 0x0020, CRC(bc6be94e) SHA1(34e113ec25e19212b74907d35be5cb8714a8249c) )
|
||||
|
||||
ROM_REGION( 0x0800, "cpu1", 0 ) /* sound ROM */
|
||||
ROM_REGION( 0x0400, "audiocpu", 0 ) /* sound ROM */
|
||||
ROM_LOAD( "bords.bin", 0x0000, 0x0400, CRC(a23e1d9f) SHA1(ce209571f6341aa6f036a015e666673098bc98ea) )
|
||||
|
||||
ROM_REGION( 0x0020, "user1", 0 ) /* misc PROM */
|
||||
@ -3620,7 +3615,7 @@ GAME( 1979, headon, 0, headon, headon, driver_device, 0, ROT0,
|
||||
GAME( 1979, headon1, headon, headon, headon, driver_device, 0, ROT0, "Gremlin", "Head On (1 player)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1979, headons, headon, headons, headons, driver_device, 0, ROT0, "bootleg (Sidam)", "Head On (Sidam bootleg, set 1)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1979, headonsa, headon, headons, headons, driver_device, 0, ROT0, "bootleg (Sidam)", "Head On (Sidam bootleg, set 2)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // won't coin up?
|
||||
GAME( 1979, headonmz, headon, headon, headonmz, driver_device, 0, ROT0, "bootleg", "Head On (bootleg, alt maze)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1979, headonmz, headon, headon, headonmz, driver_device, 0, ROT0, "bootleg", "Head On (bootleg, alt maze)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1979, supcrash, headon, headons, supcrash, driver_device, 0, ROT0, "bootleg", "Super Crash (bootleg of Head On)", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1979, hocrash, headon, headons, headons, driver_device, 0, ROT0, "bootleg (Fraber)", "Crash (bootleg of Head On)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1979, headon2, 0, headon2, headon2, driver_device, 0, ROT0, "Sega", "Head On 2", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
|
||||
@ -3645,7 +3640,6 @@ GAME( 1981, brdrlins, brdrline, brdrline, brdrline, driver_device, 0, ROT270
|
||||
GAME( 1981, brdrlinb, brdrline, brdrline, brdrline, driver_device, 0, ROT270, "bootleg (Karateco)", "Borderline (Karateco bootleg)", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1981, brdrlinet, brdrline, tranqgun, tranqgun, driver_device, 0, ROT270, "Sega", "Borderline (Tranquilizer Gun conversion)", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE ) // official factory conversion
|
||||
GAME( 198?, startrks, 0, headons, headons, driver_device, 0, ROT0, "bootleg (Sidam)", "Star Trek (Head On hardware)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
|
||||
|
||||
GAME( 1980, digger, 0, digger, digger, driver_device, 0, ROT270, "Sega", "Digger", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1981, pulsar, 0, pulsar, pulsar, driver_device, 0, ROT270, "Sega", "Pulsar", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1979, heiankyo, 0, heiankyo, heiankyo, driver_device, 0, ROT270, "Denki Onkyo", "Heiankyo Alien", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
|
||||
|
@ -63,6 +63,7 @@ public:
|
||||
int m_port1State;
|
||||
int m_port2State;
|
||||
int m_psgData;
|
||||
int m_psgBus;
|
||||
emu_timer *m_frogs_croak_timer;
|
||||
|
||||
void coin_in();
|
||||
@ -110,13 +111,13 @@ public:
|
||||
DECLARE_WRITE8_MEMBER( invho2_audio_w );
|
||||
TIMER_CALLBACK_MEMBER( frogs_croak_callback );
|
||||
|
||||
|
||||
/*----------- defined in audio/carnival.c -----------*/
|
||||
DECLARE_WRITE8_MEMBER( carnival_audio_1_w );
|
||||
DECLARE_WRITE8_MEMBER( carnival_audio_2_w );
|
||||
DECLARE_READ8_MEMBER( carnival_music_port_t1_r );
|
||||
DECLARE_WRITE8_MEMBER( carnival_music_port_1_w );
|
||||
DECLARE_WRITE8_MEMBER( carnival_music_port_2_w );
|
||||
void carnival_psg_latch(address_space &space);
|
||||
|
||||
/*----------- defined in audio/depthch.c -----------*/
|
||||
DECLARE_WRITE8_MEMBER( depthch_audio_w );
|
||||
|
Loading…
Reference in New Issue
Block a user