@Override
    public void set_irq_line(int irqline, int state) {
	int eddge;

	if (m6800.irq_state[irqline] == state) return;
	//LOG((errorlog, "M6800#%d set_irq_line %d,%d\n", cpu_getactivecpu(), irqline, state));
	m6800.irq_state[irqline] = state;

	switch(irqline)
	{
	case M6800_IRQ_LINE:
		if (state == CLEAR_LINE) return;
		break;
	case M6800_TIN_LINE:
		eddge = (state == CLEAR_LINE ) ? 2 : 0;
		if( ((m6800.tcsr&TCSR_IEDG) ^ (state==CLEAR_LINE ? TCSR_IEDG : 0))==0 )
			return;
		/* active eddge in */
		m6800.tcsr |= TCSR_ICF;
		m6800.pending_tcsr |= TCSR_ICF;
		m6800.input_capture = (int)m6800.counter.L;
		MODIFIED_tcsr();
		if( (m6800.cc & 0x10)==0 )
			CHECK_IRQ2();
		break;
	default:
		return;
	}
	CHECK_IRQ_LINES(); /* HJB 990417 */
    }