Exemple #1
0
        public void Reset()
        {
            eFlags = CPUFlags.ZF | CPUFlags.IF;

            PMode = false;

            EIP = 0;
            CS  = 0;
            EAX = 0;
            EBX = 0;
            ECX = 0;
            EDX = 0;
            EBP = 0;
            ESP = 0;
            ESI = 0;
            EDI = 0;
            DS  = 0;
            ES  = 0;
            FS  = 0;
            GS  = 0;

            Halted          = false;
            opSize          = addressSize = codeSize = 16;
            disasm.CodeSize = codeSize;
        }
Exemple #2
0
        void UnsetFlag(CPUFlags flag)
        {
            CPUFlags state = (CPUFlags)registers.Read <uint64_t>(Register.FLAGS).Value;

            state = state & ~flag;
            registers.Write <uint64_t>(Register.FLAGS, (ulong)state);
        }
Exemple #3
0
        private void UpdateAfterPause()
        {
            CPUFlags.UpdateFlags(Engine);
            RaisePropertyChanged(nameof(CPUFlags));

            PPUFlags.UpdateFlags(Engine);
            RaisePropertyChanged(nameof(PPUFlags));

            SelectedValue = CPUFlags.RawProgramCounter;
            RaisePropertyChanged(nameof(SelectedValue));
        }
Exemple #4
0
 private void SetFlag(CPUFlags flag, bool value)
 {
     if (value)
     {
         eFlags |= flag;
     }
     else
     {
         eFlags &= ~flag;
     }
 }
Exemple #5
0
        bool HasFlag(CPUFlags flag)
        {
            CPUFlags state = (CPUFlags)registers.Read <uint64_t>(Register.FLAGS).Value;

            return((state & flag) == flag);
        }
Exemple #6
0
 private void SetFlag(CPUFlags flag, bool value)
 {
     if (value)
         eFlags |= flag;
     else
         eFlags &= ~flag;
 }
Exemple #7
0
 private bool GetFlag(CPUFlags flag)
 {
     return (eFlags & flag) == flag;
 }
Exemple #8
0
        public void Reset()
        {
            eFlags = CPUFlags.ZF | CPUFlags.IF;

            PMode = false;

            EIP = 0;
            CS = 0;
            EAX = 0;
            EBX = 0;
            ECX = 0;
            EDX = 0;
            EBP = 0;
            ESP = 0;
            ESI = 0;
            EDI = 0;
            DS = 0;
            ES = 0;
            FS = 0;
            GS = 0;

            Halted = false;
            opSize = addressSize = codeSize = 16;
            disasm.CodeSize = codeSize;
        }
Exemple #9
0
 public AbraxasCPU(ushort ram_size)
 {
     flags    = new CPUFlags();
     memory   = new RAM(size);
     registry = new CPURegistry();
 }
Exemple #10
0
 private bool GetFlag(CPUFlags flag)
 {
     return((eFlags & flag) == flag);
 }