Previous 199869 Revisions Next

r29458 Tuesday 8th April, 2014 at 15:41:46 UTC by Alex Jackson
device_gfx_interface and memory system improvements: [Alex Jackson]

Added macros to facilitate declaring gfxdecode info arrays as members
of a device class.

AM_SHAREs in a device's internal address map or its default address map are
now tagmapped as children of that device rather than siblings (analogous
to how handlers in internal/default address maps are scoped).

Converted the Namco C45 to device_gfx_interface.
[src/emu]addrmap.c addrmap.h digfx.h dimemory.c memory.c
[src/emu/debug]debugcmd.c
[src/mame/drivers]igspoker.c namcos2.c tceptor.c
[src/mame/video]c45.c c45.h toaplan_scu.c toaplan_scu.h

trunk/src/mame/video/c45.c
r29457r29458
4646const device_type NAMCO_C45_ROAD = &device_creator<namco_c45_road_device>;
4747
4848
49const gfx_layout namco_c45_road_device::s_tile_layout =
49const gfx_layout namco_c45_road_device::tilelayout =
5050{
5151   ROAD_TILE_SIZE, ROAD_TILE_SIZE,
52   ROAD_TILE_COUNT_MAX,
52   RGN_FRAC(1,1),
5353   2,
5454   { 0, 8 },
55   {// x offset
56      0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
57      0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17
58   },
59   {// y offset
60      0x000,0x020,0x040,0x060,0x080,0x0a0,0x0c0,0x0e0,
61      0x100,0x120,0x140,0x160,0x180,0x1a0,0x1c0,0x1e0
62   },
55   { STEP8(0, 1), STEP8(16, 1) },
56   { STEP16(0, 32) },
6357   0x200 // offset to next tile
6458};
6559
60
61GFXDECODE_MEMBER( namco_c45_road_device::gfxinfo )
62   GFXDECODE_DEVICE_RAM( "tileram", 0, tilelayout, 0xf00, 64 )
63GFXDECODE_END
64
65
66DEVICE_ADDRESS_MAP_START(map, 16, namco_c45_road_device)
67   AM_RANGE(0x00000, 0x0ffff) AM_RAM_WRITE(tilemap_w) AM_SHARE("tmapram")
68   AM_RANGE(0x10000, 0x1f9ff) AM_RAM_WRITE(tileram_w) AM_SHARE("tileram")
69   AM_RANGE(0x1fa00, 0x1ffff) AM_RAM AM_SHARE("lineram")
70ADDRESS_MAP_END
71
72
6673//-------------------------------------------------
6774//  namco_c45_road_device -- constructor
6875//-------------------------------------------------
6976
7077namco_c45_road_device::namco_c45_road_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
7178   : device_t(mconfig, NAMCO_C45_ROAD, "Namco C45 Road", tag, owner, clock, "namco_c45_road", __FILE__),
72      m_transparent_color(~0),
73      m_tilemap(NULL),
74      m_gfxdecode(*this, "gfxdecode"),
75      m_palette(*this)
79      device_gfx_interface(mconfig, *this, gfxinfo),
80      device_memory_interface(mconfig, *this),
81      m_space_config("c45", ENDIANNESS_BIG, 16, 17, 0, address_map_delegate(FUNC(namco_c45_road_device::map), this)),
82      m_tmapram(*this, "tmapram"),
83      m_tileram(*this, "tileram"),
84      m_lineram(*this, "lineram"),
85      m_transparent_color(~0)
7686{
7787}
7888
89
90
91// We need these trampolines for now because uplift_submaps()
92// can't deal with address maps that contain RAM.
93// We need to explicitly use device_memory_interface::space()
94// because read/write handlers have a parameter called 'space'
95
7996//-------------------------------------------------
80//  read -- read from RAM
97//  read -- CPU read from our address space
8198//-------------------------------------------------
8299
83100READ16_MEMBER( namco_c45_road_device::read )
84101{
85   return m_ram[offset];
102   return device_memory_interface::space().read_word(offset*2);
86103}
87104
88105
89106//-------------------------------------------------
90//  write -- write to RAM
107//  write -- CPU write to our address space
91108//-------------------------------------------------
92109
93110WRITE16_MEMBER( namco_c45_road_device::write )
94111{
95   COMBINE_DATA(&m_ram[offset]);
112   device_memory_interface::space().write_word(offset*2, data, mem_mask);
113}
96114
97   // first half maps to the tilemap
98   if (offset < 0x10000/2)
99      m_tilemap->mark_tile_dirty(offset);
100115
101   // second half maps to the gfx elements
102   else
103   {
104      offset -= 0x10000/2;
105      m_gfxdecode->gfx(0)->mark_dirty(offset / WORDS_PER_ROAD_TILE);
106   }
116//-------------------------------------------------
117//  tilemap_w -- write to tilemap RAM
118//-------------------------------------------------
119
120WRITE16_MEMBER( namco_c45_road_device::tilemap_w )
121{
122   COMBINE_DATA(&m_tmapram[offset]);
123   m_tilemap->mark_tile_dirty(offset);
107124}
108125
109126
110127//-------------------------------------------------
128//  tileram_w -- write to tile RAM
129//-------------------------------------------------
130
131WRITE16_MEMBER( namco_c45_road_device::tileram_w )
132{
133   COMBINE_DATA(&m_tileram[offset]);
134   gfx(0)->mark_dirty(offset / WORDS_PER_ROAD_TILE);
135}
136
137
138//-------------------------------------------------
111139//  draw -- render to the target bitmap
112140//-------------------------------------------------
113141
r29457r29458
115143{
116144   const UINT8 *clut = (const UINT8 *)memregion("clut")->base();
117145   bitmap_ind16 &source_bitmap = m_tilemap->pixmap();
118   unsigned yscroll = m_ram[0x1fdfe/2];
146   unsigned yscroll = m_lineram[0x3fe/2];
119147
120148   // loop over scanlines
121149   for (int y = cliprect.min_y; y <= cliprect.max_y; y++)
122150   {
123151      // skip if we are not the right priority
124      int screenx = m_ram[0x1fa00/2 + y + 15];
152      int screenx = m_lineram[y + 15];
125153      if (pri != ((screenx & 0xf000) >> 12))
126154         continue;
127155
128156      // skip if we don't have a valid zoom factor
129      unsigned zoomx = m_ram[0x1fe00/2 + y + 15] & 0x3ff;
157      unsigned zoomx = m_lineram[0x400/2 + y + 15] & 0x3ff;
130158      if (zoomx == 0)
131159         continue;
132160
133161      // skip if we don't have a valid source increment
134      unsigned sourcey = m_ram[0x1fc00/2 + y + 15] + yscroll;
162      unsigned sourcey = m_lineram[0x200/2 + y + 15] + yscroll;
135163      const UINT16 *source_gfx = &source_bitmap.pix(sourcey & (ROAD_TILEMAP_HEIGHT - 1));
136164      unsigned dsourcex = (ROAD_TILEMAP_WIDTH << 16) / zoomx;
137165      if (dsourcex == 0)
r29457r29458
171199         while (numpixels-- > 0)
172200         {
173201            int pen = source_gfx[sourcex >> 16];
174            if (m_palette->pen_indirect(pen) != m_transparent_color)
202            if (palette()->pen_indirect(pen) != m_transparent_color)
175203            {
176204               if (clut != NULL)
177205                  pen = (pen & ~0xff) | clut[pen & 0xff];
r29457r29458
202230
203231void namco_c45_road_device::device_start()
204232{
205   if(!m_gfxdecode->started())
206      throw device_missing_dependencies();
207
208   // create a gfx_element describing the road graphics
209   m_gfxdecode->set_gfx(0, global_alloc(gfx_element(m_palette, s_tile_layout, 0x10000 + (UINT8 *)&m_ram[0], NATIVE_ENDIAN_VALUE_LE_BE(8,0), 0x3f, 0xf00)));
210
211233   // create a tilemap for the road
212   m_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(namco_c45_road_device::get_road_info), this),
234   m_tilemap = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(namco_c45_road_device::get_road_info), this),
213235      TILEMAP_SCAN_ROWS, ROAD_TILE_SIZE, ROAD_TILE_SIZE, ROAD_COLS, ROAD_ROWS);
214236}
215237
216MACHINE_CONFIG_FRAGMENT( namco_c45_road )
217   MCFG_GFXDECODE_ADD("gfxdecode", "^palette", empty) // FIXME
218MACHINE_CONFIG_END
219//-------------------------------------------------
220//  device_mconfig_additions - return a pointer to
221//  the device's machine fragment
222//-------------------------------------------------
223238
224machine_config_constructor namco_c45_road_device::device_mconfig_additions() const
225{
226   return MACHINE_CONFIG_NAME( namco_c45_road );
227}
228
229239//-------------------------------------------------
230//  device_stop -- device shutdown
240//  memory_space_config - return a description of
241//  any address spaces owned by this device
231242//-------------------------------------------------
232243
233void namco_c45_road_device::device_stop()
244const address_space_config *namco_c45_road_device::memory_space_config(address_spacenum spacenum) const
234245{
246   return (spacenum == AS_0) ? &m_space_config : NULL;
235247}
236248
237249
r29457r29458
243255{
244256   // ------xx xxxxxxxx tile number
245257   // xxxxxx-- -------- palette select
246   UINT16 data = m_ram[tile_index];
258   UINT16 data = m_tmapram[tile_index];
247259   int tile = data & 0x3ff;
248260   int color = data >> 10;
249261   SET_TILE_INFO_MEMBER(0, tile, color, 0);
250262}
251
252//-------------------------------------------------
253//  static_set_palette_tag: Set the tag of the
254//  palette device
255//-------------------------------------------------
256
257void namco_c45_road_device::static_set_palette_tag(device_t &device, const char *tag)
258{
259   downcast<namco_c45_road_device &>(device).m_palette.set_tag(tag);
260}
trunk/src/mame/video/c45.h
r29457r29458
1111#define MCFG_NAMCO_C45_ROAD_ADD(_tag) \
1212   MCFG_DEVICE_ADD(_tag, NAMCO_C45_ROAD, 0)
1313
14#define MCFG_NAMCO_C45_ROAD_PALETTE(_palette_tag) \
15   namco_c45_road_device::static_set_palette_tag(*device, "^" _palette_tag);
1614
17
1815//**************************************************************************
1916//  TYPE DEFINITIONS
2017//**************************************************************************
r29457r29458
2219
2320// ======================> namco_c45_road_device
2421
25class namco_c45_road_device : public device_t
22class namco_c45_road_device : public device_t, public device_gfx_interface, public device_memory_interface
2623{
2724   // constants
2825   static const int ROAD_COLS = 64;
r29457r29458
3027   static const int ROAD_TILE_SIZE = 16;
3128   static const int ROAD_TILEMAP_WIDTH = ROAD_TILE_SIZE * ROAD_COLS;
3229   static const int ROAD_TILEMAP_HEIGHT = ROAD_TILE_SIZE * ROAD_ROWS;
33   static const int ROAD_TILE_COUNT_MAX = 0xfa00 / 0x40; // 0x3e8
3430   static const int WORDS_PER_ROAD_TILE = 0x40/2;
31   static const gfx_layout tilelayout;
3532
3633public:
3734   // construction/destruction
3835   namco_c45_road_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
3936
40   static void static_set_palette_tag(device_t &device, const char *tag);
37   DECLARE_ADDRESS_MAP(map, 16);
4138
4239   // read/write handlers
4340   DECLARE_READ16_MEMBER( read );
4441   DECLARE_WRITE16_MEMBER( write );
4542
46   // optional information overrides
47   virtual machine_config_constructor device_mconfig_additions() const;
48
4943   // C45 Land (Road) Emulation
5044   void set_transparent_color(pen_t pen) { m_transparent_color = pen; }
5145   void draw(bitmap_ind16 &bitmap, const rectangle &cliprect, int pri);
r29457r29458
5347protected:
5448   // device-level overrides
5549   virtual void device_start();
56   virtual void device_stop();
50   virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const;
5751
52private:
5853   // internal helpers
54   DECLARE_GFXDECODE_MEMBER(gfxinfo);
55   DECLARE_WRITE16_MEMBER( tilemap_w );
56   DECLARE_WRITE16_MEMBER( tileram_w );
5957   TILE_GET_INFO_MEMBER( get_road_info );
6058
6159   // internal state
62   pen_t           m_transparent_color;
63   tilemap_t *     m_tilemap;
64   UINT16          m_ram[0x20000/2]; // at 0x880000 in Final Lap; at 0xa00000 in Lucky&Wild
65
66   static const gfx_layout s_tile_layout;
67   required_device<gfxdecode_device> m_gfxdecode;
68   required_device<palette_device> m_palette;
60   address_space_config        m_space_config;
61   required_shared_ptr<UINT16> m_tmapram;
62   required_shared_ptr<UINT16> m_tileram;
63   required_shared_ptr<UINT16> m_lineram;
64   pen_t                       m_transparent_color;
65   tilemap_t *                 m_tilemap;
6966};
7067
7168
trunk/src/mame/video/toaplan_scu.c
r29457r29458
1010
1111const device_type TOAPLAN_SCU = &device_creator<toaplan_scu_device>;
1212
13static const gfx_layout spritelayout =
13const gfx_layout toaplan_scu_device::spritelayout =
1414{
1515   16,16,          /* 16*16 sprites */
1616   RGN_FRAC(1,4),
r29457r29458
2121   16*16
2222};
2323
24static GFXDECODE_START( toaplan_scu )
24GFXDECODE_MEMBER( toaplan_scu_device::gfxinfo )
2525   GFXDECODE_DEVICE( DEVICE_SELF, 0, spritelayout, 0, 64 )
2626GFXDECODE_END
2727
2828
2929toaplan_scu_device::toaplan_scu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
3030   : device_t(mconfig, TOAPLAN_SCU, "toaplan_scu_device", tag, owner, clock, "toaplan_scu", __FILE__),
31   device_gfx_interface(mconfig, *this, GFXDECODE_NAME( toaplan_scu ))
31   device_gfx_interface(mconfig, *this, gfxinfo )
3232{
3333}
3434
trunk/src/mame/video/toaplan_scu.h
r29457r29458
44
55class toaplan_scu_device : public device_t, public device_gfx_interface
66{
7   static const gfx_layout spritelayout;
8   DECLARE_GFXDECODE_MEMBER(gfxinfo);
9
710public:
811   toaplan_scu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
912
trunk/src/mame/drivers/tceptor.c
r29457r29458
387387   MCFG_DEFAULT_LAYOUT(layout_horizont)
388388
389389   MCFG_NAMCO_C45_ROAD_ADD("c45_road")
390   MCFG_NAMCO_C45_ROAD_PALETTE("palette")
390   MCFG_GFX_PALETTE("palette")
391391
392392   MCFG_SCREEN_ADD("2dscreen", RASTER)
393393   MCFG_SCREEN_REFRESH_RATE(60.606060)
trunk/src/mame/drivers/igspoker.c
r29457r29458
17321732static const gfx_layout charlayout2 =
17331733{
17341734   8, 32,   /* 8*32 characters */
1735   RGN_FRAC(1, 3),
1735   RGN_FRAC(1, 3*4),
17361736   6,      /* 6 bits per pixel */
17371737   { RGN_FRAC(0,3)+8,RGN_FRAC(0,3)+0,
17381738      RGN_FRAC(1,3)+8,RGN_FRAC(1,3)+0,
trunk/src/mame/drivers/namcos2.c
r29457r29458
18621862   MCFG_VIDEO_START_OVERRIDE(namcos2_state, finallap)
18631863
18641864   MCFG_NAMCO_C45_ROAD_ADD("c45_road")
1865   MCFG_NAMCO_C45_ROAD_PALETTE("palette")
1865   MCFG_GFX_PALETTE("palette")
18661866
18671867   MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
18681868
r29457r29458
20202020   MCFG_VIDEO_START_OVERRIDE(namcos2_state, luckywld)
20212021
20222022   MCFG_NAMCO_C45_ROAD_ADD("c45_road")
2023   MCFG_NAMCO_C45_ROAD_PALETTE("palette")
2023   MCFG_GFX_PALETTE("palette")
20242024
20252025   MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
20262026
trunk/src/emu/dimemory.c
r29457r29458
293293            }
294294
295295            // if this entry references a memory region, validate it
296            if (entry->m_region != NULL && entry->m_share == 0)
296            if (entry->m_region != NULL && entry->m_sharetag == 0)
297297            {
298298               // make sure we can resolve the full path to the region
299299               bool found = false;
r29457r29458
346346               valid.validate_tag(entry->m_read.m_tag);
347347            if (entry->m_write.m_type == AMH_BANK)
348348               valid.validate_tag(entry->m_write.m_tag);
349            if (entry->m_share != NULL)
350               valid.validate_tag(entry->m_share);
349            if (entry->m_sharetag != NULL)
350               valid.validate_tag(entry->m_sharetag);
351351         }
352352
353353         // release the address map
trunk/src/emu/addrmap.c
r29457r29458
2626      m_addrend((map.m_globalmask == 0) ? end : end & map.m_globalmask),
2727      m_addrmirror(0),
2828      m_addrmask(0),
29      m_share(NULL),
29      m_sharebase(NULL),
30      m_sharetag(NULL),
3031      m_region(NULL),
3132      m_rgnoffs(0),
3233      m_rspace8(NULL),
trunk/src/emu/addrmap.h
r29457r29458
8383   void set_read_type(map_handler_type _type) { m_read.m_type = _type; }
8484   void set_write_type(map_handler_type _type) { m_write.m_type = _type; }
8585   void set_region(const char *tag, offs_t offset) { m_region = tag; m_rgnoffs = offset; }
86   void set_share(const char *tag) { assert(m_share == NULL); m_share = tag; }
86   void set_share(device_t &device, const char *tag) { assert(m_sharetag == NULL); m_sharebase = &device; m_sharetag = tag; }
8787
8888   // mask setting
8989   void set_mask(offs_t _mask);
r29457r29458
117117   map_handler_data        m_read;                 // data for read handler
118118   map_handler_data        m_write;                // data for write handler
119119   map_handler_data        m_setoffsethd;          // data for setoffset handler
120   const char *            m_share;                // tag of a shared memory block
120   device_t *              m_sharebase;            // pointer to the base device for the share tag
121   const char *            m_sharetag;             // tag of a shared memory block
121122   const char *            m_region;               // tag of region containing the memory backing this entry
122123   offs_t                  m_rgnoffs;              // offset within the region
123124
r29457r29458
566567#define AM_REGION(_tag, _offs) \
567568   curentry->set_region(_tag, _offs);
568569#define AM_SHARE(_tag) \
569   curentry->set_share(_tag);
570   curentry->set_share(device, _tag);
570571
571572// common shortcuts
572573#define AM_ROMBANK(_bank)                   AM_READ_BANK(_bank)
trunk/src/emu/memory.c
r29457r29458
18861886      adjust_addresses(entry->m_bytestart, entry->m_byteend, entry->m_bytemask, entry->m_bytemirror);
18871887
18881888      // if we have a share entry, add it to our map
1889      if (entry->m_share != NULL)
1889      if (entry->m_sharetag != NULL)
18901890      {
18911891         // if we can't find it, add it to our map
18921892         astring fulltag;
1893         if (manager().m_sharelist.find(device().siblingtag(fulltag, entry->m_share).cstr()) == NULL)
1893         if (manager().m_sharelist.find(entry->m_sharebase->subtag(fulltag, entry->m_sharetag).cstr()) == NULL)
18941894         {
18951895            VPRINTF(("Creating share '%s' of length 0x%X\n", fulltag.cstr(), entry->m_byteend + 1 - entry->m_bytestart));
18961896            memory_share *share = global_alloc(memory_share(m_map->m_databits, entry->m_byteend + 1 - entry->m_bytestart, endianness()));
r29457r29458
19101910      }
19111911
19121912      // validate adjusted addresses against implicit regions
1913      if (entry->m_region != NULL && entry->m_share == NULL)
1913      if (entry->m_region != NULL && entry->m_sharetag == NULL)
19141914      {
19151915         // determine full tag
19161916         astring fulltag;
r29457r29458
22242224   for (address_map_entry *entry = m_map->m_entrylist.first(); entry != NULL; entry = entry->next())
22252225   {
22262226      // if we haven't assigned this block yet, see if we have a mapped shared pointer for it
2227      if (entry->m_memory == NULL && entry->m_share != NULL)
2227      if (entry->m_memory == NULL && entry->m_sharetag != NULL)
22282228      {
22292229         astring fulltag;
2230         memory_share *share = manager().m_sharelist.find(device().siblingtag(fulltag, entry->m_share).cstr());
2230         memory_share *share = manager().m_sharelist.find(entry->m_sharebase->subtag(fulltag, entry->m_sharetag).cstr());
22312231         if (share != NULL && share->ptr() != NULL)
22322232         {
22332233            entry->m_memory = share->ptr();
2234            VPRINTF(("memory range %08X-%08X -> shared_ptr '%s' [%p]\n", entry->m_addrstart, entry->m_addrend, entry->m_share, entry->m_memory));
2234            VPRINTF(("memory range %08X-%08X -> shared_ptr '%s' [%p]\n", entry->m_addrstart, entry->m_addrend, entry->m_sharetag, entry->m_memory));
22352235         }
22362236         else
22372237         {
2238            VPRINTF(("memory range %08X-%08X -> shared_ptr '%s' but not found\n", entry->m_addrstart, entry->m_addrend, entry->m_share));
2238            VPRINTF(("memory range %08X-%08X -> shared_ptr '%s' but not found\n", entry->m_addrstart, entry->m_addrend, entry->m_sharetag));
22392239         }
22402240      }
22412241
r29457r29458
22472247      }
22482248
22492249      // if we're the first match on a shared pointer, assign it now
2250      if (entry->m_memory != NULL && entry->m_share != NULL)
2250      if (entry->m_memory != NULL && entry->m_sharetag != NULL)
22512251      {
22522252         astring fulltag;
2253         memory_share *share = manager().m_sharelist.find(device().siblingtag(fulltag, entry->m_share).cstr());
2253         memory_share *share = manager().m_sharelist.find(entry->m_sharebase->subtag(fulltag, entry->m_sharetag).cstr());
22542254         if (share != NULL && share->ptr() == NULL)
22552255         {
22562256            share->set_ptr(entry->m_memory);
2257            VPRINTF(("setting shared_ptr '%s' = %p\n", entry->m_share, entry->m_memory));
2257            VPRINTF(("setting shared_ptr '%s' = %p\n", entry->m_sharetag, entry->m_memory));
22582258         }
22592259      }
22602260
r29457r29458
28012801bool address_space::needs_backing_store(const address_map_entry *entry)
28022802{
28032803   // if we are sharing, and we don't have a pointer yet, create one
2804   if (entry->m_share != NULL)
2804   if (entry->m_sharetag != NULL)
28052805   {
28062806      astring fulltag;
2807      memory_share *share = manager().m_sharelist.find(device().siblingtag(fulltag, entry->m_share).cstr());
2807      memory_share *share = manager().m_sharelist.find(entry->m_sharebase->subtag(fulltag, entry->m_sharetag).cstr());
28082808      if (share != NULL && share->ptr() == NULL)
28092809         return true;
28102810   }
trunk/src/emu/debug/debugcmd.c
r29457r29458
19931993      {
19941994         cheat_region[region_count].offset = space->address_to_byte(entry->m_addrstart) & space->bytemask();
19951995         cheat_region[region_count].endoffset = space->address_to_byte(entry->m_addrend) & space->bytemask();
1996         cheat_region[region_count].share = entry->m_share;
1996         cheat_region[region_count].share = entry->m_sharetag;
19971997         cheat_region[region_count].disabled = (entry->m_write.m_type == AMH_RAM) ? FALSE : TRUE;
19981998
19991999         /* disable double share regions */
2000         if (entry->m_share != NULL)
2000         if (entry->m_sharetag != NULL)
20012001            for (i = 0; i < region_count; i++)
20022002               if (cheat_region[i].share != NULL)
2003                  if (strcmp(cheat_region[i].share, entry->m_share) == 0)
2003                  if (strcmp(cheat_region[i].share, entry->m_sharetag) == 0)
20042004                     cheat_region[region_count].disabled = TRUE;
20052005
20062006         region_count++;
trunk/src/emu/digfx.h
r29457r29458
105105#define GFXDECODE_START( name ) const gfx_decode_entry GFXDECODE_NAME(name)[] = {
106106#define GFXDECODE_END { 0 } };
107107
108// use these to declare a gfx_decode_entry array as a member of a device class
109#define DECLARE_GFXDECODE_MEMBER( name ) static const gfx_decode_entry name[]
110#define GFXDECODE_MEMBER( name ) const gfx_decode_entry name[] = {
111
112
108113// common gfx_decode_entry macros
109114#define GFXDECODE_ENTRYX(region,offset,layout,start,colors,flags) { region, offset, &layout, start, colors, flags },
110115#define GFXDECODE_ENTRY(region,offset,layout,start,colors) { region, offset, &layout, start, colors, 0 },

Previous 199869 Revisions Next


© 1997-2024 The MAME Team