diff options
Diffstat (limited to 'src/mame/audio/targ.cpp')
-rw-r--r-- | src/mame/audio/targ.cpp | 47 |
1 files changed, 24 insertions, 23 deletions
diff --git a/src/mame/audio/targ.cpp b/src/mame/audio/targ.cpp index 11320a14ba9..77d2c1fb150 100644 --- a/src/mame/audio/targ.cpp +++ b/src/mame/audio/targ.cpp @@ -176,33 +176,34 @@ SAMPLES_START_CB_MEMBER(exidy_state::targ_audio_start) } -MACHINE_CONFIG_START(exidy_state::spectar_audio) - +void exidy_state::spectar_audio(machine_config &config) +{ SPEAKER(config, "speaker").front_center(); - MCFG_DEVICE_ADD("samples", SAMPLES) - MCFG_SAMPLES_CHANNELS(4) - MCFG_SAMPLES_NAMES(sample_names) - MCFG_SAMPLES_START_CB(exidy_state, spectar_audio_start) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) - - MCFG_DEVICE_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.99) - MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) - MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT) -MACHINE_CONFIG_END - + SAMPLES(config, m_samples); + m_samples->set_channels(4); + m_samples->set_samples_names(sample_names); + m_samples->set_samples_start_callback(FUNC(exidy_state::spectar_audio_start)); + m_samples->add_route(ALL_OUTPUTS, "speaker", 0.25); -MACHINE_CONFIG_START(exidy_state::targ_audio) + DAC_1BIT(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.99); + voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref", 0)); + vref.set_output(5.0); + vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT); +} +void exidy_state::targ_audio(machine_config &config) +{ SPEAKER(config, "speaker").front_center(); - MCFG_DEVICE_ADD("samples", SAMPLES) - MCFG_SAMPLES_CHANNELS(4) - MCFG_SAMPLES_NAMES(sample_names) - MCFG_SAMPLES_START_CB(exidy_state, targ_audio_start) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) + SAMPLES(config, m_samples); + m_samples->set_channels(4); + m_samples->set_samples_names(sample_names); + m_samples->set_samples_start_callback(FUNC(exidy_state::targ_audio_start)); + m_samples->add_route(ALL_OUTPUTS, "speaker", 0.25); - MCFG_DEVICE_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.99) - MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) - MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT) -MACHINE_CONFIG_END + DAC_1BIT(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.99); + voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref", 0)); + vref.set_output(5.0); + vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT); +} |