@Override
    public void set_context(Object reg) {
        Z80_Regs Regs = (Z80_Regs)reg;
        Z80.PREPC.SetD(Regs.PREPC.D);
        Z80.PC.SetD(Regs.PC.D);
        Z80.SP.SetD(Regs.SP.D);
        Z80.AF.SetD(Regs.AF.D);
        Z80.BC.SetD(Regs.BC.D);
        Z80.DE.SetD(Regs.DE.D);
        Z80.HL.SetD(Regs.HL.D);
        Z80.IX.SetD(Regs.IX.D);
        Z80.IY.SetD(Regs.IY.D);
        Z80.AF2.SetD(Regs.AF2.D);
        Z80.BC2.SetD(Regs.BC2.D);
        Z80.DE2.SetD(Regs.DE2.D);
        Z80.HL2.SetD(Regs.HL2.D);
        Z80.R = Regs.R;
        Z80.R2 = Regs.R2;
        Z80.IFF1 = Regs.IFF1;
        Z80.IFF2 = Regs.IFF2;
        Z80.HALT = Regs.HALT;
        Z80.IM = Regs.IM;
        Z80.I = Regs.I;
        Z80.irq_max = Regs.irq_max;
        Z80.request_irq = Regs.request_irq;
        Z80.service_irq = Regs.service_irq;
        Z80.nmi_state = Regs.nmi_state;
        Z80.irq_state = Regs.irq_state;
       // public int /*UNIT8*/ int_state[] = new int[Z80_MAXDAISY];//DAISY CHAIN TODO!!
       // public Z80_DaisyChain[] irq = new Z80_DaisyChain[Z80_MAXDAISY];
        Z80.irq_callback = Regs.irq_callback;
        Z80.extra_cycles = Regs.extra_cycles;
    
    }