public virtual void Decode(MOS6502 cpu, byte cycle) { if (cycle == 0) { cpu.Target = new Target(cpu); } }
public virtual void Decode(MOS6502 cpu, byte cycle) { if (cycle == 0) { cpu.Target = new WritableTarget(cpu, (ushort)((cpu.Memory.Read(cpu.State.PC.Value) + cpu.State.Y.Value) & 0xff)); cpu.State.PC.Next(); } }
public virtual void Decode(MOS6502 cpu, byte cycle) { if (cycle == 0) { ushort offset = cpu.Memory.Read(cpu.State.PC.Value); cpu.State.PC.Next(); cpu.Target = new WritableTarget(cpu, (ushort)(cpu.State.PC.Value + (sbyte)offset)); } }
public virtual void Decode(MOS6502 cpu, byte cycle) { if (cycle == 0) { cpu.Target = new IndirectTarget(cpu, (byte)(cpu.Memory.Read(cpu.State.PC.Value) + cpu.State.X.Value)); cpu.State.PC.Next(); } else if (cycle < 3) { cpu.Target.BuildAddress(cpu.Memory.Read(((IndirectTarget)cpu.Target).TempAddress++)); } }
public virtual void Decode(MOS6502 cpu, byte cycle) { if (cycle == 0) { cpu.Target = new WritableTarget(cpu); } if (cycle < 2) { cpu.Target.BuildAddress(cpu.Memory.Read(cpu.State.PC.Value)); cpu.State.PC.Next(); } }
public static AddressedTarget ReadTargetFromStateFile(MOS6502 cpu, C64Interfaces.IFile stateFile) { switch (stateFile.ReadByte()) { case (byte)TargetTypes.ReadableTarget: return(new ReadableTarget(cpu, stateFile)); case (byte)TargetTypes.WritableTarget: return(new WritableTarget(cpu, stateFile)); case (byte)TargetTypes.IndirectTarget: return(new IndirectTarget(cpu, stateFile)); case (byte)TargetTypes.AccumulatorTarget: return(new AccAddressing.Target(cpu)); case (byte)TargetTypes.ImmediateTarget: return(new ImmAddressing.Target(cpu, stateFile)); } return(null); }
public WritableTarget(MOS6502 cpu, ushort address) : base(cpu, address) { }
public Target(MOS6502 cpu) { _state = cpu.State; }
public ReadableTarget(MOS6502 cpu, ushort address) { _cpu = cpu; _address = address; }
public IndirectTarget(MOS6502 cpu, ushort tempAddress) : base(cpu) { _tempAddress = tempAddress; }
public virtual void Decode(MOS6502 cpu, byte cycle) { if (cycle == 0) cpu.Target = new Target(cpu); }
public Target(MOS6502 cpu) : base(cpu, cpu.State.PC.Value) { _cpu.State.PC.Next(); }
public IndirectTarget(MOS6502 cpu, C64Interfaces.IFile stateFile) : base(cpu, stateFile) { _tempAddress = stateFile.ReadWord(); _tempPart = stateFile.ReadByte(); }
public ReadableTarget(MOS6502 cpu, C64Interfaces.IFile stateFile) : this(cpu, stateFile.ReadWord()) { _part = stateFile.ReadByte(); }
public ReadableTarget(MOS6502 cpu) : this(cpu, 0) { }
public virtual void Decode(MOS6502 cpu, byte cycle) { if (cycle == 0) { cpu.Target = new IndirectTarget(cpu, cpu.Memory.Read(cpu.State.PC.Value)); cpu.State.PC.Next(); } else if (cycle < 3) { cpu.Target.BuildAddress(cpu.Memory.Read(((IndirectTarget)cpu.Target).TempAddress++)); if (cycle == 2) cpu.Target.MoveAddress(cpu.State.Y.Value); } }
public IndirectTarget(MOS6502 cpu) : base(cpu) { }
public WritableTarget(MOS6502 cpu) : base(cpu) { }
public virtual void Decode(MOS6502 cpu, byte cycle) { }
public Target(MOS6502 cpu, C64Interfaces.IFile stateFile) : base(cpu, stateFile) { }
public WritableTarget(MOS6502 cpu, C64Interfaces.IFile stateFile) : base(cpu, stateFile) { }
public static AddressedTarget ReadTargetFromStateFile(MOS6502 cpu, C64Interfaces.IFile stateFile) { switch (stateFile.ReadByte()) { case (byte)TargetTypes.ReadableTarget: return new ReadableTarget(cpu, stateFile); case (byte)TargetTypes.WritableTarget: return new WritableTarget(cpu, stateFile); case (byte)TargetTypes.IndirectTarget: return new IndirectTarget(cpu, stateFile); case (byte)TargetTypes.AccumulatorTarget: return new AccAddressing.Target(cpu); case (byte)TargetTypes.ImmediateTarget: return new ImmAddressing.Target(cpu, stateFile); } return null; }
public virtual void Decode(MOS6502 cpu, byte cycle) { if (cycle == 0) { cpu.Target = new WritableTarget(cpu); cpu.Target.BuildAddress(cpu.Memory.Read(cpu.State.PC.Value)); cpu.State.PC.Next(); } else if (cycle == 1) { cpu.Target.BuildAddress(cpu.Memory.Read(cpu.State.PC.Value)); cpu.State.PC.Next(); cpu.Target.MoveAddress(cpu.State.Y.Value); } }