Dr Jefyll wrote:
8BIT wrote:
zero page indirect Y addressing mode [will] add 1 clock if a page boundary is crossed while computing the target address
That's true for LDA ADC CMP and many of the others. But in the case of a
write -- STA indirect Y -- the extra clock occurs
whether or not a page crossing occurs. An important piece of trivia, especially if someone does dig in and try to fix the simulator.
Note 1 from the instruction timing chart in the WDC 65C02 manual (2004 version) says:
"1. Add 1 cycle for indexing across page boundaries, or write. This cycle contains invalid addresses."
So yes, any write will contain the extra cycle needed to adjust the address pointer. It's just the read instructions that I can see.
So far, [LDA abs, x], [LDA abs, y], and [LDA (zp), y] all need an extra cycle if the page is crossed. [LDA (zp, x)] does not as it wraps back around within zero page. ADC, AND, BIT, CMP, EOR, LDA, LDX, LDY, ORA, SBC all need to be tested. With ADC and SBC, the decimal mode flag also needs to be considered, and I believe the Kowalski simulator adds a cycle correctly.
Daryl
_________________
Please visit my website ->
https://sbc.rictor.org/