Previous 199869 Revisions Next

r29447 Tuesday 8th April, 2014 at 14:53:18 UTC by Fabio Priuli
tc0280grd: updated to use inline configs. nw.
[src/mame/drivers]taito_f2.c
[src/mame/video]tc0280grd.c tc0280grd.h

trunk/src/mame/drivers/taito_f2.c
r29446r29447
29762976};
29772977
29782978
2979static const tc0280grd_interface taitof2_tc0280grd_intf = { 2 };
2980static const tc0280grd_interface taitof2_tc0430grw_intf = { 2 };
2981
29822979MACHINE_START_MEMBER(taitof2_state,common)
29832980{
29842981}
r29446r29447
30963093   MCFG_TC0100SCN_GFXDECODE("gfxdecode")
30973094   MCFG_TC0100SCN_PALETTE("palette")
30983095
3099   MCFG_TC0280GRD_ADD("tc0280grd", taitof2_tc0280grd_intf)
3096   MCFG_DEVICE_ADD("tc0280grd", TC0280GRD, 0)
3097   MCFG_TC0280GRD_GFX_REGION(2)
31003098   MCFG_TC0280GRD_GFXDECODE("gfxdecode");
3101   MCFG_TC0360PRI_ADD("tc0360pri")
3099
3100MCFG_TC0360PRI_ADD("tc0360pri")
31023101MACHINE_CONFIG_END
31033102
31043103
r29446r29447
31623161   MCFG_TC0100SCN_GFXDECODE("gfxdecode")
31633162   MCFG_TC0100SCN_PALETTE("palette")
31643163
3165   MCFG_TC0280GRD_ADD("tc0280grd", taitof2_tc0280grd_intf)
3164   MCFG_DEVICE_ADD("tc0280grd", TC0280GRD, 0)
3165   MCFG_TC0280GRD_GFX_REGION(2)
31663166   MCFG_TC0280GRD_GFXDECODE("gfxdecode");
3167
31673168   MCFG_TC0360PRI_ADD("tc0360pri")
31683169MACHINE_CONFIG_END
31693170
r29446r29447
34683469   MCFG_TC0100SCN_GFXDECODE("gfxdecode")
34693470   MCFG_TC0100SCN_PALETTE("palette")
34703471
3471   MCFG_TC0430GRW_ADD("tc0430grw", taitof2_tc0430grw_intf)
3472   MCFG_DEVICE_ADD("tc0430grw", TC0430GRW, 0)
3473   MCFG_TC0430GRW_GFX_REGION(2)
34723474   MCFG_TC0430GRW_GFXDECODE("gfxdecode")
3475
34733476   MCFG_TC0360PRI_ADD("tc0360pri")
34743477MACHINE_CONFIG_END
34753478
r29446r29447
36763679   MCFG_TC0100SCN_GFXDECODE("gfxdecode")
36773680   MCFG_TC0100SCN_PALETTE("palette")
36783681
3679   MCFG_TC0430GRW_ADD("tc0430grw", taitof2_tc0430grw_intf)
3682   MCFG_DEVICE_ADD("tc0430grw", TC0430GRW, 0)
3683   MCFG_TC0430GRW_GFX_REGION(2)
36803684   MCFG_TC0430GRW_GFXDECODE("gfxdecode")
3685
36813686   MCFG_TC0360PRI_ADD("tc0360pri")
36823687MACHINE_CONFIG_END
36833688
r29446r29447
37213726   MCFG_TC0100SCN_GFXDECODE("gfxdecode")
37223727   MCFG_TC0100SCN_PALETTE("palette")
37233728
3724   MCFG_TC0280GRD_ADD("tc0280grd", taitof2_tc0280grd_intf)
3729   MCFG_DEVICE_ADD("tc0280grd", TC0280GRD, 0)
3730   MCFG_TC0280GRD_GFX_REGION(2)
37253731   MCFG_TC0280GRD_GFXDECODE("gfxdecode");
3732
37263733   MCFG_TC0360PRI_ADD("tc0360pri")
37273734
37283735   /* sound hardware */
r29446r29447
37843791   MCFG_TC0100SCN_GFXDECODE("gfxdecode")
37853792   MCFG_TC0100SCN_PALETTE("palette")
37863793
3787   MCFG_TC0430GRW_ADD("tc0430grw", taitof2_tc0430grw_intf)
3794   MCFG_DEVICE_ADD("tc0430grw", TC0430GRW, 0)
3795   MCFG_TC0430GRW_GFX_REGION(2)
37883796   MCFG_TC0430GRW_GFXDECODE("gfxdecode")
3797
37893798   MCFG_TC0360PRI_ADD("tc0360pri")
37903799
37913800   /* sound hardware */
trunk/src/mame/video/tc0280grd.c
r29446r29447
4747
4848
4949//-------------------------------------------------
50//  device_config_complete - perform any
51//  operations now that the configuration is
52//  complete
53//-------------------------------------------------
54
55void tc0280grd_device::device_config_complete()
56{
57   // inherit a copy of the static data
58   const tc0280grd_interface *intf = reinterpret_cast<const tc0280grd_interface *>(static_config());
59   if (intf != NULL)
60   *static_cast<tc0280grd_interface *>(this) = *intf;
61
62   // or initialize to defaults if none provided
63   else
64   {
65   }
66}
67
68//-------------------------------------------------
6950//  device_start - device-specific startup
7051//-------------------------------------------------
7152
trunk/src/mame/video/tc0280grd.h
r29446r29447
1#ifndef _TC0280GRD_H_
2#define _TC0280GRD_H_
1#ifndef __TC0280GRD_H__
2#define __TC0280GRD_H__
33
4struct tc0280grd_interface
4class tc0280grd_device : public device_t
55{
6   int                m_gfxnum;
7};
8
9class tc0280grd_device : public device_t,
10                     public tc0280grd_interface
11{
126public:
137   tc0280grd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
148   ~tc0280grd_device() {}
159
1610   // static configuration
1711   static void static_set_gfxdecode_tag(device_t &device, const char *tag);
12   static void set_gfx_region(device_t &device, int gfxregion) { downcast<tc0280grd_device &>(device).m_gfxnum = gfxregion; }
1813
1914   DECLARE_READ16_MEMBER( tc0280grd_word_r );
2015   DECLARE_WRITE16_MEMBER( tc0280grd_word_w );
r29446r29447
3025
3126protected:
3227   // device-level overrides
33   virtual void device_config_complete();
3428   virtual void device_start();
3529   virtual void device_reset();
3630
r29446r29447
4236
4337   UINT16         m_ctrl[8];
4438   int            m_base_color;
39   int            m_gfxnum;
4540   required_device<gfxdecode_device> m_gfxdecode;
4641
4742   TILE_GET_INFO_MEMBER(tc0280grd_get_tile_info);
r29446r29447
6055   MCFG_DEVICE_ADD(_tag, TC0430GRW, 0) \
6156   MCFG_DEVICE_CONFIG(_interface)
6257
58#define MCFG_TC0280GRD_GFX_REGION(_region) \
59   tc0280grd_device::set_gfx_region(*device, _region);
60
61#define MCFG_TC0430GRW_GFX_REGION(_region) \
62   tc0280grd_device::set_gfx_region(*device, _region);
63
6364#define MCFG_TC0280GRD_GFXDECODE(_gfxtag) \
6465   tc0280grd_device::static_set_gfxdecode_tag(*device, "^" _gfxtag);
6566

Previous 199869 Revisions Next


© 1997-2024 The MAME Team