Beispiel #1
0
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->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);

			timer_set(screen.machine, period_on, NULL,  0, irq_on);
			timer_set(screen.machine, period_off, NULL, 0, irq_off);
		}
}
Beispiel #2
0
void skullxbo_state::scanline_update(screen_device &screen, int scanline)
{
	/* check for interrupts in the alpha ram */
	/* the interrupt occurs on the HBLANK of the 6th scanline following */
	int offset = (scanline / 8) * 64 + 42;
	if (offset < 0x7c0 && (m_alpha_tilemap->basemem_read(offset) & 0x8000))
	{
		int width = screen.width();
		attotime period = screen.time_until_pos(screen.vpos() + 6, width * 0.9);
		m_scanline_timer->adjust(period);
	}

	/* update the playfield and motion objects */
	skullxbo_scanline_update(scanline);
}
Beispiel #3
0
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);
}