@Override
    public void set_irq_line(int irqline, int state) {
        I.irq_state = state;
        if (state == CLEAR_LINE) {
            if (I.IF == 0) {
                I.pending_irq &= ~INT_IRQ;
            }
        } else {
            if (I.IF != 0) {
                I.pending_irq |= INT_IRQ;
            }
        }
    }