summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/audio/gottlieb.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/audio/gottlieb.cpp')
-rw-r--r--src/mame/audio/gottlieb.cpp29
1 files changed, 16 insertions, 13 deletions
diff --git a/src/mame/audio/gottlieb.cpp b/src/mame/audio/gottlieb.cpp
index 90cf2af226e..1ed3ca8af76 100644
--- a/src/mame/audio/gottlieb.cpp
+++ b/src/mame/audio/gottlieb.cpp
@@ -2,7 +2,7 @@
// copyright-holders:Aaron Giles
/***************************************************************************
- gottlieb.c
+ gottlieb.cpp
Gottlieb 6502-based sound hardware implementations.
@@ -115,10 +115,11 @@ INPUT_CHANGED_MEMBER( gottlieb_sound_r0_device::audio_nmi )
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(gottlieb_sound_r0_device::device_add_mconfig)
+void gottlieb_sound_r0_device::device_add_mconfig(machine_config &config)
+{
// audio CPU
- MCFG_DEVICE_ADD("audiocpu", M6502, SOUND1_CLOCK/4) // M6503 - clock is a gate, a resistor and a capacitor. Freq unknown.
- MCFG_DEVICE_PROGRAM_MAP(gottlieb_sound_r0_map)
+ M6502(config, m_audiocpu, SOUND1_CLOCK/4); // M6503 - clock is a gate, a resistor and a capacitor. Freq unknown.
+ m_audiocpu->set_addrmap(AS_PROGRAM, &gottlieb_sound_r0_device::gottlieb_sound_r0_map);
// I/O configuration
MOS6530(config, m_r6530, SOUND1_CLOCK/4); // unknown - same as cpu
@@ -126,12 +127,12 @@ MACHINE_CONFIG_START(gottlieb_sound_r0_device::device_add_mconfig)
m_r6530->in_pb_callback().set(FUNC(gottlieb_sound_r0_device::r6530b_r));
// sound devices
- MCFG_DEVICE_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, *this, 0.25) // unknown DAC
+ DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, *this, 0.25); // unknown DAC
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
vref.set_output(5.0);
vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
-MACHINE_CONFIG_END
+}
//-------------------------------------------------
@@ -245,10 +246,11 @@ INPUT_PORTS_END
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(gottlieb_sound_r1_device::device_add_mconfig)
+void gottlieb_sound_r1_device::device_add_mconfig(machine_config &config)
+{
// audio CPU
- MCFG_DEVICE_ADD("audiocpu", M6502, SOUND1_CLOCK/4) // the board can be set to /2 as well
- MCFG_DEVICE_PROGRAM_MAP(gottlieb_sound_r1_map)
+ m6502_device &audiocpu(M6502(config, "audiocpu", SOUND1_CLOCK/4)); // the board can be set to /2 as well
+ audiocpu.set_addrmap(AS_PROGRAM, &gottlieb_sound_r1_device::gottlieb_sound_r1_map);
INPUT_MERGER_ANY_HIGH(config, "nmi").output_handler().set_inputline("audiocpu", INPUT_LINE_NMI);
@@ -259,12 +261,12 @@ MACHINE_CONFIG_START(gottlieb_sound_r1_device::device_add_mconfig)
m_riot->irq_callback().set_inputline("audiocpu", M6502_IRQ_LINE);
// sound devices
- MCFG_DEVICE_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, *this, 0.25) // unknown DAC
+ DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, *this, 0.25); // unknown DAC
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
vref.set_output(5.0);
vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
-MACHINE_CONFIG_END
+}
//-------------------------------------------------
@@ -667,8 +669,9 @@ MACHINE_CONFIG_START(gottlieb_sound_r2_device::device_add_mconfig)
MCFG_DEVICE_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, *this, 0.075) // unknown DAC
MCFG_DEVICE_ADD("dacvol", DAC_8BIT_R2R, 0) // unknown DAC
MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dacvol", 1.0, DAC_VREF_POS_INPUT)
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.set_output(5.0);
+ vref.add_route(0, "dacvol", 1.0, DAC_VREF_POS_INPUT);
AY8913(config, m_ay1, SOUND2_CLOCK/2).add_route(ALL_OUTPUTS, *this, 0.15);