From 5d7a51946b43d21fe07f86aca4cd7e686b465feb Mon Sep 17 00:00:00 2001 From: David Haywood <28625134+DavidHaywood@users.noreply.github.com> Date: Thu, 23 Sep 2021 18:51:23 +0100 Subject: Various volume level adjustements to avoid hitting limiter. (#8553) * Adjusted levels in mustache.cpp, metlfrzr.cpp, xyonix.cpp, labybug.cpp, pgm.cpp, terracre.cpp, boogwing.cpp, astrocde.cpp, and gottlieb.cpp. * Re-balanced some Votrax stuff, attempting to keep the chip output between +/-1.0. --- src/devices/sound/votrax.cpp | 2 +- src/mame/audio/gottlieb.cpp | 9 ++++++--- src/mame/audio/gottlieb.h | 4 ++++ src/mame/drivers/astrocde.cpp | 20 +++++++++++++------- src/mame/drivers/boogwing.cpp | 12 ++++++------ src/mame/drivers/ladybug.cpp | 24 ++++++++++++------------ src/mame/drivers/metlfrzr.cpp | 4 ++-- src/mame/drivers/mustache.cpp | 4 ++-- src/mame/drivers/pgm.cpp | 2 +- src/mame/drivers/terracre.cpp | 14 +++++++------- src/mame/drivers/xyonix.cpp | 4 ++-- src/mame/includes/astrocde.h | 2 ++ 12 files changed, 58 insertions(+), 43 deletions(-) diff --git a/src/devices/sound/votrax.cpp b/src/devices/sound/votrax.cpp index 2c262ad3c42..c9d3a44bddf 100644 --- a/src/devices/sound/votrax.cpp +++ b/src/devices/sound/votrax.cpp @@ -633,7 +633,7 @@ stream_buffer::sample_t votrax_sc01_device::analog_calc() vn = apply_filter(m_vn_5, m_vn_6, m_fx_a, m_fx_b); shift_hist(vn, m_vn_6); - return vn*1.5; + return vn*0.35; } /* diff --git a/src/mame/audio/gottlieb.cpp b/src/mame/audio/gottlieb.cpp index 8c8555f13be..11a8926485b 100644 --- a/src/mame/audio/gottlieb.cpp +++ b/src/mame/audio/gottlieb.cpp @@ -13,7 +13,6 @@ #include "emu.h" #include "audio/gottlieb.h" -#include "sound/dac.h" #include "machine/input_merger.h" @@ -171,6 +170,7 @@ gottlieb_sound_r1_device::gottlieb_sound_r1_device( uint32_t clock) : device_t(mconfig, type, tag, owner, clock) , device_mixer_interface(mconfig, *this) + , m_dac(*this, "dac") , m_riot(*this, "riot") { } @@ -256,7 +256,7 @@ void gottlieb_sound_r1_device::device_add_mconfig(machine_config &config) m_riot->irq_callback().set_inputline("audiocpu", M6502_IRQ_LINE); // sound devices - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, *this, 0.25); // unknown DAC + DAC_8BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, *this, 0.25); // unknown DAC } @@ -306,10 +306,13 @@ void gottlieb_sound_r1_with_votrax_device::device_add_mconfig(machine_config &co { gottlieb_sound_r1_device::device_add_mconfig(config); + m_dac->reset_routes(); + m_dac->add_route(ALL_OUTPUTS, *this, 0.20); + // add the VOTRAX VOTRAX_SC01(config, m_votrax, 720000); m_votrax->ar_callback().set("nmi", FUNC(input_merger_device::in_w<1>)); - m_votrax->add_route(ALL_OUTPUTS, *this, 0.5); + m_votrax->add_route(ALL_OUTPUTS, *this, 0.80); } diff --git a/src/mame/audio/gottlieb.h b/src/mame/audio/gottlieb.h index 8977c3181ab..ab3413e9569 100644 --- a/src/mame/audio/gottlieb.h +++ b/src/mame/audio/gottlieb.h @@ -10,6 +10,7 @@ #include "machine/mos6530.h" #include "machine/6532riot.h" #include "sound/ay8910.h" +#include "sound/dac.h" #include "sound/sp0250.h" #include "sound/votrax.h" @@ -88,6 +89,9 @@ protected: virtual void gottlieb_sound_r1_map(address_map &map); +protected: + required_device m_dac; + private: // devices required_device m_riot; diff --git a/src/mame/drivers/astrocde.cpp b/src/mame/drivers/astrocde.cpp index d583a63f3a6..01333d36ad6 100644 --- a/src/mame/drivers/astrocde.cpp +++ b/src/mame/drivers/astrocde.cpp @@ -563,7 +563,7 @@ void astrocde_state::port_map_mono_pattern(address_map &map) void astrocde_state::port_map_stereo_pattern(address_map &map) { port_map_mono_pattern(map); - map(0x0050, 0x0058).select(0xff00).w("astrocade2", FUNC(astrocade_io_device::write)); + map(0x0050, 0x0058).select(0xff00).w(m_astrocade_sound2, FUNC(astrocade_io_device::write)); } @@ -1236,9 +1236,9 @@ void astrocde_state::astrocade_stereo_sound(machine_config &config) ASTROCADE_IO(config, m_astrocade_sound1, ASTROCADE_CLOCK/4); m_astrocade_sound1->si_cb().set(FUNC(astrocde_state::input_mux_r)); m_astrocade_sound1->so_cb<0>().set("watchdog", FUNC(watchdog_timer_device::reset_w)); - m_astrocade_sound1->add_route(ALL_OUTPUTS, "lspeaker", 1.0); + m_astrocade_sound1->add_route(ALL_OUTPUTS, "lspeaker", 1.00); - ASTROCADE_IO(config, "astrocade2", ASTROCADE_CLOCK/4).add_route(ALL_OUTPUTS, "rspeaker", 1.0); + ASTROCADE_IO(config, m_astrocade_sound2, ASTROCADE_CLOCK/4).add_route(ALL_OUTPUTS, "rspeaker", 1.00); WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 128); // MC14024B on CPU board at U18, CLK = VERTDR, Q7 used for RESET } @@ -1357,9 +1357,15 @@ void astrocde_state::wow(machine_config &config) m_astrocade_sound1->so_cb<5>().set("outlatch", FUNC(cd4099_device::write_nibble_d0)); m_astrocade_sound1->so_cb<7>().set(FUNC(astrocde_state::votrax_speech_w)); + m_astrocade_sound1->reset_routes(); + m_astrocade_sound1->add_route(ALL_OUTPUTS, "lspeaker", 0.35); + + m_astrocade_sound2->reset_routes(); + m_astrocade_sound2->add_route(ALL_OUTPUTS, "lspeaker", 0.35); + VOTRAX_SC01(config, m_votrax, 756000); - m_votrax->add_route(0, "f1", 0.85); + m_votrax->add_route(0, "f1", 0.65); FILTER_RC(config, "f1").set_lowpass(110e3, 560e-12).add_route(0, "f2", 1.00); FILTER_RC(config, "f2").set_lowpass(110e3, 560e-12).add_route(0, "f3", 1.00); FILTER_RC(config, "f3").set_lowpass(110e3, 560e-12).add_route(0, "f4", 1.00); @@ -1409,12 +1415,12 @@ void astrocde_state::gorf(machine_config &config) m_astrocade_sound1->so_cb<5>().set("outlatch", FUNC(cd4099_device::write_nibble_d0)); m_astrocade_sound1->so_cb<6>().set("lamplatch", FUNC(cd4099_device::write_nibble_d0)); m_astrocade_sound1->so_cb<7>().set(FUNC(astrocde_state::votrax_speech_w)); - m_astrocade_sound1->add_route(ALL_OUTPUTS, "upper", 1.0); + m_astrocade_sound1->add_route(ALL_OUTPUTS, "upper", 0.45); - ASTROCADE_IO(config, "astrocade2", ASTROCADE_CLOCK/4).add_route(ALL_OUTPUTS, "lower", 1.0); + ASTROCADE_IO(config, m_astrocade_sound2, ASTROCADE_CLOCK/4).add_route(ALL_OUTPUTS, "lower", 0.45); VOTRAX_SC01(config, m_votrax, 756000); - m_votrax->add_route(ALL_OUTPUTS, "upper", 0.85); + m_votrax->add_route(ALL_OUTPUTS, "upper", 0.55); } void astrocde_state::robby(machine_config &config) diff --git a/src/mame/drivers/boogwing.cpp b/src/mame/drivers/boogwing.cpp index aa60e09560b..d254f266e18 100644 --- a/src/mame/drivers/boogwing.cpp +++ b/src/mame/drivers/boogwing.cpp @@ -396,16 +396,16 @@ void boogwing_state::boogwing(machine_config &config) ym2151_device &ymsnd(YM2151(config, "ymsnd", SOUND_XTAL/9)); ymsnd.irq_handler().set_inputline(m_audiocpu, 1); /* IRQ2 */ ymsnd.port_write_handler().set(FUNC(boogwing_state::sound_bankswitch_w)); - ymsnd.add_route(0, "lspeaker", 0.80); - ymsnd.add_route(1, "rspeaker", 0.80); + ymsnd.add_route(0, "lspeaker", 0.32); + ymsnd.add_route(1, "rspeaker", 0.32); OKIM6295(config, m_oki[0], SOUND_XTAL/32, okim6295_device::PIN7_HIGH); - m_oki[0]->add_route(ALL_OUTPUTS, "lspeaker", 1.40); - m_oki[0]->add_route(ALL_OUTPUTS, "rspeaker", 1.40); + m_oki[0]->add_route(ALL_OUTPUTS, "lspeaker", 0.56); + m_oki[0]->add_route(ALL_OUTPUTS, "rspeaker", 0.56); OKIM6295(config, m_oki[1], SOUND_XTAL/16, okim6295_device::PIN7_HIGH); - m_oki[1]->add_route(ALL_OUTPUTS, "lspeaker", 0.30); - m_oki[1]->add_route(ALL_OUTPUTS, "rspeaker", 0.30); + m_oki[1]->add_route(ALL_OUTPUTS, "lspeaker", 0.12); + m_oki[1]->add_route(ALL_OUTPUTS, "rspeaker", 0.12); } /**********************************************************************************/ diff --git a/src/mame/drivers/ladybug.cpp b/src/mame/drivers/ladybug.cpp index b65ae59dd21..ef41f1f7fd7 100644 --- a/src/mame/drivers/ladybug.cpp +++ b/src/mame/drivers/ladybug.cpp @@ -852,8 +852,8 @@ void ladybug_state::ladybug(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - SN76489(config, "sn1", 4_MHz_XTAL).add_route(ALL_OUTPUTS, "mono", 1.0); - SN76489(config, "sn2", 4_MHz_XTAL).add_route(ALL_OUTPUTS, "mono", 1.0); + SN76489(config, "sn1", 4_MHz_XTAL).add_route(ALL_OUTPUTS, "mono", 0.5); + SN76489(config, "sn2", 4_MHz_XTAL).add_route(ALL_OUTPUTS, "mono", 0.5); } void dorodon_state::dorodon(machine_config &config) @@ -893,11 +893,11 @@ void mrsdyna_state::mrsdyna(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - SN76489(config, "sn1", 4000000).add_route(ALL_OUTPUTS, "mono", 1.0); - SN76489(config, "sn2", 4000000).add_route(ALL_OUTPUTS, "mono", 1.0); - SN76489(config, "sn3", 4000000).add_route(ALL_OUTPUTS, "mono", 1.0); - SN76489(config, "sn4", 4000000).add_route(ALL_OUTPUTS, "mono", 1.0); - SN76489(config, "sn5", 4000000).add_route(ALL_OUTPUTS, "mono", 1.0); + SN76489(config, "sn1", 4000000).add_route(ALL_OUTPUTS, "mono", 0.2); + SN76489(config, "sn2", 4000000).add_route(ALL_OUTPUTS, "mono", 0.2); + SN76489(config, "sn3", 4000000).add_route(ALL_OUTPUTS, "mono", 0.2); + SN76489(config, "sn4", 4000000).add_route(ALL_OUTPUTS, "mono", 0.2); + SN76489(config, "sn5", 4000000).add_route(ALL_OUTPUTS, "mono", 0.2); } void sraider_state::sraider(machine_config &config) @@ -931,11 +931,11 @@ void sraider_state::sraider(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - SN76489(config, "sn1", 4000000).add_route(ALL_OUTPUTS, "mono", 1.0); - SN76489(config, "sn2", 4000000).add_route(ALL_OUTPUTS, "mono", 1.0); - SN76489(config, "sn3", 4000000).add_route(ALL_OUTPUTS, "mono", 1.0); - SN76489(config, "sn4", 4000000).add_route(ALL_OUTPUTS, "mono", 1.0); - SN76489(config, "sn5", 4000000).add_route(ALL_OUTPUTS, "mono", 1.0); + SN76489(config, "sn1", 4000000).add_route(ALL_OUTPUTS, "mono", 0.2); + SN76489(config, "sn2", 4000000).add_route(ALL_OUTPUTS, "mono", 0.2); + SN76489(config, "sn3", 4000000).add_route(ALL_OUTPUTS, "mono", 0.2); + SN76489(config, "sn4", 4000000).add_route(ALL_OUTPUTS, "mono", 0.2); + SN76489(config, "sn5", 4000000).add_route(ALL_OUTPUTS, "mono", 0.2); } diff --git a/src/mame/drivers/metlfrzr.cpp b/src/mame/drivers/metlfrzr.cpp index e092dc58fb1..dbfc732e54c 100644 --- a/src/mame/drivers/metlfrzr.cpp +++ b/src/mame/drivers/metlfrzr.cpp @@ -406,8 +406,8 @@ void metlfrzr_state::metlfrzr(machine_config &config) ym2151_device &ymsnd(YM2151(config, "ymsnd", XTAL(14'318'181) / 4)); /* 3.579545 MHz */ ymsnd.irq_handler().set("t5182", FUNC(t5182_device::ym2151_irq_handler)); - ymsnd.add_route(0, "mono", 1.0); - ymsnd.add_route(1, "mono", 1.0); + ymsnd.add_route(0, "mono", 0.5); + ymsnd.add_route(1, "mono", 0.5); } diff --git a/src/mame/drivers/mustache.cpp b/src/mame/drivers/mustache.cpp index 2100ef768d8..ce95d7d56c8 100644 --- a/src/mame/drivers/mustache.cpp +++ b/src/mame/drivers/mustache.cpp @@ -190,8 +190,8 @@ void mustache_state::mustache(machine_config &config) ym2151_device &ymsnd(YM2151(config, "ymsnd", 14.318181_MHz_XTAL/4)); ymsnd.irq_handler().set("t5182", FUNC(t5182_device::ym2151_irq_handler)); - ymsnd.add_route(0, "mono", 1.0); - ymsnd.add_route(1, "mono", 1.0); + ymsnd.add_route(0, "mono", 0.5); + ymsnd.add_route(1, "mono", 0.5); } ROM_START( mustache ) diff --git a/src/mame/drivers/pgm.cpp b/src/mame/drivers/pgm.cpp index 7383b538ec4..6b7ffeffe98 100644 --- a/src/mame/drivers/pgm.cpp +++ b/src/mame/drivers/pgm.cpp @@ -523,7 +523,7 @@ void pgm_state::pgmbase(machine_config &config) ICS2115(config, m_ics, 33.8688_MHz_XTAL); m_ics->irq().set_inputline("soundcpu", 0); - m_ics->add_route(ALL_OUTPUTS, "mono", 5.0); + m_ics->add_route(ALL_OUTPUTS, "mono", 1.0); } void pgm_state::pgm(machine_config &config) diff --git a/src/mame/drivers/terracre.cpp b/src/mame/drivers/terracre.cpp index 9475d97b0ce..280e28420da 100644 --- a/src/mame/drivers/terracre.cpp +++ b/src/mame/drivers/terracre.cpp @@ -482,10 +482,10 @@ void terracre_state::ym3526(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - YM3526(config, "ymsnd", XTAL(16'000'000)/4).add_route(ALL_OUTPUTS, "speaker", 1.0); // 4MHz verified on PCB + YM3526(config, "ymsnd", XTAL(16'000'000)/4).add_route(ALL_OUTPUTS, "speaker", 0.5); // 4MHz verified on PCB - DAC_8BIT_R2R(config, "dac1", 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC - DAC_8BIT_R2R(config, "dac2", 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC + DAC_8BIT_R2R(config, "dac1", 0).add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC + DAC_8BIT_R2R(config, "dac2", 0).add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC } void terracre_state::ym2203(machine_config &config) @@ -496,10 +496,10 @@ void terracre_state::ym2203(machine_config &config) config.device_remove("ymsnd"); ym2203_device &ym1(YM2203(config, "ym1", XTAL(16'000'000)/4)); // 4MHz verified on PCB - ym1.add_route(0, "speaker", 0.2); - ym1.add_route(1, "speaker", 0.2); - ym1.add_route(2, "speaker", 0.2); - ym1.add_route(3, "speaker", 0.4); + ym1.add_route(0, "speaker", 0.1); + ym1.add_route(1, "speaker", 0.1); + ym1.add_route(2, "speaker", 0.1); + ym1.add_route(3, "speaker", 0.2); } void terracre_state::amazon_base(machine_config &config) diff --git a/src/mame/drivers/xyonix.cpp b/src/mame/drivers/xyonix.cpp index 6f9b63a142f..48bb8e053d7 100644 --- a/src/mame/drivers/xyonix.cpp +++ b/src/mame/drivers/xyonix.cpp @@ -430,8 +430,8 @@ void xyonix_state::xyonix(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - SN76496(config, "sn1", 16000000/4).add_route(ALL_OUTPUTS, "mono", 1.0); - SN76496(config, "sn2", 16000000/4).add_route(ALL_OUTPUTS, "mono", 1.0); + SN76496(config, "sn1", 16000000/4).add_route(ALL_OUTPUTS, "mono", 0.5); + SN76496(config, "sn2", 16000000/4).add_route(ALL_OUTPUTS, "mono", 0.5); } /* ROM Loading ***************************************************************/ diff --git a/src/mame/includes/astrocde.h b/src/mame/includes/astrocde.h index fe42331227b..ad3b786df8b 100644 --- a/src/mame/includes/astrocde.h +++ b/src/mame/includes/astrocde.h @@ -41,6 +41,7 @@ public: m_maincpu(*this, "maincpu"), m_votrax(*this, "votrax"), m_astrocade_sound1(*this, "astrocade1"), + m_astrocade_sound2(*this, "astrocade2"), m_videoram(*this, "videoram"), m_protected_ram(*this, "protected_ram"), m_nvram(*this, "nvram"), @@ -56,6 +57,7 @@ public: required_device m_maincpu; optional_device m_votrax; optional_device m_astrocade_sound1; + optional_device m_astrocade_sound2; optional_shared_ptr m_videoram; optional_shared_ptr m_protected_ram; optional_shared_ptr m_nvram; -- cgit v1.2.3