summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatarGravatar cam900 <dbtlrchl@naver.com>2019-04-01 05:54:04 +0900
committerGravatarGravatar R. Belmont <rb6502@users.noreply.github.com>2019-03-31 16:54:04 -0400
commit79d466090dc947264fdadb975b8cfc2fcc2ee2fa (patch) (github)
tree2fd23279fc2f411012f5a1bd6dfab17018d234cb
parent7ca5bb162725048c5b0b16764b67a57819674173 (diff)
downloadmame-79d466090dc947264fdadb975b8cfc2fcc2ee2fa.tar.bz2
mame-79d466090dc947264fdadb975b8cfc2fcc2ee2fa.zip
kickgoal.cpp : Remove MCFGs, Minor cleanups (nw) (#4564)
* kickgoal.cpp : Remove MCFGs, Minor cleanups (nw) Fix some namings, Add notes related to gfxs, Reduce unnecessary line, Handlers, Duplicate, Use shorter / correct type values * kickgoal.cpp : Minor fixes (nw) * kickgoal.cpp : Additional fixes
-rw-r--r--src/mame/drivers/kickgoal.cpp103
-rw-r--r--src/mame/includes/kickgoal.h40
-rw-r--r--src/mame/video/kickgoal.cpp106
3 files changed, 100 insertions, 149 deletions
diff --git a/src/mame/drivers/kickgoal.cpp b/src/mame/drivers/kickgoal.cpp
index 96c206769aa..5bb83e1b919 100644
--- a/src/mame/drivers/kickgoal.cpp
+++ b/src/mame/drivers/kickgoal.cpp
@@ -42,7 +42,7 @@ lev 7 : 0x7c : 0000 0000 - x
/*
****************************************************************
-Hollywood Action
+Action Hollywood
01-19 Samples
21-26 Melodies Bank 0
@@ -139,9 +139,7 @@ WRITE16_MEMBER(kickgoal_state::actionhw_snd_w)
}
-
-
-static const uint16_t kickgoal_default_eeprom_type1[64] = {
+static const u16 kickgoal_default_eeprom_type1[64] = {
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
@@ -153,40 +151,9 @@ static const uint16_t kickgoal_default_eeprom_type1[64] = {
};
-
-READ16_MEMBER(kickgoal_state::kickgoal_eeprom_r)
-{
- if (ACCESSING_BITS_0_7)
- {
- return m_eeprom->do_read();
- }
- return 0;
-}
-
-
-WRITE16_MEMBER(kickgoal_state::kickgoal_eeprom_w)
-{
- if (ACCESSING_BITS_0_7)
- {
- switch (offset)
- {
- case 0:
- m_eeprom->cs_write((data & 0x0001) ? ASSERT_LINE : CLEAR_LINE);
- break;
- case 1:
- m_eeprom->clk_write((data & 0x0001) ? ASSERT_LINE : CLEAR_LINE);
- break;
- case 2:
- m_eeprom->di_write(data & 0x0001);
- break;
- }
- }
-}
-
-
/* Memory Maps *****************************************************************/
-void kickgoal_state::kickgoal_program_map(address_map &map)
+void kickgoal_state::program_map(address_map &map)
{
map(0x000000, 0x0fffff).rom();
@@ -199,12 +166,14 @@ void kickgoal_state::kickgoal_program_map(address_map &map)
map(0x880000, 0x89ffff).nopw(); // during startup
map(0x900000, 0x90ffff).nopw(); // during startup
- map(0x900000, 0x900005).w(FUNC(kickgoal_state::kickgoal_eeprom_w));
- map(0x900006, 0x900007).r(FUNC(kickgoal_state::kickgoal_eeprom_r));
-
- map(0xa00000, 0xa03fff).ram().w(FUNC(kickgoal_state::kickgoal_fgram_w)).share("fgram"); /* FG Layer */
- map(0xa04000, 0xa07fff).ram().w(FUNC(kickgoal_state::kickgoal_bgram_w)).share("bgram"); /* Higher BG Layer */
- map(0xa08000, 0xa0bfff).ram().w(FUNC(kickgoal_state::kickgoal_bg2ram_w)).share("bg2ram"); /* Lower BG Layer */
+ map(0x900001, 0x900001).lw8("eeprom_cs_w", [this](u8 data){ m_eeprom->cs_write(BIT(data, 0)); });
+ map(0x900003, 0x900003).lw8("eeprom_clk_w", [this](u8 data){ m_eeprom->clk_write(BIT(data, 0)); });
+ map(0x900005, 0x900005).lw8("eeprom_di_w", [this](u8 data){ m_eeprom->di_write(BIT(data, 0)); });
+ map(0x900007, 0x900007).lr8("eeprom_r", [this](){ return m_eeprom->do_read(); });
+
+ map(0xa00000, 0xa03fff).ram().w(FUNC(kickgoal_state::fgram_w)).share("fgram"); /* FG Layer */
+ map(0xa04000, 0xa07fff).ram().w(FUNC(kickgoal_state::bgram_w)).share("bgram"); /* Higher BG Layer */
+ map(0xa08000, 0xa0bfff).ram().w(FUNC(kickgoal_state::bg2ram_w)).share("bg2ram"); /* Lower BG Layer */
map(0xa0c000, 0xa0ffff).ram(); // more tilemap?
map(0xa10000, 0xa1000f).writeonly().share("scrram"); /* Scroll Registers */
map(0xb00000, 0xb007ff).writeonly().share("spriteram"); /* Sprites */
@@ -257,64 +226,63 @@ INPUT_PORTS_END
/* GFX Decodes ***************************************************************/
-static const gfx_layout fg88_charlayout =
+static const gfx_layout layout_8x8 =
{
8,8,
RGN_FRAC(1,4),
4,
{ RGN_FRAC(3,4), RGN_FRAC(2,4), RGN_FRAC(1,4), RGN_FRAC(0,4) },
- { 0, 1, 2, 3, 4, 5, 6, 7 },
- { 0*8, 2*8, 4*8, 6*8, 8*8, 10*8, 12*8, 14*8 }, // note 1*3, 3*8, 5*8 etc. not used, the pixel data is the same, CPS1-like
+ { STEP8(0,1) },
+ { STEP8(0,8*2) },
16*8
};
-static const gfx_layout fg88_alt_charlayout =
+
+static const gfx_layout layout_8x8_alt =
{
8,8,
RGN_FRAC(1,4),
4,
{ RGN_FRAC(3,4), RGN_FRAC(2,4), RGN_FRAC(1,4), RGN_FRAC(0,4) },
- { 0, 1, 2, 3, 4, 5, 6, 7 },
- { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
+ { STEP8(0,1) },
+ { STEP8(0,8) },
8*8
};
-static const gfx_layout bg1616_charlayout =
+static const gfx_layout layout_16x16 =
{
16,16,
RGN_FRAC(1,4),
4,
{ RGN_FRAC(3,4), RGN_FRAC(2,4), RGN_FRAC(1,4), RGN_FRAC(0,4) },
- { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
+ { STEP16(0,1) },
{ STEP16(0,16) },
16*16
};
-static const gfx_layout bg3232_charlayout =
+static const gfx_layout layout_32x32 =
{
32,32,
RGN_FRAC(1,4),
4,
{ RGN_FRAC(3,4), RGN_FRAC(2,4), RGN_FRAC(1,4), RGN_FRAC(0,4) },
- {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31
- },
+ { STEP32(0,1) },
{ STEP32(0,32) },
32*32,
};
static GFXDECODE_START( gfx_kickgoal )
- GFXDECODE_ENTRY( "gfx1", 0, fg88_charlayout, 0x000, 0x40 )
- GFXDECODE_ENTRY( "gfx1", 0, bg1616_charlayout, 0x000, 0x40 )
- GFXDECODE_ENTRY( "gfx1", 0, bg3232_charlayout, 0x000, 0x40 )
+ GFXDECODE_ENTRY( "gfx1", 0, layout_8x8, 0x000, 0x40 ) // FG GFX for even column like CPS1
+ GFXDECODE_ENTRY( "gfx1", 0, layout_16x16, 0x000, 0x40 )
+ GFXDECODE_ENTRY( "gfx1", 0, layout_32x32, 0x000, 0x40 )
+ GFXDECODE_ENTRY( "gfx1", 1, layout_8x8, 0x000, 0x40 ) // FG GFX for odd column like CPS1
GFXDECODE_END
static GFXDECODE_START( gfx_actionhw )
- GFXDECODE_ENTRY( "gfx1", 0, fg88_alt_charlayout, 0x000, 0x40 )
- GFXDECODE_ENTRY( "gfx1", 0, bg1616_charlayout, 0x000, 0x40 )
+ GFXDECODE_ENTRY( "gfx1", 0, layout_8x8_alt, 0x000, 0x40 )
+ GFXDECODE_ENTRY( "gfx1", 0, layout_16x16, 0x000, 0x40 )
GFXDECODE_END
/* MACHINE drivers ***********************************************************/
@@ -417,12 +385,11 @@ WRITE16_MEMBER(kickgoal_state::to_pic_w)
}
-
void kickgoal_state::kickgoal(machine_config &config)
{
/* basic machine hardware */
M68000(config, m_maincpu, XTAL(12'000'000)); /* 12 MHz */
- m_maincpu->set_addrmap(AS_PROGRAM, &kickgoal_state::kickgoal_program_map);
+ m_maincpu->set_addrmap(AS_PROGRAM, &kickgoal_state::program_map);
m_maincpu->set_vblank_int("screen", FUNC(kickgoal_state::irq6_line_hold));
PIC16C57(config, m_audiocpu, XTAL(12'000'000)/3); /* 4MHz ? */
@@ -442,7 +409,7 @@ void kickgoal_state::kickgoal(machine_config &config)
screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
screen.set_size(64*8, 32*8);
screen.set_visarea(9*8, 55*8-1, 2*8, 30*8-1);
- screen.set_screen_update(FUNC(kickgoal_state::screen_update_kickgoal));
+ screen.set_screen_update(FUNC(kickgoal_state::screen_update));
screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_kickgoal);
@@ -464,7 +431,7 @@ void kickgoal_state::actionhw(machine_config &config)
{
/* basic machine hardware */
M68000(config, m_maincpu, XTAL(12'000'000)); /* verified on pcb */
- m_maincpu->set_addrmap(AS_PROGRAM, &kickgoal_state::kickgoal_program_map);
+ m_maincpu->set_addrmap(AS_PROGRAM, &kickgoal_state::program_map);
m_maincpu->set_vblank_int("screen", FUNC(kickgoal_state::irq6_line_hold));
PIC16C57(config, m_audiocpu, XTAL(12'000'000)/3); /* verified on pcb */
@@ -479,7 +446,7 @@ void kickgoal_state::actionhw(machine_config &config)
screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
screen.set_size(64*8, 32*8);
screen.set_visarea(10*8+2, 54*8-1+2, 0*8, 30*8-1);
- screen.set_screen_update(FUNC(kickgoal_state::screen_update_kickgoal));
+ screen.set_screen_update(FUNC(kickgoal_state::screen_update));
screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_actionhw);
@@ -498,7 +465,6 @@ void kickgoal_state::actionhw(machine_config &config)
}
-
/* Rom Loading ***************************************************************/
ROM_START( kickgoal ) /* PRO-3/B pcb */
@@ -550,7 +516,7 @@ ROM_START( actionhw ) /* PRO-3/B pcb */
ROM_LOAD16_BYTE( "1.ic5", 0x000001, 0x80000, CRC(136b9711) SHA1(553f9fdd99bb9ce2e1492d0755633075e59ba587) )
ROM_REGION( 0x1000, "audiocpu", 0 ) /* sound? (missing) */
- /* Remove the CPU_DISABLED flag in MACHINE_DRIVER when the rom is dumped */
+ /* Remove the m_audiocpu->set_disable(); flag in MACHINE_DRIVER when the rom is dumped */
ROM_LOAD( "pic16c57", 0x0000, 0x0800, NO_DUMP )
ROM_REGION( 0x400000, "gfx1", 0 )
@@ -572,7 +538,7 @@ ROM_END
void kickgoal_state::init_kickgoal()
{
#if 0 /* we should find a real fix instead */
- uint16_t *rom = (uint16_t *)memregion("maincpu")->base();
+ u16 *rom = (u16 *)memregion("maincpu")->base();
/* fix "bug" that prevents game from writing to EEPROM */
rom[0x12b0/2] = 0x0001;
@@ -588,4 +554,3 @@ GAME( 1995, kickgoal, 0, kickgoal, kickgoal, kickgoal_state, init_kickgo
GAME( 1995, kickgoala, kickgoal, kickgoal, kickgoal, kickgoal_state, init_kickgoal, ROT0, "TCH", "Kick Goal (set 2)", MACHINE_SUPPORTS_SAVE )
GAME( 1995, actionhw, 0, actionhw, kickgoal, kickgoal_state, init_actionhw, ROT0, "TCH", "Action Hollywood", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-
diff --git a/src/mame/includes/kickgoal.h b/src/mame/includes/kickgoal.h
index 8b828067333..10d327a26b1 100644
--- a/src/mame/includes/kickgoal.h
+++ b/src/mame/includes/kickgoal.h
@@ -47,11 +47,9 @@ protected:
virtual void machine_reset() override;
private:
- DECLARE_READ16_MEMBER(kickgoal_eeprom_r);
- DECLARE_WRITE16_MEMBER(kickgoal_eeprom_w);
- DECLARE_WRITE16_MEMBER(kickgoal_fgram_w);
- DECLARE_WRITE16_MEMBER(kickgoal_bgram_w);
- DECLARE_WRITE16_MEMBER(kickgoal_bg2ram_w);
+ DECLARE_WRITE16_MEMBER(fgram_w);
+ DECLARE_WRITE16_MEMBER(bgram_w);
+ DECLARE_WRITE16_MEMBER(bg2ram_w);
DECLARE_WRITE16_MEMBER(actionhw_snd_w);
DECLARE_WRITE8_MEMBER(soundio_port_a_w);
@@ -62,20 +60,20 @@ private:
DECLARE_WRITE16_MEMBER(to_pic_w);
TILE_GET_INFO_MEMBER(get_kickgoal_fg_tile_info);
- TILE_GET_INFO_MEMBER(get_kickgoal_bg_tile_info);
- TILE_GET_INFO_MEMBER(get_kickgoal_bg2_tile_info);
- TILEMAP_MAPPER_MEMBER(tilemap_scan_kicksfg);
- TILEMAP_MAPPER_MEMBER(tilemap_scan_kicksbg);
- TILEMAP_MAPPER_MEMBER(tilemap_scan_kicksbg2);
- TILEMAP_MAPPER_MEMBER(tilemap_scan_actionhwbg2);
+ TILE_GET_INFO_MEMBER(get_bg_tile_info);
+ TILE_GET_INFO_MEMBER(get_bg2_tile_info);
+ TILE_GET_INFO_MEMBER(get_actionhw_fg_tile_info);
+ TILEMAP_MAPPER_MEMBER(tilemap_scan_8x8);
+ TILEMAP_MAPPER_MEMBER(tilemap_scan_16x16);
+ TILEMAP_MAPPER_MEMBER(tilemap_scan_32x32);
DECLARE_VIDEO_START(kickgoal);
DECLARE_VIDEO_START(actionhw);
INTERRUPT_GEN_MEMBER(kickgoal_interrupt);
- uint32_t screen_update_kickgoal(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- void kickgoal_program_map(address_map &map);
+ void program_map(address_map &map);
void oki_map(address_map &map);
/* video-related */
@@ -87,8 +85,8 @@ private:
int m_snd_new;
int m_snd_sam[4];
- uint8_t m_pic_portc;
- uint8_t m_pic_portb;
+ u8 m_pic_portc;
+ u8 m_pic_portb;
int m_sound_command_sent;
int m_fg_base;
@@ -102,14 +100,14 @@ private:
int m_sprbase;
- void kickgoal_draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect);
+ void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect);
/* memory pointers */
- required_shared_ptr<uint16_t> m_fgram;
- required_shared_ptr<uint16_t> m_bgram;
- required_shared_ptr<uint16_t> m_bg2ram;
- required_shared_ptr<uint16_t> m_scrram;
- required_shared_ptr<uint16_t> m_spriteram;
+ required_shared_ptr<u16> m_fgram;
+ required_shared_ptr<u16> m_bgram;
+ required_shared_ptr<u16> m_bg2ram;
+ required_shared_ptr<u16> m_scrram;
+ required_shared_ptr<u16> m_spriteram;
/* devices */
required_device<eeprom_serial_93cxx_device> m_eeprom;
diff --git a/src/mame/video/kickgoal.cpp b/src/mame/video/kickgoal.cpp
index 71aa4f2f7c4..fad3864a178 100644
--- a/src/mame/video/kickgoal.cpp
+++ b/src/mame/video/kickgoal.cpp
@@ -6,19 +6,19 @@
#include "includes/kickgoal.h"
-WRITE16_MEMBER(kickgoal_state::kickgoal_fgram_w)
+WRITE16_MEMBER(kickgoal_state::fgram_w)
{
COMBINE_DATA(&m_fgram[offset]);
m_fgtm->mark_tile_dirty(offset / 2);
}
-WRITE16_MEMBER(kickgoal_state::kickgoal_bgram_w)
+WRITE16_MEMBER(kickgoal_state::bgram_w)
{
COMBINE_DATA(&m_bgram[offset]);
m_bgtm->mark_tile_dirty(offset / 2);
}
-WRITE16_MEMBER(kickgoal_state::kickgoal_bg2ram_w)
+WRITE16_MEMBER(kickgoal_state::bg2ram_w)
{
COMBINE_DATA(&m_bg2ram[offset]);
m_bg2tm->mark_tile_dirty(offset / 2);
@@ -27,89 +27,78 @@ WRITE16_MEMBER(kickgoal_state::kickgoal_bg2ram_w)
/* FG */
TILE_GET_INFO_MEMBER(kickgoal_state::get_kickgoal_fg_tile_info)
{
- int tileno = m_fgram[tile_index * 2] & 0x0fff;
- int color = m_fgram[tile_index * 2 + 1] & 0x000f;
+ u16 const tileno = m_fgram[tile_index * 2] & 0x0fff;
+ u16 const color = m_fgram[tile_index * 2 + 1] & 0x000f;
+
+ SET_TILE_INFO_MEMBER(BIT(tile_index, 5) ? 3 : 0, tileno + m_fg_base, color + 0x00, 0); // similar 8x8 gfx behavior as CPS1
+}
+
+TILE_GET_INFO_MEMBER(kickgoal_state::get_actionhw_fg_tile_info)
+{
+ u16 const tileno = m_fgram[tile_index * 2] & 0x0fff;
+ u16 const color = m_fgram[tile_index * 2 + 1] & 0x000f;
SET_TILE_INFO_MEMBER(0, tileno + m_fg_base, color + 0x00, 0);
}
/* BG */
-TILE_GET_INFO_MEMBER(kickgoal_state::get_kickgoal_bg_tile_info)
+TILE_GET_INFO_MEMBER(kickgoal_state::get_bg_tile_info)
{
- int tileno = m_bgram[tile_index * 2] & m_bg_mask;
- int color = m_bgram[tile_index * 2 + 1] & 0x000f;
- int flipx = m_bgram[tile_index * 2 + 1] & 0x0020;
- int flipy = m_bgram[tile_index * 2 + 1] & 0x0040;
+ u16 const tileno = m_bgram[tile_index * 2] & m_bg_mask;
+ u16 const color = m_bgram[tile_index * 2 + 1] & 0x000f;
+ bool const flipx = m_bgram[tile_index * 2 + 1] & 0x0020;
+ bool const flipy = m_bgram[tile_index * 2 + 1] & 0x0040;
SET_TILE_INFO_MEMBER(1, tileno + m_bg_base, color + 0x10, (flipx ? TILE_FLIPX : 0) | (flipy ? TILE_FLIPY : 0));
}
/* BG 2 */
-TILE_GET_INFO_MEMBER(kickgoal_state::get_kickgoal_bg2_tile_info)
+TILE_GET_INFO_MEMBER(kickgoal_state::get_bg2_tile_info)
{
- int tileno = m_bg2ram[tile_index * 2] & m_bg2_mask;
- int color = m_bg2ram[tile_index * 2 + 1] & 0x000f;
- int flipx = m_bg2ram[tile_index * 2 + 1] & 0x0020;
- int flipy = m_bg2ram[tile_index * 2 + 1] & 0x0040;
+ u16 const tileno = m_bg2ram[tile_index * 2] & m_bg2_mask;
+ u16 const color = m_bg2ram[tile_index * 2 + 1] & 0x000f;
+ bool const flipx = m_bg2ram[tile_index * 2 + 1] & 0x0020;
+ bool const flipy = m_bg2ram[tile_index * 2 + 1] & 0x0040;
SET_TILE_INFO_MEMBER(m_bg2_region, tileno + m_bg2_base, color + 0x20, (flipx ? TILE_FLIPX : 0) | (flipy ? TILE_FLIPY : 0));
}
-TILEMAP_MAPPER_MEMBER(kickgoal_state::tilemap_scan_kicksfg)
+TILEMAP_MAPPER_MEMBER(kickgoal_state::tilemap_scan_8x8)
{
/* logical (col,row) -> memory offset */
- return col * 32 + (row & 0x1f) + ((row & 0x20) >> 5) * 0x800;
+ return (row & 0x1f) | ((col & 0x3f) << 5) | ((row & 0x20) << 6);
}
-TILEMAP_MAPPER_MEMBER(kickgoal_state::tilemap_scan_kicksbg)
+TILEMAP_MAPPER_MEMBER(kickgoal_state::tilemap_scan_16x16)
{
/* logical (col,row) -> memory offset */
- return col * 16 + (row & 0xf) + ((row & 0x70) >> 4) * 0x400;
+ return (row & 0xf) | ((col & 0x3f) << 4) | ((row & 0x30) << 6);
}
-
-TILEMAP_MAPPER_MEMBER(kickgoal_state::tilemap_scan_kicksbg2)// 16x16 tiles
+TILEMAP_MAPPER_MEMBER(kickgoal_state::tilemap_scan_32x32)
{
/* logical (col,row) -> memory offset */
- return col * 8 + (row & 0x7) + ((row & 0x3c) >> 3) * 0x200;
+ return (row & 0x7) | ((col & 0x3f) << 3) | ((row & 0x38) << 6);
}
-TILEMAP_MAPPER_MEMBER(kickgoal_state::tilemap_scan_actionhwbg2)// 32x32 tiles
+void kickgoal_state::draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect)
{
- /* logical (col,row) -> memory offset */
- return col * 16 + (row & 0xf) + ((row & 0x70) >> 4) * 0x400;
-}
-
-
-
-
-
-
-
-
-
-void kickgoal_state::kickgoal_draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect)
-{
- uint16_t *spriteram = m_spriteram;
- gfx_element *gfx = m_gfxdecode->gfx(1);
- int offs;
-
- for (offs = 0; offs < m_spriteram.bytes() / 2; offs += 4)
+ for (int offs = 0; offs < m_spriteram.bytes() / 2; offs += 4)
{
- int xpos = spriteram[offs + 3];
- int ypos = spriteram[offs + 0] & 0x00ff;
- int tileno = spriteram[offs + 2] & 0x3fff;
- int flipx = spriteram[offs + 1] & 0x0020;
- int color = spriteram[offs + 1] & 0x000f;
+ int xpos = m_spriteram[offs + 3];
+ int ypos = m_spriteram[offs + 0] & 0x00ff;
+ u16 const tileno = m_spriteram[offs + 2] & 0x3fff;
+ bool const flipx = m_spriteram[offs + 1] & 0x0020;
+ u16 const color = m_spriteram[offs + 1] & 0x000f;
- if (spriteram[offs + 0] & 0x0100) break;
+ if (m_spriteram[offs + 0] & 0x0100) break;
ypos = 0x110 - ypos;
- gfx->transpen(bitmap,cliprect,
- tileno+m_sprbase,
+ m_gfxdecode->gfx(1)->transpen(bitmap,cliprect,
+ tileno + m_sprbase,
0x30 + color,
flipx,0,
xpos-16+4,ypos-32,15);
@@ -129,9 +118,9 @@ VIDEO_START_MEMBER(kickgoal_state,kickgoal)
m_bg2_base = 0x2000 / 4;
m_bg2_mask = (0x2000/4) - 1;
- m_fgtm = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(kickgoal_state::get_kickgoal_fg_tile_info),this), tilemap_mapper_delegate(FUNC(kickgoal_state::tilemap_scan_kicksfg),this), 8, 8, 64, 64);
- m_bgtm = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(kickgoal_state::get_kickgoal_bg_tile_info),this), tilemap_mapper_delegate(FUNC(kickgoal_state::tilemap_scan_kicksbg),this), 16, 16, 64, 64);
- m_bg2tm = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(kickgoal_state::get_kickgoal_bg2_tile_info),this), tilemap_mapper_delegate(FUNC(kickgoal_state::tilemap_scan_kicksbg2),this), 32, 32, 64, 64);
+ m_fgtm = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(kickgoal_state::get_kickgoal_fg_tile_info),this), tilemap_mapper_delegate(FUNC(kickgoal_state::tilemap_scan_8x8),this), 8, 8, 64, 64);
+ m_bgtm = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(kickgoal_state::get_bg_tile_info),this), tilemap_mapper_delegate(FUNC(kickgoal_state::tilemap_scan_16x16),this), 16, 16, 64, 64);
+ m_bg2tm = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(kickgoal_state::get_bg2_tile_info),this), tilemap_mapper_delegate(FUNC(kickgoal_state::tilemap_scan_32x32),this), 32, 32, 64, 64);
m_fgtm->set_transparent_pen(15);
m_bgtm->set_transparent_pen(15);
@@ -149,17 +138,16 @@ VIDEO_START_MEMBER(kickgoal_state,actionhw)
m_bg2_base = 0x2000;
m_bg2_mask = 0x2000 - 1;
- m_fgtm = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(kickgoal_state::get_kickgoal_fg_tile_info),this), tilemap_mapper_delegate(FUNC(kickgoal_state::tilemap_scan_kicksfg),this), 8, 8, 64, 64);
- m_bgtm = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(kickgoal_state::get_kickgoal_bg_tile_info),this), tilemap_mapper_delegate(FUNC(kickgoal_state::tilemap_scan_kicksbg),this), 16, 16, 64, 64);
- m_bg2tm = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(kickgoal_state::get_kickgoal_bg2_tile_info),this), tilemap_mapper_delegate(FUNC(kickgoal_state::tilemap_scan_actionhwbg2),this), 16, 16, 64, 64);
+ m_fgtm = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(kickgoal_state::get_actionhw_fg_tile_info),this), tilemap_mapper_delegate(FUNC(kickgoal_state::tilemap_scan_8x8),this), 8, 8, 64, 64);
+ m_bgtm = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(kickgoal_state::get_bg_tile_info),this), tilemap_mapper_delegate(FUNC(kickgoal_state::tilemap_scan_16x16),this), 16, 16, 64, 64);
+ m_bg2tm = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(kickgoal_state::get_bg2_tile_info),this), tilemap_mapper_delegate(FUNC(kickgoal_state::tilemap_scan_16x16),this), 16, 16, 64, 64);
m_fgtm->set_transparent_pen(15);
m_bgtm->set_transparent_pen(15);
}
-
-uint32_t kickgoal_state::screen_update_kickgoal(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
+u32 kickgoal_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
/* set scroll */
m_fgtm->set_scrollx(0, m_scrram[0]);
@@ -173,7 +161,7 @@ uint32_t kickgoal_state::screen_update_kickgoal(screen_device &screen, bitmap_in
m_bg2tm->draw(screen, bitmap, cliprect, 0, 0);
m_bgtm->draw(screen, bitmap, cliprect, 0, 0);
- kickgoal_draw_sprites(bitmap, cliprect);
+ draw_sprites(bitmap, cliprect);
m_fgtm->draw(screen, bitmap, cliprect, 0, 0);