Skip to content

Commit

Permalink
#5 Fix for wrong instruction cycle count, all instructions took one c…
Browse files Browse the repository at this point in the history
…ycle too many
  • Loading branch information
hagronnestad committed May 9, 2020
1 parent 8d6c6a2 commit 1800f64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion MicroProcessor/Cpu6502/Cpu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ public void Step(bool ignoreCycles = false) {

// Keeps track of needed cycles to complete the current instruction
// ignoreCycles = true is used to step the CPU with a debugger
if (!ignoreCycles) _cyclesRemainingCurrentInstruction += OpCode.Cycles;
if (!ignoreCycles) _cyclesRemainingCurrentInstruction += OpCode.Cycles - 1;
}

public void Reset() {
Expand Down

0 comments on commit 1800f64

Please sign in to comment.