@Override
    public void set_irq_callback(irqcallbacksPtr callback) {
        //if(errorlog!=null) fprintf(errorlog, "Z80#%d set_irq_callback $%08x\n",cpu_getactivecpu() , (int)callback));
        if(errorlog!=null) fprintf(errorlog, "Z80#%d set_irq_callback $%08x\n",cpu_getactivecpu() , System.identityHashCode(callback));
        Z80.irq_callback = callback;
    }

    /*TODO*////****************************************************************************
    /*TODO*/// * Save CPU state
    /*TODO*/// ****************************************************************************/
    /*TODO*///void z80_state_save(void *file)
    /*TODO*///{
    /*TODO*///	int cpu = cpu_getactivecpu();
    /*TODO*///	state_save_UINT16(file, "z80", cpu, "AF", &Z80.AF.w.l, 1);
    /*TODO*///	state_save_UINT16(file, "z80", cpu, "BC", &Z80.BC.w.l, 1);
    /*TODO*///	state_save_UINT16(file, "z80", cpu, "DE", &Z80.DE.w.l, 1);
    /*TODO*///	state_save_UINT16(file, "z80", cpu, "HL", &Z80.HL.w.l, 1);
    /*TODO*///	state_save_UINT16(file, "z80", cpu, "IX", &Z80.IX.w.l, 1);
    /*TODO*///	state_save_UINT16(file, "z80", cpu, "IY", &Z80.IY.w.l, 1);
    /*TODO*///	state_save_UINT16(file, "z80", cpu, "PC", &Z80.PC.w.l, 1);
    /*TODO*///	state_save_UINT16(file, "z80", cpu, "SP", &Z80.SP.w.l, 1);
    /*TODO*///	state_save_UINT16(file, "z80", cpu, "AF2", &Z80.AF2.w.l, 1);
    /*TODO*///	state_save_UINT16(file, "z80", cpu, "BC2", &Z80.BC2.w.l, 1);
    /*TODO*///	state_save_UINT16(file, "z80", cpu, "DE2", &Z80.DE2.w.l, 1);
    /*TODO*///	state_save_UINT16(file, "z80", cpu, "HL2", &Z80.HL2.w.l, 1);
    /*TODO*///	state_save_UINT8(file, "z80", cpu, "R", &Z80.R, 1);
    /*TODO*///	state_save_UINT8(file, "z80", cpu, "R2", &Z80.R2, 1);
    /*TODO*///	state_save_UINT8(file, "z80", cpu, "IFF1", &Z80.IFF1, 1);
    /*TODO*///	state_save_UINT8(file, "z80", cpu, "IFF2", &Z80.IFF2, 1);
    /*TODO*///	state_save_UINT8(file, "z80", cpu, "HALT", &Z80.HALT, 1);
    /*TODO*///	state_save_UINT8(file, "z80", cpu, "IM", &Z80.IM, 1);
    /*TODO*///	state_save_UINT8(file, "z80", cpu, "I", &Z80.I, 1);
    /*TODO*///	state_save_UINT8(file, "z80", cpu, "irq_max", &Z80.irq_max, 1);
    /*TODO*///	state_save_INT8(file, "z80", cpu, "request_irq", &Z80.request_irq, 1);
    /*TODO*///	state_save_INT8(file, "z80", cpu, "service_irq", &Z80.service_irq, 1);
    /*TODO*///	state_save_UINT8(file, "z80", cpu, "int_state", Z80.int_state, 4);
    /*TODO*///	state_save_UINT8(file, "z80", cpu, "nmi_state", &Z80.nmi_state, 1);
    /*TODO*///	state_save_UINT8(file, "z80", cpu, "irq_state", &Z80.irq_state, 1);
    /*TODO*///	/* daisy chain needs to be saved by z80ctc.c somehow */
    /*TODO*///}
    /*TODO*///
    /*TODO*////****************************************************************************
    /*TODO*/// * Load CPU state
    /*TODO*/// ****************************************************************************/
    /*TODO*///void z80_state_load(void *file)
    /*TODO*///{
    /*TODO*///	int cpu = cpu_getactivecpu();
    /*TODO*///	state_load_UINT16(file, "z80", cpu, "AF", &Z80.AF.w.l, 1);
    /*TODO*///	state_load_UINT16(file, "z80", cpu, "BC", &Z80.BC.w.l, 1);
    /*TODO*///	state_load_UINT16(file, "z80", cpu, "DE", &Z80.DE.w.l, 1);
    /*TODO*///	state_load_UINT16(file, "z80", cpu, "HL", &Z80.HL.w.l, 1);
    /*TODO*///	state_load_UINT16(file, "z80", cpu, "IX", &Z80.IX.w.l, 1);
    /*TODO*///	state_load_UINT16(file, "z80", cpu, "IY", &Z80.IY.w.l, 1);
    /*TODO*///	state_load_UINT16(file, "z80", cpu, "PC", &Z80.PC.w.l, 1);
    /*TODO*///	state_load_UINT16(file, "z80", cpu, "SP", &Z80.SP.w.l, 1);
    /*TODO*///	state_load_UINT16(file, "z80", cpu, "AF2", &Z80.AF2.w.l, 1);
    /*TODO*///	state_load_UINT16(file, "z80", cpu, "BC2", &Z80.BC2.w.l, 1);
    /*TODO*///	state_load_UINT16(file, "z80", cpu, "DE2", &Z80.DE2.w.l, 1);
    /*TODO*///	state_load_UINT16(file, "z80", cpu, "HL2", &Z80.HL2.w.l, 1);
    /*TODO*///	state_load_UINT8(file, "z80", cpu, "R", &Z80.R, 1);
    /*TODO*///	state_load_UINT8(file, "z80", cpu, "R2", &Z80.R2, 1);
    /*TODO*///	state_load_UINT8(file, "z80", cpu, "IFF1", &Z80.IFF1, 1);
    /*TODO*///	state_load_UINT8(file, "z80", cpu, "IFF2", &Z80.IFF2, 1);
    /*TODO*///	state_load_UINT8(file, "z80", cpu, "HALT", &Z80.HALT, 1);
    /*TODO*///	state_load_UINT8(file, "z80", cpu, "IM", &Z80.IM, 1);
    /*TODO*///	state_load_UINT8(file, "z80", cpu, "I", &Z80.I, 1);
    /*TODO*///	state_load_UINT8(file, "z80", cpu, "irq_max", &Z80.irq_max, 1);
    /*TODO*///	state_load_INT8(file, "z80", cpu, "request_irq", &Z80.request_irq, 1);
    /*TODO*///	state_load_INT8(file, "z80", cpu, "service_irq", &Z80.service_irq, 1);
    /*TODO*///	state_load_UINT8(file, "z80", cpu, "int_state", Z80.int_state, 4);
    /*TODO*///	state_load_UINT8(file, "z80", cpu, "nmi_state", &Z80.nmi_state, 1);
    /*TODO*///	state_load_UINT8(file, "z80", cpu, "irq_state", &Z80.irq_state, 1);
    /*TODO*///    /* daisy chain needs to be restored by z80ctc.c somehow */
    /*TODO*///}