summaryrefslogtreecommitdiffstats
path: root/src/mame/drivers
diff options
context:
space:
mode:
authorGravatarGravatar Vas Crabb <vas@vastheman.com>2018-05-08 07:35:22 +1000
committerGravatarGravatar Vas Crabb <vas@vastheman.com>2018-05-08 07:35:22 +1000
commit4ef4464aec13029fa7e394671743e9ea96394528 (patch) (github)
tree757cd23c65c626d63f4c98afb366362f4c2d6bdb /src/mame/drivers
parent765d625ac78ea14cec1e1a84c56567d980924869 (diff)
downloadmame-4ef4464aec13029fa7e394671743e9ea96394528.tar.bz2
mame-4ef4464aec13029fa7e394671743e9ea96394528.zip
Add support for custom device constructors when replacing devices.
Current syntax: MCFG_DEVICE_REPLACE(tag_or_finder, TYPE, ...) Next-generation syntax: TYPE(config.replace(), tag_or_finder, ...) (nw) Kill off some more low-value macros that aren't needed any more, and get rid of the token-pasting voodoo and casts in the discrete sound macros.
Diffstat (limited to 'src/mame/drivers')
-rw-r--r--src/mame/drivers/8080bw.cpp15
-rw-r--r--src/mame/drivers/abc80x.cpp11
-rw-r--r--src/mame/drivers/alinvade.cpp4
-rw-r--r--src/mame/drivers/atarifb.cpp6
-rw-r--r--src/mame/drivers/blockade.cpp5
-rw-r--r--src/mame/drivers/bloodbro.cpp2
-rw-r--r--src/mame/drivers/bsktball.cpp3
-rw-r--r--src/mame/drivers/btime.cpp5
-rw-r--r--src/mame/drivers/by35.cpp5
-rw-r--r--src/mame/drivers/canyon.cpp3
-rw-r--r--src/mame/drivers/circus.cpp12
-rw-r--r--src/mame/drivers/circusc.cpp6
-rw-r--r--src/mame/drivers/cliffhgr.cpp3
-rw-r--r--src/mame/drivers/cninja.cpp2
-rw-r--r--src/mame/drivers/darius.cpp58
-rw-r--r--src/mame/drivers/dragrace.cpp3
-rw-r--r--src/mame/drivers/esd16.cpp2
-rw-r--r--src/mame/drivers/expro02.cpp6
-rw-r--r--src/mame/drivers/firetrk.cpp9
-rw-r--r--src/mame/drivers/galaga.cpp9
-rw-r--r--src/mame/drivers/galaxian.cpp8
-rw-r--r--src/mame/drivers/goldnpkr.cpp34
-rw-r--r--src/mame/drivers/grchamp.cpp3
-rw-r--r--src/mame/drivers/gyruss.cpp5
-rw-r--r--src/mame/drivers/hitme.cpp3
-rw-r--r--src/mame/drivers/ironhors.cpp5
-rw-r--r--src/mame/drivers/itgamble.cpp4
-rw-r--r--src/mame/drivers/lockon.cpp18
-rw-r--r--src/mame/drivers/m79amb.cpp4
-rw-r--r--src/mame/drivers/madalien.cpp4
-rw-r--r--src/mame/drivers/megasys1.cpp4
-rw-r--r--src/mame/drivers/ninjaw.cpp24
-rw-r--r--src/mame/drivers/nitedrvr.cpp3
-rw-r--r--src/mame/drivers/norautp.cpp19
-rw-r--r--src/mame/drivers/orbit.cpp3
-rw-r--r--src/mame/drivers/othunder.cpp18
-rw-r--r--src/mame/drivers/phoenix.cpp3
-rw-r--r--src/mame/drivers/polepos.cpp3
-rw-r--r--src/mame/drivers/poolshrk.cpp3
-rw-r--r--src/mame/drivers/powerins.cpp2
-rw-r--r--src/mame/drivers/quantum.cpp6
-rw-r--r--src/mame/drivers/simpl156.cpp2
-rw-r--r--src/mame/drivers/skydiver.cpp3
-rw-r--r--src/mame/drivers/skyraid.cpp3
-rw-r--r--src/mame/drivers/snk6502.cpp7
-rw-r--r--src/mame/drivers/snowbros.cpp2
-rw-r--r--src/mame/drivers/sprint2.cpp9
-rw-r--r--src/mame/drivers/sprint4.cpp3
-rw-r--r--src/mame/drivers/starshp1.cpp3
-rw-r--r--src/mame/drivers/subs.cpp3
-rw-r--r--src/mame/drivers/taito_z.cpp120
-rw-r--r--src/mame/drivers/taitosj.cpp4
-rw-r--r--src/mame/drivers/tank8.cpp3
-rw-r--r--src/mame/drivers/topspeed.cpp18
-rw-r--r--src/mame/drivers/triplhnt.cpp3
-rw-r--r--src/mame/drivers/tumbleb.cpp4
-rw-r--r--src/mame/drivers/uapce.cpp5
-rw-r--r--src/mame/drivers/ultratnk.cpp3
-rw-r--r--src/mame/drivers/videopin.cpp3
-rw-r--r--src/mame/drivers/vip.cpp5
-rw-r--r--src/mame/drivers/vixen.cpp5
-rw-r--r--src/mame/drivers/warriorb.cpp24
-rw-r--r--src/mame/drivers/wiz.cpp5
-rw-r--r--src/mame/drivers/x68k.cpp6
-rw-r--r--src/mame/drivers/xexex.cpp12
65 files changed, 213 insertions, 387 deletions
diff --git a/src/mame/drivers/8080bw.cpp b/src/mame/drivers/8080bw.cpp
index 06a03a192a2..516ec4a46ca 100644
--- a/src/mame/drivers/8080bw.cpp
+++ b/src/mame/drivers/8080bw.cpp
@@ -1584,8 +1584,7 @@ MACHINE_CONFIG_START(_8080bw_state::schaser)
MCFG_SN76477_ENABLE(1) // enable
MCFG_SOUND_ROUTE(0, "discrete", 1.0, 0)
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(schaser)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, schaser_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
@@ -1924,8 +1923,7 @@ MACHINE_CONFIG_START(_8080bw_state::lupin3)
MCFG_SAMPLES_NAMES(lupin3_sample_names)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(indianbt)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, indianbt_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
@@ -2075,8 +2073,7 @@ MACHINE_CONFIG_START(_8080bw_state::polaris)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(polaris)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, polaris_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
@@ -2203,8 +2200,7 @@ MACHINE_CONFIG_START(_8080bw_state::ballbomb)
/* sound hardware */
invaders_samples_audio(config);
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(ballbomb)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, ballbomb_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
@@ -2453,8 +2449,7 @@ MACHINE_CONFIG_START(_8080bw_state::indianbt)
/* sound hardware */
invaders_samples_audio(config);
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(indianbt)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, indianbt_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/abc80x.cpp b/src/mame/drivers/abc80x.cpp
index 8f21826e8bf..176355ebbc2 100644
--- a/src/mame/drivers/abc80x.cpp
+++ b/src/mame/drivers/abc80x.cpp
@@ -161,7 +161,7 @@ Notes:
// DISCRETE_SOUND( abc800 )
//-------------------------------------------------
-static DISCRETE_SOUND_START( abc800 )
+static DISCRETE_SOUND_START( abc800_discrete )
DISCRETE_INPUT_LOGIC(NODE_01)
DISCRETE_OUTPUT(NODE_01, 5000)
DISCRETE_SOUND_END
@@ -1162,8 +1162,7 @@ MACHINE_CONFIG_START(abc800c_state::abc800c)
// sound hardware
MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DEVICE_ADD(DISCRETE_TAG, DISCRETE)
- MCFG_DISCRETE_INTF(abc800)
+ MCFG_DEVICE_ADD(DISCRETE_TAG, DISCRETE, abc800_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
// peripheral hardware
@@ -1238,8 +1237,7 @@ MACHINE_CONFIG_START(abc800m_state::abc800m)
// sound hardware
MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DEVICE_ADD(DISCRETE_TAG, DISCRETE)
- MCFG_DISCRETE_INTF(abc800)
+ MCFG_DEVICE_ADD(DISCRETE_TAG, DISCRETE, abc800_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
// peripheral hardware
@@ -1316,8 +1314,7 @@ MACHINE_CONFIG_START(abc802_state::abc802)
// sound hardware
MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DEVICE_ADD(DISCRETE_TAG, DISCRETE)
- MCFG_DISCRETE_INTF(abc800)
+ MCFG_DEVICE_ADD(DISCRETE_TAG, DISCRETE, abc800_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
// peripheral hardware
diff --git a/src/mame/drivers/alinvade.cpp b/src/mame/drivers/alinvade.cpp
index b052de92823..20e15526336 100644
--- a/src/mame/drivers/alinvade.cpp
+++ b/src/mame/drivers/alinvade.cpp
@@ -62,7 +62,7 @@ static const discrete_dac_r1_ladder alinvade_music_dac =
#define ALINVADE_MUSIC_CLK (75000)
-DISCRETE_SOUND_START(alinvade)
+DISCRETE_SOUND_START(alinvade_discrete)
DISCRETE_INPUT_DATA (NODE_01)
DISCRETE_NOTE(NODE_20, 1, ALINVADE_MUSIC_CLK, NODE_01, 255, 5, DISC_CLK_IS_FREQ)
@@ -222,7 +222,7 @@ MACHINE_CONFIG_START(alinvade_state::alinvade)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DISCRETE_ADD("discrete", 0, alinvade)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, alinvade_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/atarifb.cpp b/src/mame/drivers/atarifb.cpp
index 04304a2df77..4e2aeec7743 100644
--- a/src/mame/drivers/atarifb.cpp
+++ b/src/mame/drivers/atarifb.cpp
@@ -579,8 +579,7 @@ MACHINE_CONFIG_START(atarifb_state::atarifb)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(atarifb)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, atarifb_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.18)
MACHINE_CONFIG_END
@@ -606,8 +605,7 @@ MACHINE_CONFIG_START(atarifb_state::abaseb)
MCFG_SCREEN_UPDATE_DRIVER(atarifb_state, screen_update_abaseb)
/* sound hardware */
- MCFG_DEVICE_REPLACE("discrete", DISCRETE, 0)
- MCFG_DISCRETE_INTF(abaseb)
+ MCFG_DEVICE_REPLACE("discrete", DISCRETE, abaseb_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.24)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/blockade.cpp b/src/mame/drivers/blockade.cpp
index e901307dbc7..d6a52906f5b 100644
--- a/src/mame/drivers/blockade.cpp
+++ b/src/mame/drivers/blockade.cpp
@@ -387,7 +387,7 @@ TILE_GET_INFO_MEMBER( blockade_state::tile_info )
#define BLOCKADE_NOTE_DATA NODE_01
#define BLOCKADE_NOTE NODE_02
-DISCRETE_SOUND_START( blockade )
+DISCRETE_SOUND_START( blockade_discrete )
DISCRETE_INPUT_DATA (BLOCKADE_NOTE_DATA)
/************************************************/
@@ -489,8 +489,7 @@ MACHINE_CONFIG_START(blockade_state::blockade)
MCFG_SAMPLES_NAMES(blockade_sample_names)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(blockade)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, blockade_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/bloodbro.cpp b/src/mame/drivers/bloodbro.cpp
index c9368c696e7..ed46f5b45c9 100644
--- a/src/mame/drivers/bloodbro.cpp
+++ b/src/mame/drivers/bloodbro.cpp
@@ -591,7 +591,7 @@ MACHINE_CONFIG_START(bloodbro_state::weststry)
// Bootleg sound hardware is close copy of Seibu, but uses different interrupts
- MCFG_OKIM6295_REPLACE("oki", XTAL(20'000'000)/16, PIN7_HIGH) /* 1.25MHz - verified on PCB */
+ MCFG_DEVICE_REPLACE("oki", OKIM6295, XTAL(20'000'000)/16, okim6295_device::PIN7_HIGH) /* 1.25MHz - verified on PCB */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_DEVICE_REPLACE("ymsnd", YM3812, XTAL(20'000'000)/4) /* ~4.9MHz - see notes at top */
diff --git a/src/mame/drivers/bsktball.cpp b/src/mame/drivers/bsktball.cpp
index 0597d11b02a..3868ce84d7c 100644
--- a/src/mame/drivers/bsktball.cpp
+++ b/src/mame/drivers/bsktball.cpp
@@ -272,8 +272,7 @@ MACHINE_CONFIG_START(bsktball_state::bsktball)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(bsktball)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, bsktball_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/btime.cpp b/src/mame/drivers/btime.cpp
index e90be5f07b9..7254eecbafe 100644
--- a/src/mame/drivers/btime.cpp
+++ b/src/mame/drivers/btime.cpp
@@ -1188,7 +1188,7 @@ static const discrete_mixer_desc btime_sound_mixer_desc =
static const discrete_op_amp_filt_info btime_opamp_desc =
{BTIME_R51, 0, BTIME_R50, 0, BTIME_R49, CAP_U(0.068), CAP_U(0.068), 0, 0, 5.0, -5.0};
-static DISCRETE_SOUND_START( btime_sound )
+static DISCRETE_SOUND_START( btime_sound_discrete )
DISCRETE_INPUTX_STREAM(NODE_01, 0, 5.0/32767.0, 0)
DISCRETE_INPUTX_STREAM(NODE_02, 1, 5.0/32767.0, 0)
@@ -1326,8 +1326,7 @@ MACHINE_CONFIG_START(btime_state::btime)
MCFG_SOUND_ROUTE(1, "discrete", 1.0, 4)
MCFG_SOUND_ROUTE(2, "discrete", 1.0, 5)
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(btime_sound)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, btime_sound_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/by35.cpp b/src/mame/drivers/by35.cpp
index ef66760ba81..31518d1c195 100644
--- a/src/mame/drivers/by35.cpp
+++ b/src/mame/drivers/by35.cpp
@@ -1060,7 +1060,7 @@ static const discrete_op_amp_filt_info as2888_preamp_info = {
};
-static DISCRETE_SOUND_START(as2888)
+static DISCRETE_SOUND_START(as2888_discrete)
DISCRETE_INPUT_DATA(NODE_08) // Start Sustain Attenuation from 555 circuit
DISCRETE_INPUT_LOGIC(NODE_01) // Binary Counter B output (divide by 1) T2
@@ -1138,8 +1138,7 @@ MACHINE_CONFIG_END
MACHINE_CONFIG_START(as2888_state::as2888_audio)
MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(as2888)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, as2888_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
MCFG_DEVICE_MODIFY("pia_u11")
diff --git a/src/mame/drivers/canyon.cpp b/src/mame/drivers/canyon.cpp
index 228716baddd..076c4414e6f 100644
--- a/src/mame/drivers/canyon.cpp
+++ b/src/mame/drivers/canyon.cpp
@@ -272,8 +272,7 @@ MACHINE_CONFIG_START(canyon_state::canyon)
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(canyon)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, canyon_discrete)
MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/circus.cpp b/src/mame/drivers/circus.cpp
index 3382872938e..20b3fa01686 100644
--- a/src/mame/drivers/circus.cpp
+++ b/src/mame/drivers/circus.cpp
@@ -312,8 +312,7 @@ MACHINE_CONFIG_START(circus_state::circus)
MCFG_SAMPLES_NAMES(circus_sample_names)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(circus)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, circus_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
@@ -347,8 +346,7 @@ MACHINE_CONFIG_START(circus_state::robotbwl)
MCFG_SAMPLES_NAMES(robotbwl_sample_names)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(robotbwl)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, robotbwl_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
@@ -389,8 +387,7 @@ MACHINE_CONFIG_START(circus_state::crash)
MCFG_SAMPLES_NAMES(crash_sample_names)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(crash)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, crash_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
MACHINE_CONFIG_END
@@ -423,8 +420,7 @@ MACHINE_CONFIG_START(circus_state::ripcord)
MCFG_SAMPLES_NAMES(ripcord_sample_names)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(circus)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, circus_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/circusc.cpp b/src/mame/drivers/circusc.cpp
index 658176a16ef..9970cb079bf 100644
--- a/src/mame/drivers/circusc.cpp
+++ b/src/mame/drivers/circusc.cpp
@@ -318,7 +318,7 @@ static const discrete_mixer_desc circusc_mixer_desc =
CAP_U(0.47),
0, 1};
-static DISCRETE_SOUND_START( circusc )
+static DISCRETE_SOUND_START( circusc_discrete )
DISCRETE_INPUTX_STREAM(NODE_01, 0, 1.0, 0)
DISCRETE_INPUTX_STREAM(NODE_02, 1, 1.0, 0)
@@ -395,9 +395,7 @@ MACHINE_CONFIG_START(circusc_state::circusc)
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_DEVICE_ADD("fltdisc", DISCRETE)
-
- MCFG_DISCRETE_INTF(circusc)
+ MCFG_DEVICE_ADD("fltdisc", DISCRETE, circusc_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/cliffhgr.cpp b/src/mame/drivers/cliffhgr.cpp
index 564dd70c499..176a8bb5486 100644
--- a/src/mame/drivers/cliffhgr.cpp
+++ b/src/mame/drivers/cliffhgr.cpp
@@ -707,8 +707,7 @@ MACHINE_CONFIG_START(cliffhgr_state::cliffhgr)
MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(cliffhgr)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, cliffhgr_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/cninja.cpp b/src/mame/drivers/cninja.cpp
index fb93918aa56..380773ba46b 100644
--- a/src/mame/drivers/cninja.cpp
+++ b/src/mame/drivers/cninja.cpp
@@ -1007,7 +1007,7 @@ MACHINE_CONFIG_START(cninja_state::cninjabl2)
MCFG_DEVICE_REMOVE("ymsnd")
- MCFG_OKIM6295_REPLACE("oki1", XTAL(32'220'000) / 32, PIN7_LOW)
+ MCFG_DEVICE_REPLACE("oki1", OKIM6295, XTAL(32'220'000) / 32, okim6295_device::PIN7_LOW)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_DEVICE_ADDRESS_MAP(0, cninjabl2_oki_map)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/darius.cpp b/src/mame/drivers/darius.cpp
index 6b333915b7b..ae9722918eb 100644
--- a/src/mame/drivers/darius.cpp
+++ b/src/mame/drivers/darius.cpp
@@ -797,44 +797,26 @@ MACHINE_CONFIG_START(darius_state::darius)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "msm5205.l", 1.0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "msm5205.r", 1.0)
- MCFG_FILTER_VOLUME_ADD("filter0.0l", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("filter0.0r", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("filter0.1l", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("filter0.1r", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("filter0.2l", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("filter0.2r", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("filter0.3l", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("filter0.3r", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
-
- MCFG_FILTER_VOLUME_ADD("filter1.0l", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("filter1.0r", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("filter1.1l", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("filter1.1r", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("filter1.2l", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("filter1.2r", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("filter1.3l", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("filter1.3r", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
-
- MCFG_FILTER_VOLUME_ADD("msm5205.l", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("msm5205.r", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
+ FILTER_VOLUME(config, "filter0.0l").add_route(ALL_OUTPUTS, "lspeaker", 1.0);
+ FILTER_VOLUME(config, "filter0.0r").add_route(ALL_OUTPUTS, "rspeaker", 1.0);
+ FILTER_VOLUME(config, "filter0.1l").add_route(ALL_OUTPUTS, "lspeaker", 1.0);
+ FILTER_VOLUME(config, "filter0.1r").add_route(ALL_OUTPUTS, "rspeaker", 1.0);
+ FILTER_VOLUME(config, "filter0.2l").add_route(ALL_OUTPUTS, "lspeaker", 1.0);
+ FILTER_VOLUME(config, "filter0.2r").add_route(ALL_OUTPUTS, "rspeaker", 1.0);
+ FILTER_VOLUME(config, "filter0.3l").add_route(ALL_OUTPUTS, "lspeaker", 1.0);
+ FILTER_VOLUME(config, "filter0.3r").add_route(ALL_OUTPUTS, "rspeaker", 1.0);
+
+ FILTER_VOLUME(config, "filter1.0l").add_route(ALL_OUTPUTS, "lspeaker", 1.0);
+ FILTER_VOLUME(config, "filter1.0r").add_route(ALL_OUTPUTS, "rspeaker", 1.0);
+ FILTER_VOLUME(config, "filter1.1l").add_route(ALL_OUTPUTS, "lspeaker", 1.0);
+ FILTER_VOLUME(config, "filter1.1r").add_route(ALL_OUTPUTS, "rspeaker", 1.0);
+ FILTER_VOLUME(config, "filter1.2l").add_route(ALL_OUTPUTS, "lspeaker", 1.0);
+ FILTER_VOLUME(config, "filter1.2r").add_route(ALL_OUTPUTS, "rspeaker", 1.0);
+ FILTER_VOLUME(config, "filter1.3l").add_route(ALL_OUTPUTS, "lspeaker", 1.0);
+ FILTER_VOLUME(config, "filter1.3r").add_route(ALL_OUTPUTS, "rspeaker", 1.0);
+
+ FILTER_VOLUME(config, "msm5205.l").add_route(ALL_OUTPUTS, "lspeaker", 1.0);
+ FILTER_VOLUME(config, "msm5205.r").add_route(ALL_OUTPUTS, "rspeaker", 1.0);
MCFG_DEVICE_ADD("ciu", PC060HA, 0)
MCFG_PC060HA_MASTER_CPU("maincpu")
diff --git a/src/mame/drivers/dragrace.cpp b/src/mame/drivers/dragrace.cpp
index 71c501f07de..3956980e000 100644
--- a/src/mame/drivers/dragrace.cpp
+++ b/src/mame/drivers/dragrace.cpp
@@ -298,8 +298,7 @@ MACHINE_CONFIG_START(dragrace_state::dragrace)
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(dragrace)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, dragrace_discrete)
MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
diff --git a/src/mame/drivers/esd16.cpp b/src/mame/drivers/esd16.cpp
index ce61152f031..63e48a4498f 100644
--- a/src/mame/drivers/esd16.cpp
+++ b/src/mame/drivers/esd16.cpp
@@ -693,7 +693,7 @@ MACHINE_CONFIG_START(esd16_state::jumppop)
MCFG_DEVICE_REPLACE("ymsnd", YM3812, XTAL(14'000'000)/4) /* 3.5MHz - Verified */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
- MCFG_OKIM6295_REPLACE("oki", XTAL(14'000'000)/16, PIN7_HIGH) /* 875kHz - Verified */
+ MCFG_DEVICE_REPLACE("oki", OKIM6295, XTAL(14'000'000)/16, okim6295_device::PIN7_HIGH) /* 875kHz - Verified */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/expro02.cpp b/src/mame/drivers/expro02.cpp
index a4d2cf950dd..9920572e602 100644
--- a/src/mame/drivers/expro02.cpp
+++ b/src/mame/drivers/expro02.cpp
@@ -995,7 +995,7 @@ MACHINE_CONFIG_START(expro02_state::supmodel)
comad_noview2(config);
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(supmodel_map)
- MCFG_OKIM6295_REPLACE("oki", 1584000, PIN7_HIGH) // clock frequency & pin 7 not verified
+ MCFG_DEVICE_REPLACE("oki", OKIM6295, 1584000, okim6295_device::PIN7_HIGH) // clock frequency & pin 7 not verified
MCFG_DEVICE_ADDRESS_MAP(0, oki_map)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
@@ -1016,7 +1016,7 @@ MACHINE_CONFIG_START(expro02_state::galhustl)
comad_noview2(config);
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(galhustl_map)
- MCFG_OKIM6295_REPLACE("oki", 1056000, PIN7_HIGH) // clock frequency & pin 7 not verified
+ MCFG_DEVICE_REPLACE("oki", OKIM6295, 1056000, okim6295_device::PIN7_HIGH) // clock frequency & pin 7 not verified
MCFG_DEVICE_ADDRESS_MAP(0, oki_map)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
@@ -1029,7 +1029,7 @@ MACHINE_CONFIG_START(expro02_state::zipzap)
/* basic machine hardware */
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(zipzap_map)
- MCFG_OKIM6295_REPLACE("oki", 1056000, PIN7_HIGH) // clock frequency & pin 7 not verified
+ MCFG_DEVICE_REPLACE("oki", OKIM6295, 1056000, okim6295_device::PIN7_HIGH) // clock frequency & pin 7 not verified
MCFG_DEVICE_ADDRESS_MAP(0, oki_map)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
diff --git a/src/mame/drivers/firetrk.cpp b/src/mame/drivers/firetrk.cpp
index bc3d7dfb5ea..7899763774b 100644
--- a/src/mame/drivers/firetrk.cpp
+++ b/src/mame/drivers/firetrk.cpp
@@ -878,8 +878,7 @@ MACHINE_CONFIG_START(firetrk_state::firetrk)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(firetrk)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, firetrk_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
@@ -903,8 +902,7 @@ MACHINE_CONFIG_START(firetrk_state::superbug)
MCFG_PALETTE_INIT_OWNER(firetrk_state, firetrk)
/* sound hardware */
- MCFG_DEVICE_REPLACE("discrete", DISCRETE, 0)
- MCFG_DISCRETE_INTF(superbug)
+ MCFG_DEVICE_REPLACE("discrete", DISCRETE, superbug_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
@@ -928,8 +926,7 @@ MACHINE_CONFIG_START(firetrk_state::montecar)
MCFG_PALETTE_INIT_OWNER(firetrk_state,montecar)
/* sound hardware */
- MCFG_DEVICE_REPLACE("discrete", DISCRETE, 0)
- MCFG_DISCRETE_INTF(montecar)
+ MCFG_DEVICE_REPLACE("discrete", DISCRETE, montecar_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/galaga.cpp b/src/mame/drivers/galaga.cpp
index d2f52325bf3..10b8db3f640 100644
--- a/src/mame/drivers/galaga.cpp
+++ b/src/mame/drivers/galaga.cpp
@@ -1656,8 +1656,7 @@ MACHINE_CONFIG_START(bosco_state::bosco)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.90 * 10.0 / 16.0)
/* discrete circuit on the 54XX outputs */
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(bosco)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, bosco_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.90)
MACHINE_CONFIG_END
@@ -1732,8 +1731,7 @@ MACHINE_CONFIG_START(galaga_state::galaga)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.90 * 10.0 / 16.0)
/* discrete circuit on the 54XX outputs */
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(galaga)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, galaga_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.90)
MACHINE_CONFIG_END
@@ -1838,8 +1836,7 @@ MACHINE_CONFIG_START(xevious_state::xevious)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.90 * 10.0 / 16.0)
/* discrete circuit on the 54XX outputs */
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(galaga)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, galaga_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.90)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/galaxian.cpp b/src/mame/drivers/galaxian.cpp
index 82aa7fbc5fc..19cf93e30be 100644
--- a/src/mame/drivers/galaxian.cpp
+++ b/src/mame/drivers/galaxian.cpp
@@ -5731,7 +5731,7 @@ static const discrete_mixer_desc konami_sound_mixer_desc =
0, /* modelled separately */
0, 1};
-static DISCRETE_SOUND_START( konami_sound )
+static DISCRETE_SOUND_START( konami_sound_discrete )
DISCRETE_INPUTX_STREAM(NODE_01, 0, 1.0, 0)
DISCRETE_INPUTX_STREAM(NODE_02, 1, 1.0, 0)
@@ -5840,8 +5840,7 @@ MACHINE_CONFIG_START(galaxian_state::konami_sound_1x_ay8910)
MCFG_SOUND_ROUTE(1, "konami", 1.0, 1)
MCFG_SOUND_ROUTE(2, "konami", 1.0, 2)
- MCFG_DEVICE_ADD("konami", DISCRETE)
- MCFG_DISCRETE_INTF(konami_sound)
+ MCFG_DEVICE_ADD("konami", DISCRETE, konami_sound_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.75)
MACHINE_CONFIG_END
@@ -5872,8 +5871,7 @@ MACHINE_CONFIG_START(galaxian_state::konami_sound_2x_ay8910)
MCFG_SOUND_ROUTE(1, "konami", 1.0, 4)
MCFG_SOUND_ROUTE(2, "konami", 1.0, 5)
- MCFG_DEVICE_ADD("konami", DISCRETE)
- MCFG_DISCRETE_INTF(konami_sound)
+ MCFG_DEVICE_ADD("konami", DISCRETE, konami_sound_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/goldnpkr.cpp b/src/mame/drivers/goldnpkr.cpp
index c0fb21f356c..4e7ee01a96f 100644
--- a/src/mame/drivers/goldnpkr.cpp
+++ b/src/mame/drivers/goldnpkr.cpp
@@ -4187,7 +4187,7 @@ static const discrete_dac_r1_ladder dac_goldnpkr_ladder =
// 0, /* resistor tied to ground */
};
-static DISCRETE_SOUND_START( goldnpkr )
+static DISCRETE_SOUND_START( goldnpkr_discrete )
/*
- bits -
76543210
@@ -4250,7 +4250,7 @@ static const discrete_dac_r1_ladder dac_pottnpkr_ladder =
0 /* no filtering cap tied to ground */
};
-static DISCRETE_SOUND_START( pottnpkr )
+static DISCRETE_SOUND_START( pottnpkr_discrete )
/*
- bits -
76543210
@@ -4334,8 +4334,7 @@ MACHINE_CONFIG_START(goldnpkr_state::goldnpkr)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(goldnpkr)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, goldnpkr_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
@@ -4353,8 +4352,7 @@ MACHINE_CONFIG_START(goldnpkr_state::pottnpkr)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(pottnpkr)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, pottnpkr_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
@@ -4376,8 +4374,7 @@ MACHINE_CONFIG_START(goldnpkr_state::witchcrd)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(goldnpkr)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, goldnpkr_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
@@ -4425,8 +4422,7 @@ MACHINE_CONFIG_START(goldnpkr_state::wildcard)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(goldnpkr)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, goldnpkr_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
@@ -4450,8 +4446,7 @@ MACHINE_CONFIG_START(goldnpkr_state::wcrdxtnd)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(goldnpkr)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, goldnpkr_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
@@ -4503,8 +4498,7 @@ MACHINE_CONFIG_START(goldnpkr_state::genie)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(goldnpkr)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, goldnpkr_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
@@ -4526,8 +4520,7 @@ MACHINE_CONFIG_START(goldnpkr_state::geniea)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(goldnpkr)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, goldnpkr_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
@@ -4544,8 +4537,7 @@ MACHINE_CONFIG_START(goldnpkr_state::mondial)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(goldnpkr)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, goldnpkr_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
@@ -4570,8 +4562,7 @@ MACHINE_CONFIG_START(goldnpkr_state::bchancep)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(pottnpkr)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, pottnpkr_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
@@ -4746,8 +4737,7 @@ MACHINE_CONFIG_START(blitz_state::megadpkr)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(goldnpkr)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, goldnpkr_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/grchamp.cpp b/src/mame/drivers/grchamp.cpp
index bd81552b700..21fd9637dbd 100644
--- a/src/mame/drivers/grchamp.cpp
+++ b/src/mame/drivers/grchamp.cpp
@@ -789,8 +789,7 @@ MACHINE_CONFIG_START(grchamp_state::grchamp)
MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(*this, grchamp_state, portB_2_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.2)
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(grchamp)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, grchamp_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/gyruss.cpp b/src/mame/drivers/gyruss.cpp
index 87100c0b8ea..eed631e1772 100644
--- a/src/mame/drivers/gyruss.cpp
+++ b/src/mame/drivers/gyruss.cpp
@@ -386,7 +386,7 @@ static const discrete_mixer_desc konami_left_mixer_desc =
CAP_U(1), /* DC - Removal, not in schematics */
0, 1};
-static DISCRETE_SOUND_START( gyruss_sound )
+static DISCRETE_SOUND_START( gyruss_sound_discrete )
/* Chip 1 right */
DISCRETE_INPUTX_STREAM(NODE_01, 0, 1.0, 0)
@@ -557,8 +557,7 @@ MACHINE_CONFIG_START(gyruss_state::gyruss)
MCFG_SOUND_ROUTE(1, "discrete", 1.0, 13)
MCFG_SOUND_ROUTE(2, "discrete", 1.0, 14)
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(gyruss_sound)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, gyruss_sound_discrete)
MCFG_SOUND_ROUTE(0, "rspeaker", 1.0)
MCFG_SOUND_ROUTE(1, "lspeaker", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/hitme.cpp b/src/mame/drivers/hitme.cpp
index b14eeff4d05..377744402e1 100644
--- a/src/mame/drivers/hitme.cpp
+++ b/src/mame/drivers/hitme.cpp
@@ -336,8 +336,7 @@ MACHINE_CONFIG_START(hitme_state::hitme)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(hitme)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, hitme_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/ironhors.cpp b/src/mame/drivers/ironhors.cpp
index 2c816e9ebee..b74b9951248 100644
--- a/src/mame/drivers/ironhors.cpp
+++ b/src/mame/drivers/ironhors.cpp
@@ -319,7 +319,7 @@ static const discrete_mixer_desc ironhors_mixer_desc_final =
0,
0, 1};
-static DISCRETE_SOUND_START( ironhors )
+static DISCRETE_SOUND_START( ironhors_discrete )
DISCRETE_INPUTX_STREAM(NODE_01, 0, 5.0, 0)
DISCRETE_INPUTX_STREAM(NODE_02, 1, 5.0, 0)
@@ -418,8 +418,7 @@ MACHINE_CONFIG_START(ironhors_state::ironhors)
MCFG_SOUND_ROUTE(2, "disc_ih", 1.0, 2)
MCFG_SOUND_ROUTE(3, "disc_ih", 1.0, 3)
- MCFG_DEVICE_ADD("disc_ih", DISCRETE)
- MCFG_DISCRETE_INTF(ironhors)
+ MCFG_DEVICE_ADD("disc_ih", DISCRETE, ironhors_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/itgamble.cpp b/src/mame/drivers/itgamble.cpp
index 215dd816eea..85ff3b54d4c 100644
--- a/src/mame/drivers/itgamble.cpp
+++ b/src/mame/drivers/itgamble.cpp
@@ -242,7 +242,7 @@ MACHINE_CONFIG_START(itgamble_state::mnumber)
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_CLOCK(MNUMBER_MAIN_CLOCK/2) /* probably the wrong CPU */
- MCFG_OKIM6295_REPLACE("oki", MNUMBER_SND_CLOCK/16, PIN7_HIGH) /* clock frequency & pin 7 not verified */
+ MCFG_DEVICE_REPLACE("oki", OKIM6295, MNUMBER_SND_CLOCK/16, okim6295_device::PIN7_HIGH) /* clock frequency & pin 7 not verified */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
@@ -254,7 +254,7 @@ static MACHINE_CONFIG_START( ejollyx5 )
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_CLOCK(EJOLLYX5_MAIN_CLOCK/2) /* up to 10MHz.*/
- MCFG_OKIM6295_REPLACE("oki", MNUMBER_SND_CLOCK/16, PIN7_HIGH) /* clock frequency & pin 7 not verified */
+ MCFG_DEVICE_REPLACE("oki", OKIM6295, MNUMBER_SND_CLOCK/16, okim6295_device::PIN7_HIGH) /* clock frequency & pin 7 not verified */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
#endif
diff --git a/src/mame/drivers/lockon.cpp b/src/mame/drivers/lockon.cpp
index 796248ad3bd..000a14ed653 100644
--- a/src/mame/drivers/lockon.cpp
+++ b/src/mame/drivers/lockon.cpp
@@ -519,18 +519,12 @@ MACHINE_CONFIG_START(lockon_state::lockon)
MCFG_SOUND_ROUTE(3, "f2203.3l", 1.0)
MCFG_SOUND_ROUTE(3, "f2203.3r", 1.0)
- MCFG_FILTER_VOLUME_ADD("f2203.1l", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("f2203.1r", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("f2203.2l", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("f2203.2r", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("f2203.3l", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("f2203.3r", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
+ FILTER_VOLUME(config, "f2203.1l").add_route(ALL_OUTPUTS, "lspeaker", 1.0);
+ FILTER_VOLUME(config, "f2203.1r").add_route(ALL_OUTPUTS, "rspeaker", 1.0);
+ FILTER_VOLUME(config, "f2203.2l").add_route(ALL_OUTPUTS, "lspeaker", 1.0);
+ FILTER_VOLUME(config, "f2203.2r").add_route(ALL_OUTPUTS, "rspeaker", 1.0);
+ FILTER_VOLUME(config, "f2203.3l").add_route(ALL_OUTPUTS, "lspeaker", 1.0);
+ FILTER_VOLUME(config, "f2203.3r").add_route(ALL_OUTPUTS, "rspeaker", 1.0);
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/m79amb.cpp b/src/mame/drivers/m79amb.cpp
index dc953c96e06..c2145dad509 100644
--- a/src/mame/drivers/m79amb.cpp
+++ b/src/mame/drivers/m79amb.cpp
@@ -212,9 +212,7 @@ MACHINE_CONFIG_START(m79amb_state::m79amb)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(m79amb)
-
+ MCFG_DEVICE_ADD("discrete", DISCRETE, m79amb_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/madalien.cpp b/src/mame/drivers/madalien.cpp
index 9bc9700b42b..fd802f00054 100644
--- a/src/mame/drivers/madalien.cpp
+++ b/src/mame/drivers/madalien.cpp
@@ -177,9 +177,7 @@ MACHINE_CONFIG_START(madalien_state::madalien)
MCFG_SOUND_ROUTE(1, "discrete", 1.0, 1)
MCFG_SOUND_ROUTE(2, "discrete", 1.0, 2)
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(madalien)
-
+ MCFG_DEVICE_ADD("discrete", DISCRETE, madalien_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/megasys1.cpp b/src/mame/drivers/megasys1.cpp
index e0d11a8667a..9f280acf1f5 100644
--- a/src/mame/drivers/megasys1.cpp
+++ b/src/mame/drivers/megasys1.cpp
@@ -1833,11 +1833,11 @@ MACHINE_CONFIG_START(megasys1_state::system_B_hayaosi1)
/* basic machine hardware */
- MCFG_OKIM6295_REPLACE("oki1", 2000000, okim6295_device::PIN7_HIGH) /* correct speed, but unknown OSC + divider combo */
+ MCFG_DEVICE_REPLACE("oki1", OKIM6295, 2000000, okim6295_device::PIN7_HIGH) /* correct speed, but unknown OSC + divider combo */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.30)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.30)
- MCFG_OKIM6295_REPLACE("oki2", 2000000, okim6295_device::PIN7_HIGH) /* correct speed, but unknown OSC + divider combo */
+ MCFG_DEVICE_REPLACE("oki2", OKIM6295, 2000000, okim6295_device::PIN7_HIGH) /* correct speed, but unknown OSC + divider combo */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.30)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.30)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/ninjaw.cpp b/src/mame/drivers/ninjaw.cpp
index ddbd00c0d3b..97ce74a7549 100644
--- a/src/mame/drivers/ninjaw.cpp
+++ b/src/mame/drivers/ninjaw.cpp
@@ -841,14 +841,10 @@ MACHINE_CONFIG_START(ninjaw_state::ninjaw)
MCFG_SOUND_ROUTE(2, "2610.2.l", 1.0)
MCFG_SOUND_ROUTE(2, "2610.2.r", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.1.l", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.1.r", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.2.l", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.2.r", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
+ FILTER_VOLUME(config, "2610.1.l").add_route(ALL_OUTPUTS, "lspeaker", 1.0);
+ FILTER_VOLUME(config, "2610.1.r").add_route(ALL_OUTPUTS, "rspeaker", 1.0);
+ FILTER_VOLUME(config, "2610.2.l").add_route(ALL_OUTPUTS, "lspeaker", 1.0);
+ FILTER_VOLUME(config, "2610.2.r").add_route(ALL_OUTPUTS, "rspeaker", 1.0);
// MCFG_DEVICE_ADD("subwoofer", SUBWOOFER, 0)
@@ -963,14 +959,10 @@ MACHINE_CONFIG_START(ninjaw_state::darius2)
MCFG_SOUND_ROUTE(2, "2610.2.l", 1.0)
MCFG_SOUND_ROUTE(2, "2610.2.r", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.1.l", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.1.r", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.2.l", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.2.r", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
+ FILTER_VOLUME(config, "2610.1.l").add_route(ALL_OUTPUTS, "lspeaker", 1.0);
+ FILTER_VOLUME(config, "2610.1.r").add_route(ALL_OUTPUTS, "rspeaker", 1.0);
+ FILTER_VOLUME(config, "2610.2.l").add_route(ALL_OUTPUTS, "lspeaker", 1.0);
+ FILTER_VOLUME(config, "2610.2.r").add_route(ALL_OUTPUTS, "rspeaker", 1.0);
// MCFG_DEVICE_ADD("subwoofer", SUBWOOFER, 0)
diff --git a/src/mame/drivers/nitedrvr.cpp b/src/mame/drivers/nitedrvr.cpp
index e58aff21939..61143b73e4b 100644
--- a/src/mame/drivers/nitedrvr.cpp
+++ b/src/mame/drivers/nitedrvr.cpp
@@ -168,8 +168,7 @@ MACHINE_CONFIG_START(nitedrvr_state::nitedrvr)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(nitedrvr)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, nitedrvr_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/norautp.cpp b/src/mame/drivers/norautp.cpp
index ca5b4586e9a..da9672cf969 100644
--- a/src/mame/drivers/norautp.cpp
+++ b/src/mame/drivers/norautp.cpp
@@ -1286,8 +1286,7 @@ MACHINE_CONFIG_START(norautp_state::noraut_base)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(norautp)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, norautp_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
@@ -1310,7 +1309,7 @@ MACHINE_CONFIG_START(norautp_state::norautpl)
/* sound hardware */
MCFG_DEVICE_MODIFY("discrete")
- MCFG_DISCRETE_INTF(kimble)
+ MCFG_DISCRETE_INTF(kimble_discrete)
MACHINE_CONFIG_END
@@ -1366,7 +1365,7 @@ MACHINE_CONFIG_START(norautp_state::kimble)
/* sound hardware */
MCFG_DEVICE_MODIFY("discrete")
- MCFG_DISCRETE_INTF(kimble)
+ MCFG_DISCRETE_INTF(kimble_discrete)
MACHINE_CONFIG_END
MACHINE_CONFIG_START(norautp_state::newhilop)
@@ -1392,7 +1391,7 @@ MACHINE_CONFIG_START(norautp_state::dphl)
/* sound hardware */
MCFG_DEVICE_MODIFY("discrete")
- MCFG_DISCRETE_INTF(dphl)
+ MCFG_DISCRETE_INTF(dphl_discrete)
MACHINE_CONFIG_END
@@ -1406,7 +1405,7 @@ MACHINE_CONFIG_START(norautp_state::dphla)
/* sound hardware */
MCFG_DEVICE_MODIFY("discrete")
- MCFG_DISCRETE_INTF(dphl)
+ MCFG_DISCRETE_INTF(dphl_discrete)
MACHINE_CONFIG_END
@@ -1420,7 +1419,7 @@ MACHINE_CONFIG_START(norautp_state::kimbldhl)
/* sound hardware */
MCFG_DEVICE_MODIFY("discrete")
- MCFG_DISCRETE_INTF(kimble)
+ MCFG_DISCRETE_INTF(kimble_discrete)
MACHINE_CONFIG_END
@@ -1434,7 +1433,7 @@ MACHINE_CONFIG_START(norautp_state::dphltest)
/* sound hardware */
MCFG_DEVICE_MODIFY("discrete")
- MCFG_DISCRETE_INTF(dphl)
+ MCFG_DISCRETE_INTF(dphl_discrete)
MACHINE_CONFIG_END
@@ -1448,7 +1447,7 @@ MACHINE_CONFIG_START(norautp_state::drhl)
/* sound hardware */
MCFG_DEVICE_MODIFY("discrete")
- MCFG_DISCRETE_INTF(dphl)
+ MCFG_DISCRETE_INTF(dphl_discrete)
MACHINE_CONFIG_END
@@ -1462,7 +1461,7 @@ MACHINE_CONFIG_START(norautp_state::ssjkrpkr)
/* sound hardware */
MCFG_DEVICE_MODIFY("discrete")
- MCFG_DISCRETE_INTF(dphl)
+ MCFG_DISCRETE_INTF(dphl_discrete)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/orbit.cpp b/src/mame/drivers/orbit.cpp
index 51e424e7588..335ae5e6180 100644
--- a/src/mame/drivers/orbit.cpp
+++ b/src/mame/drivers/orbit.cpp
@@ -302,8 +302,7 @@ MACHINE_CONFIG_START(orbit_state::orbit)
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(orbit)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, orbit_discrete)
MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/othunder.cpp b/src/mame/drivers/othunder.cpp
index e80b180e7a0..60083bc073e 100644
--- a/src/mame/drivers/othunder.cpp
+++ b/src/mame/drivers/othunder.cpp
@@ -666,18 +666,12 @@ MACHINE_CONFIG_START(othunder_state::othunder)
MCFG_SOUND_ROUTE(2, "2610.2l", 1.0)
MCFG_SOUND_ROUTE(2, "2610.2r", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.0l", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.0r", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.1l", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.1r", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.2l", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.2r", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
+ FILTER_VOLUME(config, "2610.0l").add_route(ALL_OUTPUTS, "speaker", 1.0);
+ FILTER_VOLUME(config, "2610.0r").add_route(ALL_OUTPUTS, "speaker", 1.0);
+ FILTER_VOLUME(config, "2610.1l").add_route(ALL_OUTPUTS, "speaker", 1.0);
+ FILTER_VOLUME(config, "2610.1r").add_route(ALL_OUTPUTS, "speaker", 1.0);
+ FILTER_VOLUME(config, "2610.2l").add_route(ALL_OUTPUTS, "speaker", 1.0);
+ FILTER_VOLUME(config, "2610.2r").add_route(ALL_OUTPUTS, "speaker", 1.0);
MCFG_DEVICE_ADD("tc0140syt", TC0140SYT, 0)
MCFG_TC0140SYT_MASTER_CPU("maincpu")
diff --git a/src/mame/drivers/phoenix.cpp b/src/mame/drivers/phoenix.cpp
index 330307d0f9c..d69ac954459 100644
--- a/src/mame/drivers/phoenix.cpp
+++ b/src/mame/drivers/phoenix.cpp
@@ -472,8 +472,7 @@ MACHINE_CONFIG_START(phoenix_state::phoenix)
MCFG_DEVICE_ADD("cust", PHOENIX_SOUND)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.4)
- MCFG_DEVICE_ADD("discrete", DISCRETE, 120000)
- MCFG_DISCRETE_INTF(phoenix)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, 120000, phoenix_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.6)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/polepos.cpp b/src/mame/drivers/polepos.cpp
index ffb5d363263..270be0775f8 100644
--- a/src/mame/drivers/polepos.cpp
+++ b/src/mame/drivers/polepos.cpp
@@ -932,8 +932,7 @@ MACHINE_CONFIG_START(polepos_state::polepos)
MCFG_SOUND_ROUTE(1, "rspeaker", 0.80)
/* discrete circuit on the 54XX outputs */
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(polepos)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, polepos_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.90)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.90)
diff --git a/src/mame/drivers/poolshrk.cpp b/src/mame/drivers/poolshrk.cpp
index b9bf946d7a7..9b8a1c4ab06 100644
--- a/src/mame/drivers/poolshrk.cpp
+++ b/src/mame/drivers/poolshrk.cpp
@@ -240,8 +240,7 @@ MACHINE_CONFIG_START(poolshrk_state::poolshrk)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(poolshrk)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, poolshrk_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/powerins.cpp b/src/mame/drivers/powerins.cpp
index 89ecb8e075e..61c8a5fa6c9 100644
--- a/src/mame/drivers/powerins.cpp
+++ b/src/mame/drivers/powerins.cpp
@@ -362,7 +362,7 @@ MACHINE_CONFIG_START(powerins_state::powerinsa)
MCFG_MACHINE_START_OVERRIDE(powerins_state, powerinsa)
- MCFG_OKIM6295_REPLACE("oki1", 990000, PIN7_LOW) // pin7 not verified
+ MCFG_DEVICE_REPLACE("oki1", OKIM6295, 990000, okim6295_device::PIN7_LOW) // pin7 not verified
MCFG_DEVICE_ADDRESS_MAP(0, powerinsa_oki_map)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
diff --git a/src/mame/drivers/quantum.cpp b/src/mame/drivers/quantum.cpp
index 2482c9226fc..812b0aad015 100644
--- a/src/mame/drivers/quantum.cpp
+++ b/src/mame/drivers/quantum.cpp
@@ -248,7 +248,7 @@ static discrete_mixer_desc quantum_mixer = {
1.0 /* gain */
};
-static DISCRETE_SOUND_START(quantum)
+static DISCRETE_SOUND_START(quantum_discrete)
/************************************************/
/* FINAL MIX */
@@ -321,9 +321,7 @@ MACHINE_CONFIG_START(quantum_state::quantum)
MCFG_POKEY_OUTPUT_OPAMP(RES_K(1), 0.0, 5.0)
MCFG_SOUND_ROUTE(0, "discrete", 1.0, 1)
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(quantum)
-
+ MCFG_DEVICE_ADD("discrete", DISCRETE, quantum_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/simpl156.cpp b/src/mame/drivers/simpl156.cpp
index a39abe82a09..39a87160a6a 100644
--- a/src/mame/drivers/simpl156.cpp
+++ b/src/mame/drivers/simpl156.cpp
@@ -488,7 +488,7 @@ MACHINE_CONFIG_START(simpl156_state::mitchell156)
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(mitchell156_map)
- MCFG_OKIM6295_REPLACE("okimusic", 32220000/32, PIN7_HIGH)
+ MCFG_DEVICE_REPLACE("okimusic", OKIM6295, 32220000/32, okim6295_device::PIN7_HIGH)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.2)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.2)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/skydiver.cpp b/src/mame/drivers/skydiver.cpp
index 08560baef22..cba45936533 100644
--- a/src/mame/drivers/skydiver.cpp
+++ b/src/mame/drivers/skydiver.cpp
@@ -399,8 +399,7 @@ MACHINE_CONFIG_START(skydiver_state::skydiver)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(skydiver)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, skydiver_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/skyraid.cpp b/src/mame/drivers/skyraid.cpp
index 58c86c78903..28e81b05855 100644
--- a/src/mame/drivers/skyraid.cpp
+++ b/src/mame/drivers/skyraid.cpp
@@ -249,8 +249,7 @@ MACHINE_CONFIG_START(skyraid_state::skyraid)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(skyraid)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, skyraid_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/snk6502.cpp b/src/mame/drivers/snk6502.cpp
index 4e5be7d07e4..4dc7e0c3744 100644
--- a/src/mame/drivers/snk6502.cpp
+++ b/src/mame/drivers/snk6502.cpp
@@ -945,7 +945,7 @@ MACHINE_CONFIG_START(snk6502_state::satansat)
MCFG_SAMPLES_NAMES(vanguard_sample_names)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
- MCFG_DEVICE_REPLACE("sn76477.1", SN76477, 0)
+ MCFG_DEVICE_REPLACE("sn76477.1", SN76477)
// ??? GND: 2,26,27 +5V: 15,25
MCFG_SN76477_NOISE_PARAMS(RES_K(470), RES_M(1.5), CAP_P(220)) // noise + filter
MCFG_SN76477_DECAY_RES(0) // decay_res
@@ -1054,7 +1054,7 @@ MACHINE_CONFIG_START(snk6502_state::fantasy)
MCFG_SAMPLES_NAMES(fantasy_sample_names)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5)
- MCFG_DEVICE_REPLACE("sn76477.1", SN76477, 0)
+ MCFG_DEVICE_REPLACE("sn76477.1", SN76477)
// BOMB GND: 2,9,26,27 +5V: 15,25
MCFG_SN76477_NOISE_PARAMS(RES_K(470), RES_M(1.5), CAP_P(220)) // noise + filter
MCFG_SN76477_DECAY_RES(0) // decay_res
@@ -1073,8 +1073,7 @@ MACHINE_CONFIG_START(snk6502_state::fantasy)
MCFG_SN76477_ENABLE(0) // enable
MCFG_SOUND_ROUTE(0, "discrete", 1.0, 0)
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(fantasy)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, fantasy_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5)
MCFG_DEVICE_REMOVE("sn76477.2")
diff --git a/src/mame/drivers/snowbros.cpp b/src/mame/drivers/snowbros.cpp
index a854ec0f3cf..1ef3a79a560 100644
--- a/src/mame/drivers/snowbros.cpp
+++ b/src/mame/drivers/snowbros.cpp
@@ -1948,7 +1948,7 @@ MACHINE_CONFIG_START(snowbros_state::finalttr)
MCFG_SOUND_ROUTE(0, "mono", 0.08)
MCFG_SOUND_ROUTE(1, "mono", 0.08)
- MCFG_OKIM6295_REPLACE("oki", 999900, okim6295_device::PIN7_HIGH)
+ MCFG_DEVICE_REPLACE("oki", OKIM6295, 999900, okim6295_device::PIN7_HIGH)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/sprint2.cpp b/src/mame/drivers/sprint2.cpp
index 33e5041a40f..6e9554bad70 100644
--- a/src/mame/drivers/sprint2.cpp
+++ b/src/mame/drivers/sprint2.cpp
@@ -525,8 +525,7 @@ MACHINE_CONFIG_START(sprint2_state::sprint2)
MCFG_ADDRESSABLE_LATCH_Q4_OUT_CB(OUTPUT("led1")) // START LAMP2
//MCFG_ADDRESSABLE_LATCH_Q6_OUT_CB(WRITELINE(*this, sprint2_state, sprint2_spare_w))
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(sprint2)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, sprint2_discrete)
MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
MACHINE_CONFIG_END
@@ -542,8 +541,7 @@ MACHINE_CONFIG_START(sprint2_state::sprint1)
MCFG_DEVICE_REMOVE("discrete")
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(sprint1)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, sprint1_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
@@ -558,8 +556,7 @@ MACHINE_CONFIG_START(sprint2_state::dominos)
MCFG_DEVICE_REMOVE("discrete")
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(dominos)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, dominos_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/sprint4.cpp b/src/mame/drivers/sprint4.cpp
index 46675c2511d..a2a1c53eca0 100644
--- a/src/mame/drivers/sprint4.cpp
+++ b/src/mame/drivers/sprint4.cpp
@@ -413,8 +413,7 @@ MACHINE_CONFIG_START(sprint4_state::sprint4)
MCFG_ADDRESSABLE_LATCH_Q6_OUT_CB(WRITELINE("discrete", discrete_device, write_line<SPRINT4_SCREECH_EN_3>))
MCFG_ADDRESSABLE_LATCH_Q7_OUT_CB(WRITELINE("discrete", discrete_device, write_line<SPRINT4_SCREECH_EN_4>))
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(sprint4)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, sprint4_discrete)
MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
diff --git a/src/mame/drivers/starshp1.cpp b/src/mame/drivers/starshp1.cpp
index 6c6c807a444..7c33862c398 100644
--- a/src/mame/drivers/starshp1.cpp
+++ b/src/mame/drivers/starshp1.cpp
@@ -323,8 +323,7 @@ MACHINE_CONFIG_START(starshp1_state::starshp1)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(starshp1)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, starshp1_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_DEVICE_ADD("audiolatch", F9334, 0) // D9
diff --git a/src/mame/drivers/subs.cpp b/src/mame/drivers/subs.cpp
index 031b9009dff..832e5224498 100644
--- a/src/mame/drivers/subs.cpp
+++ b/src/mame/drivers/subs.cpp
@@ -209,8 +209,7 @@ MACHINE_CONFIG_START(subs_state::subs)
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(subs)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, subs_discrete)
MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
diff --git a/src/mame/drivers/taito_z.cpp b/src/mame/drivers/taito_z.cpp
index 3a0d17bed97..1557f17b02d 100644
--- a/src/mame/drivers/taito_z.cpp
+++ b/src/mame/drivers/taito_z.cpp
@@ -3239,14 +3239,10 @@ MACHINE_CONFIG_START(taitoz_state::contcirc)
MCFG_SOUND_ROUTE(2, "2610.2.l", 2.0)
MCFG_SOUND_ROUTE(2, "2610.2.r", 2.0)
- MCFG_FILTER_VOLUME_ADD("2610.1.r", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rear", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.1.l", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "front", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.2.r", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rear", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.2.l", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "front", 1.0)
+ FILTER_VOLUME(config, "2610.1.r").add_route(ALL_OUTPUTS, "rear", 1.0);
+ FILTER_VOLUME(config, "2610.1.l").add_route(ALL_OUTPUTS, "front", 1.0);
+ FILTER_VOLUME(config, "2610.2.r").add_route(ALL_OUTPUTS, "rear", 1.0);
+ FILTER_VOLUME(config, "2610.2.l").add_route(ALL_OUTPUTS, "front", 1.0);
MCFG_DEVICE_ADD("tc0140syt", TC0140SYT, 0)
MCFG_TC0140SYT_MASTER_CPU("sub")
@@ -3318,14 +3314,10 @@ MACHINE_CONFIG_START(taitoz_state::chasehq)
MCFG_SOUND_ROUTE(2, "2610.2.l", 1.0)
MCFG_SOUND_ROUTE(2, "2610.2.r", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.1.r", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rear", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.1.l", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "front", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.2.r", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rear", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.2.l", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "front", 1.0)
+ FILTER_VOLUME(config, "2610.1.r").add_route(ALL_OUTPUTS, "rear", 1.0);
+ FILTER_VOLUME(config, "2610.1.l").add_route(ALL_OUTPUTS, "front", 1.0);
+ FILTER_VOLUME(config, "2610.2.r").add_route(ALL_OUTPUTS, "rear", 1.0);
+ FILTER_VOLUME(config, "2610.2.l").add_route(ALL_OUTPUTS, "front", 1.0);
MCFG_DEVICE_ADD("tc0140syt", TC0140SYT, 0)
MCFG_TC0140SYT_MASTER_CPU("sub")
@@ -3398,14 +3390,10 @@ MACHINE_CONFIG_START(taitoz_state::enforce)
MCFG_SOUND_ROUTE(2, "2610.2.l", 20.0)
MCFG_SOUND_ROUTE(2, "2610.2.r", 20.0)
- MCFG_FILTER_VOLUME_ADD("2610.1.r", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.1.l", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.2.r", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.2.l", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
+ FILTER_VOLUME(config, "2610.1.r").add_route(ALL_OUTPUTS, "rspeaker", 1.0);
+ FILTER_VOLUME(config, "2610.1.l").add_route(ALL_OUTPUTS, "lspeaker", 1.0);
+ FILTER_VOLUME(config, "2610.2.r").add_route(ALL_OUTPUTS, "rspeaker", 1.0);
+ FILTER_VOLUME(config, "2610.2.l").add_route(ALL_OUTPUTS, "lspeaker", 1.0);
MCFG_DEVICE_ADD("tc0140syt", TC0140SYT, 0)
MCFG_TC0140SYT_MASTER_CPU("sub")
@@ -3479,14 +3467,10 @@ MACHINE_CONFIG_START(taitoz_state::bshark)
MCFG_SOUND_ROUTE(2, "2610.2.l", 28.0)
MCFG_SOUND_ROUTE(2, "2610.2.r", 28.0)
- MCFG_FILTER_VOLUME_ADD("2610.1.r", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.1.l", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.2.r", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.2.l", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
+ FILTER_VOLUME(config, "2610.1.r").add_route(ALL_OUTPUTS, "rspeaker", 1.0);
+ FILTER_VOLUME(config, "2610.1.l").add_route(ALL_OUTPUTS, "lspeaker", 1.0);
+ FILTER_VOLUME(config, "2610.2.r").add_route(ALL_OUTPUTS, "rspeaker", 1.0);
+ FILTER_VOLUME(config, "2610.2.l").add_route(ALL_OUTPUTS, "lspeaker", 1.0);
MACHINE_CONFIG_END
MACHINE_CONFIG_START(taitoz_state::bsharkjjs)
@@ -3563,14 +3547,10 @@ MACHINE_CONFIG_START(taitoz_state::sci)
MCFG_SOUND_ROUTE(2, "2610.2.l", 2.0)
MCFG_SOUND_ROUTE(2, "2610.2.r", 2.0)
- MCFG_FILTER_VOLUME_ADD("2610.1.r", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.1.l", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.2.r", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.2.l", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
+ FILTER_VOLUME(config, "2610.1.r").add_route(ALL_OUTPUTS, "rspeaker", 1.0);
+ FILTER_VOLUME(config, "2610.1.l").add_route(ALL_OUTPUTS, "lspeaker", 1.0);
+ FILTER_VOLUME(config, "2610.2.r").add_route(ALL_OUTPUTS, "rspeaker", 1.0);
+ FILTER_VOLUME(config, "2610.2.l").add_route(ALL_OUTPUTS, "lspeaker", 1.0);
MCFG_DEVICE_ADD("tc0140syt", TC0140SYT, 0)
MCFG_TC0140SYT_MASTER_CPU("sub")
@@ -3651,14 +3631,10 @@ MACHINE_CONFIG_START(taitoz_state::nightstr)
MCFG_SOUND_ROUTE(2, "2610.2.l", 2.0)
MCFG_SOUND_ROUTE(2, "2610.2.r", 2.0)
- MCFG_FILTER_VOLUME_ADD("2610.1.r", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rear", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.1.l", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "front", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.2.r", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rear", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.2.l", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "front", 1.0)
+ FILTER_VOLUME(config, "2610.1.r").add_route(ALL_OUTPUTS, "rear", 1.0);
+ FILTER_VOLUME(config, "2610.1.l").add_route(ALL_OUTPUTS, "front", 1.0);
+ FILTER_VOLUME(config, "2610.2.r").add_route(ALL_OUTPUTS, "rear", 1.0);
+ FILTER_VOLUME(config, "2610.2.l").add_route(ALL_OUTPUTS, "front", 1.0);
MCFG_DEVICE_ADD("tc0140syt", TC0140SYT, 0)
MCFG_TC0140SYT_MASTER_CPU("sub")
@@ -3731,14 +3707,10 @@ MACHINE_CONFIG_START(taitoz_state::aquajack)
MCFG_SOUND_ROUTE(2, "2610.2.l", 2.0)
MCFG_SOUND_ROUTE(2, "2610.2.r", 2.0)
- MCFG_FILTER_VOLUME_ADD("2610.1.r", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.1.l", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.2.r", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.2.l", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
+ FILTER_VOLUME(config, "2610.1.r").add_route(ALL_OUTPUTS, "rspeaker", 1.0);
+ FILTER_VOLUME(config, "2610.1.l").add_route(ALL_OUTPUTS, "lspeaker", 1.0);
+ FILTER_VOLUME(config, "2610.2.r").add_route(ALL_OUTPUTS, "rspeaker", 1.0);
+ FILTER_VOLUME(config, "2610.2.l").add_route(ALL_OUTPUTS, "lspeaker", 1.0);
MCFG_DEVICE_ADD("tc0140syt", TC0140SYT, 0)
MCFG_TC0140SYT_MASTER_CPU("sub")
@@ -3814,14 +3786,10 @@ MACHINE_CONFIG_START(taitoz_state::spacegun)
MCFG_SOUND_ROUTE(2, "2610.2.l", 8.0)
MCFG_SOUND_ROUTE(2, "2610.2.r", 8.0)
- MCFG_FILTER_VOLUME_ADD("2610.1.r", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.1.l", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.2.r", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.2.l", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
+ FILTER_VOLUME(config, "2610.1.r").add_route(ALL_OUTPUTS, "rspeaker", 1.0);
+ FILTER_VOLUME(config, "2610.1.l").add_route(ALL_OUTPUTS, "lspeaker", 1.0);
+ FILTER_VOLUME(config, "2610.2.r").add_route(ALL_OUTPUTS, "rspeaker", 1.0);
+ FILTER_VOLUME(config, "2610.2.l").add_route(ALL_OUTPUTS, "lspeaker", 1.0);
MACHINE_CONFIG_END
@@ -3888,14 +3856,10 @@ MACHINE_CONFIG_START(taitoz_state::dblaxle)
MCFG_SOUND_ROUTE(2, "2610.2.l", 8.0)
MCFG_SOUND_ROUTE(2, "2610.2.r", 8.0)
- MCFG_FILTER_VOLUME_ADD("2610.1.r", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.1.l", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.2.r", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.2.l", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
+ FILTER_VOLUME(config, "2610.1.r").add_route(ALL_OUTPUTS, "rspeaker", 1.0);
+ FILTER_VOLUME(config, "2610.1.l").add_route(ALL_OUTPUTS, "lspeaker", 1.0);
+ FILTER_VOLUME(config, "2610.2.r").add_route(ALL_OUTPUTS, "rspeaker", 1.0);
+ FILTER_VOLUME(config, "2610.2.l").add_route(ALL_OUTPUTS, "lspeaker", 1.0);
MCFG_DEVICE_ADD("tc0140syt", TC0140SYT, 0)
MCFG_TC0140SYT_MASTER_CPU("sub")
@@ -3964,14 +3928,10 @@ MACHINE_CONFIG_START(taitoz_state::racingb)
MCFG_SOUND_ROUTE(2, "2610.2.l", 8.0)
MCFG_SOUND_ROUTE(2, "2610.2.r", 8.0)
- MCFG_FILTER_VOLUME_ADD("2610.1.r", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.1.l", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.2.r", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.2.l", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
+ FILTER_VOLUME(config, "2610.1.r").add_route(ALL_OUTPUTS, "rspeaker", 1.0);
+ FILTER_VOLUME(config, "2610.1.l").add_route(ALL_OUTPUTS, "lspeaker", 1.0);
+ FILTER_VOLUME(config, "2610.2.r").add_route(ALL_OUTPUTS, "rspeaker", 1.0);
+ FILTER_VOLUME(config, "2610.2.l").add_route(ALL_OUTPUTS, "lspeaker", 1.0);
MCFG_DEVICE_ADD("tc0140syt", TC0140SYT, 0)
MCFG_TC0140SYT_MASTER_CPU("sub")
diff --git a/src/mame/drivers/taitosj.cpp b/src/mame/drivers/taitosj.cpp
index 29c068110eb..e48d985df36 100644
--- a/src/mame/drivers/taitosj.cpp
+++ b/src/mame/drivers/taitosj.cpp
@@ -1745,7 +1745,7 @@ static const discrete_dac_r1_ladder taitosj_dacvol_ladder =
0 // no cap
};
-DISCRETE_SOUND_START(taitosj_dacvol)
+DISCRETE_SOUND_START(taitosj_dacvol_discrete)
DISCRETE_INPUT_DATA(NODE_01)
DISCRETE_DAC_R1(NODE_02, NODE_01, DEFAULT_TTL_V_LOGIC_1, &taitosj_dacvol_ladder)
DISCRETE_OUTPUT(NODE_02, 9637)
@@ -1825,7 +1825,7 @@ MACHINE_CONFIG_START(taitosj_state::nomcu)
MCFG_WATCHDOG_VBLANK_INIT("screen", 128); // 74LS393 on CPU board, counts 128 vblanks before firing watchdog
MCFG_DEVICE_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.15) // 30k r-2r network
- MCFG_DEVICE_ADD("dacvol", DISCRETE) MCFG_DISCRETE_INTF(taitosj_dacvol)
+ MCFG_DEVICE_ADD("dacvol", DISCRETE, taitosj_dacvol_discrete)
MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/tank8.cpp b/src/mame/drivers/tank8.cpp
index 34246dd8dcd..3b8f586ae60 100644
--- a/src/mame/drivers/tank8.cpp
+++ b/src/mame/drivers/tank8.cpp
@@ -353,8 +353,7 @@ MACHINE_CONFIG_START(tank8_state::tank8)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(tank8)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, tank8_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/topspeed.cpp b/src/mame/drivers/topspeed.cpp
index 892637887d4..33be5218afa 100644
--- a/src/mame/drivers/topspeed.cpp
+++ b/src/mame/drivers/topspeed.cpp
@@ -646,18 +646,12 @@ MACHINE_CONFIG_START(topspeed_state::topspeed)
MCFG_MSM5205_PRESCALER_SELECTOR(SEX_4B) // Slave mode, 4-bit
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "filter3", 1.0)
- MCFG_FILTER_VOLUME_ADD("filter1l", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("filter1r", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
-
- MCFG_FILTER_VOLUME_ADD("filter2", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
-
- MCFG_FILTER_VOLUME_ADD("filter3", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
+ FILTER_VOLUME(config, "filter1l").add_route(ALL_OUTPUTS, "lspeaker", 1.0);
+ FILTER_VOLUME(config, "filter1r").add_route(ALL_OUTPUTS, "rspeaker", 1.0);
+
+ FILTER_VOLUME(config, "filter2").add_route(ALL_OUTPUTS, "lspeaker", 1.0).add_route(ALL_OUTPUTS, "rspeaker", 1.0);
+
+ FILTER_VOLUME(config, "filter3").add_route(ALL_OUTPUTS, "lspeaker", 1.0).add_route(ALL_OUTPUTS, "rspeaker", 1.0);
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/triplhnt.cpp b/src/mame/drivers/triplhnt.cpp
index 5d92c79579d..f1153aa1685 100644
--- a/src/mame/drivers/triplhnt.cpp
+++ b/src/mame/drivers/triplhnt.cpp
@@ -333,8 +333,7 @@ MACHINE_CONFIG_START(triplhnt_state::triplhnt)
MCFG_SAMPLES_NAMES(triplhnt_sample_names)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(triplhnt)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, triplhnt_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.90)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/tumbleb.cpp b/src/mame/drivers/tumbleb.cpp
index ef4210f214b..1c0d507720f 100644
--- a/src/mame/drivers/tumbleb.cpp
+++ b/src/mame/drivers/tumbleb.cpp
@@ -2254,9 +2254,7 @@ MACHINE_CONFIG_START(tumbleb_state::chokchok)
MCFG_PALETTE_MODIFY("palette")
MCFG_PALETTE_FORMAT(xxxxBBBBGGGGRRRR)
// some PCBs have left factory with a 3.57mhz while some have a 4.096 which matches other games, assuming the former are factory errors
- // TODO: MAME sound cores doesn't handle on-the-fly sound frequency changes, I guess best action here is to make the sound chip a slot option,
- // assuming it's worth emulating a factory error in the first place.
- MCFG_OKIM6295_REPLACE("oki", 4096000/4, okim6295_device::PIN7_HIGH)
+ MCFG_DEVICE_REPLACE("oki", OKIM6295, 4096000/4, okim6295_device::PIN7_HIGH)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/uapce.cpp b/src/mame/drivers/uapce.cpp
index 926aa8c3288..7ddadd9aec9 100644
--- a/src/mame/drivers/uapce.cpp
+++ b/src/mame/drivers/uapce.cpp
@@ -129,7 +129,7 @@ public:
#define UAPCE_SOUND_EN NODE_10
#define UAPCE_TONE_752 NODE_11
-static DISCRETE_SOUND_START(uapce)
+static DISCRETE_SOUND_START(uapce_discrete)
DISCRETE_INPUT_LOGIC(UAPCE_SOUND_EN)
DISCRETE_SQUAREWFIX(UAPCE_TONE_752, UAPCE_SOUND_EN, 752, DEFAULT_TTL_V_LOGIC_1, 50, DEFAULT_TTL_V_LOGIC_1, 0) // 752Hz
DISCRETE_OUTPUT(UAPCE_TONE_752, 100)
@@ -337,8 +337,7 @@ MACHINE_CONFIG_START(uapce_state::uapce)
MCFG_SOUND_ROUTE(0, "lspeaker", 0.5)
MCFG_SOUND_ROUTE(1, "rspeaker", 0.5)
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(uapce)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, uapce_discrete)
MCFG_SOUND_ROUTE(0, "rspeaker", 1.00)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/ultratnk.cpp b/src/mame/drivers/ultratnk.cpp
index 27c4336d891..be8dc7afb54 100644
--- a/src/mame/drivers/ultratnk.cpp
+++ b/src/mame/drivers/ultratnk.cpp
@@ -320,8 +320,7 @@ MACHINE_CONFIG_START(ultratnk_state::ultratnk)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(ultratnk)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, ultratnk_discrete)
MCFG_SOUND_ROUTE(0, "mono", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/videopin.cpp b/src/mame/drivers/videopin.cpp
index a7fb255b8b9..7185345b388 100644
--- a/src/mame/drivers/videopin.cpp
+++ b/src/mame/drivers/videopin.cpp
@@ -382,8 +382,7 @@ MACHINE_CONFIG_START(videopin_state::videopin)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(videopin)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, videopin_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/vip.cpp b/src/mame/drivers/vip.cpp
index 8e1f9b9e062..31e847b9b27 100644
--- a/src/mame/drivers/vip.cpp
+++ b/src/mame/drivers/vip.cpp
@@ -556,7 +556,7 @@ static const discrete_555_desc vip_ca555_a =
DEFAULT_555_VALUES
};
-static DISCRETE_SOUND_START( vip )
+static DISCRETE_SOUND_START( vip_discrete )
DISCRETE_INPUT_LOGIC(NODE_01)
DISCRETE_555_ASTABLE_CV(NODE_02, NODE_01, 470, (int) RES_M(1), (int) CAP_P(470), NODE_01, &vip_ca555_a)
DISCRETE_OUTPUT(NODE_02, 5000)
@@ -739,8 +739,7 @@ MACHINE_CONFIG_START(vip_state::vip)
// sound hardware
MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DEVICE_ADD(DISCRETE_TAG, DISCRETE)
- MCFG_DISCRETE_INTF(vip)
+ MCFG_DEVICE_ADD(DISCRETE_TAG, DISCRETE, vip_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
MCFG_VIP_BYTEIO_PORT_ADD(VIP_BYTEIO_PORT_TAG, vip_byteio_cards, nullptr, WRITELINE(*this, vip_state, byteio_inst_w))
diff --git a/src/mame/drivers/vixen.cpp b/src/mame/drivers/vixen.cpp
index af59f0a00d3..2fd382e804b 100644
--- a/src/mame/drivers/vixen.cpp
+++ b/src/mame/drivers/vixen.cpp
@@ -486,7 +486,7 @@ uint32_t vixen_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap,
// DISCRETE_SOUND( vixen )
//-------------------------------------------------
-static DISCRETE_SOUND_START( vixen )
+static DISCRETE_SOUND_START( vixen_discrete )
DISCRETE_INPUT_LOGIC(NODE_01)
DISCRETE_SQUAREWAVE(NODE_02, NODE_01, (XTAL(23'961'600)/15360).dvalue(), 100, 50, 0, 90)
DISCRETE_OUTPUT(NODE_02, 2000)
@@ -760,8 +760,7 @@ MACHINE_CONFIG_START(vixen_state::vixen)
// sound hardware
MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DEVICE_ADD(DISCRETE_TAG, DISCRETE)
- MCFG_DISCRETE_INTF(vixen)
+ MCFG_DEVICE_ADD(DISCRETE_TAG, DISCRETE, vixen_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
// devices
diff --git a/src/mame/drivers/warriorb.cpp b/src/mame/drivers/warriorb.cpp
index d1492ff238b..76d6967104d 100644
--- a/src/mame/drivers/warriorb.cpp
+++ b/src/mame/drivers/warriorb.cpp
@@ -509,14 +509,10 @@ MACHINE_CONFIG_START(warriorb_state::darius2d)
MCFG_SOUND_ROUTE(2, "2610.2.l", 1.0)
MCFG_SOUND_ROUTE(2, "2610.2.r", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.1.l", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.1.r", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.2.l", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.2.r", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
+ FILTER_VOLUME(config, "2610.1.l").add_route(ALL_OUTPUTS, "lspeaker", 1.0);
+ FILTER_VOLUME(config, "2610.1.r").add_route(ALL_OUTPUTS, "rspeaker", 1.0);
+ FILTER_VOLUME(config, "2610.2.l").add_route(ALL_OUTPUTS, "lspeaker", 1.0);
+ FILTER_VOLUME(config, "2610.2.r").add_route(ALL_OUTPUTS, "rspeaker", 1.0);
MCFG_DEVICE_ADD("tc0140syt", TC0140SYT, 0)
MCFG_TC0140SYT_MASTER_CPU("maincpu")
@@ -599,14 +595,10 @@ MACHINE_CONFIG_START(warriorb_state::warriorb)
MCFG_SOUND_ROUTE(2, "2610.2.l", 1.0)
MCFG_SOUND_ROUTE(2, "2610.2.r", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.1.l", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.1.r", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.2.l", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("2610.2.r", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
+ FILTER_VOLUME(config, "2610.1.l").add_route(ALL_OUTPUTS, "lspeaker", 1.0);
+ FILTER_VOLUME(config, "2610.1.r").add_route(ALL_OUTPUTS, "rspeaker", 1.0);
+ FILTER_VOLUME(config, "2610.2.l").add_route(ALL_OUTPUTS, "lspeaker", 1.0);
+ FILTER_VOLUME(config, "2610.2.r").add_route(ALL_OUTPUTS, "rspeaker", 1.0);
MCFG_DEVICE_ADD("tc0140syt", TC0140SYT, 0)
MCFG_TC0140SYT_MASTER_CPU("maincpu")
diff --git a/src/mame/drivers/wiz.cpp b/src/mame/drivers/wiz.cpp
index 9019734f19b..9cf21111e27 100644
--- a/src/mame/drivers/wiz.cpp
+++ b/src/mame/drivers/wiz.cpp
@@ -214,7 +214,7 @@ static const discrete_lfsr_desc stinger_lfsr =
16 /* Output bit is feedback bit */
};
-static DISCRETE_SOUND_START(stinger)
+static DISCRETE_SOUND_START(stinger_discrete)
#define STINGER_SHOT_OUT NODE_90
#define STINGER_BOOM_OUT NODE_91
@@ -864,8 +864,7 @@ MACHINE_CONFIG_START(wiz_state::stinger)
/* sound hardware */
MCFG_DEVICE_REMOVE("8910.3")
- MCFG_DEVICE_ADD("discrete", DISCRETE)
- MCFG_DISCRETE_INTF(stinger)
+ MCFG_DEVICE_ADD("discrete", DISCRETE, stinger_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/x68k.cpp b/src/mame/drivers/x68k.cpp
index 044a58a6041..ccd53898d06 100644
--- a/src/mame/drivers/x68k.cpp
+++ b/src/mame/drivers/x68k.cpp
@@ -1708,10 +1708,8 @@ MACHINE_CONFIG_START(x68k_state::x68000)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "adpcm_outl", 0.50)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "adpcm_outr", 0.50)
- MCFG_FILTER_VOLUME_ADD("adpcm_outl", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("adpcm_outr", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
+ FILTER_VOLUME(config, "adpcm_outl").add_route(ALL_OUTPUTS, "lspeaker", 1.0);
+ FILTER_VOLUME(config, "adpcm_outr").add_route(ALL_OUTPUTS, "rspeaker", 1.0);
MCFG_UPD72065_ADD("upd72065", true, false)
MCFG_UPD765_INTRQ_CALLBACK(WRITELINE(*this, x68k_state, fdc_irq))
diff --git a/src/mame/drivers/xexex.cpp b/src/mame/drivers/xexex.cpp
index 01b685409c6..a90bcc3d9b2 100644
--- a/src/mame/drivers/xexex.cpp
+++ b/src/mame/drivers/xexex.cpp
@@ -535,14 +535,10 @@ MACHINE_CONFIG_START(xexex_state::xexex)
MCFG_SOUND_ROUTE(1, "lspeaker", 1.0)
MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("filter1_l", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("filter1_r", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("filter2_l", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_FILTER_VOLUME_ADD("filter2_r", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
+ FILTER_VOLUME(config, "filter1_l").add_route(ALL_OUTPUTS, "lspeaker", 1.0);
+ FILTER_VOLUME(config, "filter1_r").add_route(ALL_OUTPUTS, "rspeaker", 1.0);
+ FILTER_VOLUME(config, "filter2_l").add_route(ALL_OUTPUTS, "lspeaker", 1.0);
+ FILTER_VOLUME(config, "filter2_r").add_route(ALL_OUTPUTS, "rspeaker", 1.0);
MACHINE_CONFIG_END