mirror of
https://github.com/holub/mame
synced 2025-10-06 09:00:04 +03:00
gaelco2.cpp : Simplify gfxdecodes (nw)
This commit is contained in:
parent
64df523428
commit
a7887b9aaa
@ -43,31 +43,22 @@
|
|||||||
#include "speaker.h"
|
#include "speaker.h"
|
||||||
|
|
||||||
|
|
||||||
#define TILELAYOUT16(NUM) static const gfx_layout tilelayout16_##NUM = \
|
static const gfx_layout tilelayout16 =
|
||||||
{ \
|
{
|
||||||
16,16, /* 16x16 tiles */ \
|
16,16, /* 16x16 tiles */
|
||||||
NUM/32, /* number of tiles */ \
|
RGN_FRAC(1,5), /* number of tiles */
|
||||||
5, /* 5 bpp */ \
|
5, /* 5 bpp */
|
||||||
{ 4*NUM*8, 3*NUM*8, 2*NUM*8, 1*NUM*8, 0*NUM*8 }, \
|
{ RGN_FRAC(4,5), RGN_FRAC(3,5), RGN_FRAC(2,5), RGN_FRAC(1,5), 0 },
|
||||||
{ 0,1,2,3,4,5,6,7, 16*8+0,16*8+1,16*8+2,16*8+3,16*8+4,16*8+5,16*8+6,16*8+7 }, \
|
{ STEP8(0,1), STEP8(16*8,1) },
|
||||||
{ 0*8,1*8,2*8,3*8,4*8,5*8,6*8,7*8, 8*8,9*8,10*8,11*8,12*8,13*8,14*8,15*8 }, \
|
{ STEP16(0,8) },
|
||||||
32*8 \
|
32*8
|
||||||
};
|
};
|
||||||
|
|
||||||
#define GFXDECODEINFO(NUM,ENTRIES) \
|
static GFXDECODE_START( gfx_gaelco2 )
|
||||||
static GFXDECODE_START( gfx_##NUM )\
|
GFXDECODE_ENTRY( "gfx1", 0, tilelayout16, 0, 128 )
|
||||||
GFXDECODE_ENTRY( "gfx1", 0x0000000, tilelayout16_##NUM,0, ENTRIES ) \
|
|
||||||
GFXDECODE_END
|
GFXDECODE_END
|
||||||
|
|
||||||
|
|
||||||
TILELAYOUT16(0x0080000)
|
|
||||||
GFXDECODEINFO(0x0080000, 128)
|
|
||||||
TILELAYOUT16(0x0200000)
|
|
||||||
GFXDECODEINFO(0x0200000, 128)
|
|
||||||
TILELAYOUT16(0x0400000)
|
|
||||||
GFXDECODEINFO(0x0400000, 128)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*============================================================================
|
/*============================================================================
|
||||||
COMMON
|
COMMON
|
||||||
@ -197,7 +188,7 @@ void gaelco2_state::maniacsq(machine_config &config)
|
|||||||
screen.screen_vblank().set("spriteram", FUNC(buffered_spriteram16_device::vblank_copy_rising));
|
screen.screen_vblank().set("spriteram", FUNC(buffered_spriteram16_device::vblank_copy_rising));
|
||||||
screen.set_palette(m_palette);
|
screen.set_palette(m_palette);
|
||||||
|
|
||||||
GFXDECODE(config, m_gfxdecode, m_palette, gfx_0x0080000);
|
GFXDECODE(config, m_gfxdecode, m_palette, gfx_gaelco2);
|
||||||
PALETTE(config, m_palette).set_entries(4096*16 - 16); /* game's palette is 4096 but we allocate 15 more for shadows & highlights */
|
PALETTE(config, m_palette).set_entries(4096*16 - 16); /* game's palette is 4096 but we allocate 15 more for shadows & highlights */
|
||||||
|
|
||||||
MCFG_VIDEO_START_OVERRIDE(gaelco2_state,gaelco2)
|
MCFG_VIDEO_START_OVERRIDE(gaelco2_state,gaelco2)
|
||||||
@ -480,7 +471,7 @@ void gaelco2_state::saltcrdi(machine_config &config)
|
|||||||
screen.screen_vblank().set("spriteram", FUNC(buffered_spriteram16_device::vblank_copy_rising));
|
screen.screen_vblank().set("spriteram", FUNC(buffered_spriteram16_device::vblank_copy_rising));
|
||||||
screen.set_palette(m_palette);
|
screen.set_palette(m_palette);
|
||||||
|
|
||||||
GFXDECODE(config, m_gfxdecode, m_palette, gfx_0x0080000); /* gfx_0x0040000 */
|
GFXDECODE(config, m_gfxdecode, m_palette, gfx_gaelco2);
|
||||||
PALETTE(config, m_palette).set_entries(4096*16 - 16); /* game's palette is 4096 but we allocate 15 more for shadows & highlights */
|
PALETTE(config, m_palette).set_entries(4096*16 - 16); /* game's palette is 4096 but we allocate 15 more for shadows & highlights */
|
||||||
|
|
||||||
MCFG_VIDEO_START_OVERRIDE(gaelco2_state,gaelco2)
|
MCFG_VIDEO_START_OVERRIDE(gaelco2_state,gaelco2)
|
||||||
@ -737,7 +728,7 @@ void gaelco2_state::play2000(machine_config &config)
|
|||||||
screen.screen_vblank().set("spriteram", FUNC(buffered_spriteram16_device::vblank_copy_rising));
|
screen.screen_vblank().set("spriteram", FUNC(buffered_spriteram16_device::vblank_copy_rising));
|
||||||
screen.set_palette(m_palette);
|
screen.set_palette(m_palette);
|
||||||
|
|
||||||
GFXDECODE(config, m_gfxdecode, m_palette, gfx_0x0200000);
|
GFXDECODE(config, m_gfxdecode, m_palette, gfx_gaelco2);
|
||||||
PALETTE(config, m_palette).set_entries(4096*16 - 16); /* game's palette is 4096 but we allocate 15 more for shadows & highlights */
|
PALETTE(config, m_palette).set_entries(4096*16 - 16); /* game's palette is 4096 but we allocate 15 more for shadows & highlights */
|
||||||
|
|
||||||
MCFG_VIDEO_START_OVERRIDE(gaelco2_state,gaelco2)
|
MCFG_VIDEO_START_OVERRIDE(gaelco2_state,gaelco2)
|
||||||
@ -843,7 +834,7 @@ void bang_state::bang(machine_config &config)
|
|||||||
screen.screen_vblank().set("spriteram", FUNC(buffered_spriteram16_device::vblank_copy_rising));
|
screen.screen_vblank().set("spriteram", FUNC(buffered_spriteram16_device::vblank_copy_rising));
|
||||||
screen.set_palette(m_palette);
|
screen.set_palette(m_palette);
|
||||||
|
|
||||||
GFXDECODE(config, m_gfxdecode, m_palette, gfx_0x0200000);
|
GFXDECODE(config, m_gfxdecode, m_palette, gfx_gaelco2);
|
||||||
PALETTE(config, m_palette).set_entries(4096*16 - 16); /* game's palette is 4096 but we allocate 15 more for shadows & highlights */
|
PALETTE(config, m_palette).set_entries(4096*16 - 16); /* game's palette is 4096 but we allocate 15 more for shadows & highlights */
|
||||||
|
|
||||||
MCFG_VIDEO_START_OVERRIDE(gaelco2_state,gaelco2)
|
MCFG_VIDEO_START_OVERRIDE(gaelco2_state,gaelco2)
|
||||||
@ -1082,7 +1073,7 @@ void gaelco2_state::alighunt(machine_config &config)
|
|||||||
screen.screen_vblank().set("spriteram", FUNC(buffered_spriteram16_device::vblank_copy_rising));
|
screen.screen_vblank().set("spriteram", FUNC(buffered_spriteram16_device::vblank_copy_rising));
|
||||||
screen.set_palette(m_palette);
|
screen.set_palette(m_palette);
|
||||||
|
|
||||||
GFXDECODE(config, m_gfxdecode, m_palette, gfx_0x0400000);
|
GFXDECODE(config, m_gfxdecode, m_palette, gfx_gaelco2);
|
||||||
PALETTE(config, m_palette).set_entries(4096*16 - 16); /* game's palette is 4096 but we allocate 15 more for shadows & highlights */
|
PALETTE(config, m_palette).set_entries(4096*16 - 16); /* game's palette is 4096 but we allocate 15 more for shadows & highlights */
|
||||||
|
|
||||||
MCFG_VIDEO_START_OVERRIDE(gaelco2_state,gaelco2)
|
MCFG_VIDEO_START_OVERRIDE(gaelco2_state,gaelco2)
|
||||||
@ -1378,7 +1369,7 @@ void gaelco2_state::touchgo(machine_config &config)
|
|||||||
|
|
||||||
/* video hardware */
|
/* video hardware */
|
||||||
BUFFERED_SPRITERAM16(config, m_spriteram);
|
BUFFERED_SPRITERAM16(config, m_spriteram);
|
||||||
GFXDECODE(config, m_gfxdecode, m_palette, gfx_0x0400000);
|
GFXDECODE(config, m_gfxdecode, m_palette, gfx_gaelco2);
|
||||||
PALETTE(config, m_palette).set_entries(4096*16 - 16); /* game's palette is 4096 but we allocate 15 more for shadows & highlights */
|
PALETTE(config, m_palette).set_entries(4096*16 - 16); /* game's palette is 4096 but we allocate 15 more for shadows & highlights */
|
||||||
config.set_default_layout(layout_dualhsxs);
|
config.set_default_layout(layout_dualhsxs);
|
||||||
|
|
||||||
@ -1696,7 +1687,7 @@ void gaelco2_state::snowboar(machine_config &config)
|
|||||||
screen.screen_vblank().set(m_spriteram, FUNC(buffered_spriteram16_device::vblank_copy_rising));
|
screen.screen_vblank().set(m_spriteram, FUNC(buffered_spriteram16_device::vblank_copy_rising));
|
||||||
screen.set_palette(m_palette);
|
screen.set_palette(m_palette);
|
||||||
|
|
||||||
GFXDECODE(config, m_gfxdecode, m_palette, gfx_0x0400000);
|
GFXDECODE(config, m_gfxdecode, m_palette, gfx_gaelco2);
|
||||||
PALETTE(config, m_palette).set_entries(4096*16 - 16); /* game's palette is 4096 but we allocate 15 more for shadows & highlights */
|
PALETTE(config, m_palette).set_entries(4096*16 - 16); /* game's palette is 4096 but we allocate 15 more for shadows & highlights */
|
||||||
|
|
||||||
MCFG_VIDEO_START_OVERRIDE(gaelco2_state,gaelco2)
|
MCFG_VIDEO_START_OVERRIDE(gaelco2_state,gaelco2)
|
||||||
@ -1740,7 +1731,7 @@ void gaelco2_state::maniacsqs(machine_config &config)
|
|||||||
screen.screen_vblank().set(m_spriteram, FUNC(buffered_spriteram16_device::vblank_copy_rising));
|
screen.screen_vblank().set(m_spriteram, FUNC(buffered_spriteram16_device::vblank_copy_rising));
|
||||||
screen.set_palette(m_palette);
|
screen.set_palette(m_palette);
|
||||||
|
|
||||||
GFXDECODE(config, m_gfxdecode, m_palette, gfx_0x0080000);
|
GFXDECODE(config, m_gfxdecode, m_palette, gfx_gaelco2);
|
||||||
PALETTE(config, m_palette).set_entries(4096*16 - 16); /* game's palette is 4096 but we allocate 15 more for shadows & highlights */
|
PALETTE(config, m_palette).set_entries(4096*16 - 16); /* game's palette is 4096 but we allocate 15 more for shadows & highlights */
|
||||||
|
|
||||||
MCFG_VIDEO_START_OVERRIDE(gaelco2_state,gaelco2)
|
MCFG_VIDEO_START_OVERRIDE(gaelco2_state,gaelco2)
|
||||||
@ -1976,7 +1967,7 @@ void wrally2_state::wrally2(machine_config &config)
|
|||||||
|
|
||||||
/* video hardware */
|
/* video hardware */
|
||||||
BUFFERED_SPRITERAM16(config, m_spriteram);
|
BUFFERED_SPRITERAM16(config, m_spriteram);
|
||||||
GFXDECODE(config, m_gfxdecode, m_palette, gfx_0x0200000);
|
GFXDECODE(config, m_gfxdecode, m_palette, gfx_gaelco2);
|
||||||
PALETTE(config, m_palette).set_entries(4096*16 - 16); /* game's palette is 4096 but we allocate 15 more for shadows & highlights */
|
PALETTE(config, m_palette).set_entries(4096*16 - 16); /* game's palette is 4096 but we allocate 15 more for shadows & highlights */
|
||||||
config.set_default_layout(layout_dualhsxs);
|
config.set_default_layout(layout_dualhsxs);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user