summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video/taito_b.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/video/taito_b.c')
-rw-r--r--src/mame/video/taito_b.c67
1 files changed, 32 insertions, 35 deletions
diff --git a/src/mame/video/taito_b.c b/src/mame/video/taito_b.c
index 81b8298ef13..eff867f2892 100644
--- a/src/mame/video/taito_b.c
+++ b/src/mame/video/taito_b.c
@@ -365,11 +365,10 @@ g_profiler.start(PROFILER_USER1);
g_profiler.stop();
}
-SCREEN_UPDATE_IND16( taitob )
+UINT32 taitob_state::screen_update_taitob(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
- taitob_state *state = screen.machine().driver_data<taitob_state>();
address_space &space = screen.machine().driver_data()->generic_space();
- UINT8 video_control = tc0180vcu_get_videoctrl(state->m_tc0180vcu, space, 0);
+ UINT8 video_control = tc0180vcu_get_videoctrl(m_tc0180vcu, space, 0);
if ((video_control & 0x20) == 0)
{
@@ -378,36 +377,35 @@ SCREEN_UPDATE_IND16( taitob )
}
/* Draw playfields */
- tc0180vcu_tilemap_draw(state->m_tc0180vcu, bitmap, cliprect, 0, 1);
+ tc0180vcu_tilemap_draw(m_tc0180vcu, bitmap, cliprect, 0, 1);
draw_framebuffer(screen.machine(), bitmap, cliprect, 1);
- tc0180vcu_tilemap_draw(state->m_tc0180vcu, bitmap, cliprect, 1, 0);
+ tc0180vcu_tilemap_draw(m_tc0180vcu, bitmap, cliprect, 1, 0);
- if (state->m_pixel_bitmap) /* hitice only */
+ if (m_pixel_bitmap) /* hitice only */
{
- int scrollx = -2 * state->m_pixel_scroll[0]; //+320;
- int scrolly = - state->m_pixel_scroll[1]; //+240;
+ int scrollx = -2 * m_pixel_scroll[0]; //+320;
+ int scrolly = - m_pixel_scroll[1]; //+240;
/* bit 15 of pixel_scroll[0] is probably flip screen */
- copyscrollbitmap_trans(bitmap, *state->m_pixel_bitmap, 1, &scrollx, 1, &scrolly, cliprect, state->m_b_fg_color_base * 16);
+ copyscrollbitmap_trans(bitmap, *m_pixel_bitmap, 1, &scrollx, 1, &scrolly, cliprect, m_b_fg_color_base * 16);
}
draw_framebuffer(screen.machine(), bitmap, cliprect, 0);
- tc0180vcu_tilemap_draw(state->m_tc0180vcu, bitmap, cliprect, 2, 0);
+ tc0180vcu_tilemap_draw(m_tc0180vcu, bitmap, cliprect, 2, 0);
return 0;
}
-SCREEN_UPDATE_RGB32( realpunc )
+UINT32 taitob_state::screen_update_realpunc(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- taitob_state *state = screen.machine().driver_data<taitob_state>();
address_space &space = screen.machine().driver_data()->generic_space();
const rgb_t *palette = palette_entry_list_adjusted(screen.machine().palette);
- UINT8 video_control = tc0180vcu_get_videoctrl(state->m_tc0180vcu, space, 0);
+ UINT8 video_control = tc0180vcu_get_videoctrl(m_tc0180vcu, space, 0);
int x, y;
/* Video blanked? */
@@ -418,22 +416,22 @@ SCREEN_UPDATE_RGB32( realpunc )
}
/* Draw the palettized playfields to an indexed bitmap */
- tc0180vcu_tilemap_draw(state->m_tc0180vcu, *state->m_realpunc_bitmap, cliprect, 0, 1);
+ tc0180vcu_tilemap_draw(m_tc0180vcu, *m_realpunc_bitmap, cliprect, 0, 1);
- draw_framebuffer(screen.machine(), *state->m_realpunc_bitmap, cliprect, 1);
+ draw_framebuffer(screen.machine(), *m_realpunc_bitmap, cliprect, 1);
- tc0180vcu_tilemap_draw(state->m_tc0180vcu, *state->m_realpunc_bitmap, cliprect, 1, 0);
+ tc0180vcu_tilemap_draw(m_tc0180vcu, *m_realpunc_bitmap, cliprect, 1, 0);
- if (state->m_realpunc_video_ctrl & 0x0001)
- draw_framebuffer(screen.machine(), *state->m_realpunc_bitmap, cliprect, 0);
+ if (m_realpunc_video_ctrl & 0x0001)
+ draw_framebuffer(screen.machine(), *m_realpunc_bitmap, cliprect, 0);
/* Copy the intermediate bitmap to the output bitmap, applying the palette */
for (y = 0; y <= cliprect.max_y; y++)
for (x = 0; x <= cliprect.max_x; x++)
- bitmap.pix32(y, x) = palette[state->m_realpunc_bitmap->pix16(y, x)];
+ bitmap.pix32(y, x) = palette[m_realpunc_bitmap->pix16(y, x)];
/* Draw the 15bpp raw CRTC frame buffer directly to the output bitmap */
- if (state->m_realpunc_video_ctrl & 0x0002)
+ if (m_realpunc_video_ctrl & 0x0002)
{
device_t *hd63484 = screen.machine().device("hd63484");
@@ -463,7 +461,7 @@ SCREEN_UPDATE_RGB32( realpunc )
}
}
/* Draw the 15bpp raw output of the camera ADCs (TODO) */
- else if (state->m_realpunc_video_ctrl & 0x0004)
+ else if (m_realpunc_video_ctrl & 0x0004)
{
for (y = 0; y <= cliprect.max_y; y++)
{
@@ -473,20 +471,20 @@ SCREEN_UPDATE_RGB32( realpunc )
}
/* Clear the indexed bitmap and draw the final indexed layers */
- state->m_realpunc_bitmap->fill(0, cliprect);
+ m_realpunc_bitmap->fill(0, cliprect);
- if (!(state->m_realpunc_video_ctrl & 0x0001))
- draw_framebuffer(screen.machine(), *state->m_realpunc_bitmap, cliprect, 0);
+ if (!(m_realpunc_video_ctrl & 0x0001))
+ draw_framebuffer(screen.machine(), *m_realpunc_bitmap, cliprect, 0);
- tc0180vcu_tilemap_draw(state->m_tc0180vcu, *state->m_realpunc_bitmap, cliprect, 2, 0);
+ tc0180vcu_tilemap_draw(m_tc0180vcu, *m_realpunc_bitmap, cliprect, 2, 0);
/* Merge the indexed layers with the output bitmap */
for (y = 0; y <= cliprect.max_y; y++)
{
for (x = 0; x <= cliprect.max_x; x++)
{
- if (state->m_realpunc_bitmap->pix16(y, x))
- bitmap.pix32(y, x) = palette[state->m_realpunc_bitmap->pix16(y, x)];
+ if (m_realpunc_bitmap->pix16(y, x))
+ bitmap.pix32(y, x) = palette[m_realpunc_bitmap->pix16(y, x)];
}
}
@@ -495,25 +493,24 @@ SCREEN_UPDATE_RGB32( realpunc )
-SCREEN_VBLANK( taitob )
+void taitob_state::screen_eof_taitob(screen_device &screen, bool state)
{
// rising edge
- if (vblank_on)
+ if (state)
{
- taitob_state *state = screen.machine().driver_data<taitob_state>();
address_space &space = screen.machine().driver_data()->generic_space();
- UINT8 video_control = tc0180vcu_get_videoctrl(state->m_tc0180vcu, space, 0);
- UINT8 framebuffer_page = tc0180vcu_get_fb_page(state->m_tc0180vcu, space, 0);
+ UINT8 video_control = tc0180vcu_get_videoctrl(m_tc0180vcu, space, 0);
+ UINT8 framebuffer_page = tc0180vcu_get_fb_page(m_tc0180vcu, space, 0);
if (~video_control & 0x01)
- state->m_framebuffer[framebuffer_page]->fill(0, screen.machine().primary_screen->visible_area());
+ m_framebuffer[framebuffer_page]->fill(0, screen.machine().primary_screen->visible_area());
if (~video_control & 0x80)
{
framebuffer_page ^= 1;
- tc0180vcu_set_fb_page(state->m_tc0180vcu, space, 0, framebuffer_page);
+ tc0180vcu_set_fb_page(m_tc0180vcu, space, 0, framebuffer_page);
}
- draw_sprites(screen.machine(), *state->m_framebuffer[framebuffer_page], screen.machine().primary_screen->visible_area());
+ draw_sprites(screen.machine(), *m_framebuffer[framebuffer_page], screen.machine().primary_screen->visible_area());
}
}