diff options
author | mooglyguy <therealmogminer@gmail.com> | 2018-12-20 05:36:31 +0100 |
---|---|---|
committer | mooglyguy <therealmogminer@gmail.com> | 2018-12-20 05:36:55 +0100 |
commit | 32650ee591aad59123d549770ee38b2f627b6236 (patch) | |
tree | a2a304a9cb28f3bf5394ba5e50edbffb5ce2d232 /src/mame/audio | |
parent | ef14630b0f6e1e6e0f87d1e309c195f9c1f4ae63 (diff) |
-bus/nes/jaleco, pt554, bus/nes_ctrl/ctrl, hori, joypad: Removed MCFG and MACHINE_CONFIG macros. [Ryan Holtz]
-sound/asc, lmc1992, nes_apu, samples, video/ppu2c0x, ppu2c0x_vt: Removed MCFG macros. [Ryan Holtz]
-audio/astrof, carnival, cclimber, cinemat, depthch, invinco, pulsar, spacefb, targ, tranqgun, turbo, vicdual
vicdual-97271p, zaxxon: Removed MACHINE_CONFIG macros. [Ryan Holtz]
-drivers/8080bw, astinvad, atarist, blockade, cham24, circus, cosmic, equites, famibox, gottlieb, gotya, gridlee,
homerun, m10, m14, m63, mcr, meadows, mmagic, multigam, mw8080bw, nes, nes_vt, ninjakd2, playch10,
safarir, segag80v, starcrus, starfire, suna8, super80, tankbatt, tattack, thief, tmnt, tnzs, triplhnt, vsnes: Removed MACHINE_CONFIG macros. [Ryan Holtz]
-machine/genpin, mm1kb: Removed MACHINE_CONFIG macros. [Ryan Holtz]
Diffstat (limited to 'src/mame/audio')
-rw-r--r-- | src/mame/audio/astrof.cpp | 13 | ||||
-rw-r--r-- | src/mame/audio/carnival.cpp | 14 | ||||
-rw-r--r-- | src/mame/audio/cclimber.cpp | 13 | ||||
-rw-r--r-- | src/mame/audio/cinemat.cpp | 169 | ||||
-rw-r--r-- | src/mame/audio/depthch.cpp | 14 | ||||
-rw-r--r-- | src/mame/audio/invinco.cpp | 14 | ||||
-rw-r--r-- | src/mame/audio/pulsar.cpp | 14 | ||||
-rw-r--r-- | src/mame/audio/spacefb.cpp | 23 | ||||
-rw-r--r-- | src/mame/audio/targ.cpp | 47 | ||||
-rw-r--r-- | src/mame/audio/tranqgun.cpp | 14 | ||||
-rw-r--r-- | src/mame/audio/turbo.cpp | 98 | ||||
-rw-r--r-- | src/mame/audio/vicdual-97271p.cpp | 13 | ||||
-rw-r--r-- | src/mame/audio/vicdual.cpp | 40 | ||||
-rw-r--r-- | src/mame/audio/zaxxon.cpp | 26 |
14 files changed, 269 insertions, 243 deletions
diff --git a/src/mame/audio/astrof.cpp b/src/mame/audio/astrof.cpp index 3969227b5d3..89e334a6672 100644 --- a/src/mame/audio/astrof.cpp +++ b/src/mame/audio/astrof.cpp @@ -139,13 +139,14 @@ static const char *const astrof_sample_names[] = nullptr }; -MACHINE_CONFIG_START(astrof_state::astrof_audio) +void astrof_state::astrof_audio(machine_config &config) +{ SPEAKER(config, "mono").front_center(); - MCFG_DEVICE_ADD("samples", SAMPLES) - MCFG_SAMPLES_CHANNELS(4) - MCFG_SAMPLES_NAMES(astrof_sample_names) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) -MACHINE_CONFIG_END + SAMPLES(config, m_samples); + m_samples->set_channels(4); + m_samples->set_samples_names(astrof_sample_names); + m_samples->add_route(ALL_OUTPUTS, "mono", 0.50); +} diff --git a/src/mame/audio/carnival.cpp b/src/mame/audio/carnival.cpp index c19f4d5a942..d3bc5db7cc7 100644 --- a/src/mame/audio/carnival.cpp +++ b/src/mame/audio/carnival.cpp @@ -197,8 +197,8 @@ void vicdual_state::mboard_map(address_map &map) } -MACHINE_CONFIG_START(vicdual_state::carnival_audio) - +void vicdual_state::carnival_audio(machine_config &config) +{ /* music board */ I8039(config, m_audiocpu, XTAL(3'579'545)); m_audiocpu->set_addrmap(AS_PROGRAM, &vicdual_state::mboard_map); @@ -209,8 +209,8 @@ MACHINE_CONFIG_START(vicdual_state::carnival_audio) AY8912(config, m_psg, XTAL(3'579'545)/3).add_route(ALL_OUTPUTS, "mono", 0.25); /* samples */ - MCFG_DEVICE_ADD("samples", SAMPLES) - MCFG_SAMPLES_CHANNELS(10) - MCFG_SAMPLES_NAMES(carnival_sample_names) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5) -MACHINE_CONFIG_END + SAMPLES(config, m_samples); + m_samples->set_channels(10); + m_samples->set_samples_names(carnival_sample_names); + m_samples->add_route(ALL_OUTPUTS, "mono", 0.5); +} diff --git a/src/mame/audio/cclimber.cpp b/src/mame/audio/cclimber.cpp index 1288bdae653..e09c01bd642 100644 --- a/src/mame/audio/cclimber.cpp +++ b/src/mame/audio/cclimber.cpp @@ -57,16 +57,17 @@ void cclimber_audio_device::device_start() // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_START(cclimber_audio_device::device_add_mconfig) +void cclimber_audio_device::device_add_mconfig(machine_config &config) +{ ay8910_device &aysnd(AY8910(config, "aysnd", SND_CLOCK/2)); aysnd.port_a_write_callback().set(FUNC(cclimber_audio_device::sample_select_w)); aysnd.add_route(ALL_OUTPUTS, ":speaker", 0.5); - MCFG_DEVICE_ADD("samples", SAMPLES) - MCFG_SAMPLES_CHANNELS(1) - MCFG_SAMPLES_START_CB(cclimber_audio_device, sh_start) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, ":speaker", 0.5) -MACHINE_CONFIG_END + SAMPLES(config, m_samples); + m_samples->set_channels(1); + m_samples->set_samples_start_callback(FUNC(cclimber_audio_device::sh_start)); + m_samples->add_route(ALL_OUTPUTS, ":speaker", 0.5); +} WRITE8_MEMBER(cclimber_audio_device::sample_select_w) diff --git a/src/mame/audio/cinemat.cpp b/src/mame/audio/cinemat.cpp index 5646df01736..e624ab6e8d5 100644 --- a/src/mame/audio/cinemat.cpp +++ b/src/mame/audio/cinemat.cpp @@ -147,7 +147,8 @@ WRITE_LINE_MEMBER(cinemat_state::spacewar_sound4_w) } } -MACHINE_CONFIG_START(cinemat_state::spacewar_sound) +void cinemat_state::spacewar_sound(machine_config &config) +{ m_outlatch->q_out_cb<0>().set(FUNC(cinemat_state::spacewar_sound0_w)); m_outlatch->q_out_cb<1>().set(FUNC(cinemat_state::spacewar_sound1_w)); m_outlatch->q_out_cb<2>().set(FUNC(cinemat_state::spacewar_sound2_w)); @@ -156,11 +157,11 @@ MACHINE_CONFIG_START(cinemat_state::spacewar_sound) SPEAKER(config, "mono").front_center(); - MCFG_DEVICE_ADD("samples", SAMPLES) - MCFG_SAMPLES_CHANNELS(8) - MCFG_SAMPLES_NAMES(spacewar_sample_names) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) -MACHINE_CONFIG_END + SAMPLES(config, m_samples); + m_samples->set_channels(8); + m_samples->set_samples_names(spacewar_sample_names); + m_samples->add_route(ALL_OUTPUTS, "mono", 0.50); +} @@ -200,18 +201,19 @@ WRITE_LINE_MEMBER(cinemat_state::barrier_sound2_w) m_samples->start(2, 2); } -MACHINE_CONFIG_START(cinemat_state::barrier_sound) +void cinemat_state::barrier_sound(machine_config &config) +{ m_outlatch->q_out_cb<0>().set(FUNC(cinemat_state::barrier_sound0_w)); m_outlatch->q_out_cb<1>().set(FUNC(cinemat_state::barrier_sound1_w)); m_outlatch->q_out_cb<2>().set(FUNC(cinemat_state::barrier_sound2_w)); SPEAKER(config, "mono").front_center(); - MCFG_DEVICE_ADD("samples", SAMPLES) - MCFG_SAMPLES_CHANNELS(3) - MCFG_SAMPLES_NAMES(barrier_sample_names) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) -MACHINE_CONFIG_END + SAMPLES(config, m_samples); + m_samples->set_channels(3); + m_samples->set_samples_names(barrier_sample_names); + m_samples->add_route(ALL_OUTPUTS, "mono", 0.50); +} @@ -256,18 +258,19 @@ WRITE_LINE_MEMBER(cinemat_state::speedfrk_start_led_w) m_led = !state; } -MACHINE_CONFIG_START(cinemat_state::speedfrk_sound) +void cinemat_state::speedfrk_sound(machine_config &config) +{ m_outlatch->q_out_cb<1>().set(FUNC(cinemat_state::speedfrk_start_led_w)); m_outlatch->q_out_cb<3>().set(FUNC(cinemat_state::speedfrk_sound3_w)); m_outlatch->q_out_cb<4>().set(FUNC(cinemat_state::speedfrk_sound4_w)); SPEAKER(config, "mono").front_center(); - MCFG_DEVICE_ADD("samples", SAMPLES) - MCFG_SAMPLES_CHANNELS(1) - MCFG_SAMPLES_NAMES(speedfrk_sample_names) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) -MACHINE_CONFIG_END + SAMPLES(config, m_samples); + m_samples->set_channels(1); + m_samples->set_samples_names(speedfrk_sample_names); + m_samples->add_route(ALL_OUTPUTS, "mono", 0.50); +} @@ -337,7 +340,8 @@ WRITE_LINE_MEMBER(cinemat_state::starhawk_sound7_w) m_samples->stop(3); } -MACHINE_CONFIG_START(cinemat_state::starhawk_sound) +void cinemat_state::starhawk_sound(machine_config &config) +{ m_outlatch->q_out_cb<0>().set(FUNC(cinemat_state::starhawk_sound0_w)); m_outlatch->q_out_cb<1>().set(FUNC(cinemat_state::starhawk_sound1_w)); m_outlatch->q_out_cb<2>().set(FUNC(cinemat_state::starhawk_sound2_w)); @@ -347,11 +351,11 @@ MACHINE_CONFIG_START(cinemat_state::starhawk_sound) SPEAKER(config, "mono").front_center(); - MCFG_DEVICE_ADD("samples", SAMPLES) - MCFG_SAMPLES_CHANNELS(5) - MCFG_SAMPLES_NAMES(starhawk_sample_names) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) -MACHINE_CONFIG_END + SAMPLES(config, m_samples); + m_samples->set_channels(5); + m_samples->set_samples_names(starhawk_sample_names); + m_samples->add_route(ALL_OUTPUTS, "mono", 0.50); +} @@ -415,7 +419,8 @@ WRITE_LINE_MEMBER(cinemat_16level_state::sundance_sound7_w) m_samples->start(5, 5); } -MACHINE_CONFIG_START(cinemat_16level_state::sundance_sound) +void cinemat_16level_state::sundance_sound(machine_config &config) +{ m_outlatch->q_out_cb<0>().set(FUNC(cinemat_16level_state::sundance_sound0_w)); m_outlatch->q_out_cb<1>().set(FUNC(cinemat_16level_state::sundance_sound1_w)); m_outlatch->q_out_cb<2>().set(FUNC(cinemat_16level_state::sundance_sound2_w)); @@ -425,11 +430,11 @@ MACHINE_CONFIG_START(cinemat_16level_state::sundance_sound) SPEAKER(config, "mono").front_center(); - MCFG_DEVICE_ADD("samples", SAMPLES) - MCFG_SAMPLES_CHANNELS(6) - MCFG_SAMPLES_NAMES(sundance_sample_names) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) -MACHINE_CONFIG_END + SAMPLES(config, m_samples); + m_samples->set_channels(6); + m_samples->set_samples_names(sundance_sample_names); + m_samples->add_route(ALL_OUTPUTS, "mono", 0.50); +} @@ -497,16 +502,17 @@ WRITE_LINE_MEMBER(cinemat_state::tailg_sound_w) } } -MACHINE_CONFIG_START(cinemat_state::tailg_sound) +void cinemat_state::tailg_sound(machine_config &config) +{ m_outlatch->q_out_cb<4>().set(FUNC(cinemat_state::tailg_sound_w)); SPEAKER(config, "mono").front_center(); - MCFG_DEVICE_ADD("samples", SAMPLES) - MCFG_SAMPLES_CHANNELS(6) - MCFG_SAMPLES_NAMES(tailg_sample_names) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) -MACHINE_CONFIG_END + SAMPLES(config, m_samples); + m_samples->set_channels(6); + m_samples->set_samples_names(tailg_sample_names); + m_samples->add_route(ALL_OUTPUTS, "mono", 0.50); +} @@ -566,7 +572,8 @@ WRITE_LINE_MEMBER(cinemat_state::warrior_sound4_w) m_samples->start(4, 4); } -MACHINE_CONFIG_START(cinemat_state::warrior_sound) +void cinemat_state::warrior_sound(machine_config &config) +{ m_outlatch->q_out_cb<0>().set(FUNC(cinemat_state::warrior_sound0_w)); m_outlatch->q_out_cb<1>().set(FUNC(cinemat_state::warrior_sound1_w)); m_outlatch->q_out_cb<2>().set(FUNC(cinemat_state::warrior_sound2_w)); @@ -575,11 +582,11 @@ MACHINE_CONFIG_START(cinemat_state::warrior_sound) SPEAKER(config, "mono").front_center(); - MCFG_DEVICE_ADD("samples", SAMPLES) - MCFG_SAMPLES_CHANNELS(5) - MCFG_SAMPLES_NAMES(warrior_sample_names) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) -MACHINE_CONFIG_END + SAMPLES(config, m_samples); + m_samples->set_channels(5); + m_samples->set_samples_names(warrior_sample_names); + m_samples->add_route(ALL_OUTPUTS, "mono", 0.50); +} @@ -665,7 +672,8 @@ WRITE_LINE_MEMBER(cinemat_state::armora_sound3_w) m_samples->stop(6); } -MACHINE_CONFIG_START(cinemat_state::armora_sound) +void cinemat_state::armora_sound(machine_config &config) +{ m_outlatch->q_out_cb<0>().set(FUNC(cinemat_state::armora_sound0_w)); m_outlatch->q_out_cb<1>().set(FUNC(cinemat_state::armora_sound1_w)); m_outlatch->q_out_cb<2>().set(FUNC(cinemat_state::armora_sound2_w)); @@ -674,11 +682,11 @@ MACHINE_CONFIG_START(cinemat_state::armora_sound) SPEAKER(config, "mono").front_center(); - MCFG_DEVICE_ADD("samples", SAMPLES) - MCFG_SAMPLES_CHANNELS(7) - MCFG_SAMPLES_NAMES(armora_sample_names) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) -MACHINE_CONFIG_END + SAMPLES(config, m_samples); + m_samples->set_channels(7); + m_samples->set_samples_names(armora_sample_names); + m_samples->add_route(ALL_OUTPUTS, "mono", 0.50); +} @@ -761,7 +769,8 @@ WRITE_LINE_MEMBER(cinemat_state::ripoff_sound7_w) m_samples->start(4, 4); } -MACHINE_CONFIG_START(cinemat_state::ripoff_sound) +void cinemat_state::ripoff_sound(machine_config &config) +{ m_outlatch->q_out_cb<1>().set(FUNC(cinemat_state::ripoff_sound1_w)); m_outlatch->q_out_cb<2>().set(FUNC(cinemat_state::ripoff_sound2_w)); m_outlatch->q_out_cb<3>().set(FUNC(cinemat_state::ripoff_sound3_w)); @@ -770,11 +779,11 @@ MACHINE_CONFIG_START(cinemat_state::ripoff_sound) SPEAKER(config, "mono").front_center(); - MCFG_DEVICE_ADD("samples", SAMPLES) - MCFG_SAMPLES_CHANNELS(6) - MCFG_SAMPLES_NAMES(ripoff_sample_names) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) -MACHINE_CONFIG_END + SAMPLES(config, m_samples); + m_samples->set_channels(6); + m_samples->set_samples_names(ripoff_sample_names); + m_samples->add_route(ALL_OUTPUTS, "mono", 0.50); +} @@ -877,7 +886,8 @@ WRITE_LINE_MEMBER(cinemat_state::starcas_sound3_w) m_samples->start(7, 7); } -MACHINE_CONFIG_START(cinemat_state::starcas_sound) +void cinemat_state::starcas_sound(machine_config &config) +{ m_outlatch->q_out_cb<0>().set(FUNC(cinemat_state::starcas_sound0_w)); m_outlatch->q_out_cb<1>().set(FUNC(cinemat_state::starcas_sound1_w)); m_outlatch->q_out_cb<2>().set(FUNC(cinemat_state::starcas_sound2_w)); @@ -886,11 +896,11 @@ MACHINE_CONFIG_START(cinemat_state::starcas_sound) SPEAKER(config, "mono").front_center(); - MCFG_DEVICE_ADD("samples", SAMPLES) - MCFG_SAMPLES_CHANNELS(8) - MCFG_SAMPLES_NAMES(starcas_sample_names) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5) -MACHINE_CONFIG_END + SAMPLES(config, m_samples); + m_samples->set_channels(8); + m_samples->set_samples_names(starcas_sample_names); + m_samples->add_route(ALL_OUTPUTS, "mono", 0.5); +} @@ -1010,18 +1020,19 @@ WRITE_LINE_MEMBER(cinemat_64level_state::solarq_sound0_w) } } -MACHINE_CONFIG_START(cinemat_64level_state::solarq_sound) +void cinemat_64level_state::solarq_sound(machine_config &config) +{ m_outlatch->q_out_cb<0>().set(FUNC(cinemat_64level_state::solarq_sound0_w)); m_outlatch->q_out_cb<1>().set(FUNC(cinemat_64level_state::solarq_sound1_w)); m_outlatch->q_out_cb<4>().set(FUNC(cinemat_64level_state::solarq_sound4_w)); SPEAKER(config, "mono").front_center(); - MCFG_DEVICE_ADD("samples", SAMPLES) - MCFG_SAMPLES_CHANNELS(8) - MCFG_SAMPLES_NAMES(solarq_sample_names) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5) -MACHINE_CONFIG_END + SAMPLES(config, m_samples); + m_samples->set_channels(8); + m_samples->set_samples_names(solarq_sample_names); + m_samples->add_route(ALL_OUTPUTS, "mono", 0.5); +} @@ -1147,7 +1158,8 @@ WRITE_LINE_MEMBER(cinemat_color_state::boxingb_sound3_w) m_samples->start(11, 11); } -MACHINE_CONFIG_START(cinemat_color_state::boxingb_sound) +void cinemat_color_state::boxingb_sound(machine_config &config) +{ m_outlatch->q_out_cb<0>().set(FUNC(cinemat_color_state::boxingb_sound0_w)); m_outlatch->q_out_cb<1>().set(FUNC(cinemat_color_state::boxingb_sound1_w)); m_outlatch->q_out_cb<2>().set(FUNC(cinemat_color_state::boxingb_sound2_w)); @@ -1156,11 +1168,11 @@ MACHINE_CONFIG_START(cinemat_color_state::boxingb_sound) SPEAKER(config, "mono").front_center(); - MCFG_DEVICE_ADD("samples", SAMPLES) - MCFG_SAMPLES_CHANNELS(12) - MCFG_SAMPLES_NAMES(boxingb_sample_names) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) -MACHINE_CONFIG_END + SAMPLES(config, m_samples); + m_samples->set_channels(12); + m_samples->set_samples_names(boxingb_sample_names); + m_samples->add_route(ALL_OUTPUTS, "mono", 0.50); +} @@ -1263,7 +1275,8 @@ WRITE_LINE_MEMBER(cinemat_state::wotw_sound3_w) m_samples->start(7, 7); } -MACHINE_CONFIG_START(cinemat_state::wotw_sound) +void cinemat_state::wotw_sound(machine_config &config) +{ m_outlatch->q_out_cb<0>().set(FUNC(cinemat_state::wotw_sound0_w)); m_outlatch->q_out_cb<1>().set(FUNC(cinemat_state::wotw_sound1_w)); m_outlatch->q_out_cb<2>().set(FUNC(cinemat_state::wotw_sound2_w)); @@ -1272,11 +1285,11 @@ MACHINE_CONFIG_START(cinemat_state::wotw_sound) SPEAKER(config, "mono").front_center(); - MCFG_DEVICE_ADD("samples", SAMPLES) - MCFG_SAMPLES_CHANNELS(8) - MCFG_SAMPLES_NAMES(wotw_sample_names) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) -MACHINE_CONFIG_END + SAMPLES(config, m_samples); + m_samples->set_channels(8); + m_samples->set_samples_names(wotw_sample_names); + m_samples->add_route(ALL_OUTPUTS, "mono", 0.50); +} diff --git a/src/mame/audio/depthch.cpp b/src/mame/audio/depthch.cpp index 15f92dfc617..fa91754e077 100644 --- a/src/mame/audio/depthch.cpp +++ b/src/mame/audio/depthch.cpp @@ -83,11 +83,11 @@ WRITE8_MEMBER( vicdual_state::depthch_audio_w ) } -MACHINE_CONFIG_START(vicdual_state::depthch_audio) - +void vicdual_state::depthch_audio(machine_config &config) +{ /* samples */ - MCFG_DEVICE_ADD("samples", SAMPLES) - MCFG_SAMPLES_CHANNELS(5) - MCFG_SAMPLES_NAMES(depthch_sample_names) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5) -MACHINE_CONFIG_END + SAMPLES(config, m_samples); + m_samples->set_channels(5); + m_samples->set_samples_names(depthch_sample_names); + m_samples->add_route(ALL_OUTPUTS, "mono", 0.5); +} diff --git a/src/mame/audio/invinco.cpp b/src/mame/audio/invinco.cpp index 22a51709079..bf0811b2209 100644 --- a/src/mame/audio/invinco.cpp +++ b/src/mame/audio/invinco.cpp @@ -94,11 +94,11 @@ WRITE8_MEMBER( vicdual_state::invinco_audio_w ) } -MACHINE_CONFIG_START(vicdual_state::invinco_audio) - +void vicdual_state::invinco_audio(machine_config &config) +{ /* samples */ - MCFG_DEVICE_ADD("samples", SAMPLES) - MCFG_SAMPLES_CHANNELS(8) - MCFG_SAMPLES_NAMES(invinco_sample_names) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5) -MACHINE_CONFIG_END + SAMPLES(config, m_samples); + m_samples->set_channels(8); + m_samples->set_samples_names(invinco_sample_names); + m_samples->add_route(ALL_OUTPUTS, "mono", 0.5); +} diff --git a/src/mame/audio/pulsar.cpp b/src/mame/audio/pulsar.cpp index 1aae442a9ae..63daee06b11 100644 --- a/src/mame/audio/pulsar.cpp +++ b/src/mame/audio/pulsar.cpp @@ -171,11 +171,11 @@ WRITE8_MEMBER( vicdual_state::pulsar_audio_2_w ) } -MACHINE_CONFIG_START(vicdual_state::pulsar_audio) - +void vicdual_state::pulsar_audio(machine_config &config) +{ /* samples */ - MCFG_DEVICE_ADD("samples", SAMPLES) - MCFG_SAMPLES_CHANNELS(12) - MCFG_SAMPLES_NAMES(pulsar_sample_names) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5) -MACHINE_CONFIG_END + SAMPLES(config, m_samples); + m_samples->set_channels(12); + m_samples->set_samples_names(pulsar_sample_names); + m_samples->add_route(ALL_OUTPUTS, "mono", 0.5); +} diff --git a/src/mame/audio/spacefb.cpp b/src/mame/audio/spacefb.cpp index 3128fd58a13..a6e3055d130 100644 --- a/src/mame/audio/spacefb.cpp +++ b/src/mame/audio/spacefb.cpp @@ -77,14 +77,17 @@ static const char *const spacefb_sample_names[] = }; -MACHINE_CONFIG_START(spacefb_state::spacefb_audio) +void spacefb_state::spacefb_audio(machine_config &config) +{ SPEAKER(config, "speaker").front_center(); - MCFG_DEVICE_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC - MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) - 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("samples", SAMPLES) - MCFG_SAMPLES_CHANNELS(3) - MCFG_SAMPLES_NAMES(spacefb_sample_names) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) -MACHINE_CONFIG_END + DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC + 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); + vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT); + + SAMPLES(config, m_samples); + m_samples->set_channels(3); + m_samples->set_samples_names(spacefb_sample_names); + m_samples->add_route(ALL_OUTPUTS, "speaker", 1.0); +} 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); +} diff --git a/src/mame/audio/tranqgun.cpp b/src/mame/audio/tranqgun.cpp index 40c320ca967..c63845f5097 100644 --- a/src/mame/audio/tranqgun.cpp +++ b/src/mame/audio/tranqgun.cpp @@ -140,11 +140,11 @@ WRITE8_MEMBER( vicdual_state::tranqgun_audio_w ) } -MACHINE_CONFIG_START(vicdual_state::tranqgun_audio) - +void vicdual_state::tranqgun_audio(machine_config &config) +{ /* samples */ - MCFG_DEVICE_ADD("samples", SAMPLES) - MCFG_SAMPLES_CHANNELS(8) - MCFG_SAMPLES_NAMES(tranqgun_sample_names) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5) -MACHINE_CONFIG_END + SAMPLES(config, m_samples); + m_samples->set_channels(8); + m_samples->set_samples_names(tranqgun_sample_names); + m_samples->add_route(ALL_OUTPUTS, "mono", 0.5); +} diff --git a/src/mame/audio/turbo.cpp b/src/mame/audio/turbo.cpp index 08fd950006d..642e924a4c6 100644 --- a/src/mame/audio/turbo.cpp +++ b/src/mame/audio/turbo.cpp @@ -183,53 +183,53 @@ static const char *const turbo_sample_names[] = }; -MACHINE_CONFIG_START(turbo_state::turbo_samples) - +void turbo_state::turbo_samples(machine_config &config) +{ /* this is the cockpit speaker configuration */ SPEAKER(config, "fspeaker", 0.0, 0.0, 1.0); // front SPEAKER(config, "bspeaker", 0.0, 0.0, -0.5); // back SPEAKER(config, "lspeaker", -0.2, 0.0, 1.0); // left SPEAKER(config, "rspeaker", 0.2, 0.0, 1.0); // right - MCFG_DEVICE_ADD("samples", SAMPLES) - MCFG_SAMPLES_CHANNELS(10) - MCFG_SAMPLES_NAMES(turbo_sample_names) + SAMPLES(config, m_samples); + m_samples->set_channels(10); + m_samples->set_samples_names(turbo_sample_names); /* channel 0 = CRASH.S -> CRASH.S/SM */ - MCFG_SOUND_ROUTE(0, "fspeaker", 0.25) + m_samples->add_route(0, "fspeaker", 0.25); /* channel 1 = TRIG1-4 -> ALARM.M/F/R/L */ - MCFG_SOUND_ROUTE(1, "fspeaker", 0.25) - MCFG_SOUND_ROUTE(1, "rspeaker", 0.25) - MCFG_SOUND_ROUTE(1, "lspeaker", 0.25) + m_samples->add_route(1, "fspeaker", 0.25); + m_samples->add_route(1, "rspeaker", 0.25); + m_samples->add_route(1, "lspeaker", 0.25); /* channel 2 = SLIP/SPIN -> SKID.F/R/L/M */ - MCFG_SOUND_ROUTE(2, "fspeaker", 0.25) - MCFG_SOUND_ROUTE(2, "rspeaker", 0.25) - MCFG_SOUND_ROUTE(2, "lspeaker", 0.25) + m_samples->add_route(2, "fspeaker", 0.25); + m_samples->add_route(2, "rspeaker", 0.25); + m_samples->add_route(2, "lspeaker", 0.25); /* channel 3 = CRASH.L -> CRASH.L/LM */ - MCFG_SOUND_ROUTE(3, "bspeaker", 0.25) + m_samples->add_route(3, "bspeaker", 0.25); /* channel 4 = AMBU -> AMBULANCE/AMBULANCE.M */ - MCFG_SOUND_ROUTE(4, "fspeaker", 0.25) + m_samples->add_route(4, "fspeaker", 0.25); /* channel 5 = ACCEL+BSEL -> MYCAR.F/W/M + MYCAR0.F/M + MYCAR1.F/M */ - MCFG_SOUND_ROUTE(5, "fspeaker", 0.25) - MCFG_SOUND_ROUTE(5, "bspeaker", 0.25) + m_samples->add_route(5, "fspeaker", 0.25); + m_samples->add_route(5, "bspeaker", 0.25); /* channel 6 = OSEL -> OCAR.F/FM */ - MCFG_SOUND_ROUTE(6, "fspeaker", 0.25) + m_samples->add_route(6, "fspeaker", 0.25); /* channel 7 = OSEL -> OCAR.L/LM */ - MCFG_SOUND_ROUTE(7, "lspeaker", 0.25) + m_samples->add_route(7, "lspeaker", 0.25); /* channel 8 = OSEL -> OCAR.R/RM */ - MCFG_SOUND_ROUTE(8, "rspeaker", 0.25) + m_samples->add_route(8, "rspeaker", 0.25); /* channel 9 = OSEL -> OCAR.W/WM */ - MCFG_SOUND_ROUTE(9, "bspeaker", 0.25) -MACHINE_CONFIG_END + m_samples->add_route(9, "bspeaker", 0.25); +} /* Cockpit: CN2 1+2 -> FRONT @@ -429,46 +429,47 @@ static const char *const subroc3d_sample_names[] = nullptr }; -MACHINE_CONFIG_START(turbo_state::subroc3d_samples) +void turbo_state::subroc3d_samples(machine_config &config) +{ SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - MCFG_DEVICE_ADD("samples", SAMPLES) - MCFG_SAMPLES_CHANNELS(12) - MCFG_SAMPLES_NAMES(subroc3d_sample_names) + SAMPLES(config, m_samples); + m_samples->set_channels(12); + m_samples->set_samples_names(subroc3d_sample_names); /* MISSILE in channels 0 and 1 */ - MCFG_SOUND_ROUTE(0, "lspeaker", 0.25) - MCFG_SOUND_ROUTE(1, "rspeaker", 0.25) + m_samples->add_route(0, "lspeaker", 0.25); + m_samples->add_route(1, "rspeaker", 0.25); /* TORPEDO in channels 2 and 3 */ - MCFG_SOUND_ROUTE(2, "lspeaker", 0.25) - MCFG_SOUND_ROUTE(3, "rspeaker", 0.25) + m_samples->add_route(2, "lspeaker", 0.25); + m_samples->add_route(3, "rspeaker", 0.25); /* FIGHTER in channels 4 and 5 */ - MCFG_SOUND_ROUTE(4, "lspeaker", 0.25) - MCFG_SOUND_ROUTE(5, "rspeaker", 0.25) + m_samples->add_route(4, "lspeaker", 0.25); + m_samples->add_route(5, "rspeaker", 0.25); /* HIT in channels 6 and 7 */ - MCFG_SOUND_ROUTE(6, "lspeaker", 0.25) - MCFG_SOUND_ROUTE(7, "rspeaker", 0.25) + m_samples->add_route(6, "lspeaker", 0.25); + m_samples->add_route(7, "rspeaker", 0.25); /* FIRE sound in channel 8 */ - MCFG_SOUND_ROUTE(8, "lspeaker", 0.25) - MCFG_SOUND_ROUTE(8, "rspeaker", 0.25) + m_samples->add_route(8, "lspeaker", 0.25); + m_samples->add_route(8, "rspeaker", 0.25); /* SHIP EXP sound in channel 9 */ - MCFG_SOUND_ROUTE(9, "lspeaker", 0.25) - MCFG_SOUND_ROUTE(9, "rspeaker", 0.25) + m_samples->add_route(9, "lspeaker", 0.25); + m_samples->add_route(9, "rspeaker", 0.25); /* ALARM TRIG sound in channel 10 */ - MCFG_SOUND_ROUTE(10, "lspeaker", 0.25) - MCFG_SOUND_ROUTE(10, "rspeaker", 0.25) + m_samples->add_route(10, "lspeaker", 0.25); + m_samples->add_route(10, "rspeaker", 0.25); /* PROLOGUE sound in channel 11 */ - MCFG_SOUND_ROUTE(11, "lspeaker", 0.25) - MCFG_SOUND_ROUTE(11, "rspeaker", 0.25) -MACHINE_CONFIG_END + m_samples->add_route(11, "lspeaker", 0.25); + m_samples->add_route(11, "rspeaker", 0.25); +} @@ -575,13 +576,14 @@ static const char *const buckrog_sample_names[]= }; -MACHINE_CONFIG_START(turbo_state::buckrog_samples) +void turbo_state::buckrog_samples(machine_config &config) +{ SPEAKER(config, "mono").front_center(); - MCFG_DEVICE_ADD("samples", SAMPLES) - MCFG_SAMPLES_CHANNELS(6) - MCFG_SAMPLES_NAMES(buckrog_sample_names) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) -MACHINE_CONFIG_END + SAMPLES(config, m_samples); + m_samples->set_channels(6); + m_samples->set_samples_names(buckrog_sample_names); + m_samples->add_route(ALL_OUTPUTS, "mono", 0.25); +} diff --git a/src/mame/audio/vicdual-97271p.cpp b/src/mame/audio/vicdual-97271p.cpp index 6daeb676d89..6d202e73a15 100644 --- a/src/mame/audio/vicdual-97271p.cpp +++ b/src/mame/audio/vicdual-97271p.cpp @@ -86,15 +86,16 @@ s97271p_device::s97271p_device(const machine_config &mconfig, const char *tag, d // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_START(s97271p_device::device_add_mconfig) +void s97271p_device::device_add_mconfig(machine_config &config) +{ SPEAKER(config, "mono").front_center(); /* samples */ - MCFG_DEVICE_ADD("samples", SAMPLES) - MCFG_SAMPLES_CHANNELS(13) - MCFG_SAMPLES_NAMES(nsub_sample_names) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5) -MACHINE_CONFIG_END + SAMPLES(config, m_samples); + m_samples->set_channels(13); + m_samples->set_samples_names(nsub_sample_names); + m_samples->add_route(ALL_OUTPUTS, "mono", 0.5); +} //------------------------------------------------- // device_start - device-specific startup diff --git a/src/mame/audio/vicdual.cpp b/src/mame/audio/vicdual.cpp index e0ab608bd7b..8a21e9fd788 100644 --- a/src/mame/audio/vicdual.cpp +++ b/src/mame/audio/vicdual.cpp @@ -111,15 +111,16 @@ static const char *const frogs_sample_names[] = }; -MACHINE_CONFIG_START(vicdual_state::frogs_audio) - MCFG_DEVICE_ADD("samples", SAMPLES) - MCFG_SAMPLES_CHANNELS(5) - MCFG_SAMPLES_NAMES(frogs_sample_names) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.35) +void vicdual_state::frogs_audio(machine_config &config) +{ + SAMPLES(config, m_samples); + m_samples->set_channels(5); + m_samples->set_samples_names(frogs_sample_names); + m_samples->add_route(ALL_OUTPUTS, "mono", 0.35); - MCFG_DEVICE_ADD("discrete", DISCRETE, frogs_discrete) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) -MACHINE_CONFIG_END + DISCRETE(config, m_discrete, frogs_discrete); + m_discrete->add_route(ALL_OUTPUTS, "mono", 1.0); +} TIMER_CALLBACK_MEMBER( vicdual_state::frogs_croak_callback ) @@ -444,11 +445,11 @@ static DISCRETE_SOUND_START(headon_discrete) DISCRETE_SOUND_END -MACHINE_CONFIG_START(vicdual_state::headon_audio) - - MCFG_DEVICE_ADD("discrete", DISCRETE, headon_discrete) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) -MACHINE_CONFIG_END +void vicdual_state::headon_audio(machine_config &config) +{ + DISCRETE(config, m_discrete, headon_discrete); + m_discrete->add_route(ALL_OUTPUTS, "mono", 1.0); +} WRITE8_MEMBER( vicdual_state::headon_audio_w ) { @@ -590,12 +591,13 @@ static const char *const brdrline_sample_names[] = }; -MACHINE_CONFIG_START(vicdual_state::brdrline_audio) - MCFG_DEVICE_ADD("samples", SAMPLES) - MCFG_SAMPLES_CHANNELS(7) - MCFG_SAMPLES_NAMES(brdrline_sample_names) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.35) -MACHINE_CONFIG_END +void vicdual_state::brdrline_audio(machine_config &config) +{ + SAMPLES(config, m_samples); + m_samples->set_channels(7); + m_samples->set_samples_names(brdrline_sample_names); + m_samples->add_route(ALL_OUTPUTS, "mono", 0.35); +} WRITE8_MEMBER( vicdual_state::brdrline_audio_w ) { diff --git a/src/mame/audio/zaxxon.cpp b/src/mame/audio/zaxxon.cpp index 8220bf1885f..cada06e9bc0 100644 --- a/src/mame/audio/zaxxon.cpp +++ b/src/mame/audio/zaxxon.cpp @@ -92,12 +92,13 @@ static const char *const zaxxon_sample_names[] = }; -MACHINE_CONFIG_START(zaxxon_state::zaxxon_samples) - MCFG_DEVICE_ADD("samples", SAMPLES) - MCFG_SAMPLES_CHANNELS(12) - MCFG_SAMPLES_NAMES(zaxxon_sample_names) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) -MACHINE_CONFIG_END +void zaxxon_state::zaxxon_samples(machine_config &config) +{ + SAMPLES(config, m_samples); + m_samples->set_channels(12); + m_samples->set_samples_names(zaxxon_sample_names); + m_samples->add_route(ALL_OUTPUTS, "speaker", 0.25); +} @@ -192,12 +193,13 @@ static const char *const congo_sample_names[] = }; -MACHINE_CONFIG_START(zaxxon_state::congo_samples) - MCFG_DEVICE_ADD("samples", SAMPLES) - MCFG_SAMPLES_CHANNELS(5) - MCFG_SAMPLES_NAMES(congo_sample_names) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) -MACHINE_CONFIG_END +void zaxxon_state::congo_samples(machine_config &config) +{ + SAMPLES(config, m_samples); + m_samples->set_channels(5); + m_samples->set_samples_names(congo_sample_names); + m_samples->add_route(ALL_OUTPUTS, "speaker", 0.25); +} |