@Test public void shouldUseTwoCyclesAsLastExecutionTime() { Instruction instruction = new Load8BitBCAddressIntoA(z80, mmu); instruction.execute(); assertEquals(2, z80.getLastInstructionExecutionTime()); }
@Override public void execute() { int address = z80.get16BitRegisterValue(Register.BC); byte memoryValue = mmu.readByte(address); z80.set8BitRegisterValue(Register.A, memoryValue); z80.setLastInstructionExecutionTime(2); }
Load8BitBCAddressIntoA extends Instruction { @Override public void execute() { int address = z80.get16BitRegisterValue(Register.BC); byte memoryValue = mmu.readByte(address); z80.set8BitRegisterValue(Register.A, memoryValue); z80.setLastInstructionExecutionTime(2); } }
Load8BitBCAddressIntoA extends Instruction { @Override public void execute() { int address = z80.get16BitRegisterValue(Register.BC); byte memoryValue = mmu.readByte(address); z80.set8BitRegisterValue(Register.A, memoryValue); z80.setLastInstructionExecutionTime(2); } Load8BitBCAddressIntoA(GBZ80 z80, MMU mmu); }
Load8BitBCAddressIntoA extends Instruction { @Override public void execute() { int address = z80.get16BitRegisterValue(Register.BC); byte memoryValue = mmu.readByte(address); z80.set8BitRegisterValue(Register.A, memoryValue); z80.setLastInstructionExecutionTime(2); } Load8BitBCAddressIntoA(GBZ80 z80, MMU mmu); @Override void execute(); }
Load8BitBCAddressIntoA extends Instruction { @Override public void execute() { int address = z80.get16BitRegisterValue(Register.BC); byte memoryValue = mmu.readByte(address); z80.set8BitRegisterValue(Register.A, memoryValue); z80.setLastInstructionExecutionTime(2); } Load8BitBCAddressIntoA(GBZ80 z80, MMU mmu); @Override void execute();  }