UINT32 dreambal_state::screen_update_dreambal(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { address_space &space = generic_space(); UINT16 flip = m_deco_tilegen1->pf_control_r(space, 0, 0xffff); flip_screen_set(BIT(flip, 7)); m_deco_tilegen1->pf_update(NULL, NULL); bitmap.fill(0, cliprect); /* not Confirmed */ screen.priority().fill(0); m_deco_tilegen1->tilemap_2_draw(screen, bitmap, cliprect, 0, 2); m_deco_tilegen1->tilemap_1_draw(screen, bitmap, cliprect, 0, 4); return 0; }
uint32_t nwktr_state::screen_update_rscreen(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { bitmap.fill(m_palette->pen(0), cliprect); m_voodoo[1]->voodoo_update(bitmap, cliprect); const rectangle &visarea = screen.visible_area(); const rectangle tilemap_rect(visarea.min_x, visarea.max_x, visarea.min_y + 16, visarea.max_y); m_k001604->draw_front_layer(screen, bitmap, tilemap_rect); draw_7segment_led(bitmap, 3, 3, m_led_reg0); draw_7segment_led(bitmap, 9, 3, m_led_reg1); return 0; }
UINT32 ajax_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { m_k052109->tilemap_update(); screen.priority().fill(0, cliprect); bitmap.fill(m_palette->black_pen(), cliprect); m_k052109->tilemap_draw(screen, bitmap, cliprect, 2, 0, 1); if (m_priority) { /* basic layer order is B, zoom, A, F */ m_k051316->zoom_draw(screen, bitmap, cliprect, 0, 4); m_k052109->tilemap_draw(screen, bitmap, cliprect, 1, 0, 2); } else { /* basic layer order is B, A, zoom, F */ m_k052109->tilemap_draw(screen, bitmap, cliprect, 1, 0, 2); m_k051316->zoom_draw(screen, bitmap, cliprect, 0, 4); } m_k051960->k051960_sprites_draw(bitmap, cliprect, screen.priority(), -1, -1); m_k052109->tilemap_draw(screen, bitmap, cliprect, 0, 0, 0); return 0; }
UINT32 deco156_state::screen_update_wcvol95(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { //FIXME: flip_screen_x should not be written! flip_screen_set_no_update(1); screen.priority().fill(0); bitmap.fill(0); m_deco_tilegen1->pf_update(m_pf1_rowscroll, m_pf2_rowscroll); m_deco_tilegen1->tilemap_2_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0); m_sprgen->draw_sprites(bitmap, cliprect, m_spriteram.get(), 0x800); m_deco_tilegen1->tilemap_1_draw(screen, bitmap, cliprect, 0, 0); return 0; }
UINT32 hec2hrp_state::screen_update_hec2hrp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { UINT8 *videoram = m_videoram; UINT8 *videoram_HR = m_hector_videoram; if (m_hector_flag_hr==1) { if (m_hector_flag_80c==0) { screen.set_visible_area(0, 243, 0, 227); hector_hr( machine(), bitmap , &videoram_HR[0], 227, 64); } else { screen.set_visible_area(0, 243*2, 0, 227); hector_80c( machine(), bitmap , &videoram_HR[0], 227, 64); } } else { screen.set_visible_area(0, 113, 0, 75); hector_hr( machine(), bitmap, videoram, 77, 32); } return 0; }
void laserdisc_device::vblank_state_changed(screen_device &screen, bool vblank_state) { // update current track based on slider speed update_slider_pos(); // on rising edge, process previously-read frame and inform the player if (vblank_state) { // call the player's VSYNC callback player_vsync(m_metadata[m_fieldnum], m_fieldnum, machine().time()); // set a timer to begin fetching the next frame just before the VBI data would be fetched timer_set(screen.time_until_pos(16*2), TID_VBI_FETCH); } }
uint32_t deco156_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { // sprites are flipped relative to tilemaps m_sprgen->set_flip_screen(true); screen.priority().fill(0); bitmap.fill(0); m_deco_tilegen->pf_update(m_pf1_rowscroll, m_pf2_rowscroll); m_deco_tilegen->tilemap_2_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0); m_sprgen->draw_sprites(bitmap, cliprect, m_spriteram.get(), 0x800); m_deco_tilegen->tilemap_1_draw(screen, bitmap, cliprect, 0, 0); return 0; }
static UINT32 update_screen(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, int index) { vcombat_state *state = screen.machine().driver_data<vcombat_state>(); int y; const rgb_t *const pens = state->m_tlc34076->get_pens(); UINT16 *m68k_buf = state->m_m68k_framebuffer[(*state->m_framebuffer_ctrl & 0x20) ? 1 : 0]; UINT16 *i860_buf = state->m_i860_framebuffer[index][0]; /* TODO: It looks like the leftmost chunk of the ground should really be on the right side? */ /* But the i860 draws the background correctly, so it may be an original game issue. */ /* There's also some garbage in the upper-left corner. Might be related to this 'wraparound'. */ /* Or maybe it's related to the 68k's alpha? It might come from the 68k side of the house. */ for (y = cliprect.min_y; y <= cliprect.max_y; ++y) { int x; int src_addr = 256/2 * y; const UINT16 *m68k_src = &m68k_buf[src_addr]; const UINT16 *i860_src = &i860_buf[src_addr]; UINT32 *dst = &bitmap.pix32(y, cliprect.min_x); for (x = cliprect.min_x; x <= cliprect.max_x; x += 2) { int i; UINT16 m68k_pix = *m68k_src++; UINT16 i860_pix = *i860_src++; /* Draw two pixels */ for (i = 0; i < 2; ++i) { /* Vcombat's screen renders 'flopped' - very likely because VR headset displays may reflect off mirrors. Shadfgtr isn't flopped, so it's not a constant feature of the hardware. */ /* Combine the two layers */ if ((m68k_pix & 0xff) == 0) *dst++ = pens[i860_pix & 0xff]; else *dst++ = pens[m68k_pix & 0xff]; m68k_pix >>= 8; i860_pix >>= 8; } } } return 0; }
uint32_t kongambl_state::screen_update_kongambl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { #if CUSTOM_DRAW gfx_element *gfx = m_gfxdecode->gfx(0); uint32_t count; count = 0; for (int y=0;y<64;y++) { for (int x=0;x<128;x++) { uint32_t tile = m_vram[count] & 0xffff; if(m_screen->visible_area().contains(x*8, y*8)) gfx->opaque(bitmap,cliprect,tile,0,0,0,x*8,y*8); count++; } } count = 0x8000/4; for (int y=0;y<64;y++) { for (int x=0;x<128;x++) { uint32_t tile = m_vram[count] & 0xffff; if(m_screen->visible_area().contains(x*8, y*8)) gfx->transpen(bitmap,cliprect,tile,0,0,0,x*8,y*8,0); count++; } } #else bitmap.fill(0, cliprect); screen.priority().fill(0, cliprect); m_k056832->tilemap_draw(screen, bitmap, cliprect, 3, 0, 0); m_k056832->tilemap_draw(screen, bitmap, cliprect, 2, 0, 0); m_k056832->tilemap_draw(screen, bitmap, cliprect, 1, 0, 0); m_k056832->tilemap_draw(screen, bitmap, cliprect, 0, 0, 0); #endif return 0; }
UINT32 dblewing_state::screen_update_dblewing(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { address_space &space = generic_space(); UINT16 flip = m_deco_tilegen1->pf_control_r(space, 0, 0xffff); flip_screen_set(BIT(flip, 7)); m_deco_tilegen1->pf_update(m_pf1_rowscroll, m_pf2_rowscroll); bitmap.fill(0, cliprect); /* not Confirmed */ screen.priority().fill(0); m_deco_tilegen1->tilemap_2_draw(screen, bitmap, cliprect, 0, 2); m_deco_tilegen1->tilemap_1_draw(screen, bitmap, cliprect, 0, 4); m_sprgen->draw_sprites(bitmap, cliprect, m_spriteram, 0x400); return 0; }
uint32_t pktgaldx_state::screen_update_pktgaldx(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); flip_screen_set(BIT(flip, 7)); m_deco_tilegen1->pf_update(m_pf1_rowscroll, m_pf2_rowscroll); bitmap.fill(0, cliprect); /* not Confirmed */ screen.priority().fill(0); m_deco_tilegen1->tilemap_2_draw(screen, bitmap, cliprect, 0, 0); m_sprgen->draw_sprites(bitmap, cliprect, m_spriteram, 0x400, true); m_deco_tilegen1->tilemap_1_draw(screen, bitmap, cliprect, 0, 0); return 0; }
void crosshair_manager::render(screen_device &screen) { int player; for (player = 0; player < MAX_PLAYERS; player++) /* draw if visible and the right screen */ if (m_visible[player] && ((m_screen[player] == &screen) || (m_screen[player] == CROSSHAIR_SCREEN_ALL))) { /* add a quad assuming a 4:3 screen (this is not perfect) */ screen.container().add_quad(m_x[player] - 0.03f, m_y[player] - 0.04f, m_x[player] + 0.03f, m_y[player] + 0.04f, rgb_t(0xc0, m_fade, m_fade, m_fade), m_texture[player], PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA)); } }
void crosshair_render(screen_device &screen) { int player; for (player = 0; player < MAX_PLAYERS; player++) /* draw if visible and the right screen */ if (global.visible[player] && ((global.screen[player] == &screen) || (global.screen[player] == CROSSHAIR_SCREEN_ALL))) { /* add a quad assuming a 4:3 screen (this is not perfect) */ screen.container().add_quad(global.x[player] - 0.03f, global.y[player] - 0.04f, global.x[player] + 0.03f, global.y[player] + 0.04f, MAKE_ARGB(0xc0, global.fade, global.fade, global.fade), global.texture[player], PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA)); } }
static void skeetsht_scanline_update(screen_device &screen, bitmap_rgb32 &bitmap, int scanline, const tms34010_display_params *params) { skeetsht_state *state = screen.machine().driver_data<skeetsht_state>(); const rgb_t *const pens = state->m_tlc34076->get_pens(); UINT16 *vram = &state->m_tms_vram[(params->rowaddr << 8) & 0x3ff00]; UINT32 *dest = &bitmap.pix32(scanline); int coladdr = params->coladdr; int x; for (x = params->heblnk; x < params->hsblnk; x += 2) { UINT16 pixels = vram[coladdr++ & 0xff]; dest[x + 0] = pens[pixels & 0xff]; dest[x + 1] = pens[pixels >> 8]; } }
UINT32 mogura_state::screen_update_mogura(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { const rectangle &visarea = screen.visible_area(); /* tilemap layout is a bit strange ... */ rectangle clip = visarea; clip.max_x = 256 - 1; m_tilemap->set_scrollx(0, 256); m_tilemap->draw(screen, bitmap, clip, 0, 0); clip.min_x = 256; clip.max_x = 512 - 1; m_tilemap->set_scrollx(0, -128); m_tilemap->draw(screen, bitmap, clip, 0, 0); return 0; }
UINT32 sandscrp_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { bitmap.fill(0, cliprect); screen.priority().fill(0, cliprect); m_view2_0->kaneko16_prepare(bitmap, cliprect); for ( int i = 0; i < 8; i++ ) { m_view2_0->render_tilemap_chip(screen,bitmap,cliprect,i); } // copy sprite bitmap to screen m_pandora->update(bitmap, cliprect); return 0; }
UINT32 kaneko16_state::screen_update_common(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { int i; screen.priority().fill(0, cliprect); if (m_view2_0) m_view2_0->kaneko16_prepare(bitmap, cliprect); if (m_view2_1) m_view2_1->kaneko16_prepare(bitmap, cliprect); for ( i = 0; i < 8; i++ ) { if (m_view2_0) m_view2_0->render_tilemap_chip(screen,bitmap,cliprect,i); if (m_view2_1) m_view2_1->render_tilemap_chip_alt(screen,bitmap,cliprect,i, VIEW2_2_pri); } return 0; }
UINT32 jackie_state::screen_update_jackie(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { int i,j; int startclipmin = 0; const rectangle &visarea = screen.visible_area(); bitmap.fill(get_black_pen(machine()), cliprect); for (i=0;i < 0x40;i++) { m_reel1_tilemap->set_scrolly(i, m_bg_scroll[i+0x000]); m_reel2_tilemap->set_scrolly(i, m_bg_scroll[i+0x040]); m_reel3_tilemap->set_scrolly(i, m_bg_scroll[i+0x080]); } for (j=0; j < 0x100-1; j++) { rectangle clip; int rowenable = m_bg_scroll2[j]; /* draw top of screen */ clip.set(visarea.min_x, visarea.max_x, startclipmin, startclipmin+1); if (rowenable==0) { m_reel1_tilemap->draw(bitmap, clip, 0,0); } else if (rowenable==1) { m_reel2_tilemap->draw(bitmap, clip, 0,0); } else if (rowenable==2) { m_reel3_tilemap->draw(bitmap, clip, 0,0); } else if (rowenable==3) { } startclipmin+=1; } m_fg_tilemap->draw(bitmap, cliprect, 0, 0); return 0; }
UINT32 nwktr_state::screen_update_nwktr(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { device_t *voodoo = machine().device("voodoo"); bitmap.fill(machine().pens[0], cliprect); voodoo_update(voodoo, bitmap, cliprect); const rectangle &visarea = screen.visible_area(); const rectangle tilemap_rect(visarea.min_x, visarea.max_x, visarea.min_y+16, visarea.max_y); k001604_draw_front_layer(m_k001604, bitmap, tilemap_rect); draw_7segment_led(bitmap, 3, 3, m_led_reg0); draw_7segment_led(bitmap, 9, 3, m_led_reg1); return 0; }
UINT32 nwktr_state::screen_update_nwktr(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { voodoo_device *voodoo = (voodoo_device*)machine().device("voodoo0"); bitmap.fill(m_palette->pen(0), cliprect); voodoo->voodoo_update(bitmap, cliprect); const rectangle &visarea = screen.visible_area(); const rectangle tilemap_rect(visarea.min_x, visarea.max_x, visarea.min_y+16, visarea.max_y); m_k001604->draw_front_layer(screen, bitmap, tilemap_rect); draw_7segment_led(bitmap, 3, 3, m_led_reg0); draw_7segment_led(bitmap, 9, 3, m_led_reg1); return 0; }
uint32_t toobin_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { // start drawing m_mob->draw_async(cliprect); /* draw the playfield */ bitmap_ind8 &priority_bitmap = screen.priority(); priority_bitmap.fill(0, cliprect); m_playfield_tilemap->draw(screen, m_pfbitmap, cliprect, 0, 0); m_playfield_tilemap->draw(screen, m_pfbitmap, cliprect, 1, 1); m_playfield_tilemap->draw(screen, m_pfbitmap, cliprect, 2, 2); m_playfield_tilemap->draw(screen, m_pfbitmap, cliprect, 3, 3); /* draw and merge the MO */ bitmap_ind16 &mobitmap = m_mob->bitmap(); const pen_t *palette = m_palette->pens(); for (int y = cliprect.min_y; y <= cliprect.max_y; y++) { uint32_t *dest = &bitmap.pix32(y); uint16_t *mo = &mobitmap.pix16(y); uint16_t *pf = &m_pfbitmap.pix16(y); uint8_t *pri = &priority_bitmap.pix8(y); for (int x = cliprect.min_x; x <= cliprect.max_x; x++) { uint16_t pix = pf[x]; if (mo[x] != 0xffff) { /* not verified: logic is all controlled in a PAL factors: LBPRI1-0, LBPIX3, ANPIX1-0, PFPIX3, PFPRI1-0, (~LBPIX3 & ~LBPIX2 & ~LBPIX1 & ~LBPIX0) */ /* only draw if not high priority PF */ if (!pri[x] || !(pix & 8)) pix = mo[x]; } dest[x] = palette[pix]; } } /* add the alpha on top */ m_alpha_tilemap->draw(screen, bitmap, cliprect, 0, 0); return 0; }
uint32_t dec0_state::screen_update_hbarrel(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { screen.priority().fill(0,cliprect); bool flip = m_tilegen[0]->get_flip_state(); m_tilegen[0]->set_flip_screen(flip); m_tilegen[1]->set_flip_screen(flip); m_tilegen[2]->set_flip_screen(flip); m_spritegen->set_flip_screen(flip); m_tilegen[2]->deco_bac06_pf_draw(screen,bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00, 1); m_tilegen[1]->deco_bac06_pf_draw(screen,bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00, 2); /* HB always keeps pf2 on top of pf3, no need explicitly support priority register */ m_spritegen->draw_sprites(screen, bitmap, cliprect, m_gfxdecode->gfx(3), m_buffered_spriteram, 0x800/2); m_tilegen[0]->deco_bac06_pf_draw(screen,bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00, 0); return 0; }
UINT32 shadfrce_state::screen_update_shadfrce(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { screen.priority().fill(0, cliprect); if (m_video_enable) { m_bg1tilemap->draw(screen, bitmap, cliprect, 0,0); m_bg0tilemap->draw(screen, bitmap, cliprect, 0,1); draw_sprites(screen,bitmap,cliprect); m_fgtilemap->draw(screen, bitmap, cliprect, 0,0); } else { bitmap.fill(get_black_pen(machine()), cliprect); } return 0; }
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_tilegen[0]->pf_control_r(space, 0, 0xffff); uint16_t priority = m_decocomn->priority_r(); flip_screen_set(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_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_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_tilegen[1]->tilemap_12_combine_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0); switch (priority) { case 0: default: m_deco_tilegen[0]->tilemap_2_draw(screen, bitmap, cliprect, 0, 0x008); break; case 0x20: m_deco_tilegen[0]->tilemap_2_draw(screen, bitmap, cliprect, 0, 0x040); break; } /* TODO verify priorities + mixing / alpha */ mixnitroballlayer(screen,bitmap,cliprect); m_deco_tilegen[0]->tilemap_1_draw(screen, bitmap, cliprect, 0, 0); return 0; }
bool nakajies_state::screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect) { UINT8* lcd_memory_start = m_ram_base + (m_lcd_memory_start<<9); int height = screen.height(); for (int y=0; y<height; y++) for (int x=0; x<60; x++) { UINT8 data = lcd_memory_start[y*64 + x]; for (int px=0; px<8; px++) { *BITMAP_ADDR16(&bitmap, y, (x * 8) + px) = BIT(data, 7); data <<= 1; } } return 0; }
void blmbycar_state::draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect ) { UINT16 *source, *finish; source = m_spriteram + 0x6 / 2; // ! finish = m_spriteram + m_spriteram.bytes() / 2 - 8 / 2; /* Find "the end of sprites" marker */ for ( ; source < finish; source += 8 / 2 ) if (source[0] & 0x8000) break; /* Draw sprites in reverse order for pdrawfgfx */ source -= 8 / 2; finish = m_spriteram; for ( ; source >= finish; source -= 8 / 2 ) { int y = source[0]; int code = source[1]; int attr = source[2]; int x = source[3]; int flipx = attr & 0x4000; int flipy = attr & 0x8000; int pri = (~attr >> 3) & 0x1; // Priority (1 = Low) int pri_mask = ~((1 << (pri+1)) - 1); // Above the first "pri" levels if (x & 0x4000) continue; // ? To get rid of the "shadow" blocks x = (x & 0x1ff) - 0x10; y = 0xf0 - ((y & 0xff) - (y & 0x100)); m_gfxdecode->gfx(0)->prio_transpen(bitmap,cliprect, code, 0x20 + (attr & 0xf), flipx, flipy, x, y, screen.priority(), pri_mask,0); } }
UINT32 flkatck_state::screen_update_flkatck(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { rectangle clip[2]; const rectangle &visarea = screen.visible_area(); address_space &space = machine().driver_data()->generic_space(); if (m_flipscreen) { clip[0] = visarea; clip[0].max_x -= 40; clip[1] = visarea; clip[1].min_x = clip[1].max_x - 40; m_k007121_tilemap[0]->set_scrollx(0, k007121_ctrlram_r(m_k007121, space, 0) - 56 ); m_k007121_tilemap[0]->set_scrolly(0, k007121_ctrlram_r(m_k007121, space, 2)); m_k007121_tilemap[1]->set_scrollx(0, -16); } else { clip[0] = visarea; clip[0].min_x += 40; clip[1] = visarea; clip[1].max_x = 39; clip[1].min_x = 0; m_k007121_tilemap[0]->set_scrollx(0, k007121_ctrlram_r(m_k007121, space, 0) - 40 ); m_k007121_tilemap[0]->set_scrolly(0, k007121_ctrlram_r(m_k007121, space, 2)); m_k007121_tilemap[1]->set_scrollx(0, 0); } /* compute clipping */ clip[0] &= cliprect; clip[1] &= cliprect; /* draw the graphics */ m_k007121_tilemap[0]->draw(bitmap, clip[0], 0, 0); k007121_sprites_draw(m_k007121, bitmap, cliprect, machine().gfx[0], NULL, &m_k007121_ram[0x1000], 0, 40, 0, (UINT32)-1); m_k007121_tilemap[1]->draw(bitmap, clip[1], 0, 0); return 0; }
uint32_t flkatck_state::screen_update_flkatck(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { rectangle clip[2]; const rectangle &visarea = screen.visible_area(); address_space &space = machine().dummy_space(); if (m_flipscreen) { clip[0] = visarea; clip[0].max_x -= 40; clip[1] = visarea; clip[1].min_x = clip[1].max_x - 40; m_k007121_tilemap[0]->set_scrollx(0, m_k007121->ctrlram_r(space, 0) - 56 ); m_k007121_tilemap[0]->set_scrolly(0, m_k007121->ctrlram_r(space, 2)); m_k007121_tilemap[1]->set_scrollx(0, -16); } else { clip[0] = visarea; clip[0].min_x += 40; clip[1] = visarea; clip[1].max_x = 39; clip[1].min_x = 0; m_k007121_tilemap[0]->set_scrollx(0, m_k007121->ctrlram_r(space, 0) - 40 ); m_k007121_tilemap[0]->set_scrolly(0, m_k007121->ctrlram_r(space, 2)); m_k007121_tilemap[1]->set_scrollx(0, 0); } /* compute clipping */ clip[0] &= cliprect; clip[1] &= cliprect; /* draw the graphics */ m_k007121_tilemap[0]->draw(screen, bitmap, clip[0], 0, 0); m_k007121->sprites_draw(bitmap, cliprect, m_gfxdecode->gfx(0), m_gfxdecode->palette(), &m_k007121_ram[0x1000], 0, 40, 0, screen.priority(), (uint32_t)-1, true); m_k007121_tilemap[1]->draw(screen, bitmap, clip[1], 0, 0); return 0; }
uint32_t konmedal68k_state::screen_update_konmedal68k(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { static const int order[4] = { 0, 1, 3, 2 }; int enables = m_k055555->K055555_read_register(K55_INPUT_ENABLES); screen.priority().fill(0, cliprect); fill_backcolor(bitmap, cliprect, (m_k055555->K055555_read_register(0) << 9), m_k055555->K055555_read_register(1)); for (int i = 0; i < NUM_LAYERS; i++) { int layer = order[i]; if (enables & (K55_INP_VRAM_A << layer)) { m_k056832->tilemap_draw(screen, bitmap, cliprect, layer, 0, 1 << i); } } return 0; }
UINT32 kingdrby_state::screen_update_kingdrby(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { const rectangle &visarea = screen.visible_area(); rectangle clip; m_sc0_tilemap->set_scrollx(0, m_vram[0x342]); m_sc0_tilemap->set_scrolly(0, m_vram[0x341]); m_sc1_tilemap->set_scrollx(0, m_vram[0x342]); m_sc1_tilemap->set_scrolly(0, m_vram[0x341]); m_sc0w_tilemap->set_scrolly(0, 32); /* maybe it needs two window tilemaps? (one at the top, the other at the bottom)*/ clip.set(visarea.min_x, 256, 192, visarea.max_y); /*TILEMAP_DRAW_CATEGORY + TILEMAP_DRAW_OPAQUE doesn't suit well?*/ m_sc0_tilemap->draw(bitmap, cliprect, 0,0); draw_sprites(machine(),bitmap,cliprect); m_sc1_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_CATEGORY(1),0); m_sc0w_tilemap->draw(bitmap, clip, 0,0); return 0; }