Exemple #1
0
static int finalizr_interrupt(void)
{
	if (cpu_getiloops() == 0)
	{
		if (*finalizr_interrupt_enable & 2) return M6809_INT_IRQ;
	}
	else if (cpu_getiloops() % 2)
	{
		if (*finalizr_interrupt_enable & 1) return nmi_interrupt();
	}
	return ignore_interrupt();
}
Exemple #2
0
static int ironhors_interrupt(void)
{
	if (cpu_getiloops() == 0)
	{
		if (*ironhors_interrupt_enable & 4) return M6809_INT_FIRQ;
	}
	else if (cpu_getiloops() % 2)
	{
		if (*ironhors_interrupt_enable & 1) return nmi_interrupt();
	}
	return ignore_interrupt();
}
Exemple #3
0
static int labyrunr_interrupt(void)
{
	if (cpu_getiloops() == 0)
	{
		if (K007121_ctrlram[0][0x07] & 0x02) return HD6309_INT_IRQ;
	}
	else if (cpu_getiloops() % 2)
	{
		if (K007121_ctrlram[0][0x07] & 0x01) return nmi_interrupt();
	}
	return ignore_interrupt();
}
Exemple #4
0
static int pingpong_interrupt(void)
{
	if (cpu_getiloops() == 0)
	{
		if (*intenable & 0x04) return interrupt();
	}
	else if (cpu_getiloops() % 2)
	{
		if (*intenable & 0x08) return nmi_interrupt();
	}

	return ignore_interrupt();
}
Exemple #5
0
int brkthru_interrupt(void)
{
    if (cpu_getiloops() == 0)
    {
        if (nmi_enable) return nmi_interrupt();
    }
    else
    {
        /* generate IRQ on coin insertion */
        if ((readinputport(2) & 0xe0) != 0xe0) return interrupt();
    }

    return ignore_interrupt();
}
Exemple #6
0
static int exprraid_interrupt(void)
{
	static int coin = 0;

	if ( ( ~readinputport( 3 ) ) & 0xc0 ) {
		if ( coin == 0 ) {
			coin = 1;
			return nmi_interrupt();
		}
	} else
		coin = 0;

	return ignore_interrupt();
}
static int simpsons_irq(void)
{
	if (cpu_getiloops() == 0)
	{
		if (simpsons_firq_enabled && K053246_is_IRQ_enabled())
			return KONAMI_INT_FIRQ;
	}
	else
	{
		if (K052109_is_IRQ_enabled())
			return KONAMI_INT_IRQ;
	}

	return ignore_interrupt();
}
Exemple #8
0
/* counter. */
static int dday_interrupt (void)
{
    #define START_TIMER_SMALL 60
    static int timerValSmall = START_TIMER_SMALL;
    /* if the timer hits zero, start over at START_TIMER */
    timerValSmall--;
    if (timerValSmall == 0)
    {
		timerValSmall = START_TIMER_SMALL;
		timerVal--;
		if (timerVal == -1) timerVal = START_TIMER;
    }

    return ignore_interrupt();
}
Exemple #9
0
int spiders_timed_irq(void)
{
	/* Update CA1 on PIA1 - copy of PA0 (COIN1?) */
	pia_0_ca1_w(0 , input_port_0_r(0)&0x01);

	/* Update CA2 on PIA1 - copy of PA0 (PS2) */
	pia_0_ca2_w(0 , input_port_0_r(0)&0x02);

	/* Update CA1 on PIA1 - copy of PA0 (COIN1?) */
	pia_0_cb1_w(0 , input_port_6_r(0));

	/* Update CB2 on PIA1 - NOT CONNECTED */

	return ignore_interrupt();
}
Exemple #10
0
static int yamyam_interrupt(void)
{
	if (cpu_getiloops() == 0)
	{
		if (input_ports_hack)
		{
			unsigned char *RAM = memory_region(REGION_CPU1);
			RAM[0xe004] = readinputport(4);	/* COIN */
			RAM[0xe005] = readinputport(3);	/* IN1 */
			RAM[0xe006] = readinputport(2);	/* IN0 */
		}
		return 0xd7;	/* RST 10h vblank */
	}
	if ((cpu_getiloops() & 1) == 1) return 0xcf;	/* RST 08h sound (hand tuned) */
	else return ignore_interrupt();
}
Exemple #11
0
int wow_interrupt(void)
{
	int res=ignore_interrupt();
    int Direction;

    CurrentScan++;

    if (CurrentScan == Machine->drv->cpu[0].vblank_interrupts_per_frame)
	{
		CurrentScan = 0;

    	/*
		 * Seawolf2 needs to emulate rotary ports
         *
         * Checked each flyback, takes 1 second to traverse screen
         */

        Direction = input_port_0_r(0);

        if ((Direction & 2) && (Controller1 > 0))
			Controller1--;

		if ((Direction & 1) && (Controller1 < 63))
			Controller1++;

        Direction = input_port_1_r(0);

        if ((Direction & 2) && (Controller2 > 0))
			Controller2--;

		if ((Direction & 1) && (Controller2 < 63))
			Controller2++;
    }

    if (CurrentScan < 204) CopyLine(CurrentScan);

    /* Scanline interrupt enabled ? */

    if ((InterruptFlag & 0x08) && (CurrentScan == NextScanInt))
		res = interrupt();

    return res;
}
static int tagteam_interrupt(void)
{
	static int coin;
	int port;

	port = readinputport(0) & 0xc0;

	if (port != 0xc0)    /* Coin */
	{
		if (coin == 0)
		{
			coin = 1;
			return nmi_interrupt();
		}
	}
	else coin = 0;

        return ignore_interrupt();
}
Exemple #13
0
int battlane_cpu1_interrupt(void)
{
    if (cpu_getiloops()==0)
	{
        /* See note in battlane_cpu_command_w */
        if (~battlane_cpu_control & 0x08)
        {
            cpu_set_nmi_line(1, PULSE_LINE);
            return M6809_INT_NMI;
        }
        else
            return ignore_interrupt();
	}
    else
	{
        /*
		FIRQ seems to drive the music & coin inputs. I have no idea what it is
		attached to
		*/
		return M6809_INT_FIRQ;
	}
}
Exemple #14
0
int geebee_interrupt(void)
{
	cpu_set_irq_line(0, 0, PULSE_LINE);
    return ignore_interrupt();
}
Exemple #15
0
int senjyo_interrupt(void)
{
	if (int_delay_kludge == 0) return interrupt();
	else int_delay_kludge--;
	return ignore_interrupt();
}
Exemple #16
0
int battlane_cpu2_interrupt(void)
{
	/* CPU2's interrupts are generated on-demand by CPU1 */
	return ignore_interrupt();
}
Exemple #17
0
int tankbatt_interrupt (void)
{
	if ((readinputport (0) & 0x60) == 0) return interrupt ();
	if (tankbatt_nmi_enable) return nmi_interrupt ();
	else return ignore_interrupt ();
}
Exemple #18
0
static int dv_interrupt(void)
{
	if (nmi_enable) return M6809_INT_NMI;
	else return ignore_interrupt();
}
Exemple #19
0
static int aliens_interrupt( void )
{
	if (K051960_is_IRQ_enabled()) return interrupt();
	else return ignore_interrupt();
}
Exemple #20
0
static int parodius_interrupt(void)
{
	if (K052109_is_IRQ_enabled()) return interrupt();
	else return ignore_interrupt();
}
Exemple #21
0
static int ddrible_interrupt_0( void )
{
	if (ddrible_int_enable_0)
		return M6809_INT_FIRQ;
	return ignore_interrupt();
}
Exemple #22
0
int ddrible_interrupt_1( void )
{
	if (int_enable_1)
		return M6809_INT_FIRQ;
	return ignore_interrupt();
}
Exemple #23
0
int digdug_interrupt_3(void)
{
	if (interrupt_enable_3) return nmi_interrupt();
	else return ignore_interrupt();
}
int galaga_interrupt_2(void)
{
	if (interrupt_enable_2) return interrupt();
	else return ignore_interrupt();
}
Exemple #25
0
/***************************************************************************

  These games don't have VBlank interrupts.
  Interrupts are still used by the game: but they are related to coin
  slots.

***************************************************************************/
static int astrof_interrupt(void)
{
	if (readinputport(2) & 1)	/* Coin */
		return nmi_interrupt();
	else return ignore_interrupt();
}
Exemple #26
0
int kaitei_interrupt(void)
{
	cpu_set_irq_line(0, 0, HOLD_LINE);
    return ignore_interrupt();
}
Exemple #27
0
static int gundealr_interrupt(void)
{
	if (cpu_getiloops() == 0) return 0xd7;	/* vblank */
	if ((cpu_getiloops() & 1) == 1) return 0xcf;	/* sound (hand tuned) */
	else return ignore_interrupt();
}
static int pandoras_interrupt_b( void ){
	if (irq_enable_b)
		return M6809_INT_IRQ;
	return ignore_interrupt();
}
int galaga_interrupt_3(void)
{
	if (interrupt_enable_3) return nmi_interrupt();
	else return ignore_interrupt();
}
Exemple #30
0
static int mainevt_interrupt(void)
{
	if (K052109_is_IRQ_enabled()) return M6809_INT_IRQ;
	else return ignore_interrupt();
}