From 05054328f2a32f03e3a9b88a694b8d69bafca484 Mon Sep 17 00:00:00 2001 From: Curt Coder Date: Tue, 4 Sep 2012 17:56:05 +0000 Subject: [PATCH] (MESS) c65: Added missing SID interface. (nw)\n(MESS) c64: Used SID8580 for the 64C models. (nw) --- src/emu/sound/sid6581.c | 3 ++- src/mess/drivers/c64.c | 8 +++++++- src/mess/drivers/c65.c | 14 +++++++++++--- src/mess/includes/c64.h | 2 +- 4 files changed, 21 insertions(+), 6 deletions(-) diff --git a/src/emu/sound/sid6581.c b/src/emu/sound/sid6581.c index a7b0a32667b..60bab96bf6c 100644 --- a/src/emu/sound/sid6581.c +++ b/src/emu/sound/sid6581.c @@ -33,7 +33,8 @@ static void sid_start(device_t *device, SIDTYPE sidtype) { _SID6581 *sid = get_sid(device); const sid6581_interface *iface = (const sid6581_interface*) device->static_config(); - + assert(iface); + // resolve callbacks sid->in_potx_func.resolve(iface->in_potx_cb, *device); sid->in_poty_func.resolve(iface->in_poty_cb, *device); diff --git a/src/mess/drivers/c64.c b/src/mess/drivers/c64.c index 3fca8f0d331..7c83a616dd1 100644 --- a/src/mess/drivers/c64.c +++ b/src/mess/drivers/c64.c @@ -1092,6 +1092,9 @@ MACHINE_CONFIG_END //------------------------------------------------- static MACHINE_CONFIG_DERIVED_CLASS( ntsc_c, ntsc, c64c_state ) + MCFG_SOUND_REPLACE(MOS6851_TAG, SID8580, VIC6567_CLOCK) + MCFG_SOUND_CONFIG(sid_intf) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) MACHINE_CONFIG_END @@ -1166,6 +1169,9 @@ MACHINE_CONFIG_END //------------------------------------------------- static MACHINE_CONFIG_DERIVED_CLASS( pal_c, pal, c64c_state ) + MCFG_SOUND_REPLACE(MOS6851_TAG, SID8580, VIC6569_CLOCK) + MCFG_SOUND_CONFIG(sid_intf) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) MACHINE_CONFIG_END @@ -1186,7 +1192,7 @@ static MACHINE_CONFIG_START( pal_gs, c64gs_state ) // sound hardware MCFG_SPEAKER_STANDARD_MONO("mono") - MCFG_SOUND_ADD(MOS6851_TAG, SID6581, VIC6569_CLOCK) + MCFG_SOUND_ADD(MOS6851_TAG, SID8580, VIC6569_CLOCK) MCFG_SOUND_CONFIG(sid_intf) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) MCFG_SOUND_ADD("dac", DAC, 0) diff --git a/src/mess/drivers/c65.c b/src/mess/drivers/c65.c index 307ae64642d..5165d3b6108 100644 --- a/src/mess/drivers/c65.c +++ b/src/mess/drivers/c65.c @@ -203,12 +203,18 @@ READ8_MEMBER( c65_state::sid_poty_r ) return c64_paddle_read(sid, 1); } -static MOS6581_INTERFACE( c65_sound_interface ) +static MOS6581_INTERFACE( sidr_intf ) { DEVCB_DRIVER_MEMBER(c65_state, sid_potx_r), DEVCB_DRIVER_MEMBER(c65_state, sid_poty_r) }; +static MOS6581_INTERFACE( sidl_intf ) +{ + DEVCB_NULL, + DEVCB_NULL +}; + static CBM_IEC_INTERFACE( cbm_iec_intf ) { @@ -321,10 +327,11 @@ static MACHINE_CONFIG_START( c65, c65_state ) /* sound hardware */ MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") MCFG_SOUND_ADD("sid_r", SID8580, 985248) - MCFG_SOUND_CONFIG(c65_sound_interface) + MCFG_SOUND_CONFIG(sidr_intf) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.50) MCFG_SOUND_ADD("sid_l", SID8580, 985248) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.50) + MCFG_SOUND_CONFIG(sidl_intf) /* quickload */ MCFG_QUICKLOAD_ADD("quickload", cbm_c65, "p00,prg", CBM_QUICKLOAD_DELAY_SECONDS) @@ -355,9 +362,10 @@ static MACHINE_CONFIG_DERIVED( c65pal, c65 ) /* sound hardware */ MCFG_SOUND_REPLACE("sid_r", SID8580, 1022727) - MCFG_SOUND_CONFIG(c65_sound_interface) + MCFG_SOUND_CONFIG(sidr_intf) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.50) MCFG_SOUND_REPLACE("sid_l", SID8580, 1022727) + MCFG_SOUND_CONFIG(sidl_intf) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.50) /* cia */ diff --git a/src/mess/includes/c64.h b/src/mess/includes/c64.h index b212220df61..5cbb5d6c849 100644 --- a/src/mess/includes/c64.h +++ b/src/mess/includes/c64.h @@ -67,7 +67,7 @@ public: required_device m_maincpu; required_device m_pla; required_device m_vic; - required_device m_sid; + required_device m_sid; required_device m_cia1; required_device m_cia2; optional_device m_iec;