Thanks for this -- I'd skimmed this one some time ago but had completely forgotten it contained relevant info. The bus activity diagram doesn't help me (again: not a hardware guy), but the Table 3-1 Addressing Mode Summary, Table 5-4 Opcode Matrix, and Table 5-7 Instruction Operations don't match up cycle-count wise. I want to assume the misunderstanding is something I'm doing, not the documentation/technology, but I really don't know:creaothceann wrote:The data sheet (which is quite recent) also contains the bus activity.
Table 3-1 says for Absolute Indirect (Jump), the cycle count is 5. What's weird is: it says the cycle count of the original 6502 is 5, as well as for the 65816 is 5.
Table 5-4 says for opcode 6C (JMP (a)), the cycle count is 5. No entry in the "Cycle Count Assumes" notes under the chart apply to this opcode.
Table 5-7 says for entry 3b. Absolute Indirect (a) JMP: 5 cycles and shows the exact same data as what the GTE doc does (thus I suspect the GTE doc info originated from WDC)
And to recap: from the Programming the 65816 document:
Page 360 says for opcode 6C the cycle count is 5, with sub-notes "add 1 cycle if 65C02" and "6502: if low byte of addr is $FF: yields incorrect result" (known 6502 page wrap bug).
Chapter 19 for Instruction Lists says the same thing as Page 360.
Page 436 of an opcode chart says for opcode 6C, the cycle count is 5.
We do know the WDC PDF contains several mistakes all over the place (that's how/why I Emailed them some time ago and got a response from Bill Mensch acknowledging the mistakes). However, I also own the original Lichty/Eyes book (which contains basically both of WDC's above documents), but there's no difference in what's depicted.
I wonder if the 6 cycle thing is somehow truly a 65c02 specific detail, and that proper page wrapping (as implemented on the 65816) doesn't cost an additional cycle -- i.e. the 65c02 had some "kludge" put in place to fix the JMP ($xxFF) bug that cost an extra cycle, which was later alleviated on the 65816 (where the bug is also fixed) sans the cycle penalty.
I should probably just ask WDC. Sorry for getting hung up on a single opcode, but I do find it strange.