Core/cpu/konami/konami.cpp
/* Generate interrupts */
/****************************************************************************
 * Set IRQ line state
 ****************************************************************************/
Generate interrupts
Set IRQ line state
Generate interrupts Set IRQ line state
void konami_set_irq_line(int irqline, int state)
{
#if defined FBA_DEBUG
	if (!DebugCPU_KonamiInitted) bprintf(PRINT_ERROR, _T("konami_set_irq_line called without init\n"));
#endif
	if (irqline == KONAMI_INPUT_LINE_NMI)
	{
		if (konami.nmi_state == state) return;
		konami.nmi_state = state;
		if( state == KONAMI_CLEAR_LINE ) return;
	    if( !(konami.int_state & KONAMI_LDS) ) return;
	    konami.int_state &= ~KONAMI_SYNC;
		if( konami.int_state & KONAMI_CWAI )
		{
			konami.int_state &= ~KONAMI_CWAI;
			konami.extra_cycles += 7;	
	    }
		else
		{
			CC |= CC_E; 				
			PUSHWORD(pPC);
			PUSHWORD(pU);
			PUSHWORD(pY);
			PUSHWORD(pX);
			PUSHBYTE(DP);
			PUSHBYTE(B);
			PUSHBYTE(A);
			PUSHBYTE(CC);
			konami.extra_cycles += 19;	
		}
		CC |= CC_IF | CC_II;			
		PCD = RM16(0xfffc);
		change_pc(PC);					
	}
	else if (irqline < 2)
	{
		konami.irq_state[irqline] = state;
		if (state == KONAMI_CLEAR_LINE) return;
		CHECK_IRQ_LINES;
	}
}
void konami_set_irq_line ( int irqline , int state ) { #if defined FBA_DEBUG if ( ! DebugCPU_KonamiInitted ) bprintf ( PRINT_ERROR , _T ( " \n " ) ) ; #endif if ( irqline == KONAMI_INPUT_LINE_NMI ) { if ( konami . nmi_state == state ) return ; konami . nmi_state = state ; if ( state == KONAMI_CLEAR_LINE ) return ; if ( ! ( konami . int_state & KONAMI_LDS ) ) return ; konami . int_state &= ~ KONAMI_SYNC ; if ( konami . int_state & KONAMI_CWAI ) { konami . int_state &= ~ KONAMI_CWAI ; konami . extra_cycles += 7 ; } else { CC |= CC_E ; PUSHWORD ( pPC ) ; PUSHWORD ( pU ) ; PUSHWORD ( pY ) ; PUSHWORD ( pX ) ; PUSHBYTE ( DP ) ; PUSHBYTE ( B ) ; PUSHBYTE ( A ) ; PUSHBYTE ( CC ) ; konami . extra_cycles += 19 ; } CC |= CC_IF | CC_II ; PCD = RM16 ( 0xfffc ) ; change_pc ( PC ) ; } else if ( irqline < 2 ) { konami . irq_state [ irqline ] = state ; if ( state == KONAMI_CLEAR_LINE ) return ; CHECK_IRQ_LINES ; } }
Generate interrupts
 Set IRQ line state
Generate interrupts Set IRQ line state
//	LOG(("KONAMI#%d set_nmi_line %d\n", cpu_getactivecpu(), state)); /* if the stack was not yet initialized */ /* state already saved by CWAI? */ /* subtract +7 cycles next time */ /* save entire state */ /* subtract +19 cycles next time */ /* inhibit FIRQ and IRQ */ /* TS 971002 */ //	LOG(("KONAMI#%d set_irq_line %d, %d\n", cpu_getactivecpu(), irqline, state));