summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video/rohga.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/video/rohga.cpp')
-rw-r--r--src/mame/video/rohga.cpp106
1 files changed, 53 insertions, 53 deletions
diff --git a/src/mame/video/rohga.cpp b/src/mame/video/rohga.cpp
index 89eaf75e92d..89d8dc33635 100644
--- a/src/mame/video/rohga.cpp
+++ b/src/mame/video/rohga.cpp
@@ -15,7 +15,7 @@ WRITE16_MEMBER(rohga_state::rohga_buffer_spriteram16_w)
{
// Spriteram seems to be triple buffered (no sprite lag on real pcb, but there
// is on driver with only double buffering)
- m_spriteram->copy();
+ m_spriteram[0]->copy();
}
/******************************************************************************/
@@ -23,16 +23,16 @@ WRITE16_MEMBER(rohga_state::rohga_buffer_spriteram16_w)
uint32_t rohga_state::screen_update_rohga(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
address_space &space = machine().dummy_space();
- uint16_t flip = m_deco_tilegen1->pf_control_r(space, 0, 0xffff);
+ uint16_t flip = m_deco_tilegen[0]->pf_control_r(space, 0, 0xffff);
uint16_t priority = m_decocomn->priority_r();
// sprites are flipped relative to tilemaps
flip_screen_set(BIT(flip, 7));
- m_sprgen1->set_flip_screen(!BIT(flip, 7));
+ m_sprgen[0]->set_flip_screen(!BIT(flip, 7));
/* Update playfields */
- m_deco_tilegen1->pf_update(m_pf1_rowscroll, m_pf2_rowscroll);
- m_deco_tilegen2->pf_update(m_pf3_rowscroll, m_pf4_rowscroll);
+ m_deco_tilegen[0]->pf_update(m_pf_rowscroll[0], m_pf_rowscroll[1]);
+ m_deco_tilegen[1]->pf_update(m_pf_rowscroll[2], m_pf_rowscroll[3]);
/* Draw playfields */
screen.priority().fill(0, cliprect);
@@ -44,30 +44,30 @@ uint32_t rohga_state::screen_update_rohga(screen_device &screen, bitmap_ind16 &b
if (priority & 4)
{
// Draw as 1 8BPP layer
- m_deco_tilegen2->tilemap_12_combine_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 3);
+ m_deco_tilegen[1]->tilemap_12_combine_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 3);
}
else
{
// Draw as 2 4BPP layers
- m_deco_tilegen2->tilemap_2_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 1);
- m_deco_tilegen2->tilemap_1_draw(screen, bitmap, cliprect, 0, 2);
+ m_deco_tilegen[1]->tilemap_2_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 1);
+ m_deco_tilegen[1]->tilemap_1_draw(screen, bitmap, cliprect, 0, 2);
}
- m_deco_tilegen1->tilemap_2_draw(screen, bitmap, cliprect, 0, 4);
+ m_deco_tilegen[0]->tilemap_2_draw(screen, bitmap, cliprect, 0, 4);
break;
case 1:
- m_deco_tilegen2->tilemap_2_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 1);
- m_deco_tilegen1->tilemap_2_draw(screen, bitmap, cliprect, 0, 2);
- m_deco_tilegen2->tilemap_1_draw(screen, bitmap, cliprect, 0, 4);
+ m_deco_tilegen[1]->tilemap_2_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 1);
+ m_deco_tilegen[0]->tilemap_2_draw(screen, bitmap, cliprect, 0, 2);
+ m_deco_tilegen[1]->tilemap_1_draw(screen, bitmap, cliprect, 0, 4);
break;
case 2:
- m_deco_tilegen1->tilemap_2_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 1);
- m_deco_tilegen2->tilemap_2_draw(screen, bitmap, cliprect, 0, 2);
- m_deco_tilegen2->tilemap_1_draw(screen, bitmap, cliprect, 0, 4);
+ m_deco_tilegen[0]->tilemap_2_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 1);
+ m_deco_tilegen[1]->tilemap_2_draw(screen, bitmap, cliprect, 0, 2);
+ m_deco_tilegen[1]->tilemap_1_draw(screen, bitmap, cliprect, 0, 4);
break;
}
- m_sprgen1->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0x400);
- m_deco_tilegen1->tilemap_1_draw(screen, bitmap, cliprect, 0, 0);
+ m_sprgen[0]->draw_sprites(bitmap, cliprect, m_spriteram[0]->buffer(), 0x400);
+ m_deco_tilegen[0]->tilemap_1_draw(screen, bitmap, cliprect, 0, 0);
return 0;
}
@@ -76,8 +76,8 @@ uint32_t rohga_state::screen_update_rohga(screen_device &screen, bitmap_ind16 &b
VIDEO_START_MEMBER(rohga_state,wizdfire)
{
- m_sprgen1->alloc_sprite_bitmap();
- m_sprgen2->alloc_sprite_bitmap();
+ m_sprgen[0]->alloc_sprite_bitmap();
+ m_sprgen[1]->alloc_sprite_bitmap();
}
// not amazingly efficient, called multiple times to pull a layer out of the sprite bitmaps, but keeps correct sprite<->sprite priorities
@@ -88,7 +88,7 @@ void rohga_state::mixwizdfirelayer(bitmap_rgb32 &bitmap, const rectangle &clipre
bitmap_ind16* sprite_bitmap;
int penbase;
- sprite_bitmap = &m_sprgen2->get_sprite_temp_bitmap();
+ sprite_bitmap = &m_sprgen[1]->get_sprite_temp_bitmap();
penbase = 0x600;
uint16_t* srcline;
@@ -129,40 +129,40 @@ void rohga_state::mixwizdfirelayer(bitmap_rgb32 &bitmap, const rectangle &clipre
uint32_t rohga_state::screen_update_wizdfire(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
address_space &space = machine().dummy_space();
- uint16_t flip = m_deco_tilegen1->pf_control_r(space, 0, 0xffff);
+ uint16_t flip = m_deco_tilegen[0]->pf_control_r(space, 0, 0xffff);
uint16_t priority = m_decocomn->priority_r();
// sprites are flipped relative to tilemaps
flip_screen_set(BIT(flip, 7));
- m_sprgen1->set_flip_screen(!BIT(flip, 7));
- m_sprgen2->set_flip_screen(!BIT(flip, 7));
+ m_sprgen[0]->set_flip_screen(!BIT(flip, 7));
+ m_sprgen[1]->set_flip_screen(!BIT(flip, 7));
/* draw sprite gfx to temp bitmaps */
- m_sprgen2->draw_sprites(bitmap, cliprect, m_spriteram2->buffer(), 0x400);
- m_sprgen1->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0x400);
+ m_sprgen[1]->draw_sprites(bitmap, cliprect, m_spriteram[1]->buffer(), 0x400);
+ m_sprgen[0]->draw_sprites(bitmap, cliprect, m_spriteram[0]->buffer(), 0x400);
/* Update playfields */
- m_deco_tilegen1->pf_update(nullptr, nullptr);
- m_deco_tilegen2->pf_update(m_pf3_rowscroll, m_pf4_rowscroll);
+ m_deco_tilegen[0]->pf_update(nullptr, nullptr);
+ m_deco_tilegen[1]->pf_update(m_pf_rowscroll[2], m_pf_rowscroll[3]);
/* Draw playfields - Palette of 2nd playfield chip visible if playfields turned off */
bitmap.fill(m_palette->pen(512), cliprect);
- m_deco_tilegen2->tilemap_2_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
- m_sprgen1->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0600, 0x0600, 0x400, 0x1ff);
- m_deco_tilegen1->tilemap_2_draw(screen, bitmap, cliprect, 0, 0);
- m_sprgen1->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0400, 0x0600, 0x400, 0x1ff);
+ m_deco_tilegen[1]->tilemap_2_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
+ m_sprgen[0]->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0600, 0x0600, 0x400, 0x1ff);
+ m_deco_tilegen[0]->tilemap_2_draw(screen, bitmap, cliprect, 0, 0);
+ m_sprgen[0]->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0400, 0x0600, 0x400, 0x1ff);
if ((priority & 0x1f) == 0x1f) /* Wizdfire has bit 0x40 always set, Dark Seal 2 doesn't?! */
- m_deco_tilegen2->tilemap_1_draw(screen, bitmap, cliprect, TILEMAP_DRAW_ALPHA(0x80), 0);
+ m_deco_tilegen[1]->tilemap_1_draw(screen, bitmap, cliprect, TILEMAP_DRAW_ALPHA(0x80), 0);
else
- m_deco_tilegen2->tilemap_1_draw(screen, bitmap, cliprect, 0, 0);
+ m_deco_tilegen[1]->tilemap_1_draw(screen, bitmap, cliprect, 0, 0);
- m_sprgen1->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0400, 0x400, 0x1ff); // 0x000 and 0x200 of 0x600
+ m_sprgen[0]->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0400, 0x400, 0x1ff); // 0x000 and 0x200 of 0x600
mixwizdfirelayer(bitmap, cliprect, 0x000, 0x000);
- m_deco_tilegen1->tilemap_1_draw(screen, bitmap, cliprect, 0, 0);
+ m_deco_tilegen[0]->tilemap_1_draw(screen, bitmap, cliprect, 0, 0);
return 0;
}
@@ -175,8 +175,8 @@ void rohga_state::mixnitroballlayer(screen_device &screen, bitmap_rgb32 &bitmap,
uint16_t priority = m_decocomn->priority_r();
- sprite_bitmap1 = &m_sprgen1->get_sprite_temp_bitmap();
- sprite_bitmap2 = &m_sprgen2->get_sprite_temp_bitmap();
+ sprite_bitmap1 = &m_sprgen[0]->get_sprite_temp_bitmap();
+ sprite_bitmap2 = &m_sprgen[1]->get_sprite_temp_bitmap();
priority_bitmap = &screen.priority();
uint32_t* dstline;
@@ -289,10 +289,10 @@ void rohga_state::mixnitroballlayer(screen_device &screen, bitmap_rgb32 &bitmap,
uint8_t bgpri = srcpriline[x];
/* once we get here we have
- pri1 - 1/2/4/8/16/64 (sprite chip 1 pixel priority relative to bg)
- pri2 - 8/16 (sprite chip 2 pixel priority relative to bg)
+ pri1 - 0x001/0x002/0x004/0x008/0x010/0x020/0x040/0x080/0x100/0x200 (sprite chip 1 pixel priority relative to bg)
+ pri2 - 0x080/0x010 (sprite chip 2 pixel priority relative to bg)
- bgpri - 4/32 (from drawing tilemaps earlier, to compare above pri1/pri2 priorities against)
+ bgpri - 0x008/0x040 (from drawing tilemaps earlier, to compare above pri1/pri2 priorities against)
pix1 - same as before (ready to extract just colour data from)
pix2 - same as before ^^
*/
@@ -332,44 +332,44 @@ void rohga_state::mixnitroballlayer(screen_device &screen, bitmap_rgb32 &bitmap,
uint32_t rohga_state::screen_update_nitrobal(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
address_space &space = machine().dummy_space();
- uint16_t flip = m_deco_tilegen1->pf_control_r(space, 0, 0xffff);
+ uint16_t flip = m_deco_tilegen[0]->pf_control_r(space, 0, 0xffff);
uint16_t priority = m_decocomn->priority_r();
flip_screen_set(BIT(flip, 7));
- m_sprgen1->set_flip_screen(BIT(flip, 7));
- m_sprgen2->set_flip_screen(BIT(flip, 7));
+ m_sprgen[0]->set_flip_screen(BIT(flip, 7));
+ m_sprgen[1]->set_flip_screen(BIT(flip, 7));
/* draw sprite gfx to temp bitmaps */
- m_sprgen1->set_alt_format(true);
- m_sprgen2->set_alt_format(true);
- m_sprgen2->draw_sprites(bitmap, cliprect, m_spriteram2->buffer(), 0x400);
- m_sprgen1->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0x400);
+ m_sprgen[0]->set_alt_format(true);
+ m_sprgen[1]->set_alt_format(true);
+ m_sprgen[1]->draw_sprites(bitmap, cliprect, m_spriteram[1]->buffer(), 0x400);
+ m_sprgen[0]->draw_sprites(bitmap, cliprect, m_spriteram[0]->buffer(), 0x400);
/* Update playfields */
- m_deco_tilegen1->pf_update(m_pf1_rowscroll, m_pf2_rowscroll);
- m_deco_tilegen2->pf_update(m_pf3_rowscroll, m_pf4_rowscroll);
+ m_deco_tilegen[0]->pf_update(m_pf_rowscroll[0], m_pf_rowscroll[1]);
+ m_deco_tilegen[1]->pf_update(m_pf_rowscroll[2], m_pf_rowscroll[3]);
/* Draw playfields - Palette of 2nd playfield chip visible if playfields turned off */
bitmap.fill(m_palette->pen(512), cliprect);
screen.priority().fill(0);
/* pf3 and pf4 are combined into a single 8bpp bitmap */
- m_deco_tilegen2->tilemap_12_combine_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
+ m_deco_tilegen[1]->tilemap_12_combine_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
switch (priority)
{
case 0:
default:
- m_deco_tilegen1->tilemap_2_draw(screen, bitmap, cliprect, 0, 0x008);
+ m_deco_tilegen[0]->tilemap_2_draw(screen, bitmap, cliprect, 0, 0x008);
break;
case 0x20:
- m_deco_tilegen1->tilemap_2_draw(screen, bitmap, cliprect, 0, 0x040);
+ m_deco_tilegen[0]->tilemap_2_draw(screen, bitmap, cliprect, 0, 0x040);
break;
}
/* TODO verify priorities + mixing / alpha */
mixnitroballlayer(screen,bitmap,cliprect);
- m_deco_tilegen1->tilemap_1_draw(screen, bitmap, cliprect, 0, 0);
+ m_deco_tilegen[0]->tilemap_1_draw(screen, bitmap, cliprect, 0, 0);
return 0;
}