Exemple #1
0
UINT32 galaxi_state::screen_update_galaxi(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
	m_bg3_tmap->set_scrollx(m_bg3_xscroll);
	m_bg3_tmap->set_scrolly(m_bg3_yscroll);

	int layers_ctrl = -1;

#ifdef MAME_DEBUG
	if (machine().input().code_pressed(KEYCODE_R))  // remapped due to inputs changes.
	{
		int msk = 0;
		if (machine().input().code_pressed(KEYCODE_T))  msk |= 1;
		if (machine().input().code_pressed(KEYCODE_Y))  msk |= 2;
		if (machine().input().code_pressed(KEYCODE_U))  msk |= 4;
		if (machine().input().code_pressed(KEYCODE_I))  msk |= 8;
		if (machine().input().code_pressed(KEYCODE_O))  msk |= 16;
		if (msk != 0) layers_ctrl &= msk;
	}
#endif


	if (layers_ctrl & 1)    m_bg1_tmap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
	else                bitmap.fill(m_palette->black_pen(), cliprect);
	if (layers_ctrl & 2)    m_bg2_tmap->draw(screen, bitmap, cliprect, 0, 0);
	if (layers_ctrl & 4)    m_bg3_tmap->draw(screen, bitmap, cliprect, 0, 0);
	if (layers_ctrl & 8)    m_bg4_tmap->draw(screen, bitmap, cliprect, 0, 0);

	if (layers_ctrl & 16)   m_fg_tmap->draw(screen, bitmap, cliprect, 0, 0);

	return 0;
}
Exemple #2
0
GFXDECODE_END

void witch_state::video_start()
{
	m_gfx0a_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(witch_state::get_gfx0a_tile_info),this),TILEMAP_SCAN_ROWS,8,8,32,32);
	m_gfx0b_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(witch_state::get_gfx0b_tile_info),this),TILEMAP_SCAN_ROWS,8,8,32,32);
	m_gfx1_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(witch_state::get_gfx1_tile_info),this),TILEMAP_SCAN_ROWS,8,8,32,32);

	m_gfx0a_tilemap->set_transparent_pen(0);
	m_gfx0b_tilemap->set_transparent_pen(0);
	m_gfx0a_tilemap->set_palette_offset(0x100);
	m_gfx0b_tilemap->set_palette_offset(0x100);
	m_gfx1_tilemap->set_palette_offset(0x200);

	save_item(NAME(m_scrollx));
	save_item(NAME(m_scrolly));
	save_item(NAME(m_reg_a002));
}
Exemple #3
0
void clpoker_state::video_start()
{
	m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(clpoker_state::get_bg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
	m_fg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(clpoker_state::get_fg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
	m_fg_tilemap->set_transparent_pen(0);

	m_nmi_enable = false;
	save_item(NAME(m_nmi_enable));
}
Exemple #4
0
void igs_m027_state::video_start()
{
	m_igs_tx_tilemap= &machine().tilemap().create(tilemap_get_info_delegate(FUNC(igs_m027_state::get_tx_tilemap_tile_info),this),TILEMAP_SCAN_ROWS, 8, 8,64,32);
	m_igs_tx_tilemap->set_transparent_pen(15);
	m_igs_bg_tilemap= &machine().tilemap().create(tilemap_get_info_delegate(FUNC(igs_m027_state::get_bg_tilemap_tile_info),this),TILEMAP_SCAN_ROWS, 8, 8,64,32);
	//m_igs_bg_tilemap= &machine().tilemap().create(tilemap_get_info_delegate(FUNC(igs_m027_state::get_bg_tilemap_tile_info),this),TILEMAP_SCAN_ROWS, 8, 8,64,32);
	//m_igs_bg_tilemap->set_transparent_pen(15);
	logerror("Video START OK!\n");
}
Exemple #5
0
void lbeach_state::video_start()
{
	m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(lbeach_state::get_bg_tile_info),this), TILEMAP_SCAN_ROWS, 16, 16, 32, 16);

	m_fg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(lbeach_state::get_fg_tile_info),this), TILEMAP_SCAN_ROWS, 16, 8, 32, 32);
	m_fg_tilemap->set_transparent_pen(0);

	m_screen->register_screen_bitmap(m_colmap_car);
}
Exemple #6
0
void dmndrby_state::video_start()
{
	m_bg = 0;

	m_racetrack_tilemap_rom = memregion("user1")->base();
	m_racetrack_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(dmndrby_state::get_dmndrby_tile_info),this),TILEMAP_SCAN_ROWS,16,16, 16, 512);
	m_racetrack_tilemap->mark_all_dirty();

}
Exemple #7
0
UINT32 bestleag_state::screen_update_bestleaw(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
	m_bg_tilemap->set_scrollx(0,m_vregs[0x08/2]);
	m_bg_tilemap->set_scrolly(0,m_vregs[0x0a/2]);
	m_tx_tilemap->set_scrollx(0,m_vregs[0x00/2]);
	m_tx_tilemap->set_scrolly(0,m_vregs[0x02/2]);
	m_fg_tilemap->set_scrollx(0,m_vregs[0x04/2]);
	m_fg_tilemap->set_scrolly(0,m_vregs[0x06/2]);

	m_bg_tilemap->draw(bitmap, cliprect, 0,0);
	m_fg_tilemap->draw(bitmap, cliprect, 0,0);
	draw_sprites(bitmap,cliprect);
	m_tx_tilemap->draw(bitmap, cliprect, 0,0);
	return 0;
}
Exemple #8
0
void suprgolf_state::video_start()
{
	m_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(suprgolf_state::get_tile_info),this),TILEMAP_SCAN_ROWS,8,8,32,32 );
	m_paletteram = auto_alloc_array(machine(), UINT8, 0x1000);
	m_bg_vram = auto_alloc_array(machine(), UINT8, 0x2000*0x20);
	m_bg_fb = auto_alloc_array(machine(), UINT16, 0x2000*0x20);
	m_fg_fb = auto_alloc_array(machine(), UINT16, 0x2000*0x20);

	m_tilemap->set_transparent_pen(15);
}
Exemple #9
0
void palette_device::configure_tilemap_groups(tilemap_t &tmap, gfx_element &gfx, int transcolor)
{
	int color;

	assert(gfx.colors() <= TILEMAP_NUM_GROUPS);

	// iterate over all colors in the tilemap
	for (color = 0; color < gfx.colors(); color++)
		tmap.set_transmask(color, transpen_mask(gfx, color, transcolor), 0);
}
Exemple #10
0
void pipeline_state::video_start()
{
    m_palram=std::make_unique<UINT8[]>(0x1000);
    m_tilemap1 = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(pipeline_state::get_tile_info),this),TILEMAP_SCAN_ROWS,8,8,64,32 );
    m_tilemap2 = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(pipeline_state::get_tile_info2),this),TILEMAP_SCAN_ROWS,8,8,64,32 );
    m_tilemap2->set_transparent_pen(0);

    save_item(NAME(m_vidctrl));
    save_pointer(NAME(m_palram.get()), 0x1000);
}
Exemple #11
0
UINT32 pzletime_state::screen_update_pzletime(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
	int count;
	int y, x;

	bitmap.fill(machine().pens[0], cliprect); //bg pen

	m_txt_tilemap->set_scrolly(0, m_tilemap_regs[0] - 3);
	m_txt_tilemap->set_scrollx(0, m_tilemap_regs[1]);

	m_mid_tilemap->set_scrolly(0, m_tilemap_regs[2] - 3);
	m_mid_tilemap->set_scrollx(0, m_tilemap_regs[3] - 7);

	if (m_video_regs[2] & 1)
	{
		count = 0;

		for (y = 255; y >= 0; y--)
		{
			for (x = 0; x < 512; x++)
			{
				if (m_bg_videoram[count] & 0x8000)
					bitmap.pix16((y - 18) & 0xff, (x - 32) & 0x1ff) = 0x300 + (m_bg_videoram[count] & 0x7fff);

				count++;
			}
		}
	}

	m_mid_tilemap->draw(screen, bitmap, cliprect, 0, 0);

	{
		UINT16 *spriteram = m_spriteram;
		int offs, spr_offs, colour, sx, sy;

		for(offs = 0; offs < 0x2000 / 2; offs += 4)
		{
			if(spriteram[offs + 0] == 8)
				break;

			spr_offs = spriteram[offs + 3] & 0x0fff;
			sy = 0x200 - (spriteram[offs + 0] & 0x1ff) - 35;
			sx = (spriteram[offs + 1] & 0x1ff) - 30;
			colour = (spriteram[offs + 0] & 0xf000) >> 12;

			// is spriteram[offs + 0] & 0x200 flipy? it's always set

			drawgfx_transpen(bitmap, cliprect, machine().gfx[1], spr_offs, colour, 0, 1, sx, sy, 0);
		}
	}

	m_txt_tilemap->draw(screen, bitmap, cliprect, 0, 0);
	if ((screen.frame_number() % 16) != 0)
		m_txt_tilemap->draw(screen, bitmap, cliprect, 1, 0);

	return 0;
}
Exemple #12
0
UINT32 pturn_state::screen_update_pturn(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
	UINT8 *spriteram = m_spriteram;
	int offs;
	int sx, sy;
	int flipx, flipy;

	bitmap.fill(m_bgcolor, cliprect);
	m_bgmap->draw(screen, bitmap, cliprect, 0,0);
	for ( offs = 0x80-4 ; offs >=0 ; offs -= 4)
	{
		sy=256-spriteram[offs]-16 ;
		sx=spriteram[offs+3]-16 ;

		flipx=spriteram[offs+1]&0x40;
		flipy=spriteram[offs+1]&0x80;


		if (flip_screen_x())
		{
			sx = 224 - sx;
			flipx ^= 0x40;
		}

		if (flip_screen_y())
		{
			flipy ^= 0x80;
			sy = 224 - sy;
		}

		if(sx|sy)
		{
			m_gfxdecode->gfx(2)->transpen(m_palette,bitmap,cliprect,
			spriteram[offs+1] & 0x3f ,
			(spriteram[offs+2] & 0x1f),
			flipx, flipy,
			sx,sy,0);
		}
	}
	m_fgmap->draw(screen, bitmap, cliprect, 0,0);
	return 0;
}
Exemple #13
0
UINT32 joystand_state::screen_update( screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect )
{
	int layers_ctrl = -1;

#ifdef MAME_DEBUG
	if (machine().input().code_pressed(KEYCODE_Z))
	{
		int msk = 0;
		if (machine().input().code_pressed(KEYCODE_Q))  msk |= 1;
		if (machine().input().code_pressed(KEYCODE_W))  msk |= 2;
		if (machine().input().code_pressed(KEYCODE_A))  msk |= 4;
		if (machine().input().code_pressed(KEYCODE_S))  msk |= 8;
		if (msk != 0) layers_ctrl &= msk;
	}
#endif

	m_bg1_tmap->set_scrollx(0, 0);
	m_bg1_tmap->set_scrolly(0, 0);

	m_bg2_tmap->set_scrollx(0, m_scroll[0] - 0xa);
	m_bg2_tmap->set_scrolly(0, m_scroll[1]);

	draw_bg15_tilemap();
		
	bitmap.fill(m_palette->black_pen(), cliprect);
	if (layers_ctrl & 4)	copybitmap_trans(bitmap, m_bg15_bitmap[0], 0, 0, 1, 0, cliprect, BG15_TRANSPARENT);
	if (layers_ctrl & 8)	copybitmap_trans(bitmap, m_bg15_bitmap[1], 0, 0, 0, 0, cliprect, BG15_TRANSPARENT);
	if (layers_ctrl & 1)	m_bg1_tmap->draw(screen, bitmap, cliprect, 0, 0);
	if (layers_ctrl & 2)	m_bg2_tmap->draw(screen, bitmap, cliprect, 0, 0);

	popmessage("S0: %04X S1: %04X EN: %04X OUT: %04X", m_scroll[0], m_scroll[1], m_enable[0], m_outputs[0]);
	return 0;
}
Exemple #14
0
UINT32 quizpun2_state::screen_update_quizpun2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
	int layers_ctrl = -1;

#ifdef MAME_DEBUG
	if (machine().input().code_pressed(KEYCODE_Z))
	{
		int msk = 0;
		if (machine().input().code_pressed(KEYCODE_Q))  msk |= 1;
		if (machine().input().code_pressed(KEYCODE_W))  msk |= 2;
		if (msk != 0) layers_ctrl &= msk;
	}
#endif

	if (layers_ctrl & 1)    m_bg_tmap->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
	else                    bitmap.fill(get_black_pen(machine()), cliprect);

bitmap.fill(get_black_pen(machine()), cliprect);
	if (layers_ctrl & 2)    m_fg_tmap->draw(bitmap, cliprect, 0, 0);

	return 0;
}
Exemple #15
0
void patapata_state::video_start()
{
	m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(patapata_state::get_bg_tile_info),this), tilemap_mapper_delegate(FUNC(patapata_state::pagescan),this), 16, 16, 1024,16*2);
	m_fg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(patapata_state::get_fg_tile_info),this), tilemap_mapper_delegate(FUNC(patapata_state::pagescan),this), 16, 16, 1024,16*2);

// 2nd half of the ram seems unused, maybe it's actually a mirror meaning this would be the correct tilemap sizes
// m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(patapata_state::get_bg_tile_info),this), tilemap_mapper_delegate(FUNC(patapata_state::pagescan),this), 16, 16, 1024/2,16*2);
// m_fg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(patapata_state::get_fg_tile_info),this), tilemap_mapper_delegate(FUNC(patapata_state::pagescan),this), 16, 16, 1024/2,16*2);

	m_fg_tilemap->set_transparent_pen(0xf);

	save_item(NAME(m_fg_bank));
}
Exemple #16
0
UINT32 cball_state::screen_update_cball(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
	/* draw playfield */
	m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);

	/* draw sprite */
	drawgfx_transpen(bitmap, cliprect, machine().gfx[1],
		m_video_ram[0x399] >> 4,
		0,
		0, 0,
		240 - m_video_ram[0x390],
		240 - m_video_ram[0x398], 0);
	return 0;
}
Exemple #17
0
UINT32 majorpkr_state::screen_update_majorpkr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
	bitmap.fill(get_black_pen(machine()), cliprect);

	rectangle custom_clip;

	/* The following custom_clip is to exclude the last char column (unused)
	   form the render. We need more proof about how the video is working.
	*/
	custom_clip = cliprect;
	custom_clip.max_x -= 16;

	m_bg_tilemap->draw(screen, bitmap, custom_clip, 0, 0);
	m_fg_tilemap->draw(screen, bitmap, custom_clip, 0, 0);

	if (m_flip_state == 1)
	{
		m_bg_tilemap->set_flip(TILEMAP_FLIPX | TILEMAP_FLIPY);
		m_fg_tilemap->set_flip(TILEMAP_FLIPX | TILEMAP_FLIPY);
	}

	return 0;
}
Exemple #18
0
UINT32 umipoker_state::screen_update_umipoker(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
	m_tilemap_0->set_scrolly(0, m_umipoker_scrolly[0]);
	m_tilemap_1->set_scrolly(0, m_umipoker_scrolly[1]);
	m_tilemap_2->set_scrolly(0, m_umipoker_scrolly[2]);
	m_tilemap_3->set_scrolly(0, m_umipoker_scrolly[3]);

	bitmap.fill(get_black_pen(machine()), cliprect);

	m_tilemap_0->draw(screen, bitmap, cliprect, 0,0);
	m_tilemap_1->draw(screen, bitmap, cliprect, 0,0);
	m_tilemap_2->draw(screen, bitmap, cliprect, 0,0);
	m_tilemap_3->draw(screen, bitmap, cliprect, 0,0);

	return 0;
}
Exemple #19
0
UINT32 pturn_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
	bitmap.fill(m_bgcolor, cliprect);
	m_bgmap->draw(screen, bitmap, cliprect, 0,0);
	for (int offs = 0x80-4 ; offs >=0 ; offs -= 4)
	{
		int sy=256-m_spriteram[offs]-16 ;
		int sx=m_spriteram[offs+3]-16 ;

		int flipx=m_spriteram[offs+1]&0x40;
		int flipy=m_spriteram[offs+1]&0x80;


		if (flip_screen_x())
		{
			sx = 224 - sx;
			flipx ^= 0x40;
		}

		if (flip_screen_y())
		{
			flipy ^= 0x80;
			sy = 224 - sy;
		}

		if(sx|sy)
		{
			m_gfxdecode->m_gfx[2]->transpen(bitmap,cliprect,
			m_spriteram[offs+1] & 0x3f ,
			(m_spriteram[offs+2] & 0x1f),
			flipx, flipy,
			sx,sy,0);
		}
	}
	m_fgmap->draw(screen, bitmap, cliprect, 0,0);
	return 0;
}
Exemple #20
0
void cultures_state::video_start()
{
	m_bg0_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(cultures_state::get_bg0_tile_info),this),TILEMAP_SCAN_ROWS, 8, 8, 64, 128);
	m_bg1_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(cultures_state::get_bg1_tile_info),this),TILEMAP_SCAN_ROWS, 8, 8, 512, 512);
	m_bg2_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(cultures_state::get_bg2_tile_info),this),TILEMAP_SCAN_ROWS, 8, 8, 512, 512);

	m_bg1_tilemap->set_transparent_pen(0);
	m_bg0_tilemap->set_transparent_pen(0);

	m_bg0_tilemap->set_scrolldx(502, 10);
	m_bg1_tilemap->set_scrolldx(502, 10);
	m_bg2_tilemap->set_scrolldx(502, 10);

	m_bg0_tilemap->set_scrolldy(255, 0);
	m_bg1_tilemap->set_scrolldy(255, 0);
	m_bg2_tilemap->set_scrolldy(255, 0);
}
Exemple #21
0
UINT32 flyball_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
	int pitcherx = m_pitcher_horz;
	int pitchery = m_pitcher_vert - 31;

	int ballx = m_ball_horz - 1;
	int bally = m_ball_vert - 17;

	m_tmap->mark_all_dirty();

	/* draw playfield */
	m_tmap->draw(screen, bitmap, cliprect, 0, 0);

	/* draw pitcher */
	m_gfxdecode->m_gfx[1]->transpen(bitmap,cliprect, m_pitcher_pic ^ 0xf, 0, 1, 0, pitcherx, pitchery, 1);

	/* draw ball */
	for (int y = bally; y < bally + 2; y++)
		for (int x = ballx; x < ballx + 2; x++)
			if (cliprect.contains(x, y))
				bitmap.pix16(y, x) = 1;

	return 0;
}
Exemple #22
0
void luckgrln_state::video_start()
{
	m_reel1_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(luckgrln_state::get_luckgrln_reel1_tile_info),this),TILEMAP_SCAN_ROWS, 8, 32, 64, 8);
	m_reel2_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(luckgrln_state::get_luckgrln_reel2_tile_info),this),TILEMAP_SCAN_ROWS, 8, 32, 64, 8);
	m_reel3_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(luckgrln_state::get_luckgrln_reel3_tile_info),this),TILEMAP_SCAN_ROWS, 8, 32, 64, 8);
	m_reel4_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(luckgrln_state::get_luckgrln_reel4_tile_info),this),TILEMAP_SCAN_ROWS, 8, 32, 64, 8);

	m_reel1_tilemap->set_scroll_cols(64);
	m_reel2_tilemap->set_scroll_cols(64);
	m_reel3_tilemap->set_scroll_cols(64);
	m_reel4_tilemap->set_scroll_cols(64);

	m_reel1_tilemap->set_transparent_pen(0 );
	m_reel2_tilemap->set_transparent_pen(0 );
	m_reel3_tilemap->set_transparent_pen(0 );
	m_reel4_tilemap->set_transparent_pen(0 );
}
Exemple #23
0
UINT32 sbrkout_state::screen_update_sbrkout(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
	UINT8 *videoram = m_videoram;
	int ball;

	m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);

	for (ball = 2; ball >= 0; ball--)
	{
		int code = ((videoram[0x380 + 0x18 + ball * 2 + 1] & 0x80) >> 7);
		int sx = 31 * 8 - videoram[0x380 + 0x10 + ball * 2];
		int sy = 30 * 8 - videoram[0x380 + 0x18 + ball * 2];

		m_gfxdecode->gfx(1)->transpen(bitmap,cliprect, code, 0, 0, 0, sx, sy, 0);
	}
	return 0;
}
Exemple #24
0
uint32_t fun_tech_corp_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
	bitmap.fill(0, cliprect);

	if (!(m_vreg & 0x40))
	{
		for (int i = 0; i < 64; i++)
		{
			m_reel1_tilemap->set_scrolly(i, m_reel1_scroll[i]);
			m_reel2_tilemap->set_scrolly(i, m_reel2_scroll[i]);
			m_reel3_tilemap->set_scrolly(i, m_reel3_scroll[i]);
		}

		const rectangle visible1(0 * 8, (14 + 48) * 8 - 1, 4 * 8, (4 + 7) * 8 - 1);
		const rectangle visible2(0 * 8, (14 + 48) * 8 - 1, 12 * 8, (12 + 7) * 8 - 1);
		const rectangle visible3(0 * 8, (14 + 48) * 8 - 1, 18 * 8, (18 + 7) * 8 - 1);

		m_reel1_tilemap->draw(screen, bitmap, visible1, 0, 0);
		m_reel2_tilemap->draw(screen, bitmap, visible2, 0, 0);
		m_reel3_tilemap->draw(screen, bitmap, visible3, 0, 0);
	}
	else
	{
		// this mode seems to draw reel1 as fullscreen using a different set of scroll regs
		for (int i = 0; i < 64; i++)
		{
			m_reel1_tilemap->set_scrolly(i, m_reel1_alt_scroll[i]);
		}

		m_reel1_tilemap->draw(screen, bitmap, cliprect, 0, 0);
	}


	m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
	return 0;
}
Exemple #25
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;
}
Exemple #26
0
UINT32 suprgolf_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
	int x,y,count,color;
	bitmap.fill(m_palette->black_pen(), cliprect);

	{
		count = 0;

		for(y=0;y<256;y++)
		{
			for(x=0;x<512;x++)
			{
				color = m_bg_fb[count];

				if(x <= cliprect.max_x && y <= cliprect.max_y)
					bitmap.pix16(y, x) = m_palette->pen((color & 0x7ff));

				count++;
			}
		}
	}

	{
		count = 0;

		for(y=0;y<256;y++)
		{
			for(x=0;x<512;x++)
			{
				color = m_fg_fb[count];

				if(((m_fg_fb[count] & 0x0f) != 0x0f) && (x <= cliprect.max_x && y <= cliprect.max_y))
					bitmap.pix16(y, x) = m_palette->pen((color & 0x7ff));

				count++;
			}
		}
	}

	m_tilemap->draw(screen, bitmap, cliprect, 0,0);

	return 0;
}
Exemple #27
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;
}
Exemple #28
0
UINT32 chance32_state::screen_update_chance32(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{

	/* TODO: wtf? */
	m_bg_tilemap->set_scrollx(0, 352);
	m_bg_tilemap->set_scrolly(0, 160);
	m_fg_tilemap->set_scrollx(0, 352);
	m_fg_tilemap->set_scrolly(0, 160);

	m_bg_tilemap->draw(bitmap, cliprect, 0, 0);
	m_fg_tilemap->draw(bitmap, cliprect, 0, 0);

	return 0;
}
Exemple #29
0
void wyvernf0_state::video_start()
{
	m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(wyvernf0_state::get_bg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
	m_fg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(wyvernf0_state::get_fg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);

	m_bg_tilemap->set_transparent_pen(0);
	m_fg_tilemap->set_transparent_pen(0);

	m_bg_tilemap->set_scrolldx(0x12, 0xf4);
	m_bg_tilemap->set_scrolldy(   0,    0);

	m_fg_tilemap->set_scrolldx(0x10, 0xf6);
	m_fg_tilemap->set_scrolldy(   0,    0);
}
Exemple #30
0
void suprgolf_state::video_start()
{
	m_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(suprgolf_state::get_tile_info),this),TILEMAP_SCAN_ROWS,8,8,32,32 );
	m_paletteram = auto_alloc_array(machine(), UINT8, 0x1000);
	m_bg_vram = auto_alloc_array(machine(), UINT8, 0x2000*0x20);
	m_bg_fb = auto_alloc_array(machine(), UINT16, 0x2000*0x20);
	m_fg_fb = auto_alloc_array(machine(), UINT16, 0x2000*0x20);

	m_tilemap->set_transparent_pen(15);

	save_item(NAME(m_bg_bank));
	save_item(NAME(m_vreg_bank));
	save_item(NAME(m_vreg_pen));
	save_item(NAME(m_palette_switch));
	save_item(NAME(m_bg_vreg_test));
	save_pointer(NAME(m_paletteram), 0x1000);
	save_pointer(NAME(m_bg_vram), 0x2000*0x20);
	save_pointer(NAME(m_bg_fb), 0x2000*0x20);
	save_pointer(NAME(m_fg_fb), 0x2000*0x20);
}