GroovyBee, on Thu Nov 26, 2009 11:27 AM, said:
eshu, on Thu Nov 26, 2009 9:53 AM, said:
No problem, I'm happy to help.
Quote
Some of the 6502 books I have get the sequence of events wrong too. Confusingly one book I have (6502 Reference Guide) gets the PLA sequence wrong in chapter 4 (which is a brief overview of instructions) and then correct in chapter 5 (detailed instruction description). I'd recommend that you find yourself a real 6502 datasheet (from a silicon manufacturer) for the low down on the instructions.
I have a nice book called "Programming the 6502" by Rodney Zaks, that was still sitting on the bookshelf of my old room at my parents house, after about 15 years gathering dust

- I haven't spotted any errors in this yet - I usually use this in conjunction with
http://www.6502.org/...502opcodes.html but that list has the cycle count for AND zp,X wrong which caused me a load of grief at one point
The one thing I really struggle for is a definitive list of stable illegal/undocumented opcodes, I use
http://members.chell...ga/illopc31.txt and
http://nesdev.parodi...nstructions.txt - but i'm not 100% sure on what is considered stable on the 2600 in all it's varieties. I use SAX and LAX and i'm pretty sure these are considered stable, and I know DCP is used by quite a few people. The ATX/OAL/LXA opcode would be really handy to me, but I think from
http://www.biglist.c...1/msg00244.html that it is unstable
I got confused about the SP, possibly because the description of it is wrong in a few sources by the sound of it - and that article was the first concrete example I had found and I wanted it to be right because TSX, BEQ would save me two cycles in a kernel loop which i'm struggling to keep down to few enough cycles

I can still sort of use it I think but I'll have to pull CXM0P0 on the last run of the loop which will probably squeeze me for cycles elsewhere, but that's all part of the challange I guess...