From be84fb55e225a900d16ed885c05440183c494341 Mon Sep 17 00:00:00 2001 From: Scott Stone Date: Fri, 19 Oct 2012 15:11:53 +0000 Subject: [PATCH] Hooked up polepos.c, portrait.c and tomcat.c to use the new tms5220 implementation. [Osso] --- src/mame/drivers/polepos.c | 8 +++++++- src/mame/drivers/portrait.c | 10 ++++++++-- src/mame/drivers/tomcat.c | 10 +++++++++- src/mame/includes/polepos.h | 3 +++ src/mame/includes/portrait.h | 4 ++++ 5 files changed, 31 insertions(+), 4 deletions(-) diff --git a/src/mame/drivers/polepos.c b/src/mame/drivers/polepos.c index b3c9c107cc5..45ee280b50d 100644 --- a/src/mame/drivers/polepos.c +++ b/src/mame/drivers/polepos.c @@ -957,6 +957,11 @@ const namco_06xx_config topracern_namco_06xx_intf = "maincpu", "51xx", NULL, NULL, NULL }; +static const tms52xx_config tms_intf = +{ + DEVCB_NULL +}; + static MACHINE_CONFIG_START( topracern, polepos_state ) /* basic machine hardware */ @@ -1025,9 +1030,10 @@ static MACHINE_CONFIG_DERIVED( polepos2bi, topracern ) MCFG_CPU_PROGRAM_MAP(sound_z80_bootleg_map) MCFG_CPU_IO_MAP(sound_z80_bootleg_iomap) - MCFG_SOUND_ADD("tms", TMS5220, 600000) /* ? Mhz */ + MCFG_SOUND_ADD("tms", TMS5220N, 600000) /* ? Mhz */ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.80) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.80) + MCFG_SOUND_CONFIG(tms_intf) MACHINE_CONFIG_END diff --git a/src/mame/drivers/portrait.c b/src/mame/drivers/portrait.c index 6ba242bc3c6..eb8628e4521 100644 --- a/src/mame/drivers/portrait.c +++ b/src/mame/drivers/portrait.c @@ -240,6 +240,12 @@ static GFXDECODE_START( portrait ) GFXDECODE_ENTRY( "gfx1", 0x00000, tile_layout, 0, 0x800/8 ) GFXDECODE_END +static const tms52xx_config tms_intf = +{ + DEVCB_NULL +}; + + static MACHINE_CONFIG_START( portrait, portrait_state ) MCFG_CPU_ADD("maincpu", Z80, 4000000) /* 4 MHz ? */ MCFG_CPU_PROGRAM_MAP(portrait_map) @@ -264,9 +270,9 @@ static MACHINE_CONFIG_START( portrait, portrait_state ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") - - MCFG_SOUND_ADD("tms", TMS5200, 640000) + MCFG_SOUND_ADD("tms", TMS5200N, 640000) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) + MCFG_SOUND_CONFIG(tms_intf) MACHINE_CONFIG_END diff --git a/src/mame/drivers/tomcat.c b/src/mame/drivers/tomcat.c index 9da0a4f9ba3..7f13113ed54 100644 --- a/src/mame/drivers/tomcat.c +++ b/src/mame/drivers/tomcat.c @@ -41,8 +41,10 @@ class tomcat_state : public driver_device public: tomcat_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , + m_tms(*this, "tms"), m_shared_ram(*this, "shared_ram"){ } + required_device m_tms; int m_control_num; required_shared_ptr m_shared_ram; UINT8 m_nvram[0x800]; @@ -394,6 +396,11 @@ static const riot6532_interface tomcat_riot6532_intf = DEVCB_NULL // connected to IRQ line of 6502 }; +static const tms52xx_config tms_intf = +{ + DEVCB_NULL +}; + static MACHINE_CONFIG_START( tomcat, tomcat_state ) MCFG_CPU_ADD("maincpu", M68010, XTAL_12MHz / 2) MCFG_CPU_PROGRAM_MAP(tomcat_map) @@ -433,9 +440,10 @@ static MACHINE_CONFIG_START( tomcat, tomcat_state ) MCFG_POKEY_ADD("pokey2", XTAL_14_31818MHz / 8) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.20) - MCFG_SOUND_ADD("tms", TMS5220, 325000) + MCFG_SOUND_ADD("tms", TMS5220N, 325000) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.50) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.50) + MCFG_SOUND_CONFIG(tms_intf) MCFG_YM2151_ADD("ymsnd", XTAL_14_31818MHz / 4) MCFG_SOUND_ROUTE(0, "lspeaker", 0.60) diff --git a/src/mame/includes/polepos.h b/src/mame/includes/polepos.h index 6accbf1e3f6..c9768f9fc5e 100644 --- a/src/mame/includes/polepos.h +++ b/src/mame/includes/polepos.h @@ -6,6 +6,7 @@ #include "devlegcy.h" #include "sound/discrete.h" +#include "sound/tms5220.h" class polepos_state : public driver_device @@ -13,11 +14,13 @@ class polepos_state : public driver_device public: polepos_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , + m_tms(*this, "tms"), m_sprite16_memory(*this, "sprite16_memory"), m_road16_memory(*this, "road16_memory"), m_alpha16_memory(*this, "alpha16_memory"), m_view16_memory(*this, "view16_memory"){ } + optional_device m_tms; UINT8 m_steer_last; UINT8 m_steer_delta; INT16 m_steer_accum; diff --git a/src/mame/includes/portrait.h b/src/mame/includes/portrait.h index 79783b218bf..fa933c0d1d7 100644 --- a/src/mame/includes/portrait.h +++ b/src/mame/includes/portrait.h @@ -1,12 +1,16 @@ +#include "sound/tms5220.h" + class portrait_state : public driver_device { public: portrait_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , + m_tms(*this, "tms"), m_bgvideoram(*this, "bgvideoram"), m_fgvideoram(*this, "fgvideoram"), m_spriteram(*this, "spriteram"){ } + required_device m_tms; required_shared_ptr m_bgvideoram; required_shared_ptr m_fgvideoram; int m_scroll;