Skip to content

Commit

Permalink
Fix bug: Add transition from zeropage2 to modify1 for RMW instructions.
Browse files Browse the repository at this point in the history
  • Loading branch information
brianhuffman committed Sep 10, 2022
1 parent 7a09f68 commit ea62c99
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion verilog/cpu6502.sv
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,8 @@ module cpu6502
control.adl.index = 1;
control.index.inc = opcode_indirect_x;
next_state.indirect = opcode_indirect_x; // xxx_000_x1 (01,03)
next_state.byte1 = ~opcode_indirect_x; // xxx_101_xx (14,15,16,17)
next_state.modify1 = ~opcode_indirect_x & opcode_modify;
next_state.byte1 = ~opcode_indirect_x & ~opcode_modify;
end

if (reg_state.byte3)
Expand Down

0 comments on commit ea62c99

Please sign in to comment.