From 1e4989c4de12327395ba84a398585ed0bafae87e Mon Sep 17 00:00:00 2001 From: Fabio Priuli Date: Wed, 9 Apr 2014 16:24:02 +0000 Subject: [PATCH] hd63484: updated to use inline configs. nw. --- src/emu/video/hd63484.c | 24 ++---------------------- src/emu/video/hd63484.h | 20 ++------------------ src/mame/drivers/shanghai.c | 11 ++++++----- src/mame/drivers/sigmab52.c | 3 --- src/mame/drivers/taito_b.c | 9 ++------- src/mame/drivers/wildpkr.c | 4 +--- 6 files changed, 13 insertions(+), 58 deletions(-) diff --git a/src/emu/video/hd63484.c b/src/emu/video/hd63484.c index 77bf97373fb..d86f4a2bfa4 100644 --- a/src/emu/video/hd63484.c +++ b/src/emu/video/hd63484.c @@ -58,30 +58,11 @@ hd63484_device::hd63484_device(const machine_config &mconfig, const char *tag, d m_rwp_dn(0), m_cpx(0), m_cpy(0), - m_regno(0) + m_regno(0), + m_skattva_hack(0) { } -//------------------------------------------------- -// device_config_complete - perform any -// operations now that the configuration is -// complete -//------------------------------------------------- - -void hd63484_device::device_config_complete() -{ - // inherit a copy of the static data - const hd63484_interface *intf = reinterpret_cast(static_config()); - if (intf != NULL) - *static_cast(this) = *intf; - - // or initialize to defaults if none provided - else - { - m_skattva_hack = 0; - } -} - //------------------------------------------------- // device_start - device-specific startup //------------------------------------------------- @@ -122,7 +103,6 @@ void hd63484_device::device_start() save_item(NAME(m_cpx)); save_item(NAME(m_cpy)); save_item(NAME(m_regno)); - save_item(NAME(m_skattva_hack)); } //------------------------------------------------- diff --git a/src/emu/video/hd63484.h b/src/emu/video/hd63484.h index 2a154c612ec..c1491075bd4 100644 --- a/src/emu/video/hd63484.h +++ b/src/emu/video/hd63484.h @@ -21,13 +21,7 @@ TYPE DEFINITIONS ***************************************************************************/ -struct hd63484_interface -{ - int m_skattva_hack; -}; - -class hd63484_device : public device_t, - public hd63484_interface +class hd63484_device : public device_t { public: hd63484_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); @@ -45,7 +39,6 @@ public: protected: // device-level overrides - virtual void device_config_complete(); virtual void device_start(); virtual void device_reset(); @@ -64,6 +57,7 @@ private: INT16 m_cpx, m_cpy; int m_regno; + int m_skattva_hack; void doclr16( int opcode, UINT16 fill, int *dst, INT16 _ax, INT16 _ay ); void docpy16( int opcode, int src, int *dst, INT16 _ax, INT16 _ay ); @@ -78,18 +72,8 @@ private: void paint( int sx, int sy, int col ); void command_w(UINT16 cmd); - }; extern ATTR_DEPRECATED const device_type HD63484; - -/*************************************************************************** - DEVICE CONFIGURATION MACROS -***************************************************************************/ - -#define MCFG_HD63484_ADD(_tag, _interface) \ - MCFG_DEVICE_ADD(_tag, HD63484, 0) \ - MCFG_DEVICE_CONFIG(_interface) - #endif /* __HD63484_H__ */ diff --git a/src/mame/drivers/shanghai.c b/src/mame/drivers/shanghai.c index 16f9001676d..6bad3906ec6 100644 --- a/src/mame/drivers/shanghai.c +++ b/src/mame/drivers/shanghai.c @@ -435,8 +435,6 @@ static const ay8910_interface kothello_ay8910_config = DEVCB_NULL, DEVCB_NULL, DEVCB_NULL }; -static const hd63484_interface shanghai_hd63484_intf = { 0 }; - static MACHINE_CONFIG_START( shanghai, shanghai_state ) /* basic machine hardware */ @@ -457,7 +455,8 @@ static MACHINE_CONFIG_START( shanghai, shanghai_state ) MCFG_PALETTE_FORMAT(xxxxBBBBGGGGRRRR) MCFG_PALETTE_INIT_OWNER(shanghai_state,shanghai) - MCFG_HD63484_ADD("hd63484", shanghai_hd63484_intf) + // TODO: convert to use H63484 + MCFG_DEVICE_ADD("hd63484", HD63484, 0) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") @@ -490,7 +489,8 @@ static MACHINE_CONFIG_START( shangha2, shanghai_state ) MCFG_PALETTE_ADD("palette", 256) MCFG_PALETTE_FORMAT(xxxxBBBBGGGGRRRR) - MCFG_HD63484_ADD("hd63484", shanghai_hd63484_intf) + // TODO: convert to use H63484 + MCFG_DEVICE_ADD("hd63484", HD63484, 0) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") @@ -526,7 +526,8 @@ static MACHINE_CONFIG_START( kothello, shanghai_state ) MCFG_PALETTE_ADD("palette", 256) MCFG_PALETTE_FORMAT(xxxxBBBBGGGGRRRR) - MCFG_HD63484_ADD("hd63484", shanghai_hd63484_intf) + // TODO: convert to use H63484 + MCFG_DEVICE_ADD("hd63484", HD63484, 0) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/drivers/sigmab52.c b/src/mame/drivers/sigmab52.c index aabf9e365c3..beaf8b33829 100644 --- a/src/mame/drivers/sigmab52.c +++ b/src/mame/drivers/sigmab52.c @@ -585,9 +585,6 @@ void sigmab52_state::machine_start() #endif } -//static const hd63484_interface jwildb52_hd63484_intf = { 1 }; - - /************************* * Machine Drivers * *************************/ diff --git a/src/mame/drivers/taito_b.c b/src/mame/drivers/taito_b.c index 4da21117b73..55a5c09a537 100644 --- a/src/mame/drivers/taito_b.c +++ b/src/mame/drivers/taito_b.c @@ -2881,12 +2881,6 @@ static MACHINE_CONFIG_START( sbm, taitob_state ) MCFG_TC0140SYT_SLAVE_CPU("audiocpu") MACHINE_CONFIG_END -/* TODO: Properly hook up the HD63484 */ -static const hd63484_interface realpunc_hd63484_intf = -{ - 0 -}; - static MACHINE_CONFIG_START( realpunc, taitob_state ) /* basic machine hardware */ @@ -2921,7 +2915,8 @@ static MACHINE_CONFIG_START( realpunc, taitob_state ) MCFG_VIDEO_START_OVERRIDE(taitob_state,realpunc) - MCFG_HD63484_ADD("hd63484", realpunc_hd63484_intf) + // TODO: convert to use H63484 and hook it up properly + MCFG_DEVICE_ADD("hd63484", HD63484, 0) MCFG_DEVICE_ADD("tc0180vcu", TC0180VCU, 0) MCFG_TC0180VCU_BG_COLORBASE(0xc0) diff --git a/src/mame/drivers/wildpkr.c b/src/mame/drivers/wildpkr.c index 6552353f594..b2fc12b47e1 100644 --- a/src/mame/drivers/wildpkr.c +++ b/src/mame/drivers/wildpkr.c @@ -255,8 +255,6 @@ void wildpkr_state::machine_start() } -// static const hd63484_interface wildpkr_hd63484_intf = { 1 }; - static ADDRESS_MAP_START( ramdac_map, AS_0, 8, wildpkr_state ) AM_RANGE(0x000, 0x3ff) AM_DEVREADWRITE("ramdac",ramdac_device,ramdac_pal_r,ramdac_rgb666_w) @@ -289,7 +287,7 @@ static MACHINE_CONFIG_START( wildpkr, wildpkr_state ) MCFG_SCREEN_UPDATE_DRIVER(wildpkr_state, screen_update_wildpkr) MCFG_SCREEN_PALETTE("palette") -// MCFG_HD63484_ADD("hd63484", wildpkr_hd63484_intf) +// MCFG_DEVICE_ADD("hd63484", HD63484, 0) MCFG_RAMDAC_ADD("ramdac", ramdac_intf, ramdac_map, "palette") MCFG_PALETTE_ADD("palette", 256)