@Test public void shouldUseThreeCyclesAsLastExecutionTime() { Instruction instruction = new Load8BitPortAddressImmPCIntoA(z80, mmu); instruction.execute(); assertEquals(3, z80.getLastInstructionExecutionTime()); }
@Override public void execute() { int address = (mmu.readByte(z80.getProgramCounter()) & 0xFF) + 0xFF00; byte memoryValue = mmu.readByte(address); z80.set8BitRegisterValue(Register.A, memoryValue); z80.incrementProgramCounter(); z80.setLastInstructionExecutionTime(3); }
Load8BitPortAddressImmPCIntoA extends Instruction { @Override public void execute() { int address = (mmu.readByte(z80.getProgramCounter()) & 0xFF) + 0xFF00; byte memoryValue = mmu.readByte(address); z80.set8BitRegisterValue(Register.A, memoryValue); z80.incrementProgramCounter(); z80.setLastInstructionExecutionTime(3); } }
Load8BitPortAddressImmPCIntoA extends Instruction { @Override public void execute() { int address = (mmu.readByte(z80.getProgramCounter()) & 0xFF) + 0xFF00; byte memoryValue = mmu.readByte(address); z80.set8BitRegisterValue(Register.A, memoryValue); z80.incrementProgramCounter(); z80.setLastInstructionExecutionTime(3); } Load8BitPortAddressImmPCIntoA(GBZ80 z80, MMU mmu); }
Load8BitPortAddressImmPCIntoA extends Instruction { @Override public void execute() { int address = (mmu.readByte(z80.getProgramCounter()) & 0xFF) + 0xFF00; byte memoryValue = mmu.readByte(address); z80.set8BitRegisterValue(Register.A, memoryValue); z80.incrementProgramCounter(); z80.setLastInstructionExecutionTime(3); } Load8BitPortAddressImmPCIntoA(GBZ80 z80, MMU mmu); @Override void execute(); }
Load8BitPortAddressImmPCIntoA extends Instruction { @Override public void execute() { int address = (mmu.readByte(z80.getProgramCounter()) & 0xFF) + 0xFF00; byte memoryValue = mmu.readByte(address); z80.set8BitRegisterValue(Register.A, memoryValue); z80.incrementProgramCounter(); z80.setLastInstructionExecutionTime(3); } Load8BitPortAddressImmPCIntoA(GBZ80 z80, MMU mmu); @Override void execute();  }