void rampart_bitmap_render(mame_bitmap *bitmap, const rectangle *cliprect) { int x, y; /* update any dirty scanlines */ for (y = 0; y < ydim; y++) if (pfdirty[y]) { const UINT16 *src = &rampart_bitmap[256 * y]; UINT8 scanline[512]; UINT8 *dst = scanline; /* regenerate the line */ for (x = 0; x < xdim / 2; x++) { int bits = *src++; *dst++ = bits >> 8; *dst++ = bits; } pfdirty[y] = 0; /* draw it */ draw_scanline8(pfbitmap, 0, y, xdim, scanline, Machine->pens, -1); } /* copy the cached bitmap */ copybitmap(bitmap, pfbitmap, 0, 0, 0, 0, cliprect, TRANSPARENCY_NONE, 0); }
void apexc_state::apexc_teletyper_linefeed() { UINT8 buf[teletyper_window_width]; int y; for (y=teletyper_window_offset_y; y<teletyper_window_offset_y+teletyper_window_height-teletyper_scroll_step; y++) { extract_scanline8(*m_bitmap, teletyper_window_offset_x, y+teletyper_scroll_step, teletyper_window_width, buf); draw_scanline8(*m_bitmap, teletyper_window_offset_x, y, teletyper_window_width, buf, m_palette->pens()); } m_bitmap->fill(0, teletyper_scroll_clear_window); }
static void pdp1_typewriter_linefeed(void) { UINT8 buf[typewriter_window_width]; int y; for (y=0; y<typewriter_window_height-typewriter_scroll_step; y++) { extract_scanline8(typewriter_bitmap, 0, y+typewriter_scroll_step, typewriter_window_width, buf); draw_scanline8(typewriter_bitmap, 0, y, typewriter_window_width, buf, Machine->pens, -1); } fillbitmap(typewriter_bitmap, Machine->pens[pen_typewriter_bg], &typewriter_scroll_clear_window); }
void tx0_state::tx0_typewriter_linefeed() { UINT8 buf[typewriter_window_width]; int y; for (y=0; y<typewriter_window_height-typewriter_scroll_step; y++) { extract_scanline8(m_typewriter_bitmap, 0, y+typewriter_scroll_step, typewriter_window_width, buf); draw_scanline8(m_typewriter_bitmap, 0, y, typewriter_window_width, buf, m_palette->pens()); } const rectangle typewriter_scroll_clear_window(0, typewriter_window_width-1, typewriter_window_height-typewriter_scroll_step, typewriter_window_height-1); m_typewriter_bitmap.fill(pen_typewriter_bg, typewriter_scroll_clear_window); }
uint32_t balsente_state::screen_update_balsente(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { const pen_t *pens = &m_palette->pen(m_palettebank_vis * 256); int y, i; /* draw scanlines from the VRAM directly */ for (y = cliprect.min_y; y <= cliprect.max_y; y++) draw_scanline8(bitmap, 0, y, 256, &m_expanded_videoram[(y - BALSENTE_VBEND) * 256], pens); /* draw the sprite images */ for (i = 0; i < 40; i++) draw_one_sprite(bitmap, cliprect, &m_spriteram[(0xe0 + i * 4) & 0xff]); return 0; }
static void tx0_typewriter_linefeed(running_machine &machine) { tx0_state *state = machine.driver_data<tx0_state>(); UINT8 buf[typewriter_window_width]; int y; for (y=0; y<typewriter_window_height-typewriter_scroll_step; y++) { extract_scanline8(state->m_typewriter_bitmap, 0, y+typewriter_scroll_step, typewriter_window_width, buf); draw_scanline8(state->m_typewriter_bitmap, 0, y, typewriter_window_width, buf, machine.pens); } const rectangle typewriter_scroll_clear_window(0, typewriter_window_width-1, typewriter_window_height-typewriter_scroll_step, typewriter_window_height-1); state->m_typewriter_bitmap.fill(pen_typewriter_bg, typewriter_scroll_clear_window); }
//! update the internal frame buffer and draw the scanline segment if changed void alto2_cpu_device::update_framebuf_word(uint16_t* framebuf, int x, int y, uint16_t word) { if (y >= A2_DISP_TOTAL_HEIGHT) return; int xpword = (m_dsp.xpreg ^ 01777) / 16; // mixing with the cursor if (x == xpword++) word ^= (m_dsp.csr << (m_dsp.xpreg % 16)) >> 16; if (x == xpword) word ^= (m_dsp.csr << (m_dsp.xpreg % 16)) & 0xffff; // no change? if (word == framebuf[x]) return; framebuf[x] = word; draw_scanline8(*m_dsp.bitmap, x * 16, y, 16, m_dsp.patterns + 16 * word, nullptr); }
static void draw_background(mame_bitmap *bitmap) { register int offs, x, y; UINT8 scanline[288]; // copy the background image from RAM (0x190200-0x19FDFF) to bitmap if (bitmapflip) { offs = 0xFDFE/2; for (y = 0; y < 224; y++) { for (x = 0; x < 288; x+=2) { UINT16 data = toypop_bg_image[offs]; scanline[x] = data; scanline[x+1] = data >> 8; offs--; } draw_scanline8(bitmap, 0, y, 288, scanline, &Machine->pens[0x60 + 0x80*palettebank], -1); } } else {
uint32_t gridlee_state::screen_update_gridlee(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { const pen_t *pens = &m_palette->pen(m_palettebank_vis * 32); uint8_t *gfx; int x, y, i; /* draw scanlines from the VRAM directly */ for (y = cliprect.min_y; y <= cliprect.max_y; y++) { /* non-flipped: draw directly from the bitmap */ if (!m_cocktail_flip) draw_scanline8(bitmap, 0, y, 256, &m_local_videoram[(y - GRIDLEE_VBEND) * 256], pens + 16); /* flipped: x-flip the scanline into a temp buffer and draw that */ else { int srcy = GRIDLEE_VBSTART - 1 - y; uint8_t temp[256]; int xx; for (xx = 0; xx < 256; xx++) temp[xx] = m_local_videoram[srcy * 256 + 255 - xx]; draw_scanline8(bitmap, 0, y, 256, temp, pens + 16); } } /* draw the sprite images */ gfx = memregion("gfx1")->base(); for (i = 0; i < 32; i++) { uint8_t *sprite = m_spriteram + i * 4; uint8_t *src; int image = sprite[0]; int ypos = sprite[2] + 17 + GRIDLEE_VBEND; int xpos = sprite[3]; /* get a pointer to the source image */ src = &gfx[64 * image]; /* loop over y */ for (y = 0; y < 16; y++, ypos = (ypos + 1) & 255) { int currxor = 0; /* adjust for flip */ if (m_cocktail_flip) { ypos = 271 - ypos; currxor = 0xff; } if (ypos >= (16 + GRIDLEE_VBEND) && ypos >= cliprect.min_y && ypos <= cliprect.max_y) { int currx = xpos; /* loop over x */ for (x = 0; x < 4; x++) { int ipixel = *src++; int left = ipixel >> 4; int right = ipixel & 0x0f; /* left pixel */ if (left && currx >= 0 && currx < 256) bitmap.pix16(ypos, currx ^ currxor) = pens[left]; currx++; /* right pixel */ if (right && currx >= 0 && currx < 256) bitmap.pix16(ypos, currx ^ currxor) = pens[right]; currx++; } } else src += 4; /* de-adjust for flip */ if (m_cocktail_flip) ypos = 271 - ypos; }