lidnariq wrote:
Opcode $29 is not LDA. (It's AND)
You're right, I thought of AND but wrote LDA.
Movax12 wrote:
I have no reason to doubt this favorite page for 6502 instructions:
http://www.obelisk.demon.co.uk/6502/reference.htmlMe neither, in fact I based my CPU emulator on that page.
lidnariq wrote:
Also, where exactly in FCEUX's source do you think it says AND #imm takes 3 cycles?
Now that I reviewed FCEUX's source, it says 2.
I had the cycle table copied from FCEUX, but I must have changed the 2 to 3 after I read in this forum that it was so (I commented in my code that Bregalad said that, but I could be wrong about that too) so I atributed the 3 to FCEUX, but it was actually me.
Mistery solved, thanks guys.
TL;DR: it's 2 cycles, not 3.
Edit: this is the post I'm talking about:
http://forums.nesdev.com/viewtopic.php?t=6183#p58516Bregalad wrote:
... according to this. :
http://www.6502.org/tutorials/6502opcodes.htmlHowever this page contains at least 1 error : and $xx is 3 cycles and not 2...
Although now that I read it, by "and $xx" he might be referring to zero page, and not immediate, but AND zero page IS actually 3 cycles on that page.