diff --git a/src/mame/drivers/circusc.c b/src/mame/drivers/circusc.c index 5d34d258967..28f2c120abf 100644 --- a/src/mame/drivers/circusc.c +++ b/src/mame/drivers/circusc.c @@ -52,7 +52,6 @@ To enter service mode, keep 1&2 pressed on reset #include "machine/konami1.h" #include "cpu/m6809/m6809.h" #include "sound/dac.h" -#include "sound/sn76496.h" #include "sound/discrete.h" #include "includes/circusc.h" @@ -62,8 +61,6 @@ static MACHINE_START( circusc ) circusc_state *state = machine.driver_data(); state->m_audiocpu = machine.device("audiocpu"); - state->m_sn1 = machine.device("sn1"); - state->m_sn2 = machine.device("sn2"); state->m_dac = machine.device("dac"); state->m_discrete = machine.device("fltdisc"); @@ -118,12 +115,12 @@ WRITE8_MEMBER(circusc_state::circusc_sound_w) /* CS3 */ case 1: - sn76496_w(m_sn1, 0, m_sn_latch); + m_sn_1->write(space, 0, m_sn_latch); break; /* CS4 */ case 2: - sn76496_w(m_sn2, 0, m_sn_latch); + m_sn_2->write(space, 0, m_sn_latch); break; /* CS5 */ @@ -302,6 +299,24 @@ static GFXDECODE_START( circusc ) GFXDECODE_ENTRY( "gfx2", 0, spritelayout, 16*16, 16 ) 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)}, @@ -371,10 +386,12 @@ static MACHINE_CONFIG_START( circusc, circusc_state ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") - MCFG_SOUND_ADD("sn1", SN76496, XTAL_14_31818MHz/8) + MCFG_SOUND_ADD("sn1", SN76496_NEW, 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_ADD("sn2", SN76496_NEW, 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/gberet.c b/src/mame/drivers/gberet.c index df21ed3f554..eefcf23e975 100644 --- a/src/mame/drivers/gberet.c +++ b/src/mame/drivers/gberet.c @@ -145,7 +145,7 @@ WRITE8_MEMBER(gberet_state::gberet_flipscreen_w) WRITE8_MEMBER(gberet_state::gberet_sound_w) { - sn76496_w(machine().device("snsnd"), 0, *m_soundlatch); + m_sn->write(space, 0, *m_soundlatch); } static ADDRESS_MAP_START( gberet_map, AS_PROGRAM, 8, gberet_state ) @@ -218,7 +218,7 @@ static ADDRESS_MAP_START( gberetb_map, AS_PROGRAM, 8, gberet_state ) AM_RANGE(0xe900, 0xe9ff) AM_RAM AM_SHARE("spriteram") AM_RANGE(0xf000, 0xf000) AM_WRITENOP // coin counter not supported AM_RANGE(0xf200, 0xf200) AM_READ_PORT("DSW2") - AM_RANGE(0xf400, 0xf400) AM_DEVWRITE_LEGACY("snsnd", sn76496_w) + AM_RANGE(0xf400, 0xf400) AM_DEVWRITE("snsnd", sn76489a_new_device, write) AM_RANGE(0xf600, 0xf600) AM_READ_PORT("P2") AM_RANGE(0xf601, 0xf601) AM_READ_PORT("DSW1") AM_RANGE(0xf602, 0xf602) AM_READ_PORT("P1") @@ -379,6 +379,23 @@ static GFXDECODE_START( gberetb ) GFXDECODE_END +/************************************* + * + * Sound interface + * + *************************************/ + + +//------------------------------------------------- +// sn76496_config psg_intf +//------------------------------------------------- + +static const sn76496_config psg_intf = +{ + DEVCB_NULL +}; + + /************************************* * * Machine drivers @@ -430,8 +447,9 @@ static MACHINE_CONFIG_START( gberet, gberet_state ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") - MCFG_SOUND_ADD("snsnd", SN76489A, XTAL_18_432MHz/12) /* type verified on real and bootleg pcb */ + MCFG_SOUND_ADD("snsnd", SN76489A_NEW, 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 ) @@ -469,8 +487,9 @@ static MACHINE_CONFIG_START( gberetb, gberet_state ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") - MCFG_SOUND_ADD("snsnd", SN76489A, XTAL_20MHz/12) // divider guessed + MCFG_SOUND_ADD("snsnd", SN76489A_NEW, 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/guab.c b/src/mame/drivers/guab.c index 668fa9e3166..777b1d1becf 100644 --- a/src/mame/drivers/guab.c +++ b/src/mame/drivers/guab.c @@ -76,8 +76,12 @@ class guab_state : public driver_device { public: guab_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) { } - + : driver_device(mconfig, type, tag) , + m_sn(*this, "snsnd") { } + + /* devices */ + required_device m_sn; + struct ef9369 m_pal; emu_timer *m_fdc_timer; struct wd1770 m_fdc; @@ -651,7 +655,7 @@ WRITE16_MEMBER(guab_state::io_w) } case 0x30: { - sn76496_w(machine().device("snsnd"), 0, data & 0xff); + m_sn->write(space, 0, data & 0xff); break; } case 0x31: @@ -772,6 +776,23 @@ static INPUT_PORTS_START( tenup ) INPUT_PORTS_END +/************************************* + * + * Sound interface + * + *************************************/ + + +//------------------------------------------------- +// sn76496_config psg_intf +//------------------------------------------------- + +static const sn76496_config psg_intf = +{ + DEVCB_NULL +}; + + /************************************* * * Machine driver @@ -813,8 +834,9 @@ static MACHINE_CONFIG_START( guab, guab_state ) MCFG_SPEAKER_STANDARD_MONO("mono") /* TODO: Verify clock */ - MCFG_SOUND_ADD("snsnd", SN76489, 2000000) + MCFG_SOUND_ADD("snsnd", SN76489_NEW, 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 18841b56d43..c2ef47f023b 100644 --- a/src/mame/drivers/homedata.c +++ b/src/mame/drivers/homedata.c @@ -222,7 +222,6 @@ Custom: GX61A01 #include "includes/homedata.h" #include "sound/dac.h" #include "sound/2203intf.h" -#include "sound/sn76496.h" static INTERRUPT_GEN( homedata_irq ) { @@ -499,7 +498,7 @@ WRITE8_MEMBER(homedata_state::pteacher_upd7807_portc_w) coin_counter_w(machine(), 0, ~data & 0x80); if (BIT(m_upd7807_portc, 5) && !BIT(data, 5)) /* clock 1->0 */ - sn76496_w(m_sn, 0, m_upd7807_porta); + m_sn->write(space, 0, m_upd7807_porta); m_upd7807_portc = data; } @@ -537,7 +536,7 @@ static ADDRESS_MAP_START( mrokumei_map, AS_PROGRAM, 8, homedata_state ) AM_RANGE(0x8000, 0x8000) AM_WRITE(mrokumei_blitter_start_w) // in some games also ROM bank switch to access service ROM AM_RANGE(0x8001, 0x8001) AM_WRITE(mrokumei_keyboard_select_w) AM_RANGE(0x8002, 0x8002) AM_WRITE(mrokumei_sound_cmd_w) - AM_RANGE(0x8003, 0x8003) AM_DEVWRITE_LEGACY("snsnd", sn76496_w) + AM_RANGE(0x8003, 0x8003) AM_DEVWRITE("snsnd", sn76489a_new_device, write) AM_RANGE(0x8006, 0x8006) AM_WRITE(homedata_blitter_param_w) AM_RANGE(0x8007, 0x8007) AM_WRITE(mrokumei_blitter_bank_w) AM_RANGE(0x8000, 0xffff) AM_ROM @@ -1124,6 +1123,22 @@ static GFXDECODE_START( lemnangl ) GFXDECODE_END +/************************************* + * + * Sound interface + * + *************************************/ + + +//------------------------------------------------- +// sn76496_config psg_intf +//------------------------------------------------- + +static const sn76496_config psg_intf = +{ + DEVCB_NULL +}; + static MACHINE_START( homedata ) { @@ -1132,7 +1147,7 @@ static MACHINE_START( homedata ) state->m_maincpu = machine.device("maincpu"); state->m_audiocpu = machine.device("audiocpu"); state->m_ym = machine.device("ymsnd"); - state->m_sn = machine.device("snsnd"); + state->m_sn = machine.device("snsnd"); state->m_dac = machine.device("dac"); state->save_item(NAME(state->m_visible_page)); @@ -1265,8 +1280,9 @@ static MACHINE_CONFIG_START( mrokumei, homedata_state ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") - MCFG_SOUND_ADD("snsnd", SN76489A, 16000000/4) // SN76489AN actually + MCFG_SOUND_ADD("snsnd", SN76489A_NEW, 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) @@ -1384,8 +1400,9 @@ static MACHINE_CONFIG_START( pteacher, homedata_state ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") - MCFG_SOUND_ADD("snsnd", SN76489A, 16000000/4) // SN76489AN actually + MCFG_SOUND_ADD("snsnd", SN76489A_NEW, 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/lasso.c b/src/mame/drivers/lasso.c index b4f2ad77690..7f8126bb4b2 100644 --- a/src/mame/drivers/lasso.c +++ b/src/mame/drivers/lasso.c @@ -32,7 +32,6 @@ DIP locations verified for: #include "cpu/m6502/m6502.h" #include "cpu/z80/z80.h" #include "sound/dac.h" -#include "sound/sn76496.h" #include "sound/ay8910.h" #include "includes/lasso.h" @@ -69,10 +68,10 @@ WRITE8_MEMBER(lasso_state::sound_select_w) UINT8 to_write = BITSWAP8(*m_chip_data, 0, 1, 2, 3, 4, 5, 6, 7); if (~data & 0x01) /* chip #0 */ - sn76496_w(m_sn_1, 0, to_write); + m_sn_1->write(space, 0, to_write); if (~data & 0x02) /* chip #1 */ - sn76496_w(m_sn_2, 0, to_write); + m_sn_2->write(space, 0, to_write); } @@ -459,6 +458,22 @@ static GFXDECODE_START( pinbo ) GFXDECODE_END +/************************************* + * + * Sound interface + * + *************************************/ + + +//------------------------------------------------- +// sn76496_config psg_intf +//------------------------------------------------- + +static const sn76496_config psg_intf = +{ + DEVCB_NULL +}; + static MACHINE_START( lasso ) { @@ -466,9 +481,7 @@ static MACHINE_START( lasso ) state->m_maincpu = machine.device("maincpu"); state->m_audiocpu = machine.device("audiocpu"); - state->m_sn_1 = machine.device("sn76489.1"); - state->m_sn_2 = machine.device("sn76489.2"); - + state->save_item(NAME(state->m_gfxbank)); } @@ -529,11 +542,13 @@ static MACHINE_CONFIG_START( base, lasso_state ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") - MCFG_SOUND_ADD("sn76489.1", SN76489, 2000000) + MCFG_SOUND_ADD("sn76489.1", SN76489_NEW, 2000000) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) + MCFG_SOUND_CONFIG(psg_intf) - MCFG_SOUND_ADD("sn76489.2", SN76489, 2000000) + MCFG_SOUND_ADD("sn76489.2", SN76489_NEW, 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/segag80r.c b/src/mame/drivers/segag80r.c index bf7ea0a245b..da6e2213fe4 100644 --- a/src/mame/drivers/segag80r.c +++ b/src/mame/drivers/segag80r.c @@ -301,13 +301,11 @@ WRITE8_MEMBER(segag80r_state::sindbadm_misc_w) /* the data lines are flipped */ WRITE8_MEMBER(segag80r_state::sindbadm_sn1_SN76496_w) { - device_t *device = machine().device("sn1"); - sn76496_w(device, offset, BITSWAP8(data, 0,1,2,3,4,5,6,7)); + m_sn1->write(space, offset, BITSWAP8(data, 0,1,2,3,4,5,6,7)); } WRITE8_MEMBER(segag80r_state::sindbadm_sn2_SN76496_w) { - device_t *device = machine().device("sn2"); - sn76496_w(device, offset, BITSWAP8(data, 0,1,2,3,4,5,6,7)); + m_sn2->write(space, offset, BITSWAP8(data, 0,1,2,3,4,5,6,7)); } @@ -816,6 +814,22 @@ static GFXDECODE_START( monsterb ) GFXDECODE_END +/************************************* + * + * Sound interface + * + *************************************/ + + +//------------------------------------------------- +// sn76496_config psg_intf +//------------------------------------------------- + +static const sn76496_config psg_intf = +{ + DEVCB_NULL +}; + /************************************* * @@ -934,11 +948,13 @@ static MACHINE_CONFIG_DERIVED( sindbadm, g80r_base ) MCFG_CPU_PERIODIC_INT(irq0_line_hold,4*60) /* sound hardware */ - MCFG_SOUND_ADD("sn1", SN76496, SINDBADM_SOUND_CLOCK/4) + MCFG_SOUND_ADD("sn1", SN76496_NEW, 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_ADD("sn2", SN76496_NEW, 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/spcforce.c b/src/mame/drivers/spcforce.c index f6a18a6c3c3..a4ee6768313 100644 --- a/src/mame/drivers/spcforce.c +++ b/src/mame/drivers/spcforce.c @@ -36,7 +36,6 @@ TODO: #include "emu.h" #include "cpu/i8085/i8085.h" #include "cpu/mcs48/mcs48.h" -#include "sound/sn76496.h" #include "includes/spcforce.h" @@ -49,9 +48,10 @@ WRITE8_MEMBER(spcforce_state::spcforce_SN76496_latch_w) READ8_MEMBER(spcforce_state::spcforce_SN76496_select_r) { - if (~m_sn76496_select & 0x40) return sn76496_ready_r(machine().device("sn1")); - if (~m_sn76496_select & 0x20) return sn76496_ready_r(machine().device("sn2")); - if (~m_sn76496_select & 0x10) return sn76496_ready_r(machine().device("sn3")); + 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(); + return 0; } @@ -61,9 +61,10 @@ WRITE8_MEMBER(spcforce_state::spcforce_SN76496_select_w) m_sn76496_select = data; - if (~data & 0x40) sn76496_w(machine().device("sn1"), 0, m_sn76496_latch); - if (~data & 0x20) sn76496_w(machine().device("sn2"), 0, m_sn76496_latch); - if (~data & 0x10) sn76496_w(machine().device("sn3"), 0, m_sn76496_latch); + 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) @@ -241,6 +242,17 @@ static PALETTE_INIT( spcforce ) } } + +//------------------------------------------------- +// sn76496_config psg_intf +//------------------------------------------------- + +static const sn76496_config psg_intf = +{ + DEVCB_NULL +}; + + static INTERRUPT_GEN( vblank_irq ) { spcforce_state *state = device->machine().driver_data(); @@ -277,14 +289,17 @@ static MACHINE_CONFIG_START( spcforce, spcforce_state ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") - MCFG_SOUND_ADD("sn1", SN76496, 2000000) + MCFG_SOUND_ADD("sn1", SN76496_NEW, 2000000) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) + MCFG_SOUND_CONFIG(psg_intf) - MCFG_SOUND_ADD("sn2", SN76496, 2000000) + MCFG_SOUND_ADD("sn2", SN76496_NEW, 2000000) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) + MCFG_SOUND_CONFIG(psg_intf) - MCFG_SOUND_ADD("sn3", SN76496, 2000000) + MCFG_SOUND_ADD("sn3", SN76496_NEW, 2000000) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) + MCFG_SOUND_CONFIG(psg_intf) MACHINE_CONFIG_END diff --git a/src/mame/includes/circusc.h b/src/mame/includes/circusc.h index d1a3a443751..88ac954b7c9 100644 --- a/src/mame/includes/circusc.h +++ b/src/mame/includes/circusc.h @@ -5,6 +5,7 @@ *************************************************************************/ #include "sound/dac.h" +#include "sound/sn76496.h" class circusc_state : public driver_device { @@ -16,7 +17,9 @@ public: m_colorram(*this, "colorram"), m_videoram(*this, "videoram"), m_spriteram_2(*this, "spriteram_2"), - m_spriteram(*this, "spriteram"){ } + m_spriteram(*this, "spriteram"), + m_sn_1(*this, "sn1"), + m_sn_2(*this, "sn2"){ } /* memory pointers */ required_shared_ptr m_spritebank; @@ -34,8 +37,8 @@ public: /* devices */ cpu_device *m_audiocpu; - device_t *m_sn1; - device_t *m_sn2; + required_device m_sn_1; + required_device m_sn_2; dac_device *m_dac; device_t *m_discrete; diff --git a/src/mame/includes/gberet.h b/src/mame/includes/gberet.h index e5821be6e8c..389389c9ecd 100644 --- a/src/mame/includes/gberet.h +++ b/src/mame/includes/gberet.h @@ -4,6 +4,8 @@ ***************************************************************************/ +#include "sound/sn76496.h" + class gberet_state : public driver_device { public: @@ -14,7 +16,8 @@ public: m_spriteram2(*this, "spriteram2"), m_spriteram(*this, "spriteram"), m_scrollram(*this, "scrollram"), - m_soundlatch(*this, "soundlatch"){ } + m_soundlatch(*this, "soundlatch"), + m_sn(*this, "snsnd") { } /* memory pointers */ required_shared_ptr m_colorram; @@ -23,6 +26,9 @@ public: required_shared_ptr m_spriteram; optional_shared_ptr m_scrollram; optional_shared_ptr m_soundlatch; + + /* devices */ + required_device m_sn; /* video-related */ tilemap_t * m_bg_tilemap; diff --git a/src/mame/includes/homedata.h b/src/mame/includes/homedata.h index 08fb176fcbf..9371740906e 100644 --- a/src/mame/includes/homedata.h +++ b/src/mame/includes/homedata.h @@ -1,4 +1,5 @@ #include "sound/dac.h" +#include "sound/sn76496.h" class homedata_state : public driver_device { @@ -6,7 +7,7 @@ public: homedata_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_vreg(*this, "vreg"), - m_videoram(*this, "videoram"){ } + m_videoram(*this, "videoram") {} /* memory pointers */ optional_shared_ptr m_vreg; @@ -39,7 +40,7 @@ public: device_t *m_audiocpu; dac_device *m_dac; device_t *m_ym; - device_t *m_sn; + sn76489a_new_device *m_sn; UINT8 m_prot_data; DECLARE_READ8_MEMBER(mrokumei_keyboard_r); DECLARE_WRITE8_MEMBER(mrokumei_keyboard_select_w); diff --git a/src/mame/includes/lasso.h b/src/mame/includes/lasso.h index e2ae9c242aa..069880fb2f0 100644 --- a/src/mame/includes/lasso.h +++ b/src/mame/includes/lasso.h @@ -4,6 +4,8 @@ ***************************************************************************/ +#include "sound/sn76496.h" + class lasso_state : public driver_device { public: @@ -16,7 +18,9 @@ public: m_chip_data(*this, "chip_data"), m_bitmap_ram(*this, "bitmap_ram"), m_last_colors(*this, "last_colors"), - m_track_scroll(*this, "track_scroll"){ } + m_track_scroll(*this, "track_scroll"), + m_sn_1(*this, "sn76489.1"), + m_sn_2(*this, "sn76489.2"){ } /* memory pointers */ required_shared_ptr m_videoram; @@ -37,8 +41,8 @@ public: /* devices */ device_t *m_maincpu; device_t *m_audiocpu; - device_t *m_sn_1; - device_t *m_sn_2; + optional_device m_sn_1; + optional_device m_sn_2; DECLARE_WRITE8_MEMBER(sound_command_w); DECLARE_WRITE8_MEMBER(pinbo_sound_command_w); DECLARE_READ8_MEMBER(sound_status_r); diff --git a/src/mame/includes/segag80r.h b/src/mame/includes/segag80r.h index 1a6ed0d4b24..b7d614275dc 100644 --- a/src/mame/includes/segag80r.h +++ b/src/mame/includes/segag80r.h @@ -5,6 +5,7 @@ *************************************************************************/ #include "machine/segag80.h" +#include "sound/sn76496.h" class segag80r_state : public driver_device { @@ -12,10 +13,15 @@ public: segag80r_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_mainram(*this, "mainram"), - m_videoram(*this, "videoram"){ } - + m_videoram(*this, "videoram"), + m_sn1(*this, "sn1"), + m_sn2(*this, "sn2"){ } + required_shared_ptr m_mainram; required_shared_ptr m_videoram; + + optional_device m_sn1; + optional_device m_sn2; UINT8 m_sound_state[2]; UINT8 m_sound_rate; diff --git a/src/mame/includes/spcforce.h b/src/mame/includes/spcforce.h index 78b9251dca3..60272ef52af 100644 --- a/src/mame/includes/spcforce.h +++ b/src/mame/includes/spcforce.h @@ -1,3 +1,5 @@ +#include "sound/sn76496.h" + class spcforce_state : public driver_device { public: @@ -5,12 +7,20 @@ public: : driver_device(mconfig, type, tag) , m_scrollram(*this, "scrollram"), m_videoram(*this, "videoram"), - m_colorram(*this, "colorram"){ } + m_colorram(*this, "colorram"), + m_sn1(*this, "sn1"), + m_sn2(*this, "sn2"), + m_sn3(*this, "sn3"){ } + required_shared_ptr m_scrollram; required_shared_ptr m_videoram; required_shared_ptr m_colorram; + required_device m_sn1; + required_device m_sn2; + required_device m_sn3; + int m_sn76496_latch; int m_sn76496_select;