コード例 #1
0
ファイル: rampart.cpp プロジェクト: DragonMinded/mame
void rampart_state::scanline_update(screen_device &screen, int scanline)
{
	/* generate 32V signals */
	if ((scanline & 32) == 0)
		scanline_int_gen(m_maincpu);
}
コード例 #2
0
ファイル: vindictr.c プロジェクト: clobber/UME
void vindictr_state::scanline_update(screen_device &screen, int scanline)
{
	UINT16 *base = &m_alpha[((scanline - 8) / 8) * 64 + 42];
	int x;

	/* keep in range */
	if (base < m_alpha)
		base += 0x7c0;
	else if (base >= &m_alpha[0x7c0])
		return;

	/* update the current parameters */
	for (x = 42; x < 64; x++)
	{
		UINT16 data = *base++;

		switch ((data >> 9) & 7)
		{
			case 2:     /* /PFB */
				if (m_playfield_tile_bank != (data & 7))
				{
					screen.update_partial(scanline - 1);
					m_playfield_tile_bank = data & 7;
					m_playfield_tilemap->mark_all_dirty();
				}
				break;

			case 3:     /* /PFHSLD */
				if (m_playfield_xscroll != (data & 0x1ff))
				{
					screen.update_partial(scanline - 1);
					m_playfield_tilemap->set_scrollx(0, data);
					m_playfield_xscroll = data & 0x1ff;
				}
				break;

			case 4:     /* /MOHS */
				if (atarimo_get_xscroll(0) != (data & 0x1ff))
				{
					screen.update_partial(scanline - 1);
					atarimo_set_xscroll(0, data & 0x1ff);
				}
				break;

			case 5:     /* /PFSPC */
				break;

			case 6:     /* /VIRQ */
				scanline_int_gen(*subdevice("maincpu"));
				break;

			case 7:     /* /PFVS */
			{
				/* a new vscroll latches the offset into a counter; we must adjust for this */
				int offset = scanline;
				const rectangle &visible_area = screen.visible_area();
				if (offset > visible_area.max_y)
					offset -= visible_area.max_y + 1;

				if (m_playfield_yscroll != ((data - offset) & 0x1ff))
				{
					screen.update_partial(scanline - 1);
					m_playfield_tilemap->set_scrolly(0, data - offset);
					atarimo_set_yscroll(0, (data - offset) & 0x1ff);
				}
				break;
			}
		}
	}
}
コード例 #3
0
void arcadecl_state::scanline_update(screen_device &screen, int scanline)
{
	/* generate 32V signals */
	if ((scanline & 32) == 0)
		scanline_int_gen(*subdevice("maincpu"));
}
コード例 #4
0
void klax_state::scanline_update(screen_device &screen, int scanline)
{
	/* generate 32V signals */
	if ((scanline & 32) == 0 && !(ioport("P1")->read() & 0x800))
		scanline_int_gen(*subdevice("maincpu"));
}