diff --git a/src/mess/drivers/gamecom.c b/src/mess/drivers/gamecom.c index bfbcf1746b6..d59a131c0fd 100644 --- a/src/mess/drivers/gamecom.c +++ b/src/mess/drivers/gamecom.c @@ -117,13 +117,11 @@ static MACHINE_CONFIG_START( gamecom, gamecom_state ) MCFG_PALETTE_LENGTH(5) /* sound hardware */ -#if 0 - MCFG_SPEAKER_STANDARD_STEREO( "left", "right" ) - /* MCFG_SOUND_ADD( "custom", CUSTOM, 0 ) */ - /* MCFG_SOUND_CONFIG */ - MCFG_SOUND_ROUTE( 0, "left", 0.50 ) - MCFG_SOUND_ROUTE( 1, "right", 0.50 ) -#endif + MCFG_SPEAKER_STANDARD_STEREO( "lspeaker", "rspeaker" ) + /* TODO: much more complex than this */ + MCFG_SOUND_ADD("dac", DAC, 0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.00) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.00) /* cartridge */ MCFG_CARTSLOT_ADD("cart1") diff --git a/src/mess/includes/gamecom.h b/src/mess/includes/gamecom.h index 488cd00e688..378f35093d7 100644 --- a/src/mess/includes/gamecom.h +++ b/src/mess/includes/gamecom.h @@ -15,6 +15,7 @@ #include "cpu/sm8500/sm8500.h" #include "imagedev/cartslot.h" #include "rendlay.h" +#include "sound/dac.h" /* SM8521 register addresses */ enum @@ -211,6 +212,7 @@ public: gamecom_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), + m_dac(*this, "dac"), m_p_nvram(*this,"p_nvram"), m_p_videoram(*this,"p_videoram"), m_bank1(*this, "bank1"), @@ -223,9 +225,11 @@ public: m_io_in1(*this, "IN1"), m_io_in2(*this, "IN2"), m_io_styx(*this, "STYX"), - m_io_styy(*this, "STYY") { } + m_io_styy(*this, "STYY") + { } required_device m_maincpu; + required_device m_dac; DECLARE_READ8_MEMBER( gamecom_internal_r ); DECLARE_READ8_MEMBER( gamecom_pio_r ); DECLARE_WRITE8_MEMBER( gamecom_internal_w ); diff --git a/src/mess/machine/gamecom.c b/src/mess/machine/gamecom.c index 179bf3f65b1..91ca0610d6d 100644 --- a/src/mess/machine/gamecom.c +++ b/src/mess/machine/gamecom.c @@ -321,6 +321,13 @@ WRITE8_MEMBER( gamecom_state::gamecom_internal_w ) /* Sound */ case SM8521_SGC: + /* + x--- ---- enable sound output + ---- x--- enable DAC + ---- -x-- enable SG2 + ---- --x- enable SG1 + ---- ---x enable SG0 + */ m_sound.sgc = data; break; case SM8521_SG0L: @@ -352,6 +359,8 @@ WRITE8_MEMBER( gamecom_state::gamecom_internal_w ) break; case SM8521_SGDA: m_sound.sgda = data; + if((m_sound.sgc & 0x88) == 0x88) + m_dac->write_unsigned8(data); break; case SM8521_SG0W0: