summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatarGravatar cam900 <dbtlrchl@naver.com>2019-09-13 23:31:18 +0900
committerGravatarGravatar R. Belmont <rb6502@users.noreply.github.com>2019-09-13 10:31:18 -0400
commit4ac3fa8236943cebe9c96d925e1ddc16d7ce9374 (patch) (github)
tree3f47b430951a2713a2995eff74563f12fa25294d
parent5ebacc324561582617a339d5931a654fa6125db7 (diff)
downloadmame-4ac3fa8236943cebe9c96d925e1ddc16d7ce9374.tar.bz2
mame-4ac3fa8236943cebe9c96d925e1ddc16d7ce9374.zip
emu/video/generic.cpp : Add 2x2 grouped case of 16x16 gfx layouts (#5625)
* emu/video/generic.cpp : Add grouped case of 16x16 gfx layouts these are made of 4 8x8 tiles, currently 4bpp packed and 8bpp raw layout is exists. More usage of generic gfx layouts, Fix spacing * generic.cpp : Remove unused * emu/video/generic.cpp : Fix naming, Add notes * megasys1.cpp : Fix this
-rw-r--r--src/emu/video/generic.cpp61
-rw-r--r--src/emu/video/generic.h6
-rw-r--r--src/mame/drivers/airbustr.cpp32
-rw-r--r--src/mame/drivers/argus.cpp44
-rw-r--r--src/mame/drivers/cischeat.cpp70
-rw-r--r--src/mame/drivers/djboy.cpp15
-rw-r--r--src/mame/drivers/gaiden.cpp40
-rw-r--r--src/mame/drivers/galpanic.cpp16
-rw-r--r--src/mame/drivers/hvyunit.cpp21
-rw-r--r--src/mame/drivers/jalmah.cpp32
-rw-r--r--src/mame/drivers/limenko.cpp13
-rw-r--r--src/mame/drivers/mcatadv.cpp15
-rw-r--r--src/mame/drivers/megasys1.cpp38
-rw-r--r--src/mame/drivers/ninjakd2.cpp49
-rw-r--r--src/mame/drivers/nmk16.cpp74
-rw-r--r--src/mame/drivers/powerins.cpp25
-rw-r--r--src/mame/drivers/quizpani.cpp17
-rw-r--r--src/mame/drivers/sandscrp.cpp14
-rw-r--r--src/mame/drivers/snowbros.cpp27
-rw-r--r--src/mame/drivers/tecmo.cpp30
-rw-r--r--src/mame/drivers/tecmo16.cpp28
-rw-r--r--src/mame/drivers/tecmosys.cpp31
22 files changed, 186 insertions, 512 deletions
diff --git a/src/emu/video/generic.cpp b/src/emu/video/generic.cpp
index 9cce80ff10e..44d8f124a38 100644
--- a/src/emu/video/generic.cpp
+++ b/src/emu/video/generic.cpp
@@ -93,6 +93,7 @@ const gfx_layout gfx_16x16x4_planar =
16*16
};
+// packed gfxs; msb and lsb is start nibble of packed pixel byte
const gfx_layout gfx_8x8x4_packed_msb =
{
8,8,
@@ -140,3 +141,63 @@ const gfx_layout gfx_16x16x4_packed_lsb =
};
GFXLAYOUT_RAW(gfx_16x16x8_raw, 16, 16, 16*8, 16*16*8);
+
+/*
+ 16x16; grouped of 4 8x8 tiles (row align)
+ 0 1
+ 2 3
+*/
+const gfx_layout gfx_8x8x4_row_2x2_group_packed_msb =
+{
+ 16,16,
+ RGN_FRAC(1,1),
+ 4,
+ { STEP4(0,1) },
+ { STEP8(0,4), STEP8(4*8*8,4) }, // x order : hi nibble first, low nibble second
+ { STEP8(0,4*8), STEP8(4*8*8*2,4*8) },
+ 16*16*4
+};
+
+const gfx_layout gfx_8x8x4_row_2x2_group_packed_lsb =
+{
+ 16,16,
+ RGN_FRAC(1,1),
+ 4,
+ { STEP4(0,1) },
+ { // x order : low nibble first, hi nibble second
+ 1*4, 0*4, 3*4, 2*4, 5*4, 4*4, 7*4, 6*4,
+ 4*8*8+1*4, 4*8*8+0*4, 4*8*8+3*4, 4*8*8+2*4, 4*8*8+5*4, 4*8*8+4*4, 4*8*8+7*4, 4*8*8+6*4
+ },
+ { STEP8(0,4*8), STEP8(4*8*8*2,4*8) },
+ 16*16*4
+};
+
+/*
+ 16x16; grouped of 4 8x8 tiles (col align)
+ 0 2
+ 1 3
+*/
+const gfx_layout gfx_8x8x4_col_2x2_group_packed_msb =
+{
+ 16,16,
+ RGN_FRAC(1,1),
+ 4,
+ { STEP4(0,1) },
+ { STEP8(0,4), STEP8(4*8*16,4) }, // x order : hi nibble first, low nibble second
+ { STEP16(0,4*8) },
+ 16*16*4
+};
+
+const gfx_layout gfx_8x8x4_col_2x2_group_packed_lsb =
+{
+ 16,16,
+ RGN_FRAC(1,1),
+ 4,
+ { STEP4(0,1) },
+ { // x order : low nibble first, hi nibble second
+ 1*4, 0*4, 3*4, 2*4, 5*4, 4*4, 7*4, 6*4,
+ 4*8*16+1*4, 4*8*16+0*4, 4*8*16+3*4, 4*8*16+2*4, 4*8*16+5*4, 4*8*16+4*4, 4*8*16+7*4, 4*8*16+6*4
+ },
+ { STEP16(0,4*8) },
+ 16*16*4
+};
diff --git a/src/emu/video/generic.h b/src/emu/video/generic.h
index 9c1f30bc7b3..3d90edecb38 100644
--- a/src/emu/video/generic.h
+++ b/src/emu/video/generic.h
@@ -36,4 +36,10 @@ extern const gfx_layout gfx_16x16x4_packed_msb;
extern const gfx_layout gfx_16x16x4_packed_lsb;
extern const gfx_layout gfx_16x16x8_raw;
+extern const gfx_layout gfx_8x8x4_row_2x2_group_packed_msb;
+extern const gfx_layout gfx_8x8x4_row_2x2_group_packed_lsb;
+
+extern const gfx_layout gfx_8x8x4_col_2x2_group_packed_msb;
+extern const gfx_layout gfx_8x8x4_col_2x2_group_packed_lsb;
+
#endif /* MAME_EMU_VIDEO_GENERIC_H */
diff --git a/src/mame/drivers/airbustr.cpp b/src/mame/drivers/airbustr.cpp
index 89d664ce052..563a55f7a9e 100644
--- a/src/mame/drivers/airbustr.cpp
+++ b/src/mame/drivers/airbustr.cpp
@@ -481,39 +481,11 @@ static INPUT_PORTS_START( airbustrj )
PORT_DIPSETTING( 0x80, DEF_STR( 1C_2C ) )
INPUT_PORTS_END
-/* Graphics Layout */
-
-static const gfx_layout tile_gfxlayout =
-{
- 16, 16,
- RGN_FRAC(1,1),
- 4,
- { 0, 1, 2, 3 },
- { 1*4, 0*4, 3*4, 2*4, 5*4, 4*4, 7*4, 6*4,
- 1*4+32*8, 0*4+32*8, 3*4+32*8, 2*4+32*8, 5*4+32*8, 4*4+32*8, 7*4+32*8, 6*4+32*8 },
- { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32,
- 0*32+64*8, 1*32+64*8, 2*32+64*8, 3*32+64*8, 4*32+64*8, 5*32+64*8, 6*32+64*8, 7*32+64*8 },
- 16*16*4
-};
-
-static const gfx_layout sprite_gfxlayout =
-{
- 16, 16,
- RGN_FRAC(1,1),
- 4,
- { 0, 1, 2, 3 },
- { 0*4, 1*4, 2*4, 3*4, 4*4, 5*4, 6*4, 7*4,
- 0*4+32*8, 1*4+32*8, 2*4+32*8, 3*4+32*8, 4*4+32*8, 5*4+32*8, 6*4+32*8, 7*4+32*8 },
- { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32,
- 0*32+64*8, 1*32+64*8, 2*32+64*8, 3*32+64*8, 4*32+64*8, 5*32+64*8, 6*32+64*8, 7*32+64*8 },
- 16*16*4
-};
-
/* Graphics Decode Information */
static GFXDECODE_START( gfx_airbustr )
- GFXDECODE_ENTRY( "gfx1", 0, tile_gfxlayout, 0, 32 ) // tiles
- GFXDECODE_ENTRY( "gfx2", 0, sprite_gfxlayout, 512, 16 ) // sprites
+ GFXDECODE_ENTRY( "gfx1", 0, gfx_8x8x4_row_2x2_group_packed_lsb, 0, 32 ) // tiles
+ GFXDECODE_ENTRY( "gfx2", 0, gfx_8x8x4_row_2x2_group_packed_msb, 512, 16 ) // sprites
GFXDECODE_END
diff --git a/src/mame/drivers/argus.cpp b/src/mame/drivers/argus.cpp
index ba3d064b54b..c1615f5e57b 100644
--- a/src/mame/drivers/argus.cpp
+++ b/src/mame/drivers/argus.cpp
@@ -455,46 +455,24 @@ INPUT_PORTS_END
***************************************************************************/
-static const gfx_layout charlayout =
-{
- 8,8, /* 8x8 characters */
- RGN_FRAC(1,1), /* number of characters */
- 4, /* 4 bits per pixel */
- { STEP4(0,1) },
- { STEP8(0,4) },
- { STEP8(0,4*8) },
- 32*8
-};
-
-static const gfx_layout tilelayout =
-{
- 16,16, /* 16x16 characters */
- RGN_FRAC(1,1), /* number of characters */
- 4, /* 4 bits per pixel */
- { STEP4(0,1) },
- { STEP8(0,4), STEP8(4*8*16, 4) },
- { STEP16(0,4*8) },
- 128*8
-};
-
static GFXDECODE_START( gfx_argus )
- GFXDECODE_ENTRY( "gfx1", 0, tilelayout, 0*16, 8 )
- GFXDECODE_ENTRY( "gfx2", 0, tilelayout, 8*16, 16 )
- GFXDECODE_ENTRY( "gfx3", 0, tilelayout, 24*16, 16 )
- GFXDECODE_ENTRY( "gfx4", 0, charlayout, 40*16, 16 )
+ GFXDECODE_ENTRY( "gfx1", 0, gfx_8x8x4_col_2x2_group_packed_msb, 0*16, 8 )
+ GFXDECODE_ENTRY( "gfx2", 0, gfx_8x8x4_col_2x2_group_packed_msb, 8*16, 16 )
+ GFXDECODE_ENTRY( "gfx3", 0, gfx_8x8x4_col_2x2_group_packed_msb, 24*16, 16 )
+ GFXDECODE_ENTRY( "gfx4", 0, gfx_8x8x4_packed_msb, 40*16, 16 )
GFXDECODE_END
static GFXDECODE_START( gfx_valtric )
- GFXDECODE_ENTRY( "gfx1", 0, tilelayout, 0*16, 16 )
- GFXDECODE_ENTRY( "gfx2", 0, tilelayout, 16*16, 16 )
- GFXDECODE_ENTRY( "gfx3", 0, charlayout, 32*16, 16 )
+ GFXDECODE_ENTRY( "gfx1", 0, gfx_8x8x4_col_2x2_group_packed_msb, 0*16, 16 )
+ GFXDECODE_ENTRY( "gfx2", 0, gfx_8x8x4_col_2x2_group_packed_msb, 16*16, 16 )
+ GFXDECODE_ENTRY( "gfx3", 0, gfx_8x8x4_packed_msb, 32*16, 16 )
GFXDECODE_END
static GFXDECODE_START( gfx_butasan )
- GFXDECODE_ENTRY( "gfx1", 0, tilelayout, 0*16, 16 )
- GFXDECODE_ENTRY( "gfx2", 0, tilelayout, 16*16, 16 )
- GFXDECODE_ENTRY( "gfx3", 0, tilelayout, 12*16, 16 )
- GFXDECODE_ENTRY( "gfx4", 0, charlayout, 32*16, 16 )
+ GFXDECODE_ENTRY( "gfx1", 0, gfx_8x8x4_col_2x2_group_packed_msb, 0*16, 16 )
+ GFXDECODE_ENTRY( "gfx2", 0, gfx_8x8x4_col_2x2_group_packed_msb, 16*16, 16 )
+ GFXDECODE_ENTRY( "gfx3", 0, gfx_8x8x4_col_2x2_group_packed_msb, 12*16, 16 )
+ GFXDECODE_ENTRY( "gfx4", 0, gfx_8x8x4_packed_msb, 32*16, 16 )
GFXDECODE_END
diff --git a/src/mame/drivers/cischeat.cpp b/src/mame/drivers/cischeat.cpp
index f3917a6c2a9..bbf0a46dfe3 100644
--- a/src/mame/drivers/cischeat.cpp
+++ b/src/mame/drivers/cischeat.cpp
@@ -1792,44 +1792,6 @@ INPUT_PORTS_END
**************************************************************************/
-#ifdef UNUSED_VARIABLE
-/* 8x8x4, straightforward layout */
-static const gfx_layout tiles_8x8 =
-{
- 8,8,
- RGN_FRAC(1,1),
- 4,
- { STEP4(0,1) },
- { STEP8(0,4) },
- { STEP8(0,4*8) },
- 8*8*4
-};
-#endif
-
-/* 16x16x4, straightforward layout */
-static const gfx_layout tiles_16x16 =
-{
- 16,16,
- RGN_FRAC(1,1),
- 4,
- { STEP4(0,1) },
- { STEP16(0,4) },
- { STEP16(0,4*16) },
- 16*16*4
-};
-
-/* 16x16x4, made of four 8x8 tiles */
-static const gfx_layout tiles_16x16_quad =
-{
- 16,16,
- RGN_FRAC(1,1),
- 4,
- { STEP4(0,1) },
- { STEP8(8*8*4*0,4), STEP8(8*8*4*2,4) },
- { STEP16(0,4*8) },
- 16*16*4
-};
-
static const uint32_t road_layout_xoffset[64] =
{
STEP16(16*4*0,4),STEP16(16*4*1,4),
@@ -1855,10 +1817,10 @@ static const gfx_layout road_layout =
**************************************************************************/
static GFXDECODE_START( gfx_bigrun )
- //GFXDECODE_ENTRY( "scroll0", 0, tiles_8x8, 0x0e00/2 , 16 ) // Scroll 0
- //GFXDECODE_ENTRY( "scroll1", 0, tiles_8x8, 0x1600/2 , 16 ) // Scroll 1
- //GFXDECODE_ENTRY( "scroll2", 0, tiles_8x8, 0x3600/2 , 16 ) // Scroll 2
- GFXDECODE_ENTRY( "sprites", 0, tiles_16x16,0x2800/2 , 64 ) // [0] Sprites
+ //GFXDECODE_ENTRY( "scroll0", 0, gfx_8x8x4_packed_msb, 0x0e00/2 , 16 ) // Scroll 0
+ //GFXDECODE_ENTRY( "scroll1", 0, gfx_8x8x4_packed_msb, 0x1600/2 , 16 ) // Scroll 1
+ //GFXDECODE_ENTRY( "scroll2", 0, gfx_8x8x4_packed_msb, 0x3600/2 , 16 ) // Scroll 2
+ GFXDECODE_ENTRY( "sprites", 0, gfx_16x16x4_packed_msb, 0x2800/2 , 64 ) // [0] Sprites
GFXDECODE_ENTRY( "road0", 0, road_layout,0x2000/2 , 64 ) // [1] Road 0
GFXDECODE_ENTRY( "road1", 0, road_layout,0x1800/2 , 64 ) // [2] Road 1
GFXDECODE_END
@@ -1868,10 +1830,10 @@ GFXDECODE_END
**************************************************************************/
static GFXDECODE_START( gfx_cischeat )
- //GFXDECODE_ENTRY( "scroll0", 0, tiles_8x8, 0x1c00/2, 32 ) // Scroll 0
- //GFXDECODE_ENTRY( "scroll1", 0, tiles_8x8, 0x2c00/2, 32 ) // Scroll 1
- //GFXDECODE_ENTRY( "scroll2", 0, tiles_8x8, 0x6c00/2, 32 ) // Scroll 2
- GFXDECODE_ENTRY( "sprites", 0, tiles_16x16,0x5000/2, 128 ) // [0] Sprites
+ //GFXDECODE_ENTRY( "scroll0", 0, gfx_8x8x4_packed_msb, 0x1c00/2, 32 ) // Scroll 0
+ //GFXDECODE_ENTRY( "scroll1", 0, gfx_8x8x4_packed_msb, 0x2c00/2, 32 ) // Scroll 1
+ //GFXDECODE_ENTRY( "scroll2", 0, gfx_8x8x4_packed_msb, 0x6c00/2, 32 ) // Scroll 2
+ GFXDECODE_ENTRY( "sprites", 0, gfx_16x16x4_packed_msb, 0x5000/2, 128 ) // [0] Sprites
GFXDECODE_ENTRY( "road0", 0, road_layout,0x3800/2, 64 ) // [1] Road 0
GFXDECODE_ENTRY( "road1", 0, road_layout,0x4800/2, 64 ) // [2] Road 1
GFXDECODE_END
@@ -1881,10 +1843,10 @@ GFXDECODE_END
**************************************************************************/
static GFXDECODE_START( gfx_f1gpstar )
- //GFXDECODE_ENTRY( "scroll0", 0, tiles_8x8, 0x1e00/2, 16 ) // Scroll 0
- //GFXDECODE_ENTRY( "scroll1", 0, tiles_8x8, 0x2e00/2, 16 ) // Scroll 1
- //GFXDECODE_ENTRY( "scroll2", 0, tiles_8x8, 0x6e00/2, 16 ) // Scroll 2
- GFXDECODE_ENTRY( "sprites", 0, tiles_16x16,0x5000/2, 128 ) // [0] Sprites
+ //GFXDECODE_ENTRY( "scroll0", 0, gfx_8x8x4_packed_msb, 0x1e00/2, 16 ) // Scroll 0
+ //GFXDECODE_ENTRY( "scroll1", 0, gfx_8x8x4_packed_msb, 0x2e00/2, 16 ) // Scroll 1
+ //GFXDECODE_ENTRY( "scroll2", 0, gfx_8x8x4_packed_msb, 0x6e00/2, 16 ) // Scroll 2
+ GFXDECODE_ENTRY( "sprites", 0, gfx_16x16x4_packed_msb, 0x5000/2, 128 ) // [0] Sprites
GFXDECODE_ENTRY( "road0", 0, road_layout,0x3800/2, 64 ) // [1] Road 0
GFXDECODE_ENTRY( "road1", 0, road_layout,0x4800/2, 64 ) // [2] Road 1
GFXDECODE_END
@@ -1894,10 +1856,10 @@ GFXDECODE_END
**************************************************************************/
static GFXDECODE_START( gfx_scudhamm )
- //GFXDECODE_ENTRY( "scroll0", 0, tiles_8x8, 0x1e00/2, 16 ) // Scroll 0
- //GFXDECODE_ENTRY( "scroll0", 0, tiles_8x8, 0x0000/2, 16 ) // UNUSED
- //GFXDECODE_ENTRY( "scroll2", 0, tiles_8x8, 0x4e00/2, 16 ) // Scroll 2
- GFXDECODE_ENTRY( "sprites", 0, tiles_16x16_quad, 0x3000/2, 128 ) // [0] sprites
+ //GFXDECODE_ENTRY( "scroll0", 0, gfx_8x8x4_packed_msb, 0x1e00/2, 16 ) // Scroll 0
+ //GFXDECODE_ENTRY( "scroll0", 0, gfx_8x8x4_packed_msb, 0x0000/2, 16 ) // UNUSED
+ //GFXDECODE_ENTRY( "scroll2", 0, gfx_8x8x4_packed_msb, 0x4e00/2, 16 ) // Scroll 2
+ GFXDECODE_ENTRY( "sprites", 0, gfx_8x8x4_col_2x2_group_packed_msb, 0x3000/2, 128 ) // [0] sprites
// No Road Layers
GFXDECODE_END
diff --git a/src/mame/drivers/djboy.cpp b/src/mame/drivers/djboy.cpp
index 5ddbd4b1687..39a035f90b1 100644
--- a/src/mame/drivers/djboy.cpp
+++ b/src/mame/drivers/djboy.cpp
@@ -417,20 +417,9 @@ static INPUT_PORTS_START( djboy )
INPUT_PORTS_END
-static const gfx_layout tile_layout =
-{
- 16,16,
- RGN_FRAC(1,1),
- 4,
- { STEP4(0,1) },
- { STEP8(0,4), STEP8(4*8*8,4) },
- { STEP8(0,4*8), STEP8(4*8*8*2,4*8) },
- 16*16*4
-};
-
static GFXDECODE_START( gfx_djboy )
- GFXDECODE_ENTRY( "gfx1", 0, tile_layout, 0x100, 16 ) /* sprite bank */
- GFXDECODE_ENTRY( "gfx2", 0, tile_layout, 0x000, 16 ) /* background tiles */
+ GFXDECODE_ENTRY( "gfx1", 0, gfx_8x8x4_row_2x2_group_packed_msb, 0x100, 16 ) /* sprite bank */
+ GFXDECODE_ENTRY( "gfx2", 0, gfx_8x8x4_row_2x2_group_packed_msb, 0x000, 16 ) /* background tiles */
GFXDECODE_END
/******************************************************************************/
diff --git a/src/mame/drivers/gaiden.cpp b/src/mame/drivers/gaiden.cpp
index 49cf7a22a5f..2b53ab82554 100644
--- a/src/mame/drivers/gaiden.cpp
+++ b/src/mame/drivers/gaiden.cpp
@@ -662,33 +662,11 @@ INPUT_PORTS_END
-static const gfx_layout tilelayout =
-{
- 8,8, /* tile size */
- RGN_FRAC(1,1), /* number of tiles */
- 4, /* 4 bits per pixel */
- { STEP4(0,1) }, /* the bitplanes are packed in one nibble */
- { STEP8(0,4) },
- { STEP8(0,4*8) },
- 4*8*8 /* offset to next tile */
-};
-
-static const gfx_layout tile2layout =
-{
- 16,16, /* tile size */
- RGN_FRAC(1,1), /* number of tiles */
- 4, /* 4 bits per pixel */
- { STEP4(0,1) }, /* the bitplanes are packed in one nibble */
- { STEP8(0,4), STEP8(4*8*8,4) },
- { STEP8(0,4*8), STEP8(4*8*8*2,4*8) },
- 4*8*8*2*2 /* offset to next tile */
-};
-
static GFXDECODE_START( gfx_gaiden )
- GFXDECODE_ENTRY( "gfx1", 0, tilelayout, 0x100, 16 ) /* tiles 8x8 */
- GFXDECODE_ENTRY( "gfx2", 0, tile2layout, 0x000, 0x100 ) /* tiles 16x16 */
- GFXDECODE_ENTRY( "gfx3", 0, tile2layout, 0x000, 0x100 ) /* tiles 16x16 (only colors 0x00-0x0f and 0x80-0x8f are used) */
- GFXDECODE_ENTRY( "gfx4", 0, tilelayout, 0x000, 0x100 ) /* sprites 8x8 (only colors 0x00-0x0f and 0x80-0x8f are used) */
+ GFXDECODE_ENTRY( "gfx1", 0, gfx_8x8x4_packed_msb, 0x100, 16 ) /* tiles 8x8 */
+ GFXDECODE_ENTRY( "gfx2", 0, gfx_8x8x4_row_2x2_group_packed_msb, 0x000, 0x100 ) /* tiles 16x16 */
+ GFXDECODE_ENTRY( "gfx3", 0, gfx_8x8x4_row_2x2_group_packed_msb, 0x000, 0x100 ) /* tiles 16x16 (only colors 0x00-0x0f and 0x80-0x8f are used) */
+ GFXDECODE_ENTRY( "gfx4", 0, gfx_8x8x4_packed_msb, 0x000, 0x100 ) /* sprites 8x8 (only colors 0x00-0x0f and 0x80-0x8f are used) */
GFXDECODE_END
static const gfx_layout mastninj_tile2layout =
@@ -714,10 +692,10 @@ static const gfx_layout mastninj_spritelayout =
};
static GFXDECODE_START( gfx_mastninj )
- GFXDECODE_ENTRY( "gfx1", 0, tilelayout, 0x000, 16 ) /* tiles 8x8 */
- GFXDECODE_ENTRY( "gfx2", 0, mastninj_tile2layout, 0x300, 16 ) /* tiles 16x16 */
- GFXDECODE_ENTRY( "gfx3", 0, mastninj_tile2layout, 0x200, 16 ) /* tiles 16x16 */
- GFXDECODE_ENTRY( "gfx4", 0, mastninj_spritelayout, 0x100, 16 ) /* sprites 16x16 */
+ GFXDECODE_ENTRY( "gfx1", 0, gfx_8x8x4_packed_msb, 0x000, 16 ) /* tiles 8x8 */
+ GFXDECODE_ENTRY( "gfx2", 0, mastninj_tile2layout, 0x300, 16 ) /* tiles 16x16 */
+ GFXDECODE_ENTRY( "gfx3", 0, mastninj_tile2layout, 0x200, 16 ) /* tiles 16x16 */
+ GFXDECODE_ENTRY( "gfx4", 0, mastninj_spritelayout, 0x100, 16 ) /* sprites 16x16 */
GFXDECODE_END
static const gfx_layout drgnbowl_tile2layout =
@@ -743,7 +721,7 @@ static const gfx_layout drgnbowl_spritelayout =
};
static GFXDECODE_START( gfx_drgnbowl )
- GFXDECODE_ENTRY( "gfx1", 0, tilelayout, 0, 16 ) /* tiles 8x8 */
+ GFXDECODE_ENTRY( "gfx1", 0, gfx_8x8x4_packed_msb, 0, 16 ) /* tiles 8x8 */
GFXDECODE_ENTRY( "gfx2", 0x00000, drgnbowl_tile2layout, 0x300, 16 ) /* tiles 16x16 */
GFXDECODE_ENTRY( "gfx2", 0x20000, drgnbowl_tile2layout, 0x200, 16 ) /* tiles 16x16 */
GFXDECODE_ENTRY( "gfx3", 0, drgnbowl_spritelayout, 0x100, 16 ) /* sprites 16x16 */
diff --git a/src/mame/drivers/galpanic.cpp b/src/mame/drivers/galpanic.cpp
index b4a5aee7345..b3db0822216 100644
--- a/src/mame/drivers/galpanic.cpp
+++ b/src/mame/drivers/galpanic.cpp
@@ -213,22 +213,8 @@ static INPUT_PORTS_START( galpanica )
INPUT_PORTS_END
-
-static const gfx_layout spritelayout =
-{
- 16,16,
- RGN_FRAC(1,1),
- 4,
- { 0, 1, 2, 3 },
- { 0*4, 1*4, 2*4, 3*4, 4*4, 5*4, 6*4, 7*4,
- 64*4, 65*4, 66*4, 67*4, 68*4, 69*4, 70*4, 71*4 },
- { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32,
- 16*32, 17*32, 18*32, 19*32, 20*32, 21*32, 22*32, 23*32 },
- 128*8
-};
-
static GFXDECODE_START( gfx_galpanic )
- GFXDECODE_ENTRY( "gfx1", 0, spritelayout, 256, 16 )
+ GFXDECODE_ENTRY( "gfx1", 0, gfx_8x8x4_row_2x2_group_packed_msb, 256, 16 )
GFXDECODE_END
diff --git a/src/mame/drivers/hvyunit.cpp b/src/mame/drivers/hvyunit.cpp
index 13d02cc29c6..877554f4bb9 100644
--- a/src/mame/drivers/hvyunit.cpp
+++ b/src/mame/drivers/hvyunit.cpp
@@ -572,26 +572,9 @@ INPUT_PORTS_END
*
*************************************/
-static const gfx_layout tile_layout =
-{
- 16,16,
- RGN_FRAC(1,1),
- 4,
- { 0, 1, 2, 3 },
- {
- 0*4,1*4,2*4,3*4,4*4,5*4,6*4,7*4,
- 8*32+0*4,8*32+1*4,8*32+2*4,8*32+3*4,8*32+4*4,8*32+5*4,8*32+6*4,8*32+7*4
- },
- {
- 0*32,1*32,2*32,3*32,4*32,5*32,6*32,7*32,
- 16*32+0*32,16*32+1*32,16*32+2*32,16*32+3*32,16*32+4*32,16*32+5*32,16*32+6*32,16*32+7*32
- },
- 4*8*32
-};
-
static GFXDECODE_START( gfx_hvyunit )
- GFXDECODE_ENTRY( "gfx1", 0, tile_layout, 0x100, 16 ) /* sprite bank */
- GFXDECODE_ENTRY( "gfx2", 0, tile_layout, 0x000, 16 ) /* background tiles */
+ GFXDECODE_ENTRY( "gfx1", 0, gfx_8x8x4_row_2x2_group_packed_msb, 0x100, 16 ) /* sprite bank */
+ GFXDECODE_ENTRY( "gfx2", 0, gfx_8x8x4_row_2x2_group_packed_msb, 0x000, 16 ) /* background tiles */
GFXDECODE_END
diff --git a/src/mame/drivers/jalmah.cpp b/src/mame/drivers/jalmah.cpp
index 8ebc1901104..c0b4fd50698 100644
--- a/src/mame/drivers/jalmah.cpp
+++ b/src/mame/drivers/jalmah.cpp
@@ -1115,35 +1115,11 @@ void jalmah_state::jalmah(machine_config &config)
oki.add_route(ALL_OUTPUTS, "mono", 0.5);
}
-static const gfx_layout charlayout =
-{
- 8,8,
- RGN_FRAC(1,1),
- 4,
- { 0, 1, 2, 3 },
- { 0*4, 1*4, 2*4, 3*4, 4*4, 5*4, 6*4, 7*4 },
- { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32 },
- 32*8
-};
-
-static const gfx_layout tilelayout =
-{
- 16,16,
- RGN_FRAC(1,1),
- 4,
- { 0, 1, 2, 3 },
- { 0*4, 1*4, 2*4, 3*4, 4*4, 5*4, 6*4, 7*4,
- 16*32+0*4, 16*32+1*4, 16*32+2*4, 16*32+3*4, 16*32+4*4, 16*32+5*4, 16*32+6*4, 16*32+7*4 },
- { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32,
- 8*32, 9*32, 10*32, 11*32, 12*32, 13*32, 14*32, 15*32 },
- 32*32
-};
-
static GFXDECODE_START( gfx_urashima )
- GFXDECODE_ENTRY( "scroll0", 0, tilelayout, 0x100, 16 )
- GFXDECODE_ENTRY( "scroll1", 0, tilelayout, 0x100, 16 )
- GFXDECODE_ENTRY( "scroll2", 0, tilelayout, 0x100, 16 )
- GFXDECODE_ENTRY( "scroll3", 0, charlayout, 0x000, 16 )
+ GFXDECODE_ENTRY( "scroll0", 0, gfx_8x8x4_col_2x2_group_packed_msb, 0x100, 16 )
+ GFXDECODE_ENTRY( "scroll1", 0, gfx_8x8x4_col_2x2_group_packed_msb, 0x100, 16 )
+ GFXDECODE_ENTRY( "scroll2", 0, gfx_8x8x4_col_2x2_group_packed_msb, 0x100, 16 )
+ GFXDECODE_ENTRY( "scroll3", 0, gfx_8x8x4_packed_msb, 0x000, 16 )
GFXDECODE_END
void jalmah_state::jalmahv1(machine_config &config)
diff --git a/src/mame/drivers/limenko.cpp b/src/mame/drivers/limenko.cpp
index 7a19838d41e..d8291d3ad28 100644
--- a/src/mame/drivers/limenko.cpp
+++ b/src/mame/drivers/limenko.cpp
@@ -676,19 +676,8 @@ INPUT_PORTS_END
*****************************************************************************************************/
-static const gfx_layout tile_layout =
-{
- 8,8,
- RGN_FRAC(1,1),
- 8,
- { STEP8(0,1) },
- { STEP8(0,8) },
- { STEP8(0,8*8) },
- 8*8*8,
-};
-
static GFXDECODE_START(gfx_limenko)
- GFXDECODE_ENTRY("gfx", 0, tile_layout, 0, 16) /* tiles */
+ GFXDECODE_ENTRY("gfx", 0, gfx_8x8x8_raw, 0, 16) /* tiles */
GFXDECODE_END
diff --git a/src/mame/drivers/mcatadv.cpp b/src/mame/drivers/mcatadv.cpp
index 89f1a0c3b43..86bc18b656e 100644
--- a/src/mame/drivers/mcatadv.cpp
+++ b/src/mame/drivers/mcatadv.cpp
@@ -407,20 +407,9 @@ INPUT_PORTS_END
/*** GFX Decode ***/
-static const gfx_layout layout_16x16x4 =
-{
- 16,16,
- RGN_FRAC(1,1),
- 4,
- { STEP4(0,1) },
- { STEP8(0,4), STEP8(4*8*8,4) },
- { STEP8(0,4*8), STEP8(4*8*8*2,4*8) },
- 16*16*4
-};
-
static GFXDECODE_START( gfx_mcatadv )
- GFXDECODE_ENTRY( "bg0", 0, layout_16x16x4, 0, 0x200 )
- GFXDECODE_ENTRY( "bg1", 0, layout_16x16x4, 0, 0x200 )
+ GFXDECODE_ENTRY( "bg0", 0, gfx_8x8x4_row_2x2_group_packed_msb, 0, 0x200 )
+ GFXDECODE_ENTRY( "bg1", 0, gfx_8x8x4_row_2x2_group_packed_msb, 0, 0x200 )
GFXDECODE_END
diff --git a/src/mame/drivers/megasys1.cpp b/src/mame/drivers/megasys1.cpp
index c0ae6c43862..5af1f230a9c 100644
--- a/src/mame/drivers/megasys1.cpp
+++ b/src/mame/drivers/megasys1.cpp
@@ -1634,41 +1634,17 @@ WRITE16_MEMBER(megasys1_state::protection_peekaboo_w)
*
*************************************/
-#ifdef UNUSED_VARIABLE
-static const gfx_layout tilelayout =
-{
- 8,8,
- RGN_FRAC(1,1),
- 4,
- { STEP4(0,1) },
- { STEP8(0,4) },
- { STEP8(0,4*8) },
- 8*8*4
-};
-#endif
-
-static const gfx_layout spritelayout =
-{
- 16,16,
- RGN_FRAC(1,1),
- 4,
- { STEP4(0,1) },
- { STEP8(8*8*4*0,4), STEP8(8*8*4*2,4) },
- { STEP16(0,4*8) },
- 16*16*4
-};
-
static GFXDECODE_START( gfx_z )
- //GFXDECODE_ENTRY( "scroll0", 0, tilelayout, 256*0, 16 ) // [0] Scroll 0
- //GFXDECODE_ENTRY( "scroll1", 0, tilelayout, 256*2, 16 ) // [1] Scroll 1
- GFXDECODE_ENTRY( "sprites", 0, spritelayout, 256*1, 16 ) // [2] Sprites
+ //GFXDECODE_ENTRY( "scroll0", 0, gfx_8x8x4_packed_msb, 256*0, 16 ) // [0] Scroll 0
+ //GFXDECODE_ENTRY( "scroll1", 0, gfx_8x8x4_packed_msb, 256*2, 16 ) // [1] Scroll 1
+ GFXDECODE_ENTRY( "sprites", 0, gfx_8x8x4_col_2x2_group_packed_msb, 256*1, 16 ) // [2] Sprites
GFXDECODE_END
static GFXDECODE_START( gfx_abc )
- //GFXDECODE_ENTRY( "scroll0", 0, tilelayout, 256*0, 16 ) // [0] Scroll 0
- //GFXDECODE_ENTRY( "scroll1", 0, tilelayout, 256*1, 16 ) // [1] Scroll 1
- //GFXDECODE_ENTRY( "scroll2", 0, tilelayout, 256*2, 16 ) // [2] Scroll 2 (unused in system D)
- GFXDECODE_ENTRY( "sprites", 0, spritelayout, 256*3, 16 ) // [3] Sprites
+ //GFXDECODE_ENTRY( "scroll0", 0, gfx_8x8x4_packed_msb, 256*0, 16 ) // [0] Scroll 0
+ //GFXDECODE_ENTRY( "scroll1", 0, gfx_8x8x4_packed_msb, 256*1, 16 ) // [1] Scroll 1
+ //GFXDECODE_ENTRY( "scroll2", 0, gfx_8x8x4_packed_msb, 256*2, 16 ) // [2] Scroll 2 (unused in system D)
+ GFXDECODE_ENTRY( "sprites", 0, gfx_8x8x4_col_2x2_group_packed_msb, 256*3, 16 ) // [3] Sprites
GFXDECODE_END
/*************************************
diff --git a/src/mame/drivers/ninjakd2.cpp b/src/mame/drivers/ninjakd2.cpp
index 4ea784b1916..adf3b7d63eb 100644
--- a/src/mame/drivers/ninjakd2.cpp
+++ b/src/mame/drivers/ninjakd2.cpp
@@ -881,51 +881,18 @@ INPUT_PORTS_END
*
*************************************/
-static const gfx_layout layout8x8 =
-{
- 8,8,
- RGN_FRAC(1,1),
- 4,
- { STEP4(0,1) },
- { STEP8(0,4) },
- { STEP8(0,32) },
- 32*8
-};
-
-static const gfx_layout layout16x16 =
-{
- 16,16,
- RGN_FRAC(1,1),
- 4,
- { STEP4(0,1) },
- { STEP8(0,4), STEP8(32*8,4) },
- { STEP8(0,32), STEP8(64*8,32) },
- 128*8
-};
-
-static const gfx_layout robokid_layout16x16 =
-{
- 16,16,
- RGN_FRAC(1,1),
- 4,
- { STEP4(0,1) },
- { STEP8(0,4), STEP8(64*8,4) },
- { STEP16(0,32) },
- 128*8
-};
-
static GFXDECODE_START( gfx_ninjakd2 )
- GFXDECODE_ENTRY( "gfx1", 0, layout8x8, 0x200, 16) // fg
- GFXDECODE_ENTRY( "gfx2", 0, layout16x16, 0x100, 16) // sprites
- GFXDECODE_ENTRY( "gfx3", 0, layout16x16, 0x000, 16) // bg
+ GFXDECODE_ENTRY( "gfx1", 0, gfx_8x8x4_packed_msb, 0x200, 16) // fg
+ GFXDECODE_ENTRY( "gfx2", 0, gfx_8x8x4_row_2x2_group_packed_msb, 0x100, 16) // sprites
+ GFXDECODE_ENTRY( "gfx3", 0, gfx_8x8x4_row_2x2_group_packed_msb, 0x000, 16) // bg
GFXDECODE_END
static GFXDECODE_START( gfx_robokid )
- GFXDECODE_ENTRY( "gfx1", 0, layout8x8, 0x300, 16) // fg
- GFXDECODE_ENTRY( "gfx2", 0, robokid_layout16x16, 0x200, 16) // sprites
- GFXDECODE_ENTRY( "gfx3", 0, robokid_layout16x16, 0x000, 16) // bg0
- GFXDECODE_ENTRY( "gfx4", 0, robokid_layout16x16, 0x000, 16) // bg1
- GFXDECODE_ENTRY( "gfx5", 0, robokid_layout16x16, 0x000, 16) // bg2
+ GFXDECODE_ENTRY( "gfx1", 0, gfx_8x8x4_packed_msb, 0x300, 16) // fg
+ GFXDECODE_ENTRY( "gfx2", 0, gfx_8x8x4_col_2x2_group_packed_msb, 0x200, 16) // sprites
+ GFXDECODE_ENTRY( "gfx3", 0, gfx_8x8x4_col_2x2_group_packed_msb, 0x000, 16) // bg0
+ GFXDECODE_ENTRY( "gfx4", 0, gfx_8x8x4_col_2x2_group_packed_msb, 0x000, 16) // bg1
+ GFXDECODE_ENTRY( "gfx5", 0, gfx_8x8x4_col_2x2_group_packed_msb, 0x000, 16) // bg2
GFXDECODE_END
diff --git a/src/mame/drivers/nmk16.cpp b/src/mame/drivers/nmk16.cpp
index ad6e3f46374..06df64835a7 100644
--- a/src/mame/drivers/nmk16.cpp
+++ b/src/mame/drivers/nmk16.cpp
@@ -3990,53 +3990,42 @@ static INPUT_PORTS_START( dolmen )
INPUT_PORTS_END
-static const gfx_layout tilelayout =
-{
- 16,16,
- RGN_FRAC(1,1),
- 4,
- { STEP4(0,1) },
- { STEP8(0,4), STEP8(4*8*16,4) },
- { STEP16(0,4*8) },
- 32*32
-};
-
static GFXDECODE_START( gfx_tharrier )
- GFXDECODE_ENTRY( "fgtile", 0, gfx_8x8x4_packed_msb, 0x000, 16 ) /* color 0x000-0x0ff */
- GFXDECODE_ENTRY( "bgtile", 0, tilelayout, 0x000, 16 ) /* color 0x000-0x0ff */
- GFXDECODE_ENTRY( "sprites", 0, tilelayout, 0x100, 16 ) /* color 0x100-0x1ff */
+ GFXDECODE_ENTRY( "fgtile", 0, gfx_8x8x4_packed_msb, 0x000, 16 ) /* color 0x000-0x0ff */
+ GFXDECODE_ENTRY( "bgtile", 0, gfx_8x8x4_col_2x2_group_packed_msb, 0x000, 16 ) /* color 0x000-0x0ff */
+ GFXDECODE_ENTRY( "sprites", 0, gfx_8x8x4_col_2x2_group_packed_msb, 0x100, 16 ) /* color 0x100-0x1ff */
GFXDECODE_END
static GFXDECODE_START( gfx_macross )
- GFXDECODE_ENTRY( "fgtile", 0, gfx_8x8x4_packed_msb, 0x200, 16 ) /* color 0x200-0x2ff */
- GFXDECODE_ENTRY( "bgtile", 0, tilelayout, 0x000, 16 ) /* color 0x000-0x0ff */
- GFXDECODE_ENTRY( "sprites", 0, tilelayout, 0x100, 16 ) /* color 0x100-0x1ff */
+ GFXDECODE_ENTRY( "fgtile", 0, gfx_8x8x4_packed_msb, 0x200, 16 ) /* color 0x200-0x2ff */
+ GFXDECODE_ENTRY( "bgtile", 0, gfx_8x8x4_col_2x2_group_packed_msb, 0x000, 16 ) /* color 0x000-0x0ff */
+ GFXDECODE_ENTRY( "sprites", 0, gfx_8x8x4_col_2x2_group_packed_msb, 0x100, 16 ) /* color 0x100-0x1ff */
GFXDECODE_END
static GFXDECODE_START( gfx_macross2 )
- GFXDECODE_ENTRY( "fgtile", 0, gfx_8x8x4_packed_msb, 0x300, 16 ) /* color 0x300-0x3ff */
- GFXDECODE_ENTRY( "bgtile", 0, tilelayout, 0x000, 16 ) /* color 0x000-0x0ff */
- GFXDECODE_ENTRY( "sprites", 0, tilelayout, 0x100, 32 ) /* color 0x100-0x2ff */
+ GFXDECODE_ENTRY( "fgtile", 0, gfx_8x8x4_packed_msb, 0x300, 16 ) /* color 0x300-0x3ff */
+ GFXDECODE_ENTRY( "bgtile", 0, gfx_8x8x4_col_2x2_group_packed_msb, 0x000, 16 ) /* color 0x000-0x0ff */
+ GFXDECODE_ENTRY( "sprites", 0, gfx_8x8x4_col_2x2_group_packed_msb, 0x100, 32 ) /* color 0x100-0x2ff */
GFXDECODE_END
static GFXDECODE_START( gfx_bjtwin )
- GFXDECODE_ENTRY( "fgtile", 0, gfx_8x8x4_packed_msb, 0x000, 16 ) /* color 0x000-0x0ff */
- GFXDECODE_ENTRY( "bgtile", 0, gfx_8x8x4_packed_msb, 0x000, 16 ) /* color 0x000-0x0ff */
- GFXDECODE_ENTRY( "sprites", 0, tilelayout, 0x100, 16 ) /* color 0x100-0x1ff */
+ GFXDECODE_ENTRY( "fgtile", 0, gfx_8x8x4_packed_msb, 0x000, 16 ) /* color 0x000-0x0ff */
+ GFXDECODE_ENTRY( "bgtile", 0, gfx_8x8x4_packed_msb, 0x000, 16 ) /* color 0x000-0x0ff */
+ GFXDECODE_ENTRY( "sprites", 0, gfx_8x8x4_col_2x2_group_packed_msb, 0x100, 16 ) /* color 0x100-0x1ff */
GFXDECODE_END
static GFXDECODE_START( gfx_bioship )
- GFXDECODE_ENTRY( "fgtile", 0, gfx_8x8x4_packed_msb, 0x300, 16 ) /* color 0x300-0x3ff */
- GFXDECODE_ENTRY( "bgtile", 0, tilelayout, 0x100, 16 ) /* color 0x100-0x1ff */
- GFXDECODE_ENTRY( "sprites", 0, tilelayout, 0x200, 16 ) /* color 0x200-0x2ff */
- GFXDECODE_ENTRY( "gfx4", 0, tilelayout, 0x000, 16 ) /* color 0x000-0x0ff */
+ GFXDECODE_ENTRY( "fgtile", 0, gfx_8x8x4_packed_msb, 0x300, 16 ) /* color 0x300-0x3ff */
+ GFXDECODE_ENTRY( "bgtile", 0, gfx_8x8x4_col_2x2_group_packed_msb, 0x100, 16 ) /* color 0x100-0x1ff */
+ GFXDECODE_ENTRY( "sprites", 0, gfx_8x8x4_col_2x2_group_packed_msb, 0x200, 16 ) /* color 0x200-0x2ff */
+ GFXDECODE_ENTRY( "gfx4", 0, gfx_8x8x4_col_2x2_group_packed_msb, 0x000, 16 ) /* color 0x000-0x0ff */
GFXDECODE_END
static GFXDECODE_START( gfx_strahl )
- GFXDECODE_ENTRY( "fgtile", 0, gfx_8x8x4_packed_msb, 0x000, 16 ) /* color 0x000-0x0ff */
- GFXDECODE_ENTRY( "bgtile", 0, tilelayout, 0x300, 16 ) /* color 0x300-0x3ff */
- GFXDECODE_ENTRY( "sprites", 0, tilelayout, 0x100, 16 ) /* color 0x100-0x1ff */
- GFXDECODE_ENTRY( "gfx4", 0, tilelayout, 0x200, 16 ) /* color 0x200-0x2ff */
+ GFXDECODE_ENTRY( "fgtile", 0, gfx_8x8x4_packed_msb, 0x000, 16 ) /* color 0x000-0x0ff */
+ GFXDECODE_ENTRY( "bgtile", 0, gfx_8x8x4_col_2x2_group_packed_msb, 0x300, 16 ) /* color 0x300-0x3ff */
+ GFXDECODE_ENTRY( "sprites", 0, gfx_8x8x4_col_2x2_group_packed_msb, 0x100, 16 ) /* color 0x100-0x1ff */
+ GFXDECODE_ENTRY( "gfx4", 0, gfx_8x8x4_col_2x2_group_packed_msb, 0x200, 16 ) /* color 0x200-0x2ff */
GFXDECODE_END
@@ -5371,27 +5360,16 @@ static const gfx_layout tilelayout_8bpp =
};
-static const gfx_layout tilelayout_swapnibble =
-{
- 16,16,
- RGN_FRAC(1,1),
- 4,
- { STEP4(0,1) },
- { 4,0,12,8,20,16,28,24, 512+4,512+0,512+12,512+8,512+20,512+16,512+28,512+24 },
- { STEP16(0,4*8) },
- 16*16*4
-};
-
static GFXDECODE_START( gfx_grdnstrm )
- GFXDECODE_ENTRY( "fgtile", 0, gfx_8x8x4_packed_msb, 0x200, 16 ) // [2] Layer 1
- GFXDECODE_ENTRY( "bgtile", 0, tilelayout_8bpp, 0x000, 1 ) // [1] Layer 0
- GFXDECODE_ENTRY( "sprites", 0, tilelayout, 0x100, 16 ) // [0] Sprites
+ GFXDECODE_ENTRY( "fgtile", 0, gfx_8x8x4_packed_msb, 0x200, 16 ) // [2] Layer 1
+ GFXDECODE_ENTRY( "bgtile", 0, tilelayout_8bpp, 0x000, 1 ) // [1] Layer 0
+ GFXDECODE_ENTRY( "sprites", 0, gfx_8x8x4_col_2x2_group_packed_msb, 0x100, 16 ) // [0] Sprites
GFXDECODE_END
static GFXDECODE_START( gfx_redhawkb )
- GFXDECODE_ENTRY( "fgtile", 0, gfx_8x8x4_packed_msb, 0x200, 16 ) // [2] Layer 1
- GFXDECODE_ENTRY( "bgtile", 0, tilelayout_swapnibble, 0x000, 16 ) // [1] Layer 0
- GFXDECODE_ENTRY( "sprites", 0, tilelayout_swapnibble, 0x100, 16 ) // [0] Sprites
+ GFXDECODE_ENTRY( "fgtile", 0, gfx_8x8x4_packed_msb, 0x200, 16 ) // [2] Layer 1
+ GFXDECODE_ENTRY( "bgtile", 0, gfx_8x8x4_col_2x2_group_packed_lsb, 0x000, 16 ) // [1] Layer 0
+ GFXDECODE_ENTRY( "sprites", 0, gfx_8x8x4_col_2x2_group_packed_lsb, 0x100, 16 ) // [0] Sprites
GFXDECODE_END
diff --git a/src/mame/drivers/powerins.cpp b/src/mame/drivers/powerins.cpp
index 7f184b5aafa..6c30b5f59a9 100644
--- a/src/mame/drivers/powerins.cpp
+++ b/src/mame/drivers/powerins.cpp
@@ -243,29 +243,16 @@ INPUT_PORTS_END
***************************************************************************/
-/* 16x16x4 tiles (made of two 8x16 tiles) */
-static const gfx_layout layout_16x16x4 =
-{
- 16,16,
- RGN_FRAC(1,1),
- 4,
- {STEP4(0,1)},
- {STEP8(0,4),STEP8(4*8*16,4)},
- {STEP16(0,4*8)},
- 16*16*4
-};
-
-
static GFXDECODE_START( gfx_powerins )
- GFXDECODE_ENTRY( "gfx1", 0, layout_16x16x4, 0x000, 0x20 ) // [0] Tiles
- GFXDECODE_ENTRY( "gfx2", 0, gfx_8x8x4_packed_msb, 0x200, 0x10 ) // [1] Tiles
- GFXDECODE_ENTRY( "gfx3", 0, layout_16x16x4, 0x400, 0x40 ) // [2] Sprites
+ GFXDECODE_ENTRY( "gfx1", 0, gfx_8x8x4_col_2x2_group_packed_msb, 0x000, 0x20 ) // [0] Tiles
+ GFXDECODE_ENTRY( "gfx2", 0, gfx_8x8x4_packed_msb, 0x200, 0x10 ) // [1] Tiles
+ GFXDECODE_ENTRY( "gfx3", 0, gfx_8x8x4_col_2x2_group_packed_msb, 0x400, 0x40 ) // [2] Sprites
GFXDECODE_END
static GFXDECODE_START( gfx_powerinsc )
- GFXDECODE_ENTRY( "gfx1", 0, layout_16x16x4, 0x000, 0x20 ) // [0] Tiles
- GFXDECODE_ENTRY( "gfx1", 0x280000, gfx_8x8x4_packed_msb, 0x200, 0x10 ) // [1] Tiles
- GFXDECODE_ENTRY( "gfx3", 0, layout_16x16x4, 0x400, 0x40 ) // [2] Sprites
+ GFXDECODE_ENTRY( "gfx1", 0, gfx_8x8x4_col_2x2_group_packed_msb, 0x000, 0x20 ) // [0] Tiles
+ GFXDECODE_ENTRY( "gfx1", 0x280000, gfx_8x8x4_packed_msb, 0x200, 0x10 ) // [1] Tiles
+ GFXDECODE_ENTRY( "gfx3", 0, gfx_8x8x4_col_2x2_group_packed_msb, 0x400, 0x40 ) // [2] Sprites
GFXDECODE_END
/***************************************************************************
diff --git a/src/mame/drivers/quizpani.cpp b/src/mame/drivers/quizpani.cpp
index d9431d663ff..2c8f737c9b0 100644
--- a/src/mame/drivers/quizpani.cpp
+++ b/src/mame/drivers/quizpani.cpp
@@ -176,22 +176,9 @@ static INPUT_PORTS_START( quizpani )
PORT_DIPSETTING( 0x0000, DEF_STR( Free_Play ) )
INPUT_PORTS_END
-static const gfx_layout tilelayout =
-{
- 16,16,
- RGN_FRAC(1,1),
- 4,
- { 0, 1, 2, 3 },
- { 0*4, 1*4, 2*4, 3*4, 4*4, 5*4, 6*4, 7*4,
- 16*32+0*4, 16*32+1*4, 16*32+2*4, 16*32+3*4, 16*32+4*4, 16*32+5*4, 16*32+6*4, 16*32+7*4 },
- { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32,
- 8*32, 9*32, 10*32, 11*32, 12*32, 13*32, 14*32, 15*32 },
- 32*32
-};
-
static GFXDECODE_START( gfx_quizpani )
- GFXDECODE_ENTRY( "gfx1", 0, tilelayout, 0x100, 16 ) /* Background */
- GFXDECODE_ENTRY( "gfx2", 0, tilelayout, 0x000, 16 ) /* Text */
+ GFXDECODE_ENTRY( "gfx1", 0, gfx_8x8x4_col_2x2_group_packed_msb, 0x100, 16 ) /* Background */
+ GFXDECODE_ENTRY( "gfx2", 0, gfx_8x8x4_col_2x2_group_packed_msb, 0x000, 16 ) /* Text */
GFXDECODE_END
diff --git a/src/mame/drivers/sandscrp.cpp b/src/mame/drivers/sandscrp.cpp
index bd2a6a9dfcf..bc3710da573 100644
--- a/src/mame/drivers/sandscrp.cpp
+++ b/src/mame/drivers/sandscrp.cpp
@@ -415,20 +415,8 @@ static INPUT_PORTS_START( sandscrp )
INPUT_PORTS_END
-static const gfx_layout layout_16x16x4 =
-{
- 16,16,
- RGN_FRAC(1,1),
- 4,
- { STEP4(0,1) },
- { STEP8(8*8*4*0,4), STEP8(8*8*4*1,4) },
- { STEP8(8*8*4*0,8*4), STEP8(8*8*4*2,8*4) },
- 16*16*4
-};
-
-
static GFXDECODE_START( gfx_sandscrp )
- GFXDECODE_ENTRY( "gfx1", 0, layout_16x16x4, 0x000, 0x10 ) // [0] Sprites
+ GFXDECODE_ENTRY( "gfx1", 0, gfx_8x8x4_row_2x2_group_packed_msb, 0x000, 0x10 ) // [0] Sprites
GFXDECODE_END
diff --git a/src/mame/drivers/snowbros.cpp b/src/mame/drivers/snowbros.cpp
index 3e39a07bbdb..107e1ad767d 100644
--- a/src/mame/drivers/snowbros.cpp
+++ b/src/mame/drivers/snowbros.cpp
@@ -1635,19 +1635,8 @@ INPUT_PORTS_END
/* SnowBros */
-static const gfx_layout tilelayout =
-{
- 16,16,
- RGN_FRAC(1,1),
- 4,
- { 0, 1, 2, 3 },
- { STEP8(0,4), STEP8(8*32,4) },
- { STEP8(0,32), STEP8(16*32,32) },
- 32*32
-};
-
static GFXDECODE_START( gfx_snowbros )
- GFXDECODE_ENTRY( "gfx1", 0, tilelayout, 0, 16 )
+ GFXDECODE_ENTRY( "gfx1", 0, gfx_8x8x4_row_2x2_group_packed_msb, 0, 16 )
GFXDECODE_END
/* Honey Doll */
@@ -1664,13 +1653,13 @@ static const gfx_layout honeydol_tilelayout8bpp =
};
static GFXDECODE_START( gfx_honeydol )
- GFXDECODE_ENTRY( "gfx1", 0, tilelayout, 0, 64 ) // how does it use 0-15
- GFXDECODE_ENTRY( "gfx2", 0, honeydol_tilelayout8bpp, 0, 4 )
+ GFXDECODE_ENTRY( "gfx1", 0, gfx_8x8x4_row_2x2_group_packed_msb, 0, 64 ) // how does it use 0-15
+ GFXDECODE_ENTRY( "gfx2", 0, honeydol_tilelayout8bpp, 0, 4 )
GFXDECODE_END
static GFXDECODE_START( gfx_twinadv )
- GFXDECODE_ENTRY( "gfx1", 0, tilelayout, 0, 64 )
+ GFXDECODE_ENTRY( "gfx1", 0, gfx_8x8x4_row_2x2_group_packed_msb, 0, 64 )
GFXDECODE_END
/* Winter Bobble */
@@ -1687,7 +1676,7 @@ static const gfx_layout tilelayout_wb =
};
static GFXDECODE_START( gfx_wb )
- GFXDECODE_ENTRY( "gfx1", 0, tilelayout_wb, 0, 16 )
+ GFXDECODE_ENTRY( "gfx1", 0, tilelayout_wb, 0, 16 )
GFXDECODE_END
/* SemiCom */
@@ -1721,12 +1710,12 @@ static const gfx_layout sb3_tilebglayout =
static GFXDECODE_START( gfx_sb3 )
- GFXDECODE_ENTRY( "gfx1", 0, tilelayout, 0, 16 )
- GFXDECODE_ENTRY( "gfx2", 0, sb3_tilebglayout, 0, 2 )
+ GFXDECODE_ENTRY( "gfx1", 0, gfx_8x8x4_row_2x2_group_packed_msb, 0, 16 )
+ GFXDECODE_ENTRY( "gfx2", 0, sb3_tilebglayout, 0, 2 )
GFXDECODE_END
static GFXDECODE_START( gfx_hyperpac )
- GFXDECODE_ENTRY( "gfx1", 0, hyperpac_tilelayout, 0, 16 )
+ GFXDECODE_ENTRY( "gfx1", 0, hyperpac_tilelayout, 0, 16 )
GFXDECODE_END
MACHINE_RESET_MEMBER(snowbros_state,semiprot)
diff --git a/src/mame/drivers/tecmo.cpp b/src/mame/drivers/tecmo.cpp
index e22740d0f5d..b0f431cb693 100644
--- a/src/mame/drivers/tecmo.cpp
+++ b/src/mame/drivers/tecmo.cpp
@@ -654,33 +654,11 @@ static INPUT_PORTS_START( silkwormp )
INPUT_PORTS_END
-static const gfx_layout charlayout =
-{
- 8,8,
- RGN_FRAC(1,1),
- 4,
- { STEP4(0,1) },
- { STEP8(0,4) },
- { STEP8(0,4*8) },
- 4*8*8
-};
-
-static const gfx_layout tilelayout =
-{
- 16,16,
- RGN_FRAC(1,1),
- 4,
- { STEP4(0,1) },
- { STEP8(0,4), STEP8(4*8*8,4) },
- { STEP8(0,4*8), STEP8(4*8*8*2,4*8) },
- 4*8*8*2*2
-};
-
static GFXDECODE_START( gfx_tecmo )
- GFXDECODE_ENTRY( "gfx1", 0, charlayout, 256, 16 ) /* colors 256 - 511 */
- GFXDECODE_ENTRY( "gfx2", 0, charlayout, 0, 16 ) /* colors 0 - 255 */
- GFXDECODE_ENTRY( "gfx3", 0, tilelayout, 512, 16 ) /* colors 512 - 767 */
- GFXDECODE_ENTRY( "gfx4", 0, tilelayout, 768, 16 ) /* colors 768 - 1023 */
+ GFXDECODE_ENTRY( "gfx1", 0, gfx_8x8x4_packed_msb, 256, 16 ) /* colors 256 - 511 */
+ GFXDECODE_ENTRY( "gfx2", 0, gfx_8x8x4_packed_msb, 0, 16 ) /* colors 0 - 255 */
+ GFXDECODE_ENTRY( "gfx3", 0, gfx_8x8x4_row_2x2_group_packed_msb, 512, 16 ) /* colors 512 - 767 */
+ GFXDECODE_ENTRY( "gfx4", 0, gfx_8x8x4_row_2x2_group_packed_msb, 768, 16 ) /* colors 768 - 1023 */
GFXDECODE_END
diff --git a/src/mame/drivers/tecmo16.cpp b/src/mame/drivers/tecmo16.cpp
index 99f0aceeebf..a6cd1649785 100644
--- a/src/mame/drivers/tecmo16.cpp
+++ b/src/mame/drivers/tecmo16.cpp
@@ -321,32 +321,10 @@ INPUT_PORTS_END
/******************************************************************************/
-static const gfx_layout charlayout =
-{
- 8,8, /* 8*8 characters */
- RGN_FRAC(1,1), /* 4096 characters */
- 4, /* 4 bits per pixel */
- { STEP4(0,1) }, /* the bitplanes are packed in one nibble */
- { STEP8(0,4) },
- { STEP8(0,4*8) },
- 4*8*8 /* every char takes 32 consecutive bytes */
-};
-
-static const gfx_layout tilelayout =
-{
- 16,16, /* 16*16 tiles */
- RGN_FRAC(1,1), /* 8192 tiles */
- 4, /* 4 bits per pixel */
- { STEP4(0,1) }, /* the bitplanes are packed in one nibble */
- { STEP8(0,4), STEP8(4*8*8,4) },
- { STEP8(0,4*8), STEP8(4*8*8*2,4*8) },
- 4*8*8*2*2 /* every tile takes 128 consecutive bytes */
-};
-
static GFXDECODE_START( gfx_tecmo16 )
- GFXDECODE_ENTRY( "gfx1", 0, charlayout, 1*16*16, 16 )
- GFXDECODE_ENTRY( "gfx2", 0, tilelayout, 0, 0x100 )
- GFXDECODE_ENTRY( "gfx3", 0, charlayout, 0, 0x100 )
+ GFXDECODE_ENTRY( "gfx1", 0, gfx_8x8x4_packed_msb, 1*16*16, 16 )
+ GFXDECODE_ENTRY( "gfx2", 0, gfx_8x8x4_row_2x2_group_packed_msb, 0, 0x100 )
+ GFXDECODE_ENTRY( "gfx3", 0, gfx_8x8x4_packed_msb, 0, 0x100 )
GFXDECODE_END
/******************************************************************************/
diff --git a/src/mame/drivers/tecmosys.cpp b/src/mame/drivers/tecmosys.cpp
index 9c4fd8f4ec8..1f91865a89b 100644
--- a/src/mame/drivers/tecmosys.cpp
+++ b/src/mame/drivers/tecmosys.cpp
@@ -411,34 +411,11 @@ static INPUT_PORTS_START( tecmosys )
INPUT_PORTS_END
-
-static const gfx_layout gfxlayout =
-{
- 8,8,
- RGN_FRAC(1,1),
- 4,
- { STEP4(0,1) },
- { STEP8(0,4) },
- { STEP8(0,4*8) },
- 8*8*4
-};
-
-static const gfx_layout gfxlayout2 =
-{
- 16,16,
- RGN_FRAC(1,1),
- 4,
- { STEP4(0,1) },
- { STEP8(0,4), STEP8(8*8*4,4) },
- { STEP8(0,4*8), STEP8(8*8*4*2,4*8) },
- 16*16*4
-};
-
static GFXDECODE_START( gfx_tecmosys )
- GFXDECODE_ENTRY( "layer0", 0, gfxlayout, 0x4400, 0x40 )
- GFXDECODE_ENTRY( "layer1", 0, gfxlayout2, 0x4000, 0x40 )
- GFXDECODE_ENTRY( "layer2", 0, gfxlayout2, 0x4000, 0x40 )
- GFXDECODE_ENTRY( "layer3", 0, gfxlayout2, 0x4000, 0x40 )
+ GFXDECODE_ENTRY( "layer0", 0, gfx_8x8x4_packed_msb, 0x4400, 0x40 )
+ GFXDECODE_ENTRY( "layer1", 0, gfx_8x8x4_row_2x2_group_packed_msb, 0x4000, 0x40 )
+ GFXDECODE_ENTRY( "layer2", 0, gfx_8x8x4_row_2x2_group_packed_msb, 0x4000, 0x40 )
+ GFXDECODE_ENTRY( "layer3", 0, gfx_8x8x4_row_2x2_group_packed_msb, 0x4000, 0x40 )
GFXDECODE_END