Ejemplo n.º 1
0
ADDRESS_MAP_END


TIMER_CALLBACK_MEMBER(tubep_state::rjammer_scanline_callback)
{
	int scanline = param;

	m_curr_scanline = scanline;//for debugging

	/* CPU #0 interrupt */
	/* activates at the start of VBLANK signal which happens at the beginning of scaline number 240 */
	if (scanline == 240)
	{
		logerror("VBLANK CPU#0\n");
		m_maincpu->set_input_line(0, ASSERT_LINE);
	}


	/* CPU #1 interrupt */
	/* activates at the _end_ of VBLANK signal which happens at the beginning of scanline number 16 */
	if (scanline == 16)
	{
		logerror("/VBLANK CPU#1\n");
		m_slave->set_input_line(0, HOLD_LINE);
	}


	/* CPU #3 MS2010-A NMI */
	/* activates at the _end_ of VBLANK signal which happens at the beginning of scanline number 16 */
	if (scanline == 16)
	{
		logerror("/nmi CPU#3\n");
		tubep_vblank_end(); /* switch buffered sprite RAM page */
		m_mcu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
	}
	/* CPU #3 MS2010-A NMI */
	/* deactivates at the start of VBLANK signal which happens at the beginning of scanline number 240*/
	if (scanline == 240)
	{
		logerror("CPU#3 nmi clear\n");
		m_mcu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
	}


	/* sound CPU interrupt */
	/* activates whenever line V6 from video part goes lo->hi that is when the scanline becomes 64 and 192 */
	if ((scanline == 64) || (scanline == 192))
	{
		m_soundcpu->set_input_line(0, ASSERT_LINE); /* sound cpu interrupt (music tempo) */
	}


	m_screen->update_partial(m_screen->vpos());

	logerror("scanline=%3i scrgetvpos(0)=%3i\n", scanline, m_screen->vpos());

	scanline++;
	if (scanline >= 264)
		scanline = 0;

	m_interrupt_timer->adjust(m_screen->time_until_pos(scanline), scanline);
}
Ejemplo n.º 2
0
ADDRESS_MAP_END


static TIMER_CALLBACK( rjammer_scanline_callback )
{
	int scanline = param;

curr_scanline = scanline;//for debugging


	/* CPU #0 interrupt */
	/* activates at the start of VBLANK signal which happens at the beginning of scaline number 240 */
	if (scanline==240)
	{
		logerror("VBLANK CPU#0\n");
		cpunum_set_input_line(0, 0, ASSERT_LINE);
	}


	/* CPU #1 interrupt */
	/* activates at the _end_ of VBLANK signal which happens at the beginning of scanline number 16 */
	if (scanline==16)
	{
		logerror("/VBLANK CPU#1\n");
		cpunum_set_input_line(1, 0, HOLD_LINE);
	}


	/* CPU #3 MS2010-A NMI */
	/* activates at the _end_ of VBLANK signal which happens at the beginning of scanline number 16 */
	if (scanline==16)
	{
		logerror("/nmi CPU#3\n");
		tubep_vblank_end(); /* switch buffered sprite RAM page */
		cpunum_set_input_line(3, INPUT_LINE_NMI, ASSERT_LINE);
	}
	/* CPU #3 MS2010-A NMI */
	/* deactivates at the start of VBLANK signal which happens at the beginning of scanline number 240*/
	if (scanline==240)
	{
		logerror("CPU#3 nmi clear\n");
		cpunum_set_input_line(3, INPUT_LINE_NMI, CLEAR_LINE);
	}


	/* sound CPU interrupt */
	/* activates whenever line V6 from video part goes lo->hi that is when the scanline becomes 64 and 192 */
	if ((scanline==64) || (scanline==192))
	{
		cpunum_set_input_line(2,0,ASSERT_LINE);	/* sound cpu interrupt (music tempo) */
	}


	video_screen_update_partial(0, video_screen_get_vpos(0));

logerror("scanline=%3i scrgetvpos(0)=%3i\n",scanline,video_screen_get_vpos(0));

	scanline ++;
	if (scanline>=264)
		scanline=0;

	timer_adjust(interrupt_timer, video_screen_get_time_until_pos(0, scanline, 0), scanline, attotime_zero);
}