While the WDC documents are not consistent across many versions of the W65C02 datasheet, it does elude in many that the zero page indirect Y addressing mode will add 1 clock if a page boundary is crossed while computing the target address. I confirmed this using the Visual6502 simulator.
So an LDA (zp),Y instruction will take 5 cycles to complete with no page crossing and 6 cycles if there is a page crossing. The Kowalski simulator calculates 5 cycles regardless of page crossing.
Here is my test code:
Code: Select all
*= $1000
LDA #$E0 ; Load $02E0 into $80
STA $80
LDA #$02
STA $81
LDY #$20 ; set index to $20
LDA ($80),Y ; get value at $0300 ($02E0 + $20)
STA $82Code: Select all
12 000a b1 1 LDA (zp),Y 000a 02 00 20 fd nv‑BdIzc
12 000a b1 1 LDA (zp),Y 000a 02 00 20 fd nv‑BdIzc
13 000b 80 1 000b 02 00 20 fd nv‑BdIzc
13 000b 80 1 000b 02 00 20 fd nv‑BdIzc
14 0080 e0 1 000c 02 00 20 fd nv‑BdIzc
14 0080 e0 1 000c 02 00 20 fd nv‑BdIzc
15 0081 02 1 000c 02 00 20 fd nv‑BdIzc
15 0081 02 1 000c 02 00 20 fd nv‑BdIzc
16 0200 00 1 000c 02 00 20 fd nv‑BdIzc
16 0200 00 1 000c 02 00 20 fd nv‑BdIzc
17 0300 00 1 000c 02 00 20 fd nv‑BdIzc
17 0300 00 1 000c 02 00 20 fd nv‑BdIzcDaryl