public LD(FullAddress to, IByteRegister from, string opcodeStr, int cycles, Action customLogic = null) { _executor = () => { Bus.MMU.SetByte(to.Value, from.Get()); customLogic?.Invoke(); Bus.CPU.Registers.PC.Increment((ushort)(to.Source == AddressSource.Register ? 1 : 3)); opcodeStr = opcodeStr.Replace("a16", $"0x{to.Value:X}"); return(new ExecutedOpcode(cycles, opcodeStr, OpcodeType.LD)); }; }
public RegisterPair(RegisterId id, IByteRegister hi, IByteRegister lo) { Id = id; _hi = hi; _lo = lo; }