private static void TestPrefixEd(PrefixEdOpCode op, OpCode expected) { using (var fixture = new DecodeFixture(4, 16, PrimaryOpCode.Prefix_ED, op).ThrowUnlessZ80()) { fixture.Expected.OpCode(expected); } }
private static void TestZ80(PrefixEdOpCode op, OpCode excepted, int machineCycles = 4, int throttlingStates = 16) { using (var fixture = new DecodeFixture(machineCycles, throttlingStates, PrimaryOpCode.Prefix_ED, op).ThrowUnlessZ80()) { fixture.Expected.OpCode(excepted); } }
private static void TestZ80(PrefixEdOpCode op, Operand o0, OpCode excepted = OpCode.Input, int machineCycles = 3, int throttlingStates = 12) { using (var fixture = new DecodeFixture(machineCycles, throttlingStates, PrimaryOpCode.Prefix_ED, op).ThrowUnlessZ80()) { fixture.Expected.OpCode(excepted).Operands(o0, Operand.C); } }
private static void TestZ80(PrefixEdOpCode op, Operand o0, Operand o1) { using (var fixture = new DecodeFixture(2, 9, PrimaryOpCode.Prefix_ED, op).ThrowUnlessZ80()) { fixture.Expected.OpCode(OpCode.Load).Operands(o0, o1); } }
public void SBC_HL_s(PrefixEdOpCode op, Operand s) { using (var fixture = new DecodeFixture(4, 15, PrimaryOpCode.Prefix_ED, op).ThrowUnlessZ80()) { fixture.Expected.OpCode(OpCode.SubtractWithCarry16).Operands(Operand.HL, s); } }
private static void TestZ80WordIndexed(PrefixEdOpCode op, Operand o0, Operand o1) { var literal = Rng.Word(); using (var fixture = new DecodeFixture(6, 20, PrimaryOpCode.Prefix_ED, op, literal).ThrowUnlessZ80()) { fixture.Expected.OpCode(OpCode.Load16).Operands(o0, o1).WordLiteral(literal); } }
public void OUT_r_C(PrefixEdOpCode op, Operand r) => TestZ80(op, r, OpCode.Output);
public void IN_r_C(PrefixEdOpCode op, Operand r) => TestZ80(op, r);
public void LD_mnn_dd(PrefixEdOpCode op, Operand dd) => TestZ80WordIndexed(op, Operand.mnn, dd);
public void LD_dd_mnn(PrefixEdOpCode op, Operand dd) => TestZ80WordIndexed(op, dd, Operand.mnn);