Beispiel #1
0
static READ64_HANDLER( naomigd_ggxxsla_idle_skip_r )
{
	if (cpu_get_pc(space->cpu)==0x0c0c9adc)
		cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(500));

	return naomi_ram64[0x1aae18/8];
}
Beispiel #2
0
static WRITE16_HANDLER( hypr_subcpu_control_w )
{
    int pc = activecpu_get_pc();

    if (data & 0x01)
    {
        if (!subcpu_resetline)
        {
            if (pc != 0x95f2)
            {
                cpunum_set_input_line(1, INPUT_LINE_RESET, ASSERT_LINE);
                subcpu_resetline = 1;
            } else {
                cpunum_set_input_line(1, INPUT_LINE_HALT, ASSERT_LINE);
                subcpu_resetline = -1;
            }
        }
    } else {
        if (subcpu_resetline == 1 && (data != 0x0c))
        {
            cpunum_set_input_line(1, INPUT_LINE_RESET, CLEAR_LINE);
            subcpu_resetline = 0;
            if (pc == 0xbb0 || pc == 0x9d30 || pc == 0xb19c)
                cpu_spinuntil_time(ATTOTIME_IN_USEC(15000));		/* sync semaphore */
        }
        else if (subcpu_resetline == -1)
        {
            cpunum_set_input_line(1, INPUT_LINE_HALT, CLEAR_LINE);
            subcpu_resetline = 0;
        }
    }
}
Beispiel #3
0
static READ32_HANDLER( osman_speedup_r )
{
	simpl156_state *state = space->machine->driver_data<simpl156_state>();
	if (cpu_get_pc(space->cpu) == 0x5974)
		cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(400));
	return state->systemram[0x10/4];
}
Beispiel #4
0
/* at least speeds up the annoying copyright screens ;-) */
static READ64_HANDLER( naomigd_sfz3ugd_idle_skip_r )
{
	if (cpu_get_pc(space->cpu)==0xc36a2dc)
		cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(500));

	return naomi_ram64[0x5dc900/8];
}
Beispiel #5
0
static READ64_HANDLER( naomigd_ggxx_idle_skip_r )
{
	if (cpu_get_pc(space->cpu)==0xc0b5c3c) // or 0xc0bab0c
		cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(500));

	return naomi_ram64[0x1837b8/8];
}
Beispiel #6
0
static READ32_HANDLER( charlien_speedup_r )
{
	simpl156_state *state = (simpl156_state *)space->machine->driver_data;
	if (cpu_get_pc(space->cpu) == 0xc8c8)
		cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(400));
	return state->systemram[0x10/4];
}
Beispiel #7
0
static WRITE16_HANDLER( cabal_sound_irq_trigger_word_w )
{
	seibu_main_word_w(space,4,data,mem_mask);

	/* spin for a while to let the Z80 read the command, otherwise coins "stick" */
	cpu_spinuntil_time(space->cpu, attotime::from_usec(50));
}
Beispiel #8
0
static WRITE16_HANDLER( cabal_sound_irq_trigger_word_w )
{
	seibu_main_word_w(4,data,mem_mask);

	/* spin for a while to let the Z80 read the command, otherwise coins "stick" */
	cpu_spinuntil_time(ATTOTIME_IN_USEC(50));
}
Beispiel #9
0
static WRITE16_HANDLER( esd16_sound_command_w )
{
	if (ACCESSING_LSB)
	{
		soundlatch_w(0,data & 0xff);
		cpunum_set_input_line(1,0,ASSERT_LINE);		// Generate an IRQ
		cpu_spinuntil_time(ATTOTIME_IN_USEC(50));	// Allow the other CPU to reply
	}
}
Beispiel #10
0
static READ64_HANDLER( naomigd_ggxxrl_idle_skip_r )
{
	if (cpu_get_pc(space->cpu)==0xc0b84bc) // or 0xc0bab0c
		cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(500));

	//printf("%08x\n", cpu_get_pc(space->cpu));

	return naomi_ram64[0x18d6c8/8];
}
Beispiel #11
0
static WRITE16_HANDLER( roldf_sh_irqtrigger_w )
{
	if (ACCESSING_BITS_0_7){
		soundlatch_w(machine,0,data & 0xff);
		cpunum_set_input_line(machine, 1,0,HOLD_LINE);
	}

	// give the z80 time to see it
	cpu_spinuntil_time(ATTOTIME_IN_USEC(40));
}
Beispiel #12
0
static WRITE16_HANDLER( sandscrp_soundlatch_word_w )
{
	if (ACCESSING_BITS_0_7)
	{
		latch1_full = 1;
		soundlatch_w(space, 0, data & 0xff);
		cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
		cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(100));	// Allow the other cpu to reply
	}
}
Beispiel #13
0
static READ64_HANDLER( naomi_bios_idle_skip_r )
{
	if (cpu_get_pc(space->cpu)==0xc04173c)
		cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(500));
		//cpu_spinuntil_int(space->cpu);
//  else
//      printf("%08x\n", cpu_get_pc(space->cpu));

	return naomi_ram64[0x2ad238/8];
}
Beispiel #14
0
static WRITE16_HANDLER( roldf_sh_irqtrigger_w )
{
	if (ACCESSING_LSB){
		soundlatch_w(0,data & 0xff);
		cpunum_set_input_line(1,0,HOLD_LINE);
	}

	/* give the z80 time to see it */
	cpu_spinuntil_time(TIME_IN_USEC(40));
}
Beispiel #15
0
static WRITE16_HANDLER( sandscrp_soundlatch_word_w )
{
	sandscrp_state *state = space->machine->driver_data<sandscrp_state>();
	if (ACCESSING_BITS_0_7)
	{
		state->latch1_full = 1;
		soundlatch_w(space, 0, data & 0xff);
		cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
		cpu_spinuntil_time(space->cpu, attotime::from_usec(100));	// Allow the other cpu to reply
	}
}