diff --git a/src/emu/bus/a2bus/a2alfam2.c b/src/emu/bus/a2bus/a2alfam2.c index e55b43f773b..12e4d25ab1b 100644 --- a/src/emu/bus/a2bus/a2alfam2.c +++ b/src/emu/bus/a2bus/a2alfam2.c @@ -27,43 +27,32 @@ const device_type A2BUS_AESMS = &device_creator; #define SN3_TAG "sn76489_3" // right #define SN4_TAG "sn76489_4" // center? -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - MACHINE_CONFIG_FRAGMENT( a2alfam2 ) MCFG_SPEAKER_STANDARD_STEREO("alf_l", "alf_r") + MCFG_SOUND_ADD(SN1_TAG, SN76489, 1020484) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "alf_l", 0.50) MCFG_SOUND_ADD(SN2_TAG, SN76489, 1020484) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "alf_l", 0.50) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "alf_r", 0.50) MCFG_SOUND_ADD(SN3_TAG, SN76489, 1020484) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "alf_r", 0.50) MACHINE_CONFIG_END MACHINE_CONFIG_FRAGMENT( a2aesms ) MCFG_SPEAKER_STANDARD_STEREO("alf_l", "alf_r") + MCFG_SOUND_ADD(SN1_TAG, SN76489, 1020484) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "alf_l", 0.50) + MCFG_SOUND_ADD(SN2_TAG, SN76489, 1020484) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "alf_l", 0.50) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "alf_r", 0.50) + MCFG_SOUND_ADD(SN3_TAG, SN76489, 1020484) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "alf_r", 0.50) + MCFG_SOUND_ADD(SN4_TAG, SN76489, 1020484) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "alf_l", 0.50) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "alf_r", 0.50) MACHINE_CONFIG_END diff --git a/src/emu/sound/sn76496.c b/src/emu/sound/sn76496.c index 47889acd5bf..6e285ac7e0d 100644 --- a/src/emu/sound/sn76496.c +++ b/src/emu/sound/sn76496.c @@ -128,14 +128,15 @@ sn76496_base_device::sn76496_base_device(const machine_config &mconfig, device_t device_t *owner, UINT32 clock, const char *shortname, const char *source) : device_t(mconfig, type, name, tag, owner, clock, shortname, source), - device_sound_interface(mconfig, *this), - m_feedback_mask(feedbackmask), - m_whitenoise_tap1(noisetap1), - m_whitenoise_tap2(noisetap2), - m_negate(negate), - m_stereo(stereo), - m_clock_divider(clockdivider), - m_freq0_is_max(freq0) + device_sound_interface(mconfig, *this), + m_ready_handler(*this), + m_feedback_mask(feedbackmask), + m_whitenoise_tap1(noisetap1), + m_whitenoise_tap2(noisetap2), + m_negate(negate), + m_stereo(stereo), + m_clock_divider(clockdivider), + m_freq0_is_max(freq0) { } @@ -146,8 +147,7 @@ void sn76496_base_device::device_start() double out; int gain; - const sn76496_config *conf = reinterpret_cast(static_config()); - m_ready.resolve(conf->ready, *this); + m_ready_handler.resolve_safe(); m_sound = machine().sound().stream_alloc(*this, 0, (m_stereo? 2:1), sample_rate, this); @@ -200,13 +200,6 @@ void sn76496_base_device::device_start() register_for_save_states(); } -READ_LINE_MEMBER( sn76496_base_device::ready_r ) -{ - if (started()) - m_sound->update(); - return (m_cycles_to_ready > 0)? FALSE : TRUE; -} - WRITE8_MEMBER( sn76496_base_device::stereo_w ) { m_sound->update(); @@ -295,12 +288,12 @@ void sn76496_base_device::countdown_cycles() if (m_cycles_to_ready > 0) { m_cycles_to_ready--; - if (m_ready_state==true) m_ready(CLEAR_LINE); + if (m_ready_state==true) m_ready_handler(CLEAR_LINE); m_ready_state = false; } else { - if (m_ready_state==false) m_ready(ASSERT_LINE); + if (m_ready_state==false) m_ready_handler(ASSERT_LINE); m_ready_state = true; } } diff --git a/src/emu/sound/sn76496.h b/src/emu/sound/sn76496.h index a6f7c4569f8..036ec955932 100644 --- a/src/emu/sound/sn76496.h +++ b/src/emu/sound/sn76496.h @@ -15,10 +15,8 @@ extern const device_type NCR7496; extern const device_type GAMEGEAR; extern const device_type SEGAPSG; -struct sn76496_config -{ - devcb_write_line ready; -}; +#define MCFG_SN76496_READY_HANDLER(_devcb) \ + devcb = &sn76496_base_device::set_ready_handler(*device, DEVCB2_##_devcb); class sn76496_base_device : public device_t, public device_sound_interface { @@ -26,7 +24,10 @@ public: sn76496_base_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, int feedbackmask, int noisetap1, int noisetap2, bool negate, bool stereo, int clockdivider, int freq0, device_t *owner, UINT32 clock, const char *shortname, const char *source); - DECLARE_READ_LINE_MEMBER( ready_r ); + + // static configuration helpers + template static devcb2_base &set_ready_handler(device_t &device, _Object object) { return downcast(device).m_ready_handler.set_callback(object); } + DECLARE_WRITE8_MEMBER( stereo_w ); void write(UINT8 data); DECLARE_WRITE8_MEMBER( write ); @@ -42,7 +43,7 @@ private: bool m_ready_state; - devcb_resolved_write_line m_ready; + devcb2_write_line m_ready_handler; sound_stream* m_sound; diff --git a/src/mame/audio/qix.c b/src/mame/audio/qix.c index 20cac2f1bb4..a926eb86fa6 100644 --- a/src/mame/audio/qix.c +++ b/src/mame/audio/qix.c @@ -161,16 +161,6 @@ ADDRESS_MAP_END -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - /************************************* * * Machine drivers @@ -223,9 +213,7 @@ MACHINE_CONFIG_FRAGMENT( slither_audio ) MCFG_SOUND_ADD("sn1", SN76489, SLITHER_CLOCK_OSC/4/4) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("sn2", SN76489, SLITHER_CLOCK_OSC/4/4) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) - MCFG_SOUND_CONFIG(psg_intf) MACHINE_CONFIG_END diff --git a/src/mame/drivers/appoooh.c b/src/mame/drivers/appoooh.c index d698da8b5e0..8d43454b919 100644 --- a/src/mame/drivers/appoooh.c +++ b/src/mame/drivers/appoooh.c @@ -390,16 +390,6 @@ static const msm5205_interface msm5205_config = }; -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - /************************************* * @@ -442,15 +432,12 @@ static MACHINE_CONFIG_START( appoooh_common, appoooh_state ) MCFG_SOUND_ADD("sn1", SN76489, 18432000/6) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("sn2", SN76489, 18432000/6) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("sn3", SN76489, 18432000/6) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("msm", MSM5205, 384000) MCFG_SOUND_CONFIG(msm5205_config) diff --git a/src/mame/drivers/atetris.c b/src/mame/drivers/atetris.c index 27252f3c46a..ade94c5393d 100644 --- a/src/mame/drivers/atetris.c +++ b/src/mame/drivers/atetris.c @@ -316,15 +316,6 @@ static const pokey_interface pokey_interface_2 = DEVCB_INPUT_PORT("IN1") }; -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - /************************************* * * Machine driver @@ -387,15 +378,12 @@ static MACHINE_CONFIG_START( atetrisb2, atetris_state ) MCFG_SOUND_ADD("sn1", SN76496, BOOTLEG_CLOCK/8) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("sn2", SN76496, BOOTLEG_CLOCK/8) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("sn3", SN76496, BOOTLEG_CLOCK/8) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) - MCFG_SOUND_CONFIG(psg_intf) MACHINE_CONFIG_END diff --git a/src/mame/drivers/bankp.c b/src/mame/drivers/bankp.c index 4a229b20224..94d289b640f 100644 --- a/src/mame/drivers/bankp.c +++ b/src/mame/drivers/bankp.c @@ -267,15 +267,6 @@ static GFXDECODE_START( bankp ) GFXDECODE_ENTRY( "gfx2", 0, charlayout2, 32*4, 16 ) GFXDECODE_END -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - /************************************* * * Machine driver @@ -317,15 +308,12 @@ static MACHINE_CONFIG_START( bankp, bankp_state ) MCFG_SOUND_ADD("sn1", SN76489, MASTER_CLOCK/6) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("sn2", SN76489, MASTER_CLOCK/6) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("sn3", SN76489, MASTER_CLOCK/6) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - MCFG_SOUND_CONFIG(psg_intf) MACHINE_CONFIG_END diff --git a/src/mame/drivers/centiped.c b/src/mame/drivers/centiped.c index 43191242c6e..854dd708350 100644 --- a/src/mame/drivers/centiped.c +++ b/src/mame/drivers/centiped.c @@ -1725,16 +1725,6 @@ static const pokey_interface warlords_pokey_interface = }; -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - /************************************* * * Machine drivers @@ -1921,7 +1911,6 @@ static MACHINE_CONFIG_START( bullsdrt, centiped_state ) MCFG_SOUND_ADD("snsnd", SN76496, 12096000/8) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - MCFG_SOUND_CONFIG(psg_intf) MACHINE_CONFIG_END diff --git a/src/mame/drivers/circusc.c b/src/mame/drivers/circusc.c index 1cbc22c9458..e289a24cc29 100644 --- a/src/mame/drivers/circusc.c +++ b/src/mame/drivers/circusc.c @@ -291,23 +291,6 @@ static GFXDECODE_START( circusc ) GFXDECODE_END -/************************************* - * - * Sound interface - * - *************************************/ - - -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - static const discrete_mixer_desc circusc_mixer_desc = {DISC_MIXER_IS_RESISTOR, {RES_K(2.2), RES_K(2.2), RES_K(10)}, @@ -372,11 +355,9 @@ static MACHINE_CONFIG_START( circusc, circusc_state ) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("sn1", SN76496, XTAL_14_31818MHz/8) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ROUTE_EX(0, "fltdisc", 1.0, 0) MCFG_SOUND_ADD("sn2", SN76496, XTAL_14_31818MHz/8) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ROUTE_EX(0, "fltdisc", 1.0, 1) MCFG_DAC_ADD("dac") diff --git a/src/mame/drivers/docastle.c b/src/mame/drivers/docastle.c index 5c36c7e5122..681300238da 100644 --- a/src/mame/drivers/docastle.c +++ b/src/mame/drivers/docastle.c @@ -589,16 +589,6 @@ static const msm5205_interface msm5205_config = }; -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - /* Machine Drivers */ void docastle_state::machine_reset() @@ -658,19 +648,15 @@ static MACHINE_CONFIG_START( docastle, docastle_state ) MCFG_SOUND_ADD("sn1", SN76489A, XTAL_4MHz) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("sn2", SN76489A, XTAL_4MHz) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("sn3", SN76489A, XTAL_4MHz) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("sn4", SN76489A, XTAL_4MHz) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) - MCFG_SOUND_CONFIG(psg_intf) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( dorunrun, docastle ) diff --git a/src/mame/drivers/drmicro.c b/src/mame/drivers/drmicro.c index c3a91e4259d..347b4b91903 100644 --- a/src/mame/drivers/drmicro.c +++ b/src/mame/drivers/drmicro.c @@ -218,16 +218,6 @@ static const msm5205_interface msm5205_config = }; -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - /************************************* * * Machine driver @@ -277,15 +267,12 @@ static MACHINE_CONFIG_START( drmicro, drmicro_state ) MCFG_SOUND_ADD("sn1", SN76496, MCLK/4) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("sn2", SN76496, MCLK/4) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("sn3", SN76496, MCLK/4) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("msm", MSM5205, 384000) MCFG_SOUND_CONFIG(msm5205_config) diff --git a/src/mame/drivers/ecoinf3.c b/src/mame/drivers/ecoinf3.c index 873abdb3dad..43d83e250e3 100644 --- a/src/mame/drivers/ecoinf3.c +++ b/src/mame/drivers/ecoinf3.c @@ -742,12 +742,6 @@ MACHINE_START_MEMBER(ecoinf3_state,ecoinf3) } } -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - static MACHINE_CONFIG_START( ecoinf3_pyramid, ecoinf3_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z180,8000000) // certainly not a plain z80 at least, invalid opcodes for that @@ -764,7 +758,6 @@ static MACHINE_CONFIG_START( ecoinf3_pyramid, ecoinf3_state ) MCFG_SOUND_ADD("sn1", SN76489, 4000000) // no idea what the sound chip is, this sounds terrible MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30) - MCFG_SOUND_CONFIG(psg_intf) MCFG_I8255_ADD( "ppi8255_a", ppi8255_intf_a ) MCFG_I8255_ADD( "ppi8255_b", ppi8255_intf_b ) diff --git a/src/mame/drivers/exedexes.c b/src/mame/drivers/exedexes.c index f5e15e3dadf..98de5e9954e 100644 --- a/src/mame/drivers/exedexes.c +++ b/src/mame/drivers/exedexes.c @@ -195,16 +195,6 @@ static GFXDECODE_START( exedexes ) GFXDECODE_END -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - void exedexes_state::machine_start() { save_item(NAME(m_chon)); @@ -256,11 +246,9 @@ static MACHINE_CONFIG_START( exedexes, exedexes_state ) MCFG_SOUND_ADD("sn1", SN76489, 3000000) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.36) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("sn2", SN76489, 3000000) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.36) - MCFG_SOUND_CONFIG(psg_intf) MACHINE_CONFIG_END diff --git a/src/mame/drivers/finalizr.c b/src/mame/drivers/finalizr.c index 15a3a3f498e..87935d4fec0 100644 --- a/src/mame/drivers/finalizr.c +++ b/src/mame/drivers/finalizr.c @@ -232,23 +232,6 @@ static GFXDECODE_START( finalizr ) GFXDECODE_END -/************************************* - * - * Sound interface - * - *************************************/ - - -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - void finalizr_state::machine_start() { save_item(NAME(m_spriterambank)); @@ -296,7 +279,6 @@ static MACHINE_CONFIG_START( finalizr, finalizr_state ) MCFG_SOUND_ADD("snsnd", SN76489A, XTAL_18_432MHz/12) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) - MCFG_SOUND_CONFIG(psg_intf) MCFG_DAC_ADD("dac") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.65) diff --git a/src/mame/drivers/freekick.c b/src/mame/drivers/freekick.c index a698071b29f..f83f136f183 100644 --- a/src/mame/drivers/freekick.c +++ b/src/mame/drivers/freekick.c @@ -540,16 +540,6 @@ static I8255A_INTERFACE( ppi8255_1_intf ) }; -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - /************************************* * * Graphics definitions @@ -656,19 +646,15 @@ static MACHINE_CONFIG_START( base, freekick_state ) MCFG_SOUND_ADD("sn1", SN76489A, XTAL_12MHz/4) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("sn2", SN76489A, XTAL_12MHz/4) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("sn3", SN76489A, XTAL_12MHz/4) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("sn4", SN76489A, XTAL_12MHz/4) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) - MCFG_SOUND_CONFIG(psg_intf) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( pbillrd, base ) diff --git a/src/mame/drivers/galaxold.c b/src/mame/drivers/galaxold.c index 917123bf138..1cda3560621 100644 --- a/src/mame/drivers/galaxold.c +++ b/src/mame/drivers/galaxold.c @@ -2315,18 +2315,6 @@ static GFXDECODE_START( _4in1 ) GFXDECODE_END -/************************************* - * - * Sound interface - * - *************************************/ - -static const sn76496_config racknrol_sn76496_config = -{ - DEVCB_NULL -}; - - static const ay8910_interface bongo_ay8910_interface = { AY8910_LEGACY_OUTPUT, @@ -2634,7 +2622,6 @@ static MACHINE_CONFIG_START( racknrol, galaxold_state ) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("snsnd", SN76489A, PIXEL_CLOCK/2) // SN76489AN MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - MCFG_SOUND_CONFIG(racknrol_sn76496_config) MACHINE_CONFIG_END @@ -2660,7 +2647,6 @@ static MACHINE_CONFIG_START( hexpoola, galaxold_state ) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("snsnd", SN76496, PIXEL_CLOCK/2) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - MCFG_SOUND_CONFIG(racknrol_sn76496_config) MACHINE_CONFIG_END diff --git a/src/mame/drivers/gatron.c b/src/mame/drivers/gatron.c index e9427cf60df..05a87ad13e9 100644 --- a/src/mame/drivers/gatron.c +++ b/src/mame/drivers/gatron.c @@ -545,16 +545,6 @@ static GFXDECODE_START( gat ) GFXDECODE_END -/****************************** -* sn76496_config psg_intf * -******************************/ - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - /************************* * Machine Drivers * *************************/ @@ -586,7 +576,6 @@ static MACHINE_CONFIG_START( gat, gatron_state ) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("snsnd", SN76496, MASTER_CLOCK/8 ) /* 2 MHz, guess */ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 2.00) - MCFG_SOUND_CONFIG(psg_intf) MACHINE_CONFIG_END diff --git a/src/mame/drivers/gberet.c b/src/mame/drivers/gberet.c index 8b5e815c8ff..aa8026fe36a 100644 --- a/src/mame/drivers/gberet.c +++ b/src/mame/drivers/gberet.c @@ -377,23 +377,6 @@ static GFXDECODE_START( gberetb ) GFXDECODE_END -/************************************* - * - * Sound interface - * - *************************************/ - - -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - /************************************* * * Machine drivers @@ -443,7 +426,6 @@ static MACHINE_CONFIG_START( gberet, gberet_state ) MCFG_SOUND_ADD("snsnd", SN76489A, XTAL_18_432MHz/12) /* type verified on real and bootleg pcb */ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - MCFG_SOUND_CONFIG(psg_intf) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( mrgoemon, gberet ) @@ -483,7 +465,6 @@ static MACHINE_CONFIG_START( gberetb, gberet_state ) MCFG_SOUND_ADD("snsnd", SN76489A, XTAL_20MHz/12) // divider guessed MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - MCFG_SOUND_CONFIG(psg_intf) MACHINE_CONFIG_END diff --git a/src/mame/drivers/goldstar.c b/src/mame/drivers/goldstar.c index 8d4001b10ef..35a22fe343d 100644 --- a/src/mame/drivers/goldstar.c +++ b/src/mame/drivers/goldstar.c @@ -6210,26 +6210,6 @@ static const ay8910_interface ladylinr_ay8910_config = }; -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - -static const sn76496_config psg2_intf = -{ - DEVCB_NULL -}; - -static const sn76496_config psg3_intf = -{ - DEVCB_NULL -}; - - static MACHINE_CONFIG_START( goldstar, goldstar_state ) /* basic machine hardware */ @@ -6423,7 +6403,6 @@ static MACHINE_CONFIG_START( chrygld, goldstar_state ) MCFG_SOUND_ADD("snsnd", SN76489, PSG_CLOCK) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("aysnd", AY8910, AY_CLOCK) MCFG_SOUND_CONFIG(ay8910_config) @@ -6465,7 +6444,6 @@ static MACHINE_CONFIG_START( cb3c, goldstar_state ) MCFG_SOUND_ADD("snsnd", SN76489, PSG_CLOCK) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("aysnd", AY8910, AY_CLOCK) MCFG_SOUND_CONFIG(ay8910_config) @@ -6507,7 +6485,6 @@ static MACHINE_CONFIG_START( ncb3, goldstar_state ) MCFG_SOUND_ADD("snsnd", SN76489, PSG_CLOCK) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("aysnd", AY8910, AY_CLOCK) MCFG_SOUND_CONFIG(ay8910_config) @@ -6663,7 +6640,6 @@ static MACHINE_CONFIG_START( lucky8, goldstar_state ) MCFG_SOUND_ADD("snsnd", SN76489, PSG_CLOCK) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("aysnd", AY8910, AY_CLOCK) MCFG_SOUND_CONFIG(lucky8_ay8910_config) @@ -6703,7 +6679,6 @@ static MACHINE_CONFIG_START( bingowng, goldstar_state ) MCFG_SOUND_ADD("snsnd", SN76489, PSG_CLOCK) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("aysnd", AY8910, AY_CLOCK) MCFG_SOUND_CONFIG(lucky8_ay8910_config) @@ -6743,7 +6718,6 @@ static MACHINE_CONFIG_START( bingownga, goldstar_state ) MCFG_SOUND_ADD("snsnd", SN76489, PSG_CLOCK) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("aysnd", AY8910, AY_CLOCK) MCFG_SOUND_CONFIG(lucky8_ay8910_config) @@ -6800,7 +6774,6 @@ static MACHINE_CONFIG_START( magodds, goldstar_state ) MCFG_SOUND_ADD("snsnd", SN76489, PSG_CLOCK) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.00) // shut up annoying whine - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("aysnd", AY8910, AY_CLOCK) MCFG_SOUND_CONFIG(lucky8_ay8910_config) @@ -6841,7 +6814,6 @@ static MACHINE_CONFIG_START( kkotnoli, goldstar_state ) MCFG_SOUND_ADD("snsnd", SN76489, PSG_CLOCK) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80) - MCFG_SOUND_CONFIG(psg_intf) MACHINE_CONFIG_END @@ -6878,7 +6850,6 @@ static MACHINE_CONFIG_START( ladylinr, goldstar_state ) MCFG_SOUND_ADD("snsnd", SN76489, PSG_CLOCK) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("aysnd", AY8910, AY_CLOCK) MCFG_SOUND_CONFIG(ladylinr_ay8910_config) @@ -6919,7 +6890,6 @@ static MACHINE_CONFIG_START( wcat3, goldstar_state ) MCFG_SOUND_ADD("snsnd", SN76489, PSG_CLOCK) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("aysnd", AY8910, AY_CLOCK) MCFG_SOUND_CONFIG(lucky8_ay8910_config) @@ -7188,15 +7158,12 @@ static MACHINE_CONFIG_START( megaline, goldstar_state ) MCFG_SOUND_ADD("sn1", SN76489, PSG_CLOCK) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("sn2", SN76489, PSG_CLOCK) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80) - MCFG_SOUND_CONFIG(psg2_intf) MCFG_SOUND_ADD("sn3", SN76489, PSG_CLOCK) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80) - MCFG_SOUND_CONFIG(psg3_intf) MCFG_SOUND_ADD("aysnd", AY8910, AY_CLOCK) MCFG_SOUND_CONFIG(lucky8_ay8910_config) diff --git a/src/mame/drivers/guab.c b/src/mame/drivers/guab.c index da8a169e044..ac1644243ea 100644 --- a/src/mame/drivers/guab.c +++ b/src/mame/drivers/guab.c @@ -775,23 +775,6 @@ static INPUT_PORTS_START( tenup ) INPUT_PORTS_END -/************************************* - * - * Sound interface - * - *************************************/ - - -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - /************************************* * * Machine driver @@ -831,7 +814,6 @@ static MACHINE_CONFIG_START( guab, guab_state ) /* TODO: Verify clock */ MCFG_SOUND_ADD("snsnd", SN76489, 2000000) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) - MCFG_SOUND_CONFIG(psg_intf) /* 6840 PTM */ MCFG_PTM6840_ADD("6840ptm", ptm_intf) diff --git a/src/mame/drivers/homedata.c b/src/mame/drivers/homedata.c index 5dd4b4624fb..4332492e759 100644 --- a/src/mame/drivers/homedata.c +++ b/src/mame/drivers/homedata.c @@ -1121,23 +1121,6 @@ static GFXDECODE_START( lemnangl ) GFXDECODE_END -/************************************* - * - * Sound interface - * - *************************************/ - - -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - MACHINE_START_MEMBER(homedata_state,homedata) { m_sn = machine().device("snsnd"); @@ -1268,7 +1251,6 @@ static MACHINE_CONFIG_START( mrokumei, homedata_state ) MCFG_SOUND_ADD("snsnd", SN76489A, 16000000/4) // SN76489AN actually MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) - MCFG_SOUND_CONFIG(psg_intf) MCFG_DAC_ADD("dac") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) @@ -1385,7 +1367,6 @@ static MACHINE_CONFIG_START( pteacher, homedata_state ) MCFG_SOUND_ADD("snsnd", SN76489A, 16000000/4) // SN76489AN actually MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) - MCFG_SOUND_CONFIG(psg_intf) MCFG_DAC_ADD("dac") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) diff --git a/src/mame/drivers/hyperspt.c b/src/mame/drivers/hyperspt.c index 44503803653..3e29f5dca75 100644 --- a/src/mame/drivers/hyperspt.c +++ b/src/mame/drivers/hyperspt.c @@ -287,15 +287,6 @@ INTERRUPT_GEN_MEMBER(hyperspt_state::vblank_irq) device.execute().set_input_line(0, HOLD_LINE); } -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - static MACHINE_CONFIG_START( hyperspt, hyperspt_state ) /* basic machine hardware */ @@ -330,7 +321,6 @@ static MACHINE_CONFIG_START( hyperspt, hyperspt_state ) MCFG_SOUND_ADD("snsnd", SN76496, XTAL_14_31818MHz/8) /* verified on pcb */ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("vlm", VLM5030, XTAL_3_579545MHz) /* verified on pcb */ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) diff --git a/src/mame/drivers/ikki.c b/src/mame/drivers/ikki.c index fa9f0539893..b5e60e6c6c9 100644 --- a/src/mame/drivers/ikki.c +++ b/src/mame/drivers/ikki.c @@ -201,23 +201,6 @@ static GFXDECODE_START( ikki ) GFXDECODE_END -/************************************* - * - * Sound definitions - * - *************************************/ - - -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - /************************************* * * Machine driver @@ -283,11 +266,9 @@ static MACHINE_CONFIG_START( ikki, ikki_state ) MCFG_SOUND_ADD("sn1", SN76496, 8000000/4) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("sn2", SN76496, 8000000/2) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) - MCFG_SOUND_CONFIG(psg_intf) MACHINE_CONFIG_END diff --git a/src/mame/drivers/jailbrek.c b/src/mame/drivers/jailbrek.c index 06ce1f0e0c6..7eedb27bceb 100644 --- a/src/mame/drivers/jailbrek.c +++ b/src/mame/drivers/jailbrek.c @@ -229,23 +229,6 @@ static GFXDECODE_START( jailbrek ) GFXDECODE_END -/************************************* - * - * Sound definitions - * - *************************************/ - - -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - void jailbrek_state::machine_start() { save_item(NAME(m_irq_enable)); @@ -281,7 +264,6 @@ static MACHINE_CONFIG_START( jailbrek, jailbrek_state ) MCFG_SOUND_ADD("snsnd", SN76489A, MASTER_CLOCK/12) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("vlm", VLM5030, VOICE_CLOCK) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) diff --git a/src/mame/drivers/jantotsu.c b/src/mame/drivers/jantotsu.c index 36500ccb30b..18e458d46e7 100644 --- a/src/mame/drivers/jantotsu.c +++ b/src/mame/drivers/jantotsu.c @@ -473,16 +473,6 @@ static const msm5205_interface msm5205_config = }; -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - /************************************* * * Machine driver @@ -537,11 +527,9 @@ static MACHINE_CONFIG_START( jantotsu, jantotsu_state ) MCFG_SOUND_ADD("sn1", SN76489A, MAIN_CLOCK/4) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("sn2", SN76489A, MAIN_CLOCK/4) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("adpcm", MSM5205, XTAL_384kHz) MCFG_SOUND_CONFIG(msm5205_config) diff --git a/src/mame/drivers/jpmmps.c b/src/mame/drivers/jpmmps.c index ea50f9c27ee..4b57a6ed2d9 100644 --- a/src/mame/drivers/jpmmps.c +++ b/src/mame/drivers/jpmmps.c @@ -196,22 +196,6 @@ static const tms9902_interface tms9902_uart2_ic5_params = #define DUART_CLOCK 2000000 -/************************************* - * - * Sound interface - * - *************************************/ - - -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - MACHINE_START_MEMBER(jpmmps_state,jpmmps) { /* setup 9 mechanical meters */ @@ -255,7 +239,7 @@ static MACHINE_CONFIG_START( jpmmps, jpmmps_state ) MCFG_SOUND_ADD("sn", SN76489, SOUND_CLOCK) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) - MCFG_SOUND_CONFIG(psg_intf) + MCFG_DEFAULT_LAYOUT(layout_jpmmps) MACHINE_CONFIG_END diff --git a/src/mame/drivers/kncljoe.c b/src/mame/drivers/kncljoe.c index 32ead62ccf7..0a5567e9d7f 100644 --- a/src/mame/drivers/kncljoe.c +++ b/src/mame/drivers/kncljoe.c @@ -229,23 +229,6 @@ static GFXDECODE_START( kncljoe ) GFXDECODE_ENTRY( "gfx3", 0, spritelayout, 0x80, 16 ) GFXDECODE_END -/************************************* - * - * Sound interface - * - *************************************/ - - -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - static const ay8910_interface ay8910_config = { AY8910_LEGACY_OUTPUT, @@ -315,11 +298,9 @@ static MACHINE_CONFIG_START( kncljoe, kncljoe_state ) MCFG_SOUND_ADD("sn1", SN76489, XTAL_3_579545MHz) /* verified on pcb */ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("sn2", SN76489, XTAL_3_579545MHz) /* verified on pcb */ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30) - MCFG_SOUND_CONFIG(psg_intf) MACHINE_CONFIG_END diff --git a/src/mame/drivers/kontest.c b/src/mame/drivers/kontest.c index dbdcdaf9ea2..6b32cb1b47c 100644 --- a/src/mame/drivers/kontest.c +++ b/src/mame/drivers/kontest.c @@ -220,23 +220,6 @@ static INPUT_PORTS_START( kontest ) INPUT_PORTS_END -/************************************* - * - * Sound interface - * - *************************************/ - - -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - /*************************************************************************** Machine Config @@ -283,11 +266,9 @@ static MACHINE_CONFIG_START( kontest, kontest_state ) MCFG_SOUND_ADD("sn1", SN76489A, MAIN_CLOCK/16) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.50) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("sn2", SN76489A, MAIN_CLOCK/16) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.50) - MCFG_SOUND_CONFIG(psg_intf) MACHINE_CONFIG_END diff --git a/src/mame/drivers/ladybug.c b/src/mame/drivers/ladybug.c index ba3e5125039..820ce63d148 100644 --- a/src/mame/drivers/ladybug.c +++ b/src/mame/drivers/ladybug.c @@ -706,23 +706,6 @@ static GFXDECODE_START( sraider ) GFXDECODE_END -/************************************* - * - * Sound interface - * - *************************************/ - - -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - MACHINE_START_MEMBER(ladybug_state,ladybug) { } @@ -794,11 +777,9 @@ static MACHINE_CONFIG_START( ladybug, ladybug_state ) MCFG_SOUND_ADD("sn1", SN76489, 4000000) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("sn2", SN76489, 4000000) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - MCFG_SOUND_CONFIG(psg_intf) MACHINE_CONFIG_END @@ -837,23 +818,18 @@ static MACHINE_CONFIG_START( sraider, ladybug_state ) MCFG_SOUND_ADD("sn1", SN76489, 4000000) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("sn2", SN76489, 4000000) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("sn3", SN76489, 4000000) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("sn4", SN76489, 4000000) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("sn5", SN76489, 4000000) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - MCFG_SOUND_CONFIG(psg_intf) MACHINE_CONFIG_END diff --git a/src/mame/drivers/lasso.c b/src/mame/drivers/lasso.c index ee9e3b42920..b3ce01d6c1a 100644 --- a/src/mame/drivers/lasso.c +++ b/src/mame/drivers/lasso.c @@ -451,23 +451,6 @@ static GFXDECODE_START( pinbo ) GFXDECODE_END -/************************************* - * - * Sound interface - * - *************************************/ - - -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - void lasso_state::machine_start() { save_item(NAME(m_gfxbank)); @@ -522,11 +505,9 @@ static MACHINE_CONFIG_START( base, lasso_state ) MCFG_SOUND_ADD("sn76489.1", SN76489, 2000000) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("sn76489.2", SN76489, 2000000) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - MCFG_SOUND_CONFIG(psg_intf) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( lasso, base ) diff --git a/src/mame/drivers/lucky74.c b/src/mame/drivers/lucky74.c index 26a5cd19e42..9968bc9e1c2 100644 --- a/src/mame/drivers/lucky74.c +++ b/src/mame/drivers/lucky74.c @@ -1522,15 +1522,6 @@ static const msm5205_interface msm5205_config = MSM5205_S48_4B /* 8KHz */ }; -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - /************************* * Machine Drivers * *************************/ @@ -1569,15 +1560,12 @@ static MACHINE_CONFIG_START( lucky74, lucky74_state ) MCFG_SOUND_ADD("sn1", SN76489, C_06B49P_CLKOUT_03) /* 3 MHz. */ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("sn2", SN76489, C_06B49P_CLKOUT_03) /* 3 MHz. */ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("sn3", SN76489, C_06B49P_CLKOUT_03) /* 3 MHz. */ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("aysnd", AY8910, C_06B49P_CLKOUT_04) /* 1.5 MHz. */ MCFG_SOUND_CONFIG(ay8910_config) diff --git a/src/mame/drivers/markham.c b/src/mame/drivers/markham.c index a2ff380e7d6..5a2d32c07de 100644 --- a/src/mame/drivers/markham.c +++ b/src/mame/drivers/markham.c @@ -172,23 +172,6 @@ static GFXDECODE_START( markham ) GFXDECODE_END -/************************************* - * - * Sound interface - * - *************************************/ - - -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - static MACHINE_CONFIG_START( markham, markham_state ) /* basic machine hardware */ @@ -219,11 +202,9 @@ static MACHINE_CONFIG_START( markham, markham_state ) MCFG_SOUND_ADD("sn1", SN76496, 8000000/2) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("sn2", SN76496, 8000000/2) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) - MCFG_SOUND_CONFIG(psg_intf) MACHINE_CONFIG_END /****************************************************************************/ diff --git a/src/mame/drivers/megaplay.c b/src/mame/drivers/megaplay.c index 8f0977b0700..3f3f0de6737 100644 --- a/src/mame/drivers/megaplay.c +++ b/src/mame/drivers/megaplay.c @@ -631,11 +631,6 @@ void mplay_state::screen_eof_megaplay(screen_device &screen, bool state) SCREEN_VBLANK_CALL(megatech_bios); } -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - static MACHINE_CONFIG_START( megaplay, mplay_state ) /* basic machine hardware */ MCFG_FRAGMENT_ADD(md_ntsc) @@ -651,7 +646,6 @@ static MACHINE_CONFIG_START( megaplay, mplay_state ) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) MCFG_SOUND_ADD("sn2", SN76496, MASTER_CLOCK/15) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.25) /* 3.58 MHz */ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker",0.25) /* 3.58 MHz */ diff --git a/src/mame/drivers/megatech.c b/src/mame/drivers/megatech.c index 21617a6bb58..9d61c38ed88 100644 --- a/src/mame/drivers/megatech.c +++ b/src/mame/drivers/megatech.c @@ -499,12 +499,6 @@ static const sega315_5124_interface _vdp_intf = }; -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - static MACHINE_CONFIG_START( megatech, mtech_state ) /* basic machine hardware */ MCFG_FRAGMENT_ADD(md_ntsc) @@ -539,7 +533,6 @@ static MACHINE_CONFIG_START( megatech, mtech_state ) /* sound hardware */ MCFG_SOUND_ADD("sn2", SN76496, MASTER_CLOCK/15) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ROUTE(0, "lspeaker", 0.50) MCFG_SOUND_ROUTE(1, "rspeaker", 0.50) MACHINE_CONFIG_END diff --git a/src/mame/drivers/mikie.c b/src/mame/drivers/mikie.c index e7b08f3d04b..607e58c3e8c 100644 --- a/src/mame/drivers/mikie.c +++ b/src/mame/drivers/mikie.c @@ -222,23 +222,6 @@ static GFXDECODE_START( mikie ) GFXDECODE_END -/************************************* - * - * Sound interface - * - *************************************/ - - -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - /************************************* * * Machine driver @@ -291,11 +274,9 @@ static MACHINE_CONFIG_START( mikie, mikie_state ) MCFG_SOUND_ADD("sn1", SN76489A, XTAL/8) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("sn2", SN76489A, CLK) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60) - MCFG_SOUND_CONFIG(psg_intf) MACHINE_CONFIG_END /************************************* diff --git a/src/mame/drivers/mjkjidai.c b/src/mame/drivers/mjkjidai.c index f05d91a8d6c..2f58a45707c 100644 --- a/src/mame/drivers/mjkjidai.c +++ b/src/mame/drivers/mjkjidai.c @@ -377,23 +377,6 @@ INTERRUPT_GEN_MEMBER(mjkjidai_state::vblank_irq) } -/************************************* - * - * Sound interface - * - *************************************/ - - -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - static MACHINE_CONFIG_START( mjkjidai, mjkjidai_state ) /* basic machine hardware */ @@ -422,11 +405,9 @@ static MACHINE_CONFIG_START( mjkjidai, mjkjidai_state ) MCFG_SOUND_ADD("sn1", SN76489, 10000000/4) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("sn2", SN76489, 10000000/4) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("adpcm", MJKJIDAI, 6000) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) diff --git a/src/mame/drivers/mrdo.c b/src/mame/drivers/mrdo.c index 9d367d8fc6e..4275e5ddcd5 100644 --- a/src/mame/drivers/mrdo.c +++ b/src/mame/drivers/mrdo.c @@ -164,23 +164,6 @@ static GFXDECODE_START( mrdo ) GFXDECODE_END -/************************************* - * - * Sound interface - * - *************************************/ - - -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - static MACHINE_CONFIG_START( mrdo, mrdo_state ) /* basic machine hardware */ @@ -202,11 +185,9 @@ static MACHINE_CONFIG_START( mrdo, mrdo_state ) MCFG_SOUND_ADD("u8106_1", U8106, MAIN_CLOCK/2) /* sn76489-equivalent?, Verified */ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("u8106_2", U8106, MAIN_CLOCK/2) /* sn76489-equivalent?, Verified */ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) - MCFG_SOUND_CONFIG(psg_intf) MACHINE_CONFIG_END diff --git a/src/mame/drivers/mrjong.c b/src/mame/drivers/mrjong.c index 83825b38acd..e9857082d36 100644 --- a/src/mame/drivers/mrjong.c +++ b/src/mame/drivers/mrjong.c @@ -172,23 +172,6 @@ static GFXDECODE_START( mrjong ) GFXDECODE_END -/************************************* - * - * Sound interface - * - *************************************/ - - -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - /************************************* * * Machine driver @@ -220,11 +203,9 @@ static MACHINE_CONFIG_START( mrjong, mrjong_state ) MCFG_SOUND_ADD("sn1", SN76489, 15468000/6) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("sn2", SN76489, 15468000/6) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - MCFG_SOUND_CONFIG(psg_intf) MACHINE_CONFIG_END diff --git a/src/mame/drivers/pachifev.c b/src/mame/drivers/pachifev.c index e1a9d1b06ec..86bf7a3298f 100644 --- a/src/mame/drivers/pachifev.c +++ b/src/mame/drivers/pachifev.c @@ -249,23 +249,6 @@ static INPUT_PORTS_START( pachifev ) INPUT_PORTS_END -/************************************* - * - * Sound interface - * - *************************************/ - - -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - #if USE_MSM @@ -396,10 +379,8 @@ static MACHINE_CONFIG_START( pachifev, pachifev_state ) #endif MCFG_SOUND_ADD("y2404_1", Y2404, XTAL_10_738635MHz/3) /* guess */ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("y2404_2", Y2404, XTAL_10_738635MHz/3) /* guess */ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30) - MCFG_SOUND_CONFIG(psg_intf) MACHINE_CONFIG_END ROM_START( pachifev ) diff --git a/src/mame/drivers/pacman.c b/src/mame/drivers/pacman.c index 64b79f99020..2629b90b27f 100644 --- a/src/mame/drivers/pacman.c +++ b/src/mame/drivers/pacman.c @@ -3312,16 +3312,6 @@ static const namco_interface namco_config = }; -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - /************************************* * * Machine drivers @@ -3463,10 +3453,10 @@ static MACHINE_CONFIG_DERIVED( vanvan, pacman ) /* sound hardware */ MCFG_DEVICE_REMOVE("namco") MCFG_SOUND_ADD("sn1", SN76496, 1789750) - MCFG_SOUND_CONFIG(psg_intf) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) MCFG_SOUND_ADD("sn2", SN76496, 1789750) - MCFG_SOUND_CONFIG(psg_intf) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) MACHINE_CONFIG_END @@ -3505,7 +3495,6 @@ static MACHINE_CONFIG_DERIVED( s2650games, pacman ) /* sound hardware */ MCFG_DEVICE_REMOVE("namco") MCFG_SOUND_ADD("sn1", SN76496, MASTER_CLOCK/6) /* 1H */ - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) MACHINE_CONFIG_END diff --git a/src/mame/drivers/pingpong.c b/src/mame/drivers/pingpong.c index 705406e7873..e4579969b1a 100644 --- a/src/mame/drivers/pingpong.c +++ b/src/mame/drivers/pingpong.c @@ -440,23 +440,6 @@ static GFXDECODE_START( pingpong ) GFXDECODE_END -/************************************* - * - * Sound interface - * - *************************************/ - - -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - static MACHINE_CONFIG_START( pingpong, pingpong_state ) /* basic machine hardware */ @@ -481,7 +464,6 @@ static MACHINE_CONFIG_START( pingpong, pingpong_state ) MCFG_SOUND_ADD("snsnd", SN76496, 18432000/8) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - MCFG_SOUND_CONFIG(psg_intf) MACHINE_CONFIG_END /* too fast! */ diff --git a/src/mame/drivers/retofinv.c b/src/mame/drivers/retofinv.c index 92924e45b8c..2f63c2d06d8 100644 --- a/src/mame/drivers/retofinv.c +++ b/src/mame/drivers/retofinv.c @@ -341,23 +341,6 @@ INTERRUPT_GEN_MEMBER(retofinv_state::sub_vblank_irq) } -/************************************* - * - * Sound interface - * - *************************************/ - - -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - static MACHINE_CONFIG_START( retofinv, retofinv_state ) /* basic machine hardware */ @@ -395,11 +378,9 @@ static MACHINE_CONFIG_START( retofinv, retofinv_state ) MCFG_SOUND_ADD("sn1", SN76496, 18432000/6) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("sn2", SN76496, 18432000/6) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80) - MCFG_SOUND_CONFIG(psg_intf) MACHINE_CONFIG_END diff --git a/src/mame/drivers/sbasketb.c b/src/mame/drivers/sbasketb.c index 4801c9e1a96..5069621e0ac 100644 --- a/src/mame/drivers/sbasketb.c +++ b/src/mame/drivers/sbasketb.c @@ -179,16 +179,6 @@ INTERRUPT_GEN_MEMBER(sbasketb_state::vblank_irq) device.execute().set_input_line(0, HOLD_LINE); } -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - static MACHINE_CONFIG_START( sbasketb, sbasketb_state ) /* basic machine hardware */ @@ -221,7 +211,6 @@ static MACHINE_CONFIG_START( sbasketb, sbasketb_state ) MCFG_SOUND_ADD("snsnd", SN76489, XTAL_14_31818MHz / 8) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("vlm", VLM5030, XTAL_3_579545MHz) /* Schematics say 3.58MHz, but board uses 3.579545MHz xtal */ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) diff --git a/src/mame/drivers/sbugger.c b/src/mame/drivers/sbugger.c index ef265469c60..a530275cb27 100644 --- a/src/mame/drivers/sbugger.c +++ b/src/mame/drivers/sbugger.c @@ -223,23 +223,6 @@ static I8156_INTERFACE(i8156_intf) DEVCB_DRIVER_LINE_MEMBER(sbugger_state,sbugger_interrupt) }; -/************************************* - * - * Sound interface - * - *************************************/ - - -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - static MACHINE_CONFIG_START( sbugger, sbugger_state ) MCFG_CPU_ADD("maincpu", I8085A, 6000000) /* 3.00 MHz??? */ @@ -264,11 +247,9 @@ static MACHINE_CONFIG_START( sbugger, sbugger_state ) MCFG_SOUND_ADD("sn76489.1", SN76489, 3000000) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("sn76489.2", SN76489, 3000000) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - MCFG_SOUND_CONFIG(psg_intf) MACHINE_CONFIG_END diff --git a/src/mame/drivers/segac2.c b/src/mame/drivers/segac2.c index 4b3d5d8c6d3..a9f71e4dba6 100644 --- a/src/mame/drivers/segac2.c +++ b/src/mame/drivers/segac2.c @@ -1345,11 +1345,6 @@ static const sega315_5124_interface sms_vdp_ntsc_intf = DEVCB_NULL, }; -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - static MACHINE_CONFIG_START( segac, segac2_state ) /* basic machine hardware */ @@ -1394,7 +1389,6 @@ static MACHINE_CONFIG_START( segac, segac2_state ) /* right channel not connected */ MCFG_SOUND_ADD("snsnd", SN76496, XL2_CLOCK/15) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) MACHINE_CONFIG_END diff --git a/src/mame/drivers/segae.c b/src/mame/drivers/segae.c index a32ed5dcea8..6c119039057 100644 --- a/src/mame/drivers/segae.c +++ b/src/mame/drivers/segae.c @@ -981,16 +981,6 @@ UINT32 systeme_state::screen_update_systeme(screen_device &screen, bitmap_rgb32 } -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - static MACHINE_CONFIG_START( systeme, systeme_state ) MCFG_CPU_ADD("maincpu", Z80, XTAL_10_738635MHz/2) /* Z80B @ 5.3693Mhz */ MCFG_CPU_PROGRAM_MAP(systeme_map) @@ -1015,11 +1005,9 @@ static MACHINE_CONFIG_START( systeme, systeme_state ) MCFG_SOUND_ADD("sn1", SEGAPSG, XTAL_10_738635MHz/3) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("sn2", SEGAPSG, XTAL_10_738635MHz/3) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) - MCFG_SOUND_CONFIG(psg_intf) MACHINE_CONFIG_END diff --git a/src/mame/drivers/segag80r.c b/src/mame/drivers/segag80r.c index 2fcccd58a0b..e0f0e1b5ef1 100644 --- a/src/mame/drivers/segag80r.c +++ b/src/mame/drivers/segag80r.c @@ -812,23 +812,6 @@ static GFXDECODE_START( monsterb ) GFXDECODE_END -/************************************* - * - * Sound interface - * - *************************************/ - - -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - /************************************* * * Machine drivers @@ -946,11 +929,9 @@ static MACHINE_CONFIG_DERIVED( sindbadm, g80r_base ) /* sound hardware */ MCFG_SOUND_ADD("sn1", SN76496, SINDBADM_SOUND_CLOCK/4) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("sn2", SN76496, SINDBADM_SOUND_CLOCK/2) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - MCFG_SOUND_CONFIG(psg_intf) MACHINE_CONFIG_END diff --git a/src/mame/drivers/senjyo.c b/src/mame/drivers/senjyo.c index a0763370443..cf4af724414 100644 --- a/src/mame/drivers/senjyo.c +++ b/src/mame/drivers/senjyo.c @@ -549,23 +549,6 @@ static GFXDECODE_START( senjyo ) GFXDECODE_END -/************************************* - * - * Sound interface - * - *************************************/ - - -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - static MACHINE_CONFIG_START( senjyo, senjyo_state ) /* basic machine hardware */ @@ -599,15 +582,12 @@ static MACHINE_CONFIG_START( senjyo, senjyo_state ) MCFG_SOUND_ADD("sn1", SN76496, 2000000) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("sn2", SN76496, 2000000) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("sn3", SN76496, 2000000) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) - MCFG_SOUND_CONFIG(psg_intf) MCFG_DAC_ADD("dac") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.05) diff --git a/src/mame/drivers/sg1000a.c b/src/mame/drivers/sg1000a.c index ccf8fbdd5c8..43e3f03d8db 100644 --- a/src/mame/drivers/sg1000a.c +++ b/src/mame/drivers/sg1000a.c @@ -267,23 +267,6 @@ static I8255_INTERFACE( ppi8255_intf ) }; -/************************************* - * - * Sound interface - * - *************************************/ - - -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - /************************************* * * Machine drivers @@ -308,7 +291,6 @@ static MACHINE_CONFIG_START( sg1000a, sg1000a_state ) MCFG_SOUND_ADD("snsnd", SN76489, XTAL_3_579545MHz) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - MCFG_SOUND_CONFIG(psg_intf) MACHINE_CONFIG_END /************************************* diff --git a/src/mame/drivers/shaolins.c b/src/mame/drivers/shaolins.c index 5648cf4208f..26e8ab76500 100644 --- a/src/mame/drivers/shaolins.c +++ b/src/mame/drivers/shaolins.c @@ -185,22 +185,6 @@ static GFXDECODE_START( shaolins ) GFXDECODE_END -/************************************* - * - * Sound interface - * - *************************************/ - -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - static MACHINE_CONFIG_START( shaolins, shaolins_state ) /* basic machine hardware */ @@ -225,11 +209,9 @@ static MACHINE_CONFIG_START( shaolins, shaolins_state ) MCFG_SOUND_ADD("sn1", SN76489A, MASTER_CLOCK/12) /* verified on pcb */ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("sn2", SN76489A, MASTER_CLOCK/6) /* verified on pcb */ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - MCFG_SOUND_CONFIG(psg_intf) MACHINE_CONFIG_END #if 0 // a bootleg board was found with downgraded sound hardware, but is otherwise the same @@ -237,11 +219,9 @@ static MACHINE_CONFIG_DERIVED( shaolinb, shaolins ) MCFG_SOUND_REPLACE("sn1", SN76489, MASTER_CLOCK/12) /* only type verified on pcb */ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_REPLACE("sn2", SN76489, MASTER_CLOCK/6) /* only type verified on pcb */ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - MCFG_SOUND_CONFIG(psg_intf) MACHINE_CONFIG_END #endif diff --git a/src/mame/drivers/spaceg.c b/src/mame/drivers/spaceg.c index 1cd716f7ae7..c36e627abf5 100644 --- a/src/mame/drivers/spaceg.c +++ b/src/mame/drivers/spaceg.c @@ -402,23 +402,6 @@ static INPUT_PORTS_START( spaceg ) INPUT_PORTS_END -/************************************* - * - * Sound interface - * - *************************************/ - - -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -//static const sn76496_config psg_intf = -//{ -// DEVCB_NULL -//}; - - /************************************* * * Machine config @@ -447,15 +430,12 @@ static MACHINE_CONFIG_START( spaceg, spaceg_state ) // MCFG_SOUND_ADD("sn1", SN76496, 15468480/4) // MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) -// MCFG_SOUND_CONFIG(psg_intf) // MCFG_SOUND_ADD("sn2", SN76496, 15468480/4) // MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) -// MCFG_SOUND_CONFIG(psg_intf) // MCFG_SOUND_ADD("sn3", SN76496, 15468480/4) // MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) -// MCFG_SOUND_CONFIG(psg_intf) // MCFG_DAC_ADD("dac") // MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) diff --git a/src/mame/drivers/spcforce.c b/src/mame/drivers/spcforce.c index f1a53c44cb8..4e388afcf51 100644 --- a/src/mame/drivers/spcforce.c +++ b/src/mame/drivers/spcforce.c @@ -44,12 +44,26 @@ WRITE8_MEMBER(spcforce_state::spcforce_SN76496_latch_w) m_sn76496_latch = data; } +WRITE_LINE_MEMBER(spcforce_state::write_sn1_ready) +{ + m_sn1_ready = state; +} + +WRITE_LINE_MEMBER(spcforce_state::write_sn2_ready) +{ + m_sn2_ready = state; +} + +WRITE_LINE_MEMBER(spcforce_state::write_sn3_ready) +{ + m_sn3_ready = state; +} + READ8_MEMBER(spcforce_state::spcforce_SN76496_select_r) { - if (~m_sn76496_select & 0x40) return m_sn1->ready_r(); - if (~m_sn76496_select & 0x20) return m_sn2->ready_r(); - if (~m_sn76496_select & 0x10) return m_sn3->ready_r(); - + if (~m_sn76496_select & 0x40) return m_sn1_ready; + if (~m_sn76496_select & 0x20) return m_sn2_ready; + if (~m_sn76496_select & 0x10) return m_sn3_ready; return 0; } @@ -61,7 +75,6 @@ WRITE8_MEMBER(spcforce_state::spcforce_SN76496_select_w) if (~data & 0x40) m_sn1->write(space, 0, m_sn76496_latch); if (~data & 0x20) m_sn2->write(space, 0, m_sn76496_latch); if (~data & 0x10) m_sn3->write(space, 0, m_sn76496_latch); - } READ8_MEMBER(spcforce_state::spcforce_t0_r) @@ -239,16 +252,6 @@ void spcforce_state::palette_init() } -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - INTERRUPT_GEN_MEMBER(spcforce_state::vblank_irq) { if(m_irq_mask) @@ -278,21 +281,20 @@ static MACHINE_CONFIG_START( spcforce, spcforce_state ) MCFG_GFXDECODE(spcforce) MCFG_PALETTE_LENGTH(sizeof(colortable_source) / sizeof(colortable_source[0])) - /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("sn1", SN76496, 2000000) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - MCFG_SOUND_CONFIG(psg_intf) + MCFG_SN76496_READY_HANDLER(WRITELINE(spcforce_state, write_sn1_ready)) MCFG_SOUND_ADD("sn2", SN76496, 2000000) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - MCFG_SOUND_CONFIG(psg_intf) + MCFG_SN76496_READY_HANDLER(WRITELINE(spcforce_state, write_sn2_ready)) MCFG_SOUND_ADD("sn3", SN76496, 2000000) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - MCFG_SOUND_CONFIG(psg_intf) + MCFG_SN76496_READY_HANDLER(WRITELINE(spcforce_state, write_sn3_ready)) MACHINE_CONFIG_END diff --git a/src/mame/drivers/sprcros2.c b/src/mame/drivers/sprcros2.c index 69f6b63c6c6..7a9b5ef372a 100644 --- a/src/mame/drivers/sprcros2.c +++ b/src/mame/drivers/sprcros2.c @@ -228,23 +228,6 @@ static GFXDECODE_START( sprcros2 ) GFXDECODE_ENTRY( "gfx3", 0, sprcros2_fglayout, 512, 64 ) GFXDECODE_END -/************************************* - * - * Sound interface - * - *************************************/ - - -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - TIMER_DEVICE_CALLBACK_MEMBER(sprcros2_state::sprcros2_m_interrupt) { int scanline = param; @@ -304,15 +287,12 @@ static MACHINE_CONFIG_START( sprcros2, sprcros2_state ) MCFG_SOUND_ADD("sn1", SN76489, 10000000/4) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("sn2", SN76489, 10000000/4) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("sn3", SN76489, 10000000/4) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) - MCFG_SOUND_CONFIG(psg_intf) MACHINE_CONFIG_END ROM_START( sprcros2 ) diff --git a/src/mame/drivers/strnskil.c b/src/mame/drivers/strnskil.c index 6ba847f993b..2769ac12069 100644 --- a/src/mame/drivers/strnskil.c +++ b/src/mame/drivers/strnskil.c @@ -329,22 +329,6 @@ TIMER_DEVICE_CALLBACK_MEMBER(strnskil_state::strnskil_irq) } -/************************************* - * - * Sound interface - * - *************************************/ - -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - static MACHINE_CONFIG_START( strnskil, strnskil_state ) /* basic machine hardware */ @@ -376,11 +360,9 @@ static MACHINE_CONFIG_START( strnskil, strnskil_state ) MCFG_SOUND_ADD("sn1", SN76496, 8000000/4) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("sn2", SN76496, 8000000/2) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) - MCFG_SOUND_CONFIG(psg_intf) MACHINE_CONFIG_END diff --git a/src/mame/drivers/superdq.c b/src/mame/drivers/superdq.c index 2cdb986f9e2..1eab2130ff0 100644 --- a/src/mame/drivers/superdq.c +++ b/src/mame/drivers/superdq.c @@ -307,22 +307,6 @@ static GFXDECODE_START( superdq ) GFXDECODE_END -/************************************* - * - * Sound interface - * - *************************************/ - -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - /************************************* * * Machine drivers @@ -358,7 +342,6 @@ static MACHINE_CONFIG_START( superdq, superdq_state ) MCFG_SOUND_ADD("snsnd", SN76496, MASTER_CLOCK/8) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.8) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_MODIFY("laserdisc") MCFG_SOUND_ROUTE(0, "lspeaker", 1.0) diff --git a/src/mame/drivers/suprloco.c b/src/mame/drivers/suprloco.c index 149ffd9793a..41c113d32cc 100644 --- a/src/mame/drivers/suprloco.c +++ b/src/mame/drivers/suprloco.c @@ -158,22 +158,6 @@ static GFXDECODE_START( suprloco ) GFXDECODE_END -/************************************* - * - * Sound interface - * - *************************************/ - -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - static MACHINE_CONFIG_START( suprloco, suprloco_state ) /* basic machine hardware */ @@ -202,11 +186,9 @@ static MACHINE_CONFIG_START( suprloco, suprloco_state ) MCFG_SOUND_ADD("sn1", SN76496, 4000000) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("sn2", SN76496, 2000000) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - MCFG_SOUND_CONFIG(psg_intf) MACHINE_CONFIG_END diff --git a/src/mame/drivers/system1.c b/src/mame/drivers/system1.c index 3cb3f53c10b..b718d27c156 100644 --- a/src/mame/drivers/system1.c +++ b/src/mame/drivers/system1.c @@ -2098,22 +2098,6 @@ static GFXDECODE_START( system1 ) GFXDECODE_END -/************************************* - * - * Sound interface - * - *************************************/ - -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - /************************************* * * Machine driver @@ -2183,11 +2167,9 @@ static MACHINE_CONFIG_START( sys1ppi, system1_state ) MCFG_SOUND_ADD("sn1", SN76489A, SOUND_CLOCK/4) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("sn2", SN76489A, SOUND_CLOCK/2) /* selectable via jumper */ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) - MCFG_SOUND_CONFIG(psg_intf) MACHINE_CONFIG_END /* reduced visible area for scrolling games */ diff --git a/src/mame/drivers/tp84.c b/src/mame/drivers/tp84.c index feae14993b0..ba3671cd88a 100644 --- a/src/mame/drivers/tp84.c +++ b/src/mame/drivers/tp84.c @@ -283,23 +283,6 @@ INTERRUPT_GEN_MEMBER(tp84_state::sub_vblank_irq) } -/************************************* - * - * Sound interface - * - *************************************/ - - -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - static MACHINE_CONFIG_START( tp84, tp84_state ) /* basic machine hardware */ @@ -335,15 +318,12 @@ static MACHINE_CONFIG_START( tp84, tp84_state ) MCFG_SOUND_ADD("y2404_1", Y2404, XTAL_14_31818MHz/8) /* verified on pcb */ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "filter1", 0.75) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("y2404_2", Y2404, XTAL_14_31818MHz/8) /* verified on pcb */ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "filter2", 0.75) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("y2404_3", Y2404, XTAL_14_31818MHz/8) /* verified on pcb */ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "filter3", 0.75) - MCFG_SOUND_CONFIG(psg_intf) MCFG_FILTER_RC_ADD("filter1", 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) diff --git a/src/mame/drivers/trackfld.c b/src/mame/drivers/trackfld.c index 482dc3c53fe..59ca95c155d 100644 --- a/src/mame/drivers/trackfld.c +++ b/src/mame/drivers/trackfld.c @@ -887,15 +887,6 @@ INTERRUPT_GEN_MEMBER(trackfld_state::vblank_nmi) device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - static MACHINE_CONFIG_START( trackfld, trackfld_state ) /* basic machine hardware */ @@ -934,7 +925,6 @@ static MACHINE_CONFIG_START( trackfld, trackfld_state ) MCFG_SOUND_ADD("snsnd", SN76496, SOUND_CLOCK/8) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("vlm", VLM5030, VLM_CLOCK) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) @@ -987,7 +977,6 @@ static MACHINE_CONFIG_START( yieartf, trackfld_state ) MCFG_SOUND_ADD("snsnd", SN76496, MASTER_CLOCK/6/2) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("vlm", VLM5030, VLM_CLOCK) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) diff --git a/src/mame/drivers/vsnes.c b/src/mame/drivers/vsnes.c index f43fe801bb4..02f22ea1390 100644 --- a/src/mame/drivers/vsnes.c +++ b/src/mame/drivers/vsnes.c @@ -1831,12 +1831,6 @@ static MACHINE_CONFIG_START( vsdual, vsnes_state ) MACHINE_CONFIG_END -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - static MACHINE_CONFIG_START( vsnes_bootleg, vsnes_state ) /* basic machine hardware */ @@ -1881,7 +1875,6 @@ static MACHINE_CONFIG_START( vsnes_bootleg, vsnes_state ) // instead of the above? MCFG_SOUND_ADD("sn1", SN76489A, 4000000) // ?? Mhz MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) - MCFG_SOUND_CONFIG(psg_intf) MACHINE_CONFIG_END /******************************************************************************/ diff --git a/src/mame/drivers/wico.c b/src/mame/drivers/wico.c index 742f458d7c3..1b9a8108b72 100644 --- a/src/mame/drivers/wico.c +++ b/src/mame/drivers/wico.c @@ -393,15 +393,6 @@ TIMER_DEVICE_CALLBACK_MEMBER( wico_state::firq_housekeeping ) } -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - static MACHINE_CONFIG_START( wico, wico_state ) /* basic machine hardware */ MCFG_CPU_ADD("ccpu", M6809, 10000000 / 8) @@ -420,7 +411,6 @@ static MACHINE_CONFIG_START( wico, wico_state ) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("sn76494", SN76494, 10000000 / 64) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) - MCFG_SOUND_CONFIG(psg_intf) MACHINE_CONFIG_END /*------------------------------------------------------------------- diff --git a/src/mame/drivers/xyonix.c b/src/mame/drivers/xyonix.c index f5956ebda60..37d08c0e85e 100644 --- a/src/mame/drivers/xyonix.c +++ b/src/mame/drivers/xyonix.c @@ -209,22 +209,6 @@ static GFXDECODE_START( xyonix ) GFXDECODE_END -/************************************* - * - * Sound interface - * - *************************************/ - -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - /* MACHINE driver *************************************************************/ static MACHINE_CONFIG_START( xyonix, xyonix_state ) @@ -253,11 +237,9 @@ static MACHINE_CONFIG_START( xyonix, xyonix_state ) MCFG_SOUND_ADD("sn1", SN76496, 16000000/4) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - MCFG_SOUND_CONFIG(psg_intf) - + MCFG_SOUND_ADD("sn2", SN76496, 16000000/4) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - MCFG_SOUND_CONFIG(psg_intf) MACHINE_CONFIG_END /* ROM Loading ***************************************************************/ diff --git a/src/mame/drivers/yiear.c b/src/mame/drivers/yiear.c index f4d01429109..8dfe3b8feb7 100644 --- a/src/mame/drivers/yiear.c +++ b/src/mame/drivers/yiear.c @@ -266,15 +266,6 @@ void yiear_state::machine_reset() m_yiear_nmi_enable = 0; } -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - static MACHINE_CONFIG_START( yiear, yiear_state ) /* basic machine hardware */ @@ -303,7 +294,6 @@ static MACHINE_CONFIG_START( yiear, yiear_state ) MCFG_SOUND_ADD("snsnd", SN76489A, XTAL_18_432MHz/12) /* verified on pcb */ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("vlm", VLM5030, XTAL_3_579545MHz) /* verified on pcb */ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) diff --git a/src/mame/drivers/zaxxon.c b/src/mame/drivers/zaxxon.c index 9b986ceaf55..2b0bc365c4a 100644 --- a/src/mame/drivers/zaxxon.c +++ b/src/mame/drivers/zaxxon.c @@ -928,23 +928,6 @@ static GFXDECODE_START( zaxxon ) GFXDECODE_END -/************************************* - * - * Sound interface - * - *************************************/ - - -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - /************************************* * * Machine driver @@ -1033,11 +1016,9 @@ static MACHINE_CONFIG_DERIVED( congo, root ) MCFG_SOUND_ADD("sn1", SN76496, SOUND_CLOCK) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("sn2", SN76496, SOUND_CLOCK/4) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - MCFG_SOUND_CONFIG(psg_intf) MCFG_FRAGMENT_ADD(congo_samples) MACHINE_CONFIG_END diff --git a/src/mame/includes/spcforce.h b/src/mame/includes/spcforce.h index e73c18db905..1e5875a5481 100644 --- a/src/mame/includes/spcforce.h +++ b/src/mame/includes/spcforce.h @@ -25,11 +25,17 @@ public: int m_sn76496_latch; int m_sn76496_select; + int m_sn1_ready; + int m_sn2_ready; + int m_sn3_ready; UINT8 m_irq_mask; DECLARE_WRITE8_MEMBER(spcforce_SN76496_latch_w); DECLARE_READ8_MEMBER(spcforce_SN76496_select_r); DECLARE_WRITE8_MEMBER(spcforce_SN76496_select_w); + DECLARE_WRITE_LINE_MEMBER(write_sn1_ready); + DECLARE_WRITE_LINE_MEMBER(write_sn2_ready); + DECLARE_WRITE_LINE_MEMBER(write_sn3_ready); DECLARE_READ8_MEMBER(spcforce_t0_r); DECLARE_WRITE8_MEMBER(spcforce_soundtrigger_w); DECLARE_WRITE8_MEMBER(irq_mask_w); diff --git a/src/mame/machine/megadriv.c b/src/mame/machine/megadriv.c index 80aa8989562..5c04bf44439 100644 --- a/src/mame/machine/megadriv.c +++ b/src/mame/machine/megadriv.c @@ -984,13 +984,6 @@ static const sega315_5124_interface sms_vdp_pal_intf = }; -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - - MACHINE_CONFIG_FRAGMENT( md_ntsc ) MCFG_CPU_ADD("maincpu", M68000, MASTER_CLOCK_NTSC / 7) /* 7.67 MHz */ MCFG_CPU_PROGRAM_MAP(megadriv_map) @@ -1036,7 +1029,6 @@ MACHINE_CONFIG_FRAGMENT( md_ntsc ) /* sound hardware */ MCFG_SOUND_ADD("snsnd", SEGAPSG, MASTER_CLOCK_NTSC/15) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.25) /* 3.58 MHz */ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker",0.25) /* 3.58 MHz */ MACHINE_CONFIG_END @@ -1086,7 +1078,6 @@ MACHINE_CONFIG_FRAGMENT( md_pal ) /* sound hardware */ MCFG_SOUND_ADD("snsnd", SEGAPSG, MASTER_CLOCK_PAL/15) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.25) /* 3.58 MHz */ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker",0.25) /* 3.58 MHz */ MACHINE_CONFIG_END diff --git a/src/mame/machine/segamsys.c b/src/mame/machine/segamsys.c index 2765ddeed72..bb07a081258 100644 --- a/src/mame/machine/segamsys.c +++ b/src/mame/machine/segamsys.c @@ -1710,11 +1710,6 @@ static NVRAM_HANDLER( sms ) } } -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - MACHINE_CONFIG_START( sms, driver_device ) MCFG_CPU_ADD("maincpu", Z80, 3579540) //MCFG_CPU_PROGRAM_MAP(sms_map) @@ -1740,6 +1735,5 @@ MACHINE_CONFIG_START( sms, driver_device ) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("snsnd", SN76496, 3579540) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) MACHINE_CONFIG_END diff --git a/src/mess/drivers/adam.c b/src/mess/drivers/adam.c index 12d70dcae0c..c19203f32e6 100644 --- a/src/mess/drivers/adam.c +++ b/src/mess/drivers/adam.c @@ -977,16 +977,6 @@ static TMS9928A_INTERFACE( vdc_intf ) }; -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL // TODO Z80 RDY -}; - - //------------------------------------------------- // M6801_INTERFACE( m6801_intf ) //------------------------------------------------- @@ -1133,7 +1123,7 @@ static MACHINE_CONFIG_START( adam, adam_state ) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD(SN76489A_TAG, SN76489A, XTAL_7_15909MHz/2) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) - MCFG_SOUND_CONFIG(psg_intf) + // TODO Z80 RDY // devices MCFG_TIMER_DRIVER_ADD_PERIODIC("paddles", adam_state, paddle_tick, attotime::from_msec(20)) diff --git a/src/mess/drivers/apricot.c b/src/mess/drivers/apricot.c index 41ed2eab629..dafce208a0e 100644 --- a/src/mess/drivers/apricot.c +++ b/src/mess/drivers/apricot.c @@ -382,11 +382,6 @@ ADDRESS_MAP_END // MACHINE DRIVERS //************************************************************************** -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - static MACHINE_CONFIG_START( apricot, apricot_state ) // main cpu MCFG_CPU_ADD("ic91", I8086, XTAL_15MHz / 3) @@ -413,7 +408,6 @@ static MACHINE_CONFIG_START( apricot, apricot_state ) // sound hardware MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("ic7", SN76489, XTAL_4MHz / 2) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) // internal ram diff --git a/src/mess/drivers/apricotp.c b/src/mess/drivers/apricotp.c index d5faa537756..927f71d586d 100644 --- a/src/mess/drivers/apricotp.c +++ b/src/mess/drivers/apricotp.c @@ -554,23 +554,6 @@ WRITE_LINE_MEMBER( fp_state::write_centronics_perror ) m_centronics_perror = state; } -/************************************* - * - * Sound interface - * - *************************************/ - - -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - //************************************************************************** // MACHINE INITIALIZATION //************************************************************************** @@ -650,7 +633,6 @@ static MACHINE_CONFIG_START( fp, fp_state ) // sound hardware MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD(SN76489AN_TAG, SN76489A, 2000000) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) /* Devices */ diff --git a/src/mess/drivers/bbc.c b/src/mess/drivers/bbc.c index 2e0e5e31265..9c965279633 100644 --- a/src/mess/drivers/bbc.c +++ b/src/mess/drivers/bbc.c @@ -647,15 +647,6 @@ static const mc6854_interface adlc_intf = DEVCB_NULL }; -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - WRITE_LINE_MEMBER(bbc_state::econet_clk_w) { m_adlc->rxc_w(state); @@ -729,7 +720,6 @@ static MACHINE_CONFIG_START( bbca, bbc_state ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("sn76489", SN76489, 4000000) /* 4 MHz */ - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) /* cassette */ @@ -933,7 +923,6 @@ static MACHINE_CONFIG_START( bbcm, bbc_state ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("sn76489", SN76489, 4000000) /* 4 MHz */ - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) /* rtc and cmos */ diff --git a/src/mess/drivers/coleco.c b/src/mess/drivers/coleco.c index b3f62adeca9..1a6779b5367 100644 --- a/src/mess/drivers/coleco.c +++ b/src/mess/drivers/coleco.c @@ -243,16 +243,6 @@ static TMS9928A_INTERFACE(coleco_tms9928a_interface) }; -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - void coleco_state::machine_start() { memset(m_ram, 0xff, m_ram.bytes()); // initialize RAM @@ -332,7 +322,6 @@ static MACHINE_CONFIG_START( coleco, coleco_state ) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("sn76489a", SN76489A, XTAL_7_15909MHz/2) /* 3.579545 MHz */ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) - MCFG_SOUND_CONFIG(psg_intf) /* cartridge */ MCFG_CARTSLOT_ADD("cart") @@ -361,7 +350,6 @@ static MACHINE_CONFIG_START( czz50, coleco_state ) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("sn76489a", SN76489A, XTAL_7_15909MHz/2) // ??? MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) - MCFG_SOUND_CONFIG(psg_intf) /* cartridge */ MCFG_CARTSLOT_ADD("cart") diff --git a/src/mess/drivers/crvision.c b/src/mess/drivers/crvision.c index b6c165f8fcc..3816ad73ea2 100644 --- a/src/mess/drivers/crvision.c +++ b/src/mess/drivers/crvision.c @@ -672,10 +672,16 @@ WRITE_LINE_MEMBER(laser2001_state::write_centronics_busy) m_pia->cb1_w(pia_cb1_r()); } +WRITE_LINE_MEMBER(laser2001_state::write_psg_ready) +{ + m_psg_ready = state; + m_pia->cb1_w(pia_cb1_r()); +} + READ_LINE_MEMBER( laser2001_state::pia_cb1_r ) { /* actually this is a diode-AND (READY & _BUSY), but ctronics.c returns busy status if no device is mounted -> Manager won't boot */ - return m_psg->ready_r() && (!m_centronics_busy || m_pia->ca2_output_z()); + return m_psg_ready && (!m_centronics_busy || m_pia->ca2_output_z()); } WRITE_LINE_MEMBER( laser2001_state::pia_cb2_w ) @@ -716,15 +722,6 @@ static const cassette_interface lasr2001_cassette_interface = NULL }; -/*------------------------------------------------- - sn76496_config psg_intf --------------------------------------------------*/ - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - /*************************************************************************** MACHINE INITIALIZATION ***************************************************************************/ @@ -887,7 +884,6 @@ static MACHINE_CONFIG_START( creativision, crvision_state ) MCFG_DEVICE_ADD(PIA6821_TAG, PIA6821, 0) MCFG_PIA_READPA_HANDLER(READ8(crvision_state, pia_pa_r)) MCFG_PIA_READPB_HANDLER(READ8(crvision_state, pia_pb_r)) - MCFG_PIA_READCB1_HANDLER(DEVREADLINE(SN76489_TAG, sn76496_base_device, ready_r)) MCFG_PIA_WRITEPA_HANDLER(WRITE8(crvision_state, pia_pa_w)) MCFG_PIA_WRITEPB_HANDLER(DEVWRITE8(SN76489_TAG, sn76496_base_device, write)) @@ -905,7 +901,7 @@ static MACHINE_CONFIG_START( creativision, crvision_state ) // sound hardware MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD(SN76489_TAG, SN76489A, XTAL_2MHz) - MCFG_SOUND_CONFIG(psg_intf) + MCFG_SN76496_READY_HANDLER(DEVWRITELINE(PIA6821_TAG, pia6821_device, cb1_w)) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") @@ -963,7 +959,6 @@ static MACHINE_CONFIG_START( lasr2001, laser2001_state ) MCFG_PIA_READPA_HANDLER(READ8(laser2001_state, pia_pa_r)) MCFG_PIA_READPB_HANDLER(READ8(laser2001_state, pia_pb_r)) MCFG_PIA_READCA1_HANDLER(READLINE(laser2001_state, pia_ca1_r)) - MCFG_PIA_READCB1_HANDLER(READLINE(laser2001_state, pia_cb1_r)) MCFG_PIA_WRITEPA_HANDLER(WRITE8(laser2001_state, pia_pa_w)) MCFG_PIA_WRITEPB_HANDLER(WRITE8(laser2001_state, pia_pb_w)) MCFG_PIA_CA2_HANDLER(WRITELINE(laser2001_state, pia_ca2_w)) @@ -984,7 +979,8 @@ static MACHINE_CONFIG_START( lasr2001, laser2001_state ) // sound hardware MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD(SN76489_TAG, SN76489A, XTAL_17_73447MHz/9) - MCFG_SOUND_CONFIG(psg_intf) + MCFG_SN76496_READY_HANDLER(WRITELINE(laser2001_state, write_psg_ready)) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") diff --git a/src/mess/drivers/m5.c b/src/mess/drivers/m5.c index de02d1f622b..26f995d1776 100644 --- a/src/mess/drivers/m5.c +++ b/src/mess/drivers/m5.c @@ -450,16 +450,6 @@ static TMS9928A_INTERFACE(m5_tms9928a_interface) }; -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - //------------------------------------------------- // I8255_INTERFACE( ppi_intf ) //------------------------------------------------- @@ -653,7 +643,6 @@ static MACHINE_CONFIG_START( m5, m5_state ) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD(SN76489AN_TAG, SN76489A, XTAL_14_31818MHz/4) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) - MCFG_SOUND_CONFIG(psg_intf) // devices MCFG_Z80CTC_ADD(Z80CTC_TAG, XTAL_14_31818MHz/4, ctc_intf) diff --git a/src/mess/drivers/megadriv.c b/src/mess/drivers/megadriv.c index a10b7954654..b87dbea7e1e 100644 --- a/src/mess/drivers/megadriv.c +++ b/src/mess/drivers/megadriv.c @@ -454,11 +454,6 @@ DRIVER_INIT_MEMBER(md_cons_state,md_jpn) /****************************************** 32X emulation ****************************************/ -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - // FIXME: non-softlist loading should keep using ROM_CART_LOAD in the ROM definitions, // once we better integrate softlist with the old loading procedures DEVICE_IMAGE_LOAD_MEMBER( md_base_state, _32x_cart ) @@ -521,7 +516,6 @@ static MACHINE_CONFIG_START( genesis_32x, md_cons_state ) /* sound hardware */ MCFG_SOUND_ADD("snsnd", SEGAPSG, MASTER_CLOCK_NTSC/15) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", (0.25)/2) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", (0.25)/2) @@ -555,7 +549,6 @@ static MACHINE_CONFIG_START( mdj_32x, md_cons_state ) /* sound hardware */ MCFG_SOUND_ADD("snsnd", SEGAPSG, MASTER_CLOCK_NTSC/15) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", (0.25)/2) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", (0.25)/2) @@ -589,7 +582,6 @@ static MACHINE_CONFIG_START( md_32x, md_cons_state ) /* sound hardware */ MCFG_SOUND_ADD("snsnd", SEGAPSG, MASTER_CLOCK_NTSC/15) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", (0.25)/2) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", (0.25)/2) diff --git a/src/mess/drivers/mtx.c b/src/mess/drivers/mtx.c index d76219e8e67..40d63672171 100644 --- a/src/mess/drivers/mtx.c +++ b/src/mess/drivers/mtx.c @@ -329,15 +329,6 @@ static TMS9928A_INTERFACE(mtx_tms9928a_interface) DEVCB_DRIVER_LINE_MEMBER(mtx_state,mtx_tms9929a_interrupt) }; -/*------------------------------------------------- - sn76496_config psg_intf --------------------------------------------------*/ - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - /*************************************************************************** MACHINE DRIVERS @@ -366,7 +357,6 @@ static MACHINE_CONFIG_START( mtx512, mtx_state ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD(SN76489A_TAG, SN76489A, XTAL_4MHz) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) /* devices */ diff --git a/src/mess/drivers/mycom.c b/src/mess/drivers/mycom.c index 7fd0051d4c2..85361029319 100644 --- a/src/mess/drivers/mycom.c +++ b/src/mess/drivers/mycom.c @@ -521,23 +521,6 @@ TIMER_DEVICE_CALLBACK_MEMBER(mycom_state::mycom_kbd) -/************************************* - * - * Sound interface - * - *************************************/ - - -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - static SLOT_INTERFACE_START( mycom_floppies ) SLOT_INTERFACE( "525sd", FLOPPY_525_SD ) SLOT_INTERFACE_END @@ -586,11 +569,12 @@ static MACHINE_CONFIG_START( mycom, mycom_state ) MCFG_MC6845_ADD("crtc", MC6845, "screen", 1008000, mc6845_intf) MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) + MCFG_SOUND_ADD("sn1", SN76489, XTAL_10MHz / 4) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.50) - MCFG_SOUND_CONFIG(psg_intf) /* Devices */ MCFG_MSM5832_ADD("rtc", XTAL_32_768kHz) diff --git a/src/mess/drivers/mz700.c b/src/mess/drivers/mz700.c index dbeeeb19f00..34d48d18fe7 100644 --- a/src/mess/drivers/mz700.c +++ b/src/mess/drivers/mz700.c @@ -313,23 +313,6 @@ static GFXDECODE_START( mz800 ) GFXDECODE_END -/************************************* - * - * Sound interface - * - *************************************/ - - -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - /*************************************************************************** MACHINE DRIVERS ***************************************************************************/ @@ -398,7 +381,6 @@ static MACHINE_CONFIG_DERIVED( mz800, mz700 ) MCFG_SCREEN_UPDATE_DRIVER(mz_state, screen_update_mz800) MCFG_SOUND_ADD("sn76489n", SN76489, XTAL_17_73447MHz/5) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) MCFG_DEVICE_REMOVE("cass_list") diff --git a/src/mess/drivers/pasopia7.c b/src/mess/drivers/pasopia7.c index 25d2f1a2977..2f20534e65f 100644 --- a/src/mess/drivers/pasopia7.c +++ b/src/mess/drivers/pasopia7.c @@ -979,22 +979,6 @@ static SLOT_INTERFACE_START( pasopia7_floppies ) SLOT_INTERFACE( "525hd", FLOPPY_525_HD ) SLOT_INTERFACE_END -/************************************* - * - * Sound interface - * - *************************************/ - - -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - static MACHINE_CONFIG_START( p7_base, pasopia7_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu",Z80, XTAL_4MHz) @@ -1005,12 +989,12 @@ static MACHINE_CONFIG_START( p7_base, pasopia7_state ) /* Audio */ MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("sn1", SN76489A, 1996800) // unknown clock / divider MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) - MCFG_SOUND_CONFIG(psg_intf) + MCFG_SOUND_ADD("sn2", SN76489A, 1996800) // unknown clock / divider MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) - MCFG_SOUND_CONFIG(psg_intf) /* Devices */ MCFG_Z80CTC_ADD( "z80ctc", XTAL_4MHz, z80ctc_intf ) diff --git a/src/mess/drivers/pc.c b/src/mess/drivers/pc.c index d77f15c89b1..914434fa988 100644 --- a/src/mess/drivers/pc.c +++ b/src/mess/drivers/pc.c @@ -789,23 +789,6 @@ static GFXDECODE_START( ibm5150 ) GFXDECODE_END -/************************************* - * - * Sound interface - * - *************************************/ - - -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - static const pc_kbdc_interface pc_kbdc_intf = { DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, pc_state, keyboard_clock_w), @@ -1051,7 +1034,6 @@ static MACHINE_CONFIG_START( t1000hx, tandy_pc_state ) MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80) MCFG_SOUND_ADD("sn76496", NCR7496, XTAL_14_31818MHz/4) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80) MCFG_NVRAM_HANDLER( tandy1000 ) @@ -1121,7 +1103,6 @@ static MACHINE_CONFIG_START( t1000_16, tandy_pc_state ) MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80) MCFG_SOUND_ADD("sn76496", NCR7496, XTAL_14_31818MHz/4) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80) MCFG_NVRAM_HANDLER( tandy1000 ) @@ -1192,7 +1173,6 @@ static MACHINE_CONFIG_START( t1000_286, tandy_pc_state ) MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80) MCFG_SOUND_ADD("sn76496", NCR7496, XTAL_14_31818MHz/4) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80) MCFG_NVRAM_HANDLER( tandy1000 ) @@ -1268,7 +1248,6 @@ static MACHINE_CONFIG_START( ibmpcjr, tandy_pc_state ) MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80) MCFG_SOUND_ADD("sn76496", SN76496, XTAL_14_31818MHz/4) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80) MCFG_NVRAM_HANDLER( tandy1000 ) diff --git a/src/mess/drivers/pencil2.c b/src/mess/drivers/pencil2.c index f3d8459661a..3c9bad31b31 100644 --- a/src/mess/drivers/pencil2.c +++ b/src/mess/drivers/pencil2.c @@ -286,11 +286,6 @@ void pencil2_state::machine_reset() { } -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - static TMS9928A_INTERFACE(pencil2_tms9929a_interface) { 0x4000, // vram size @@ -311,7 +306,6 @@ static MACHINE_CONFIG_START( pencil2, pencil2_state ) // sound hardware MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("sn76489a", SN76489A, XTAL_10_738635MHz/3) // guess - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) diff --git a/src/mess/drivers/pv2000.c b/src/mess/drivers/pv2000.c index a6d4ab95535..5713897b3b2 100644 --- a/src/mess/drivers/pv2000.c +++ b/src/mess/drivers/pv2000.c @@ -346,23 +346,6 @@ static TMS9928A_INTERFACE(pv2000_tms9928a_interface) }; -/************************************* - * - * Sound interface - * - *************************************/ - - -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - void pv2000_state::machine_start() { } @@ -433,9 +416,10 @@ static MACHINE_CONFIG_START( pv2000, pv2000_state ) // sound hardware MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("sn76489a", SN76489A, XTAL_7_15909MHz/2) /* 3.579545 MHz */ - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) + MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) diff --git a/src/mess/drivers/rx78.c b/src/mess/drivers/rx78.c index e07ab25031f..adc12006e91 100644 --- a/src/mess/drivers/rx78.c +++ b/src/mess/drivers/rx78.c @@ -455,16 +455,6 @@ static GFXDECODE_START( rx78 ) GFXDECODE_END -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - static MACHINE_CONFIG_START( rx78, rx78_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu",Z80, MASTER_CLOCK/7) // unknown divider @@ -495,10 +485,11 @@ static MACHINE_CONFIG_START( rx78, rx78_state ) MCFG_CASSETTE_ADD( "cassette", default_cassette_interface ) MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) + MCFG_SOUND_ADD("sn1", SN76489A, XTAL_28_63636MHz/8) // unknown divider - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) /* Software lists */ diff --git a/src/mess/drivers/sg1000.c b/src/mess/drivers/sg1000.c index 36009cf19ac..f44f3e25ede 100644 --- a/src/mess/drivers/sg1000.c +++ b/src/mess/drivers/sg1000.c @@ -680,15 +680,6 @@ static SLOT_INTERFACE_START( sf7000_floppies ) SLOT_INTERFACE( "3ssdd", FLOPPY_3_SSDD ) SLOT_INTERFACE_END -/*------------------------------------------------- - sn76496_config psg_intf --------------------------------------------------*/ - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - /*------------------------------------------------- MACHINE_START( sg1000 ) -------------------------------------------------*/ @@ -797,9 +788,9 @@ static MACHINE_CONFIG_START( sg1000, sg1000_state ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD(SN76489AN_TAG, SN76489A, XTAL_10_738635MHz/3) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) - MCFG_SOUND_CONFIG(psg_intf) /* cartridge */ MCFG_SG1000_CARTRIDGE_ADD(CARTSLOT_TAG, sg1000_cart, NULL) @@ -845,9 +836,9 @@ static MACHINE_CONFIG_START( sc3000, sc3000_state ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD(SN76489AN_TAG, SN76489A, XTAL_10_738635MHz/3) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) - MCFG_SOUND_CONFIG(psg_intf) /* devices */ MCFG_I8255_ADD(UPD9255_TAG, sc3000_ppi_intf) @@ -882,9 +873,9 @@ static MACHINE_CONFIG_START( sf7000, sf7000_state ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD(SN76489AN_TAG, SN76489A, XTAL_10_738635MHz/3) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) - MCFG_SOUND_CONFIG(psg_intf) /* devices */ MCFG_I8255_ADD(UPD9255_0_TAG, sc3000_ppi_intf) diff --git a/src/mess/drivers/smc777.c b/src/mess/drivers/smc777.c index 0ab7e8887c8..b1962fbddd0 100644 --- a/src/mess/drivers/smc777.c +++ b/src/mess/drivers/smc777.c @@ -1069,24 +1069,6 @@ INTERRUPT_GEN_MEMBER(smc777_state::smc777_vblank_irq) } -/************************************* - * - * Sound interface - * - *************************************/ - - - -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - #define MASTER_CLOCK XTAL_4_028MHz static MACHINE_CONFIG_START( smc777, smc777_state ) @@ -1116,7 +1098,6 @@ static MACHINE_CONFIG_START( smc777, smc777_state ) MCFG_SOUND_ADD("sn1", SN76489A, MASTER_CLOCK) // unknown clock / divider MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ADD("beeper", BEEP, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS,"mono",0.50) diff --git a/src/mess/drivers/sms.c b/src/mess/drivers/sms.c index 62cb606bc6b..45510c045d4 100644 --- a/src/mess/drivers/sms.c +++ b/src/mess/drivers/sms.c @@ -465,16 +465,6 @@ static const sega315_5124_interface sms_store_intf = }; -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - static SLOT_INTERFACE_START(sms_cart) SLOT_INTERFACE_INTERNAL("rom", SEGA8_ROM_STD) SLOT_INTERFACE_INTERNAL("codemasters", SEGA8_ROM_CODEMASTERS) @@ -524,9 +514,9 @@ static MACHINE_CONFIG_START( sms_ntsc_base, sms_state ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("segapsg", SEGAPSG, XTAL_53_693175MHz/15) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SMS_CARTRIDGE_ADD("slot", sms_cart, NULL) @@ -634,9 +624,9 @@ static MACHINE_CONFIG_START( sms_sdisp, smssdisp_state ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("segapsg", SEGAPSG, XTAL_53_693175MHz/15) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) - MCFG_SOUND_CONFIG(psg_intf) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -713,9 +703,9 @@ static MACHINE_CONFIG_START( sms_pal_base, sms_state ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("segapsg", SEGAPSG, MASTER_CLOCK_PAL/15) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SMS_CARTRIDGE_ADD("slot", sms_cart, NULL) @@ -841,8 +831,8 @@ static MACHINE_CONFIG_START( gamegear, sms_state ) /* sound hardware */ MCFG_SPEAKER_STANDARD_STEREO("lspeaker","rspeaker") + MCFG_SOUND_ADD("gamegear", GAMEGEAR, XTAL_53_693175MHz/15) - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ROUTE(0, "lspeaker", 1.00) MCFG_SOUND_ROUTE(1, "rspeaker", 1.00) diff --git a/src/mess/drivers/tutor.c b/src/mess/drivers/tutor.c index 73053e36079..0ac1295d48e 100644 --- a/src/mess/drivers/tutor.c +++ b/src/mess/drivers/tutor.c @@ -754,15 +754,6 @@ static INPUT_PORTS_START(pyuutajr) PORT_BIT(0xff, IP_ACTIVE_HIGH, IPT_UNUSED) INPUT_PORTS_END -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - static TMS9995_CONFIG( cpuconf95 ) { DEVCB_NULL, // external op @@ -786,9 +777,10 @@ static MACHINE_CONFIG_START( tutor, tutor_state ) /* sound */ MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("sn76489a", SN76489A, 3579545) /* 3.579545 MHz */ - MCFG_SOUND_CONFIG(psg_intf) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) + MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) diff --git a/src/mess/includes/crvision.h b/src/mess/includes/crvision.h index 48fc102ad1c..2c1775eb351 100644 --- a/src/mess/includes/crvision.h +++ b/src/mess/includes/crvision.h @@ -97,6 +97,7 @@ public: virtual void machine_start(); DECLARE_WRITE_LINE_MEMBER( write_centronics_busy ); + DECLARE_WRITE_LINE_MEMBER( write_psg_ready ); DECLARE_READ8_MEMBER( pia_pa_r ); DECLARE_WRITE8_MEMBER( pia_pa_w ); DECLARE_READ8_MEMBER( pia_pb_r ); @@ -120,6 +121,7 @@ public: required_ioport m_joy2; required_ioport m_joy3; int m_centronics_busy; + int m_psg_ready; }; #endif diff --git a/src/mess/machine/ti99/videowrp.c b/src/mess/machine/ti99/videowrp.c index 78a1a208183..a3879e10c28 100644 --- a/src/mess/machine/ti99/videowrp.c +++ b/src/mess/machine/ti99/videowrp.c @@ -206,10 +206,6 @@ void ti_video_device::device_reset(void) TODO: Seriously consider to simplify this by connecting to the datamux directly. We don't do anything reasonable here. */ -static const sn76496_config sound_config = -{ - DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, ti_sound_system_device, sound_ready), -}; WRITE8_MEMBER( ti_sound_system_device::write ) { @@ -231,16 +227,18 @@ WRITE_LINE_MEMBER( ti_sound_system_device::sound_ready ) MACHINE_CONFIG_FRAGMENT( sn94624 ) MCFG_SPEAKER_STANDARD_MONO("sound_out") + MCFG_SOUND_ADD(TISOUNDCHIP_TAG, SN94624, 3579545/8) /* 3.579545 MHz */ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "sound_out", 0.75) - MCFG_SOUND_CONFIG(sound_config) + MCFG_SN76496_READY_HANDLER(WRITELINE(ti_sound_system_device, sound_ready)) MACHINE_CONFIG_END MACHINE_CONFIG_FRAGMENT( sn76496 ) MCFG_SPEAKER_STANDARD_MONO("sound_out") + MCFG_SOUND_ADD(TISOUNDCHIP_TAG, SN76496, 3579545) /* 3.579545 MHz */ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "sound_out", 0.75) - MCFG_SOUND_CONFIG(sound_config) + MCFG_SN76496_READY_HANDLER(WRITELINE(ti_sound_system_device, sound_ready)) MACHINE_CONFIG_END machine_config_constructor ti_sound_sn94624_device::device_mconfig_additions() const diff --git a/src/mess/machine/wangpckb.c b/src/mess/machine/wangpckb.c index 180fdeb88a3..0ec4aaa7ba2 100644 --- a/src/mess/machine/wangpckb.c +++ b/src/mess/machine/wangpckb.c @@ -109,16 +109,6 @@ static ADDRESS_MAP_START( wangpc_keyboard_io, AS_IO, 8, wangpc_keyboard_device ) ADDRESS_MAP_END -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - - //------------------------------------------------- // MACHINE_DRIVER( wangpc_keyboard ) //------------------------------------------------- @@ -131,7 +121,6 @@ static MACHINE_CONFIG_FRAGMENT( wangpc_keyboard ) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD(SN76496_TAG, SN76496, 2000000) // ??? MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) - MCFG_SOUND_CONFIG(psg_intf) MACHINE_CONFIG_END