diff options
author | Olivier Galibert <galibert@pobox.com> | 2018-01-07 22:20:14 +0100 |
---|---|---|
committer | Olivier Galibert <galibert@pobox.com> | 2018-01-17 16:11:18 +0100 |
commit | d469cc04bcace0f601802301caeddc5b473b75f2 (patch) | |
tree | a9d71540c9c69cee5ab3a533476b81833fa02f5f /src/mame/audio | |
parent | 9f383f76ce6f00cc3320e5ba53dc323781e0077b (diff) |
API Change: Machine configs are now a method of the owner class, and the prototype is simplified [O. Galibert]
Beware, the device context does not follow in MCFG_FRAGMENT_ADD
anymore due to the prototype change. So creating a device then
configuring through a fragment doesn't work as-is. The simplest
solution is just to add a MCFG_DEVICE_MODIFY at the start of the
fragment with the correct tag.
Diffstat (limited to 'src/mame/audio')
81 files changed, 234 insertions, 267 deletions
diff --git a/src/mame/audio/alesis.cpp b/src/mame/audio/alesis.cpp index 83eb55712fd..e677c3b8ebe 100644 --- a/src/mame/audio/alesis.cpp +++ b/src/mame/audio/alesis.cpp @@ -41,7 +41,7 @@ alesis_dm3ag_device::alesis_dm3ag_device(const machine_config &mconfig, const ch // device_add_mconfig //------------------------------------------------- -MACHINE_CONFIG_MEMBER( alesis_dm3ag_device::device_add_mconfig ) +MACHINE_CONFIG_START(alesis_dm3ag_device::device_add_mconfig) MCFG_SPEAKER_STANDARD_STEREO("lspeaker1", "rspeaker1") MCFG_SPEAKER_STANDARD_STEREO("lspeaker2", "rspeaker2") MCFG_SOUND_ADD("dac", PCM54HP, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker1", 1.0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker1", 1.0) // PCM54HP DAC + R63/R73-75 + Sample and hold diff --git a/src/mame/audio/asteroid.cpp b/src/mame/audio/asteroid.cpp index 3bce9a4ca31..6c8b0400070 100644 --- a/src/mame/audio/asteroid.cpp +++ b/src/mame/audio/asteroid.cpp @@ -315,7 +315,7 @@ WRITE8_MEMBER(asteroid_state::asteroid_noise_reset_w) } -MACHINE_CONFIG_START(asteroid_sound) +MACHINE_CONFIG_START(asteroid_state::asteroid_sound) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("discrete", DISCRETE, 0) @@ -332,7 +332,7 @@ MACHINE_CONFIG_START(asteroid_sound) MACHINE_CONFIG_END -MACHINE_CONFIG_START(astdelux_sound) +MACHINE_CONFIG_START(asteroid_state::astdelux_sound) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("discrete", DISCRETE, 0) diff --git a/src/mame/audio/astrof.cpp b/src/mame/audio/astrof.cpp index aaa3a40f147..a1339992889 100644 --- a/src/mame/audio/astrof.cpp +++ b/src/mame/audio/astrof.cpp @@ -139,7 +139,7 @@ static const char *const astrof_sample_names[] = nullptr }; -MACHINE_CONFIG_START( astrof_audio ) +MACHINE_CONFIG_START(astrof_state::astrof_audio) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("samples", SAMPLES, 0) MCFG_SAMPLES_CHANNELS(4) @@ -161,7 +161,7 @@ WRITE8_MEMBER(astrof_state::spfghmk2_audio_w) } -MACHINE_CONFIG_START( spfghmk2_audio ) +MACHINE_CONFIG_START(astrof_state::spfghmk2_audio) /* nothing yet */ MACHINE_CONFIG_END @@ -195,7 +195,7 @@ WRITE8_MEMBER(astrof_state::tomahawk_audio_w) } -MACHINE_CONFIG_START( tomahawk_audio ) +MACHINE_CONFIG_START(astrof_state::tomahawk_audio) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("snsnd", SN76477, 0) MCFG_SN76477_NOISE_PARAMS(0, 0, 0) // noise + filter: N/C diff --git a/src/mame/audio/atarijsa.cpp b/src/mame/audio/atarijsa.cpp index 2202b74b21c..e3bf8c08acc 100644 --- a/src/mame/audio/atarijsa.cpp +++ b/src/mame/audio/atarijsa.cpp @@ -691,7 +691,7 @@ WRITE8_MEMBER( atari_jsa_i_device::pokey_w ) //------------------------------------------------- // Fully populated JSA-I, not used by anyone -MACHINE_CONFIG_MEMBER( atari_jsa_i_device::device_add_mconfig ) +MACHINE_CONFIG_START(atari_jsa_i_device::device_add_mconfig) // basic machine hardware MCFG_CPU_ADD("cpu", M6502, JSA_MASTER_CLOCK/2) @@ -821,7 +821,7 @@ READ8_MEMBER( atari_jsa_ii_device::rdio_r ) //------------------------------------------------- // Fully populated JSA-II -MACHINE_CONFIG_MEMBER( atari_jsa_ii_device::device_add_mconfig ) +MACHINE_CONFIG_START(atari_jsa_ii_device::device_add_mconfig) // basic machine hardware MCFG_CPU_ADD("cpu", M6502, JSA_MASTER_CLOCK/2) @@ -903,7 +903,7 @@ READ8_MEMBER( atari_jsa_iii_device::rdio_r ) //------------------------------------------------- // Fully populated JSA-III -MACHINE_CONFIG_MEMBER( atari_jsa_iii_device::device_add_mconfig ) +MACHINE_CONFIG_START(atari_jsa_iii_device::device_add_mconfig) // basic machine hardware MCFG_CPU_ADD("cpu", M6502, JSA_MASTER_CLOCK/2) @@ -955,7 +955,7 @@ atari_jsa_iiis_device::atari_jsa_iiis_device(const machine_config &mconfig, cons //------------------------------------------------- // Fully populated JSA_IIIs -MACHINE_CONFIG_MEMBER( atari_jsa_iiis_device::device_add_mconfig ) +MACHINE_CONFIG_START(atari_jsa_iiis_device::device_add_mconfig) atari_jsa_iii_device::device_add_mconfig(config); diff --git a/src/mame/audio/avalnche.cpp b/src/mame/audio/avalnche.cpp index 6d01a99077d..aaea71a4298 100644 --- a/src/mame/audio/avalnche.cpp +++ b/src/mame/audio/avalnche.cpp @@ -103,7 +103,7 @@ static DISCRETE_SOUND_START(avalnche) DISCRETE_SOUND_END -MACHINE_CONFIG_START( avalnche_sound ) +MACHINE_CONFIG_START(avalnche_state::avalnche_sound) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("discrete", DISCRETE, 0) @@ -118,7 +118,7 @@ MACHINE_CONFIG_START( avalnche_sound ) MACHINE_CONFIG_END -MACHINE_CONFIG_START( catch_sound ) // just a stub here... +MACHINE_CONFIG_START(avalnche_state::acatch_sound) // just a stub here... MCFG_DEVICE_MODIFY("latch") MCFG_ADDRESSABLE_LATCH_Q1_OUT_CB(NOOP) // It is attract_enable just like avalnche, but not hooked up yet. MCFG_ADDRESSABLE_LATCH_Q4_OUT_CB(WRITELINE(avalnche_state, catch_aud0_w)) diff --git a/src/mame/audio/bwidow.cpp b/src/mame/audio/bwidow.cpp index 5a1849dd6ee..4d0a656d410 100644 --- a/src/mame/audio/bwidow.cpp +++ b/src/mame/audio/bwidow.cpp @@ -148,7 +148,7 @@ static DISCRETE_SOUND_START(gravitar) DISCRETE_SOUND_END -MACHINE_CONFIG_START( bwidow_audio ) +MACHINE_CONFIG_START(bwidow_state::bwidow_audio) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") @@ -171,7 +171,7 @@ MACHINE_CONFIG_START( bwidow_audio ) MACHINE_CONFIG_END -MACHINE_CONFIG_START( gravitar_audio ) +MACHINE_CONFIG_START(bwidow_state::gravitar_audio) MCFG_SOUND_MODIFY("pokey1") MCFG_POKEY_OUTPUT_OPAMP_LOW_PASS(BW_R51, GRAV_C34, 5.0) /* BW_C31 ignored */ diff --git a/src/mame/audio/bzone.cpp b/src/mame/audio/bzone.cpp index bde95d02d83..3bbc89835a0 100644 --- a/src/mame/audio/bzone.cpp +++ b/src/mame/audio/bzone.cpp @@ -397,7 +397,7 @@ WRITE8_MEMBER(bzone_state::bzone_sounds_w) } -MACHINE_CONFIG_START( bzone_audio ) +MACHINE_CONFIG_START(bzone_state::bzone_audio) MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/audio/cage.cpp b/src/mame/audio/cage.cpp index 25dc7c05304..4114c484ad5 100644 --- a/src/mame/audio/cage.cpp +++ b/src/mame/audio/cage.cpp @@ -623,7 +623,7 @@ ADDRESS_MAP_END // machine_add_config - add device configuration //------------------------------------------------- -MACHINE_CONFIG_MEMBER( atari_cage_device::device_add_mconfig ) +MACHINE_CONFIG_START(atari_cage_device::device_add_mconfig) /* basic machine hardware */ MCFG_CPU_ADD("cage", TMS32031, 33868800) @@ -679,7 +679,7 @@ atari_cage_seattle_device::atari_cage_seattle_device(const machine_config &mconf //------------------------------------------------- -MACHINE_CONFIG_MEMBER( atari_cage_seattle_device::device_add_mconfig ) +MACHINE_CONFIG_START(atari_cage_seattle_device::device_add_mconfig) atari_cage_device::device_add_mconfig(config); diff --git a/src/mame/audio/carnival.cpp b/src/mame/audio/carnival.cpp index 28aa4ffd5e0..c7717802963 100644 --- a/src/mame/audio/carnival.cpp +++ b/src/mame/audio/carnival.cpp @@ -196,7 +196,7 @@ static ADDRESS_MAP_START( mboard_map, AS_PROGRAM, 8, vicdual_state ) ADDRESS_MAP_END -MACHINE_CONFIG_START( carnival_audio ) +MACHINE_CONFIG_START(vicdual_state::carnival_audio) /* music board */ MCFG_CPU_ADD("audiocpu", I8039, XTAL_3_579545MHz) diff --git a/src/mame/audio/carnival.h b/src/mame/audio/carnival.h deleted file mode 100644 index 299d1e0e896..00000000000 --- a/src/mame/audio/carnival.h +++ /dev/null @@ -1,4 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Zsolt Vasvari, hap - -MACHINE_CONFIG_EXTERN( carnival_audio ); diff --git a/src/mame/audio/cclimber.cpp b/src/mame/audio/cclimber.cpp index ba6fe7bd70f..e29bc52071e 100644 --- a/src/mame/audio/cclimber.cpp +++ b/src/mame/audio/cclimber.cpp @@ -57,7 +57,7 @@ void cclimber_audio_device::device_start() // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_MEMBER( cclimber_audio_device::device_add_mconfig ) +MACHINE_CONFIG_START(cclimber_audio_device::device_add_mconfig) MCFG_SOUND_ADD("aysnd", AY8910, SND_CLOCK/2) MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(cclimber_audio_device, sample_select_w)) MCFG_SOUND_ROUTE(ALL_OUTPUTS, ":speaker", 0.5) diff --git a/src/mame/audio/cheekyms.cpp b/src/mame/audio/cheekyms.cpp index 59687742be4..0ffa15a1079 100644 --- a/src/mame/audio/cheekyms.cpp +++ b/src/mame/audio/cheekyms.cpp @@ -37,7 +37,7 @@ WRITE_LINE_MEMBER(cheekyms_audio_device::pest_dies_w) { m_pest_dies->write_lin WRITE_LINE_MEMBER(cheekyms_audio_device::coin_extra_w) { m_coin_extra->write_line(state); } -MACHINE_CONFIG_MEMBER(cheekyms_audio_device::device_add_mconfig) +MACHINE_CONFIG_START(cheekyms_audio_device::device_add_mconfig) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("sound_nl", NETLIST_SOUND, 48000) diff --git a/src/mame/audio/cinemat.cpp b/src/mame/audio/cinemat.cpp index 7897c1e5eee..8211e4d2c39 100644 --- a/src/mame/audio/cinemat.cpp +++ b/src/mame/audio/cinemat.cpp @@ -151,7 +151,7 @@ WRITE_LINE_MEMBER(cinemat_state::spacewar_sound4_w) } } -MACHINE_CONFIG_START( spacewar_sound ) +MACHINE_CONFIG_START(cinemat_state::spacewar_sound) MCFG_DEVICE_MODIFY("outlatch") MCFG_ADDRESSABLE_LATCH_Q0_OUT_CB(WRITELINE(cinemat_state, spacewar_sound0_w)) MCFG_ADDRESSABLE_LATCH_Q1_OUT_CB(WRITELINE(cinemat_state, spacewar_sound1_w)) @@ -205,7 +205,7 @@ WRITE_LINE_MEMBER(cinemat_state::barrier_sound2_w) m_samples->start(2, 2); } -MACHINE_CONFIG_START( barrier_sound ) +MACHINE_CONFIG_START(cinemat_state::barrier_sound) MCFG_DEVICE_MODIFY("outlatch") MCFG_ADDRESSABLE_LATCH_Q0_OUT_CB(WRITELINE(cinemat_state, barrier_sound0_w)) MCFG_ADDRESSABLE_LATCH_Q1_OUT_CB(WRITELINE(cinemat_state, barrier_sound1_w)) @@ -262,7 +262,7 @@ WRITE_LINE_MEMBER(cinemat_state::speedfrk_start_led_w) output().set_led_value(0, !state); } -MACHINE_CONFIG_START( speedfrk_sound ) +MACHINE_CONFIG_START(cinemat_state::speedfrk_sound) MCFG_DEVICE_MODIFY("outlatch") MCFG_ADDRESSABLE_LATCH_Q1_OUT_CB(WRITELINE(cinemat_state, speedfrk_start_led_w)) MCFG_ADDRESSABLE_LATCH_Q3_OUT_CB(WRITELINE(cinemat_state, speedfrk_sound3_w)) @@ -344,7 +344,7 @@ WRITE_LINE_MEMBER(cinemat_state::starhawk_sound7_w) m_samples->stop(3); } -MACHINE_CONFIG_START( starhawk_sound ) +MACHINE_CONFIG_START(cinemat_state::starhawk_sound) MCFG_DEVICE_MODIFY("outlatch") MCFG_ADDRESSABLE_LATCH_Q0_OUT_CB(WRITELINE(cinemat_state, starhawk_sound0_w)) MCFG_ADDRESSABLE_LATCH_Q1_OUT_CB(WRITELINE(cinemat_state, starhawk_sound1_w)) @@ -423,7 +423,7 @@ WRITE_LINE_MEMBER(cinemat_state::sundance_sound7_w) m_samples->start(5, 5); } -MACHINE_CONFIG_START( sundance_sound ) +MACHINE_CONFIG_START(cinemat_state::sundance_sound) MCFG_DEVICE_MODIFY("outlatch") MCFG_ADDRESSABLE_LATCH_Q0_OUT_CB(WRITELINE(cinemat_state, sundance_sound0_w)) MCFG_ADDRESSABLE_LATCH_Q1_OUT_CB(WRITELINE(cinemat_state, sundance_sound1_w)) @@ -506,7 +506,7 @@ WRITE_LINE_MEMBER(cinemat_state::tailg_sound_w) } } -MACHINE_CONFIG_START( tailg_sound ) +MACHINE_CONFIG_START(cinemat_state::tailg_sound) MCFG_DEVICE_MODIFY("outlatch") MCFG_ADDRESSABLE_LATCH_Q4_OUT_CB(WRITELINE(cinemat_state, tailg_sound_w)) @@ -576,7 +576,7 @@ WRITE_LINE_MEMBER(cinemat_state::warrior_sound4_w) m_samples->start(4, 4); } -MACHINE_CONFIG_START( warrior_sound ) +MACHINE_CONFIG_START(cinemat_state::warrior_sound) MCFG_DEVICE_MODIFY("outlatch") MCFG_ADDRESSABLE_LATCH_Q0_OUT_CB(WRITELINE(cinemat_state, warrior_sound0_w)) MCFG_ADDRESSABLE_LATCH_Q1_OUT_CB(WRITELINE(cinemat_state, warrior_sound1_w)) @@ -676,7 +676,7 @@ WRITE_LINE_MEMBER(cinemat_state::armora_sound3_w) m_samples->stop(6); } -MACHINE_CONFIG_START( armora_sound ) +MACHINE_CONFIG_START(cinemat_state::armora_sound) MCFG_DEVICE_MODIFY("outlatch") MCFG_ADDRESSABLE_LATCH_Q0_OUT_CB(WRITELINE(cinemat_state, armora_sound0_w)) MCFG_ADDRESSABLE_LATCH_Q1_OUT_CB(WRITELINE(cinemat_state, armora_sound1_w)) @@ -773,7 +773,7 @@ WRITE_LINE_MEMBER(cinemat_state::ripoff_sound7_w) m_samples->start(4, 4); } -MACHINE_CONFIG_START( ripoff_sound ) +MACHINE_CONFIG_START(cinemat_state::ripoff_sound) MCFG_DEVICE_MODIFY("outlatch") MCFG_ADDRESSABLE_LATCH_Q1_OUT_CB(WRITELINE(cinemat_state, ripoff_sound1_w)) MCFG_ADDRESSABLE_LATCH_Q2_OUT_CB(WRITELINE(cinemat_state, ripoff_sound2_w)) @@ -890,7 +890,7 @@ WRITE_LINE_MEMBER(cinemat_state::starcas_sound3_w) m_samples->start(7, 7); } -MACHINE_CONFIG_START( starcas_sound ) +MACHINE_CONFIG_START(cinemat_state::starcas_sound) MCFG_DEVICE_MODIFY("outlatch") MCFG_ADDRESSABLE_LATCH_Q0_OUT_CB(WRITELINE(cinemat_state, starcas_sound0_w)) MCFG_ADDRESSABLE_LATCH_Q1_OUT_CB(WRITELINE(cinemat_state, starcas_sound1_w)) @@ -1024,7 +1024,7 @@ WRITE_LINE_MEMBER(cinemat_state::solarq_sound0_w) } } -MACHINE_CONFIG_START( solarq_sound ) +MACHINE_CONFIG_START(cinemat_state::solarq_sound) MCFG_DEVICE_MODIFY("outlatch") MCFG_ADDRESSABLE_LATCH_Q0_OUT_CB(WRITELINE(cinemat_state, solarq_sound0_w)) MCFG_ADDRESSABLE_LATCH_Q1_OUT_CB(WRITELINE(cinemat_state, solarq_sound1_w)) @@ -1162,7 +1162,7 @@ WRITE_LINE_MEMBER(cinemat_state::boxingb_sound3_w) m_samples->start(11, 11); } -MACHINE_CONFIG_START( boxingb_sound ) +MACHINE_CONFIG_START(cinemat_state::boxingb_sound) MCFG_DEVICE_MODIFY("outlatch") MCFG_ADDRESSABLE_LATCH_Q0_OUT_CB(WRITELINE(cinemat_state, boxingb_sound0_w)) MCFG_ADDRESSABLE_LATCH_Q1_OUT_CB(WRITELINE(cinemat_state, boxingb_sound1_w)) @@ -1279,7 +1279,7 @@ WRITE_LINE_MEMBER(cinemat_state::wotw_sound3_w) m_samples->start(7, 7); } -MACHINE_CONFIG_START( wotw_sound ) +MACHINE_CONFIG_START(cinemat_state::wotw_sound) MCFG_DEVICE_MODIFY("outlatch") MCFG_ADDRESSABLE_LATCH_Q0_OUT_CB(WRITELINE(cinemat_state, wotw_sound0_w)) MCFG_ADDRESSABLE_LATCH_Q1_OUT_CB(WRITELINE(cinemat_state, wotw_sound1_w)) @@ -1395,7 +1395,7 @@ static const z80_daisy_config daisy_chain[] = }; -MACHINE_CONFIG_START( demon_sound ) +MACHINE_CONFIG_START(cinemat_state::demon_sound) /* basic machine hardware */ MCFG_CPU_ADD("audiocpu", Z80, 3579545) @@ -1455,7 +1455,7 @@ SOUND_RESET_MEMBER( cinemat_state, qb3 ) } -MACHINE_CONFIG_DERIVED( qb3_sound, demon_sound ) +MACHINE_CONFIG_DERIVED(cinemat_state::qb3_sound, demon_sound) MCFG_SOUND_RESET_OVERRIDE(cinemat_state, qb3) MCFG_DEVICE_MODIFY("outlatch") diff --git a/src/mame/audio/copsnrob.cpp b/src/mame/audio/copsnrob.cpp index f1b98e62677..d611fa40088 100644 --- a/src/mame/audio/copsnrob.cpp +++ b/src/mame/audio/copsnrob.cpp @@ -695,7 +695,7 @@ WRITE_LINE_MEMBER(copsnrob_state::one_start_w) } -MACHINE_CONFIG_START( copsnrob_audio ) +MACHINE_CONFIG_START(copsnrob_state::copsnrob_audio) /* sound hardware */ MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") diff --git a/src/mame/audio/crbaloon.cpp b/src/mame/audio/crbaloon.cpp index c0e049537b6..b0944b78657 100644 --- a/src/mame/audio/crbaloon.cpp +++ b/src/mame/audio/crbaloon.cpp @@ -138,7 +138,7 @@ static DISCRETE_SOUND_START(crbaloon) DISCRETE_SOUND_END -MACHINE_CONFIG_START( crbaloon_audio ) +MACHINE_CONFIG_START(crbaloon_state::crbaloon_audio) MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/audio/csd.cpp b/src/mame/audio/csd.cpp index 3158de444db..7b2b250bf3f 100644 --- a/src/mame/audio/csd.cpp +++ b/src/mame/audio/csd.cpp @@ -35,7 +35,7 @@ ADDRESS_MAP_END // machine configuration //------------------------------------------------- -MACHINE_CONFIG_MEMBER(midway_cheap_squeak_deluxe_device::device_add_mconfig) +MACHINE_CONFIG_START(midway_cheap_squeak_deluxe_device::device_add_mconfig) MCFG_CPU_ADD("cpu", M68000, XTAL_16MHz/2) MCFG_CPU_PROGRAM_MAP(csdeluxe_map) diff --git a/src/mame/audio/dcs.cpp b/src/mame/audio/dcs.cpp index ceeec3878d1..eda78986838 100644 --- a/src/mame/audio/dcs.cpp +++ b/src/mame/audio/dcs.cpp @@ -2441,7 +2441,7 @@ int dcs_audio_device::preprocess_write(uint16_t data) /* Basic DCS system with ADSP-2105 and 2k of SRAM (T-unit, V-unit, Killer Instinct) */ -MACHINE_CONFIG_MEMBER( dcs_audio_device::add_mconfig_dcs ) +MACHINE_CONFIG_START(dcs_audio_device::add_mconfig_dcs ) MCFG_CPU_ADD("dcs", ADSP2105, XTAL_10MHz) MCFG_ADSP21XX_SPORT_TX_CB(WRITE32(dcs_audio_device, sound_tx_callback)) /* callback for serial transmit */ MCFG_ADSP21XX_TIMER_FIRED_CB(WRITELINE(dcs_audio_device, timer_enable_callback)) /* callback for timer fired */ @@ -2468,7 +2468,7 @@ dcs_audio_2k_device::dcs_audio_2k_device(const machine_config &mconfig, const ch { } -MACHINE_CONFIG_MEMBER( dcs_audio_2k_device::device_add_mconfig ) +MACHINE_CONFIG_START(dcs_audio_2k_device::device_add_mconfig) dcs_audio_device::add_mconfig_dcs(config); MACHINE_CONFIG_END @@ -2485,7 +2485,7 @@ dcs_audio_2k_uart_device::dcs_audio_2k_uart_device(const machine_config &mconfig } /* Basic DCS system with ADSP-2105 and 2k of SRAM, using a UART for communications (X-unit) */ -MACHINE_CONFIG_MEMBER( dcs_audio_2k_uart_device::device_add_mconfig ) +MACHINE_CONFIG_START(dcs_audio_2k_uart_device::device_add_mconfig) dcs_audio_device::add_mconfig_dcs(config); @@ -2505,7 +2505,7 @@ dcs_audio_8k_device::dcs_audio_8k_device(const machine_config &mconfig, const ch } /* Basic DCS system with ADSP-2105 and 8k of SRAM (Wolf-unit) */ -MACHINE_CONFIG_MEMBER( dcs_audio_8k_device::device_add_mconfig ) +MACHINE_CONFIG_START(dcs_audio_8k_device::device_add_mconfig) dcs_audio_device::add_mconfig_dcs(config); @@ -2525,7 +2525,7 @@ dcs_audio_wpc_device::dcs_audio_wpc_device(const machine_config &mconfig, const { } -MACHINE_CONFIG_MEMBER( dcs_audio_wpc_device::device_add_mconfig ) +MACHINE_CONFIG_START(dcs_audio_wpc_device::device_add_mconfig) dcs_audio_device::add_mconfig_dcs(config); @@ -2544,7 +2544,7 @@ dcs2_audio_device::dcs2_audio_device(const machine_config &mconfig, device_type { } -MACHINE_CONFIG_MEMBER( dcs2_audio_device::add_mconfig_dcs2 ) +MACHINE_CONFIG_START(dcs2_audio_device::add_mconfig_dcs2 ) MCFG_CPU_ADD("dcs2", ADSP2115, XTAL_16MHz) MCFG_ADSP21XX_SPORT_TX_CB(WRITE32(dcs_audio_device, sound_tx_callback)) /* callback for serial transmit */ MCFG_ADSP21XX_TIMER_FIRED_CB(WRITELINE(dcs_audio_device, timer_enable_callback)) /* callback for timer fired */ @@ -2576,7 +2576,7 @@ dcs2_audio_2115_device::dcs2_audio_2115_device(const machine_config &mconfig, co { } -MACHINE_CONFIG_MEMBER( dcs2_audio_2115_device::device_add_mconfig ) +MACHINE_CONFIG_START(dcs2_audio_2115_device::device_add_mconfig) dcs2_audio_device::add_mconfig_dcs2(config); @@ -2594,7 +2594,7 @@ dcs2_audio_2104_device::dcs2_audio_2104_device(const machine_config &mconfig, co { } -MACHINE_CONFIG_MEMBER( dcs2_audio_2104_device::device_add_mconfig ) +MACHINE_CONFIG_START(dcs2_audio_2104_device::device_add_mconfig) dcs2_audio_device::add_mconfig_dcs2(config); @@ -2616,7 +2616,7 @@ dcs2_audio_dsio_device::dcs2_audio_dsio_device(const machine_config &mconfig, co { } -MACHINE_CONFIG_MEMBER( dcs2_audio_dsio_device::device_add_mconfig ) +MACHINE_CONFIG_START(dcs2_audio_dsio_device::device_add_mconfig) MCFG_CPU_ADD("dsio", ADSP2181, XTAL_32MHz) MCFG_ADSP21XX_SPORT_TX_CB(WRITE32(dcs_audio_device, sound_tx_callback)) /* callback for serial transmit */ MCFG_ADSP21XX_TIMER_FIRED_CB(WRITELINE(dcs_audio_device, timer_enable_callback)) /* callback for timer fired */ @@ -2657,7 +2657,7 @@ dcs2_audio_denver_device::dcs2_audio_denver_device(const machine_config &mconfig { } -MACHINE_CONFIG_MEMBER( dcs2_audio_denver_device::device_add_mconfig ) +MACHINE_CONFIG_START(dcs2_audio_denver_device::device_add_mconfig) MCFG_CPU_ADD("denver", ADSP2181, XTAL_33_333MHz) MCFG_ADSP21XX_SPORT_TX_CB(WRITE32(dcs_audio_device, sound_tx_callback)) /* callback for serial transmit */ MCFG_ADSP21XX_TIMER_FIRED_CB(WRITELINE(dcs_audio_device, timer_enable_callback)) /* callback for timer fired */ diff --git a/src/mame/audio/decobsmt.cpp b/src/mame/audio/decobsmt.cpp index 577243581bb..9ad72bab4e6 100644 --- a/src/mame/audio/decobsmt.cpp +++ b/src/mame/audio/decobsmt.cpp @@ -46,7 +46,7 @@ DEFINE_DEVICE_TYPE(DECOBSMT, decobsmt_device, "decobsmt", "Data East/Sega/Stern // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_MEMBER( decobsmt_device::device_add_mconfig ) +MACHINE_CONFIG_START(decobsmt_device::device_add_mconfig) MCFG_CPU_ADD(M6809_TAG, MC6809E, XTAL_24MHz / 12) // 68B09E U6 (E & Q = 2 MHz according to manual) MCFG_CPU_PROGRAM_MAP(decobsmt_map) MCFG_CPU_PERIODIC_INT_DRIVER(decobsmt_device, decobsmt_firq_interrupt, 489) /* Fixed FIRQ of 489Hz as measured on real (pinball) machine */ diff --git a/src/mame/audio/depthch.cpp b/src/mame/audio/depthch.cpp index 22b59fe0aea..84ad14d635d 100644 --- a/src/mame/audio/depthch.cpp +++ b/src/mame/audio/depthch.cpp @@ -83,7 +83,7 @@ WRITE8_MEMBER( vicdual_state::depthch_audio_w ) } -MACHINE_CONFIG_START( depthch_audio ) +MACHINE_CONFIG_START(vicdual_state::depthch_audio) /* samples */ MCFG_SOUND_ADD("samples", SAMPLES, 0) diff --git a/src/mame/audio/depthch.h b/src/mame/audio/depthch.h deleted file mode 100644 index 00138b49c70..00000000000 --- a/src/mame/audio/depthch.h +++ /dev/null @@ -1,4 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Zsolt Vasvari - -MACHINE_CONFIG_EXTERN( depthch_audio ); diff --git a/src/mame/audio/dkong.cpp b/src/mame/audio/dkong.cpp index 752a8d5472b..952977885a7 100644 --- a/src/mame/audio/dkong.cpp +++ b/src/mame/audio/dkong.cpp @@ -1309,7 +1309,7 @@ ADDRESS_MAP_END * *************************************/ -MACHINE_CONFIG_START( dkong2b_audio ) +MACHINE_CONFIG_START(dkong_state::dkong2b_audio) /* sound latches */ MCFG_LATCH8_ADD("ls175.3d") /* sound cmd latch */ @@ -1351,14 +1351,14 @@ MACHINE_CONFIG_START( dkong2b_audio ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) MACHINE_CONFIG_END -MACHINE_CONFIG_DERIVED( radarscp_audio, dkong2b_audio ) +MACHINE_CONFIG_DERIVED(dkong_state::radarscp_audio, dkong2b_audio) MCFG_DISCRETE_REPLACE("discrete", 0, radarscp) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.7) MACHINE_CONFIG_END -MACHINE_CONFIG_DERIVED( radarscp1_audio, radarscp_audio ) +MACHINE_CONFIG_DERIVED(dkong_state::radarscp1_audio, radarscp_audio) MCFG_CPU_MODIFY("soundcpu") MCFG_CPU_IO_MAP(radarscp1_sound_io_map) @@ -1384,7 +1384,7 @@ MACHINE_CONFIG_DERIVED( radarscp1_audio, radarscp_audio ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) MACHINE_CONFIG_END -MACHINE_CONFIG_START( dkongjr_audio ) +MACHINE_CONFIG_START(dkong_state::dkongjr_audio) /* sound latches */ MCFG_LATCH8_ADD("ls174.3d") @@ -1423,7 +1423,7 @@ MACHINE_CONFIG_START( dkongjr_audio ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) MACHINE_CONFIG_END -MACHINE_CONFIG_START( dkong3_audio ) +MACHINE_CONFIG_START(dkong_state::dkong3_audio) MCFG_CPU_ADD("n2a03a", N2A03, NTSC_APU_CLOCK) MCFG_CPU_PROGRAM_MAP(dkong3_sound1_map) diff --git a/src/mame/audio/dsbz80.cpp b/src/mame/audio/dsbz80.cpp index 245d5d52032..b655354d357 100644 --- a/src/mame/audio/dsbz80.cpp +++ b/src/mame/audio/dsbz80.cpp @@ -43,7 +43,7 @@ DEFINE_DEVICE_TYPE(DSBZ80, dsbz80_device, "dsbz80_device", "Sega Z80-based Digit // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_MEMBER( dsbz80_device::device_add_mconfig ) +MACHINE_CONFIG_START(dsbz80_device::device_add_mconfig) MCFG_CPU_ADD(Z80_TAG, Z80, 4000000) /* unknown clock, but probably pretty slow considering the z80 does like nothing */ MCFG_CPU_PROGRAM_MAP(dsbz80_map) MCFG_CPU_IO_MAP(dsbz80io_map) diff --git a/src/mame/audio/efo_zsu.cpp b/src/mame/audio/efo_zsu.cpp index 49ac5867a4e..74b1f0098c8 100644 --- a/src/mame/audio/efo_zsu.cpp +++ b/src/mame/audio/efo_zsu.cpp @@ -187,7 +187,7 @@ TIMER_CALLBACK_MEMBER(cedar_magnet_sound_device::reset_assert_callback) } -MACHINE_CONFIG_MEMBER( efo_zsu_device::device_add_mconfig ) +MACHINE_CONFIG_START(efo_zsu_device::device_add_mconfig) MCFG_CPU_ADD("soundcpu", Z80, 4000000) MCFG_CPU_PROGRAM_MAP(zsu_map) MCFG_CPU_IO_MAP(zsu_io) @@ -236,7 +236,7 @@ MACHINE_CONFIG_MEMBER( efo_zsu_device::device_add_mconfig ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) MACHINE_CONFIG_END -MACHINE_CONFIG_MEMBER( cedar_magnet_sound_device::device_add_mconfig ) +MACHINE_CONFIG_START(cedar_magnet_sound_device::device_add_mconfig) efo_zsu_device::device_add_mconfig(config); MCFG_CPU_MODIFY("soundcpu") diff --git a/src/mame/audio/exidy.cpp b/src/mame/audio/exidy.cpp index a40869dd62d..cc6c5649fbb 100644 --- a/src/mame/audio/exidy.cpp +++ b/src/mame/audio/exidy.cpp @@ -8,6 +8,8 @@ #include "emu.h" #include "audio/exidy.h" +#include "includes/exidy.h" +#include "includes/victory.h" #include "cpu/z80/z80.h" #include "machine/rescap.h" @@ -737,7 +739,7 @@ static ADDRESS_MAP_START( venture_audio_map, AS_PROGRAM, 8, venture_sound_device ADDRESS_MAP_END -MACHINE_CONFIG_START( venture_audio ) +MACHINE_CONFIG_START(exidy_state::venture_audio) MCFG_CPU_ADD("audiocpu", M6502, 3579545/4) MCFG_CPU_PROGRAM_MAP(venture_audio_map) @@ -816,7 +818,7 @@ static ADDRESS_MAP_START( cvsd_iomap, AS_IO, 8, venture_sound_device ) ADDRESS_MAP_END -MACHINE_CONFIG_START( mtrap_cvsd_audio ) +MACHINE_CONFIG_START(exidy_state::mtrap_cvsd_audio) MCFG_CPU_ADD("cvsdcpu", Z80, CVSD_Z80_CLOCK) MCFG_CPU_PROGRAM_MAP(cvsd_map) @@ -991,7 +993,7 @@ static ADDRESS_MAP_START( victory_audio_map, AS_PROGRAM, 8, venture_sound_device ADDRESS_MAP_END -MACHINE_CONFIG_START( victory_audio ) +MACHINE_CONFIG_START(victory_state::victory_audio) MCFG_CPU_ADD("audiocpu", M6502, VICTORY_AUDIO_CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(victory_audio_map) diff --git a/src/mame/audio/exidy.h b/src/mame/audio/exidy.h index 02d1aafabd6..e09b32e58e2 100644 --- a/src/mame/audio/exidy.h +++ b/src/mame/audio/exidy.h @@ -60,6 +60,8 @@ public: DECLARE_WRITE8_MEMBER( sh8253_w ); DECLARE_READ8_MEMBER( sh8253_r ); + void mtrap_cvsd_audio(machine_config &config); + protected: exidy_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); @@ -129,6 +131,7 @@ public: DECLARE_WRITE8_MEMBER( filter_w ); + void venture_audio(machine_config &config); protected: // device-level overrides virtual void device_start() override; @@ -151,6 +154,7 @@ public: DECLARE_WRITE_LINE_MEMBER( irq_clear_w ); DECLARE_WRITE_LINE_MEMBER( main_ack_w ); + void victory_audio(machine_config &config); protected: // device-level overrides virtual void device_start() override; @@ -171,10 +175,4 @@ private: DECLARE_DEVICE_TYPE(EXIDY_VICTORY, victory_sound_device) -MACHINE_CONFIG_EXTERN( venture_audio ); - -MACHINE_CONFIG_EXTERN( mtrap_cvsd_audio ); - -MACHINE_CONFIG_EXTERN( victory_audio ); - #endif // MAME_AUDIO_EXIDY_H diff --git a/src/mame/audio/exidy440.cpp b/src/mame/audio/exidy440.cpp index 313be4ebb15..b9ad9b13faf 100644 --- a/src/mame/audio/exidy440.cpp +++ b/src/mame/audio/exidy440.cpp @@ -11,6 +11,7 @@ #include "emu.h" #include "audio/exidy440.h" +#include "includes/exidy440.h" #include "cpu/m6809/m6809.h" #include "speaker.h" @@ -873,7 +874,7 @@ ADDRESS_MAP_END * *************************************/ -MACHINE_CONFIG_START( exidy440_audio ) +MACHINE_CONFIG_START(exidy440_state::exidy440_audio) MCFG_CPU_ADD("audiocpu", MC6809, EXIDY440_AUDIO_CLOCK) MCFG_CPU_PROGRAM_MAP(exidy440_audio_map) diff --git a/src/mame/audio/exidy440.h b/src/mame/audio/exidy440.h index 5d8129195e3..739bf96f71a 100644 --- a/src/mame/audio/exidy440.h +++ b/src/mame/audio/exidy440.h @@ -22,6 +22,8 @@ public: void exidy440_sound_command(uint8_t param); uint8_t exidy440_sound_command_ack(); + void exidy440_audio(machine_config &config); + protected: // device-level overrides virtual void device_start() override; @@ -111,6 +113,5 @@ private: DECLARE_DEVICE_TYPE(EXIDY440, exidy440_sound_device) -MACHINE_CONFIG_EXTERN( exidy440_audio ); #endif // MAME_AUDIO_EXIDY440_H diff --git a/src/mame/audio/galaxian.cpp b/src/mame/audio/galaxian.cpp index 9efa49df63a..ebd0efadf7d 100644 --- a/src/mame/audio/galaxian.cpp +++ b/src/mame/audio/galaxian.cpp @@ -25,6 +25,7 @@ TODO: #include "emu.h" #include "audio/galaxian.h" #include "includes/galaxian.h" +#include "includes/galaxold.h" /************************************* * @@ -495,7 +496,7 @@ void galaxian_sound_device::sound_stream_update(sound_stream &stream, stream_sam * *************************************/ -MACHINE_CONFIG_START( galaxian_audio ) +MACHINE_CONFIG_START(galaxold_state::galaxian_audio) MCFG_SOUND_ADD("cust", GALAXIAN, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4) @@ -505,7 +506,28 @@ MACHINE_CONFIG_START( galaxian_audio ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) MACHINE_CONFIG_END -MACHINE_CONFIG_START( mooncrst_audio ) +MACHINE_CONFIG_START(galaxold_state::mooncrst_audio) + + MCFG_SOUND_ADD("cust", GALAXIAN, 0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4) + + MCFG_SOUND_ADD(GAL_AUDIO, DISCRETE, 0) + MCFG_DISCRETE_INTF(mooncrst) + + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) +MACHINE_CONFIG_END + +MACHINE_CONFIG_START(galaxian_state::galaxian_audio) + + MCFG_SOUND_ADD("cust", GALAXIAN, 0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4) + + MCFG_SOUND_ADD(GAL_AUDIO, DISCRETE, 0) + MCFG_DISCRETE_INTF(galaxian) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) +MACHINE_CONFIG_END + +MACHINE_CONFIG_START(galaxian_state::mooncrst_audio) MCFG_SOUND_ADD("cust", GALAXIAN, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4) diff --git a/src/mame/audio/galaxian.h b/src/mame/audio/galaxian.h index b842f1c9628..4a84a2f9e66 100644 --- a/src/mame/audio/galaxian.h +++ b/src/mame/audio/galaxian.h @@ -22,6 +22,9 @@ public: DECLARE_WRITE8_MEMBER( fire_enable_w ); DECLARE_WRITE8_MEMBER( lfo_freq_w ); + void mooncrst_audio(machine_config &config); + void galaxian_audio(machine_config &config); + protected: // device-level overrides virtual void device_start() override; @@ -37,7 +40,5 @@ private: DECLARE_DEVICE_TYPE(GALAXIAN, galaxian_sound_device) -MACHINE_CONFIG_EXTERN( mooncrst_audio ); -MACHINE_CONFIG_EXTERN( galaxian_audio ); #endif // MAME_AUDIO_GALAXIAN_H diff --git a/src/mame/audio/gottlieb.cpp b/src/mame/audio/gottlieb.cpp index 75bea4376c3..d1d2e89242f 100644 --- a/src/mame/audio/gottlieb.cpp +++ b/src/mame/audio/gottlieb.cpp @@ -108,7 +108,7 @@ INPUT_CHANGED_MEMBER( gottlieb_sound_r0_device::audio_nmi ) // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_MEMBER( gottlieb_sound_r0_device::device_add_mconfig ) +MACHINE_CONFIG_START(gottlieb_sound_r0_device::device_add_mconfig) // audio CPU MCFG_CPU_ADD("audiocpu", M6502, SOUND1_CLOCK/4) // M6503 - clock is a gate, a resistor and a capacitor. Freq unknown. MCFG_CPU_PROGRAM_MAP(gottlieb_sound_r0_map) @@ -306,7 +306,7 @@ INPUT_PORTS_END // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_MEMBER( gottlieb_sound_r1_device::device_add_mconfig ) +MACHINE_CONFIG_START(gottlieb_sound_r1_device::device_add_mconfig) // audio CPU MCFG_CPU_ADD("audiocpu", M6502, SOUND1_CLOCK/4) // the board can be set to /2 as well MCFG_CPU_PROGRAM_MAP(gottlieb_sound_r1_map) @@ -364,7 +364,7 @@ gottlieb_sound_r1_with_votrax_device::gottlieb_sound_r1_with_votrax_device(const // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_MEMBER( gottlieb_sound_r1_with_votrax_device::device_add_mconfig ) +MACHINE_CONFIG_START(gottlieb_sound_r1_with_votrax_device::device_add_mconfig) gottlieb_sound_r1_device::device_add_mconfig(config); // add the VOTRAX @@ -664,7 +664,7 @@ INPUT_PORTS_END // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_MEMBER( gottlieb_sound_r2_device::device_add_mconfig ) +MACHINE_CONFIG_START(gottlieb_sound_r2_device::device_add_mconfig) // audio CPUs MCFG_CPU_ADD("audiocpu", M6502, SOUND2_CLOCK/4) MCFG_CPU_PROGRAM_MAP(gottlieb_sound_r2_map) diff --git a/src/mame/audio/harddriv.cpp b/src/mame/audio/harddriv.cpp index 06677fbf79e..0c9fffc3aad 100644 --- a/src/mame/audio/harddriv.cpp +++ b/src/mame/audio/harddriv.cpp @@ -429,7 +429,7 @@ ADDRESS_MAP_END // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_MEMBER( harddriv_sound_board_device::device_add_mconfig ) +MACHINE_CONFIG_START(harddriv_sound_board_device::device_add_mconfig) /* basic machine hardware */ MCFG_CPU_ADD("soundcpu", M68000, XTAL_16MHz/2) diff --git a/src/mame/audio/hng64.cpp b/src/mame/audio/hng64.cpp index 458a69f2fcf..e6f1c8a89b2 100644 --- a/src/mame/audio/hng64.cpp +++ b/src/mame/audio/hng64.cpp @@ -386,7 +386,7 @@ WRITE_LINE_MEMBER(hng64_state::tcu_tm2_cb) -MACHINE_CONFIG_START( hng64_audio ) +MACHINE_CONFIG_START(hng64_state::hng64_audio) MCFG_CPU_ADD("audiocpu", V53A, 32000000/2) // V53A, 16? mhz! MCFG_CPU_PROGRAM_MAP(hng_sound_map) MCFG_CPU_IO_MAP(hng_sound_io) diff --git a/src/mame/audio/hyprolyb.cpp b/src/mame/audio/hyprolyb.cpp index 244c34f90ea..e86905aad8f 100644 --- a/src/mame/audio/hyprolyb.cpp +++ b/src/mame/audio/hyprolyb.cpp @@ -76,48 +76,11 @@ READ8_MEMBER( hyprolyb_adpcm_device::data_r ) return m_soundlatch2->read(*m_space, offset); } -static ADDRESS_MAP_START( hyprolyb_adpcm_map, AS_PROGRAM, 8, hyprolyb_adpcm_device ) - AM_RANGE(0x0000, 0x007f) AM_RAM - AM_RANGE(0x1000, 0x1000) AM_DEVREAD("hyprolyb_adpcm", hyprolyb_adpcm_device, data_r) - AM_RANGE(0x1001, 0x1001) AM_DEVREAD("hyprolyb_adpcm", hyprolyb_adpcm_device, ready_r) - AM_RANGE(0x1002, 0x1002) AM_DEVWRITE("hyprolyb_adpcm", hyprolyb_adpcm_device, msm_data_w) - AM_RANGE(0x1003, 0x1003) AM_DEVREAD("hyprolyb_adpcm", hyprolyb_adpcm_device, msm_vck_r) - // on init: - // $1003 = $00 - // $1002 = $FF - // $1003 = $34 - // $1001 = $36 - // $1002 = $80 - // loops while ($1003) & 0x80 == 0 - // 1002 = ADPCM data written (low 4 bits) - // - // $1003 & $80 (in) = 5205 DRQ - // $1002 & $0f (out) = 5205 data - // $1001 & $80 (in) = sound latch request - // $1000 (in) = sound latch data - AM_RANGE(0x8000, 0xffff) AM_ROM -ADDRESS_MAP_END - void hyprolyb_adpcm_device::vck_callback( int st ) { m_vck_ready = 0x80; } -MACHINE_CONFIG_START( hyprolyb_adpcm ) - MCFG_CPU_ADD("adpcm", M6802, XTAL_14_31818MHz/8) /* unknown clock */ - MCFG_CPU_PROGRAM_MAP(hyprolyb_adpcm_map) - - MCFG_GENERIC_LATCH_8_ADD("soundlatch2") - - MCFG_SOUND_ADD("hyprolyb_adpcm", HYPROLYB_ADPCM, 0) - - MCFG_SOUND_ADD("msm", MSM5205, 384000) - MCFG_MSM5205_VCLK_CB(DEVWRITELINE("hyprolyb_adpcm", hyprolyb_adpcm_device, vck_callback)) /* VCK function */ - MCFG_MSM5205_PRESCALER_SELECTOR(S96_4B) /* 4 kHz */ - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) -MACHINE_CONFIG_END - - //------------------------------------------------- // sound_stream_update - handle a stream update //------------------------------------------------- diff --git a/src/mame/audio/hyprolyb.h b/src/mame/audio/hyprolyb.h index fccea4779be..ca87ee7f022 100644 --- a/src/mame/audio/hyprolyb.h +++ b/src/mame/audio/hyprolyb.h @@ -22,6 +22,7 @@ public: READ8_MEMBER( data_r ); void vck_callback( int st ); + void hyprolyb_adpcm(machine_config &config); protected: // device-level overrides @@ -41,8 +42,6 @@ protected: uint8_t m_vck_ready; }; -MACHINE_CONFIG_EXTERN( hyprolyb_adpcm ); - extern const device_type HYPROLYB_ADPCM; DECLARE_DEVICE_TYPE(HYPROLYB_ADPCM, hyprolyb_adpcm_device) diff --git a/src/mame/audio/invinco.cpp b/src/mame/audio/invinco.cpp index ebe8c899661..8040ad69d40 100644 --- a/src/mame/audio/invinco.cpp +++ b/src/mame/audio/invinco.cpp @@ -94,7 +94,7 @@ WRITE8_MEMBER( vicdual_state::invinco_audio_w ) } -MACHINE_CONFIG_START( invinco_audio ) +MACHINE_CONFIG_START(vicdual_state::invinco_audio) /* samples */ MCFG_SOUND_ADD("samples", SAMPLES, 0) diff --git a/src/mame/audio/invinco.h b/src/mame/audio/invinco.h deleted file mode 100644 index bfd6293d7fe..00000000000 --- a/src/mame/audio/invinco.h +++ /dev/null @@ -1,4 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Zsolt Vasvari - -MACHINE_CONFIG_EXTERN( invinco_audio ); diff --git a/src/mame/audio/irem.cpp b/src/mame/audio/irem.cpp index f917796c03c..83647a7e851 100644 --- a/src/mame/audio/irem.cpp +++ b/src/mame/audio/irem.cpp @@ -400,7 +400,7 @@ ADDRESS_MAP_END // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_MEMBER( m62_audio_device::device_add_mconfig ) +MACHINE_CONFIG_START(m62_audio_device::device_add_mconfig) /* basic machine hardware */ MCFG_CPU_ADD("iremsound", M6803, XTAL_3_579545MHz) /* verified on pcb */ @@ -470,7 +470,7 @@ MACHINE_CONFIG_MEMBER( m62_audio_device::device_add_mconfig ) MACHINE_CONFIG_END -MACHINE_CONFIG_MEMBER( m52_soundc_audio_device::device_add_mconfig ) +MACHINE_CONFIG_START(m52_soundc_audio_device::device_add_mconfig) /* basic machine hardware */ MCFG_CPU_ADD("iremsound", M6803, XTAL_3_579545MHz) /* verified on pcb */ @@ -504,7 +504,7 @@ MACHINE_CONFIG_MEMBER( m52_soundc_audio_device::device_add_mconfig ) MACHINE_CONFIG_END -MACHINE_CONFIG_MEMBER( m52_large_audio_device::device_add_mconfig ) /* 10 yard fight */ +MACHINE_CONFIG_START(m52_large_audio_device::device_add_mconfig) /* 10 yard fight */ /* basic machine hardware */ MCFG_CPU_ADD("iremsound", M6803, XTAL_3_579545MHz) /* verified on pcb */ diff --git a/src/mame/audio/jedi.cpp b/src/mame/audio/jedi.cpp index 70c8cc8fade..d912fc821a2 100644 --- a/src/mame/audio/jedi.cpp +++ b/src/mame/audio/jedi.cpp @@ -190,7 +190,7 @@ ADDRESS_MAP_END * *************************************/ -MACHINE_CONFIG_START( jedi_audio ) +MACHINE_CONFIG_START(jedi_state::jedi_audio) MCFG_CPU_ADD("audiocpu", M6502, JEDI_AUDIO_CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(audio_map) diff --git a/src/mame/audio/leland.cpp b/src/mame/audio/leland.cpp index 2a42453fbd1..d3c8705045c 100644 --- a/src/mame/audio/leland.cpp +++ b/src/mame/audio/leland.cpp @@ -133,7 +133,7 @@ WRITE_LINE_MEMBER(leland_80186_sound_device::i80186_tmr1_w) set_clock_line(7, state); } -MACHINE_CONFIG_MEMBER( leland_80186_sound_device::device_add_mconfig ) +MACHINE_CONFIG_START(leland_80186_sound_device::device_add_mconfig) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac1", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // 74hc374.u31 + ad7524.u46 MCFG_SOUND_ADD("dac2", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // 74hc374.u32 + ad7524.u47 @@ -174,7 +174,7 @@ MACHINE_CONFIG_MEMBER( leland_80186_sound_device::device_add_mconfig ) MCFG_PIT8253_OUT2_HANDLER(WRITELINE(leland_80186_sound_device, pit1_2_w)) MACHINE_CONFIG_END -MACHINE_CONFIG_MEMBER( redline_80186_sound_device::device_add_mconfig ) +MACHINE_CONFIG_START(redline_80186_sound_device::device_add_mconfig) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac1", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC MCFG_SOUND_ADD("dac2", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC @@ -224,7 +224,7 @@ MACHINE_CONFIG_MEMBER( redline_80186_sound_device::device_add_mconfig ) MCFG_PIT8253_CLK2(7000000) MACHINE_CONFIG_END -MACHINE_CONFIG_MEMBER( ataxx_80186_sound_device::device_add_mconfig ) +MACHINE_CONFIG_START(ataxx_80186_sound_device::device_add_mconfig) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac1", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC MCFG_SOUND_ADD("dac2", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC @@ -251,7 +251,7 @@ MACHINE_CONFIG_MEMBER( ataxx_80186_sound_device::device_add_mconfig ) MCFG_PIT8253_OUT2_HANDLER(WRITELINE(leland_80186_sound_device, pit0_2_w)) MACHINE_CONFIG_END -MACHINE_CONFIG_MEMBER( wsf_80186_sound_device::device_add_mconfig ) +MACHINE_CONFIG_START(wsf_80186_sound_device::device_add_mconfig) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac1", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC MCFG_SOUND_ADD("dac2", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC diff --git a/src/mame/audio/llander.cpp b/src/mame/audio/llander.cpp index 41153505578..688242b69ec 100644 --- a/src/mame/audio/llander.cpp +++ b/src/mame/audio/llander.cpp @@ -8,7 +8,6 @@ #include "emu.h" #include "includes/asteroid.h" -#include "audio/llander.h" #include "sound/discrete.h" #include "speaker.h" @@ -99,7 +98,7 @@ WRITE8_MEMBER(asteroid_state::llander_sounds_w) } -MACHINE_CONFIG_START( llander_sound ) +MACHINE_CONFIG_START(asteroid_state::llander_sound) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("discrete", DISCRETE, 0) diff --git a/src/mame/audio/llander.h b/src/mame/audio/llander.h deleted file mode 100644 index 249a4954576..00000000000 --- a/src/mame/audio/llander.h +++ /dev/null @@ -1,4 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:K.Wilkins - -MACHINE_CONFIG_EXTERN(llander_sound); diff --git a/src/mame/audio/mario.cpp b/src/mame/audio/mario.cpp index 504c372a6bb..d56d87377fa 100644 --- a/src/mame/audio/mario.cpp +++ b/src/mame/audio/mario.cpp @@ -627,7 +627,7 @@ ADDRESS_MAP_END * *************************************/ -MACHINE_CONFIG_START( mario_audio ) +MACHINE_CONFIG_START(mario_state::mario_audio) #if USE_8039 MCFG_CPU_ADD("audiocpu", I8039, I8035_CLOCK) /* 730 kHz */ @@ -670,7 +670,7 @@ MACHINE_CONFIG_START( mario_audio ) MACHINE_CONFIG_END -MACHINE_CONFIG_START( masao_audio ) +MACHINE_CONFIG_START(mario_state::masao_audio) MCFG_CPU_ADD("audiocpu", Z80, 24576000/16) /* ???? */ MCFG_CPU_PROGRAM_MAP(masao_sound_map) diff --git a/src/mame/audio/midway.cpp b/src/mame/audio/midway.cpp index 0db7413b894..8c79a4d4db6 100644 --- a/src/mame/audio/midway.cpp +++ b/src/mame/audio/midway.cpp @@ -397,7 +397,7 @@ const tiny_rom_entry *midway_ssio_device::device_rom_region() const // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_MEMBER( midway_ssio_device::device_add_mconfig ) +MACHINE_CONFIG_START(midway_ssio_device::device_add_mconfig) MCFG_CPU_ADD("cpu", Z80, SSIO_CLOCK/2/4) MCFG_CPU_PROGRAM_MAP(ssio_map) MCFG_DEVICE_PERIODIC_INT_DEVICE(DEVICE_SELF, midway_ssio_device, clock_14024, SSIO_CLOCK/2/16/10) @@ -574,7 +574,7 @@ ADDRESS_MAP_END // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_MEMBER(midway_sounds_good_device::device_add_mconfig) +MACHINE_CONFIG_START(midway_sounds_good_device::device_add_mconfig) MCFG_CPU_ADD("cpu", M68000, SOUNDSGOOD_CLOCK/2) MCFG_CPU_PROGRAM_MAP(soundsgood_map) @@ -728,7 +728,7 @@ ADDRESS_MAP_END // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_MEMBER(midway_turbo_cheap_squeak_device::device_add_mconfig) +MACHINE_CONFIG_START(midway_turbo_cheap_squeak_device::device_add_mconfig) MCFG_CPU_ADD("cpu", MC6809E, TURBOCS_CLOCK / 4) MCFG_CPU_PROGRAM_MAP(turbocs_map) @@ -930,7 +930,7 @@ ADDRESS_MAP_END // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_MEMBER(midway_squawk_n_talk_device::device_add_mconfig) +MACHINE_CONFIG_START(midway_squawk_n_talk_device::device_add_mconfig) MCFG_CPU_ADD("cpu", M6802, SQUAWKTALK_CLOCK) MCFG_CPU_PROGRAM_MAP(squawkntalk_map) diff --git a/src/mame/audio/mw8080bw.cpp b/src/mame/audio/mw8080bw.cpp index 719bbe3eb89..970ddb9938b 100644 --- a/src/mame/audio/mw8080bw.cpp +++ b/src/mame/audio/mw8080bw.cpp @@ -144,7 +144,7 @@ static const char *const seawolf_sample_names[] = nullptr }; -MACHINE_CONFIG_START( seawolf_audio ) +MACHINE_CONFIG_START(mw8080bw_state::seawolf_audio) MCFG_SOUND_START_OVERRIDE(mw8080bw_state, samples) MCFG_SPEAKER_STANDARD_MONO("mono") @@ -198,7 +198,7 @@ static const char *const gunfight_sample_names[] = }; -MACHINE_CONFIG_START( gunfight_audio ) +MACHINE_CONFIG_START(mw8080bw_state::gunfight_audio) MCFG_SOUND_START_OVERRIDE(mw8080bw_state, samples) MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") @@ -307,7 +307,7 @@ static DISCRETE_SOUND_START(tornbase) DISCRETE_SOUND_END -MACHINE_CONFIG_START( tornbase_audio ) +MACHINE_CONFIG_START(mw8080bw_state::tornbase_audio) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("discrete", DISCRETE, 0) MCFG_DISCRETE_INTF(tornbase) @@ -351,7 +351,7 @@ WRITE8_MEMBER(mw8080bw_state::tornbase_audio_w) * *************************************/ -MACHINE_CONFIG_START( zzzap_audio ) +MACHINE_CONFIG_START(mw8080bw_state::zzzap_audio ) MCFG_SPEAKER_STANDARD_MONO("mono") MACHINE_CONFIG_END @@ -553,7 +553,7 @@ static DISCRETE_SOUND_START(maze) DISCRETE_SOUND_END -MACHINE_CONFIG_START( maze_audio ) +MACHINE_CONFIG_START(mw8080bw_state::maze_audio) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("discrete", DISCRETE, 0) MCFG_DISCRETE_INTF(maze) @@ -800,7 +800,7 @@ static DISCRETE_SOUND_START(boothill) DISCRETE_SOUND_END -MACHINE_CONFIG_START( boothill_audio ) +MACHINE_CONFIG_START(mw8080bw_state::boothill_audio) MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") MCFG_SOUND_ADD("discrete", DISCRETE, 0) MCFG_DISCRETE_INTF(boothill) @@ -1030,7 +1030,7 @@ static DISCRETE_SOUND_START(checkmat) DISCRETE_SOUND_END -MACHINE_CONFIG_START( checkmat_audio ) +MACHINE_CONFIG_START(mw8080bw_state::checkmat_audio) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("discrete", DISCRETE, 0) MCFG_DISCRETE_INTF(checkmat) @@ -1241,7 +1241,7 @@ static DISCRETE_SOUND_START(desertgu) DISCRETE_SOUND_END -MACHINE_CONFIG_START( desertgu_audio ) +MACHINE_CONFIG_START(mw8080bw_state::desertgu_audio) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("discrete", DISCRETE, 0) MCFG_DISCRETE_INTF(desertgu) @@ -1506,7 +1506,7 @@ static DISCRETE_SOUND_START(dplay) DISCRETE_SOUND_END -MACHINE_CONFIG_START( dplay_audio ) +MACHINE_CONFIG_START(mw8080bw_state::dplay_audio) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("discrete", DISCRETE, 0) MCFG_DISCRETE_INTF(dplay) @@ -1547,7 +1547,7 @@ static const char *const gmissile_sample_names[] = nullptr }; -MACHINE_CONFIG_START( gmissile_audio ) +MACHINE_CONFIG_START(mw8080bw_state::gmissile_audio) MCFG_SOUND_START_OVERRIDE(mw8080bw_state, samples) MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") @@ -1640,7 +1640,7 @@ static const char *const m4_sample_names[] = }; -MACHINE_CONFIG_START( m4_audio ) +MACHINE_CONFIG_START(mw8080bw_state::m4_audio) MCFG_SOUND_START_OVERRIDE(mw8080bw_state, samples) MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") @@ -1895,7 +1895,7 @@ static const char *const clowns_sample_names[] = nullptr }; -MACHINE_CONFIG_START( clowns_audio ) +MACHINE_CONFIG_START(mw8080bw_state::clowns_audio) MCFG_SOUND_START_OVERRIDE(mw8080bw_state, samples) MCFG_SPEAKER_STANDARD_MONO("mono") @@ -2268,7 +2268,7 @@ DISCRETE_GAIN(NODE_RELATIVE(SPACWALK_SPRINGBOARD_HIT1_SND, _num - 1), DISCRETE_OUTPUT(NODE_90, 11000) DISCRETE_SOUND_END -MACHINE_CONFIG_START( spacwalk_audio ) +MACHINE_CONFIG_START(mw8080bw_state::spacwalk_audio) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("discrete", DISCRETE, 0) @@ -2497,7 +2497,7 @@ static DISCRETE_SOUND_START(shuffle) DISCRETE_SOUND_END -MACHINE_CONFIG_START( shuffle_audio ) +MACHINE_CONFIG_START(mw8080bw_state::shuffle_audio) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("discrete", DISCRETE, 0) @@ -2677,7 +2677,7 @@ static DISCRETE_SOUND_START(dogpatch) DISCRETE_SOUND_END -MACHINE_CONFIG_START( dogpatch_audio ) +MACHINE_CONFIG_START(mw8080bw_state::dogpatch_audio) MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") MCFG_SOUND_ADD("discrete", DISCRETE, 0) MCFG_DISCRETE_INTF(dogpatch) @@ -3182,7 +3182,7 @@ static DISCRETE_SOUND_START(spcenctr) DISCRETE_SOUND_END -MACHINE_CONFIG_START( spcenctr_audio ) +MACHINE_CONFIG_START(mw8080bw_state::spcenctr_audio) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("snsnd", SN76477, 0) @@ -3268,7 +3268,7 @@ static const char *const phantom2_sample_names[] = nullptr }; -MACHINE_CONFIG_START( phantom2_audio ) +MACHINE_CONFIG_START(mw8080bw_state::phantom2_audio) MCFG_SOUND_START_OVERRIDE(mw8080bw_state, samples) MCFG_SPEAKER_STANDARD_MONO("mono") @@ -3398,7 +3398,7 @@ static DISCRETE_SOUND_START(bowler) DISCRETE_SOUND_END -MACHINE_CONFIG_START( bowler_audio ) +MACHINE_CONFIG_START(mw8080bw_state::bowler_audio) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("discrete", DISCRETE, 0) @@ -3513,7 +3513,7 @@ static const char *const invaders_sample_names[] = /* left in for all games that hack into invaders samples for audio */ -MACHINE_CONFIG_START( invaders_samples_audio ) +MACHINE_CONFIG_START(mw8080bw_state::invaders_samples_audio) MCFG_SOUND_START_OVERRIDE(mw8080bw_state, samples) MCFG_SPEAKER_STANDARD_MONO("mono") @@ -4095,7 +4095,7 @@ static DISCRETE_SOUND_START(invaders) DISCRETE_SOUND_END -MACHINE_CONFIG_START( invaders_audio ) +MACHINE_CONFIG_START(mw8080bw_state::invaders_audio) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("snsnd", SN76477, 0) @@ -4513,7 +4513,7 @@ static DISCRETE_SOUND_START(blueshrk) DISCRETE_SOUND_END -MACHINE_CONFIG_START( blueshrk_audio ) +MACHINE_CONFIG_START(mw8080bw_state::blueshrk_audio) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("discrete", DISCRETE, 0) MCFG_DISCRETE_INTF(blueshrk) @@ -4675,7 +4675,7 @@ static DISCRETE_SOUND_START(invad2ct) DISCRETE_SOUND_END -MACHINE_CONFIG_START( invad2ct_audio ) +MACHINE_CONFIG_START(mw8080bw_state::invad2ct_audio) MCFG_SPEAKER_STANDARD_STEREO("spk1", "spk2") MCFG_SOUND_ADD("discrete", DISCRETE, 0) diff --git a/src/mame/audio/n8080.cpp b/src/mame/audio/n8080.cpp index f3a27c3869c..0840c486d0a 100644 --- a/src/mame/audio/n8080.cpp +++ b/src/mame/audio/n8080.cpp @@ -471,7 +471,7 @@ static ADDRESS_MAP_START( helifire_sound_io_map, AS_IO, 8, n8080_state ) ADDRESS_MAP_END -MACHINE_CONFIG_START( spacefev_sound ) +MACHINE_CONFIG_START(n8080_state::spacefev_sound) MCFG_SOUND_START_OVERRIDE(n8080_state,spacefev) MCFG_SOUND_RESET_OVERRIDE(n8080_state,spacefev) @@ -511,7 +511,7 @@ MACHINE_CONFIG_START( spacefev_sound ) MACHINE_CONFIG_END -MACHINE_CONFIG_START( sheriff_sound ) +MACHINE_CONFIG_START(n8080_state::sheriff_sound) MCFG_SOUND_START_OVERRIDE(n8080_state,sheriff) MCFG_SOUND_RESET_OVERRIDE(n8080_state,sheriff) @@ -549,7 +549,7 @@ MACHINE_CONFIG_START( sheriff_sound ) MACHINE_CONFIG_END -MACHINE_CONFIG_START( helifire_sound ) +MACHINE_CONFIG_START(n8080_state::helifire_sound) MCFG_SOUND_START_OVERRIDE(n8080_state,helifire) MCFG_SOUND_RESET_OVERRIDE(n8080_state,helifire) diff --git a/src/mame/audio/namco52.cpp b/src/mame/audio/namco52.cpp index 34a05c9544d..efd8b93b135 100644 --- a/src/mame/audio/namco52.cpp +++ b/src/mame/audio/namco52.cpp @@ -176,7 +176,7 @@ void namco_52xx_device::device_start() // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_MEMBER( namco_52xx_device::device_add_mconfig ) +MACHINE_CONFIG_START(namco_52xx_device::device_add_mconfig) MCFG_CPU_ADD("mcu", MB8843, DERIVED_CLOCK(1,1)) /* parent clock, internally divided by 6 */ MCFG_MB88XX_READ_K_CB(READ8(namco_52xx_device, K_r)) MCFG_MB88XX_WRITE_O_CB(WRITE8(namco_52xx_device, O_w)) diff --git a/src/mame/audio/namco54.cpp b/src/mame/audio/namco54.cpp index 70109ad187d..89d07073d6b 100644 --- a/src/mame/audio/namco54.cpp +++ b/src/mame/audio/namco54.cpp @@ -135,7 +135,7 @@ void namco_54xx_device::device_start() // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_MEMBER( namco_54xx_device::device_add_mconfig ) +MACHINE_CONFIG_START(namco_54xx_device::device_add_mconfig) MCFG_CPU_ADD("mcu", MB8844, DERIVED_CLOCK(1,1)) /* parent clock, internally divided by 6 */ MCFG_MB88XX_READ_K_CB(READ8(namco_54xx_device, K_r)) MCFG_MB88XX_WRITE_O_CB(WRITE8(namco_54xx_device, O_w)) diff --git a/src/mame/audio/nichisnd.cpp b/src/mame/audio/nichisnd.cpp index 386a8bc8c7f..5d9fedf432e 100644 --- a/src/mame/audio/nichisnd.cpp +++ b/src/mame/audio/nichisnd.cpp @@ -76,7 +76,7 @@ static const z80_daisy_config daisy_chain[] = -MACHINE_CONFIG_MEMBER(nichisnd_device::device_add_mconfig) +MACHINE_CONFIG_START(nichisnd_device::device_add_mconfig) MCFG_CPU_ADD("audiocpu", TMPZ84C011, 8000000) /* TMPZ84C011, 8.00 MHz */ MCFG_Z80_DAISY_CHAIN(daisy_chain) MCFG_CPU_PROGRAM_MAP(nichisnd_map) diff --git a/src/mame/audio/pulsar.cpp b/src/mame/audio/pulsar.cpp index d378509156c..baf03df2dd7 100644 --- a/src/mame/audio/pulsar.cpp +++ b/src/mame/audio/pulsar.cpp @@ -171,7 +171,7 @@ WRITE8_MEMBER( vicdual_state::pulsar_audio_2_w ) } -MACHINE_CONFIG_START( pulsar_audio ) +MACHINE_CONFIG_START(vicdual_state::pulsar_audio) /* samples */ MCFG_SOUND_ADD("samples", SAMPLES, 0) diff --git a/src/mame/audio/pulsar.h b/src/mame/audio/pulsar.h deleted file mode 100644 index c6765be23cf..00000000000 --- a/src/mame/audio/pulsar.h +++ /dev/null @@ -1,4 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Zsolt Vasvari - -MACHINE_CONFIG_EXTERN( pulsar_audio ); diff --git a/src/mame/audio/qix.cpp b/src/mame/audio/qix.cpp index e8da3bd31cc..aebf53611e7 100644 --- a/src/mame/audio/qix.cpp +++ b/src/mame/audio/qix.cpp @@ -170,7 +170,7 @@ ADDRESS_MAP_END * *************************************/ -MACHINE_CONFIG_START( qix_audio ) +MACHINE_CONFIG_START(qix_state::qix_audio) MCFG_CPU_ADD("audiocpu", M6802, SOUND_CLOCK_OSC/2) /* 0.92 MHz */ MCFG_CPU_PROGRAM_MAP(audio_map) @@ -204,7 +204,7 @@ MACHINE_CONFIG_START( qix_audio ) MACHINE_CONFIG_END -MACHINE_CONFIG_START( slither_audio ) +MACHINE_CONFIG_START(qix_state::slither_audio) MCFG_DEVICE_ADD("sndpia0", PIA6821, 0) MCFG_PIA_READPA_HANDLER(IOPORT("P2")) MCFG_PIA_WRITEPB_HANDLER(WRITE8(qix_state, slither_coinctl_w)) diff --git a/src/mame/audio/rax.cpp b/src/mame/audio/rax.cpp index 76453be8440..47bc9a690d6 100644 --- a/src/mame/audio/rax.cpp +++ b/src/mame/audio/rax.cpp @@ -487,7 +487,7 @@ acclaim_rax_device::acclaim_rax_device(const machine_config &mconfig, const char // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_MEMBER( acclaim_rax_device::device_add_mconfig ) +MACHINE_CONFIG_START(acclaim_rax_device::device_add_mconfig) MCFG_CPU_ADD("adsp", ADSP2181, XTAL_16_67MHz) MCFG_ADSP21XX_SPORT_TX_CB(WRITE32(acclaim_rax_device, adsp_sound_tx_callback)) /* callback for serial transmit */ MCFG_ADSP21XX_DMOVLAY_CB(WRITE32(acclaim_rax_device, dmovlay_callback)) // callback for adsp 2181 dmovlay instruction diff --git a/src/mame/audio/redalert.cpp b/src/mame/audio/redalert.cpp index 216661eb09c..32111653d09 100644 --- a/src/mame/audio/redalert.cpp +++ b/src/mame/audio/redalert.cpp @@ -176,7 +176,7 @@ ADDRESS_MAP_END * *************************************/ -static MACHINE_CONFIG_START( redalert_audio_m37b ) +MACHINE_CONFIG_START(redalert_state::redalert_audio_m37b) MCFG_CPU_ADD("audiocpu", M6502, REDALERT_AUDIO_CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(redalert_audio_map) @@ -199,7 +199,7 @@ MACHINE_CONFIG_END * *************************************/ -static MACHINE_CONFIG_START( redalert_audio_voice ) +MACHINE_CONFIG_START(redalert_state::redalert_audio_voice) MCFG_CPU_ADD("voice", I8085A, REDALERT_VOICE_CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(redalert_voice_map) @@ -218,7 +218,7 @@ MACHINE_CONFIG_END * *************************************/ -MACHINE_CONFIG_START( redalert_audio ) +MACHINE_CONFIG_START(redalert_state::redalert_audio) MCFG_SPEAKER_STANDARD_MONO("mono") @@ -235,7 +235,7 @@ MACHINE_CONFIG_END * *************************************/ -MACHINE_CONFIG_START( ww3_audio ) +MACHINE_CONFIG_START(redalert_state::ww3_audio) MCFG_SPEAKER_STANDARD_MONO("mono") @@ -341,7 +341,7 @@ SOUND_START_MEMBER( redalert_state, demoneye ) * *************************************/ -MACHINE_CONFIG_START( demoneye_audio ) +MACHINE_CONFIG_START(redalert_state::demoneye_audio) MCFG_CPU_ADD("audiocpu", M6802, DEMONEYE_AUDIO_CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(demoneye_audio_map) diff --git a/src/mame/audio/s11c_bg.cpp b/src/mame/audio/s11c_bg.cpp index fb80c7ad1f0..39d7ea21981 100644 --- a/src/mame/audio/s11c_bg.cpp +++ b/src/mame/audio/s11c_bg.cpp @@ -56,7 +56,7 @@ void s11c_bg_device::data_w(uint8_t data) m_pia40->portb_w(data); } -MACHINE_CONFIG_MEMBER( s11c_bg_device::device_add_mconfig ) +MACHINE_CONFIG_START(s11c_bg_device::device_add_mconfig) MCFG_CPU_ADD("bgcpu", MC6809E, XTAL_8MHz / 4) // MC68B09E MCFG_CPU_PROGRAM_MAP(s11c_bg_map) MCFG_QUANTUM_TIME(attotime::from_hz(50)) diff --git a/src/mame/audio/scramble.cpp b/src/mame/audio/scramble.cpp index 4b13ee9d1ab..a37f5fcac2f 100644 --- a/src/mame/audio/scramble.cpp +++ b/src/mame/audio/scramble.cpp @@ -290,7 +290,7 @@ static ADDRESS_MAP_START( ad2083_sound_io_map, AS_IO, 8, scramble_state ) AM_RANGE(0x80, 0x80) AM_DEVWRITE("ay2", ay8910_device, address_w) ADDRESS_MAP_END -MACHINE_CONFIG_START( ad2083_audio ) +MACHINE_CONFIG_START(scramble_state::ad2083_audio) MCFG_CPU_ADD("audiocpu", Z80, 14318000/8) /* 1.78975 MHz */ MCFG_CPU_PROGRAM_MAP(ad2083_sound_map) diff --git a/src/mame/audio/segag80r.cpp b/src/mame/audio/segag80r.cpp index adc354b9d7b..f32e5f5bc94 100644 --- a/src/mame/audio/segag80r.cpp +++ b/src/mame/audio/segag80r.cpp @@ -231,7 +231,7 @@ static const char *const astrob_sample_names[] = }; -MACHINE_CONFIG_START( astrob_sound_board ) +MACHINE_CONFIG_START(segag80r_state::astrob_sound_board) /* sound hardware */ MCFG_SOUND_ADD("samples", SAMPLES, 0) @@ -418,7 +418,7 @@ static const char *const sega005_sample_names[] = }; -MACHINE_CONFIG_START( 005_sound_board ) +MACHINE_CONFIG_START(segag80r_state::sega005_sound_board) MCFG_DEVICE_ADD("ppi8255", I8255A, 0) MCFG_I8255_OUT_PORTA_CB(WRITE8(segag80r_state, sega005_sound_a_w)) @@ -580,7 +580,7 @@ static const char *const spaceod_sample_names[] = }; -MACHINE_CONFIG_START( spaceod_sound_board ) +MACHINE_CONFIG_START(segag80r_state::spaceod_sound_board) /* sound hardware */ @@ -678,7 +678,7 @@ static const char *const monsterb_sample_names[] = * *************************************/ -MACHINE_CONFIG_START( monsterb_sound_board ) +MACHINE_CONFIG_START(segag80r_state::monsterb_sound_board) MCFG_DEVICE_ADD("ppi8255", I8255A, 0) MCFG_I8255_OUT_PORTA_CB(WRITE8(segag80r_state, monsterb_sound_a_w)) MCFG_I8255_OUT_PORTB_CB(WRITE8(segag80r_state, monsterb_sound_b_w)) diff --git a/src/mame/audio/segam1audio.cpp b/src/mame/audio/segam1audio.cpp index c9724c21f55..d221c4bfba9 100644 --- a/src/mame/audio/segam1audio.cpp +++ b/src/mame/audio/segam1audio.cpp @@ -52,7 +52,7 @@ DEFINE_DEVICE_TYPE(SEGAM1AUDIO, segam1audio_device, "segam1audio", "Sega Model 1 // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_MEMBER( segam1audio_device::device_add_mconfig ) +MACHINE_CONFIG_START(segam1audio_device::device_add_mconfig) MCFG_CPU_ADD(M68000_TAG, M68000, 10000000) // verified on real h/w MCFG_CPU_PROGRAM_MAP(segam1audio_map) diff --git a/src/mame/audio/segasnd.cpp b/src/mame/audio/segasnd.cpp index 1671c23c25f..3d6549f7e4c 100644 --- a/src/mame/audio/segasnd.cpp +++ b/src/mame/audio/segasnd.cpp @@ -12,6 +12,8 @@ #include "segasnd.h" #include "sound/sp0250.h" +#include "includes/segag80r.h" +#include "includes/segag80v.h" #include <cmath> @@ -215,7 +217,26 @@ ADDRESS_MAP_END * *************************************/ -MACHINE_CONFIG_START( sega_speech_board ) +MACHINE_CONFIG_START(segag80r_state::sega_speech_board) + + /* CPU for the speech board */ + MCFG_CPU_ADD("audiocpu", I8035, SPEECH_MASTER_CLOCK) /* divide by 15 in CPU */ + MCFG_CPU_PROGRAM_MAP(speech_map) + MCFG_CPU_IO_MAP(speech_portmap) + MCFG_MCS48_PORT_P1_IN_CB(DEVREAD8("segaspeech", speech_sound_device, p1_r)) + MCFG_MCS48_PORT_P1_OUT_CB(DEVWRITE8("segaspeech", speech_sound_device, p1_w)) + MCFG_MCS48_PORT_P2_OUT_CB(DEVWRITE8("segaspeech", speech_sound_device, p2_w)) + MCFG_MCS48_PORT_T0_IN_CB(DEVREADLINE("segaspeech", speech_sound_device, t0_r)) + MCFG_MCS48_PORT_T1_IN_CB(DEVREADLINE("segaspeech", speech_sound_device, t1_r)) + + /* sound hardware */ + MCFG_SOUND_ADD("segaspeech", SEGASPEECH, 0) + MCFG_SOUND_ADD("speech", SP0250, SPEECH_MASTER_CLOCK) + MCFG_SP0250_DRQ_CALLBACK(DEVWRITELINE("segaspeech", speech_sound_device, drq_w)) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) +MACHINE_CONFIG_END + +MACHINE_CONFIG_START(segag80v_state::sega_speech_board) /* CPU for the speech board */ MCFG_CPU_ADD("audiocpu", I8035, SPEECH_MASTER_CLOCK) /* divide by 15 in CPU */ @@ -857,7 +878,7 @@ ADDRESS_MAP_END // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_MEMBER( usb_sound_device::device_add_mconfig ) +MACHINE_CONFIG_START(usb_sound_device::device_add_mconfig) /* CPU for the usb board */ MCFG_CPU_ADD("ourcpu", I8035, USB_MASTER_CLOCK) /* divide by 15 in CPU */ @@ -883,7 +904,7 @@ static ADDRESS_MAP_START( usb_map_rom, AS_PROGRAM, 8, usb_sound_device ) AM_RANGE(0x0000, 0x0fff) AM_ROM AM_REGION(":usbcpu", 0) ADDRESS_MAP_END -MACHINE_CONFIG_MEMBER( usb_rom_sound_device::device_add_mconfig ) +MACHINE_CONFIG_START(usb_rom_sound_device::device_add_mconfig) usb_sound_device::device_add_mconfig(config); /* CPU for the usb board */ diff --git a/src/mame/audio/segasnd.h b/src/mame/audio/segasnd.h index 4fae14d301f..c40a68afa3c 100644 --- a/src/mame/audio/segasnd.h +++ b/src/mame/audio/segasnd.h @@ -31,6 +31,8 @@ public: DECLARE_WRITE_LINE_MEMBER(drq_w); + void sega_speech_board(machine_config &config); + protected: // device-level overrides virtual void device_start() override; @@ -51,8 +53,6 @@ private: DECLARE_DEVICE_TYPE(SEGASPEECH, speech_sound_device) -MACHINE_CONFIG_EXTERN( sega_speech_board ); - class usb_sound_device : public device_t, public device_sound_interface { diff --git a/src/mame/audio/spacefb.cpp b/src/mame/audio/spacefb.cpp index 00607b17649..31ea51d8d14 100644 --- a/src/mame/audio/spacefb.cpp +++ b/src/mame/audio/spacefb.cpp @@ -77,7 +77,7 @@ static const char *const spacefb_sample_names[] = }; -MACHINE_CONFIG_START( spacefb_audio ) +MACHINE_CONFIG_START(spacefb_state::spacefb_audio) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_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) diff --git a/src/mame/audio/spiders.cpp b/src/mame/audio/spiders.cpp index a3ac004b972..b4b2755cff3 100644 --- a/src/mame/audio/spiders.cpp +++ b/src/mame/audio/spiders.cpp @@ -205,7 +205,7 @@ WRITE8_MEMBER(spiders_state::spiders_audio_ctrl_w) } -MACHINE_CONFIG_START( spiders_audio ) +MACHINE_CONFIG_START(spiders_state::spiders_audio) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("discrete", DISCRETE, 0) diff --git a/src/mame/audio/sprint8.cpp b/src/mame/audio/sprint8.cpp index 0294e94ca85..582974094c6 100644 --- a/src/mame/audio/sprint8.cpp +++ b/src/mame/audio/sprint8.cpp @@ -296,7 +296,7 @@ DISCRETE_SOUND_START( sprint8 ) DISCRETE_TASK_END() DISCRETE_SOUND_END -MACHINE_CONFIG_START( sprint8_audio ) +MACHINE_CONFIG_START(sprint8_state::sprint8_audio) /* sound hardware */ /* the proper way is to hook up 4 speakers, but they are not really * F/R/L/R speakers. Though you can pretend the 1-2 mix is the front. */ diff --git a/src/mame/audio/svis_snd.h b/src/mame/audio/svis_snd.h index 1a3777434ae..2896559e240 100644 --- a/src/mame/audio/svis_snd.h +++ b/src/mame/audio/svis_snd.h @@ -19,7 +19,7 @@ #define SVISION_SND_IRQ_MEMBER(_name) void _name(void) #define SVISION_SND_IRQ_CB(_class, _method) \ - svision_sound_device::set_irq_callback(*device, svision_sound_device::irq_delegate(&_class::_method, #_class "::" #_method, downcast<_class *>(owner))); + svision_sound_device::set_irq_callback(*device, svision_sound_device::irq_delegate(&_class::_method, #_class "::" #_method, this)); // ======================> svision_sound_device diff --git a/src/mame/audio/t5182.cpp b/src/mame/audio/t5182.cpp index e4bfd20ec10..7044242425d 100644 --- a/src/mame/audio/t5182.cpp +++ b/src/mame/audio/t5182.cpp @@ -369,7 +369,7 @@ ADDRESS_MAP_END // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_MEMBER( t5182_device::device_add_mconfig ) +MACHINE_CONFIG_START(t5182_device::device_add_mconfig) MCFG_CPU_ADD("t5182_z80", Z80, T5182_CLOCK) MCFG_CPU_PROGRAM_MAP(t5182_map) MCFG_CPU_IO_MAP(t5182_io) diff --git a/src/mame/audio/taito_en.cpp b/src/mame/audio/taito_en.cpp index e158b5aaa87..9e1d9ed18f5 100644 --- a/src/mame/audio/taito_en.cpp +++ b/src/mame/audio/taito_en.cpp @@ -270,7 +270,7 @@ WRITE_LINE_MEMBER(taito_en_device::duart_irq_handler) // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_MEMBER( taito_en_device::device_add_mconfig ) +MACHINE_CONFIG_START(taito_en_device::device_add_mconfig) /* basic machine hardware */ MCFG_CPU_ADD("audiocpu", M68000, XTAL_30_4761MHz / 2) diff --git a/src/mame/audio/taito_zm.cpp b/src/mame/audio/taito_zm.cpp index 87072257d33..61062d99a79 100644 --- a/src/mame/audio/taito_zm.cpp +++ b/src/mame/audio/taito_zm.cpp @@ -39,8 +39,8 @@ DEFINE_DEVICE_TYPE(TAITO_ZOOM, taito_zoom_device, "taito_zoom", "Taito Zoom Soun taito_zoom_device::taito_zoom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, TAITO_ZOOM, tag, owner, clock), - m_soundcpu(*this, ":mn10200"), - m_zsg2(*this, ":zsg2"), + m_soundcpu(*this, "mn10200"), + m_zsg2(*this, "zsg2"), m_reg_address(0), m_tms_ctrl(0) { @@ -111,7 +111,7 @@ ADDRESS_MAP_START( taitozoom_mn_map, AS_PROGRAM, 16, taito_zoom_device ) AM_RANGE(0x400000, 0x41ffff) AM_RAM AM_RANGE(0x800000, 0x8007ff) AM_DEVREADWRITE("zsg2", zsg2_device, read, write) AM_RANGE(0xc00000, 0xc00001) AM_RAM // TMS57002 comms - AM_RANGE(0xe00000, 0xe000ff) AM_DEVREADWRITE8("taito_zoom", taito_zoom_device, shared_ram_r, shared_ram_w, 0xffff) // M66220FP for comms with maincpu + AM_RANGE(0xe00000, 0xe000ff) AM_READWRITE8(shared_ram_r, shared_ram_w, 0xffff) // M66220FP for comms with maincpu ADDRESS_MAP_END @@ -168,13 +168,11 @@ WRITE16_MEMBER(taito_zoom_device::reg_address_w) ***************************************************************************/ -MACHINE_CONFIG_START( taito_zoom_sound ) - +MACHINE_CONFIG_START(taito_zoom_device::device_add_mconfig) /* basic machine hardware */ - MCFG_TAITO_ZOOM_ADD("taito_zoom") MCFG_CPU_ADD("mn10200", MN1020012A, XTAL_25MHz/2) - MCFG_MN10200_READ_PORT_CB(1, DEVREAD8("taito_zoom", taito_zoom_device, tms_ctrl_r)) - MCFG_MN10200_WRITE_PORT_CB(1, DEVWRITE8("taito_zoom", taito_zoom_device, tms_ctrl_w)) + MCFG_MN10200_READ_PORT_CB(1, DEVREAD8(DEVICE_SELF, taito_zoom_device, tms_ctrl_r)) + MCFG_MN10200_WRITE_PORT_CB(1, DEVWRITE8(DEVICE_SELF, taito_zoom_device, tms_ctrl_w)) MCFG_CPU_PROGRAM_MAP(taitozoom_mn_map) MCFG_QUANTUM_TIME(attotime::from_hz(60000)) @@ -182,6 +180,6 @@ MACHINE_CONFIG_START( taito_zoom_sound ) MCFG_ZSG2_ADD("zsg2", XTAL_25MHz) // we assume the parent machine has created lspeaker/rspeaker - MCFG_SOUND_ROUTE(0, "lspeaker", 1.0) - MCFG_SOUND_ROUTE(1, "rspeaker", 1.0) + MCFG_SOUND_ROUTE(0, "^^lspeaker", 1.0) + MCFG_SOUND_ROUTE(1, "^^rspeaker", 1.0) MACHINE_CONFIG_END diff --git a/src/mame/audio/taito_zm.h b/src/mame/audio/taito_zm.h index 2c02599efe9..f30fcc27029 100644 --- a/src/mame/audio/taito_zm.h +++ b/src/mame/audio/taito_zm.h @@ -31,11 +31,11 @@ public: DECLARE_WRITE8_MEMBER(shared_ram_w); DECLARE_READ8_MEMBER(tms_ctrl_r); DECLARE_WRITE8_MEMBER(tms_ctrl_w); - protected: // device-level overrides virtual void device_start() override; virtual void device_reset() override; + virtual void device_add_mconfig(machine_config &config) override; private: // inherited devices/pointers @@ -50,8 +50,6 @@ private: DECLARE_DEVICE_TYPE(TAITO_ZOOM, taito_zoom_device) -MACHINE_CONFIG_EXTERN( taito_zoom_sound ); - #define MCFG_TAITO_ZOOM_ADD(_tag) \ MCFG_DEVICE_ADD(_tag, TAITO_ZOOM, 0) diff --git a/src/mame/audio/targ.cpp b/src/mame/audio/targ.cpp index 34a9ddbf5ed..ceaca255005 100644 --- a/src/mame/audio/targ.cpp +++ b/src/mame/audio/targ.cpp @@ -175,7 +175,7 @@ SAMPLES_START_CB_MEMBER(exidy_state::targ_audio_start) } -MACHINE_CONFIG_START( spectar_audio ) +MACHINE_CONFIG_START(exidy_state::spectar_audio) MCFG_SPEAKER_STANDARD_MONO("speaker") @@ -191,7 +191,7 @@ MACHINE_CONFIG_START( spectar_audio ) MACHINE_CONFIG_END -MACHINE_CONFIG_START( targ_audio ) +MACHINE_CONFIG_START(exidy_state::targ_audio) MCFG_SPEAKER_STANDARD_MONO("speaker") diff --git a/src/mame/audio/targ.h b/src/mame/audio/targ.h deleted file mode 100644 index 079a5dd26c7..00000000000 --- a/src/mame/audio/targ.h +++ /dev/null @@ -1,5 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Aaron Giles - -MACHINE_CONFIG_EXTERN( spectar_audio ); -MACHINE_CONFIG_EXTERN( targ_audio ); diff --git a/src/mame/audio/timeplt.cpp b/src/mame/audio/timeplt.cpp index 711a3878538..8199f02b418 100644 --- a/src/mame/audio/timeplt.cpp +++ b/src/mame/audio/timeplt.cpp @@ -13,6 +13,7 @@ ***************************************************************************/ #include "emu.h" +#include "includes/timeplt.h" #include "audio/timeplt.h" #include "machine/gen_latch.h" @@ -155,14 +156,14 @@ static ADDRESS_MAP_START( timeplt_sound_map, AS_PROGRAM, 8, timeplt_audio_device AM_RANGE(0x5000, 0x5000) AM_MIRROR(0x0fff) AM_DEVWRITE("ay1", ay8910_device, address_w) AM_RANGE(0x6000, 0x6000) AM_MIRROR(0x0fff) AM_DEVREADWRITE("ay2", ay8910_device, data_r, data_w) AM_RANGE(0x7000, 0x7000) AM_MIRROR(0x0fff) AM_DEVWRITE("ay2", ay8910_device, address_w) - AM_RANGE(0x8000, 0xffff) AM_DEVWRITE("timeplt_audio", timeplt_audio_device, filter_w) + AM_RANGE(0x8000, 0xffff) AM_WRITE(filter_w) ADDRESS_MAP_END static ADDRESS_MAP_START( locomotn_sound_map, AS_PROGRAM, 8, timeplt_audio_device ) AM_RANGE(0x0000, 0x1fff) AM_ROM AM_RANGE(0x2000, 0x23ff) AM_MIRROR(0x0c00) AM_RAM - AM_RANGE(0x3000, 0x3fff) AM_DEVWRITE("timeplt_audio", timeplt_audio_device, filter_w) + AM_RANGE(0x3000, 0x3fff) AM_WRITE(filter_w) AM_RANGE(0x4000, 0x4000) AM_MIRROR(0x0fff) AM_DEVREADWRITE("ay1", ay8910_device, data_r, data_w) AM_RANGE(0x5000, 0x5000) AM_MIRROR(0x0fff) AM_DEVWRITE("ay1", ay8910_device, address_w) AM_RANGE(0x6000, 0x6000) AM_MIRROR(0x0fff) AM_DEVREADWRITE("ay2", ay8910_device, data_r, data_w) @@ -176,7 +177,7 @@ ADDRESS_MAP_END * *************************************/ -MACHINE_CONFIG_START( timeplt_sound ) +MACHINE_CONFIG_START(timeplt_audio_device::timeplt_sound) /* basic machine hardware */ MCFG_CPU_ADD("tpsound",Z80,MASTER_CLOCK/8) @@ -185,10 +186,8 @@ MACHINE_CONFIG_START( timeplt_sound ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") - MCFG_SOUND_ADD("timeplt_audio", TIMEPLT_AUDIO, 0) - MCFG_SOUND_ADD("ay1", AY8910, MASTER_CLOCK/8) - MCFG_AY8910_PORT_A_READ_CB(DEVREAD8("soundlatch", generic_latch_8_device, read)) + MCFG_AY8910_PORT_A_READ_CB(DEVREAD8("^soundlatch", generic_latch_8_device, read)) MCFG_AY8910_PORT_B_READ_CB(DEVREAD8("timeplt_audio", timeplt_audio_device, portB_r)) MCFG_SOUND_ROUTE(0, "filter.0.0", 0.60) MCFG_SOUND_ROUTE(1, "filter.0.1", 0.60) @@ -215,7 +214,7 @@ MACHINE_CONFIG_START( timeplt_sound ) MACHINE_CONFIG_END -MACHINE_CONFIG_DERIVED( locomotn_sound, timeplt_sound ) +MACHINE_CONFIG_DERIVED(timeplt_audio_device::locomotn_sound, timeplt_sound) /* basic machine hardware */ MCFG_CPU_MODIFY("tpsound") diff --git a/src/mame/audio/timeplt.h b/src/mame/audio/timeplt.h index 075dc50f163..3ea327338d4 100644 --- a/src/mame/audio/timeplt.h +++ b/src/mame/audio/timeplt.h @@ -19,6 +19,9 @@ public: DECLARE_WRITE8_MEMBER(filter_w); DECLARE_READ8_MEMBER(portB_r); + void timeplt_sound(machine_config &config); + void locomotn_sound(machine_config &config); + protected: // device-level overrides virtual void device_start() override; @@ -41,9 +44,6 @@ private: void filter_w( device_t *device, int data ); }; -MACHINE_CONFIG_EXTERN( timeplt_sound ); -MACHINE_CONFIG_EXTERN( locomotn_sound ); - DECLARE_DEVICE_TYPE(TIMEPLT_AUDIO, timeplt_audio_device) #endif // MAME_AUDIO_TIMEPLT_H diff --git a/src/mame/audio/tranqgun.cpp b/src/mame/audio/tranqgun.cpp index c3583407049..3f43a2b61e4 100644 --- a/src/mame/audio/tranqgun.cpp +++ b/src/mame/audio/tranqgun.cpp @@ -140,7 +140,7 @@ WRITE8_MEMBER( vicdual_state::tranqgun_audio_w ) } -MACHINE_CONFIG_START( tranqgun_audio ) +MACHINE_CONFIG_START(vicdual_state::tranqgun_audio) /* samples */ MCFG_SOUND_ADD("samples", SAMPLES, 0) diff --git a/src/mame/audio/tranqgun.h b/src/mame/audio/tranqgun.h deleted file mode 100644 index d5228077554..00000000000 --- a/src/mame/audio/tranqgun.h +++ /dev/null @@ -1,4 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Zsolt Vasvari - -MACHINE_CONFIG_EXTERN( tranqgun_audio ); diff --git a/src/mame/audio/turbo.cpp b/src/mame/audio/turbo.cpp index 53f86fd7274..73e36ff4693 100644 --- a/src/mame/audio/turbo.cpp +++ b/src/mame/audio/turbo.cpp @@ -183,7 +183,7 @@ static const char *const turbo_sample_names[] = }; -MACHINE_CONFIG_START( turbo_samples ) +MACHINE_CONFIG_START(turbo_state::turbo_samples) /* this is the cockpit speaker configuration */ MCFG_SPEAKER_ADD("fspeaker", 0.0, 0.0, 1.0) /* front */ @@ -429,7 +429,7 @@ static const char *const subroc3d_sample_names[] = nullptr }; -MACHINE_CONFIG_START( subroc3d_samples ) +MACHINE_CONFIG_START(turbo_state::subroc3d_samples) MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") MCFG_SOUND_ADD("samples", SAMPLES, 0) @@ -574,7 +574,7 @@ static const char *const buckrog_sample_names[]= }; -MACHINE_CONFIG_START( buckrog_samples ) +MACHINE_CONFIG_START(turbo_state::buckrog_samples) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("samples", SAMPLES, 0) MCFG_SAMPLES_CHANNELS(6) diff --git a/src/mame/audio/vicdual-97271p.cpp b/src/mame/audio/vicdual-97271p.cpp index 30be9ebe9e8..baef818445f 100644 --- a/src/mame/audio/vicdual-97271p.cpp +++ b/src/mame/audio/vicdual-97271p.cpp @@ -86,7 +86,7 @@ s97271p_device::s97271p_device(const machine_config &mconfig, const char *tag, d // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_MEMBER( s97271p_device::device_add_mconfig ) +MACHINE_CONFIG_START(s97271p_device::device_add_mconfig) MCFG_SPEAKER_STANDARD_MONO("mono") /* samples */ diff --git a/src/mame/audio/vicdual.cpp b/src/mame/audio/vicdual.cpp index 9c43f5f3beb..3d4e059ca68 100644 --- a/src/mame/audio/vicdual.cpp +++ b/src/mame/audio/vicdual.cpp @@ -111,7 +111,7 @@ static const char *const frogs_sample_names[] = }; -MACHINE_CONFIG_START( frogs_audio ) +MACHINE_CONFIG_START(vicdual_state::frogs_audio) MCFG_SOUND_ADD("samples", SAMPLES, 0) MCFG_SAMPLES_CHANNELS(5) MCFG_SAMPLES_NAMES(frogs_sample_names) @@ -445,7 +445,7 @@ static DISCRETE_SOUND_START(headon) DISCRETE_SOUND_END -MACHINE_CONFIG_START( headon_audio ) +MACHINE_CONFIG_START(vicdual_state::headon_audio) MCFG_SOUND_ADD("discrete", DISCRETE, 0) MCFG_DISCRETE_INTF(headon) @@ -592,7 +592,7 @@ static const char *const brdrline_sample_names[] = }; -MACHINE_CONFIG_START( brdrline_audio ) +MACHINE_CONFIG_START(vicdual_state::brdrline_audio) MCFG_SOUND_ADD("samples", SAMPLES, 0) MCFG_SAMPLES_CHANNELS(7) MCFG_SAMPLES_NAMES(brdrline_sample_names) diff --git a/src/mame/audio/vicdual.h b/src/mame/audio/vicdual.h deleted file mode 100644 index aac4bffbe28..00000000000 --- a/src/mame/audio/vicdual.h +++ /dev/null @@ -1,6 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Derrick Renaud, Couriersud - -MACHINE_CONFIG_EXTERN( frogs_audio ); -MACHINE_CONFIG_EXTERN( headon_audio ); -MACHINE_CONFIG_EXTERN( brdrline_audio ); diff --git a/src/mame/audio/williams.cpp b/src/mame/audio/williams.cpp index 6633556d258..b074045848a 100644 --- a/src/mame/audio/williams.cpp +++ b/src/mame/audio/williams.cpp @@ -174,7 +174,7 @@ ADDRESS_MAP_END // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_MEMBER( williams_cvsd_sound_device::device_add_mconfig ) +MACHINE_CONFIG_START(williams_cvsd_sound_device::device_add_mconfig) MCFG_CPU_ADD("cpu", MC6809E, CVSD_MASTER_CLOCK / 4) MCFG_CPU_PROGRAM_MAP(williams_cvsd_map) @@ -492,7 +492,7 @@ ADDRESS_MAP_END //------------------------------------------------- -MACHINE_CONFIG_MEMBER( williams_narc_sound_device::device_add_mconfig ) +MACHINE_CONFIG_START(williams_narc_sound_device::device_add_mconfig) MCFG_CPU_ADD("cpu0", MC6809E, NARC_MASTER_CLOCK / 4) MCFG_CPU_PROGRAM_MAP(williams_narc_master_map) @@ -745,7 +745,7 @@ ADDRESS_MAP_END // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_MEMBER( williams_adpcm_sound_device::device_add_mconfig ) +MACHINE_CONFIG_START(williams_adpcm_sound_device::device_add_mconfig) MCFG_CPU_ADD("cpu", MC6809E, ADPCM_MASTER_CLOCK / 4) MCFG_CPU_PROGRAM_MAP(williams_adpcm_map) diff --git a/src/mame/audio/wpcsnd.cpp b/src/mame/audio/wpcsnd.cpp index f8ce84bae3d..75b34c75f9d 100644 --- a/src/mame/audio/wpcsnd.cpp +++ b/src/mame/audio/wpcsnd.cpp @@ -66,7 +66,7 @@ uint8_t wpcsnd_device::data_r() return m_reply; } -MACHINE_CONFIG_MEMBER( wpcsnd_device::device_add_mconfig ) +MACHINE_CONFIG_START(wpcsnd_device::device_add_mconfig) MCFG_CPU_ADD("bgcpu", MC6809E, XTAL_8MHz / 4) // MC68B09E MCFG_CPU_PROGRAM_MAP(wpcsnd_map) MCFG_QUANTUM_TIME(attotime::from_hz(50)) diff --git a/src/mame/audio/zaccaria.cpp b/src/mame/audio/zaccaria.cpp index a80badd075a..90ebf16c7b1 100644 --- a/src/mame/audio/zaccaria.cpp +++ b/src/mame/audio/zaccaria.cpp @@ -218,7 +218,7 @@ READ8_MEMBER(zac1b111xx_melody_base::melodypsg1_portb_r) return m_melody_command; } -MACHINE_CONFIG_MEMBER(zac1b111xx_melody_base::device_add_mconfig) +MACHINE_CONFIG_START(zac1b111xx_melody_base::device_add_mconfig) MCFG_CPU_ADD("melodycpu", M6802, XTAL_3_579545MHz) // verified on pcb MCFG_CPU_PROGRAM_MAP(zac1b111xx_melody_base_map) @@ -297,7 +297,7 @@ WRITE8_MEMBER(zac1b11107_audio_device::melodypsg2_porta_w) // TODO: assume LEVELT is controlled here as is the case for 1B11142? } -MACHINE_CONFIG_MEMBER(zac1b11107_audio_device::device_add_mconfig) +MACHINE_CONFIG_START(zac1b11107_audio_device::device_add_mconfig) zac1b111xx_melody_base::device_add_mconfig(config); MCFG_CPU_MODIFY("melodycpu") @@ -400,7 +400,7 @@ WRITE8_MEMBER(zac1b11142_audio_device::pia_1i_portb_w) // TODO: a LED output().set_led_value(0, BIT(data, 4)); } -MACHINE_CONFIG_MEMBER(zac1b11142_audio_device::device_add_mconfig) +MACHINE_CONFIG_START(zac1b11142_audio_device::device_add_mconfig) zac1b111xx_melody_base::device_add_mconfig(config); MCFG_CPU_MODIFY("melodycpu") diff --git a/src/mame/audio/zaxxon.cpp b/src/mame/audio/zaxxon.cpp index b7c31175a7b..10923afc895 100644 --- a/src/mame/audio/zaxxon.cpp +++ b/src/mame/audio/zaxxon.cpp @@ -92,7 +92,7 @@ static const char *const zaxxon_sample_names[] = }; -MACHINE_CONFIG_START( zaxxon_samples ) +MACHINE_CONFIG_START(zaxxon_state::zaxxon_samples) MCFG_SOUND_ADD("samples", SAMPLES, 0) MCFG_SAMPLES_CHANNELS(12) MCFG_SAMPLES_NAMES(zaxxon_sample_names) @@ -192,7 +192,7 @@ static const char *const congo_sample_names[] = }; -MACHINE_CONFIG_START( congo_samples ) +MACHINE_CONFIG_START(zaxxon_state::congo_samples) MCFG_SOUND_ADD("samples", SAMPLES, 0) MCFG_SAMPLES_CHANNELS(5) MCFG_SAMPLES_NAMES(congo_sample_names) |