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; }
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); }
private void UpdateAfterPause() { CPUFlags.UpdateFlags(Engine); RaisePropertyChanged(nameof(CPUFlags)); PPUFlags.UpdateFlags(Engine); RaisePropertyChanged(nameof(PPUFlags)); SelectedValue = CPUFlags.RawProgramCounter; RaisePropertyChanged(nameof(SelectedValue)); }
private void SetFlag(CPUFlags flag, bool value) { if (value) { eFlags |= flag; } else { eFlags &= ~flag; } }
bool HasFlag(CPUFlags flag) { CPUFlags state = (CPUFlags)registers.Read <uint64_t>(Register.FLAGS).Value; return((state & flag) == flag); }
private void SetFlag(CPUFlags flag, bool value) { if (value) eFlags |= flag; else eFlags &= ~flag; }
private bool GetFlag(CPUFlags flag) { return (eFlags & flag) == flag; }
public AbraxasCPU(ushort ram_size) { flags = new CPUFlags(); memory = new RAM(size); registry = new CPURegistry(); }
private bool GetFlag(CPUFlags flag) { return((eFlags & flag) == flag); }