void blstroid_scanline_update(screen_device &screen, int scanline) { blstroid_state *state = screen.machine().driver_data<blstroid_state>(); int offset = (scanline / 8) * 64 + 40; /* check for interrupts */ if (offset < 0x1000) if (state->m_playfield[offset] & 0x8000) { int width, vpos; attotime period_on; attotime period_off; /* FIXME: - the only thing this IRQ does it tweak the starting MO link */ /* unfortunately, it does it too early for the given MOs! */ /* perhaps it is not actually hooked up on the real PCB... */ return; /* set a timer to turn the interrupt on at HBLANK of the 7th scanline */ /* and another to turn it off one scanline later */ width = screen.width(); vpos = screen.vpos(); period_on = screen.time_until_pos(vpos + 7, width * 0.9); period_off = screen.time_until_pos(vpos + 8, width * 0.9); screen.machine().scheduler().timer_set(period_on, FUNC(irq_on)); screen.machine().scheduler().timer_set(period_off, FUNC(irq_off)); } }
static UINT32 update_screen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int xoffs, device_t *tc0100scn) { UINT8 layer[3], nodraw; tc0100scn_tilemap_update(tc0100scn); layer[0] = tc0100scn_bottomlayer(tc0100scn); layer[1] = layer[0] ^ 1; layer[2] = 2; /* Clear priority bitmap */ screen.machine().priority_bitmap.fill(0, cliprect); /* chip 0 does tilemaps on the left, chip 1 does the ones on the right */ // draw bottom layer nodraw = tc0100scn_tilemap_draw(tc0100scn, bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 0); /* left */ /* Ensure screen blanked even when bottom layers not drawn due to disable bit */ if (nodraw) bitmap.fill(get_black_pen(screen.machine()), cliprect); // draw middle layer tc0100scn_tilemap_draw(tc0100scn, bitmap, cliprect, layer[1], 0, 1); /* Sprites can be under/over the layer below text layer */ draw_sprites(screen.machine(), bitmap, cliprect, xoffs, 8); // draw sprites // draw top(text) layer tc0100scn_tilemap_draw(tc0100scn, bitmap, cliprect, layer[2], 0, 0); return 0; }
void vsystem_spr_device::draw_sprites( UINT16* spriteram, int spriteram_bytes, screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int prihack_mask, int prihack_val ) { int offs; int end = 0; // find the end of the list for (offs = 0; offs < (spriteram_bytes / 16 ); offs++) { if (spriteram[offs] & 0x4000) break; } end = offs; // decide our drawing order (if we're using pdrawgfx we must go in reverse) int first, last, inc; if (m_pdraw) { first = end - 1; last = -1; inc = -1; } else { first = 0; last = end; inc = 1; } // draw offs = first; while (offs != last) { if ((spriteram[offs] & 0x8000) == 0x0000) { int attr_start; attr_start = 4 * (spriteram[offs] & 0x03ff); get_sprite_attributes(&spriteram[attr_start]); curr_sprite.color &= m_pal_mask; // hack for aero fighters and other which still call us multiple times with different priorities instead of using the pdrawgfx version if (prihack_mask != -1) { if ((curr_sprite.pri & prihack_mask) == prihack_val) common_sprite_drawgfx(screen.machine(), bitmap, cliprect, screen.priority()); } else { common_sprite_drawgfx(screen.machine(), bitmap, cliprect, screen.priority()); } } offs+=inc; } }
static void scanline_update(screen_device &screen, int scanline) { address_space *space = screen.machine().device("audiocpu")->memory().space(AS_PROGRAM); /* sound IRQ is on 32V */ if (scanline & 32) atarigen_6502_irq_ack_r(space, 0); else if (!(input_port_read(screen.machine(), "FE4000") & 0x40)) atarigen_6502_irq_gen(screen.machine().device("audiocpu")); }
UINT32 pc1251_state::screen_update_pc1251(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { int x, y, i, j; int color[2]; running_machine &machine = screen.machine(); bitmap.fill(11, cliprect); /* HJB: we cannot initialize array with values from other arrays, thus... */ color[0] = 7; //pocketc_colortable[PC1251_CONTRAST][0]; color[1] = 8; //pocketc_colortable[PC1251_CONTRAST][1]; for (x=RIGHT,y=DOWN, i=0; i<60; x+=3) { for (j=0; j<5; j++, i++, x+=3) drawgfx_opaque(bitmap, cliprect, screen.machine().gfx[0], m_reg[i], PC1251_CONTRAST,0,0, x,y); } for (i=0x7b; i>=0x40; x+=3) { for (j=0; j<5; j++, i--, x+=3) drawgfx_opaque(bitmap, cliprect, screen.machine().gfx[0], m_reg[i], PC1251_CONTRAST,0,0, x,y); } pocketc_draw_special(bitmap, RIGHT+134, DOWN-10, de, m_reg[0x3c] & 0x08 ? color[1] : color[0]); pocketc_draw_special(bitmap, RIGHT+142, DOWN-10, g, m_reg[0x3c] & 0x04 ? color[1] : color[0]); pocketc_draw_special(bitmap, RIGHT+146, DOWN-10, rad, m_reg[0x3d] & 0x04 ? color[1] : color[0]); pocketc_draw_special(bitmap, RIGHT+18, DOWN-10, def, m_reg[0x3c] & 0x01 ? color[1] : color[0]); pocketc_draw_special(bitmap, RIGHT, DOWN-10, shift, m_reg[0x3d] & 0x02 ? color[1] : color[0]); pocketc_draw_special(bitmap, RIGHT+38, DOWN-10, pro, m_reg[0x3e] & 0x01 ? color[1] : color[0]); pocketc_draw_special(bitmap, RIGHT+53, DOWN-10, run, m_reg[0x3e] & 0x02 ? color[1] : color[0]); pocketc_draw_special(bitmap, RIGHT+68, DOWN-10, rsv, m_reg[0x3e] & 0x04 ? color[1] : color[0]); /* 0x3c 1 def?, 4 g, 8 de 0x3d 2 shift, 4 rad, 8 error 0x3e 1 pro?, 2 run?, 4rsv?*/ return 0; }
static void on_vblank(running_machine &machine, screen_device &screen, bool vblank_state) { /* VBLANK starting */ if (vblank_state && watchdog_enabled) { /* check the watchdog */ if (screen.machine().config().m_watchdog_vblank_count != 0) { watchdog_counter = watchdog_counter - 1; if (watchdog_counter == 0) watchdog_callback(screen.machine(), NULL, 0); } } }
UINT32 paradise_state::screen_update_paradise(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { int layers_ctrl = -1; #ifdef MAME_DEBUG if (machine().input().code_pressed(KEYCODE_Z)) { int mask = 0; if (machine().input().code_pressed(KEYCODE_Q)) mask |= 1; if (machine().input().code_pressed(KEYCODE_W)) mask |= 2; if (machine().input().code_pressed(KEYCODE_E)) mask |= 4; if (machine().input().code_pressed(KEYCODE_R)) mask |= 8; if (machine().input().code_pressed(KEYCODE_A)) mask |= 16; if (mask != 0) layers_ctrl &= mask; } #endif bitmap.fill(get_black_pen(machine()), cliprect); if (!(m_priority & 4)) /* Screen blanking */ return 0; if (m_priority & 1) if (layers_ctrl & 16) draw_sprites(screen.machine(), bitmap, cliprect); if (layers_ctrl & 1) m_tilemap_0->draw(bitmap, cliprect, 0, 0); if (layers_ctrl & 2) m_tilemap_1->draw(bitmap, cliprect, 0, 0); if (layers_ctrl & 4) copybitmap_trans(bitmap, m_tmpbitmap, flip_screen(), flip_screen(), 0, 0, cliprect, 0x80f); if (m_priority & 2) { if (!(m_priority & 1)) if (layers_ctrl & 16) draw_sprites(screen.machine(), bitmap, cliprect); if (layers_ctrl & 8) m_tilemap_2->draw(bitmap, cliprect, 0, 0); } else { if (layers_ctrl & 8) m_tilemap_2->draw(bitmap, cliprect, 0, 0); if (!(m_priority & 1)) if (layers_ctrl & 16) draw_sprites(screen.machine(), bitmap, cliprect); } 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 = tlc34076_get_pens(screen.machine().device("tlc34076")); 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; }
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 = tlc34076_get_pens(screen.machine().device("tlc34076")); 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]; } }
static void amerdart_scanline(screen_device &screen, bitmap_rgb32 &bitmap, int scanline, const tms34010_display_params *params) { coolpool_state *state = screen.machine().driver_data<coolpool_state>(); UINT16 *vram = &state->m_vram_base[(params->rowaddr << 8) & 0xff00]; UINT32 *dest = &bitmap.pix32(scanline); rgb_t pens[16]; int coladdr = params->coladdr; int x; /* update the palette */ if (scanline < 256) for (x = 0; x < 16; x++) { UINT16 pal = state->m_vram_base[x]; pens[x] = MAKE_RGB(pal4bit(pal >> 4), pal4bit(pal >> 8), pal4bit(pal >> 12)); } for (x = params->heblnk; x < params->hsblnk; x += 4) { UINT16 pixels = vram[coladdr++ & 0xff]; dest[x + 0] = pens[(pixels >> 0) & 15]; dest[x + 1] = pens[(pixels >> 4) & 15]; dest[x + 2] = pens[(pixels >> 8) & 15]; dest[x + 3] = pens[(pixels >> 12) & 15]; } }
static void alpha_row_update(screen_device &screen, int scanline) { skullxbo_state *state = screen.machine().driver_data<skullxbo_state>(); UINT16 *check = &state->m_alpha[(scanline / 8) * 64 + 42]; /* check for interrupts in the alpha ram */ /* the interrupt occurs on the HBLANK of the 6th scanline following */ if (check < &state->m_alpha[0x7c0] && (*check & 0x8000)) { int width = screen.width(); attotime period = screen.time_until_pos(screen.vpos() + 6, width * 0.9); screen.machine().scheduler().timer_set(period, FUNC(irq_gen)); } /* update the playfield and motion objects */ skullxbo_scanline_update(screen.machine(), scanline); }
void badlands_state::scanline_update(screen_device &screen, int scanline) { address_space &space = subdevice("audiocpu")->memory().space(AS_PROGRAM); /* sound IRQ is on 32V */ if (scanline & 32) m6502_irq_ack_r(space, 0); else if (!(ioport("FE4000")->read() & 0x40)) m6502_irq_gen(*screen.machine().device("audiocpu")); }
void device_execute_interface::static_on_vblank(screen_device &screen, void *param, bool vblank_state) { // VBLANK starting if (vblank_state) { device_execute_interface *exec = NULL; for (bool gotone = screen.machine().m_devicelist.first(exec); gotone; gotone = exec->next(exec)) exec->on_vblank_start(screen); } }
bool mm1_state::screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect) { /* text */ i8275_update(m_crtc, &bitmap, &cliprect); copybitmap(&bitmap, screen.machine().generic.tmpbitmap, 0, 0, 0, 0, &cliprect); /* graphics */ m_hgdc->update_screen(&bitmap, &cliprect); return 0; }
UINT32 faceoffh_state::screen_update( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect ) { // NMI on coin-in? UINT8 coin = (~ioport("INPUTS")->read()) & 0x03; m_audiocpu->set_input_line(INPUT_LINE_NMI, coin ? ASSERT_LINE : CLEAR_LINE); // Play the digitalker samples (it's not hooked up yet) static UINT8 sample = 0, bank = 0; if (screen.machine().input().code_pressed_once(KEYCODE_Q)) --bank; if (screen.machine().input().code_pressed_once(KEYCODE_W)) ++bank; bank %= 3; digitalker_set_bank(bank); if (screen.machine().input().code_pressed_once(KEYCODE_A)) --sample; if (screen.machine().input().code_pressed_once(KEYCODE_S)) ++sample; if (screen.machine().input().code_pressed_once(KEYCODE_Z)) { m_digitalker->digitalker_0_cms_w(CLEAR_LINE); m_digitalker->digitalker_0_cs_w(CLEAR_LINE); address_space &space = m_audiocpu->space(AS_PROGRAM); m_digitalker->digitalker_data_w(space, 0, sample, 0xff); m_digitalker->digitalker_0_wr_w(ASSERT_LINE); m_digitalker->digitalker_0_wr_w(CLEAR_LINE); m_digitalker->digitalker_0_wr_w(ASSERT_LINE); } popmessage("COIN: %02X VIAB: %02X\nCOUNT: %02X %02X LEDS: %02X\nSAMPLE: %02X (B%X)", m_coin, m_port_b, (m_shift >> 16) & 0xff, (m_shift >> 8) & 0xff, (m_shift >> 0) & 0xff, // 2 x 7-seg, 3 leds sample, bank ); return 0; }
void atarig1_scanline_update(screen_device &screen, int scanline) { atarig1_state *state = screen.machine().driver_data<atarig1_state>(); UINT16 *base = &state->m_alpha[(scanline / 8) * 64 + 48]; int i; //if (scanline == 0) logerror("-------\n"); /* keep in range */ if (base >= &state->m_alpha[0x800]) return; screen.update_partial(MAX(scanline - 1, 0)); /* update the playfield scrolls */ for (i = 0; i < 8; i++) { UINT16 word; /* first word controls horizontal scroll */ word = *base++; if (word & 0x8000) { int newscroll = ((word >> 6) + state->m_pfscroll_xoffset) & 0x1ff; if (newscroll != state->m_playfield_xscroll) { screen.update_partial(MAX(scanline + i - 1, 0)); tilemap_set_scrollx(state->m_playfield_tilemap, 0, newscroll); state->m_playfield_xscroll = newscroll; } } /* second word controls vertical scroll and tile bank */ word = *base++; if (word & 0x8000) { int newscroll = ((word >> 6) - (scanline + i)) & 0x1ff; int newbank = word & 7; if (newscroll != state->m_playfield_yscroll) { screen.update_partial(MAX(scanline + i - 1, 0)); tilemap_set_scrolly(state->m_playfield_tilemap, 0, newscroll); state->m_playfield_yscroll = newscroll; } if (newbank != state->m_playfield_tile_bank) { screen.update_partial(MAX(scanline + i - 1, 0)); tilemap_mark_all_tiles_dirty(state->m_playfield_tilemap); state->m_playfield_tile_bank = newbank; } }
static int get_lightgun_pos(screen_device &screen, int player, int *x, int *y) { const rectangle &visarea = screen.visible_area(); int xpos = screen.machine().root_device().ioport((player == 0) ? "GUN1X" : "GUN2X")->read_safe(0xffffffff); int ypos = screen.machine().root_device().ioport((player == 0) ? "GUN1Y" : "GUN2Y")->read_safe(0xffffffff); if (xpos == -1 || ypos == -1) return FALSE; *x = visarea.min_x + xpos * visarea.width() / 255; *y = visarea.min_y + ypos * visarea.height() / 255; return TRUE; }
static void animate(running_machine &machine, screen_device &device, bool vblank_state) { int player; /* only animate once per frame, when vblank_state is 1 */ if (!vblank_state) return; /* increment animation counter */ global.animation_counter += 0x08; /* compute a fade factor from the current animation value */ if (global.animation_counter < 0x80) global.fade = 0xa0 + (0x60 * ( global.animation_counter & 0x7f) / 0x80); else global.fade = 0xa0 + (0x60 * (~global.animation_counter & 0x7f) / 0x80); for (player = 0; player < MAX_PLAYERS; player++) { /* read all the lightgun values */ if (global.used[player]) device.machine().ioport().crosshair_position(player, global.x[player], global.y[player]); /* auto visibility */ if (global.mode[player] == CROSSHAIR_VISIBILITY_AUTO) { if ((global.x[player] != global.last_x[player]) || (global.y[player] != global.last_y[player])) { /* crosshair has moved, keep crosshair visible */ global.visible[player] = TRUE; global.last_x[player] = global.x[player]; global.last_y[player] = global.y[player]; global.time[player] = 0; } else { /* see if the player has been motionless for time specified */ /* slightly confusing formula, but the effect is: */ /* auto_time = 0 makes the crosshair barely visible while moved */ /* every increment in auto_time is about .2s at 60Hz */ if (global.time[player] > global.auto_time * 12 + 2) /* time exceeded so turn crosshair invisible */ global.visible[player] = FALSE; /* increment player visibility time */ global.time[player]++; } } } }
void lethalj_scanline_update(screen_device &screen, bitmap_ind16 &bitmap, int scanline, const tms34010_display_params *params) { lethalj_state *state = screen.machine().driver_data<lethalj_state>(); UINT16 *src = &state->m_screenram[(state->m_vispage << 17) | ((params->rowaddr << 9) & 0x3fe00)]; UINT16 *dest = &bitmap.pix16(scanline); int coladdr = params->coladdr << 1; int x; /* blank palette: fill with white */ if (state->m_blank_palette) { for (x = params->heblnk; x < params->hsblnk; x++) dest[x] = 0x7fff; if (scanline == screen.visible_area().max_y) state->m_blank_palette = 0; return; } /* copy the non-blanked portions of this scanline */ for (x = params->heblnk; x < params->hsblnk; x++) dest[x] = src[coladdr++ & 0x1ff] & 0x7fff; }
static void scanline_update(screen_device &screen, int scanline) { /* generate 32V signals */ if ((scanline & 32) == 0 && !(screen.machine().root_device().ioport("P1")->read() & 0x800)) atarigen_scanline_int_gen(screen.machine().device("maincpu")); }
UINT32 pc1401_state::screen_update_pc1401(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { running_machine &machine = screen.machine(); int x, y, i, j; int color[2]; bitmap.fill(11, cliprect); #if 0 /* HJB: we cannot initialize array with values from other arrays, thus... */ color[0] = pocketc_colortable[CONTRAST][0]; color[1] = pocketc_colortable[CONTRAST][1]; #endif /* Above can be unreadable or misleading at certain contrast settings, this is better */ color[0] = 7; color[1] = 8; if (m_portc&1) { for (x=RIGHT,y=DOWN,i=0; i<0x28;x+=2) { for (j=0; j<5;j++,i++,x+=2) drawgfx_opaque(bitmap, cliprect, screen.machine().gfx[0], m_reg[i],CONTRAST,0,0,x,y); } for (i=0x67; i>=0x40;x+=2) { for (j=0; j<5;j++,i--,x+=2) drawgfx_opaque(bitmap, cliprect, screen.machine().gfx[0], m_reg[i],CONTRAST,0,0,x,y); } } pocketc_draw_special(bitmap, RIGHT+149, DOWN+24, line, m_reg[0x3c] & 0x08 ? color[1] : color[0]); pocketc_draw_special(bitmap, RIGHT, DOWN-10, busy, m_reg[0x3d] & 0x01 ? color[1] : color[0]); pocketc_draw_special(bitmap, RIGHT+18, DOWN-10, def, m_reg[0x3d] & 0x02 ? color[1] : color[0]); pocketc_draw_special(bitmap, RIGHT+43, DOWN-10,shift, m_reg[0x3d] & 0x04 ? color[1] : color[0]); pocketc_draw_special(bitmap, RIGHT+63, DOWN-10,hyp, m_reg[0x3d] & 0x08 ? color[1] : color[0]); pocketc_draw_special(bitmap, RIGHT+38, DOWN+24,line, m_reg[0x3d] & 0x10 ? color[1] : color[0]); pocketc_draw_special(bitmap, RIGHT+23, DOWN+24,line, m_reg[0x3d] & 0x20 ? color[1] : color[0]); pocketc_draw_special(bitmap, RIGHT+8, DOWN+24,line, m_reg[0x3d] & 0x40 ? color[1] : color[0]); pocketc_draw_special(bitmap, RIGHT+183, DOWN-10,e, m_reg[0x7c] & 0x01 ? color[1] : color[0]); pocketc_draw_special(bitmap, RIGHT+176, DOWN-10,m, m_reg[0x7c] & 0x02 ? color[1] : color[0]); pocketc_draw_special(bitmap, RIGHT+168, DOWN-10,braces, m_reg[0x7c] & 0x04 ? color[1] : color[0]); pocketc_draw_special(bitmap, RIGHT+138, DOWN-10,rad, m_reg[0x7c] & 0x08 ? color[1] : color[0]); pocketc_draw_special(bitmap, RIGHT+134, DOWN-10,g, m_reg[0x7c] & 0x10 ? color[1] : color[0]); pocketc_draw_special(bitmap, RIGHT+126, DOWN-10,de, m_reg[0x7c] & 0x20 ? color[1] : color[0]); pocketc_draw_special(bitmap, RIGHT+165, DOWN+24,line, m_reg[0x7c] & 0x40 ? color[1] : color[0]); /* 603c: 3 STAT 603d: 0 BUSY, 1 DEF, 2 SHIFT, 3 HYP, 4 PRO, 5 RUN, 6 CAL 607c: 0 E, 1 M, 2 (), 3 RAD, 4 G, 5 DE, 6 PRINT */ return 0; }
UINT32 itgamble_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { bitmap.fill(get_black_pen(screen.machine())); return 0; }
void batman_scanline_update(screen_device &screen, int scanline) { batman_state *state = screen.machine().driver_data<batman_state>(); /* update the scanline parameters */ if (scanline <= screen.visible_area().max_y && state->m_atarivc_state.rowscroll_enable) { UINT16 *base = &state->m_alpha[scanline / 8 * 64 + 48]; int scan, i; for (scan = 0; scan < 8; scan++, scanline++) for (i = 0; i < 2; i++) { int data = *base++; switch (data & 15) { case 9: if (scanline > 0) screen.update_partial(scanline - 1); state->m_atarivc_state.mo_xscroll = (data >> 7) & 0x1ff; atarimo_set_xscroll(0, state->m_atarivc_state.mo_xscroll); break; case 10: if (scanline > 0) screen.update_partial(scanline - 1); state->m_atarivc_state.pf1_xscroll_raw = (data >> 7) & 0x1ff; atarivc_update_pf_xscrolls(state); tilemap_set_scrollx(state->m_playfield_tilemap, 0, state->m_atarivc_state.pf0_xscroll); tilemap_set_scrollx(state->m_playfield2_tilemap, 0, state->m_atarivc_state.pf1_xscroll); break; case 11: if (scanline > 0) screen.update_partial(scanline - 1); state->m_atarivc_state.pf0_xscroll_raw = (data >> 7) & 0x1ff; atarivc_update_pf_xscrolls(state); tilemap_set_scrollx(state->m_playfield_tilemap, 0, state->m_atarivc_state.pf0_xscroll); break; case 13: if (scanline > 0) screen.update_partial(scanline - 1); state->m_atarivc_state.mo_yscroll = (data >> 7) & 0x1ff; atarimo_set_yscroll(0, state->m_atarivc_state.mo_yscroll); break; case 14: if (scanline > 0) screen.update_partial(scanline - 1); state->m_atarivc_state.pf1_yscroll = (data >> 7) & 0x1ff; tilemap_set_scrolly(state->m_playfield2_tilemap, 0, state->m_atarivc_state.pf1_yscroll); break; case 15: if (scanline > 0) screen.update_partial(scanline - 1); state->m_atarivc_state.pf0_yscroll = (data >> 7) & 0x1ff; tilemap_set_scrolly(state->m_playfield_tilemap, 0, state->m_atarivc_state.pf0_yscroll); break; } } }
static void scanline_update(screen_device &screen, int scanline) { /* generate 32V signals */ if ((scanline & 32) == 0) atarigen_scanline_int_gen(screen.machine().device("maincpu")); }