diff --git a/scripts/src/sound.lua b/scripts/src/sound.lua index 2b8d756c0d4..27bb7dbb826 100644 --- a/scripts/src/sound.lua +++ b/scripts/src/sound.lua @@ -1388,6 +1388,17 @@ if (SOUNDS["PCD3311"]~=null) then } end +--------------------------------------------------- +-- Voltage Regulator +--@src/devices/sound/volt_reg.h,SOUNDS["VOLT_REG"] = true +--------------------------------------------------- +if (SOUNDS["VOLT_REG"]~=null) then + files { + MAME_DIR .. "src/devices/sound/volt_reg.cpp", + MAME_DIR .. "src/devices/sound/volt_reg.h", + } +end + --------------------------------------------------- -- DAC-76 COMDAC --@src/devices/sound/dac76.h,SOUNDS["DAC76"] = true diff --git a/scripts/target/mame/arcade.lua b/scripts/target/mame/arcade.lua index d80f0be5563..5d9b4cbccf9 100644 --- a/scripts/target/mame/arcade.lua +++ b/scripts/target/mame/arcade.lua @@ -261,6 +261,7 @@ SOUNDS["ES1373"] = true SOUNDS["L7A1045"] = true SOUNDS["AD1848"] = true --SOUNDS["UPD1771"] = true +SOUNDS["VOLT_REG"] = true SOUNDS["MEA8000"] = true SOUNDS["DAC76"] = true SOUNDS["TA7630"] = true diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua index 99b69dfb7f9..cd2b358fd21 100644 --- a/scripts/target/mame/mess.lua +++ b/scripts/target/mame/mess.lua @@ -263,6 +263,7 @@ SOUNDS["VRC6"] = true SOUNDS["UPD1771"] = true SOUNDS["GB_SOUND"] = true SOUNDS["PCD3311"] = true +SOUNDS["VOLT_REG"] = true SOUNDS["MEA8000"] = true --SOUNDS["DAC76"] = true --SOUNDS["MM5837"] = true diff --git a/scripts/target/mame/nl.lua b/scripts/target/mame/nl.lua index f288ba7b011..c47cea4deb4 100644 --- a/scripts/target/mame/nl.lua +++ b/scripts/target/mame/nl.lua @@ -47,6 +47,7 @@ SOUNDS["TMS5220"] = true --SOUNDS["YM3812"] = true --SOUNDS["CEM3394"] = true --SOUNDS["VOTRAX"] = true +SOUNDS["VOLT_REG"] = true -------------------------------------------------- -- specify available video cores diff --git a/scripts/target/mame/tiny.lua b/scripts/target/mame/tiny.lua index 0909e823e4c..1245d6baafa 100644 --- a/scripts/target/mame/tiny.lua +++ b/scripts/target/mame/tiny.lua @@ -43,6 +43,7 @@ SOUNDS["HC55516"] = true SOUNDS["YM3812"] = true SOUNDS["CEM3394"] = true SOUNDS["VOTRAX"] = true +SOUNDS["VOLT_REG"] = true -------------------------------------------------- -- specify available video cores diff --git a/src/devices/bus/a2bus/a2dx1.cpp b/src/devices/bus/a2bus/a2dx1.cpp index a5cdde3afc6..afe84fc260e 100644 --- a/src/devices/bus/a2bus/a2dx1.cpp +++ b/src/devices/bus/a2bus/a2dx1.cpp @@ -10,6 +10,7 @@ #include "emu.h" #include "a2dx1.h" +#include "sound/volt_reg.h" #include "speaker.h" /*************************************************************************** @@ -35,7 +36,8 @@ MACHINE_CONFIG_MEMBER( a2bus_dx1_device::device_add_mconfig ) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC MCFG_SOUND_ADD("dacvol", DAC_8BIT_R2R, 0) // unknown DAC MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dacvol", 1.0, DAC_VREF_POS_INPUT) MACHINE_CONFIG_END //************************************************************************** diff --git a/src/devices/bus/a2bus/a2sam.cpp b/src/devices/bus/a2bus/a2sam.cpp index 7e389efeb0f..c26a61ef4b3 100644 --- a/src/devices/bus/a2bus/a2sam.cpp +++ b/src/devices/bus/a2bus/a2sam.cpp @@ -10,6 +10,7 @@ #include "emu.h" #include "a2sam.h" +#include "sound/volt_reg.h" #include "speaker.h" /*************************************************************************** @@ -33,7 +34,8 @@ DEFINE_DEVICE_TYPE(A2BUS_SAM, a2bus_sam_device, "a2sam", "Don't Ask Software S.A MACHINE_CONFIG_MEMBER( a2bus_sam_device::device_add_mconfig ) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END //************************************************************************** diff --git a/src/devices/bus/cbus/pc9801_86.cpp b/src/devices/bus/cbus/pc9801_86.cpp index 6d9c3c5a9b6..cad2d56c505 100644 --- a/src/devices/bus/cbus/pc9801_86.cpp +++ b/src/devices/bus/cbus/pc9801_86.cpp @@ -17,6 +17,7 @@ #include "emu.h" #include "bus/cbus/pc9801_86.h" +#include "sound/volt_reg.h" #include "speaker.h" #define MAIN_CLOCK_X1 XTAL_1_9968MHz @@ -63,9 +64,10 @@ MACHINE_CONFIG_MEMBER( pc9801_86_device::device_add_mconfig ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.00) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.00) MCFG_SOUND_ADD("ldac", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("rdac", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END // RAM diff --git a/src/devices/bus/centronics/covox.cpp b/src/devices/bus/centronics/covox.cpp index 059d8cf56e0..5b55412a4c8 100644 --- a/src/devices/bus/centronics/covox.cpp +++ b/src/devices/bus/centronics/covox.cpp @@ -8,6 +8,7 @@ #include "emu.h" #include "covox.h" +#include "sound/volt_reg.h" #include "speaker.h" //************************************************************************** @@ -41,7 +42,8 @@ MACHINE_CONFIG_MEMBER( centronics_covox_device::device_add_mconfig ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END void centronics_covox_device::device_start() @@ -89,9 +91,10 @@ MACHINE_CONFIG_MEMBER( centronics_covox_stereo_device::device_add_mconfig ) /* sound hardware */ MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") MCFG_SOUND_ADD("ldac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("rdac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END void centronics_covox_stereo_device::device_start() diff --git a/src/devices/bus/centronics/digiblst.cpp b/src/devices/bus/centronics/digiblst.cpp index 48e6a2b458e..050a3840f35 100644 --- a/src/devices/bus/centronics/digiblst.cpp +++ b/src/devices/bus/centronics/digiblst.cpp @@ -8,6 +8,7 @@ #include "emu.h" #include "digiblst.h" +#include "sound/volt_reg.h" #include "speaker.h" //************************************************************************** @@ -41,7 +42,8 @@ MACHINE_CONFIG_MEMBER( centronics_digiblaster_device::device_add_mconfig ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END void centronics_digiblaster_device::device_start() diff --git a/src/devices/bus/centronics/epson_lx810l.cpp b/src/devices/bus/centronics/epson_lx810l.cpp index 19276c18b34..ae44e4a7d57 100644 --- a/src/devices/bus/centronics/epson_lx810l.cpp +++ b/src/devices/bus/centronics/epson_lx810l.cpp @@ -27,6 +27,7 @@ #include "emu.h" #include "epson_lx810l.h" +#include "sound/volt_reg.h" #include "speaker.h" //extern const char layout_lx800[]; /* use layout from lx800 */ @@ -141,7 +142,8 @@ MACHINE_CONFIG_MEMBER( epson_lx810l_device::device_add_mconfig ) /* audio hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) /* gate array */ MCFG_DEVICE_ADD("e05a30", E05A30, 0) diff --git a/src/devices/bus/coco/coco_orch90.cpp b/src/devices/bus/coco/coco_orch90.cpp index ac8c05588b8..1263ea8f8d5 100644 --- a/src/devices/bus/coco/coco_orch90.cpp +++ b/src/devices/bus/coco/coco_orch90.cpp @@ -30,6 +30,7 @@ #include "cococart.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "speaker.h" @@ -109,9 +110,10 @@ namespace MACHINE_CONFIG_MEMBER(coco_orch90_device::device_add_mconfig) MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") MCFG_SOUND_ADD("ldac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5) // ls374.ic5 + r7 (8x20k) + r9 (8x10k) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("rdac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5) // ls374.ic4 + r6 (8x20k) + r8 (8x10k) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/devices/bus/cpc/amdrum.cpp b/src/devices/bus/cpc/amdrum.cpp index 1d631766290..d6e929bb7b6 100644 --- a/src/devices/bus/cpc/amdrum.cpp +++ b/src/devices/bus/cpc/amdrum.cpp @@ -9,6 +9,7 @@ #include "emu.h" #include "amdrum.h" +#include "sound/volt_reg.h" #include "speaker.h" @@ -22,7 +23,8 @@ DEFINE_DEVICE_TYPE(CPC_AMDRUM, cpc_amdrum_device, "cpc_amdrum", "Amdrum") MACHINE_CONFIG_MEMBER( cpc_amdrum_device::device_add_mconfig ) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) // no pass-through MACHINE_CONFIG_END diff --git a/src/devices/bus/cpc/magicsound.cpp b/src/devices/bus/cpc/magicsound.cpp index c930c95d69d..5f44afedb9e 100644 --- a/src/devices/bus/cpc/magicsound.cpp +++ b/src/devices/bus/cpc/magicsound.cpp @@ -9,6 +9,7 @@ #include "emu.h" #include "magicsound.h" +#include "sound/volt_reg.h" #include "speaker.h" @@ -57,7 +58,8 @@ MACHINE_CONFIG_MEMBER( al_magicsound_device::device_add_mconfig ) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) // no pass-through(?) MACHINE_CONFIG_END diff --git a/src/devices/bus/isa/dectalk.cpp b/src/devices/bus/isa/dectalk.cpp index bb3f0b91603..4b0811bdbea 100644 --- a/src/devices/bus/isa/dectalk.cpp +++ b/src/devices/bus/isa/dectalk.cpp @@ -3,6 +3,7 @@ #include "emu.h" #include "dectalk.h" +#include "sound/volt_reg.h" #include "speaker.h" @@ -165,7 +166,8 @@ MACHINE_CONFIG_MEMBER( dectalk_isa_device::device_add_mconfig ) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_12BIT_R2R, 0) MCFG_SOUND_ROUTE(0, "speaker", 1.0) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END WRITE8_MEMBER(dectalk_isa_device::write) diff --git a/src/devices/bus/isa/p1_sound.cpp b/src/devices/bus/isa/p1_sound.cpp index 8155ac241bc..629926f657a 100644 --- a/src/devices/bus/isa/p1_sound.cpp +++ b/src/devices/bus/isa/p1_sound.cpp @@ -14,6 +14,7 @@ #include "emu.h" #include "p1_sound.h" +#include "sound/volt_reg.h" #include "speaker.h" @@ -67,7 +68,8 @@ MACHINE_CONFIG_MEMBER( p1_sound_device::device_add_mconfig ) MCFG_FILTER_RC_ADD("filter", 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "filter", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/devices/bus/isa/sblaster.cpp b/src/devices/bus/isa/sblaster.cpp index c7e234b4099..a6c0bcfa438 100644 --- a/src/devices/bus/isa/sblaster.cpp +++ b/src/devices/bus/isa/sblaster.cpp @@ -17,6 +17,7 @@ #include "machine/pic8259.h" #include "sound/262intf.h" #include "sound/spkrdev.h" +#include "sound/volt_reg.h" #include "speaker.h" @@ -1152,9 +1153,10 @@ MACHINE_CONFIG_MEMBER( isa8_sblaster1_0_device::device_add_mconfig ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.50) MCFG_SOUND_ADD("ldac", DAC_16BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("rdac", DAC_16BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT) MCFG_PC_JOY_ADD("pc_joy") MCFG_MIDI_PORT_ADD("mdin", midiin_slot, "midiin") @@ -1171,9 +1173,10 @@ MACHINE_CONFIG_MEMBER( isa8_sblaster1_5_device::device_add_mconfig ) /* no CM/S support (empty sockets) */ MCFG_SOUND_ADD("ldac", DAC_16BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("rdac", DAC_16BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT) MCFG_PC_JOY_ADD("pc_joy") MCFG_MIDI_PORT_ADD("mdin", midiin_slot, "midiin") @@ -1191,9 +1194,10 @@ MACHINE_CONFIG_MEMBER( isa16_sblaster16_device::device_add_mconfig ) MCFG_SOUND_ROUTE(3, "rspeaker", 1.00) MCFG_SOUND_ADD("ldac", DAC_16BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("rdac", DAC_16BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT) MCFG_PC_JOY_ADD("pc_joy") MCFG_MIDI_PORT_ADD("mdin", midiin_slot, "midiin") diff --git a/src/devices/bus/isa/stereo_fx.cpp b/src/devices/bus/isa/stereo_fx.cpp index 871d498a183..da29bbe2eb0 100644 --- a/src/devices/bus/isa/stereo_fx.cpp +++ b/src/devices/bus/isa/stereo_fx.cpp @@ -8,6 +8,7 @@ #include "stereo_fx.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "speaker.h" @@ -125,9 +126,10 @@ MACHINE_CONFIG_MEMBER( stereo_fx_device::device_add_mconfig ) /* no CM/S support (empty sockets) */ MCFG_SOUND_ADD("ldac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("rdac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT) MCFG_PC_JOY_ADD("pc_joy") MACHINE_CONFIG_END diff --git a/src/devices/bus/msx_cart/konami.cpp b/src/devices/bus/msx_cart/konami.cpp index a16ebe8b609..46633807d9c 100644 --- a/src/devices/bus/msx_cart/konami.cpp +++ b/src/devices/bus/msx_cart/konami.cpp @@ -3,6 +3,7 @@ #include "emu.h" #include "konami.h" +#include "sound/volt_reg.h" #include "speaker.h" @@ -475,7 +476,8 @@ MACHINE_CONFIG_MEMBER( msx_cart_synthesizer_device::device_add_mconfig ) // This is actually incorrect. The sound output is passed back into the MSX machine where it is mixed internally and output through the system 'speaker'. MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/devices/bus/msx_cart/majutsushi.cpp b/src/devices/bus/msx_cart/majutsushi.cpp index a7a195004d3..f7f3f301828 100644 --- a/src/devices/bus/msx_cart/majutsushi.cpp +++ b/src/devices/bus/msx_cart/majutsushi.cpp @@ -3,6 +3,7 @@ #include "emu.h" #include "majutsushi.h" +#include "sound/volt_reg.h" #include "speaker.h" @@ -29,7 +30,8 @@ MACHINE_CONFIG_MEMBER( msx_cart_majutsushi_device::device_add_mconfig ) // This is actually incorrect. The sound output is passed back into the MSX machine where it is mixed internally and output through the system 'speaker'. MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.05) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/devices/bus/pet/2joysnd.cpp b/src/devices/bus/pet/2joysnd.cpp index 191762f2fc5..62df82f5079 100644 --- a/src/devices/bus/pet/2joysnd.cpp +++ b/src/devices/bus/pet/2joysnd.cpp @@ -49,6 +49,7 @@ Connections #include "emu.h" #include "2joysnd.h" +#include "sound/volt_reg.h" #include "speaker.h" @@ -95,7 +96,8 @@ ioport_constructor pet_userport_joystick_and_sound_device::device_input_ports() MACHINE_CONFIG_MEMBER( pet_userport_joystick_and_sound_device::device_add_mconfig ) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.99) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MACHINE_CONFIG_END //************************************************************************** diff --git a/src/devices/bus/pet/cb2snd.cpp b/src/devices/bus/pet/cb2snd.cpp index 77ad497a700..8a4fbe3ef76 100644 --- a/src/devices/bus/pet/cb2snd.cpp +++ b/src/devices/bus/pet/cb2snd.cpp @@ -11,6 +11,7 @@ #include "emu.h" #include "cb2snd.h" +#include "sound/volt_reg.h" #include "speaker.h" @@ -28,7 +29,8 @@ DEFINE_DEVICE_TYPE(PET_USERPORT_CB2_SOUND_DEVICE, pet_userport_cb2_sound_device, MACHINE_CONFIG_MEMBER( pet_userport_cb2_sound_device::device_add_mconfig ) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.99) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MACHINE_CONFIG_END //************************************************************************** diff --git a/src/devices/sound/ad1848.cpp b/src/devices/sound/ad1848.cpp index 79e5ce4fe47..8f30b7def32 100644 --- a/src/devices/sound/ad1848.cpp +++ b/src/devices/sound/ad1848.cpp @@ -6,6 +6,7 @@ #include "emu.h" #include "sound/ad1848.h" +#include "sound/volt_reg.h" #include "speaker.h" @@ -23,9 +24,10 @@ ad1848_device::ad1848_device(const machine_config &mconfig, const char *tag, dev MACHINE_CONFIG_MEMBER( ad1848_device::device_add_mconfig ) MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") MCFG_SOUND_ADD("ldac", DAC_16BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("rdac", DAC_16BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/devices/sound/volt_reg.cpp b/src/devices/sound/volt_reg.cpp new file mode 100644 index 00000000000..aeb2bd6285a --- /dev/null +++ b/src/devices/sound/volt_reg.cpp @@ -0,0 +1,35 @@ +// license:BSD-3-Clause +// copyright-holders:smf +/*************************************************************************** + + volt_reg.c + + Direct current. + +***************************************************************************/ + +#include "emu.h" +#include "volt_reg.h" + +DEFINE_DEVICE_TYPE(VOLTAGE_REGULATOR, voltage_regulator_device, "volt_reg", "Voltage Regulator") + +voltage_regulator_device::voltage_regulator_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : + device_t(mconfig, VOLTAGE_REGULATOR, tag, owner, clock), + device_sound_interface(mconfig, *this), + m_stream(nullptr), + m_output(0) +{ +} + +void voltage_regulator_device::device_start() +{ + m_stream = stream_alloc(0, 1, 500); +} + +void voltage_regulator_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) +{ + for (int samp = 0; samp < samples; samp++) + { + outputs[0][samp] = m_output; + } +} diff --git a/src/devices/sound/volt_reg.h b/src/devices/sound/volt_reg.h new file mode 100644 index 00000000000..dd036dbad28 --- /dev/null +++ b/src/devices/sound/volt_reg.h @@ -0,0 +1,43 @@ +// license:BSD-3-Clause +// copyright-holders:smf +/*************************************************************************** + + volt_reg.h + + Voltage Regulator + +***************************************************************************/ + +#ifndef MAME_SOUND_VOLT_REG_H +#define MAME_SOUND_VOLT_REG_H + +#pragma once + + +#define MCFG_VOLTAGE_REGULATOR_OUTPUT(_output) \ + voltage_regulator_device::set_output(*device, _output); + +class voltage_regulator_device : public device_t, public device_sound_interface +{ +public: + static void set_output(device_t &device, double analogue_dc) { downcast(device).m_output = (analogue_dc * 32768) / 5.0f; } + + voltage_regulator_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + + virtual bool issound() override { return false; } + +protected: + // device-level overrides + virtual void device_start() override; + + // sound stream update overrides + virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override; + +private: + sound_stream* m_stream; + stream_sample_t m_output; +}; + +DECLARE_DEVICE_TYPE(VOLTAGE_REGULATOR, voltage_regulator_device) + +#endif // MAME_SOUND_VOLT_REG_H diff --git a/src/emu/disound.cpp b/src/emu/disound.cpp index 7d2929a0c77..9d0b93f70bc 100644 --- a/src/emu/disound.cpp +++ b/src/emu/disound.cpp @@ -72,40 +72,6 @@ void device_sound_interface::static_reset_routes(device_t &device) } -//------------------------------------------------- -// static_add_reference_input - configuration -// helper to add a new fixed reference input -//------------------------------------------------- - -void device_sound_interface::static_add_reference_input(device_t &device, u32 input, double level) -{ - // find our sound interface - device_sound_interface *sound; - if (!device.interface(sound)) - throw emu_fatalerror("MCFG_SOUND_REFERENCE_INPUT called on device '%s' with no sound interface", device.tag()); - - // append a new reference input to the list - sound->m_ref_list.push_back(std::make_unique(input, level)); -} - - -//------------------------------------------------- -// static_reset_reference_inputs - configuration -// helper to remove all fixed reference inputs -//------------------------------------------------- - -void device_sound_interface::static_reset_reference_inputs(device_t &device) -{ - // find our sound interface - device_sound_interface *sound; - if (!device.interface(sound)) - throw emu_fatalerror("MCFG_SOUND_REFERENCE_INPUTS_RESET called on device '%s' with no sound interface", device.tag()); - - // reset the reference input list - sound->m_ref_list.clear(); -} - - //------------------------------------------------- // stream_alloc - allocate a stream implicitly // associated with this device @@ -332,19 +298,6 @@ void device_sound_interface::interface_pre_start() void device_sound_interface::interface_post_start() { - // iterate over reference inputs - for (auto &ref : refs()) - { - // find the input stream to connect to - int streaminputnum; - sound_stream *inputstream = input_to_stream_input(ref->m_input, streaminputnum); - if (inputstream == nullptr) - fatalerror("Sound device '%s' fixes non-existant input %d\n", device().tag(), ref->m_input); - - // set the reference input - inputstream->set_input(streaminputnum, nullptr, 0, 1.0, stream_sample_t(ref->m_level * 32768)); - } - // iterate over all the sound devices for (device_sound_interface &sound : sound_interface_iterator(m_device.machine().root_device())) { @@ -416,21 +369,6 @@ device_sound_interface::sound_route::sound_route(int output, int input, float ga -//************************************************************************** -// FIXED REFERENCE INPUTS -//************************************************************************** - -//------------------------------------------------- -// sound_reference_input - constructor -//------------------------------------------------- - -device_sound_interface::sound_reference_input::sound_reference_input(u32 input, double level) - : m_input(input), - m_level(level) -{ -} - - //************************************************************************** // SIMPLE DERIVED MIXER INTERFACE //************************************************************************** diff --git a/src/emu/disound.h b/src/emu/disound.h index e81171d1e3c..ee1f12b8f04 100644 --- a/src/emu/disound.h +++ b/src/emu/disound.h @@ -52,11 +52,6 @@ constexpr int AUTO_ALLOC_INPUT = 65535; #define MCFG_MIXER_ROUTE(_output, _target, _gain, _mixoutput) \ device_sound_interface::static_add_route(*device, _output, _target, _gain, AUTO_ALLOC_INPUT, _mixoutput); -#define MCFG_SOUND_REFERENCE_INPUT(_input, _ref) \ - device_sound_interface::static_add_reference_input(*device, _input, _ref); -#define MCFG_SOUND_REFERENCE_INPUTS_RESET() \ - device_sound_interface::static_reset_reference_inputs(*device); - //************************************************************************** // TYPE DEFINITIONS @@ -80,15 +75,6 @@ public: std::string m_target; // target tag }; - class sound_reference_input - { - public: - sound_reference_input(u32 input, double level); - - u32 m_input; // target input index - double m_level; // reference level - }; - // construction/destruction device_sound_interface(const machine_config &mconfig, device_t &device); virtual ~device_sound_interface(); @@ -97,13 +83,10 @@ public: // configuration access const std::vector> &routes() const { return m_route_list; } - const std::vector> &refs() const { return m_ref_list; } // static inline configuration helpers static void static_add_route(device_t &device, u32 output, const char *target, double gain, u32 input = AUTO_ALLOC_INPUT, u32 mixoutput = 0); static void static_reset_routes(device_t &device); - static void static_add_reference_input(device_t &device, u32 input, double ref); - static void static_reset_reference_inputs(device_t &device); // sound stream update overrides virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) = 0; @@ -131,7 +114,6 @@ protected: std::vector> m_route_list; // list of sound routes int m_outputs; // number of outputs from this instance int m_auto_allocated_inputs; // number of auto-allocated inputs targeting us - std::vector> m_ref_list; // reference inputs }; // iterator diff --git a/src/emu/sound.cpp b/src/emu/sound.cpp index 5fcbaa0ee93..be16a3476e3 100644 --- a/src/emu/sound.cpp +++ b/src/emu/sound.cpp @@ -225,10 +225,10 @@ int sound_stream::input_source_outputnum(int inputnum) const // set_input - configure a stream's input //------------------------------------------------- -void sound_stream::set_input(int index, sound_stream *input_stream, int output_index, float gain, stream_sample_t level) +void sound_stream::set_input(int index, sound_stream *input_stream, int output_index, float gain) { - VPRINTF(("stream_set_input(%p, '%s', %d, %p, %d, %f, %d)\n", (void *)this, m_device.tag(), - index, (void *)input_stream, output_index, (double) gain, level)); + VPRINTF(("stream_set_input(%p, '%s', %d, %p, %d, %f)\n", (void *)this, m_device.tag(), + index, (void *)input_stream, output_index, (double) gain)); // make sure it's a valid input if (index >= m_input.size()) @@ -247,7 +247,6 @@ void sound_stream::set_input(int index, sound_stream *input_stream, int output_i input.m_source = (input_stream != nullptr) ? &input_stream->m_output[output_index] : nullptr; input.m_gain = int(0x100 * gain); input.m_user_gain = 0x100; - input.m_default_level = level; // update the dependent info if (input.m_source != nullptr) @@ -443,7 +442,7 @@ void sound_stream::apply_sample_rate_changes() // clear out the buffer for (auto & elem : m_output) - std::fill(&elem.m_buffer[0], &elem.m_buffer[m_max_samples_per_update], 0); + memset(&elem.m_buffer[0], 0, m_max_samples_per_update * sizeof(elem.m_buffer[0])); } @@ -538,8 +537,11 @@ void sound_stream::allocate_resample_buffers() m_resample_bufalloc = bufsize; // iterate over outputs and realloc their buffers - for (auto & elem : m_input) - elem.m_resample.resize(m_resample_bufalloc, elem.m_default_level); + for (auto & elem : m_input) { + unsigned int old_size = elem.m_resample.size(); + elem.m_resample.resize(m_resample_bufalloc); + memset(&elem.m_resample[old_size], 0, (m_resample_bufalloc - old_size)*sizeof(elem.m_resample[0])); + } } } @@ -559,8 +561,11 @@ void sound_stream::allocate_output_buffers() m_output_bufalloc = bufsize; // iterate over outputs and realloc their buffers - for (auto & elem : m_output) - elem.m_buffer.resize(m_output_bufalloc, 0); + for (auto & elem : m_output) { + unsigned int old_size = elem.m_buffer.size(); + elem.m_buffer.resize(m_output_bufalloc); + memset(&elem.m_buffer[old_size], 0, (m_output_bufalloc - old_size)*sizeof(elem.m_buffer[0])); + } } } @@ -576,7 +581,7 @@ void sound_stream::postload() // make sure our output buffers are fully cleared for (auto & elem : m_output) - std::fill(&elem.m_buffer[0], &elem.m_buffer[m_output_bufalloc], 0); + memset(&elem.m_buffer[0], 0, m_output_bufalloc * sizeof(elem.m_buffer[0])); // recompute the sample indexes to make sense m_output_sampindex = m_device.machine().sound().last_update().attoseconds() / m_attoseconds_per_sample; @@ -649,7 +654,7 @@ stream_sample_t *sound_stream::generate_resampled_data(stream_input &input, u32 stream_sample_t *dest = &input.m_resample[0]; if (input.m_source == nullptr) { - std::fill(&dest[0], &dest[numsamples], input.m_default_level); + memset(dest, 0, numsamples * sizeof(*dest)); return &input.m_resample[0]; } @@ -771,8 +776,7 @@ sound_stream::stream_input::stream_input() : m_source(nullptr), m_latency_attoseconds(0), m_gain(0x100), - m_user_gain(0x100), - m_default_level(0) + m_user_gain(0x100) { } diff --git a/src/emu/sound.h b/src/emu/sound.h index 41fe6409a5a..37c3492588a 100644 --- a/src/emu/sound.h +++ b/src/emu/sound.h @@ -82,7 +82,6 @@ class sound_stream attoseconds_t m_latency_attoseconds; // latency between this stream and the input stream s16 m_gain; // gain to apply to this input s16 m_user_gain; // user-controlled gain to apply to this input - stream_sample_t m_default_level; // default level (when no active source) }; // constants @@ -111,7 +110,7 @@ public: float output_gain(int outputnum) const; // operations - void set_input(int inputnum, sound_stream *input_stream, int outputnum = 0, float gain = 1.0f, stream_sample_t level = 0); + void set_input(int inputnum, sound_stream *input_stream, int outputnum = 0, float gain = 1.0f); void update(); const stream_sample_t *output_since_last_update(int outputnum, int &numsamples); diff --git a/src/mame/audio/alesis.cpp b/src/mame/audio/alesis.cpp index a7294fac227..83eb55712fd 100644 --- a/src/mame/audio/alesis.cpp +++ b/src/mame/audio/alesis.cpp @@ -13,6 +13,7 @@ #include "emu.h" #include "includes/alesis.h" +#include "sound/volt_reg.h" #include "speaker.h" #define LOG 1 @@ -44,7 +45,8 @@ MACHINE_CONFIG_MEMBER( 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 - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END //------------------------------------------------- diff --git a/src/mame/audio/csd.cpp b/src/mame/audio/csd.cpp index 53a3a9d6e75..3158de444db 100644 --- a/src/mame/audio/csd.cpp +++ b/src/mame/audio/csd.cpp @@ -8,6 +8,7 @@ #include "emu.h" #include "csd.h" +#include "sound/volt_reg.h" //************************************************************************** @@ -45,7 +46,8 @@ MACHINE_CONFIG_MEMBER(midway_cheap_squeak_deluxe_device::device_add_mconfig) MCFG_PIA_IRQB_HANDLER(WRITELINE(midway_cheap_squeak_deluxe_device, irq_w)) MCFG_SOUND_ADD("dac", AD7533, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 1.0) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END //------------------------------------------------- diff --git a/src/mame/audio/gottlieb.cpp b/src/mame/audio/gottlieb.cpp index 74da5d5e0fd..75bea4376c3 100644 --- a/src/mame/audio/gottlieb.cpp +++ b/src/mame/audio/gottlieb.cpp @@ -13,6 +13,7 @@ #include "emu.h" #include "audio/gottlieb.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #define SOUND1_CLOCK XTAL_3_579545MHz @@ -119,7 +120,8 @@ MACHINE_CONFIG_MEMBER( gottlieb_sound_r0_device::device_add_mconfig ) // sound devices MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END @@ -317,7 +319,8 @@ MACHINE_CONFIG_MEMBER( gottlieb_sound_r1_device::device_add_mconfig ) // sound devices MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END @@ -673,7 +676,8 @@ MACHINE_CONFIG_MEMBER( gottlieb_sound_r2_device::device_add_mconfig ) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.075) // unknown DAC MCFG_SOUND_ADD("dacvol", DAC_8BIT_R2R, 0) // unknown DAC MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dacvol", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ADD("ay1", AY8913, SOUND2_CLOCK/2) MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.15) diff --git a/src/mame/audio/harddriv.cpp b/src/mame/audio/harddriv.cpp index 167a698a1b7..06677fbf79e 100644 --- a/src/mame/audio/harddriv.cpp +++ b/src/mame/audio/harddriv.cpp @@ -11,6 +11,7 @@ #include "machine/atarigen.h" #include "cpu/tms32010/tms32010.h" +#include "sound/volt_reg.h" #include "speaker.h" @@ -452,5 +453,6 @@ MACHINE_CONFIG_MEMBER( harddriv_sound_board_device::device_add_mconfig ) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", AM6012, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // ls374d.75e + ls374d.90e + am6012 - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/audio/leland.cpp b/src/mame/audio/leland.cpp index a207b161d96..2a42453fbd1 100644 --- a/src/mame/audio/leland.cpp +++ b/src/mame/audio/leland.cpp @@ -83,6 +83,7 @@ #include "audio/leland.h" #include "cpu/z80/z80.h" +#include "sound/volt_reg.h" #include "speaker.h" #define LOG_COMM 0 @@ -141,19 +142,20 @@ MACHINE_CONFIG_MEMBER( leland_80186_sound_device::device_add_mconfig ) MCFG_SOUND_ADD("dac5", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // 74hc374.u35 + ad7524.u50 MCFG_SOUND_ADD("dac6", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // 74hc374.u36 + ad7524.u51 MCFG_SOUND_ADD("dac9", AD7533, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) // ad7533.u64 - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac1vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT) // 74hc374.u17 + r2-r9 (24k,12k,6.2k,3k,1.5k,750,360,160) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_ADD("dac2vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT) // 74hc374.u18 + r12-r19 (24k,12k,6.2k,3k,1.5k,750,360,160) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_ADD("dac3vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac3", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac3", -1.0, DAC_VREF_NEG_INPUT) // 74hc374.u19 + r22-r29 (24k,12k,6.2k,3k,1.5k,750,360,160) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_ADD("dac4vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac4", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac4", -1.0, DAC_VREF_NEG_INPUT) // 74hc374.u20 + r32-r39 (24k,12k,6.2k,3k,1.5k,750,360,160) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_ADD("dac5vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac5", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac5", -1.0, DAC_VREF_NEG_INPUT) // 74hc374.u21 + r42-r49 (24k,12k,6.2k,3k,1.5k,750,360,160) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_ADD("dac6vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac6", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac6", -1.0, DAC_VREF_NEG_INPUT) // 74hc374.u22 + r52-r59 (24k,12k,6.2k,3k,1.5k,750,360,160) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac1vol", 1.0, DAC_VREF_POS_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac2vol", 1.0, DAC_VREF_POS_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac3vol", 1.0, DAC_VREF_POS_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac4vol", 1.0, DAC_VREF_POS_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac5vol", 1.0, DAC_VREF_POS_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac6vol", 1.0, DAC_VREF_POS_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac9", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac9", -1.0, DAC_VREF_NEG_INPUT) MCFG_DEVICE_ADD("pit0", PIT8254, 0) MCFG_PIT8253_CLK0(4000000) @@ -183,21 +185,22 @@ MACHINE_CONFIG_MEMBER( redline_80186_sound_device::device_add_mconfig ) MCFG_SOUND_ADD("dac7", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC MCFG_SOUND_ADD("dac8", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC MCFG_SOUND_ADD("dac1vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_ADD("dac2vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_ADD("dac3vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac3", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac3", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_ADD("dac4vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac4", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac4", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_ADD("dac5vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac5", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac5", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_ADD("dac6vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac6", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac6", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_ADD("dac7vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac7", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac7", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_ADD("dac8vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac8", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac8", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac1vol", 1.0, DAC_VREF_POS_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac2vol", 1.0, DAC_VREF_POS_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac3vol", 1.0, DAC_VREF_POS_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac4vol", 1.0, DAC_VREF_POS_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac5vol", 1.0, DAC_VREF_POS_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac6vol", 1.0, DAC_VREF_POS_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac7vol", 1.0, DAC_VREF_POS_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac8vol", 1.0, DAC_VREF_POS_INPUT) MCFG_DEVICE_ADD("pit0", PIT8254, 0) MCFG_PIT8253_CLK0(7000000) @@ -228,15 +231,16 @@ MACHINE_CONFIG_MEMBER( ataxx_80186_sound_device::device_add_mconfig ) MCFG_SOUND_ADD("dac3", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC MCFG_SOUND_ADD("dac4", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC MCFG_SOUND_ADD("dac9", AD7533, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac1vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_ADD("dac2vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_ADD("dac3vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac3", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac3", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_ADD("dac4vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac4", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac4", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac1vol", 1.0, DAC_VREF_POS_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac2vol", 1.0, DAC_VREF_POS_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac3vol", 1.0, DAC_VREF_POS_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac4vol", 1.0, DAC_VREF_POS_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac9", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac9", -1.0, DAC_VREF_NEG_INPUT) MCFG_DEVICE_ADD("pit0", PIT8254, 0) MCFG_PIT8253_CLK0(4000000) @@ -254,15 +258,16 @@ MACHINE_CONFIG_MEMBER( wsf_80186_sound_device::device_add_mconfig ) MCFG_SOUND_ADD("dac3", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC MCFG_SOUND_ADD("dac4", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC MCFG_SOUND_ADD("dac9", AD7533, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac1vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_ADD("dac2vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_ADD("dac3vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac3", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac3", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_ADD("dac4vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac4", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac4", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac1vol", 1.0, DAC_VREF_POS_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac2vol", 1.0, DAC_VREF_POS_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac3vol", 1.0, DAC_VREF_POS_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac4vol", 1.0, DAC_VREF_POS_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac9", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac9", -1.0, DAC_VREF_NEG_INPUT) /* sound hardware */ MCFG_YM2151_ADD("ymsnd", 4000000) diff --git a/src/mame/audio/midway.cpp b/src/mame/audio/midway.cpp index a3624c30b23..0db7413b894 100644 --- a/src/mame/audio/midway.cpp +++ b/src/mame/audio/midway.cpp @@ -12,6 +12,7 @@ #include "includes/mcr.h" #include "audio/midway.h" #include "audio/williams.h" +#include "sound/volt_reg.h" @@ -584,7 +585,8 @@ MACHINE_CONFIG_MEMBER(midway_sounds_good_device::device_add_mconfig) MCFG_PIA_IRQB_HANDLER(WRITELINE(midway_sounds_good_device, irq_w)) MCFG_SOUND_ADD("dac", AD7533, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 1.0) /// ad7533jn.u10 - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END @@ -737,7 +739,8 @@ MACHINE_CONFIG_MEMBER(midway_turbo_cheap_squeak_device::device_add_mconfig) MCFG_PIA_IRQB_HANDLER(WRITELINE(midway_turbo_cheap_squeak_device, irq_w)) MCFG_SOUND_ADD("dac", AD7533, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 1.0) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/audio/n8080.cpp b/src/mame/audio/n8080.cpp index 826101bdbc1..f3a27c3869c 100644 --- a/src/mame/audio/n8080.cpp +++ b/src/mame/audio/n8080.cpp @@ -8,6 +8,7 @@ #include "emu.h" #include "includes/n8080.h" +#include "sound/volt_reg.h" #include "speaker.h" @@ -489,7 +490,8 @@ MACHINE_CONFIG_START( spacefev_sound ) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("n8080_dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.15) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "n8080_dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ADD("snsnd", SN76477, 0) MCFG_SN76477_NOISE_PARAMS(RES_K(36), RES_K(150), CAP_N(1)) // noise + filter @@ -526,7 +528,8 @@ MACHINE_CONFIG_START( sheriff_sound ) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("n8080_dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.15) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "n8080_dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ADD("snsnd", SN76477, 0) MCFG_SN76477_NOISE_PARAMS(RES_K(36), RES_K(100), CAP_N(1)) // noise + filter @@ -566,5 +569,6 @@ MACHINE_CONFIG_START( helifire_sound ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("helifire_dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.15) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "helifire_dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "helifire_dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/audio/nichisnd.cpp b/src/mame/audio/nichisnd.cpp index 9dcae24c49e..386a8bc8c7f 100644 --- a/src/mame/audio/nichisnd.cpp +++ b/src/mame/audio/nichisnd.cpp @@ -97,9 +97,10 @@ MACHINE_CONFIG_MEMBER(nichisnd_device::device_add_mconfig) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) MCFG_SOUND_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.37) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac2", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.37) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/audio/nichisnd.h b/src/mame/audio/nichisnd.h index c4693bfb689..6343a3832dd 100644 --- a/src/mame/audio/nichisnd.h +++ b/src/mame/audio/nichisnd.h @@ -14,6 +14,7 @@ #include "cpu/z80/tmpz84c011.h" #include "sound/3812intf.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "speaker.h" #include "machine/gen_latch.h" diff --git a/src/mame/audio/s11c_bg.cpp b/src/mame/audio/s11c_bg.cpp index 05f7f52948f..fb80c7ad1f0 100644 --- a/src/mame/audio/s11c_bg.cpp +++ b/src/mame/audio/s11c_bg.cpp @@ -10,6 +10,7 @@ #include "emu.h" #include "s11c_bg.h" #include "sound/dac.h" +#include "sound/volt_reg.h" DEFINE_DEVICE_TYPE(S11C_BG, s11c_bg_device, "s11c_bg", "Williams System 11C Background Music") @@ -65,7 +66,8 @@ MACHINE_CONFIG_MEMBER( s11c_bg_device::device_add_mconfig ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.25) MCFG_SOUND_ADD("dac", MC1408, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.25) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MCFG_SOUND_ADD("hc55516_bg", HC55516, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.5) diff --git a/src/mame/audio/segag80r.cpp b/src/mame/audio/segag80r.cpp index aec1108564e..adc354b9d7b 100644 --- a/src/mame/audio/segag80r.cpp +++ b/src/mame/audio/segag80r.cpp @@ -18,6 +18,7 @@ #include "sound/samples.h" #include "sound/tms36xx.h" #include "sound/dac.h" +#include "sound/volt_reg.h" /************************************* @@ -708,7 +709,8 @@ MACHINE_CONFIG_START( monsterb_sound_board ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // 50K (R91-97)/100K (R98-106) ladder network - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/audio/spacefb.cpp b/src/mame/audio/spacefb.cpp index 472916bf077..00607b17649 100644 --- a/src/mame/audio/spacefb.cpp +++ b/src/mame/audio/spacefb.cpp @@ -12,6 +12,7 @@ #include "cpu/mcs48/mcs48.h" #include "sound/dac.h" #include "sound/samples.h" +#include "sound/volt_reg.h" #include "speaker.h" @@ -79,7 +80,8 @@ static const char *const spacefb_sample_names[] = MACHINE_CONFIG_START( 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_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MCFG_SOUND_ADD("samples", SAMPLES, 0) MCFG_SAMPLES_CHANNELS(3) diff --git a/src/mame/audio/targ.cpp b/src/mame/audio/targ.cpp index f34739045fd..34a9ddbf5ed 100644 --- a/src/mame/audio/targ.cpp +++ b/src/mame/audio/targ.cpp @@ -15,6 +15,7 @@ #include "emu.h" #include "includes/exidy.h" +#include "sound/volt_reg.h" #include "speaker.h" @@ -185,7 +186,8 @@ MACHINE_CONFIG_START( spectar_audio ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.99) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MACHINE_CONFIG_END @@ -200,5 +202,6 @@ MACHINE_CONFIG_START( targ_audio ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.99) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/audio/williams.cpp b/src/mame/audio/williams.cpp index eb81812c810..6633556d258 100644 --- a/src/mame/audio/williams.cpp +++ b/src/mame/audio/williams.cpp @@ -38,6 +38,7 @@ #include "sound/okim6295.h" #include "sound/hc55516.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #define NARC_MASTER_CLOCK XTAL_8MHz @@ -188,7 +189,8 @@ MACHINE_CONFIG_MEMBER( williams_cvsd_sound_device::device_add_mconfig ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.10) MCFG_SOUND_ADD("dac", MC1408, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.25) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MCFG_SOUND_ADD("cvsd", HC55516, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.60) @@ -502,9 +504,10 @@ MACHINE_CONFIG_MEMBER( williams_narc_sound_device::device_add_mconfig ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.10) MCFG_SOUND_ADD("dac1", AD7224, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.25) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac2", AD7224, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.25) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT) MCFG_SOUND_ADD("cvsd", HC55516, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.60) @@ -751,7 +754,8 @@ MACHINE_CONFIG_MEMBER( williams_adpcm_sound_device::device_add_mconfig ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.10) MCFG_SOUND_ADD("dac", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.10) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MCFG_OKIM6295_ADD("oki", ADPCM_MASTER_CLOCK/8, PIN7_HIGH) // clock frequency & pin 7 not verified MCFG_DEVICE_ADDRESS_MAP(0, williams_adpcm_oki_map) diff --git a/src/mame/audio/wpcsnd.cpp b/src/mame/audio/wpcsnd.cpp index 41bfc8ce03e..f8ce84bae3d 100644 --- a/src/mame/audio/wpcsnd.cpp +++ b/src/mame/audio/wpcsnd.cpp @@ -10,6 +10,7 @@ #include "emu.h" #include "wpcsnd.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #define LOG_WPCSND (0) @@ -75,7 +76,8 @@ MACHINE_CONFIG_MEMBER( wpcsnd_device::device_add_mconfig ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.25) MCFG_SOUND_ADD("dac", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.25) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MCFG_SOUND_ADD("hc55516", HC55516, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.5) diff --git a/src/mame/audio/zaccaria.cpp b/src/mame/audio/zaccaria.cpp index 56f3873747e..a80badd075a 100644 --- a/src/mame/audio/zaccaria.cpp +++ b/src/mame/audio/zaccaria.cpp @@ -8,6 +8,7 @@ #include "machine/clock.h" #include "machine/rescap.h" #include "sound/dac.h" +#include "sound/volt_reg.h" //************************************************************************** @@ -427,7 +428,8 @@ MACHINE_CONFIG_MEMBER(zac1b11142_audio_device::device_add_mconfig) MCFG_PIA_WRITEPB_HANDLER(WRITE8(zac1b11142_audio_device, pia_1i_portb_w)) MCFG_SOUND_ADD("dac", MC1408, 0) MCFG_MIXER_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.40, 0) // mc1408.1f - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) // There is no xtal, the clock is obtained from a RC oscillator as shown in the TMS5220 datasheet (R=100kOhm C=22pF) // 162kHz measured on pin 3 20 minutes after power on, clock would then be 162.3*4=649.2kHz diff --git a/src/mame/drivers/20pacgal.cpp b/src/mame/drivers/20pacgal.cpp index 0fd1c0c9e80..6e6fab65cba 100644 --- a/src/mame/drivers/20pacgal.cpp +++ b/src/mame/drivers/20pacgal.cpp @@ -90,6 +90,7 @@ Graphics: CY37256P160-83AC x 2 (Ultra37000 CPLD family - 160 pin TQFP, 256 Macro #include "machine/eepromser.h" #include "machine/watchdog.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "speaker.h" @@ -411,7 +412,8 @@ static MACHINE_CONFIG_START( 20pacgal ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/4004clk.cpp b/src/mame/drivers/4004clk.cpp index 32a93d14ec8..c363e32bfa3 100644 --- a/src/mame/drivers/4004clk.cpp +++ b/src/mame/drivers/4004clk.cpp @@ -12,6 +12,7 @@ #include "cpu/mcs40/mcs40.h" #include "machine/clock.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "speaker.h" #include "4004clk.lh" @@ -138,7 +139,8 @@ static MACHINE_CONFIG_START( 4004clk ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_CLOCK_ADD("clk", 60) MCFG_CLOCK_SIGNAL_HANDLER(INPUTLINE("maincpu", I4004_TEST_LINE)) diff --git a/src/mame/drivers/40love.cpp b/src/mame/drivers/40love.cpp index c09f487f660..a510e961cec 100644 --- a/src/mame/drivers/40love.cpp +++ b/src/mame/drivers/40love.cpp @@ -227,6 +227,7 @@ Notes - Has jumper setting for 122HZ or 61HZ) #include "cpu/m6805/m6805.h" #include "cpu/z80/z80.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -806,7 +807,8 @@ static MACHINE_CONFIG_START( 40love ) // pin 22 Noise Output not mapped MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_START( undoukai ) @@ -864,7 +866,8 @@ static MACHINE_CONFIG_START( undoukai ) // pin 22 Noise Output not mapped MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END /*******************************************************************************/ diff --git a/src/mame/drivers/aa310.cpp b/src/mame/drivers/aa310.cpp index 3e2f4fec9b6..a4386b1035e 100644 --- a/src/mame/drivers/aa310.cpp +++ b/src/mame/drivers/aa310.cpp @@ -94,6 +94,7 @@ #include "machine/i2cmem.h" #include "machine/ram.h" #include "machine/wd_fdc.h" +#include "sound/volt_reg.h" #include "softlist.h" #include "speaker.h" @@ -418,21 +419,22 @@ static MACHINE_CONFIG_START( aa310 ) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac0", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.1) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac1", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.1) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac2", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.1) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac3", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.1) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac4", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.1) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac5", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.1) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac6", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.1) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac7", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.1) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac0", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac0", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac3", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac3", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac4", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac4", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac5", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac5", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac6", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac6", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac7", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac7", -1.0, DAC_VREF_NEG_INPUT) /* Expansion slots - 2-card backplane */ MACHINE_CONFIG_END diff --git a/src/mame/drivers/advision.cpp b/src/mame/drivers/advision.cpp index f0696649ea8..88b545390fa 100644 --- a/src/mame/drivers/advision.cpp +++ b/src/mame/drivers/advision.cpp @@ -22,6 +22,7 @@ #include "cpu/mcs48/mcs48.h" #include "cpu/cop400/cop400.h" +#include "sound/volt_reg.h" #include "screen.h" #include "softlist.h" #include "speaker.h" @@ -90,7 +91,8 @@ static MACHINE_CONFIG_START( advision ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_2BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) /* cartridge */ MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "advision_cart") diff --git a/src/mame/drivers/alpha68k.cpp b/src/mame/drivers/alpha68k.cpp index 3ada163af05..0e20f8ce46a 100644 --- a/src/mame/drivers/alpha68k.cpp +++ b/src/mame/drivers/alpha68k.cpp @@ -194,6 +194,7 @@ DIP locations verified from manuals for: #include "sound/3812intf.h" #include "sound/ay8910.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "sound/ym2413.h" #include "screen.h" #include "speaker.h" @@ -1967,7 +1968,8 @@ static MACHINE_CONFIG_START( sstingry ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.75) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_START( kyros ) @@ -2018,7 +2020,8 @@ static MACHINE_CONFIG_START( kyros ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.9) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.75) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_START( jongbou ) @@ -2153,7 +2156,8 @@ static MACHINE_CONFIG_START( alpha68k_II ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.75) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( btlfieldb, alpha68k_II ) @@ -2208,7 +2212,8 @@ static MACHINE_CONFIG_START( alpha68k_II_gm ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.75) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_START( alpha68k_V ) @@ -2256,7 +2261,8 @@ static MACHINE_CONFIG_START( alpha68k_V ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.75) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_START( alpha68k_V_sb ) @@ -2304,7 +2310,8 @@ static MACHINE_CONFIG_START( alpha68k_V_sb ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.75) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_START( tnextspc ) diff --git a/src/mame/drivers/apple3.cpp b/src/mame/drivers/apple3.cpp index 7d76bdb4087..0885ce7e47a 100644 --- a/src/mame/drivers/apple3.cpp +++ b/src/mame/drivers/apple3.cpp @@ -19,6 +19,7 @@ #include "emu.h" #include "includes/apple3.h" #include "includes/apple2.h" +#include "sound/volt_reg.h" #include "formats/ap2_dsk.h" #include "bus/a2bus/a2cffa.h" @@ -146,9 +147,10 @@ static MACHINE_CONFIG_START( apple3 ) /* sound */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("bell", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.99) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_ADD("dac", DAC_6BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.125) // 6522.b5(pb0-pb5) + 320k,160k,80k,40k,20k,10k - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "bell", 1.0, DAC_VREF_POS_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MCFG_TIMER_DRIVER_ADD_PERIODIC("c040", apple3_state, apple3_c040_tick, attotime::from_hz(2000)) diff --git a/src/mame/drivers/applix.cpp b/src/mame/drivers/applix.cpp index 95e7045d42d..0b27a843b49 100644 --- a/src/mame/drivers/applix.cpp +++ b/src/mame/drivers/applix.cpp @@ -45,6 +45,7 @@ #include "machine/timer.h" #include "machine/wd_fdc.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "sound/wave.h" #include "video/mc6845.h" @@ -856,9 +857,10 @@ static MACHINE_CONFIG_START( applix ) /* sound hardware */ MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") MCFG_SOUND_ADD("ldac", DAC0800, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0) // 74ls374.u20 + dac0800.u21 + 4052.u23 - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("rdac", DAC0800, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) // 74ls374.u20 + dac0800.u21 + 4052.u23 - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT) MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.50) diff --git a/src/mame/drivers/aristmk5.cpp b/src/mame/drivers/aristmk5.cpp index 5d025ab5688..5d026f260d9 100644 --- a/src/mame/drivers/aristmk5.cpp +++ b/src/mame/drivers/aristmk5.cpp @@ -385,6 +385,7 @@ #include "machine/nvram.h" #include "machine/ins8250.h" #include "machine/ticket.h" +#include "sound/volt_reg.h" #include "speaker.h" // Non-US button layouts Bet buttons Lines Gamble Other @@ -2067,21 +2068,22 @@ static MACHINE_CONFIG_START( aristmk5 ) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac0", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.1) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac1", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.1) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac2", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.1) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac3", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.1) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac4", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.1) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac5", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.1) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac6", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.1) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac7", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.1) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac0", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac0", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac3", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac3", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac4", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac4", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac5", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac5", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac6", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac6", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac7", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac7", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/armedf.cpp b/src/mame/drivers/armedf.cpp index 556a99f48f0..f3937924e11 100644 --- a/src/mame/drivers/armedf.cpp +++ b/src/mame/drivers/armedf.cpp @@ -321,6 +321,7 @@ Notes: #include "sound/3526intf.h" #include "sound/3812intf.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -1250,9 +1251,10 @@ static MACHINE_CONFIG_START( terraf_sound ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) MCFG_SOUND_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.8) // 10-pin SIP with 74HC374P latch - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac2", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.8) // 10-pin SIP with 74HC374P latch - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_START( terraf ) @@ -1336,9 +1338,10 @@ static MACHINE_CONFIG_START( terrafjb ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) MCFG_SOUND_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.8) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac2", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.8) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( terrafb, terraf ) @@ -1421,9 +1424,10 @@ static MACHINE_CONFIG_START( armedf ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) MCFG_SOUND_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac2", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_START( cclimbr2 ) @@ -1470,9 +1474,10 @@ static MACHINE_CONFIG_START( cclimbr2 ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) MCFG_SOUND_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac2", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_START( legion ) @@ -1519,9 +1524,10 @@ static MACHINE_CONFIG_START( legion ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) MCFG_SOUND_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4) // 10-pin SIP with 74HC374P latch - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac2", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4) // 10-pin SIP with 74HC374P latch - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_START( legionjb ) @@ -1566,9 +1572,10 @@ static MACHINE_CONFIG_START( legionjb ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) MCFG_SOUND_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac2", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_START( bigfghtr ) diff --git a/src/mame/drivers/atari400.cpp b/src/mame/drivers/atari400.cpp index 2a500b7529c..08cce420ebd 100644 --- a/src/mame/drivers/atari400.cpp +++ b/src/mame/drivers/atari400.cpp @@ -49,6 +49,7 @@ #include "machine/atarifdc.h" #include "sound/dac.h" #include "sound/pokey.h" +#include "sound/volt_reg.h" #include "bus/a800/a800_slot.h" #include "bus/a800/a800_carts.h" #include "bus/a800/a8sio.h" @@ -2124,7 +2125,8 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( atari_common, atari_common_nodac ) MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.03) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) /* internal ram */ MCFG_RAM_ADD(RAM_TAG) diff --git a/src/mame/drivers/atari_s1.cpp b/src/mame/drivers/atari_s1.cpp index 2b7b67ee104..5889e6e987e 100644 --- a/src/mame/drivers/atari_s1.cpp +++ b/src/mame/drivers/atari_s1.cpp @@ -50,6 +50,7 @@ ToDo: #include "machine/timer.h" #include "machine/watchdog.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "speaker.h" #include "atari_s1.lh" @@ -447,7 +448,8 @@ static MACHINE_CONFIG_START( atari_s1 ) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.3) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) /* Video */ MCFG_DEFAULT_LAYOUT(layout_atari_s1) diff --git a/src/mame/drivers/atari_s2.cpp b/src/mame/drivers/atari_s2.cpp index a447acdceb2..7ca3b2b1628 100644 --- a/src/mame/drivers/atari_s2.cpp +++ b/src/mame/drivers/atari_s2.cpp @@ -28,6 +28,7 @@ ToDo: #include "machine/timer.h" #include "machine/watchdog.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "speaker.h" #include "atari_s2.lh" @@ -476,9 +477,10 @@ static MACHINE_CONFIG_START( atari_s2 ) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_4BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.15) // r23-r26 (68k,33k,18k,8.2k) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac1", DAC_3BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.15) // r18-r20 (100k,47k,100k) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT) /* Video */ MCFG_DEFAULT_LAYOUT(layout_atari_s2) diff --git a/src/mame/drivers/bigevglf.cpp b/src/mame/drivers/bigevglf.cpp index 6f7c9dac8e9..37e9355ac50 100644 --- a/src/mame/drivers/bigevglf.cpp +++ b/src/mame/drivers/bigevglf.cpp @@ -64,6 +64,7 @@ J1100072A #include "cpu/z80/z80.h" #include "sound/ay8910.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "speaker.h" @@ -501,7 +502,8 @@ static MACHINE_CONFIG_START( bigevglf ) // pin 22 Noise Output not mapped MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END /*************************************************************************** diff --git a/src/mame/drivers/bking.cpp b/src/mame/drivers/bking.cpp index 54348a8715c..b29f06c7e67 100644 --- a/src/mame/drivers/bking.cpp +++ b/src/mame/drivers/bking.cpp @@ -25,6 +25,7 @@ DIP Locations verified for: #include "machine/watchdog.h" #include "sound/ay8910.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "speaker.h" @@ -434,7 +435,8 @@ static MACHINE_CONFIG_START( bking ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( bking3, bking ) diff --git a/src/mame/drivers/bw12.cpp b/src/mame/drivers/bw12.cpp index f7568b048c2..744e85edfb6 100644 --- a/src/mame/drivers/bw12.cpp +++ b/src/mame/drivers/bw12.cpp @@ -29,6 +29,7 @@ #include "includes/bw12.h" #include "bus/rs232/rs232.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "screen.h" #include "softlist.h" #include "speaker.h" @@ -567,7 +568,8 @@ static MACHINE_CONFIG_START( common ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", MC1408, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.125) // ls273.ic5 + mc1408.ic4 - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) /* devices */ MCFG_TIMER_DRIVER_ADD(FLOPPY_TIMER_TAG, bw12_state, floppy_motor_off_tick) diff --git a/src/mame/drivers/bwing.cpp b/src/mame/drivers/bwing.cpp index a553ecc4623..270a84903f0 100644 --- a/src/mame/drivers/bwing.cpp +++ b/src/mame/drivers/bwing.cpp @@ -31,6 +31,7 @@ Known issues: #include "cpu/m6809/m6809.h" #include "sound/ay8910.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -406,7 +407,8 @@ static MACHINE_CONFIG_START( bwing ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) MCFG_SOUND_ADD("dac", DAC08, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END //**************************************************************************** diff --git a/src/mame/drivers/byvid.cpp b/src/mame/drivers/byvid.cpp index ee305dccd3c..31a38ca364d 100644 --- a/src/mame/drivers/byvid.cpp +++ b/src/mame/drivers/byvid.cpp @@ -45,6 +45,7 @@ ToDo (granny): #include "machine/timer.h" #include "sound/beep.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "video/tms9928a.h" #include "speaker.h" @@ -796,7 +797,8 @@ static MACHINE_CONFIG_START( babypac ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", ZN429E, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // U32 (Vidiot) or U6 (Cheap Squeak) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MCFG_SPEAKER_STANDARD_MONO("beee") MCFG_SOUND_ADD("beeper", BEEP, 600) diff --git a/src/mame/drivers/calchase.cpp b/src/mame/drivers/calchase.cpp index 53e082b6b0c..dc49d6ec13a 100644 --- a/src/mame/drivers/calchase.cpp +++ b/src/mame/drivers/calchase.cpp @@ -136,6 +136,7 @@ something wrong in the disk geometry reported by calchase.chd (20,255,63) since #include "machine/pcshare.h" #include "machine/ds128x.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "video/pc_vga.h" #include "screen.h" #include "speaker.h" @@ -664,9 +665,10 @@ static MACHINE_CONFIG_START( calchase ) /* sound hardware */ MCFG_SPEAKER_STANDARD_STEREO("lspeaker","rspeaker") MCFG_SOUND_ADD("ldac", DAC_12BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("rdac", DAC_12BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_START( hostinv ) @@ -690,9 +692,10 @@ static MACHINE_CONFIG_START( hostinv ) /* sound hardware */ MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") MCFG_SOUND_ADD("ldac", DAC_12BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("rdac", DAC_12BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/camplynx.cpp b/src/mame/drivers/camplynx.cpp index e7bafbab0d8..f0c76d77eab 100644 --- a/src/mame/drivers/camplynx.cpp +++ b/src/mame/drivers/camplynx.cpp @@ -122,6 +122,7 @@ #include "imagedev/cassette.h" #include "machine/wd_fdc.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "sound/wave.h" #include "video/mc6845.h" @@ -794,7 +795,8 @@ static MACHINE_CONFIG_START( lynx_common ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_6BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.375) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.02) MACHINE_CONFIG_END diff --git a/src/mame/drivers/capbowl.cpp b/src/mame/drivers/capbowl.cpp index 17dd5e2bf0f..891d66e0fef 100644 --- a/src/mame/drivers/capbowl.cpp +++ b/src/mame/drivers/capbowl.cpp @@ -94,6 +94,7 @@ #include "cpu/m6809/m6809.h" #include "sound/2203intf.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "speaker.h" #define MASTER_CLOCK XTAL_8MHz @@ -357,7 +358,8 @@ static MACHINE_CONFIG_START( capbowl ) MCFG_SOUND_ROUTE(3, "speaker", 0.75) MCFG_SOUND_ADD("dac", DAC0832, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/cc40.cpp b/src/mame/drivers/cc40.cpp index 33109a62c5e..562f7f0cb9d 100644 --- a/src/mame/drivers/cc40.cpp +++ b/src/mame/drivers/cc40.cpp @@ -78,6 +78,7 @@ #include "cpu/tms7000/tms7000.h" #include "machine/nvram.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "video/hd44780.h" #include "screen.h" @@ -605,7 +606,8 @@ static MACHINE_CONFIG_START( cc40 ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) /* cartridge */ MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "cc40_cart") diff --git a/src/mame/drivers/cchasm.cpp b/src/mame/drivers/cchasm.cpp index a2c8b896f64..47283484000 100644 --- a/src/mame/drivers/cchasm.cpp +++ b/src/mame/drivers/cchasm.cpp @@ -24,6 +24,7 @@ #include "machine/z80ctc.h" #include "machine/watchdog.h" #include "sound/ay8910.h" +#include "sound/volt_reg.h" #include "speaker.h" #define CCHASM_68K_CLOCK (XTAL_8MHz) @@ -184,9 +185,10 @@ static MACHINE_CONFIG_START( cchasm ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) MCFG_SOUND_ADD("dac1", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_ADD("dac2", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) /* 6840 PTM */ MCFG_DEVICE_ADD("6840ptm", PTM6840, CCHASM_68K_CLOCK/10) diff --git a/src/mame/drivers/champbas.cpp b/src/mame/drivers/champbas.cpp index 9902776b11b..3e40112eb40 100644 --- a/src/mame/drivers/champbas.cpp +++ b/src/mame/drivers/champbas.cpp @@ -87,6 +87,7 @@ TODO: #include "machine/watchdog.h" #include "sound/ay8910.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -601,7 +602,8 @@ static MACHINE_CONFIG_START( champbas ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.3) MCFG_SOUND_ADD("dac", DAC_6BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.7) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( champbasj, champbas ) @@ -716,9 +718,10 @@ static MACHINE_CONFIG_START( exctsccr ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.08) MCFG_SOUND_ADD("dac1", DAC_6BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.3) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac2", DAC_6BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.3) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END /* Bootleg running on a modified Champion Baseball board */ @@ -771,7 +774,8 @@ static MACHINE_CONFIG_START( exctsccrb ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.3) MCFG_SOUND_ADD("dac", DAC_6BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.7) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/cheekyms.cpp b/src/mame/drivers/cheekyms.cpp index fc74df66f3d..cefe0b8e02e 100644 --- a/src/mame/drivers/cheekyms.cpp +++ b/src/mame/drivers/cheekyms.cpp @@ -147,21 +147,22 @@ static MACHINE_CONFIG_START( cheekyms ) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac0", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_ADD("dac1", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_ADD("dac2", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_ADD("dac3", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_ADD("dac4", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_ADD("dac5", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_ADD("dac6", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_ADD("dac7", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac0", 1.0, DAC_VREF_POS_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac3", 1.0, DAC_VREF_POS_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac4", 1.0, DAC_VREF_POS_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac5", 1.0, DAC_VREF_POS_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac6", 1.0, DAC_VREF_POS_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac7", 1.0, DAC_VREF_POS_INPUT) #endif MACHINE_CONFIG_END diff --git a/src/mame/drivers/chsuper.cpp b/src/mame/drivers/chsuper.cpp index 32021b8c89b..6934ba074fd 100644 --- a/src/mame/drivers/chsuper.cpp +++ b/src/mame/drivers/chsuper.cpp @@ -24,6 +24,7 @@ #include "cpu/z180/z180.h" #include "machine/nvram.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "video/ramdac.h" #include "screen.h" #include "speaker.h" @@ -378,7 +379,8 @@ static MACHINE_CONFIG_START( chsuper ) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/circusc.cpp b/src/mame/drivers/circusc.cpp index acd072199fa..d5e1d708811 100644 --- a/src/mame/drivers/circusc.cpp +++ b/src/mame/drivers/circusc.cpp @@ -61,6 +61,7 @@ This bug is due to 380_r02.6h, it differs from 380_q02.6h by 2 bytes, at #include "machine/konami1.h" #include "machine/watchdog.h" #include "sound/discrete.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -388,7 +389,8 @@ static MACHINE_CONFIG_START( circusc ) MCFG_SOUND_ROUTE_EX(0, "fltdisc", 1.0, 1) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE_EX(0, "fltdisc", 1.0, 2) // ls374.7g + r44+r45+r47+r48+r50+r56+r57+r58+r59 (20k) + r46+r49+r51+r52+r53+r54+r55 (10k) + upc324.3h - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ADD("fltdisc", DISCRETE, 0) diff --git a/src/mame/drivers/ckz80.cpp b/src/mame/drivers/ckz80.cpp index 5faf53e4f31..e47218899f7 100644 --- a/src/mame/drivers/ckz80.cpp +++ b/src/mame/drivers/ckz80.cpp @@ -30,6 +30,7 @@ Master: #include "machine/timer.h" #include "machine/bankdev.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "speaker.h" // internal artwork @@ -446,7 +447,8 @@ static MACHINE_CONFIG_START( master ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_2BIT_BINARY_WEIGHTED_ONES_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/cntsteer.cpp b/src/mame/drivers/cntsteer.cpp index dcd43e3b82e..66341a8ae02 100644 --- a/src/mame/drivers/cntsteer.cpp +++ b/src/mame/drivers/cntsteer.cpp @@ -35,6 +35,7 @@ #include "machine/gen_latch.h" #include "sound/ay8910.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -953,7 +954,8 @@ static MACHINE_CONFIG_START( cntsteer ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_START( zerotrgt ) diff --git a/src/mame/drivers/coco12.cpp b/src/mame/drivers/coco12.cpp index b4509b4de9f..1837eef2d1d 100644 --- a/src/mame/drivers/coco12.cpp +++ b/src/mame/drivers/coco12.cpp @@ -39,6 +39,7 @@ #include "cpu/m6809/m6809.h" #include "imagedev/cassette.h" +#include "sound/volt_reg.h" #include "softlist.h" #include "speaker.h" @@ -381,12 +382,12 @@ MACHINE_CONFIG_START( coco_sound ) // 6-bit D/A: R10-15 = 10K, 20K, 40.2K, 80.6K, 162K, 324K (according to parts list); output also controls joysticks MCFG_SOUND_ADD("dac", DAC_6BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.125) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) // Single-bit sound: R22 = 10K MCFG_SOUND_ADD("sbs", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.125) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) diff --git a/src/mame/drivers/coolpool.cpp b/src/mame/drivers/coolpool.cpp index 271ebea76b4..d022a0ca7ec 100644 --- a/src/mame/drivers/coolpool.cpp +++ b/src/mame/drivers/coolpool.cpp @@ -33,6 +33,7 @@ #include "cpu/tms32025/tms32025.h" #include "machine/nvram.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -809,7 +810,8 @@ static MACHINE_CONFIG_START( amerdart ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_12BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END @@ -847,7 +849,8 @@ static MACHINE_CONFIG_START( coolpool ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_12BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/cosmic.cpp b/src/mame/drivers/cosmic.cpp index b4bc8559927..8301e79c3ef 100644 --- a/src/mame/drivers/cosmic.cpp +++ b/src/mame/drivers/cosmic.cpp @@ -40,6 +40,7 @@ cosmicg - board can operate in b&w mode if there is no PROM, in this case #include "cpu/tms9900/tms9980a.h" #include "cpu/z80/z80.h" #include "sound/samples.h" +#include "sound/volt_reg.h" #include "speaker.h" @@ -1052,7 +1053,8 @@ static MACHINE_CONFIG_DERIVED( panic, cosmic ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MACHINE_CONFIG_END @@ -1112,7 +1114,8 @@ static MACHINE_CONFIG_START( cosmicg ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // NE556 - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) // Other DACs include 3-bit binary-weighted (100K/50K/25K) DAC combined with another NE556 for attack march MACHINE_CONFIG_END @@ -1136,7 +1139,8 @@ static MACHINE_CONFIG_DERIVED( magspot, cosmic ) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MACHINE_CONFIG_END @@ -1169,7 +1173,8 @@ static MACHINE_CONFIG_DERIVED( nomnlnd, cosmic ) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/craft.cpp b/src/mame/drivers/craft.cpp index 59ed1660461..cf54843ddbf 100644 --- a/src/mame/drivers/craft.cpp +++ b/src/mame/drivers/craft.cpp @@ -11,6 +11,7 @@ #include "emu.h" #include "cpu/avr8/avr8.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -257,7 +258,8 @@ static MACHINE_CONFIG_START( craft ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("avr8") MCFG_SOUND_ADD("dac", DAC_6BIT_R2R, 0) MCFG_SOUND_ROUTE(0, "avr8", 0.25) // pd1/pd2/pd4/pd5/pd6/pd7 + 2k(x7) + 1k(x5) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END ROM_START( craft ) diff --git a/src/mame/drivers/cubeqst.cpp b/src/mame/drivers/cubeqst.cpp index f2bc440e0d2..9908bf4f8a0 100644 --- a/src/mame/drivers/cubeqst.cpp +++ b/src/mame/drivers/cubeqst.cpp @@ -25,6 +25,7 @@ #include "machine/ldpr8210.h" #include "machine/nvram.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "speaker.h" class cubeqst_state : public driver_device @@ -548,37 +549,38 @@ static MACHINE_CONFIG_START( cubeqst ) MCFG_SOUND_ROUTE(1, "rspeaker", 1.0) MCFG_SOUND_ADD("rdac0", AD7521, 0) MCFG_SOUND_ROUTE(0, "rspeaker", 0.125) // ad7521jn.2d (59) + cd4051be.1d (24) + 1500pf.c22 (34) + tl074cn.1b (53) + r10k.rn1 (30) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("ldac0", AD7521, 0) MCFG_SOUND_ROUTE(0, "lspeaker", 0.125) // ad7521jn.2d (59) + cd4051be.3d (24) + 1500pf.c13 (34) + tl074cn.3b (53) + r10k.rn3 (30) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("rdac1", AD7521, 0) MCFG_SOUND_ROUTE(0, "rspeaker", 0.125) // ad7521jn.2d (59) + cd4051be.1d (24) + 1500pf.c21 (34) + tl074cn.1c (53) + r10k.rn2 (30) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("ldac1", AD7521, 0) MCFG_SOUND_ROUTE(0, "lspeaker", 0.125) // ad7521jn.2d (59) + cd4051be.3d (24) + 1500pf.c12 (34) + tl074cn.3c (53) + r10k.rn4 (30) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("rdac2", AD7521, 0) MCFG_SOUND_ROUTE(0, "rspeaker", 0.125) // ad7521jn.2d (59) + cd4051be.1d (24) + 1500pf.c20 (34) + tl074cn.1c (53) + r10k.rn2 (30) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("ldac2", AD7521, 0) MCFG_SOUND_ROUTE(0, "lspeaker", 0.125) // ad7521jn.2d (59) + cd4051be.3d (24) + 1500pf.c11 (34) + tl074cn.3c (53) + r10k.rn4 (30) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("rdac3", AD7521, 0) MCFG_SOUND_ROUTE(0, "rspeaker", 0.125) // ad7521jn.2d (59) + cd4051be.1d (24) + 1500pf.c19 (34) + tl074cn.1b (53) + r10k.rn1 (30) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("ldac3", AD7521, 0) MCFG_SOUND_ROUTE(0, "lspeaker", 0.125) // ad7521jn.2d (59) + cd4051be.3d (24) + 1500pf.c10 (34) + tl074cn.3b (53) + r10k.rn3 (30) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("rdac4", AD7521, 0) MCFG_SOUND_ROUTE(0, "rspeaker", 0.125) // ad7521jn.2d (59) + cd4051be.1d (24) + 1500pf.c18 (34) + tl074cn.1c (53) + r10k.rn2 (30) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("ldac4", AD7521, 0) MCFG_SOUND_ROUTE(0, "lspeaker", 0.125) // ad7521jn.2d (59) + cd4051be.3d (24) + 1500pf.c9 (34) + tl074cn.3c (53) + r10k.rn4 (30) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("rdac5", AD7521, 0) MCFG_SOUND_ROUTE(0, "rspeaker", 0.125) // ad7521jn.2d (59) + cd4051be.1d (24) + 1500pf.c17 (34) + tl074cn.1b (53) + r10k.rn1 (30) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("ldac5", AD7521, 0) MCFG_SOUND_ROUTE(0, "lspeaker", 0.125) // ad7521jn.2d (59) + cd4051be.3d (24) + 1500pf.c8 (34) + tl074cn.3b (53) + r10k.rn3 (30) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("rdac6", AD7521, 0) MCFG_SOUND_ROUTE(0, "rspeaker", 0.125) // ad7521jn.2d (59) + cd4051be.1d (24) + 1500pf.c16 (34) + tl074cn.1c (53) + r10k.rn2 (30) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("ldac6", AD7521, 0) MCFG_SOUND_ROUTE(0, "lspeaker", 0.125) // ad7521jn.2d (59) + cd4051be.3d (24) + 1500pf.c7 (34) + tl074cn.3c (53) + r10k.rn4 (30) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("rdac7", AD7521, 0) MCFG_SOUND_ROUTE(0, "rspeaker", 0.125) // ad7521jn.2d (59) + cd4051be.1d (24) + 1500pf.c15 (34) + tl074cn.1b (53) + r10k.rn1 (30) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("ldac7", AD7521, 0) MCFG_SOUND_ROUTE(0, "lspeaker", 0.125) // ad7521jn.2d (59) + cd4051be.3d (24) + 1500pf.c6 (34) + tl074cn.3b (53) + r10k.rn3 (30) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "rdac0", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac0", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "ldac0", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac0", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "rdac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac1", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "ldac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac1", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "rdac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac2", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "ldac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac2", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "rdac3", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac3", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "ldac3", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac3", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "rdac4", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac4", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "ldac4", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac4", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "rdac5", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac5", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "ldac5", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac5", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "rdac6", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac6", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "ldac6", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac6", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "rdac7", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac7", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "ldac7", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac7", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/cvs.cpp b/src/mame/drivers/cvs.cpp index 36ff7639f5a..e8c6e278c96 100644 --- a/src/mame/drivers/cvs.cpp +++ b/src/mame/drivers/cvs.cpp @@ -98,6 +98,7 @@ Todo & FIXME: #include "emu.h" #include "includes/cvs.h" #include "cpu/s2650/s2650.h" +#include "sound/volt_reg.h" #include "speaker.h" @@ -1014,11 +1015,12 @@ static MACHINE_CONFIG_START( cvs ) MCFG_GENERIC_LATCH_8_ADD("soundlatch") MCFG_SOUND_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac2", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac3", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.99) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac3", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ADD("tms", TMS5100, XTAL_640kHz) MCFG_TMS5110_DATA_CB(READLINE(cvs_state, speech_rom_read_bit)) diff --git a/src/mame/drivers/cxgz80.cpp b/src/mame/drivers/cxgz80.cpp index 3422f807c90..a03e4b89686 100644 --- a/src/mame/drivers/cxgz80.cpp +++ b/src/mame/drivers/cxgz80.cpp @@ -27,6 +27,7 @@ Chess 2001: #include "cpu/z80/z80.h" #include "machine/timer.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "speaker.h" // internal artwork @@ -408,7 +409,8 @@ static MACHINE_CONFIG_START( ch2001 ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/cyberbal.cpp b/src/mame/drivers/cyberbal.cpp index ebc4bb14280..f6821f23424 100644 --- a/src/mame/drivers/cyberbal.cpp +++ b/src/mame/drivers/cyberbal.cpp @@ -26,6 +26,7 @@ #include "machine/eeprompar.h" #include "machine/watchdog.h" +#include "sound/volt_reg.h" #include "speaker.h" #include "rendlay.h" @@ -468,9 +469,10 @@ static MACHINE_CONFIG_START( cyberbal ) MCFG_SOUND_ROUTE(1, "rspeaker", 0.60) MCFG_SOUND_ADD("rdac", AM6012, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5) // AM6012.6j - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("ldac", AM6012, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5) // AM6012.6j - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/dectalk.cpp b/src/mame/drivers/dectalk.cpp index cf780ca198a..af810c8aca9 100644 --- a/src/mame/drivers/dectalk.cpp +++ b/src/mame/drivers/dectalk.cpp @@ -245,6 +245,7 @@ dgc (dg(no!spam)cx@mac.com) #include "machine/mc68681.h" #include "machine/x2212.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "speaker.h" @@ -895,7 +896,8 @@ static MACHINE_CONFIG_START( dectalk ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", AD7541, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.9) // ad7541.e107 (E88 10KHz OSC, handled by timer) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) /* Y2 is a 3.579545 MHz xtal for the dtmf decoder chip */ diff --git a/src/mame/drivers/equites.cpp b/src/mame/drivers/equites.cpp index 35e2c922ba6..d10fbe2b4c6 100644 --- a/src/mame/drivers/equites.cpp +++ b/src/mame/drivers/equites.cpp @@ -369,6 +369,7 @@ D #include "machine/nvram.h" #include "machine/watchdog.h" #include "sound/ay8910.h" +#include "sound/volt_reg.h" #include "speaker.h" #define FRQ_ADJUSTER_TAG "FRQ" @@ -1066,9 +1067,10 @@ static MACHINE_CONFIG_START( common_sound ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.15) MCFG_SOUND_ADD("dac1", DAC_6BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac2", DAC_6BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT) MCFG_SOUND_ADD("samples", SAMPLES, 0) MCFG_SAMPLES_CHANNELS(3) diff --git a/src/mame/drivers/ertictac.cpp b/src/mame/drivers/ertictac.cpp index 7bc8371a6ab..14fba0cf5a3 100644 --- a/src/mame/drivers/ertictac.cpp +++ b/src/mame/drivers/ertictac.cpp @@ -26,6 +26,7 @@ PCB has a single OSC at 24MHz #include "cpu/arm/arm.h" #include "machine/aakart.h" #include "machine/i2cmem.h" +#include "sound/volt_reg.h" #include "speaker.h" @@ -236,21 +237,22 @@ static MACHINE_CONFIG_START( ertictac ) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac0", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.05) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac1", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.05) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac2", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.05) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac3", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.05) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac4", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.05) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac5", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.05) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac6", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.05) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac7", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.05) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac0", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac0", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac3", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac3", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac4", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac4", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac5", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac5", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac6", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac6", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac7", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac7", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END ROM_START( ertictac ) diff --git a/src/mame/drivers/esripsys.cpp b/src/mame/drivers/esripsys.cpp index c1521980411..8186124ecec 100644 --- a/src/mame/drivers/esripsys.cpp +++ b/src/mame/drivers/esripsys.cpp @@ -33,6 +33,7 @@ #include "cpu/m6809/m6809.h" #include "machine/6840ptm.h" #include "machine/nvram.h" +#include "sound/volt_reg.h" #include "speaker.h" @@ -693,7 +694,8 @@ static MACHINE_CONFIG_START( esripsys ) MCFG_SOUND_ADD("dac", MC3410, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) // unknown DAC MCFG_SOUND_ADD("dacvol", MC3408, 0) // unknown DAC MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dacvol", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ADD("tms5220nl", TMS5220, 640000) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) diff --git a/src/mame/drivers/exterm.cpp b/src/mame/drivers/exterm.cpp index fc60ae65c67..d99cc694f23 100644 --- a/src/mame/drivers/exterm.cpp +++ b/src/mame/drivers/exterm.cpp @@ -69,6 +69,7 @@ #include "machine/nvram.h" #include "machine/watchdog.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "sound/ym2151.h" #include "screen.h" @@ -438,7 +439,8 @@ static MACHINE_CONFIG_START( exterm ) MCFG_SOUND_ADD("dac", AD7528, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4) // ad7528j.e2 MCFG_SOUND_ADD("dacvol", AD7528, 0) // ad7528j.e2 MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dacvol", 1.0, DAC_VREF_POS_INPUT) MCFG_YM2151_ADD("ymsnd", 4000000) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) diff --git a/src/mame/drivers/fantland.cpp b/src/mame/drivers/fantland.cpp index 226d8f8f4b9..0bdeb8a64d1 100644 --- a/src/mame/drivers/fantland.cpp +++ b/src/mame/drivers/fantland.cpp @@ -53,6 +53,7 @@ Year + Game Main CPU Sound CPU Sound Video #include "cpu/z80/z80.h" #include "sound/3526intf.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "sound/ym2151.h" #include "speaker.h" @@ -879,7 +880,8 @@ static MACHINE_CONFIG_START( fantland ) MCFG_SOUND_ROUTE(1, "speaker", 0.35) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/fidel6502.cpp b/src/mame/drivers/fidel6502.cpp index bd8665a06f0..220ed625ad6 100644 --- a/src/mame/drivers/fidel6502.cpp +++ b/src/mame/drivers/fidel6502.cpp @@ -441,6 +441,7 @@ I/O is via TTL, very similar to Designer Display #include "machine/6821pia.h" #include "machine/i8255.h" #include "machine/nvram.h" +#include "sound/volt_reg.h" #include "speaker.h" // internal artwork @@ -1573,7 +1574,8 @@ static MACHINE_CONFIG_START( rsc ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_START( csc ) @@ -1608,7 +1610,8 @@ static MACHINE_CONFIG_START( csc ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.75) MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( su9, csc ) @@ -1645,7 +1648,8 @@ static MACHINE_CONFIG_START( eas ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.75) MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) /* cartridge */ MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "fidel_scc") @@ -1679,7 +1683,8 @@ static MACHINE_CONFIG_START( sc9d ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) /* cartridge */ MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "fidel_scc") @@ -1733,7 +1738,8 @@ static MACHINE_CONFIG_START( sc12 ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) /* cartridge */ MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "fidel_scc") @@ -1774,7 +1780,8 @@ static MACHINE_CONFIG_START( fexcel ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( fexcel4, fexcel ) @@ -1857,7 +1864,8 @@ static MACHINE_CONFIG_START( fdes2100d ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( fdes2000d, fdes2100d ) @@ -1882,7 +1890,8 @@ static MACHINE_CONFIG_START( fphantom ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_START( chesster ) @@ -1901,7 +1910,8 @@ static MACHINE_CONFIG_START( chesster ) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac8", DAC_8BIT_R2R, 0) // m74hc374b1.ic1 + 8l513_02.z2 MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac8", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac8", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( kishon, chesster ) diff --git a/src/mame/drivers/fidel68k.cpp b/src/mame/drivers/fidel68k.cpp index 2a5c8cea0c0..a985aaa9f03 100644 --- a/src/mame/drivers/fidel68k.cpp +++ b/src/mame/drivers/fidel68k.cpp @@ -182,6 +182,7 @@ B0000x-xxxxxx: see V7, -800000 #include "cpu/m68000/m68000.h" #include "machine/ram.h" #include "machine/nvram.h" +#include "sound/volt_reg.h" #include "speaker.h" // internal artwork @@ -543,7 +544,8 @@ static MACHINE_CONFIG_START( fex68k ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( fex68km2, fex68k ) @@ -576,7 +578,8 @@ static MACHINE_CONFIG_START( fdes2265 ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( fdes2325, fdes2265 ) @@ -609,7 +612,8 @@ static MACHINE_CONFIG_START( eag ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) /* cartridge */ MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "fidel_scc") diff --git a/src/mame/drivers/fidelmcs48.cpp b/src/mame/drivers/fidelmcs48.cpp index 2810ced3878..67d67158180 100644 --- a/src/mame/drivers/fidelmcs48.cpp +++ b/src/mame/drivers/fidelmcs48.cpp @@ -27,6 +27,7 @@ Sensory Chess Challenger 6 (model SC6): #include "includes/fidelbase.h" #include "cpu/mcs48/mcs48.h" +#include "sound/volt_reg.h" #include "speaker.h" // internal artwork @@ -160,7 +161,8 @@ static MACHINE_CONFIG_START( sc6 ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/fidelz80.cpp b/src/mame/drivers/fidelz80.cpp index 95de200291f..b85022c7c0f 100644 --- a/src/mame/drivers/fidelz80.cpp +++ b/src/mame/drivers/fidelz80.cpp @@ -497,6 +497,7 @@ expect that the software reads these once on startup only. #include "machine/i8243.h" #include "machine/z80pio.h" #include "sound/beep.h" +#include "sound/volt_reg.h" #include "speaker.h" // internal artwork @@ -1643,7 +1644,8 @@ static MACHINE_CONFIG_START( bcc ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_START( scc ) @@ -1659,7 +1661,8 @@ static MACHINE_CONFIG_START( scc ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_START( cc10 ) @@ -1787,7 +1790,8 @@ static MACHINE_CONFIG_START( dsc ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/finalizr.cpp b/src/mame/drivers/finalizr.cpp index dd3b1288fb4..1475eb8c3d8 100644 --- a/src/mame/drivers/finalizr.cpp +++ b/src/mame/drivers/finalizr.cpp @@ -23,6 +23,7 @@ #include "machine/watchdog.h" #include "sound/dac.h" #include "sound/sn76496.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -299,7 +300,8 @@ static MACHINE_CONFIG_START( finalizr ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.75) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.325) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/flstory.cpp b/src/mame/drivers/flstory.cpp index bac0e5948fd..f0552f7569e 100644 --- a/src/mame/drivers/flstory.cpp +++ b/src/mame/drivers/flstory.cpp @@ -17,6 +17,7 @@ #include "cpu/m6805/m6805.h" #include "cpu/z80/z80.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -792,7 +793,8 @@ static MACHINE_CONFIG_START( flstory ) // pin 22 Noise Output not mapped MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_START( onna34ro ) @@ -860,7 +862,8 @@ static MACHINE_CONFIG_START( onna34ro ) // pin 22 Noise Output not mapped MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( onna34ro_mcu, onna34ro ) @@ -938,7 +941,8 @@ static MACHINE_CONFIG_START( victnine ) // pin 22 Noise Output not mapped MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END @@ -1010,7 +1014,8 @@ static MACHINE_CONFIG_START( rumba ) // pin 22 Noise Output not mapped MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END /*************************************************************************** diff --git a/src/mame/drivers/galaxian.cpp b/src/mame/drivers/galaxian.cpp index a1d6e5800b7..2a1972a75fc 100644 --- a/src/mame/drivers/galaxian.cpp +++ b/src/mame/drivers/galaxian.cpp @@ -664,6 +664,7 @@ TODO: #include "machine/watchdog.h" #include "sound/discrete.h" #include "sound/sn76496.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -5985,7 +5986,8 @@ static MACHINE_CONFIG_DERIVED( kingball, mooncrst ) /* sound hardware */ MCFG_SOUND_ADD("dac", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.53) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END @@ -6168,7 +6170,8 @@ static MACHINE_CONFIG_DERIVED( sfx, scramble_base ) /* DAC for the sample player */ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) // 16-pin IC (not identified by schematics) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/galeb.cpp b/src/mame/drivers/galeb.cpp index bf5007a4c5f..4c5d2350640 100644 --- a/src/mame/drivers/galeb.cpp +++ b/src/mame/drivers/galeb.cpp @@ -17,6 +17,7 @@ #include "includes/galeb.h" #include "cpu/m6502/m6502.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -184,7 +185,8 @@ static MACHINE_CONFIG_START( galeb ) /* audio hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.0625) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MACHINE_CONFIG_END /* ROM definition */ diff --git a/src/mame/drivers/galivan.cpp b/src/mame/drivers/galivan.cpp index a8ff2242698..0a9ce0d9447 100644 --- a/src/mame/drivers/galivan.cpp +++ b/src/mame/drivers/galivan.cpp @@ -39,6 +39,7 @@ TODO #include "cpu/z80/z80.h" #include "sound/3526intf.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -461,9 +462,10 @@ static MACHINE_CONFIG_START( galivan ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) MCFG_SOUND_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac2", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_START( ninjemak ) @@ -512,9 +514,10 @@ static MACHINE_CONFIG_START( ninjemak ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) MCFG_SOUND_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac2", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/gamecom.cpp b/src/mame/drivers/gamecom.cpp index 87470a629a7..5a3763bfbca 100644 --- a/src/mame/drivers/gamecom.cpp +++ b/src/mame/drivers/gamecom.cpp @@ -26,6 +26,7 @@ Game Status: #include "emu.h" #include "includes/gamecom.h" +#include "sound/volt_reg.h" #include "screen.h" #include "softlist.h" #include "speaker.h" @@ -275,11 +276,12 @@ static MACHINE_CONFIG_START( gamecom ) MCFG_SPEAKER_STANDARD_MONO( "speaker" ) /* TODO: much more complex than this */ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC (Digital audio) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac0", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.05) // unknown DAC (Frequency modulation) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac1", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.05) // unknown DAC (Frequency modulation) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac0", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac0", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT) /* cartridge */ MCFG_GENERIC_CARTSLOT_ADD("cartslot1", generic_linear_slot, "gamecom_cart") diff --git a/src/mame/drivers/gba.cpp b/src/mame/drivers/gba.cpp index 7a7faef031c..c257febd8e0 100644 --- a/src/mame/drivers/gba.cpp +++ b/src/mame/drivers/gba.cpp @@ -17,6 +17,7 @@ #include "cpu/arm7/arm7.h" #include "cpu/arm7/arm7core.h" #include "sound/gb.h" +#include "sound/volt_reg.h" #include "softlist.h" #include "speaker.h" @@ -1445,13 +1446,14 @@ static MACHINE_CONFIG_START( gbadv ) MCFG_SOUND_ROUTE(1, "rspeaker", 0.5) MCFG_SOUND_ADD("ldaca", DAC_8BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("rdaca", DAC_8BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("ldacb", DAC_8BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("rdacb", DAC_8BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "ldaca", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldaca", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "rdaca", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdaca", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "ldacb", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldacb", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "rdacb", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdacb", -1.0, DAC_VREF_NEG_INPUT) MCFG_GBA_CARTRIDGE_ADD("cartslot", gba_cart, nullptr) MCFG_SOFTWARE_LIST_ADD("cart_list","gba") diff --git a/src/mame/drivers/gei.cpp b/src/mame/drivers/gei.cpp index 5293c35e0ec..504967604c4 100644 --- a/src/mame/drivers/gei.cpp +++ b/src/mame/drivers/gei.cpp @@ -77,6 +77,7 @@ NOTE: Trivia Question rom names are the internal names used. IE: read from the f #include "machine/nvram.h" #include "machine/ticket.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -974,7 +975,8 @@ static MACHINE_CONFIG_START( getrivia ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.99) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( findout, getrivia ) diff --git a/src/mame/drivers/go2000.cpp b/src/mame/drivers/go2000.cpp index 91fce78fa09..2241cd56978 100644 --- a/src/mame/drivers/go2000.cpp +++ b/src/mame/drivers/go2000.cpp @@ -36,6 +36,7 @@ Notes: #include "cpu/z80/z80.h" #include "machine/gen_latch.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -361,7 +362,8 @@ static MACHINE_CONFIG_START( go2000 ) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END ROM_START( go2000 ) diff --git a/src/mame/drivers/gp32.cpp b/src/mame/drivers/gp32.cpp index b6c91389b5e..81f0269608b 100644 --- a/src/mame/drivers/gp32.cpp +++ b/src/mame/drivers/gp32.cpp @@ -21,6 +21,7 @@ #include "cpu/arm7/arm7.h" #include "cpu/arm7/arm7core.h" +#include "sound/volt_reg.h" #include "rendlay.h" #include "screen.h" @@ -1694,9 +1695,10 @@ static MACHINE_CONFIG_START( gp32 ) MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") MCFG_SOUND_ADD("ldac", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("rdac", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT) MCFG_NVRAM_ADD_1FILL("nvram") diff --git a/src/mame/drivers/hankin.cpp b/src/mame/drivers/hankin.cpp index 833e0300067..26eb97e7049 100644 --- a/src/mame/drivers/hankin.cpp +++ b/src/mame/drivers/hankin.cpp @@ -22,6 +22,7 @@ ToDo: #include "machine/6821pia.h" #include "machine/timer.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "speaker.h" #include "hankin.lh" @@ -508,7 +509,8 @@ static MACHINE_CONFIG_START( hankin ) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) /* Devices */ MCFG_DEVICE_ADD("ic10", PIA6821, 0) diff --git a/src/mame/drivers/harddriv.cpp b/src/mame/drivers/harddriv.cpp index 8fb7b03e7f1..f0f615c04a4 100644 --- a/src/mame/drivers/harddriv.cpp +++ b/src/mame/drivers/harddriv.cpp @@ -330,6 +330,7 @@ Notes: #include "includes/slapstic.h" #include "machine/timer.h" #include "machine/watchdog.h" +#include "sound/volt_reg.h" #include "speaker.h" #include "racedrivpan.lh" @@ -1581,9 +1582,10 @@ static MACHINE_CONFIG_START( ds3 ) MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") MCFG_SOUND_ADD("ldac", DAC_16BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("rdac", DAC_16BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/hh_cop400.cpp b/src/mame/drivers/hh_cop400.cpp index 0bc39180f4a..c350cef5f82 100644 --- a/src/mame/drivers/hh_cop400.cpp +++ b/src/mame/drivers/hh_cop400.cpp @@ -17,6 +17,7 @@ #include "machine/timer.h" #include "sound/spkrdev.h" #include "sound/dac.h" +#include "sound/volt_reg.h" //#include "rendlay.h" #include "screen.h" #include "speaker.h" @@ -1571,7 +1572,8 @@ static MACHINE_CONFIG_START( bship82 ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("dac", DAC_4BIT_BINARY_WEIGHTED_SIGN_MAGNITUDE, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.125) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/homedata.cpp b/src/mame/drivers/homedata.cpp index 84945c32d1c..c0c20ee7b90 100644 --- a/src/mame/drivers/homedata.cpp +++ b/src/mame/drivers/homedata.cpp @@ -240,6 +240,7 @@ Custom: GX61A01 #include "cpu/upd7810/upd7810.h" #include "cpu/z80/z80.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -1250,7 +1251,8 @@ static MACHINE_CONFIG_START( mrokumei ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END @@ -1305,7 +1307,8 @@ static MACHINE_CONFIG_START( reikaids ) MCFG_SOUND_ROUTE(3, "speaker", 1.0) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END @@ -1357,7 +1360,8 @@ static MACHINE_CONFIG_START( pteacher ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( mjkinjas, pteacher ) diff --git a/src/mame/drivers/homelab.cpp b/src/mame/drivers/homelab.cpp index c6ca8828124..dfbd2eebb63 100644 --- a/src/mame/drivers/homelab.cpp +++ b/src/mame/drivers/homelab.cpp @@ -38,6 +38,7 @@ MB7051 - fuse programmed prom. #include "imagedev/snapquik.h" #include "sound/dac.h" #include "sound/mea8000.h" +#include "sound/volt_reg.h" #include "sound/wave.h" #include "screen.h" #include "speaker.h" @@ -753,7 +754,8 @@ static MACHINE_CONFIG_START( homelab ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) @@ -785,7 +787,8 @@ static MACHINE_CONFIG_START( homelab3 ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) @@ -817,7 +820,8 @@ static MACHINE_CONFIG_START( brailab4 ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) diff --git a/src/mame/drivers/hp48.cpp b/src/mame/drivers/hp48.cpp index 505a6dd03df..d703b139449 100644 --- a/src/mame/drivers/hp48.cpp +++ b/src/mame/drivers/hp48.cpp @@ -13,6 +13,7 @@ #include "cpu/saturn/saturn.h" #include "machine/nvram.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -1284,7 +1285,8 @@ static MACHINE_CONFIG_START( hp48_common ) /* sound */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( hp48gx, hp48_common ) diff --git a/src/mame/drivers/hp80.cpp b/src/mame/drivers/hp80.cpp index 8e96a55109f..803c2dfca78 100644 --- a/src/mame/drivers/hp80.cpp +++ b/src/mame/drivers/hp80.cpp @@ -14,6 +14,7 @@ #include "machine/timer.h" #include "sound/beep.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "machine/1ma6.h" #include "bus/hp80_optroms/hp80_optrom.h" #include "softlist.h" @@ -1353,7 +1354,9 @@ static MACHINE_CONFIG_START(hp85) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("dac" , DAC_1BIT , 0) MCFG_MIXER_ROUTE(ALL_OUTPUTS , "mono" , 0.5 , 0) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) + MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ADD("beeper" , BEEP , MASTER_CLOCK / 8192) MCFG_MIXER_ROUTE(ALL_OUTPUTS , "mono" , 0.5 , 0) diff --git a/src/mame/drivers/hyhoo.cpp b/src/mame/drivers/hyhoo.cpp index a9e002d45e9..e753ba0a1f6 100644 --- a/src/mame/drivers/hyhoo.cpp +++ b/src/mame/drivers/hyhoo.cpp @@ -30,6 +30,7 @@ Memo: #include "machine/nvram.h" #include "sound/ay8910.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "speaker.h" @@ -254,7 +255,8 @@ static MACHINE_CONFIG_START( hyhoo ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.35) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/hyperspt.cpp b/src/mame/drivers/hyperspt.cpp index c6192743be0..b003e0794ef 100644 --- a/src/mame/drivers/hyperspt.cpp +++ b/src/mame/drivers/hyperspt.cpp @@ -23,6 +23,7 @@ Based on drivers from Juno First emulator by Chris Hardy (chrish@kcbbs.gen.nz) #include "machine/nvram.h" #include "machine/watchdog.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -332,7 +333,8 @@ static MACHINE_CONFIG_START( hyperspt ) MCFG_SOUND_ADD("trackfld_audio", TRACKFLD_AUDIO, 0) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MCFG_SOUND_ADD("snsnd", SN76496, XTAL_14_31818MHz/8) /* verified on pcb */ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) diff --git a/src/mame/drivers/indy_indigo2.cpp b/src/mame/drivers/indy_indigo2.cpp index a295e947f98..dcbc5affa77 100644 --- a/src/mame/drivers/indy_indigo2.cpp +++ b/src/mame/drivers/indy_indigo2.cpp @@ -56,6 +56,7 @@ #include "machine/z80scc.h" #include "sound/cdda.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "video/newport.h" #include "screen.h" #include "speaker.h" @@ -1499,7 +1500,8 @@ static MACHINE_CONFIG_START( ip225015 ) MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") MCFG_SOUND_ADD("dac", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.25) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MCFG_DEVICE_ADD("scsi", SCSI_PORT, 0) MCFG_SCSIDEV_ADD("scsi:" SCSI_PORT_DEVICE1, "harddisk", SCSIHD, SCSI_ID_1) diff --git a/src/mame/drivers/instantm.cpp b/src/mame/drivers/instantm.cpp index ff0d36a16ba..b08d85685ee 100644 --- a/src/mame/drivers/instantm.cpp +++ b/src/mame/drivers/instantm.cpp @@ -28,6 +28,7 @@ At the moment it simply outputs all the speech strings, one after the other, the #include "cpu/z80/z80.h" #include "machine/clock.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "speaker.h" class instantm_state : public driver_device @@ -131,7 +132,8 @@ static MACHINE_CONFIG_START( instantm ) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", MC1408, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/jaguar.cpp b/src/mame/drivers/jaguar.cpp index 82f3db84092..e62cb6783aa 100644 --- a/src/mame/drivers/jaguar.cpp +++ b/src/mame/drivers/jaguar.cpp @@ -347,6 +347,7 @@ Notes: #include "machine/watchdog.h" #include "machine/vt83c461.h" #include "sound/cdda.h" +#include "sound/volt_reg.h" #include "cdrom.h" #include "softlist.h" #include "speaker.h" @@ -1831,9 +1832,10 @@ static MACHINE_CONFIG_START( cojagr3k ) /* sound hardware */ MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") MCFG_SOUND_ADD("ldac", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("rdac", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( cojagr3k_rom, cojagr3k ) @@ -1875,9 +1877,10 @@ static MACHINE_CONFIG_START( jaguar ) /* sound hardware */ MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") MCFG_SOUND_ADD("ldac", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("rdac", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT) /* quickload */ MCFG_QUICKLOAD_ADD("quickload", jaguar_state, jaguar, "abs,bin,cof,jag,prg", 2) diff --git a/src/mame/drivers/jankenmn.cpp b/src/mame/drivers/jankenmn.cpp index c4431b39be4..df5fd004b31 100644 --- a/src/mame/drivers/jankenmn.cpp +++ b/src/mame/drivers/jankenmn.cpp @@ -151,6 +151,7 @@ #include "machine/z80ctc.h" #include "machine/i8255.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "speaker.h" #include "jankenmn.lh" @@ -389,7 +390,8 @@ static MACHINE_CONFIG_START( jankenmn ) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", AD7523, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/juicebox.cpp b/src/mame/drivers/juicebox.cpp index df4ec08c90a..0ad95457959 100644 --- a/src/mame/drivers/juicebox.cpp +++ b/src/mame/drivers/juicebox.cpp @@ -13,6 +13,7 @@ #include "machine/s3c44b0.h" #include "machine/smartmed.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "rendlay.h" #include "screen.h" #include "softlist.h" @@ -317,7 +318,8 @@ static MACHINE_CONFIG_START( juicebox ) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MCFG_DEVICE_ADD("s3c44b0", S3C44B0, 10000000) MCFG_S3C44B0_GPIO_PORT_R_CB(READ32(juicebox_state, s3c44b0_gpio_port_r)) diff --git a/src/mame/drivers/junofrst.cpp b/src/mame/drivers/junofrst.cpp index 17ca01f3abe..2b7d3878f1f 100644 --- a/src/mame/drivers/junofrst.cpp +++ b/src/mame/drivers/junofrst.cpp @@ -93,6 +93,7 @@ Blitter source graphics #include "sound/ay8910.h" #include "sound/dac.h" #include "sound/flt_rc.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -437,7 +438,8 @@ static MACHINE_CONFIG_START( junofrst ) MCFG_SOUND_ROUTE(2, "filter.0.2", 0.30) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // 100K (R56-63)/200K (R64-71) ladder network - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MCFG_FILTER_RC_ADD("filter.0.0", 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) diff --git a/src/mame/drivers/kchamp.cpp b/src/mame/drivers/kchamp.cpp index 1801801a5ea..2e1592ca2a7 100644 --- a/src/mame/drivers/kchamp.cpp +++ b/src/mame/drivers/kchamp.cpp @@ -69,6 +69,7 @@ IO ports and memory map changes. Dip switches differ too. #include "cpu/z80/z80.h" #include "machine/74259.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -501,7 +502,8 @@ static MACHINE_CONFIG_START( kchamp ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.3) MCFG_SOUND_ADD("dac", DAC08, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.3) // IC11 - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/kingobox.cpp b/src/mame/drivers/kingobox.cpp index e874a50c2db..f6f117c04c9 100644 --- a/src/mame/drivers/kingobox.cpp +++ b/src/mame/drivers/kingobox.cpp @@ -24,6 +24,7 @@ Main CPU: #include "machine/clock.h" #include "sound/ay8910.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -505,7 +506,8 @@ static MACHINE_CONFIG_START( kingofb ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.125) // 100K (R30-44 even)/200K (R31-45 odd) ladder network - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END @@ -563,7 +565,8 @@ static MACHINE_CONFIG_START( ringking ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.125) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/ksayakyu.cpp b/src/mame/drivers/ksayakyu.cpp index 5637bfc12ac..af92a7c8cd2 100644 --- a/src/mame/drivers/ksayakyu.cpp +++ b/src/mame/drivers/ksayakyu.cpp @@ -70,6 +70,7 @@ SRAM: #include "cpu/z80/z80.h" #include "sound/ay8910.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -298,7 +299,8 @@ static MACHINE_CONFIG_START( ksayakyu ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) MCFG_SOUND_ADD("dac", DAC_6BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END ROM_START( ksayakyu ) diff --git a/src/mame/drivers/ladyfrog.cpp b/src/mame/drivers/ladyfrog.cpp index c762939ceee..b79d16c0c6a 100644 --- a/src/mame/drivers/ladyfrog.cpp +++ b/src/mame/drivers/ladyfrog.cpp @@ -57,6 +57,7 @@ Notes: #include "cpu/z80/z80.h" #include "sound/ay8910.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -338,7 +339,8 @@ static MACHINE_CONFIG_START( ladyfrog ) // pin 22 Noise Output not mapped MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( toucheme, ladyfrog ) diff --git a/src/mame/drivers/laserbas.cpp b/src/mame/drivers/laserbas.cpp index db83e5411cd..d7ff870878b 100644 --- a/src/mame/drivers/laserbas.cpp +++ b/src/mame/drivers/laserbas.cpp @@ -64,6 +64,7 @@ expected: 43 FB CC 9A D4 23 6C 01 3E <- From ROM 4 #include "machine/pit8253.h" #include "machine/timer.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "video/mc6845.h" #include "screen.h" #include "speaker.h" @@ -443,17 +444,18 @@ static MACHINE_CONFIG_START( laserbas ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac1", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.16) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac2", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.16) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac3", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.16) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac4", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.16) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac5", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.16) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac6", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.16) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac3", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac3", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac4", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac4", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac5", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac5", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac6", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac6", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/lasso.cpp b/src/mame/drivers/lasso.cpp index 37e2356046b..2cf4d92ba2a 100644 --- a/src/mame/drivers/lasso.cpp +++ b/src/mame/drivers/lasso.cpp @@ -37,6 +37,7 @@ DIP locations verified for: #include "cpu/z80/z80.h" #include "sound/ay8910.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -567,7 +568,8 @@ static MACHINE_CONFIG_DERIVED( wwjgtin, base ) /* sound hardware */ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( pinbo, base ) diff --git a/src/mame/drivers/lazercmd.cpp b/src/mame/drivers/lazercmd.cpp index 0a267bb7587..8dd2c9f33f5 100644 --- a/src/mame/drivers/lazercmd.cpp +++ b/src/mame/drivers/lazercmd.cpp @@ -235,6 +235,7 @@ #include "emu.h" #include "includes/lazercmd.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -649,13 +650,14 @@ static MACHINE_CONFIG_START( lazercmd ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac0", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.99) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_ADD("dac1", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.99) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_ADD("dac2", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.99) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_ADD("dac3", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.99) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac0", 1.0, DAC_VREF_POS_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac3", 1.0, DAC_VREF_POS_INPUT) MACHINE_CONFIG_END @@ -687,9 +689,10 @@ static MACHINE_CONFIG_START( medlanes ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac2", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.99) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_ADD("dac3", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.99) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac3", 1.0, DAC_VREF_POS_INPUT) MACHINE_CONFIG_END @@ -721,9 +724,10 @@ static MACHINE_CONFIG_START( bbonk ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac2", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.99) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_ADD("dac3", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.99) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac3", 1.0, DAC_VREF_POS_INPUT) MACHINE_CONFIG_END /*************************************************************************** diff --git a/src/mame/drivers/leland.cpp b/src/mame/drivers/leland.cpp index d15ccec1feb..8bce9f67177 100644 --- a/src/mame/drivers/leland.cpp +++ b/src/mame/drivers/leland.cpp @@ -64,6 +64,7 @@ #include "cpu/z80/z80.h" #include "machine/nvram.h" +#include "sound/volt_reg.h" #include "speaker.h" @@ -978,9 +979,10 @@ static MACHINE_CONFIG_START( leland ) // MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) MCFG_SOUND_ADD("dac0", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.0625) // ls374.u79 + r17-r23 (24k,12k,6.2k,3k,1.5k,750,390,180) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac1", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.0625) // ls374.u88 + r27-r34 (24k,12k,6.2k,3k,1.5k,750,390,180) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac0", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac0", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/littlerb.cpp b/src/mame/drivers/littlerb.cpp index fb8a2dd0a08..e980c345763 100644 --- a/src/mame/drivers/littlerb.cpp +++ b/src/mame/drivers/littlerb.cpp @@ -68,6 +68,7 @@ Dip sw.2 #include "machine/inder_vid.h" #include "machine/timer.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "speaker.h" #define littlerb_printf logerror @@ -262,9 +263,10 @@ static MACHINE_CONFIG_START( littlerb ) MCFG_SPEAKER_STANDARD_STEREO("lspeaker","rspeaker") MCFG_SOUND_ADD("ldac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("rdac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END ROM_START( littlerb ) diff --git a/src/mame/drivers/looping.cpp b/src/mame/drivers/looping.cpp index a18a5b5bf07..f886e1915c0 100644 --- a/src/mame/drivers/looping.cpp +++ b/src/mame/drivers/looping.cpp @@ -64,6 +64,7 @@ L056-6 9A " " VLI-8-4 7A " #include "sound/ay8910.h" #include "sound/dac.h" #include "sound/tms5220.h" +#include "sound/volt_reg.h" #include "video/resnet.h" #include "screen.h" #include "speaker.h" @@ -668,7 +669,8 @@ static MACHINE_CONFIG_START( looping ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) MCFG_SOUND_ADD("dac", DAC_2BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.15) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MCFG_DEVICE_ADD("sen0", LS259, 0) // B3 on sound board MCFG_ADDRESSABLE_LATCH_Q0_OUT_CB(WRITELINE(looping_state, looping_souint_clr)) diff --git a/src/mame/drivers/luckybal.cpp b/src/mame/drivers/luckybal.cpp index 39d8ff18394..e5f10b33f55 100644 --- a/src/mame/drivers/luckybal.cpp +++ b/src/mame/drivers/luckybal.cpp @@ -242,6 +242,7 @@ #include "machine/i8255.h" #include "video/v9938.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -493,7 +494,8 @@ static MACHINE_CONFIG_START( luckybal ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC08, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // DAC 08 - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/m72.cpp b/src/mame/drivers/m72.cpp index 5a343eb1acd..72fcdbc90a2 100644 --- a/src/mame/drivers/m72.cpp +++ b/src/mame/drivers/m72.cpp @@ -194,6 +194,7 @@ other supported games as well. #include "cpu/z80/z80.h" #include "machine/irem_cpu.h" #include "sound/ym2151.h" +#include "sound/volt_reg.h" #include "speaker.h" @@ -1851,7 +1852,8 @@ static MACHINE_CONFIG_START( m72_audio_chips ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_START( m72_base ) diff --git a/src/mame/drivers/m90.cpp b/src/mame/drivers/m90.cpp index 6b41d08f814..2ed7cb6e896 100644 --- a/src/mame/drivers/m90.cpp +++ b/src/mame/drivers/m90.cpp @@ -28,6 +28,7 @@ #include "machine/irem_cpu.h" #include "sound/dac.h" #include "sound/ym2151.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -753,7 +754,8 @@ static MACHINE_CONFIG_START( m90 ) MCFG_SOUND_ROUTE(1, "speaker", 0.15) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/mac.cpp b/src/mame/drivers/mac.cpp index 17dd0fcdeab..55acf706bfc 100644 --- a/src/mame/drivers/mac.cpp +++ b/src/mame/drivers/mac.cpp @@ -57,6 +57,7 @@ #include "bus/scsi/scsi.h" #include "bus/scsi/scsihd.h" #include "bus/scsi/scsicd.h" +#include "sound/volt_reg.h" // NuBus and 030/040 PDS cards #include "bus/nubus/nubus_48gc.h" @@ -933,7 +934,8 @@ static MACHINE_CONFIG_START( mac512ke ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_8BIT_PWM, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // 2 x ls161 - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) /* devices */ MCFG_RTC3430042_ADD("rtc", XTAL_32_768kHz) diff --git a/src/mame/drivers/mac128.cpp b/src/mame/drivers/mac128.cpp index 9e3a5e886e7..92de438fa46 100644 --- a/src/mame/drivers/mac128.cpp +++ b/src/mame/drivers/mac128.cpp @@ -92,6 +92,7 @@ c0 8 data bits, Rx disabled #include "machine/ram.h" #include "machine/timer.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "formats/ap_dsk35.h" #include "bus/scsi/scsi.h" #include "bus/scsi/scsihd.h" @@ -1341,7 +1342,8 @@ static MACHINE_CONFIG_START( mac512ke ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD(DAC_TAG, DAC_8BIT_PWM, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // 2 x ls161 - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, DAC_TAG, 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, DAC_TAG, -1.0, DAC_VREF_NEG_INPUT) /* devices */ MCFG_RTC3430042_ADD("rtc", XTAL_32_768kHz) diff --git a/src/mame/drivers/magicfly.cpp b/src/mame/drivers/magicfly.cpp index d16f8266467..fec2be3368a 100644 --- a/src/mame/drivers/magicfly.cpp +++ b/src/mame/drivers/magicfly.cpp @@ -444,6 +444,7 @@ #include "cpu/m6502/m6502.h" #include "machine/nvram.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "video/mc6845.h" #include "screen.h" #include "speaker.h" @@ -960,7 +961,8 @@ static MACHINE_CONFIG_START( magicfly ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/mappy.cpp b/src/mame/drivers/mappy.cpp index b94720c60e5..733266fe340 100644 --- a/src/mame/drivers/mappy.cpp +++ b/src/mame/drivers/mappy.cpp @@ -555,6 +555,7 @@ TODO: #include "machine/74157.h" #include "machine/74259.h" #include "machine/watchdog.h" +#include "sound/volt_reg.h" #include "speaker.h" @@ -1418,8 +1419,8 @@ static MACHINE_CONFIG_START( grobda ) /* sound hardware */ MCFG_SOUND_ADD("dac", DAC_4BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.275) // alternate route to 15XX-related DAC? - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/matmania.cpp b/src/mame/drivers/matmania.cpp index 7aeb9103371..534eb6fa618 100644 --- a/src/mame/drivers/matmania.cpp +++ b/src/mame/drivers/matmania.cpp @@ -39,6 +39,7 @@ The driver has been updated accordingly. #include "sound/3526intf.h" #include "sound/ay8910.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "speaker.h" @@ -332,7 +333,8 @@ static MACHINE_CONFIG_START( matmania ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.3) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END @@ -373,7 +375,8 @@ static MACHINE_CONFIG_START( maniach ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/mc10.cpp b/src/mame/drivers/mc10.cpp index 313e2eca108..f809b883967 100644 --- a/src/mame/drivers/mc10.cpp +++ b/src/mame/drivers/mc10.cpp @@ -15,6 +15,7 @@ #include "machine/ram.h" #include "machine/timer.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "video/ef9345.h" #include "video/mc6847.h" @@ -512,7 +513,8 @@ MACHINE_CONFIG_START( mc10 ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.0625) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_CASSETTE_ADD("cassette") MCFG_CASSETTE_FORMATS(coco_cassette_formats) @@ -553,7 +555,8 @@ MACHINE_CONFIG_START( alice32 ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.0625) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_CASSETTE_ADD("cassette") MCFG_CASSETTE_FORMATS(alice32_cassette_formats) diff --git a/src/mame/drivers/meadows.cpp b/src/mame/drivers/meadows.cpp index 7bc27db1f4a..39242ae9745 100644 --- a/src/mame/drivers/meadows.cpp +++ b/src/mame/drivers/meadows.cpp @@ -121,6 +121,7 @@ #include "emu.h" #include "includes/meadows.h" +#include "sound/volt_reg.h" #include "speaker.h" #include "deadeye.lh" @@ -636,7 +637,8 @@ static MACHINE_CONFIG_START( meadows ) /* audio hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MCFG_SOUND_ADD("samples", SAMPLES, 0) MCFG_SAMPLES_CHANNELS(2) @@ -696,7 +698,8 @@ static MACHINE_CONFIG_START( bowl3d ) /* audio hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MCFG_SOUND_ADD("samples", SAMPLES, 0) MCFG_SAMPLES_CHANNELS(2) diff --git a/src/mame/drivers/megazone.cpp b/src/mame/drivers/megazone.cpp index 9644b375cbb..8d08cc9a52d 100644 --- a/src/mame/drivers/megazone.cpp +++ b/src/mame/drivers/megazone.cpp @@ -73,6 +73,7 @@ REAR BOARD 1C026 N/U (CUSTOM ON ORIGINAL) #include "sound/ay8910.h" #include "sound/dac.h" #include "sound/flt_rc.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -343,7 +344,8 @@ static MACHINE_CONFIG_START( megazone ) MCFG_SOUND_ROUTE(2, "filter.0.2", 0.30) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MCFG_FILTER_RC_ADD("filter.0.0", 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) diff --git a/src/mame/drivers/mephistp.cpp b/src/mame/drivers/mephistp.cpp index c79cce4efcc..f6983074be4 100644 --- a/src/mame/drivers/mephistp.cpp +++ b/src/mame/drivers/mephistp.cpp @@ -18,6 +18,7 @@ #include "machine/nvram.h" #include "sound/ay8910.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "sound/3812intf.h" #include "speaker.h" @@ -184,7 +185,8 @@ static MACHINE_CONFIG_START( mephisto ) MCFG_SOUND_ADD("dac", DAC08, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END #ifdef UNUSED_DEFINITION diff --git a/src/mame/drivers/meyc8080.cpp b/src/mame/drivers/meyc8080.cpp index ce383ead94e..cd76389a247 100644 --- a/src/mame/drivers/meyc8080.cpp +++ b/src/mame/drivers/meyc8080.cpp @@ -59,6 +59,7 @@ #include "cpu/i8085/i8085.h" #include "machine/nvram.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -597,7 +598,8 @@ static MACHINE_CONFIG_START( meyc8080 ) /* audio hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_2BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.66) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/meyc8088.cpp b/src/mame/drivers/meyc8088.cpp index c1fdefd5310..af77a96f749 100644 --- a/src/mame/drivers/meyc8088.cpp +++ b/src/mame/drivers/meyc8088.cpp @@ -28,6 +28,7 @@ #include "machine/nvram.h" #include "machine/timer.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "video/resnet.h" #include "screen.h" #include "speaker.h" @@ -381,7 +382,8 @@ static MACHINE_CONFIG_START( meyc8088 ) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/microvsn.cpp b/src/mame/drivers/microvsn.cpp index 4143a0c4360..e2e650aed09 100644 --- a/src/mame/drivers/microvsn.cpp +++ b/src/mame/drivers/microvsn.cpp @@ -21,6 +21,7 @@ of the games were clocked at around 500KHz, 550KHz, or 300KHz. #include "cpu/mcs48/mcs48.h" #include "cpu/tms1000/tms1100.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "rendlay.h" #include "softlist.h" #include "screen.h" @@ -672,7 +673,8 @@ static MACHINE_CONFIG_START( microvision ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_2BIT_BINARY_WEIGHTED_ONES_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "microvision_cart") MCFG_GENERIC_MANDATORY diff --git a/src/mame/drivers/mikro80.cpp b/src/mame/drivers/mikro80.cpp index 4b944313eb2..a529f0eb037 100644 --- a/src/mame/drivers/mikro80.cpp +++ b/src/mame/drivers/mikro80.cpp @@ -13,6 +13,7 @@ #include "cpu/i8085/i8085.h" #include "formats/rk_cas.h" #include "includes/mikro80.h" +#include "sound/volt_reg.h" #include "sound/wave.h" #include "screen.h" #include "softlist.h" @@ -201,7 +202,8 @@ static MACHINE_CONFIG_DERIVED( radio99, mikro80 ) MCFG_CPU_IO_MAP(radio99_io) MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.12) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( kristall, mikro80 ) diff --git a/src/mame/drivers/mini2440.cpp b/src/mame/drivers/mini2440.cpp index 47e3f6b8dfb..1a5689435c6 100644 --- a/src/mame/drivers/mini2440.cpp +++ b/src/mame/drivers/mini2440.cpp @@ -11,6 +11,7 @@ #include "machine/s3c2440.h" #include "machine/smartmed.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "rendlay.h" #include "screen.h" #include "speaker.h" @@ -235,9 +236,10 @@ static MACHINE_CONFIG_START( mini2440 ) MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") MCFG_SOUND_ADD("ldac", UDA1341TS, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0) // uda1341ts.u12 - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("rdac", UDA1341TS, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) // uda1341ts.u12 - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT) MCFG_DEVICE_ADD("s3c2440", S3C2440, 12000000) MCFG_S3C2440_PALETTE("palette") diff --git a/src/mame/drivers/mjsister.cpp b/src/mame/drivers/mjsister.cpp index 9fa7ee43ae2..cbf83c77eec 100644 --- a/src/mame/drivers/mjsister.cpp +++ b/src/mame/drivers/mjsister.cpp @@ -13,6 +13,7 @@ #include "machine/74259.h" #include "sound/ay8910.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -527,7 +528,8 @@ static MACHINE_CONFIG_START( mjsister ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.15) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END /************************************* diff --git a/src/mame/drivers/mk14.cpp b/src/mame/drivers/mk14.cpp index 83ced702925..66b9d32920f 100644 --- a/src/mame/drivers/mk14.cpp +++ b/src/mame/drivers/mk14.cpp @@ -38,6 +38,7 @@ ToDo: #include "imagedev/cassette.h" #include "machine/ins8154.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "sound/wave.h" #include "speaker.h" @@ -202,9 +203,10 @@ static MACHINE_CONFIG_START( mk14 ) MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.05) MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_ADD("dac8", ZN425E, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // Ferranti ZN425E - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac8", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac8", -1.0, DAC_VREF_NEG_INPUT) /* devices */ MCFG_DEVICE_ADD("ic8", INS8154, 0) diff --git a/src/mame/drivers/mogura.cpp b/src/mame/drivers/mogura.cpp index 751c7997c32..6f11bb8e5b9 100644 --- a/src/mame/drivers/mogura.cpp +++ b/src/mame/drivers/mogura.cpp @@ -7,6 +7,7 @@ #include "cpu/z80/z80.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -225,10 +226,11 @@ static MACHINE_CONFIG_START( mogura ) /* sound hardware */ MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") MCFG_SOUND_ADD("ldac", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("rdac", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) -MACHINE_CONFIG_END + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT) + MACHINE_CONFIG_END ROM_START( mogura ) diff --git a/src/mame/drivers/mrgame.cpp b/src/mame/drivers/mrgame.cpp index 59db1a97c98..5cc52fad082 100644 --- a/src/mame/drivers/mrgame.cpp +++ b/src/mame/drivers/mrgame.cpp @@ -39,6 +39,7 @@ ToDo: #include "machine/timer.h" #include "sound/dac.h" #include "sound/tms5220.h" +#include "sound/volt_reg.h" #include "video/resnet.h" #include "screen.h" #include "speaker.h" @@ -495,7 +496,8 @@ static MACHINE_CONFIG_START( mrgame ) MCFG_SOUND_ADD("dacvol", DAC_8BIT_R2R, 0) // unknown DAC MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dacvol", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dacvol", -1.0, DAC_VREF_NEG_INPUT) MCFG_SOUND_ADD("tms", TMS5220, 672000) // uses a RC combination. 672k copied from jedi.h MCFG_TMS52XX_READYQ_HANDLER(INPUTLINE("audiocpu2", Z80_INPUT_LINE_BOGUSWAIT)) diff --git a/src/mame/drivers/msx.cpp b/src/mame/drivers/msx.cpp index fff129f5e22..02705ff7f37 100644 --- a/src/mame/drivers/msx.cpp +++ b/src/mame/drivers/msx.cpp @@ -533,6 +533,7 @@ PCB Layouts missing #include "machine/msx_matsushita.h" #include "machine/msx_s1985.h" #include "machine/msx_systemflags.h" +#include "sound/volt_reg.h" #include "screen.h" #include "softlist.h" #include "speaker.h" @@ -1356,7 +1357,8 @@ static MACHINE_CONFIG_START( msx ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) @@ -1499,7 +1501,8 @@ static MACHINE_CONFIG_START( msx2 ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) @@ -1556,7 +1559,8 @@ static MACHINE_CONFIG_START( msx2p ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) diff --git a/src/mame/drivers/murogem.cpp b/src/mame/drivers/murogem.cpp index 4f22c2aba2f..37adb074bc2 100644 --- a/src/mame/drivers/murogem.cpp +++ b/src/mame/drivers/murogem.cpp @@ -109,6 +109,7 @@ val (hex): 27 20 22 04 26 00 20 20 00 07 00 00 80 00 00 00 ns #include "emu.h" #include "cpu/m6800/m6800.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "video/mc6845.h" #include "screen.h" #include "speaker.h" @@ -270,7 +271,8 @@ static MACHINE_CONFIG_START( murogem ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.375) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/murogmbl.cpp b/src/mame/drivers/murogmbl.cpp index e7f869a66e1..326cdda02b9 100644 --- a/src/mame/drivers/murogmbl.cpp +++ b/src/mame/drivers/murogmbl.cpp @@ -39,6 +39,7 @@ Dumped: 06/04/2009 f205v #include "emu.h" #include "cpu/z80/z80.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -350,7 +351,8 @@ static MACHINE_CONFIG_START( murogmbl ) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_START( slotunbl ) @@ -375,7 +377,8 @@ static MACHINE_CONFIG_START( slotunbl ) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END ROM_START(murogmbl) diff --git a/src/mame/drivers/namcos1.cpp b/src/mame/drivers/namcos1.cpp index 867c1ef84d5..660b8b0afda 100644 --- a/src/mame/drivers/namcos1.cpp +++ b/src/mame/drivers/namcos1.cpp @@ -341,6 +341,7 @@ C - uses sub board with support for player 3 and 4 controls #include "cpu/m6809/m6809.h" #include "cpu/m6800/m6801.h" #include "machine/nvram.h" +#include "sound/volt_reg.h" #include "sound/ym2151.h" #include "screen.h" #include "speaker.h" @@ -1076,9 +1077,10 @@ static MACHINE_CONFIG_START( ns1 ) MCFG_SOUND_ROUTE(1, "rspeaker", 0.50) MCFG_SOUND_ADD("dac0", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5) // 10-pin 1Kx8R SIP with HC374 latch - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5) // 10-pin 1Kx8R SIP with HC374 latch - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac0", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac0", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/nbmj8688.cpp b/src/mame/drivers/nbmj8688.cpp index 8db6deac803..abbf8c01087 100644 --- a/src/mame/drivers/nbmj8688.cpp +++ b/src/mame/drivers/nbmj8688.cpp @@ -38,6 +38,7 @@ TODO: #include "sound/3812intf.h" #include "sound/ay8910.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "rendlay.h" #include "screen.h" #include "speaker.h" @@ -2473,7 +2474,8 @@ static MACHINE_CONFIG_START( NBMJDRV_4096 ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.35) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( NBMJDRV_256, NBMJDRV_4096 ) @@ -2652,7 +2654,8 @@ static MACHINE_CONFIG_START( mbmj_p16bit_LCD ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.35) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( bijokkoy, mbmj_p16bit_LCD ) diff --git a/src/mame/drivers/nbmj8891.cpp b/src/mame/drivers/nbmj8891.cpp index 3ff46c9568b..6b7ddd3bdec 100644 --- a/src/mame/drivers/nbmj8891.cpp +++ b/src/mame/drivers/nbmj8891.cpp @@ -48,6 +48,7 @@ TODO: #include "sound/3812intf.h" #include "sound/ay8910.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "speaker.h" @@ -2205,7 +2206,8 @@ static MACHINE_CONFIG_START( gionbana ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.37) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( mgion, gionbana ) diff --git a/src/mame/drivers/nbmj8900.cpp b/src/mame/drivers/nbmj8900.cpp index 46c6fbedcd4..47604a51cb3 100644 --- a/src/mame/drivers/nbmj8900.cpp +++ b/src/mame/drivers/nbmj8900.cpp @@ -31,6 +31,7 @@ TODO: #include "cpu/z80/z80.h" #include "sound/3812intf.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "speaker.h" @@ -330,7 +331,8 @@ static MACHINE_CONFIG_START( ohpaipee ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.7) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.42) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( togenkyo, ohpaipee ) diff --git a/src/mame/drivers/nbmj8991.cpp b/src/mame/drivers/nbmj8991.cpp index 24128c86382..7126341d3bf 100644 --- a/src/mame/drivers/nbmj8991.cpp +++ b/src/mame/drivers/nbmj8991.cpp @@ -38,6 +38,7 @@ Notes: #include "sound/3812intf.h" #include "sound/ay8910.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "speaker.h" @@ -1340,7 +1341,8 @@ static MACHINE_CONFIG_START( nbmjdrv1 ) // galkoku MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.7) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END @@ -1379,9 +1381,10 @@ static MACHINE_CONFIG_START( nbmjdrv2 ) // pstadium MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.7) MCFG_SOUND_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac2", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/nbmj9195.cpp b/src/mame/drivers/nbmj9195.cpp index bef9cfacff1..d446b6f9194 100644 --- a/src/mame/drivers/nbmj9195.cpp +++ b/src/mame/drivers/nbmj9195.cpp @@ -29,6 +29,7 @@ Notes: #include "machine/nvram.h" #include "sound/3812intf.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "speaker.h" @@ -2542,9 +2543,10 @@ static MACHINE_CONFIG_START( NBMJDRV1_base ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.7) MCFG_SOUND_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac2", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( NBMJDRV1, NBMJDRV1_base ) diff --git a/src/mame/drivers/ngp.cpp b/src/mame/drivers/ngp.cpp index ebfb51f846a..d74884ad2a2 100644 --- a/src/mame/drivers/ngp.cpp +++ b/src/mame/drivers/ngp.cpp @@ -104,6 +104,7 @@ the Neogeo Pocket. #include "cpu/z80/z80.h" #include "sound/t6w28.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "video/k1ge.h" #include "rendlay.h" #include "screen.h" @@ -840,9 +841,10 @@ static MACHINE_CONFIG_START( ngp_common ) MCFG_SOUND_ROUTE( 1, "rspeaker", 0.50 ) MCFG_SOUND_ADD("ldac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("rdac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/notetaker.cpp b/src/mame/drivers/notetaker.cpp index d2c659a2e99..1a27b24b70e 100644 --- a/src/mame/drivers/notetaker.cpp +++ b/src/mame/drivers/notetaker.cpp @@ -103,6 +103,7 @@ DONE: #include "machine/pic8259.h" #include "machine/wd_fdc.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "video/tms9927.h" #include "screen.h" #include "speaker.h" @@ -906,7 +907,8 @@ static MACHINE_CONFIG_START( notetakr ) MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") // TODO: hook DAC up to two HA2425 (sample and hold) chips and hook those up to the speakers MCFG_SOUND_ADD("dac", DAC1200, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END DRIVER_INIT_MEMBER(notetaker_state,notetakr) diff --git a/src/mame/drivers/novagmcs48.cpp b/src/mame/drivers/novagmcs48.cpp index 2f8dc95febe..d36a2d9e408 100644 --- a/src/mame/drivers/novagmcs48.cpp +++ b/src/mame/drivers/novagmcs48.cpp @@ -31,6 +31,7 @@ Otherwise, it's identical to Presto. The MCU internal ROM is same too. #include "includes/novagbase.h" #include "cpu/mcs48/mcs48.h" +#include "sound/volt_reg.h" #include "speaker.h" // internal artwork @@ -155,7 +156,8 @@ static MACHINE_CONFIG_START( presto ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( octo, presto ) diff --git a/src/mame/drivers/nycaptor.cpp b/src/mame/drivers/nycaptor.cpp index 0efa410edb7..e285499589b 100644 --- a/src/mame/drivers/nycaptor.cpp +++ b/src/mame/drivers/nycaptor.cpp @@ -198,6 +198,7 @@ Stephh's additional notes (based on the game Z80 code and some tests) : #include "cpu/z80/z80.h" #include "sound/ay8910.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -795,7 +796,8 @@ static MACHINE_CONFIG_START( nycaptor ) // Does the DAC also exist on this board? nycaptor writes 0x80 to 0xd600 // Update: of course it exists, sound board seems common Taito design. MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_START( cyclshtg ) @@ -866,7 +868,8 @@ static MACHINE_CONFIG_START( cyclshtg ) // pin 22 Noise Output not mapped MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END @@ -934,7 +937,8 @@ static MACHINE_CONFIG_START( bronx ) // pin 22 Noise Output not mapped MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/nyny.cpp b/src/mame/drivers/nyny.cpp index 57d9088fe03..01da50d9a4f 100644 --- a/src/mame/drivers/nyny.cpp +++ b/src/mame/drivers/nyny.cpp @@ -76,6 +76,7 @@ #include "machine/rescap.h" #include "sound/ay8910.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "video/mc6845.h" #include "screen.h" @@ -657,7 +658,8 @@ static MACHINE_CONFIG_START( nyny ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.03) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/othello.cpp b/src/mame/drivers/othello.cpp index 8b655ea0739..fa289e6b08d 100644 --- a/src/mame/drivers/othello.cpp +++ b/src/mame/drivers/othello.cpp @@ -45,6 +45,7 @@ Limit for help/undo (matta): #include "machine/i8243.h" #include "sound/ay8910.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "video/mc6845.h" #include "screen.h" @@ -439,7 +440,8 @@ static MACHINE_CONFIG_START( othello ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.15) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.3) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END ROM_START( othello ) diff --git a/src/mame/drivers/palm.cpp b/src/mame/drivers/palm.cpp index 65e8427e353..f37ac1c9d37 100644 --- a/src/mame/drivers/palm.cpp +++ b/src/mame/drivers/palm.cpp @@ -16,6 +16,7 @@ #include "machine/mc68328.h" #include "machine/ram.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "rendlay.h" #include "screen.h" #include "speaker.h" @@ -191,7 +192,8 @@ static MACHINE_CONFIG_START( palm ) /* audio hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_DEVICE_ADD( MC68328_TAG, MC68328, 0 ) // lsi device MCFG_MC68328_CPU("maincpu") diff --git a/src/mame/drivers/pandoras.cpp b/src/mame/drivers/pandoras.cpp index 4b2a6cd013a..6ce65d76df4 100644 --- a/src/mame/drivers/pandoras.cpp +++ b/src/mame/drivers/pandoras.cpp @@ -35,6 +35,7 @@ Boards: #include "machine/watchdog.h" #include "sound/ay8910.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -363,7 +364,8 @@ static MACHINE_CONFIG_START( pandoras ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.12) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/pastelg.cpp b/src/mame/drivers/pastelg.cpp index 2a9ee4a7117..4b1c601609e 100644 --- a/src/mame/drivers/pastelg.cpp +++ b/src/mame/drivers/pastelg.cpp @@ -29,6 +29,7 @@ Memo: #include "machine/nvram.h" #include "sound/ay8910.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "speaker.h" @@ -427,7 +428,8 @@ static MACHINE_CONFIG_START( pastelg ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.35) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END /* @@ -485,7 +487,8 @@ static MACHINE_CONFIG_START( threeds ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.35) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/pockstat.cpp b/src/mame/drivers/pockstat.cpp index f92229652b9..a1edb66638f 100644 --- a/src/mame/drivers/pockstat.cpp +++ b/src/mame/drivers/pockstat.cpp @@ -46,6 +46,7 @@ If you do nothing for about 20 secs, it turns itself off (screen goes white). #include "cpu/arm7/arm7.h" #include "cpu/arm7/arm7core.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -988,7 +989,8 @@ static MACHINE_CONFIG_START( pockstat ) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) /* cartridge */ MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "pockstat_cart") diff --git a/src/mame/drivers/polepos.cpp b/src/mame/drivers/polepos.cpp index 24eacb38e64..332788b5c26 100644 --- a/src/mame/drivers/polepos.cpp +++ b/src/mame/drivers/polepos.cpp @@ -233,6 +233,7 @@ Todo: #include "machine/watchdog.h" #include "sound/dac.h" #include "sound/tms5220.h" +#include "sound/volt_reg.h" #include "speaker.h" #include "polepos.lh" @@ -1053,7 +1054,8 @@ static MACHINE_CONFIG_START( topracern ) MCFG_SOUND_ADD("dac", DAC_4BIT_R2R, 0) // unknown resistor configuration MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.12) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.12) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( polepos2bi, topracern ) diff --git a/src/mame/drivers/pong.cpp b/src/mame/drivers/pong.cpp index 632f1b36fe0..9834d60bfde 100644 --- a/src/mame/drivers/pong.cpp +++ b/src/mame/drivers/pong.cpp @@ -49,6 +49,7 @@ TODO: Superpong is believed to use the Pong (Rev E) PCB with some minor modifica #include "machine/netlist.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "video/fixfreq.h" @@ -401,7 +402,8 @@ static MACHINE_CONFIG_START( pong ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_START( breakout ) @@ -453,7 +455,8 @@ static MACHINE_CONFIG_START( breakout ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( pongf, pong ) @@ -496,7 +499,8 @@ static MACHINE_CONFIG_START( pongd ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END /*************************************************************************** diff --git a/src/mame/drivers/ppmast93.cpp b/src/mame/drivers/ppmast93.cpp index b1a5de6c302..17b319e10ec 100644 --- a/src/mame/drivers/ppmast93.cpp +++ b/src/mame/drivers/ppmast93.cpp @@ -135,6 +135,7 @@ Dip locations added based on the notes above. #include "cpu/z80/z80.h" #include "machine/gen_latch.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "sound/ym2413.h" #include "screen.h" #include "speaker.h" @@ -393,7 +394,8 @@ static MACHINE_CONFIG_START( ppmast93 ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.3) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END ROM_START( ppmast93 ) diff --git a/src/mame/drivers/quasar.cpp b/src/mame/drivers/quasar.cpp index f24d0323d33..44c3da2218b 100644 --- a/src/mame/drivers/quasar.cpp +++ b/src/mame/drivers/quasar.cpp @@ -33,6 +33,7 @@ I8085 Sound Board #include "includes/quasar.h" #include "cpu/s2650/s2650.h" #include "cpu/mcs48/mcs48.h" +#include "sound/volt_reg.h" #include "speaker.h" /************************************************************************ @@ -343,7 +344,8 @@ static MACHINE_CONFIG_START( quasar ) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END ROM_START( quasar ) diff --git a/src/mame/drivers/quizshow.cpp b/src/mame/drivers/quizshow.cpp index 885842089a4..663cae3db26 100644 --- a/src/mame/drivers/quizshow.cpp +++ b/src/mame/drivers/quizshow.cpp @@ -18,6 +18,7 @@ TODO: #include "cpu/s2650/s2650.h" #include "machine/timer.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" #include "quizshow.lh" @@ -402,7 +403,8 @@ static MACHINE_CONFIG_START( quizshow ) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/rastersp.cpp b/src/mame/drivers/rastersp.cpp index 53dcf4b3ad2..51437438170 100644 --- a/src/mame/drivers/rastersp.cpp +++ b/src/mame/drivers/rastersp.cpp @@ -24,6 +24,7 @@ #include "machine/nvram.h" #include "machine/timer.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -884,9 +885,10 @@ static MACHINE_CONFIG_START( rastersp ) MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") MCFG_SOUND_ADD("ldac", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("rdac", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/replicator.cpp b/src/mame/drivers/replicator.cpp index 8415731504d..094ffd191a4 100644 --- a/src/mame/drivers/replicator.cpp +++ b/src/mame/drivers/replicator.cpp @@ -27,6 +27,7 @@ #include "emu.h" #include "cpu/avr8/avr8.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "video/hd44780.h" #include "rendlay.h" #include "screen.h" @@ -634,7 +635,8 @@ static MACHINE_CONFIG_START( replicator ) /* A piezo is connected to the PORT G bit 5 (OC0B pin driven by Timer/Counter #4) */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.5) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MACHINE_CONFIG_END ROM_START( replica1 ) diff --git a/src/mame/drivers/risc2500.cpp b/src/mame/drivers/risc2500.cpp index 941861f4bdb..2a8ca42b5db 100644 --- a/src/mame/drivers/risc2500.cpp +++ b/src/mame/drivers/risc2500.cpp @@ -16,6 +16,7 @@ #include "machine/ram.h" #include "machine/nvram.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -320,7 +321,8 @@ static MACHINE_CONFIG_START( risc2500 ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_2BIT_BINARY_WEIGHTED_ONES_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/rltennis.cpp b/src/mame/drivers/rltennis.cpp index c428fa20f74..c61dc3b73fb 100644 --- a/src/mame/drivers/rltennis.cpp +++ b/src/mame/drivers/rltennis.cpp @@ -66,6 +66,7 @@ player - when there's nothing to play - first, empty 2k of ROMs are selected. #include "cpu/m68000/m68000.h" #include "machine/nvram.h" +#include "sound/volt_reg.h" #include "video/ramdac.h" #include "screen.h" #include "speaker.h" @@ -205,9 +206,10 @@ static MACHINE_CONFIG_START( rltennis ) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac2", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END ROM_START( rltennis ) diff --git a/src/mame/drivers/route16.cpp b/src/mame/drivers/route16.cpp index 7c34e913b7f..37a8670ac97 100644 --- a/src/mame/drivers/route16.cpp +++ b/src/mame/drivers/route16.cpp @@ -75,6 +75,7 @@ #include "cpu/z80/z80.h" #include "sound/ay8910.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -673,7 +674,8 @@ static MACHINE_CONFIG_DERIVED( stratvox, route16 ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/rowamet.cpp b/src/mame/drivers/rowamet.cpp index c8fd5e70a4d..74f44a2ab5f 100644 --- a/src/mame/drivers/rowamet.cpp +++ b/src/mame/drivers/rowamet.cpp @@ -28,6 +28,7 @@ ToDO: #include "cpu/z80/z80.h" #include "machine/timer.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "speaker.h" #include "rowamet.lh" @@ -224,7 +225,8 @@ static MACHINE_CONFIG_START( rowamet ) /* Sound */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END /*------------------------------------------------------------------- diff --git a/src/mame/drivers/royalmah.cpp b/src/mame/drivers/royalmah.cpp index 167a85f7fee..16513c25fda 100644 --- a/src/mame/drivers/royalmah.cpp +++ b/src/mame/drivers/royalmah.cpp @@ -102,6 +102,7 @@ Stephh's notes (based on the games Z80 code and some tests) : #include "machine/nvram.h" #include "sound/ay8910.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "video/mc6845.h" #include "screen.h" #include "speaker.h" @@ -3434,7 +3435,8 @@ static MACHINE_CONFIG_DERIVED( jansou, royalmah ) MCFG_GENERIC_LATCH_8_ADD("soundlatch") MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( dondenmj, royalmah ) diff --git a/src/mame/drivers/s11.cpp b/src/mame/drivers/s11.cpp index 45c93189688..0f9948eff13 100644 --- a/src/mame/drivers/s11.cpp +++ b/src/mame/drivers/s11.cpp @@ -22,6 +22,7 @@ ToDo: #include "cpu/m6800/m6800.h" #include "cpu/m6809/m6809.h" +#include "sound/volt_reg.h" #include "speaker.h" #include "s11.lh" @@ -444,7 +445,9 @@ static MACHINE_CONFIG_START( s11 ) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", MC1408, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT) MCFG_SPEAKER_STANDARD_MONO("speech") MCFG_SOUND_ADD("hc55516", HC55516, 0) @@ -469,7 +472,6 @@ static MACHINE_CONFIG_START( s11 ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "bg", 0.50) MCFG_SOUND_ADD("dac1", MC1408, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "bg", 0.25) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_DEVICE_ADD("pia40", PIA6821, 0) MCFG_PIA_WRITEPA_HANDLER(DEVWRITE8("dac1", dac_byte_interface, write)) diff --git a/src/mame/drivers/s11a.cpp b/src/mame/drivers/s11a.cpp index 812b24c53be..3d761646231 100644 --- a/src/mame/drivers/s11a.cpp +++ b/src/mame/drivers/s11a.cpp @@ -25,6 +25,7 @@ Note: To start a game, certain switches need to be activated. You must first pr #include "cpu/m6800/m6800.h" #include "cpu/m6809/m6809.h" +#include "sound/volt_reg.h" #include "speaker.h" #include "s11a.lh" @@ -236,7 +237,9 @@ static MACHINE_CONFIG_START( s11a ) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", MC1408, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT) MCFG_SPEAKER_STANDARD_MONO("speech") MCFG_SOUND_ADD("hc55516", HC55516, 0) @@ -260,7 +263,6 @@ static MACHINE_CONFIG_START( s11a ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "bg", 0.50) MCFG_SOUND_ADD("dac1", MC1408, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "bg", 0.25) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_DEVICE_ADD("pia40", PIA6821, 0) MCFG_PIA_WRITEPA_HANDLER(DEVWRITE8("dac1", dac_byte_interface, write)) diff --git a/src/mame/drivers/s11b.cpp b/src/mame/drivers/s11b.cpp index 10c7f7dedbc..08e8fe0d2ba 100644 --- a/src/mame/drivers/s11b.cpp +++ b/src/mame/drivers/s11b.cpp @@ -26,6 +26,7 @@ #include "cpu/m6800/m6800.h" #include "cpu/m6809/m6809.h" +#include "sound/volt_reg.h" #include "speaker.h" #include "s11b.lh" @@ -310,7 +311,9 @@ static MACHINE_CONFIG_START( s11b ) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", MC1408, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT) MCFG_SPEAKER_STANDARD_MONO("speech") MCFG_SOUND_ADD("hc55516", HC55516, 0) @@ -336,7 +339,6 @@ static MACHINE_CONFIG_START( s11b ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "bg", 0.25) MCFG_SOUND_ADD("dac1", MC1408, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "bg", 0.25) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("hc55516_bg", HC55516, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speech", 0.50) diff --git a/src/mame/drivers/s3.cpp b/src/mame/drivers/s3.cpp index 8f52c016285..160af321308 100644 --- a/src/mame/drivers/s3.cpp +++ b/src/mame/drivers/s3.cpp @@ -44,6 +44,7 @@ ToDo: #include "machine/6821pia.h" #include "machine/timer.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "speaker.h" #include "s3.lh" @@ -483,7 +484,8 @@ static MACHINE_CONFIG_DERIVED( s3a, s3 ) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", MC1408, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MCFG_DEVICE_ADD("pias", PIA6821, 0) MCFG_PIA_READPB_HANDLER(READ8(s3_state,sound_r)) diff --git a/src/mame/drivers/s4.cpp b/src/mame/drivers/s4.cpp index 4b089512711..95d34752989 100644 --- a/src/mame/drivers/s4.cpp +++ b/src/mame/drivers/s4.cpp @@ -38,6 +38,7 @@ ToDo: #include "machine/6821pia.h" #include "machine/timer.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "speaker.h" #include "s4.lh" @@ -477,7 +478,8 @@ static MACHINE_CONFIG_DERIVED( s4a, s4 ) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", MC1408, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MCFG_DEVICE_ADD("pias", PIA6821, 0) MCFG_PIA_READPB_HANDLER(READ8(s4_state, sound_r)) diff --git a/src/mame/drivers/s6.cpp b/src/mame/drivers/s6.cpp index df0429ad1bc..c9f170625b3 100644 --- a/src/mame/drivers/s6.cpp +++ b/src/mame/drivers/s6.cpp @@ -53,6 +53,7 @@ ToDo: #include "machine/6821pia.h" #include "sound/dac.h" #include "sound/hc55516.h" +#include "sound/volt_reg.h" #include "speaker.h" #include "s6.lh" @@ -449,7 +450,8 @@ static MACHINE_CONFIG_START( s6 ) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", MC1408, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MCFG_SPEAKER_STANDARD_MONO("speech") MCFG_SOUND_ADD("hc55516", HC55516, 0) diff --git a/src/mame/drivers/s6a.cpp b/src/mame/drivers/s6a.cpp index 0a1601d2e72..6e055c6b28e 100644 --- a/src/mame/drivers/s6a.cpp +++ b/src/mame/drivers/s6a.cpp @@ -46,6 +46,7 @@ ToDo: #include "machine/6821pia.h" #include "sound/dac.h" #include "sound/hc55516.h" +#include "sound/volt_reg.h" #include "speaker.h" #include "s6a.lh" @@ -432,7 +433,8 @@ static MACHINE_CONFIG_START( s6a ) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", MC1408, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MCFG_SPEAKER_STANDARD_MONO("speech") MCFG_SOUND_ADD("hc55516", HC55516, 0) diff --git a/src/mame/drivers/s7.cpp b/src/mame/drivers/s7.cpp index 63293ee0360..5bef3f1258e 100644 --- a/src/mame/drivers/s7.cpp +++ b/src/mame/drivers/s7.cpp @@ -63,6 +63,7 @@ ToDo: #include "machine/6821pia.h" #include "sound/dac.h" #include "sound/hc55516.h" +#include "sound/volt_reg.h" #include "speaker.h" #include "s7.lh" @@ -485,7 +486,8 @@ static MACHINE_CONFIG_START( s7 ) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", MC1408, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MCFG_SPEAKER_STANDARD_MONO("speech") MCFG_SOUND_ADD("hc55516", HC55516, 0) diff --git a/src/mame/drivers/s8.cpp b/src/mame/drivers/s8.cpp index 09fbcc4b721..5d664d0a067 100644 --- a/src/mame/drivers/s8.cpp +++ b/src/mame/drivers/s8.cpp @@ -50,6 +50,7 @@ ToDo: #include "cpu/m6800/m6800.h" #include "machine/6821pia.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "speaker.h" #include "s8.lh" @@ -355,7 +356,8 @@ static MACHINE_CONFIG_START( s8 ) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", MC1408, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MCFG_DEVICE_ADD("pias", PIA6821, 0) MCFG_PIA_READPA_HANDLER(READ8(s8_state, sound_r)) diff --git a/src/mame/drivers/s8a.cpp b/src/mame/drivers/s8a.cpp index c042e49777e..22bd0234379 100644 --- a/src/mame/drivers/s8a.cpp +++ b/src/mame/drivers/s8a.cpp @@ -26,6 +26,7 @@ ToDo: #include "cpu/m6800/m6800.h" #include "machine/6821pia.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "speaker.h" #include "s8a.lh" @@ -327,7 +328,8 @@ static MACHINE_CONFIG_START( s8a ) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", MC1408, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MCFG_DEVICE_ADD("pias", PIA6821, 0) MCFG_PIA_READPA_HANDLER(READ8(s8a_state, sound_r)) diff --git a/src/mame/drivers/s9.cpp b/src/mame/drivers/s9.cpp index 9ec9ce43156..946cc3604be 100644 --- a/src/mame/drivers/s9.cpp +++ b/src/mame/drivers/s9.cpp @@ -37,6 +37,7 @@ ToDo: #include "machine/genpin.h" #include "sound/dac.h" #include "sound/hc55516.h" +#include "sound/volt_reg.h" #include "speaker.h" #include "s9.lh" @@ -361,7 +362,8 @@ static MACHINE_CONFIG_START( s9 ) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", MC1408, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MCFG_SPEAKER_STANDARD_MONO("speech") MCFG_SOUND_ADD("hc55516", HC55516, 0) diff --git a/src/mame/drivers/sbasketb.cpp b/src/mame/drivers/sbasketb.cpp index aa8a755f3af..86194b70412 100644 --- a/src/mame/drivers/sbasketb.cpp +++ b/src/mame/drivers/sbasketb.cpp @@ -52,6 +52,7 @@ CPU/Video Board Parts: #include "machine/konami1.h" #include "machine/watchdog.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -234,7 +235,8 @@ static MACHINE_CONFIG_START( sbasketb ) MCFG_SOUND_ADD("trackfld_audio", TRACKFLD_AUDIO, 0) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MCFG_SOUND_ADD("snsnd", SN76489, XTAL_14_31818MHz / 8) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) diff --git a/src/mame/drivers/sbrkout.cpp b/src/mame/drivers/sbrkout.cpp index 5fcd59a6f6c..9349f0f891f 100644 --- a/src/mame/drivers/sbrkout.cpp +++ b/src/mame/drivers/sbrkout.cpp @@ -39,6 +39,7 @@ #include "machine/74259.h" #include "machine/watchdog.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" #include "sbrkout.lh" @@ -607,7 +608,8 @@ static MACHINE_CONFIG_START( sbrkout ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.99) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/scyclone.cpp b/src/mame/drivers/scyclone.cpp index 8a24490c600..5ee25c58bb1 100644 --- a/src/mame/drivers/scyclone.cpp +++ b/src/mame/drivers/scyclone.cpp @@ -45,6 +45,7 @@ #include "machine/mb14241.h" #include "sound/dac.h" #include "sound/sn76477.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -641,13 +642,20 @@ static MACHINE_CONFIG_START( scyclone ) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) + MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MCFG_SOUND_ADD("dac2", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + + MCFG_DEVICE_ADD("vref2", VOLTAGE_REGULATOR, 0) + MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT) + MACHINE_CONFIG_END ROM_START( scyclone ) diff --git a/src/mame/drivers/segas16a.cpp b/src/mame/drivers/segas16a.cpp index c5aa4d86264..26b057edd41 100644 --- a/src/mame/drivers/segas16a.cpp +++ b/src/mame/drivers/segas16a.cpp @@ -154,6 +154,7 @@ Tetris - - - - EPR12169 EPR12170 - #include "machine/nvram.h" #include "machine/segacrp2_device.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "speaker.h" @@ -2019,7 +2020,8 @@ static MACHINE_CONFIG_START( system16a ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.43) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/segas24.cpp b/src/mame/drivers/segas24.cpp index 5678c5ef164..02759921a47 100644 --- a/src/mame/drivers/segas24.cpp +++ b/src/mame/drivers/segas24.cpp @@ -346,6 +346,7 @@ Notes: #include "machine/nvram.h" #include "machine/upd4701.h" #include "machine/315_5296.h" +#include "sound/volt_reg.h" #include "sound/ym2151.h" #include "video/segaic24.h" #include "speaker.h" @@ -1909,7 +1910,8 @@ static MACHINE_CONFIG_START( system24 ) MCFG_SOUND_ROUTE(1, "rspeaker", 0.50) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( mahmajn, system24 ) diff --git a/src/mame/drivers/seicross.cpp b/src/mame/drivers/seicross.cpp index 370f6734378..55a02d7c210 100644 --- a/src/mame/drivers/seicross.cpp +++ b/src/mame/drivers/seicross.cpp @@ -51,6 +51,7 @@ This info came from http://www.ne.jp/asahi/cc-sakura/akkun/old/fryski.html #include "cpu/z80/z80.h" #include "machine/watchdog.h" #include "sound/ay8910.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -427,7 +428,8 @@ static MACHINE_CONFIG_START( no_nvram ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) MCFG_SOUND_ADD("dac", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.12) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/senjyo.cpp b/src/mame/drivers/senjyo.cpp index 1b822486555..3380be0d37c 100644 --- a/src/mame/drivers/senjyo.cpp +++ b/src/mame/drivers/senjyo.cpp @@ -83,6 +83,7 @@ I/O read/write #include "cpu/z80/z80.h" #include "machine/segacrpt_device.h" #include "sound/sn76496.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -599,7 +600,8 @@ static MACHINE_CONFIG_START( senjyo ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) MCFG_SOUND_ADD("dac", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.05) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/shangkid.cpp b/src/mame/drivers/shangkid.cpp index 1be934c5596..01d70d397f5 100644 --- a/src/mame/drivers/shangkid.cpp +++ b/src/mame/drivers/shangkid.cpp @@ -57,6 +57,7 @@ Games by Nihon Game/Culture Brain: #include "machine/74259.h" #include "sound/ay8910.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -411,7 +412,8 @@ static MACHINE_CONFIG_START( chinhero ) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MCFG_SOUND_ADD("aysnd", AY8910, XTAL_18_432MHz/12) /* verified on pcb */ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(shangkid_state, chinhero_ay8910_porta_w)) diff --git a/src/mame/drivers/shisen.cpp b/src/mame/drivers/shisen.cpp index cc2f73e4e99..7297973182b 100644 --- a/src/mame/drivers/shisen.cpp +++ b/src/mame/drivers/shisen.cpp @@ -13,6 +13,7 @@ driver by Nicola Salmoria #include "cpu/z80/z80.h" #include "sound/ym2151.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -245,7 +246,8 @@ static MACHINE_CONFIG_START( shisen ) MCFG_SOUND_ROUTE(1, "rspeaker", 0.5) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.25) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/special.cpp b/src/mame/drivers/special.cpp index 298c4a6c7ad..ae21548ffee 100644 --- a/src/mame/drivers/special.cpp +++ b/src/mame/drivers/special.cpp @@ -12,6 +12,7 @@ #include "emu.h" #include "includes/special.h" +#include "sound/volt_reg.h" #include "screen.h" #include "softlist.h" #include "speaker.h" @@ -378,7 +379,8 @@ static MACHINE_CONFIG_START( special ) /* audio hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.0625) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) @@ -496,7 +498,8 @@ static MACHINE_CONFIG_START( erik ) /* audio hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.0625) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) diff --git a/src/mame/drivers/ssozumo.cpp b/src/mame/drivers/ssozumo.cpp index 3234777cdf3..71f698dcaf9 100644 --- a/src/mame/drivers/ssozumo.cpp +++ b/src/mame/drivers/ssozumo.cpp @@ -16,6 +16,7 @@ Driver by Takahiro Nogi (nogi@kt.rim.or.jp) 1999/10/04 #include "cpu/m6809/m6809.h" #include "sound/ay8910.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -234,7 +235,8 @@ static MACHINE_CONFIG_START( ssozumo ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.3) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.3) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/suna16.cpp b/src/mame/drivers/suna16.cpp index 8ba30cc1bde..a78eb534179 100644 --- a/src/mame/drivers/suna16.cpp +++ b/src/mame/drivers/suna16.cpp @@ -32,6 +32,7 @@ Year + Game By Board Hardware #include "sound/3526intf.h" #include "sound/ay8910.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "sound/ym2151.h" #include "speaker.h" @@ -842,13 +843,14 @@ static MACHINE_CONFIG_START( bssoccer ) MCFG_SOUND_ROUTE(1, "rspeaker", 0.2) MCFG_SOUND_ADD("ldac", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.2) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("rdac", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.2) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("ldac2", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.2) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("rdac2", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.2) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "ldac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac2", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "rdac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac2", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END @@ -902,9 +904,10 @@ static MACHINE_CONFIG_START( uballoon ) MCFG_SOUND_ROUTE(1, "rspeaker", 0.50) MCFG_SOUND_ADD("ldac", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("rdac", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END /*************************************************************************** @@ -957,9 +960,10 @@ static MACHINE_CONFIG_START( sunaq ) MCFG_SOUND_ROUTE(1, "rspeaker", 0.50) MCFG_SOUND_ADD("ldac", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("rdac", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END /*************************************************************************** @@ -1021,13 +1025,14 @@ static MACHINE_CONFIG_START( bestbest ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) MCFG_SOUND_ADD("ldac", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.2) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("rdac", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.2) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("ldac2", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.2) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("rdac2", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.2) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "ldac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac2", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "rdac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac2", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END /*************************************************************************** diff --git a/src/mame/drivers/suna8.cpp b/src/mame/drivers/suna8.cpp index d236ee27ebc..4c8d782a2b2 100644 --- a/src/mame/drivers/suna8.cpp +++ b/src/mame/drivers/suna8.cpp @@ -44,6 +44,7 @@ Notes: #include "sound/3812intf.h" #include "sound/ay8910.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "speaker.h" @@ -2038,13 +2039,14 @@ static MACHINE_CONFIG_START( brickzn11 ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.33) MCFG_SOUND_ADD("ldac", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.17) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("rdac", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.17) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("ldac2", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.17) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("rdac2", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.17) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "ldac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac2", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "rdac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac2", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( brickzn, brickzn11 ) diff --git a/src/mame/drivers/tagteam.cpp b/src/mame/drivers/tagteam.cpp index f47a814f453..ef0ec8f9a5f 100644 --- a/src/mame/drivers/tagteam.cpp +++ b/src/mame/drivers/tagteam.cpp @@ -32,6 +32,7 @@ TODO: #include "cpu/m6502/m6502.h" #include "sound/ay8910.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -243,7 +244,8 @@ static MACHINE_CONFIG_START( tagteam ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/taito.cpp b/src/mame/drivers/taito.cpp index 91a04d96a01..b41184813d5 100644 --- a/src/mame/drivers/taito.cpp +++ b/src/mame/drivers/taito.cpp @@ -51,6 +51,7 @@ ToDO: #include "sound/ay8910.h" #include "sound/dac.h" #include "sound/votrax.h" +#include "sound/volt_reg.h" #include "speaker.h" #include "taito.lh" @@ -340,7 +341,8 @@ static MACHINE_CONFIG_START( taito ) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.475) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MCFG_DEVICE_ADD("pia", PIA6821, 0) //MCFG_PIA_READPA_HANDLER(READ8(taito_state, pia_pa_r)) diff --git a/src/mame/drivers/tceptor.cpp b/src/mame/drivers/tceptor.cpp index d30a76951d5..0b03349fc0a 100644 --- a/src/mame/drivers/tceptor.cpp +++ b/src/mame/drivers/tceptor.cpp @@ -18,6 +18,7 @@ #include "machine/nvram.h" #include "sound/dac.h" #include "sound/ym2151.h" +#include "sound/volt_reg.h" #include "rendlay.h" #include "speaker.h" @@ -396,7 +397,8 @@ static MACHINE_CONFIG_START( tceptor ) MCFG_SOUND_ROUTE(1, "rspeaker", 0.40) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.4) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.4) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/terracre.cpp b/src/mame/drivers/terracre.cpp index 08ba0889ac9..2cfdede4314 100644 --- a/src/mame/drivers/terracre.cpp +++ b/src/mame/drivers/terracre.cpp @@ -88,6 +88,7 @@ AT-2 #include "sound/2203intf.h" #include "sound/3526intf.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -606,9 +607,10 @@ static MACHINE_CONFIG_START( ym3526 ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) MCFG_SOUND_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac2", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( ym2203, ym3526 ) diff --git a/src/mame/drivers/thomson.cpp b/src/mame/drivers/thomson.cpp index f84c9a4b229..3195b00baff 100644 --- a/src/mame/drivers/thomson.cpp +++ b/src/mame/drivers/thomson.cpp @@ -86,6 +86,7 @@ #include "machine/clock.h" #include "machine/ram.h" #include "machine/wd_fdc.h" +#include "sound/volt_reg.h" #include "softlist.h" #include "speaker.h" @@ -648,9 +649,10 @@ static MACHINE_CONFIG_START( to7 ) /* sound */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("buzzer", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_ADD("dac", DAC_6BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC (6-bit game extension DAC) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "buzzer", 1.0, DAC_VREF_POS_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) /* speech synthesis */ MCFG_SOUND_ADD("mea8000", MEA8000, 3840000) diff --git a/src/mame/drivers/tnzs.cpp b/src/mame/drivers/tnzs.cpp index 39dc6cd21c4..c5a73d241d7 100644 --- a/src/mame/drivers/tnzs.cpp +++ b/src/mame/drivers/tnzs.cpp @@ -626,6 +626,7 @@ Driver by Takahiro Nogi (nogi@kt.rim.or.jp) 1999/11/06 #include "cpu/z80/z80.h" #include "sound/2203intf.h" +#include "sound/volt_reg.h" #include "sound/ym2151.h" #include "screen.h" #include "speaker.h" @@ -1685,7 +1686,8 @@ static MACHINE_CONFIG_DERIVED( kabukiz, tnzsb ) MCFG_AY8910_PORT_B_WRITE_CB(DEVWRITE8("dac", dac_byte_interface, write)) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/trackfld.cpp b/src/mame/drivers/trackfld.cpp index 31fb71a5475..36cdc4f07c4 100644 --- a/src/mame/drivers/trackfld.cpp +++ b/src/mame/drivers/trackfld.cpp @@ -194,6 +194,7 @@ MAIN BOARD: #include "machine/nvram.h" #include "machine/watchdog.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -941,7 +942,8 @@ static MACHINE_CONFIG_START( trackfld ) MCFG_SOUND_ADD("trackfld_audio", TRACKFLD_AUDIO, 0) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4) // ls374.8e + r34-r47(20k) + r35-r53(10k) + r54(20k) + upc324.8f - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MCFG_SOUND_ADD("snsnd", SN76496, SOUND_CLOCK/8) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) @@ -1010,7 +1012,8 @@ static MACHINE_CONFIG_START( yieartf ) MCFG_SOUND_ADD("trackfld_audio", TRACKFLD_AUDIO, 0) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4) // ls374.8e + r34-r47(20k) + r35-r53(10k) + r54(20k) + upc324.8f - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MCFG_SOUND_ADD("snsnd", SN76496, MASTER_CLOCK/6/2) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) diff --git a/src/mame/drivers/truco.cpp b/src/mame/drivers/truco.cpp index 0601ef4443a..cf2bb59b5b6 100644 --- a/src/mame/drivers/truco.cpp +++ b/src/mame/drivers/truco.cpp @@ -206,6 +206,7 @@ #include "cpu/m6809/m6809.h" #include "machine/6821pia.h" +#include "sound/volt_reg.h" #include "video/mc6845.h" #include "screen.h" #include "speaker.h" @@ -453,7 +454,8 @@ static MACHINE_CONFIG_START( truco ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/trucocl.cpp b/src/mame/drivers/trucocl.cpp index 3c5a92d8fc3..62eb1cd3377 100644 --- a/src/mame/drivers/trucocl.cpp +++ b/src/mame/drivers/trucocl.cpp @@ -39,6 +39,7 @@ Daughterboard: Custom made, plugged in the 2 roms and Z80 mainboard sockets. #include "cpu/z80/z80.h" #include "machine/watchdog.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -166,7 +167,8 @@ static MACHINE_CONFIG_START( trucocl ) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END /*************************************************************************** diff --git a/src/mame/drivers/tsamurai.cpp b/src/mame/drivers/tsamurai.cpp index c5c92bee8db..6b300c8029c 100644 --- a/src/mame/drivers/tsamurai.cpp +++ b/src/mame/drivers/tsamurai.cpp @@ -45,6 +45,7 @@ the "America" release. #include "machine/74259.h" #include "sound/ay8910.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -744,9 +745,10 @@ static MACHINE_CONFIG_START( tsamurai ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1) MCFG_SOUND_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac2", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END @@ -793,7 +795,8 @@ static MACHINE_CONFIG_START( vsgongf ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END @@ -846,9 +849,10 @@ static MACHINE_CONFIG_START( m660 ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1) MCFG_SOUND_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("dac2", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/tsispch.cpp b/src/mame/drivers/tsispch.cpp index 61f0193d18e..ac131b6956d 100644 --- a/src/mame/drivers/tsispch.cpp +++ b/src/mame/drivers/tsispch.cpp @@ -117,6 +117,7 @@ #include "cpu/upd7725/upd7725.h" #include "machine/i8251.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "speaker.h" @@ -402,7 +403,8 @@ static MACHINE_CONFIG_START( prose2k ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_12BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) // unknown DAC (TODO: correctly figure out how the DAC works; apparently it is connected to the serial output of the upd7720, which will be "fun" to connect up) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MCFG_DEVICE_ADD(TERMINAL_TAG, GENERIC_TERMINAL, 0) MCFG_GENERIC_TERMINAL_KEYBOARD_CB(DEVPUT("i8251a_u15", i8251_device, receive_character)) diff --git a/src/mame/drivers/ut88.cpp b/src/mame/drivers/ut88.cpp index ee550594302..a8bb1cb820a 100644 --- a/src/mame/drivers/ut88.cpp +++ b/src/mame/drivers/ut88.cpp @@ -28,6 +28,7 @@ Paste facility was tested but doesn't work, so all code remnants removed. #include "formats/rk_cas.h" #include "softlist.h" #include "ut88mini.lh" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -205,7 +206,8 @@ static MACHINE_CONFIG_START( ut88 ) /* audio hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) diff --git a/src/mame/drivers/vcombat.cpp b/src/mame/drivers/vcombat.cpp index 09382f5e6b0..d92457c6ad8 100644 --- a/src/mame/drivers/vcombat.cpp +++ b/src/mame/drivers/vcombat.cpp @@ -87,6 +87,7 @@ TODO : This is a partially working driver. Most of the memory maps for #include "cpu/m68000/m68000.h" #include "machine/nvram.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "video/mc6845.h" #include "video/tlc34076.h" #include "rendlay.h" @@ -585,7 +586,8 @@ static MACHINE_CONFIG_START( vcombat ) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_10BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END @@ -618,7 +620,8 @@ static MACHINE_CONFIG_START( shadfgtr ) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_10BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/vectrex.cpp b/src/mame/drivers/vectrex.cpp index b6274b6791d..e6cfc5927bc 100644 --- a/src/mame/drivers/vectrex.cpp +++ b/src/mame/drivers/vectrex.cpp @@ -17,6 +17,7 @@ Bruce Tomlin (hardware info) #include "machine/6522via.h" #include "machine/nvram.h" #include "sound/ay8910.h" +#include "sound/volt_reg.h" #include "video/vector.h" #include "softlist.h" @@ -110,7 +111,8 @@ static MACHINE_CONFIG_START( vectrex ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", MC1408, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // mc1408.ic301 (also used for vector generation) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MCFG_SOUND_ADD("ay8912", AY8912, XTAL_6MHz / 4) MCFG_AY8910_PORT_A_READ_CB(IOPORT("BUTTONS")) diff --git a/src/mame/drivers/vg5k.cpp b/src/mame/drivers/vg5k.cpp index bfbacb18346..be0261ff4c8 100644 --- a/src/mame/drivers/vg5k.cpp +++ b/src/mame/drivers/vg5k.cpp @@ -55,6 +55,7 @@ #include "machine/ram.h" #include "machine/timer.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "sound/wave.h" #include "video/ef9345.h" @@ -385,7 +386,8 @@ static MACHINE_CONFIG_START( vg5k ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.125) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) /* cassette */ MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") diff --git a/src/mame/drivers/vidbrain.cpp b/src/mame/drivers/vidbrain.cpp index 2f268d6e66b..697763f1dbf 100644 --- a/src/mame/drivers/vidbrain.cpp +++ b/src/mame/drivers/vidbrain.cpp @@ -39,6 +39,7 @@ #include "includes/vidbrain.h" #include "machine/rescap.h" +#include "sound/volt_reg.h" #include "softlist.h" #include "speaker.h" @@ -517,7 +518,8 @@ static MACHINE_CONFIG_START( vidbrain ) // sound hardware MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_2BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.167) // 74ls74.u16 + 120k + 56k - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) // devices MCFG_DEVICE_ADD(F3853_TAG, F3853, XTAL_4MHz/2) diff --git a/src/mame/drivers/videopkr.cpp b/src/mame/drivers/videopkr.cpp index 13635f05e95..1b9945bca0f 100644 --- a/src/mame/drivers/videopkr.cpp +++ b/src/mame/drivers/videopkr.cpp @@ -282,6 +282,7 @@ #include "machine/timer.h" #include "sound/ay8910.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -1283,7 +1284,8 @@ static MACHINE_CONFIG_START( videopkr ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", MC1408, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.275) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/vigilant.cpp b/src/mame/drivers/vigilant.cpp index 7236af87840..42991286a71 100644 --- a/src/mame/drivers/vigilant.cpp +++ b/src/mame/drivers/vigilant.cpp @@ -27,6 +27,7 @@ Bottom board - M75-B-A (all versions regardless of mask ROM/EPROM) #include "cpu/z80/z80.h" #include "sound/2203intf.h" +#include "sound/volt_reg.h" #include "sound/ym2151.h" #include "screen.h" #include "speaker.h" @@ -509,7 +510,8 @@ static MACHINE_CONFIG_START( vigilant ) MCFG_SOUND_ROUTE(1, "rspeaker", 0.55) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_START( buccanrs ) @@ -567,7 +569,8 @@ static MACHINE_CONFIG_START( buccanrs ) MCFG_SOUND_ROUTE(3, "rspeaker", 0.50) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.35) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.35) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END static MACHINE_CONFIG_START( kikcubic ) @@ -609,7 +612,8 @@ static MACHINE_CONFIG_START( kikcubic ) MCFG_SOUND_ROUTE(1, "rspeaker", 0.55) MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/vis.cpp b/src/mame/drivers/vis.cpp index a2716238483..f4fb764b02f 100644 --- a/src/mame/drivers/vis.cpp +++ b/src/mame/drivers/vis.cpp @@ -8,6 +8,7 @@ #include "machine/at.h" #include "sound/262intf.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "video/pc_vga.h" #include "speaker.h" @@ -137,9 +138,10 @@ MACHINE_CONFIG_MEMBER( vis_audio_device::device_add_mconfig ) MCFG_SOUND_ROUTE(2, "lspeaker", 1.00) MCFG_SOUND_ROUTE(3, "rspeaker", 1.00) MCFG_SOUND_ADD("ldac", DAC_16BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("rdac", DAC_16BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END READ8_MEMBER(vis_audio_device::pcm_r) diff --git a/src/mame/drivers/wheelfir.cpp b/src/mame/drivers/wheelfir.cpp index c4711629d57..ab7097256a0 100644 --- a/src/mame/drivers/wheelfir.cpp +++ b/src/mame/drivers/wheelfir.cpp @@ -212,6 +212,7 @@ suspicious code: #include "machine/gen_latch.h" #include "machine/timer.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "video/ramdac.h" #include "screen.h" #include "speaker.h" @@ -777,9 +778,10 @@ static MACHINE_CONFIG_START( wheelfir ) /* sound hardware */ MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") MCFG_SOUND_ADD("ldac", DAC_10BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("rdac", DAC_10BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/wildpkr.cpp b/src/mame/drivers/wildpkr.cpp index 49e50fd0b98..701a69d4346 100644 --- a/src/mame/drivers/wildpkr.cpp +++ b/src/mame/drivers/wildpkr.cpp @@ -164,6 +164,7 @@ #include "machine/nvram.h" #include "sound/ay8910.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "video/hd63484.h" #include "video/ramdac.h" #include "screen.h" @@ -517,7 +518,8 @@ static MACHINE_CONFIG_START( tabpkr ) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("dac", AD557, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/drivers/williams.cpp b/src/mame/drivers/williams.cpp index 74833df51dd..6cd158a58fd 100644 --- a/src/mame/drivers/williams.cpp +++ b/src/mame/drivers/williams.cpp @@ -506,6 +506,7 @@ Reference video: https://www.youtube.com/watch?v=R5OeC6Wc_yI #include "machine/74157.h" #include "machine/nvram.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "speaker.h" @@ -1476,7 +1477,8 @@ static MACHINE_CONFIG_START( williams ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", MC1408, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // mc1408.ic6 - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) /* pia */ MCFG_DEVICE_ADD("pia_0", PIA6821, 0) @@ -1683,9 +1685,10 @@ static MACHINE_CONFIG_DERIVED( blaster, blastkit ) MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") MCFG_SOUND_ADD("ldac", MC1408, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("rdac", MC1408, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END @@ -1728,7 +1731,8 @@ static MACHINE_CONFIG_START( williams2 ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", MC1408, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) /* pia */ MCFG_DEVICE_ADD("pia_0", PIA6821, 0) diff --git a/src/mame/drivers/wmg.cpp b/src/mame/drivers/wmg.cpp index e4ae0a99feb..86919a257c7 100644 --- a/src/mame/drivers/wmg.cpp +++ b/src/mame/drivers/wmg.cpp @@ -74,6 +74,7 @@ of save-state is also needed. #include "cpu/m6800/m6800.h" #include "machine/nvram.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "speaker.h" @@ -518,7 +519,8 @@ static MACHINE_CONFIG_START( wmg ) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", MC1408, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) /* pia */ MCFG_DEVICE_ADD("pia_0", PIA6821, 0) diff --git a/src/mame/drivers/wyvernf0.cpp b/src/mame/drivers/wyvernf0.cpp index 78edb0827e3..9009fc8642c 100644 --- a/src/mame/drivers/wyvernf0.cpp +++ b/src/mame/drivers/wyvernf0.cpp @@ -38,6 +38,7 @@ TODO: #include "sound/ay8910.h" #include "sound/msm5232.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" @@ -698,7 +699,8 @@ static MACHINE_CONFIG_START( wyvernf0 ) // pin 22 Noise Output not mapped MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END /*************************************************************************** diff --git a/src/mame/drivers/xtheball.cpp b/src/mame/drivers/xtheball.cpp index f7216975db4..b3a1a5ba6f3 100644 --- a/src/mame/drivers/xtheball.cpp +++ b/src/mame/drivers/xtheball.cpp @@ -15,6 +15,7 @@ #include "machine/nvram.h" #include "machine/watchdog.h" #include "sound/dac.h" +#include "sound/volt_reg.h" #include "video/tlc34076.h" #include "screen.h" #include "speaker.h" @@ -333,7 +334,8 @@ static MACHINE_CONFIG_START( xtheball ) MCFG_SPEAKER_STANDARD_MONO("speaker") MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/machine/inder_sb.cpp b/src/mame/machine/inder_sb.cpp index a0b15fbb675..ce14408e500 100644 --- a/src/mame/machine/inder_sb.cpp +++ b/src/mame/machine/inder_sb.cpp @@ -6,6 +6,7 @@ #include "emu.h" #include "machine/inder_sb.h" +#include "sound/volt_reg.h" #include "speaker.h" @@ -225,13 +226,14 @@ MACHINE_CONFIG_MEMBER( inder_sb_device::device_add_mconfig ) MCFG_SOUND_ADD("dac2", DAC_8BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC MCFG_SOUND_ADD("dac3", DAC_8BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC MCFG_SOUND_ADD("dac0vol", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE_EX(0, "dac0", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac0", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_ADD("dac1vol", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_ADD("dac2vol", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_ADD("dac3vol", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE_EX(0, "dac3", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac3", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "dac0vol", 1.0, DAC_VREF_POS_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac1vol", 1.0, DAC_VREF_POS_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac2vol", 1.0, DAC_VREF_POS_INPUT) + MCFG_SOUND_ROUTE_EX(0, "dac3vol", 1.0, DAC_VREF_POS_INPUT) MACHINE_CONFIG_END diff --git a/src/mame/machine/mega32x.cpp b/src/mame/machine/mega32x.cpp index 808474b5b9d..86ef2481d8a 100644 --- a/src/mame/machine/mega32x.cpp +++ b/src/mame/machine/mega32x.cpp @@ -200,6 +200,7 @@ GFX check (these don't explicitly fails): #include "emu.h" #include "machine/mega32x.h" #include "machine/timer.h" +#include "sound/volt_reg.h" // Fifa96 needs the CPUs swapped for the gameplay to enter due to some race conditions @@ -1793,9 +1794,10 @@ MACHINE_CONFIG_MEMBER( sega_32x_ntsc_device::device_add_mconfig ) #endif MCFG_SOUND_ADD("ldac", DAC_16BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, ":lspeaker", 0.4) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("rdac", DAC_16BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, ":rspeaker", 0.4) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT) _32X_INTERLEAVE_LEVEL MACHINE_CONFIG_END @@ -1822,9 +1824,10 @@ MACHINE_CONFIG_MEMBER( sega_32x_pal_device::device_add_mconfig ) #endif MCFG_SOUND_ADD("ldac", DAC_16BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, ":lspeaker", 0.4) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) MCFG_SOUND_ADD("rdac", DAC_16BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, ":rspeaker", 0.4) // unknown DAC - MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_POS_INPUT, 1.0) MCFG_SOUND_REFERENCE_INPUT(DAC_VREF_NEG_INPUT, -1.0) + MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) + MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT) _32X_INTERLEAVE_LEVEL MACHINE_CONFIG_END