Example #1
0
static void irqtick()
{
	u8 irqmask;

	//determine prescaler
	if(irqmode & 4)
		irqmask = 7;
	else
		irqmask = 0xFF;


	//count down
	if(irqmode & 0x80) {
		irqlo--;
		if((irqlo & irqmask) == irqmask) {
			irqhi--;
			if(irqhi == 0xFF)
				dead6502_irq();
		}
	}

	//count up
	if(irqmode & 0x40) {
		irqlo++;
		if((irqlo & irqmask) == 0) {
			irqhi++;
			if(irqhi == 0)
				dead6502_irq();
		}
	}
}
Example #2
0
void fme7_line(int line,int pcycles)
{
	if((irqenabled & 0x80) == 0)
		return;
	irqcounter -= 113;
	if((irqcounter <= 0) && (irqenabled & 1))
		dead6502_irq();
}
Example #3
0
static void line(int line,int pcycles)
{
    if(irqenabled == 0)
        return;
    irqcounter += pcycles / 3;
    if(irqcounter >= irqmax)
        dead6502_irq();
}
Example #4
0
static void line(int line,int pcycles)
{
	if(irqenabled == 0)
		return;
	irqcycles -= pcycles / 3;
	if(irqcycles < 0) {
		irqenabled = 0;
		dead6502_irq();
	}
}
Example #5
0
static void clockirq(int clocks)
{
    while(clocks--) {
        if(irqcounter >= 0xFF) {
            irqcounter = irqlatch;
            dead6502_irq();
        }
        else
            irqcounter++;
    }
}
Example #6
0
void irem_h3001_line(int line,int pcycles)
{
	if(irqenabled == 0)
	   return;
	if(irqcounter == 0) {
		irqenabled = 0;
		dead6502_irq();
	}
	else
	   irqcounter--;
}
Example #7
0
static void line(int line,int pcycles)
{
	if(irqenabled == 0)
		return;
	irqcounter -= 113;
	if(irqcounter > 0x10000) {
		irqcounter &= 0xFFFF;
		irqenabled = 0;
		dead6502_irq();
	}
}