[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 6502 illegal opcodes questions



Don Bruder wrote:
In article <j7Wdne2Ir5coidDZnZ2dnUVZ_vydnZ2d@comcast.com>,
 "Michael J. Mahon" <mjmahon@aol.com> wrote:


sicklittlemonkey wrote:

(From Linards)


Is it documented anywhere which of these opcodes have which cycle counts?


Without checking, they should be the same as the corresponding LDA
opcode with the relevant addressing mode.

(From Marcus)


There are some discrepancies between the different info files floating around the net.


Yes, I've been collecting these, and collating the information for some
time.

Since there were several versions of the 6502, isn't it likely that
some had *differing* illegal ops and results?


Not just likely - Absolutely certain. I've long since forgotten the source, but there used to be a listing of how the various "illegal" opcodes differed from chip version to chip version, and only a very tiny handful of them that worked on one version would work (or even do ANYTHING) on another version. (which, of course, is why they're "illegal" or "unsupported" or "undocumented" opcodes - You can't rely on them except on *THAT PARTICULAR CHIP*, and in some cases, not even then because the "what comes out the other end" can be influenced by the state of RAM, I/O locations, or other things that may or may not be duplicatable from one machine to the next!)

Actually, that was my point.

It's a tribute to the naivete of early game programmers that they
thought it would be OK to use undefined instructions.  It's a good
way of making sure that a game will become obsolete as models advance.

And anyone who couldn't discipline themselves to "get the job done"
on time and under budget by using only documented opcodes isn't much
of a programmer.  The whole thing reeks of high school...  ;-)

-michael

Music synthesis for 8-bit Apple II's!
Home page:  http://members.aol.com/MJMahon/

"The wastebasket is our most important design
tool--and it is seriously underused."