Exemple #1
0
void comx_clm_device::crtc_update_row(mc6845_device *device, bitmap_rgb32 &bitmap, const rectangle &cliprect, UINT16 ma, UINT8 ra, UINT16 y, UINT8 x_count, INT8 cursor_x, void *param)
{
	const rgb_t *palette = palette_entry_list_raw(bitmap.palette());
	for (int column = 0; column < x_count; column++)
	{
		UINT8 code = m_video_ram[((ma + column) & 0x7ff)];
		UINT16 addr = (code << 3) | (ra & 0x07);
		UINT8 data = m_char_rom[addr & 0x7ff];

		if (BIT(ra, 3) && column == cursor_x)
		{
			data = 0xff;
		}

		for (int bit = 0; bit < 8; bit++)
		{
			int x = (column * 8) + bit;
			int color = BIT(data, 7) ? 7 : 0;

			bitmap.pix32(y, x) = palette[color];

			data <<= 1;
		}
	}
}
Exemple #2
0
void k001604_device::draw_back_layer( bitmap_rgb32 &bitmap, const rectangle &cliprect )
{
	bitmap.fill(0, cliprect);

	if ((m_reg[0x60 / 4] & 0x40000000) == 0)
		return;

	int tile_size = m_roz_size ? 16 : 8;

	INT32 x  = (INT16)((m_reg[0x08] >> 16) & 0xffff);
	INT32 y  = (INT16)((m_reg[0x08] >>  0) & 0xffff);
	INT32 xx = (INT16)((m_reg[0x09] >>  0) & 0xffff);
	INT32 xy = (INT16)((m_reg[0x09] >> 16) & 0xffff);
	INT32 yx = (INT16)((m_reg[0x0a] >>  0) & 0xffff);
	INT32 yy = (INT16)((m_reg[0x0a] >> 16) & 0xffff);

	int pivotx = (INT16)((m_reg[0x00] >> 16) & 0xffff);
	int pivoty = (INT16)((m_reg[0x00] >>  0) & 0xffff);

	int startx  = ((x - pivotx) * 256) * 32;
	int starty  = ((y - pivoty) * 256) * 32;
	int incxx = (xx) * 32;
	int incxy = (-xy) * 32;
	int incyx = (-yx) * 32;
	int incyy = (yy) * 32;

	bitmap_ind16& pixmap = m_layer_roz->pixmap();

	// extract start/end points
	int sx = cliprect.min_x;
	int sy = cliprect.min_y;
	int ex = cliprect.max_x;
	int ey = cliprect.max_y;

	const rgb_t *clut = bitmap.palette()->entry_list_raw();

	int window_x, window_y, window_xmask, window_ymask;

	int layer_size = (m_reg[0x1b] >> 9) & 3;

	if (m_roz_size)
		window_x = ((m_reg[0x1b] >> 1) & 3) * 512;
	else
Exemple #3
0
UINT32 malzak_state::screen_update_malzak(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
    const rgb_t *palette = bitmap.palette()->entry_list_raw();
    int sx, sy;
    int x,y;

    bitmap.fill(rgb_t::black);

    m_trom->screen_update(screen, bitmap, cliprect);

    // playfield - not sure exactly how this works...
    for (x = 0; x < 16; x++)
        for (y = 0; y < 16; y++)
        {
            sx = ((x * 16 - 48) - m_malzak_x) * 2;
            sy = ((y * 16) - m_malzak_y) * 2;

            if (sx < -271*2)
                sx += 512*2;
            if (sx < -15*2)
                sx += 256*2;

            m_gfxdecode->gfx(0)->zoom_transpen(m_palette,bitmap,cliprect, m_playfield_code[x * 16 + y], 2, 0, 0, sx, sy, 0x20000, 0x20000, 0);
        }

    /* update the S2636 chips */
    bitmap_ind16 &s2636_0_bitmap = m_s2636_0->update(cliprect);
    bitmap_ind16 &s2636_1_bitmap = m_s2636_1->update(cliprect);

    /* copy the S2636 images into the main bitmap */
    {
        int y;

        for (y = cliprect.min_y; y <= cliprect.max_y / 2; y++)
        {
            int x;

            for (x = cliprect.min_x; x <= cliprect.max_x / 2; x++)
            {
                int pixel0 = s2636_0_bitmap.pix16(y, x);
                int pixel1 = s2636_1_bitmap.pix16(y, x);

                if (S2636_IS_PIXEL_DRAWN(pixel0)) {
                    bitmap.pix32(y*2, x*2) = palette[S2636_PIXEL_COLOR(pixel0)];
                    bitmap.pix32(y*2+1, x*2) = palette[S2636_PIXEL_COLOR(pixel0)];
                    bitmap.pix32(y*2, x*2+1) = palette[S2636_PIXEL_COLOR(pixel0)];
                    bitmap.pix32(y*2+1, x*2+1) = palette[S2636_PIXEL_COLOR(pixel0)];
                }

                if (S2636_IS_PIXEL_DRAWN(pixel1)) {
                    bitmap.pix32(y*2, x*2) = palette[S2636_PIXEL_COLOR(pixel1)];
                    bitmap.pix32(y*2+1, x*2) = palette[S2636_PIXEL_COLOR(pixel1)];
                    bitmap.pix32(y*2, x*2+1) = palette[S2636_PIXEL_COLOR(pixel1)];
                    bitmap.pix32(y*2+1, x*2+1) = palette[S2636_PIXEL_COLOR(pixel1)];
                }
            }
        }
    }

    return 0;
}