public OpCode(byte code, Instruction instruction, Addressing addressing, FetchByte fetchBytes, int cycles, CycleOption option) { this.Code = code; this.Inst = instruction; this.AddressingMode = addressing; this.FetchBytes = fetchBytes; this.Cycles = cycles; this.Option = option; }
public void TotalCycles(CycleOption options, CpuRegister cpu, int expectCycles) { // default 1cycのテスト用のOpCodeを設定 var opcode = new OpCode(0x00, Instruction.ADC, Addressing.Implied, new FetchByte(1), 1, options); var cylces = opcode.GetTotalCycles(cpu); Assert.Equal(expectCycles, cylces); }