mirror of
https://github.com/holub/mame
synced 2025-04-30 19:57:11 +03:00
tc0280grd: updated to use inline configs. nw.
This commit is contained in:
parent
74e120171f
commit
f7edbe435e
@ -2976,9 +2976,6 @@ static const tc0480scp_interface metalb_tc0480scp_intf =
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static const tc0280grd_interface taitof2_tc0280grd_intf = { 2 };
|
|
||||||
static const tc0280grd_interface taitof2_tc0430grw_intf = { 2 };
|
|
||||||
|
|
||||||
MACHINE_START_MEMBER(taitof2_state,common)
|
MACHINE_START_MEMBER(taitof2_state,common)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -3096,8 +3093,10 @@ static MACHINE_CONFIG_DERIVED( dondokod, taito_f2_tc0220ioc )
|
|||||||
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
|
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
|
||||||
MCFG_TC0100SCN_PALETTE("palette")
|
MCFG_TC0100SCN_PALETTE("palette")
|
||||||
|
|
||||||
MCFG_TC0280GRD_ADD("tc0280grd", taitof2_tc0280grd_intf)
|
MCFG_DEVICE_ADD("tc0280grd", TC0280GRD, 0)
|
||||||
|
MCFG_TC0280GRD_GFX_REGION(2)
|
||||||
MCFG_TC0280GRD_GFXDECODE("gfxdecode");
|
MCFG_TC0280GRD_GFXDECODE("gfxdecode");
|
||||||
|
|
||||||
MCFG_TC0360PRI_ADD("tc0360pri")
|
MCFG_TC0360PRI_ADD("tc0360pri")
|
||||||
MACHINE_CONFIG_END
|
MACHINE_CONFIG_END
|
||||||
|
|
||||||
@ -3162,8 +3161,10 @@ static MACHINE_CONFIG_DERIVED( cameltry, taito_f2_tc0220ioc )
|
|||||||
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
|
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
|
||||||
MCFG_TC0100SCN_PALETTE("palette")
|
MCFG_TC0100SCN_PALETTE("palette")
|
||||||
|
|
||||||
MCFG_TC0280GRD_ADD("tc0280grd", taitof2_tc0280grd_intf)
|
MCFG_DEVICE_ADD("tc0280grd", TC0280GRD, 0)
|
||||||
|
MCFG_TC0280GRD_GFX_REGION(2)
|
||||||
MCFG_TC0280GRD_GFXDECODE("gfxdecode");
|
MCFG_TC0280GRD_GFXDECODE("gfxdecode");
|
||||||
|
|
||||||
MCFG_TC0360PRI_ADD("tc0360pri")
|
MCFG_TC0360PRI_ADD("tc0360pri")
|
||||||
MACHINE_CONFIG_END
|
MACHINE_CONFIG_END
|
||||||
|
|
||||||
@ -3468,8 +3469,10 @@ static MACHINE_CONFIG_DERIVED( pulirula, taito_f2_tc0510nio )
|
|||||||
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
|
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
|
||||||
MCFG_TC0100SCN_PALETTE("palette")
|
MCFG_TC0100SCN_PALETTE("palette")
|
||||||
|
|
||||||
MCFG_TC0430GRW_ADD("tc0430grw", taitof2_tc0430grw_intf)
|
MCFG_DEVICE_ADD("tc0430grw", TC0430GRW, 0)
|
||||||
|
MCFG_TC0430GRW_GFX_REGION(2)
|
||||||
MCFG_TC0430GRW_GFXDECODE("gfxdecode")
|
MCFG_TC0430GRW_GFXDECODE("gfxdecode")
|
||||||
|
|
||||||
MCFG_TC0360PRI_ADD("tc0360pri")
|
MCFG_TC0360PRI_ADD("tc0360pri")
|
||||||
MACHINE_CONFIG_END
|
MACHINE_CONFIG_END
|
||||||
|
|
||||||
@ -3676,8 +3679,10 @@ static MACHINE_CONFIG_DERIVED( driftout, taito_f2_tc0510nio )
|
|||||||
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
|
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
|
||||||
MCFG_TC0100SCN_PALETTE("palette")
|
MCFG_TC0100SCN_PALETTE("palette")
|
||||||
|
|
||||||
MCFG_TC0430GRW_ADD("tc0430grw", taitof2_tc0430grw_intf)
|
MCFG_DEVICE_ADD("tc0430grw", TC0430GRW, 0)
|
||||||
|
MCFG_TC0430GRW_GFX_REGION(2)
|
||||||
MCFG_TC0430GRW_GFXDECODE("gfxdecode")
|
MCFG_TC0430GRW_GFXDECODE("gfxdecode")
|
||||||
|
|
||||||
MCFG_TC0360PRI_ADD("tc0360pri")
|
MCFG_TC0360PRI_ADD("tc0360pri")
|
||||||
MACHINE_CONFIG_END
|
MACHINE_CONFIG_END
|
||||||
|
|
||||||
@ -3721,8 +3726,10 @@ static MACHINE_CONFIG_START( cameltrya, taitof2_state )
|
|||||||
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
|
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
|
||||||
MCFG_TC0100SCN_PALETTE("palette")
|
MCFG_TC0100SCN_PALETTE("palette")
|
||||||
|
|
||||||
MCFG_TC0280GRD_ADD("tc0280grd", taitof2_tc0280grd_intf)
|
MCFG_DEVICE_ADD("tc0280grd", TC0280GRD, 0)
|
||||||
|
MCFG_TC0280GRD_GFX_REGION(2)
|
||||||
MCFG_TC0280GRD_GFXDECODE("gfxdecode");
|
MCFG_TC0280GRD_GFXDECODE("gfxdecode");
|
||||||
|
|
||||||
MCFG_TC0360PRI_ADD("tc0360pri")
|
MCFG_TC0360PRI_ADD("tc0360pri")
|
||||||
|
|
||||||
/* sound hardware */
|
/* sound hardware */
|
||||||
@ -3784,8 +3791,10 @@ static MACHINE_CONFIG_START( driveout, taitof2_state )
|
|||||||
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
|
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
|
||||||
MCFG_TC0100SCN_PALETTE("palette")
|
MCFG_TC0100SCN_PALETTE("palette")
|
||||||
|
|
||||||
MCFG_TC0430GRW_ADD("tc0430grw", taitof2_tc0430grw_intf)
|
MCFG_DEVICE_ADD("tc0430grw", TC0430GRW, 0)
|
||||||
|
MCFG_TC0430GRW_GFX_REGION(2)
|
||||||
MCFG_TC0430GRW_GFXDECODE("gfxdecode")
|
MCFG_TC0430GRW_GFXDECODE("gfxdecode")
|
||||||
|
|
||||||
MCFG_TC0360PRI_ADD("tc0360pri")
|
MCFG_TC0360PRI_ADD("tc0360pri")
|
||||||
|
|
||||||
/* sound hardware */
|
/* sound hardware */
|
||||||
|
@ -46,25 +46,6 @@ void tc0280grd_device::static_set_gfxdecode_tag(device_t &device, const char *ta
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//-------------------------------------------------
|
|
||||||
// device_config_complete - perform any
|
|
||||||
// operations now that the configuration is
|
|
||||||
// complete
|
|
||||||
//-------------------------------------------------
|
|
||||||
|
|
||||||
void tc0280grd_device::device_config_complete()
|
|
||||||
{
|
|
||||||
// inherit a copy of the static data
|
|
||||||
const tc0280grd_interface *intf = reinterpret_cast<const tc0280grd_interface *>(static_config());
|
|
||||||
if (intf != NULL)
|
|
||||||
*static_cast<tc0280grd_interface *>(this) = *intf;
|
|
||||||
|
|
||||||
// or initialize to defaults if none provided
|
|
||||||
else
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
// device_start - device-specific startup
|
// device_start - device-specific startup
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
@ -1,13 +1,7 @@
|
|||||||
#ifndef _TC0280GRD_H_
|
#ifndef __TC0280GRD_H__
|
||||||
#define _TC0280GRD_H_
|
#define __TC0280GRD_H__
|
||||||
|
|
||||||
struct tc0280grd_interface
|
class tc0280grd_device : public device_t
|
||||||
{
|
|
||||||
int m_gfxnum;
|
|
||||||
};
|
|
||||||
|
|
||||||
class tc0280grd_device : public device_t,
|
|
||||||
public tc0280grd_interface
|
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
tc0280grd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
tc0280grd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||||
@ -15,6 +9,7 @@ public:
|
|||||||
|
|
||||||
// static configuration
|
// static configuration
|
||||||
static void static_set_gfxdecode_tag(device_t &device, const char *tag);
|
static void static_set_gfxdecode_tag(device_t &device, const char *tag);
|
||||||
|
static void set_gfx_region(device_t &device, int gfxregion) { downcast<tc0280grd_device &>(device).m_gfxnum = gfxregion; }
|
||||||
|
|
||||||
DECLARE_READ16_MEMBER( tc0280grd_word_r );
|
DECLARE_READ16_MEMBER( tc0280grd_word_r );
|
||||||
DECLARE_WRITE16_MEMBER( tc0280grd_word_w );
|
DECLARE_WRITE16_MEMBER( tc0280grd_word_w );
|
||||||
@ -30,7 +25,6 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
// device-level overrides
|
// device-level overrides
|
||||||
virtual void device_config_complete();
|
|
||||||
virtual void device_start();
|
virtual void device_start();
|
||||||
virtual void device_reset();
|
virtual void device_reset();
|
||||||
|
|
||||||
@ -42,6 +36,7 @@ private:
|
|||||||
|
|
||||||
UINT16 m_ctrl[8];
|
UINT16 m_ctrl[8];
|
||||||
int m_base_color;
|
int m_base_color;
|
||||||
|
int m_gfxnum;
|
||||||
required_device<gfxdecode_device> m_gfxdecode;
|
required_device<gfxdecode_device> m_gfxdecode;
|
||||||
|
|
||||||
TILE_GET_INFO_MEMBER(tc0280grd_get_tile_info);
|
TILE_GET_INFO_MEMBER(tc0280grd_get_tile_info);
|
||||||
@ -60,6 +55,12 @@ extern const device_type TC0280GRD;
|
|||||||
MCFG_DEVICE_ADD(_tag, TC0430GRW, 0) \
|
MCFG_DEVICE_ADD(_tag, TC0430GRW, 0) \
|
||||||
MCFG_DEVICE_CONFIG(_interface)
|
MCFG_DEVICE_CONFIG(_interface)
|
||||||
|
|
||||||
|
#define MCFG_TC0280GRD_GFX_REGION(_region) \
|
||||||
|
tc0280grd_device::set_gfx_region(*device, _region);
|
||||||
|
|
||||||
|
#define MCFG_TC0430GRW_GFX_REGION(_region) \
|
||||||
|
tc0280grd_device::set_gfx_region(*device, _region);
|
||||||
|
|
||||||
#define MCFG_TC0280GRD_GFXDECODE(_gfxtag) \
|
#define MCFG_TC0280GRD_GFXDECODE(_gfxtag) \
|
||||||
tc0280grd_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
|
tc0280grd_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user