示例#1
0
        protected override void LoadRegisters(Z80 cpu)
        {
            cpu.RaiseRESET();

            cpu.IV = this.Peek(Offset_I);

            cpu.HL.Word = this.PeekWord(Offset_HL_);
            cpu.DE.Word = this.PeekWord(Offset_DE_);
            cpu.BC.Word = this.PeekWord(Offset_BC_);
            cpu.AF.Word = this.PeekWord(Offset_AF_);

            cpu.Exx();

            cpu.HL.Word = this.PeekWord(Offset_HL);
            cpu.DE.Word = this.PeekWord(Offset_DE);
            cpu.BC.Word = this.PeekWord(Offset_BC);

            cpu.IY.Word = this.PeekWord(Offset_IY);
            cpu.IX.Word = this.PeekWord(Offset_IX);

            cpu.IFF2    = (this.Peek(Offset_IFF2) >> 2) != 0;
            cpu.REFRESH = this.Peek(Offset_R);

            cpu.ExxAF();

            cpu.AF.Word = this.PeekWord(Offset_AF);
            cpu.SP.Word = this.PeekWord(Offset_SP);
            cpu.IM      = this.Peek(Offset_IM);
        }