mirror of
https://github.com/holub/mame
synced 2025-05-31 18:11:50 +03:00
magmax,terracre,opwolf: remove obsolete mixer device now that multiple sound outputs can be sent to a sound device single input (probably can be done to other drivers too, i only did arcade games)
This commit is contained in:
parent
99fc7b2c7f
commit
180365dc10
@ -35,7 +35,6 @@ Stephh's notes (based on the game M68000 code and some tests) :
|
||||
#include "machine/timer.h"
|
||||
#include "sound/ay8910.h"
|
||||
#include "sound/flt_biquad.h"
|
||||
#include "sound/mixer.h"
|
||||
|
||||
#include "emupal.h"
|
||||
#include "screen.h"
|
||||
@ -68,7 +67,6 @@ public:
|
||||
, m_maincpu(*this, "maincpu")
|
||||
, m_audiocpu(*this, "audiocpu")
|
||||
, m_ay(*this, "ay%u", 0U)
|
||||
, m_aymixer(*this, "aymixer%u", 0U)
|
||||
, m_ayfilter(*this, "ayfilter%u", 0U)
|
||||
, m_soundlatch(*this, "soundlatch")
|
||||
, m_gfxdecode(*this, "gfxdecode")
|
||||
@ -92,7 +90,6 @@ private:
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<cpu_device> m_audiocpu;
|
||||
required_device_array<ay8910_device, 3> m_ay;
|
||||
required_device_array<mixer_device, 3> m_aymixer;
|
||||
required_device_array<filter_biquad_device, 4> m_ayfilter;
|
||||
required_device<generic_latch_8_device> m_soundlatch;
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
@ -620,26 +617,22 @@ void magmax_state::magmax(machine_config &config)
|
||||
FILTER_BIQUAD(config, m_ayfilter[3]).opamp_mfb_lowpass_setup(RES_K(33), 0.0, RES_K(150), 0.0, CAP_P(330));
|
||||
m_ayfilter[3]->add_route(ALL_OUTPUTS, "speaker", 1.0); // <- gain here is controlled by m_ay[0] IOA3 and resistor R34
|
||||
|
||||
MIXER(config, m_aymixer[0]).add_route(0, m_ayfilter[1], 1.0);
|
||||
MIXER(config, m_aymixer[1]).add_route(0, m_ayfilter[2], 1.0);
|
||||
MIXER(config, m_aymixer[2]).add_route(0, m_ayfilter[3], 1.0);
|
||||
|
||||
AY8910(config, m_ay[0], XTAL(20'000'000) / 16); // @20G verified on PCB and schematics
|
||||
m_ay[0]->port_a_write_callback().set(FUNC(magmax_state::ay8910_porta_0_w));
|
||||
m_ay[0]->port_b_write_callback().set(FUNC(magmax_state::ay8910_portb_0_w));
|
||||
m_ay[0]->add_route(0, m_ayfilter[0], 1.0);
|
||||
m_ay[0]->add_route(1, m_aymixer[0], 1.0);
|
||||
m_ay[0]->add_route(2, m_aymixer[0], 1.0);
|
||||
m_ay[0]->add_route(1, m_ayfilter[1], 1.0);
|
||||
m_ay[0]->add_route(2, m_ayfilter[1], 1.0);
|
||||
|
||||
AY8910(config, m_ay[1], XTAL(20'000'000) / 16); // @18G verified on PCB and schematics
|
||||
m_ay[1]->add_route(0, m_aymixer[0], 1.0);
|
||||
m_ay[1]->add_route(1, m_aymixer[0], 1.0);
|
||||
m_ay[1]->add_route(2, m_aymixer[1], 1.0);
|
||||
m_ay[1]->add_route(0, m_ayfilter[1], 1.0);
|
||||
m_ay[1]->add_route(1, m_ayfilter[1], 1.0);
|
||||
m_ay[1]->add_route(2, m_ayfilter[2], 1.0);
|
||||
|
||||
AY8910(config, m_ay[2], XTAL(20'000'000) / 16); // @16G verified on PCB and schematics
|
||||
m_ay[2]->add_route(0, m_aymixer[1], 1.0);
|
||||
m_ay[2]->add_route(1, m_aymixer[2], 1.0);
|
||||
m_ay[2]->add_route(2, m_aymixer[2], 1.0);
|
||||
m_ay[2]->add_route(0, m_ayfilter[2], 1.0);
|
||||
m_ay[2]->add_route(1, m_ayfilter[3], 1.0);
|
||||
m_ay[2]->add_route(2, m_ayfilter[3], 1.0);
|
||||
|
||||
GENERIC_LATCH_8(config, m_soundlatch);
|
||||
m_soundlatch->data_pending_callback().set_inputline(m_audiocpu, 0);
|
||||
|
@ -93,7 +93,6 @@ AT-2
|
||||
#include "machine/rescap.h"
|
||||
#include "sound/dac.h"
|
||||
#include "sound/flt_biquad.h"
|
||||
#include "sound/mixer.h"
|
||||
#include "sound/ymopn.h"
|
||||
#include "sound/ymopl.h"
|
||||
#include "video/bufsprite.h"
|
||||
@ -120,7 +119,6 @@ public:
|
||||
, m_dacfilter1(*this, "dacfilter1")
|
||||
, m_dacfilter2(*this, "dacfilter2")
|
||||
, m_ymfilter(*this, "ymfilter")
|
||||
, m_ssgmixer(*this, "ssgmixer")
|
||||
, m_ssgfilter_cfilt(*this, "ssg_cfilt")
|
||||
, m_ssgfilter_cgain(*this, "ssg_cgain")
|
||||
, m_ssgfilter_abgain(*this, "ssg_abgain")
|
||||
@ -151,7 +149,6 @@ private:
|
||||
required_device<filter_biquad_device> m_dacfilter1;
|
||||
required_device<filter_biquad_device> m_dacfilter2;
|
||||
required_device<filter_biquad_device> m_ymfilter;
|
||||
optional_device<mixer_device> m_ssgmixer;
|
||||
optional_device<filter_biquad_device> m_ssgfilter_cfilt;
|
||||
optional_device<filter_biquad_device> m_ssgfilter_cgain;
|
||||
optional_device<filter_biquad_device> m_ssgfilter_abgain;
|
||||
@ -877,16 +874,13 @@ void terracre_state::ym2203(machine_config &config)
|
||||
FILTER_BIQUAD(config, m_ssgfilter_abgain).opamp_mfb_lowpass_setup(RES_K(33), 0.0, RES_K(150), 0.0, CAP_N(100)/10000.0);
|
||||
m_ssgfilter_abgain->add_route(ALL_OUTPUTS, "speaker", 1.0);
|
||||
|
||||
MIXER(config, m_ssgmixer);
|
||||
m_ssgmixer->add_route(0, m_ssgfilter_abgain, 0.022219);
|
||||
|
||||
// HACK: there is still something not right about the volumes of the SSG channels
|
||||
// from the YM2203 relative to the others, so I'm multiplying them by a factor here.
|
||||
// Once this is converted to a netlist, this can likely be removed.
|
||||
double constexpr ssg_hack_factor = 1.333;
|
||||
ym2203_device &ym1(YM2203(config, "ym1", XTAL(16'000'000) / 4)); // 4MHz verified on PCB
|
||||
ym1.add_route(0, m_ssgmixer, 1.0 * ssg_hack_factor); // SSG A
|
||||
ym1.add_route(1, m_ssgmixer, 1.0 * ssg_hack_factor); // SSG B
|
||||
ym1.add_route(0, m_ssgfilter_abgain, 0.022219 * ssg_hack_factor); // SSG A
|
||||
ym1.add_route(1, m_ssgfilter_abgain, 0.022219 * ssg_hack_factor); // SSG B
|
||||
ym1.add_route(2, m_ssgfilter_cfilt, 0.033666 * ssg_hack_factor); // SSG C
|
||||
ym1.add_route(3, m_ymfilter, 0.241517); // FM
|
||||
|
||||
|
@ -279,7 +279,6 @@ register. So what is controlling priority.
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "machine/timer.h"
|
||||
#include "sound/mixer.h"
|
||||
#include "sound/msm5205.h"
|
||||
#include "sound/ymopm.h"
|
||||
|
||||
@ -881,7 +880,8 @@ void opwolf_state::opwolf(machine_config &config)
|
||||
ym2151_device &ymsnd(YM2151(config, "ymsnd", 8_MHz_XTAL / 2)); /* 4 MHz */
|
||||
ymsnd.irq_handler().set_inputline(m_audiocpu, 0);
|
||||
ymsnd.port_write_handler().set_membank(m_z80bank).mask(0x03);
|
||||
ymsnd.add_route(ALL_OUTPUTS, "mixer", 0.35);
|
||||
ymsnd.add_route(ALL_OUTPUTS, m_tc0060dca[1], 0.35, 0);
|
||||
ymsnd.add_route(ALL_OUTPUTS, m_tc0060dca[1], 0.35, 1);
|
||||
|
||||
MSM5205(config, m_msm[0], 384_kHz_XTAL);
|
||||
m_msm[0]->vck_legacy_callback().set(FUNC(opwolf_state::msm5205_vck_w<0>));
|
||||
@ -894,11 +894,8 @@ void opwolf_state::opwolf(machine_config &config)
|
||||
m_msm[1]->add_route(0, m_tc0060dca[0], 1.0, 1);
|
||||
|
||||
TC0060DCA(config, m_tc0060dca[0]);
|
||||
m_tc0060dca[0]->add_route(ALL_OUTPUTS, "mixer", 1.0);
|
||||
|
||||
mixer_device &mixer = MIXER(config, "mixer");
|
||||
mixer.add_route(0, m_tc0060dca[1], 1.0, 0);
|
||||
mixer.add_route(0, m_tc0060dca[1], 1.0, 1);
|
||||
m_tc0060dca[0]->add_route(ALL_OUTPUTS, m_tc0060dca[1], 1.0, 0);
|
||||
m_tc0060dca[0]->add_route(ALL_OUTPUTS, m_tc0060dca[1], 1.0, 1);
|
||||
|
||||
TC0060DCA(config, m_tc0060dca[1]);
|
||||
m_tc0060dca[1]->add_route(0, "speaker", 1.0, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user