Beispiel #1
0
static WRITE8_HANDLER( xain_sharedram_w )
{
	/* locations 003d and 003e are used as a semaphores between CPU A and B, */
	/* so let's resync every time they are changed to avoid deadlocks */
	if ((offset == 0x003d || offset == 0x003e)
			&& xain_sharedram[offset] != data)
		cpu_boost_interleave(attotime_zero, ATTOTIME_IN_USEC(20));
	xain_sharedram[offset] = data;
}
Beispiel #2
0
static WRITE16_HANDLER( fuuki16_sound_command_w )
{
	if (ACCESSING_LSB)
	{
		soundlatch_w(0,data & 0xff);
		cpunum_set_input_line(1, INPUT_LINE_NMI, PULSE_LINE);
//		cpu_spinuntil_time(TIME_IN_USEC(50));	// Allow the other CPU to reply
		cpu_boost_interleave(0, TIME_IN_USEC(50)); // Fixes glitching in rasters
	}
}
Beispiel #3
0
static TIMER_CALLBACK( main_callback )
{
	if (port_A & 0x80)
		logerror ("Sound data not read %x\n",sound_data);

	port_A |= 0x80;  /* command from main cpu pending */
	sound_data = param;
	cpu_boost_interleave(attotime_zero, ATTOTIME_IN_USEC(100));

	if (PA7_irq)
		cpunum_set_input_line(machine, 1, M6809_IRQ_LINE, ASSERT_LINE);
}
Beispiel #4
0
static void sound_command_w(int data)
{
	exidy440_sound_command = data;
	exidy440_sound_command_ack = 0;
	cpunum_set_input_line(1, INPUT_LINE_IRQ1, ASSERT_LINE);

	/* It is important that the sound cpu ACKs the sound command
       quickly. Otherwise the main CPU gives up with sound. Boosting
       the interleave for a while helps. */

	cpu_boost_interleave(0, TIME_IN_USEC(100));
}
Beispiel #5
0
static WRITE8_HANDLER( qixmcu_coinctrl_w )
{
	if (data & 0x04)
	{
		cpunum_set_input_line(3, M6809_IRQ_LINE, ASSERT_LINE);
		/* temporarily boost the interleave to sync things up */
		/* note: I'm using 50 because 30 is not enough for space dungeon at game over */
		cpu_boost_interleave(0, TIME_IN_USEC(50));
	}
	else
		cpunum_set_input_line(3, M6809_IRQ_LINE, CLEAR_LINE);

	/* this is a callback called by pia_0_w(), so I don't need to synchronize */
	/* the CPUs - they have already been synchronized by qix_pia_0_w() */
	qix_coinctrl = data;
}
Beispiel #6
0
static TIMER_CALLBACK( sound_callback )
{
	port_A |= 0x40; /* result from sound cpu pending */
	main_data = param;
	cpu_boost_interleave(attotime_zero, ATTOTIME_IN_USEC(100));
}
Beispiel #7
0
static WRITE8_HANDLER(protection_w)
{
	timer_call_after_resynch(NULL, data, protection_deferred_w);
	cpu_boost_interleave(attotime_zero, ATTOTIME_IN_USEC(100));
}