Description
The IndirectY (Indirect Indexed) addressing mode doesn't check for page boundary crossings, but according to 6502 specifications, it should add an extra cycle when the indexed address crosses a page boundary.
Location
6502/6502.cc:397-400
Current Code
case AddressingMode::IndirectY:
address = readByteAtPC();
address = readWord(address) + Y;
break;
Expected Behavior
Similar to AbsoluteX and AbsoluteY modes (lines 376-387), the IndirectY mode should:
- Check if adding Y to the base address crosses a page boundary
- Add an extra cycle if the PageBoundary flag is set for the instruction
Impact
This affects cycle-accurate emulation for instructions using IndirectY addressing mode.
Reference
See how AbsoluteX/AbsoluteY use the updateCycles() lambda to handle this.
Description
The
IndirectY(Indirect Indexed) addressing mode doesn't check for page boundary crossings, but according to 6502 specifications, it should add an extra cycle when the indexed address crosses a page boundary.Location
6502/6502.cc:397-400Current Code
Expected Behavior
Similar to
AbsoluteXandAbsoluteYmodes (lines 376-387), theIndirectYmode should:Impact
This affects cycle-accurate emulation for instructions using IndirectY addressing mode.
Reference
See how AbsoluteX/AbsoluteY use the
updateCycles()lambda to handle this.