summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
author smf- <smf-@users.noreply.github.com>2016-10-18 20:02:42 +0100
committer smf- <smf-@users.noreply.github.com>2016-10-18 20:02:42 +0100
commit715bcb8469b86f15ec693fe7dee9f49282acd764 (patch)
treeaf10933db7eb55068446846caf1a6f2d34067f42 /src
parent03bdae772f54c496f3bb6062fa0af69eb78035bb (diff)
fix crash in debug builds. (nw)
Diffstat (limited to 'src')
-rw-r--r--src/mame/drivers/spaceg.cpp40
1 files changed, 39 insertions, 1 deletions
diff --git a/src/mame/drivers/spaceg.cpp b/src/mame/drivers/spaceg.cpp
index a2ec52d4071..42c033cde7b 100644
--- a/src/mame/drivers/spaceg.cpp
+++ b/src/mame/drivers/spaceg.cpp
@@ -351,6 +351,21 @@ UINT32 spaceg_state::screen_update_spaceg(screen_device &screen, bitmap_ind16 &b
return 0;
}
+static const char *const invaders_sample_names[] =
+{
+ "*invaders",
+ "1", /* shot/missle */
+ "2", /* base hit/explosion */
+ "3", /* invader hit */
+ "4", /* fleet move 1 */
+ "5", /* fleet move 2 */
+ "6", /* fleet move 3 */
+ "7", /* fleet move 4 */
+ "8", /* UFO/saucer hit */
+ "9", /* bonus base */
+ nullptr
+};
+
WRITE8_MEMBER(spaceg_state::sound1_w)
{
if (!BIT(m_sound1, 1) && BIT(data, 1))
@@ -500,7 +515,30 @@ static MACHINE_CONFIG_START( spaceg, spaceg_state )
MCFG_PALETTE_INIT_OWNER(spaceg_state, spaceg)
/* sound hardware */
- MCFG_FRAGMENT_ADD(invaders_samples_audio)
+ MCFG_SPEAKER_STANDARD_MONO("mono")
+
+ // HACK: SN76477 parameters copied from space invaders
+ MCFG_SOUND_ADD("snsnd", SN76477, 0)
+ MCFG_SN76477_NOISE_PARAMS(0, 0, 0) // noise + filter: N/C
+ MCFG_SN76477_DECAY_RES(0) // decay_res: N/C
+ MCFG_SN76477_ATTACK_PARAMS(0, RES_K(100)) // attack_decay_cap + attack_res
+ MCFG_SN76477_AMP_RES(RES_K(56)) // amplitude_res
+ MCFG_SN76477_FEEDBACK_RES(RES_K(10)) // feedback_res
+ MCFG_SN76477_VCO_PARAMS(0, CAP_U(0.1), RES_K(8.2)) // VCO volt + cap + res
+ MCFG_SN76477_PITCH_VOLTAGE(5.0) // pitch_voltage
+ MCFG_SN76477_SLF_PARAMS(CAP_U(1.0), RES_K(120)) // slf caps + res
+ MCFG_SN76477_ONESHOT_PARAMS(0, 0) // oneshot caps + res: N/C
+ MCFG_SN76477_VCO_MODE(1) // VCO mode
+ MCFG_SN76477_MIXER_PARAMS(0, 0, 0) // mixer A, B, C
+ MCFG_SN76477_ENVELOPE_PARAMS(1, 0) // envelope 1, 2
+ MCFG_SN76477_ENABLE(1) // enable
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5)
+
+ // HACK: samples copied from space invaders
+ MCFG_SOUND_ADD("samples", SAMPLES, 0)
+ MCFG_SAMPLES_CHANNELS(6)
+ MCFG_SAMPLES_NAMES(invaders_sample_names)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END