From ca6ce00018aece06f9b953625b040585f604e248 Mon Sep 17 00:00:00 2001 From: Scott Stone Date: Sat, 25 Aug 2012 12:53:02 +0000 Subject: [PATCH] Continuing new device implementation for SN76496 and clones - sbugger.c, finalizr.c, pingpong.c, galaxold.c, spaceg.c, sg1000a.c, zaxxon.c, retofinv.c, senjyo.c, mrjong.c, sprcros2.c [Osso] --- src/mame/drivers/finalizr.c | 21 +++++++++++++++++-- src/mame/drivers/galaxold.c | 40 ++++++++++++++++++++++++++++--------- src/mame/drivers/jpmmps.c | 21 ++++++++++++++++++- src/mame/drivers/mrjong.c | 29 ++++++++++++++++++++++----- src/mame/drivers/pingpong.c | 23 ++++++++++++++++++--- src/mame/drivers/retofinv.c | 30 +++++++++++++++++++++++----- src/mame/drivers/sbugger.c | 30 ++++++++++++++++++++++------ src/mame/drivers/senjyo.c | 37 +++++++++++++++++++++++++--------- src/mame/drivers/sg1000a.c | 23 +++++++++++++++++++-- src/mame/drivers/spaceg.c | 26 +++++++++++++++++++++--- src/mame/drivers/sprcros2.c | 32 +++++++++++++++++++++++------ src/mame/drivers/zaxxon.c | 29 ++++++++++++++++++++++----- 12 files changed, 285 insertions(+), 56 deletions(-) diff --git a/src/mame/drivers/finalizr.c b/src/mame/drivers/finalizr.c index 324b03390e6..8c00dc7f582 100644 --- a/src/mame/drivers/finalizr.c +++ b/src/mame/drivers/finalizr.c @@ -106,7 +106,7 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, finalizr_state ) AM_RANGE(0x0813, 0x0813) AM_READ_PORT("DSW1") AM_RANGE(0x0818, 0x0818) AM_WRITE(watchdog_reset_w) AM_RANGE(0x0819, 0x0819) AM_WRITE(finalizr_coin_w) - AM_RANGE(0x081a, 0x081a) AM_DEVWRITE_LEGACY("snsnd", sn76496_w) /* This address triggers the SN chip to read the data port. */ + AM_RANGE(0x081a, 0x081a) AM_DEVWRITE("snsnd", sn76489a_new_device, write) /* This address triggers the SN chip to read the data port. */ AM_RANGE(0x081b, 0x081b) AM_WRITENOP /* Loads the snd command into the snd latch */ AM_RANGE(0x081c, 0x081c) AM_WRITE(finalizr_i8039_irq_w) /* custom sound chip */ AM_RANGE(0x081d, 0x081d) AM_WRITE(soundlatch_byte_w) /* custom sound chip */ @@ -235,6 +235,22 @@ static GFXDECODE_START( finalizr ) GFXDECODE_END +/************************************* + * + * Sound interface + * + *************************************/ + + +//------------------------------------------------- +// sn76496_config psg_intf +//------------------------------------------------- + +static const sn76496_config psg_intf = +{ + DEVCB_NULL +}; + static MACHINE_START( finalizr ) { @@ -291,8 +307,9 @@ static MACHINE_CONFIG_START( finalizr, finalizr_state ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") - MCFG_SOUND_ADD("snsnd", SN76489A, XTAL_18_432MHz/12) + MCFG_SOUND_ADD("snsnd", SN76489A_NEW, 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/galaxold.c b/src/mame/drivers/galaxold.c index d058969dfe0..cc3b3cb650b 100644 --- a/src/mame/drivers/galaxold.c +++ b/src/mame/drivers/galaxold.c @@ -886,9 +886,9 @@ static ADDRESS_MAP_START( racknrol, AS_PROGRAM, 8, galaxold_state ) ADDRESS_MAP_END static ADDRESS_MAP_START( racknrol_io, AS_IO, 8, galaxold_state ) - AM_RANGE(0x1d, 0x1d) AM_DEVWRITE_LEGACY("sn1", sn76496_w) - AM_RANGE(0x1e, 0x1e) AM_DEVWRITE_LEGACY("sn2", sn76496_w) - AM_RANGE(0x1f, 0x1f) AM_DEVWRITE_LEGACY("sn3", sn76496_w) + AM_RANGE(0x1d, 0x1d) AM_DEVWRITE("sn1", sn76496_new_device, write) + AM_RANGE(0x1e, 0x1e) AM_DEVWRITE("sn2", sn76496_new_device, write) + AM_RANGE(0x1f, 0x1f) AM_DEVWRITE("sn3", sn76496_new_device, write) AM_RANGE(0x20, 0x3f) AM_WRITE(racknrol_tiles_bank_w) AM_SHARE("racknrol_tbank") AM_RANGE(S2650_SENSE_PORT, S2650_SENSE_PORT) AM_READ_PORT("SENSE") ADDRESS_MAP_END @@ -910,7 +910,7 @@ READ8_MEMBER(galaxold_state::hexpoola_data_port_r) static ADDRESS_MAP_START( hexpoola_io, AS_IO, 8, galaxold_state ) AM_RANGE(0x00, 0x00) AM_READNOP AM_RANGE(0x20, 0x3f) AM_WRITE(racknrol_tiles_bank_w) AM_SHARE("racknrol_tbank") - AM_RANGE(S2650_DATA_PORT, S2650_DATA_PORT) AM_READ(hexpoola_data_port_r) AM_DEVWRITE_LEGACY("snsnd", sn76496_w) + AM_RANGE(S2650_DATA_PORT, S2650_DATA_PORT) AM_READ(hexpoola_data_port_r) AM_DEVWRITE("snsnd", sn76496_new_device, write) AM_RANGE(S2650_SENSE_PORT, S2650_SENSE_PORT) AM_READ_PORT("SENSE") ADDRESS_MAP_END @@ -938,7 +938,7 @@ READ8_MEMBER(galaxold_state::bullsdrtg_data_port_r) static ADDRESS_MAP_START( bullsdrtg_io_map, AS_IO, 8, galaxold_state ) AM_RANGE(0x00, 0x00) AM_READNOP AM_RANGE(0x20, 0x3f) AM_WRITE(racknrol_tiles_bank_w) AM_SHARE("racknrol_tbank") - AM_RANGE(S2650_DATA_PORT, S2650_DATA_PORT) AM_READ(bullsdrtg_data_port_r) AM_DEVWRITE_LEGACY("snsnd", sn76496_w) + AM_RANGE(S2650_DATA_PORT, S2650_DATA_PORT) AM_READ(bullsdrtg_data_port_r) AM_DEVWRITE("snsnd", sn76496_new_device, write) AM_RANGE(S2650_SENSE_PORT, S2650_SENSE_PORT) AM_READ_PORT("SENSE") ADDRESS_MAP_END @@ -2139,6 +2139,24 @@ static GFXDECODE_START( _4in1 ) GFXDECODE_ENTRY( "gfx1", 0x4000, _4in1_spritelayout, 0, 8 ) GFXDECODE_END + +/************************************* + * + * Sound interface + * + *************************************/ + + +//------------------------------------------------- +// sn76496_config psg_intf +//------------------------------------------------- + +static const sn76496_config psg_intf = +{ + DEVCB_NULL +}; + + static const ay8910_interface bongo_ay8910_interface = { AY8910_LEGACY_OUTPUT, @@ -2429,14 +2447,17 @@ static MACHINE_CONFIG_START( racknrol, galaxold_state ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") - MCFG_SOUND_ADD("sn1", SN76496, PIXEL_CLOCK/2) + MCFG_SOUND_ADD("sn1", SN76496_NEW, PIXEL_CLOCK/2) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) + MCFG_SOUND_CONFIG(psg_intf) - MCFG_SOUND_ADD("sn2", SN76496, PIXEL_CLOCK/2) + MCFG_SOUND_ADD("sn2", SN76496_NEW, PIXEL_CLOCK/2) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) + MCFG_SOUND_CONFIG(psg_intf) - MCFG_SOUND_ADD("sn3", SN76496, PIXEL_CLOCK/2) + MCFG_SOUND_ADD("sn3", SN76496_NEW, PIXEL_CLOCK/2) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) + MCFG_SOUND_CONFIG(psg_intf) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( ckongg, galaxian ) @@ -2484,8 +2505,9 @@ static MACHINE_CONFIG_START( hexpoola, galaxold_state ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") - MCFG_SOUND_ADD("snsnd", SN76496, PIXEL_CLOCK/2) + MCFG_SOUND_ADD("snsnd", SN76496_NEW, PIXEL_CLOCK/2) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) + MCFG_SOUND_CONFIG(psg_intf) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( bullsdrtg, hexpoola ) diff --git a/src/mame/drivers/jpmmps.c b/src/mame/drivers/jpmmps.c index a62bafd6ade..8a9ac38a49b 100644 --- a/src/mame/drivers/jpmmps.c +++ b/src/mame/drivers/jpmmps.c @@ -146,6 +146,24 @@ static const tms9902_interface tms9902_uart2_ic5_params = #define SOUND_CLOCK 2000000 #define DUART_CLOCK 2000000 + +/************************************* + * + * Sound interface + * + *************************************/ + + +//------------------------------------------------- +// sn76496_config psg_intf +//------------------------------------------------- + +static const sn76496_config psg_intf = +{ + DEVCB_NULL +}; + + static MACHINE_CONFIG_START( jpmmps, jpmmps_state ) /* basic machine hardware */ @@ -164,8 +182,9 @@ static MACHINE_CONFIG_START( jpmmps, jpmmps_state ) MCFG_SPEAKER_STANDARD_MONO("mono") - MCFG_SOUND_ADD("sn", SN76489, SOUND_CLOCK) + MCFG_SOUND_ADD("sn", SN76489_NEW, SOUND_CLOCK) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) + MCFG_SOUND_CONFIG(psg_intf) MACHINE_CONFIG_END diff --git a/src/mame/drivers/mrjong.c b/src/mame/drivers/mrjong.c index f3f5f8b9135..bc0b8be5921 100644 --- a/src/mame/drivers/mrjong.c +++ b/src/mame/drivers/mrjong.c @@ -78,8 +78,8 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( mrjong_io_map, AS_IO, 8, mrjong_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x00, 0x00) AM_READ_PORT("P2") AM_WRITE(mrjong_flipscreen_w) - AM_RANGE(0x01, 0x01) AM_READ_PORT("P1") AM_DEVWRITE_LEGACY("sn1", sn76496_w) - AM_RANGE(0x02, 0x02) AM_READ_PORT("DSW") AM_DEVWRITE_LEGACY("sn2", sn76496_w) + AM_RANGE(0x01, 0x01) AM_READ_PORT("P1") AM_DEVWRITE("sn1", sn76489_new_device, write) + AM_RANGE(0x02, 0x02) AM_READ_PORT("DSW") AM_DEVWRITE("sn2", sn76489_new_device, write) AM_RANGE(0x03, 0x03) AM_READ(io_0x03_r) // Unknown ADDRESS_MAP_END @@ -172,6 +172,23 @@ static GFXDECODE_START( mrjong ) GFXDECODE_END +/************************************* + * + * Sound interface + * + *************************************/ + + +//------------------------------------------------- +// sn76496_config psg_intf +//------------------------------------------------- + +static const sn76496_config psg_intf = +{ + DEVCB_NULL +}; + + /************************************* * * Machine driver @@ -203,11 +220,13 @@ static MACHINE_CONFIG_START( mrjong, mrjong_state ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") - MCFG_SOUND_ADD("sn1", SN76489, 15468000/6) + MCFG_SOUND_ADD("sn1", SN76489_NEW, 15468000/6) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - - MCFG_SOUND_ADD("sn2", SN76489, 15468000/6) + MCFG_SOUND_CONFIG(psg_intf) + + MCFG_SOUND_ADD("sn2", SN76489_NEW, 15468000/6) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) + MCFG_SOUND_CONFIG(psg_intf) MACHINE_CONFIG_END diff --git a/src/mame/drivers/pingpong.c b/src/mame/drivers/pingpong.c index b3988575e05..b5690ade462 100644 --- a/src/mame/drivers/pingpong.c +++ b/src/mame/drivers/pingpong.c @@ -98,7 +98,7 @@ static ADDRESS_MAP_START( pingpong_map, AS_PROGRAM, 8, pingpong_state ) AM_RANGE(0xa980, 0xa980) AM_READ_PORT("DSW2") AM_RANGE(0xa000, 0xa000) AM_WRITE(coin_w) /* coin counters + irq enables */ AM_RANGE(0xa200, 0xa200) AM_WRITENOP /* SN76496 data latch */ - AM_RANGE(0xa400, 0xa400) AM_DEVWRITE_LEGACY("snsnd", sn76496_w) /* trigger read */ + AM_RANGE(0xa400, 0xa400) AM_DEVWRITE("snsnd", sn76496_new_device, write) /* trigger read */ AM_RANGE(0xa600, 0xa600) AM_WRITE(watchdog_reset_w) ADDRESS_MAP_END @@ -119,7 +119,7 @@ static ADDRESS_MAP_START( merlinmm_map, AS_PROGRAM, 8, pingpong_state ) AM_RANGE(0xa100, 0xa100) AM_READ_PORT("IN2") AM_RANGE(0xa180, 0xa180) AM_READ_PORT("IN3") AM_RANGE(0xa200, 0xa200) AM_WRITENOP /* SN76496 data latch */ - AM_RANGE(0xa400, 0xa400) AM_DEVWRITE_LEGACY("snsnd", sn76496_w) /* trigger read */ + AM_RANGE(0xa400, 0xa400) AM_DEVWRITE("snsnd", sn76496_new_device, write) /* trigger read */ AM_RANGE(0xa600, 0xa600) AM_WRITE(watchdog_reset_w) ADDRESS_MAP_END @@ -442,6 +442,22 @@ 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 ) @@ -467,8 +483,9 @@ static MACHINE_CONFIG_START( pingpong, pingpong_state ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") - MCFG_SOUND_ADD("snsnd", SN76496, 18432000/8) + MCFG_SOUND_ADD("snsnd", SN76496_NEW, 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 d8bd0add2fb..1bc559dc412 100644 --- a/src/mame/drivers/retofinv.c +++ b/src/mame/drivers/retofinv.c @@ -137,8 +137,8 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, retofinv_state ) AM_RANGE(0x2000, 0x27ff) AM_RAM AM_RANGE(0x4000, 0x4000) AM_READ(soundlatch_byte_r) AM_RANGE(0x6000, 0x6000) AM_WRITE(cpu2_m6000_w) - AM_RANGE(0x8000, 0x8000) AM_DEVWRITE_LEGACY("sn1", sn76496_w) - AM_RANGE(0xa000, 0xa000) AM_DEVWRITE_LEGACY("sn2", sn76496_w) + AM_RANGE(0x8000, 0x8000) AM_DEVWRITE("sn1", sn76496_new_device, write) + AM_RANGE(0xa000, 0xa000) AM_DEVWRITE("sn2", sn76496_new_device, write) AM_RANGE(0xe000, 0xffff) AM_ROM /* space for diagnostic ROM */ ADDRESS_MAP_END @@ -344,6 +344,24 @@ static INTERRUPT_GEN( sub_vblank_irq ) device_set_input_line(device, 0, ASSERT_LINE); } + +/************************************* + * + * Sound interface + * + *************************************/ + + +//------------------------------------------------- +// sn76496_config psg_intf +//------------------------------------------------- + +static const sn76496_config psg_intf = +{ + DEVCB_NULL +}; + + static MACHINE_CONFIG_START( retofinv, retofinv_state ) /* basic machine hardware */ @@ -381,11 +399,13 @@ static MACHINE_CONFIG_START( retofinv, retofinv_state ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") - MCFG_SOUND_ADD("sn1", SN76496, 18432000/6) + MCFG_SOUND_ADD("sn1", SN76496_NEW, 18432000/6) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80) - - MCFG_SOUND_ADD("sn2", SN76496, 18432000/6) + MCFG_SOUND_CONFIG(psg_intf) + + MCFG_SOUND_ADD("sn2", SN76496_NEW, 18432000/6) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80) + MCFG_SOUND_CONFIG(psg_intf) MACHINE_CONFIG_END diff --git a/src/mame/drivers/sbugger.c b/src/mame/drivers/sbugger.c index a1b9f02c96e..ff510032c1d 100644 --- a/src/mame/drivers/sbugger.c +++ b/src/mame/drivers/sbugger.c @@ -116,8 +116,8 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sbugger_io_map, AS_IO, 8, sbugger_state ) AM_RANGE(0xe0, 0xe7) AM_DEVREADWRITE("i8156", i8155_device, io_r, io_w) - AM_RANGE(0xe8, 0xe8) AM_DEVWRITE_LEGACY("sn76489.1", sn76496_w) - AM_RANGE(0xe9, 0xe9) AM_DEVWRITE_LEGACY("sn76489.2", sn76496_w) + AM_RANGE(0xe8, 0xe8) AM_DEVWRITE("sn76489.1", sn76489_new_device, write) + AM_RANGE(0xe9, 0xe9) AM_DEVWRITE("sn76489.2", sn76489_new_device, write) ADDRESS_MAP_END @@ -223,6 +223,23 @@ 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??? */ @@ -247,12 +264,13 @@ static MACHINE_CONFIG_START( sbugger, sbugger_state ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") - MCFG_SOUND_ADD("sn76489.1", SN76489, 3000000) + MCFG_SOUND_ADD("sn76489.1", SN76489_NEW, 3000000) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - - MCFG_SOUND_ADD("sn76489.2", SN76489, 3000000) + MCFG_SOUND_CONFIG(psg_intf) + + MCFG_SOUND_ADD("sn76489.2", SN76489_NEW, 3000000) 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 06c9b72007e..9c28c4a4d58 100644 --- a/src/mame/drivers/senjyo.c +++ b/src/mame/drivers/senjyo.c @@ -162,9 +162,9 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( senjyo_sound_map, AS_PROGRAM, 8, senjyo_state ) AM_RANGE(0x0000, 0x3fff) AM_ROM AM_RANGE(0x4000, 0x43ff) AM_RAM - AM_RANGE(0x8000, 0x8000) AM_DEVWRITE_LEGACY("sn1", sn76496_w) - AM_RANGE(0x9000, 0x9000) AM_DEVWRITE_LEGACY("sn2", sn76496_w) - AM_RANGE(0xa000, 0xa000) AM_DEVWRITE_LEGACY("sn3", sn76496_w) + AM_RANGE(0x8000, 0x8000) AM_DEVWRITE("sn1", sn76496_new_device, write) + AM_RANGE(0x9000, 0x9000) AM_DEVWRITE("sn2", sn76496_new_device, write) + AM_RANGE(0xa000, 0xa000) AM_DEVWRITE("sn3", sn76496_new_device, write) AM_RANGE(0xd000, 0xd000) AM_WRITE(senjyo_volume_w) #if 0 AM_RANGE(0xe000, 0xe000) AM_WRITE_LEGACY(unknown) @@ -230,9 +230,9 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( starforb_sound_map, AS_PROGRAM, 8, senjyo_state ) AM_RANGE(0x0000, 0x3fff) AM_ROM AM_RANGE(0x4000, 0x43ff) AM_RAM - AM_RANGE(0x8000, 0x8000) AM_DEVWRITE_LEGACY("sn1", sn76496_w) - AM_RANGE(0x9000, 0x9000) AM_DEVWRITE_LEGACY("sn2", sn76496_w) - AM_RANGE(0xa000, 0xa000) AM_DEVWRITE_LEGACY("sn3", sn76496_w) + AM_RANGE(0x8000, 0x8000) AM_DEVWRITE("sn1", sn76496_new_device, write) + AM_RANGE(0x9000, 0x9000) AM_DEVWRITE("sn2", sn76496_new_device, write) + AM_RANGE(0xa000, 0xa000) AM_DEVWRITE("sn3", sn76496_new_device, write) AM_RANGE(0xd000, 0xd000) AM_WRITE(senjyo_volume_w) #if 0 AM_RANGE(0xe000, 0xe000) AM_WRITE_LEGACY(unknown) @@ -551,6 +551,22 @@ 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 ) @@ -585,14 +601,17 @@ static MACHINE_CONFIG_START( senjyo, senjyo_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", 0.50) + MCFG_SOUND_CONFIG(psg_intf) - MCFG_SOUND_ADD("sn2", SN76496, 2000000) + MCFG_SOUND_ADD("sn2", SN76496_NEW, 2000000) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) + MCFG_SOUND_CONFIG(psg_intf) - MCFG_SOUND_ADD("sn3", SN76496, 2000000) + MCFG_SOUND_ADD("sn3", SN76496_NEW, 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 c2d5d32c149..67eb032eadd 100644 --- a/src/mame/drivers/sg1000a.c +++ b/src/mame/drivers/sg1000a.c @@ -146,7 +146,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( io_map, AS_IO, 8, sg1000a_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x7f, 0x7f) AM_DEVWRITE_LEGACY("snsnd", sn76496_w) + AM_RANGE(0x7f, 0x7f) AM_DEVWRITE("snsnd", sn76489_new_device, write) AM_RANGE(0xbe, 0xbe) AM_DEVREADWRITE("tms9928a", tms9928a_device, vram_read, vram_write) AM_RANGE(0xbf, 0xbf) AM_DEVREADWRITE("tms9928a", tms9928a_device, register_read, register_write) AM_RANGE(0xdc, 0xdf) AM_DEVREADWRITE("ppi8255", i8255_device, read, write) @@ -265,6 +265,24 @@ static I8255_INTERFACE( ppi8255_intf ) DEVCB_DRIVER_MEMBER(sg1000a_state,sg1000a_coin_counter_w) }; + +/************************************* + * + * Sound interface + * + *************************************/ + + +//------------------------------------------------- +// sn76496_config psg_intf +//------------------------------------------------- + +static const sn76496_config psg_intf = +{ + DEVCB_NULL +}; + + /************************************* * * Machine drivers @@ -287,8 +305,9 @@ static MACHINE_CONFIG_START( sg1000a, sg1000a_state ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") - MCFG_SOUND_ADD("snsnd", SN76489, XTAL_3_579545MHz) + MCFG_SOUND_ADD("snsnd", SN76489_NEW, 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/spaceg.c b/src/mame/drivers/spaceg.c index f97e493c421..e39e4d30855 100644 --- a/src/mame/drivers/spaceg.c +++ b/src/mame/drivers/spaceg.c @@ -399,6 +399,23 @@ static INPUT_PORTS_START( spaceg ) INPUT_PORTS_END +/************************************* + * + * Sound interface + * + *************************************/ + + +//------------------------------------------------- +// sn76496_config psg_intf +//------------------------------------------------- + +//static const sn76496_config psg_intf = +//{ +// DEVCB_NULL +//}; + + /************************************* * * Machine config @@ -426,14 +443,17 @@ static MACHINE_CONFIG_START( spaceg, spaceg_state ) /* sound hardware */ // MCFG_SPEAKER_STANDARD_MONO("mono") -// MCFG_SOUND_ADD("sn1", SN76496, 15468480/4) +// MCFG_SOUND_ADD("sn1", SN76496_NEW, 15468480/4) // MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) +// MCFG_SOUND_CONFIG(psg_intf) -// MCFG_SOUND_ADD("sn2", SN76496, 15468480/4) +// MCFG_SOUND_ADD("sn2", SN76496_NEW, 15468480/4) // MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) +// MCFG_SOUND_CONFIG(psg_intf) -// MCFG_SOUND_ADD("sn3", SN76496, 15468480/4) +// MCFG_SOUND_ADD("sn3", SN76496_NEW, 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/sprcros2.c b/src/mame/drivers/sprcros2.c index c03b68008ad..0f38a6c6873 100644 --- a/src/mame/drivers/sprcros2.c +++ b/src/mame/drivers/sprcros2.c @@ -112,9 +112,9 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sprcros2_master_io_map, AS_IO, 8, sprcros2_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_READ_PORT("P1") AM_DEVWRITE_LEGACY("sn1", sn76496_w) - AM_RANGE(0x01, 0x01) AM_READ_PORT("P2") AM_DEVWRITE_LEGACY("sn2", sn76496_w) - AM_RANGE(0x02, 0x02) AM_READ_PORT("EXTRA") AM_DEVWRITE_LEGACY("sn3", sn76496_w) + AM_RANGE(0x00, 0x00) AM_READ_PORT("P1") AM_DEVWRITE("sn1", sn76489_new_device, write) + AM_RANGE(0x01, 0x01) AM_READ_PORT("P2") AM_DEVWRITE("sn2", sn76489_new_device, write) + AM_RANGE(0x02, 0x02) AM_READ_PORT("EXTRA") AM_DEVWRITE("sn3", sn76489_new_device, write) AM_RANGE(0x04, 0x04) AM_READ_PORT("DSW1") AM_RANGE(0x05, 0x05) AM_READ_PORT("DSW2") AM_RANGE(0x07, 0x07) AM_WRITE(sprcros2_m_port7_w) @@ -228,6 +228,23 @@ 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 +}; + + static TIMER_DEVICE_CALLBACK( sprcros2_m_interrupt ) { sprcros2_state *state = timer.machine().driver_data(); @@ -293,14 +310,17 @@ static MACHINE_CONFIG_START( sprcros2, sprcros2_state ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") - MCFG_SOUND_ADD("sn1", SN76489, 10000000/4) + MCFG_SOUND_ADD("sn1", SN76489_NEW, 10000000/4) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) + MCFG_SOUND_CONFIG(psg_intf) - MCFG_SOUND_ADD("sn2", SN76489, 10000000/4) + MCFG_SOUND_ADD("sn2", SN76489_NEW, 10000000/4) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) + MCFG_SOUND_CONFIG(psg_intf) - MCFG_SOUND_ADD("sn3", SN76489, 10000000/4) + MCFG_SOUND_ADD("sn3", SN76489_NEW, 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/zaxxon.c b/src/mame/drivers/zaxxon.c index cd7b1611976..2792a30e72a 100644 --- a/src/mame/drivers/zaxxon.c +++ b/src/mame/drivers/zaxxon.c @@ -498,9 +498,9 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( congo_sound_map, AS_PROGRAM, 8, zaxxon_state ) AM_RANGE(0x0000, 0x1fff) AM_ROM AM_RANGE(0x4000, 0x47ff) AM_MIRROR(0x1800) AM_RAM - AM_RANGE(0x6000, 0x6000) AM_MIRROR(0x1fff) AM_DEVWRITE_LEGACY("sn1", sn76496_w) + AM_RANGE(0x6000, 0x6000) AM_MIRROR(0x1fff) AM_DEVWRITE("sn1", sn76496_new_device, write) AM_RANGE(0x8000, 0x8003) AM_MIRROR(0x1ffc) AM_DEVREADWRITE("ppi8255", i8255_device, read, write) - AM_RANGE(0xa000, 0xa000) AM_MIRROR(0x1fff) AM_DEVWRITE_LEGACY("sn2", sn76496_w) + AM_RANGE(0xa000, 0xa000) AM_MIRROR(0x1fff) AM_DEVWRITE("sn2", sn76496_new_device, write) ADDRESS_MAP_END @@ -935,6 +935,23 @@ static GFXDECODE_START( zaxxon ) GFXDECODE_END +/************************************* + * + * Sound interface + * + *************************************/ + + +//------------------------------------------------- +// sn76496_config psg_intf +//------------------------------------------------- + +static const sn76496_config psg_intf = +{ + DEVCB_NULL +}; + + /************************************* * * Machine driver @@ -1024,11 +1041,13 @@ static MACHINE_CONFIG_DERIVED( congo, root ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") - MCFG_SOUND_ADD("sn1", SN76496, SOUND_CLOCK) + MCFG_SOUND_ADD("sn1", SN76496_NEW, SOUND_CLOCK) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - - MCFG_SOUND_ADD("sn2", SN76496, SOUND_CLOCK/4) + MCFG_SOUND_CONFIG(psg_intf) + + MCFG_SOUND_ADD("sn2", SN76496_NEW, SOUND_CLOCK/4) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) + MCFG_SOUND_CONFIG(psg_intf) MCFG_FRAGMENT_ADD(congo_samples) MACHINE_CONFIG_END