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

Re: 6502 illegal opcodes questions



heuser.marcus@freenet.de wrote:
So it seems the message is, "If you have good reason to believe that
you are programming for an 'end of the line' platform, then do anything
that works--it won't matter anyway".


In my opinion this approach is too fatalistic - after all Commodore and
Atari didn't really offer CPU-upgrades. The C128 is more or less
completely compatible (illegal opcodes supported) and Atari didn't
offer anything faster or based on a more modern chip.

Therefore their programmers (third party or hobbyists) never really had
to worry about doing something "illegal" when using these opcodes.

That's what "end of the line" platform means.  No upgrades.

The fact that both companies used "custom" 6502 processors for their
machines is no doubt part of the reason that they never moved forward.

Apple on the other hand introduced the IIc quite early in comparison.
It's success and the subsequent enhancement kit for the IIe /
modernized IIe effectively killed the usage of these opcodes in the
Apple world. Side note: I would love to hear from Apple why they chose
the 65C02 - because of the much less power using CMOS design or the
additional features...

I think it was simply a matter of a modern design with multiple sources.
The ASICs in the //c and //e changed the setup and hold times so that
a 2MHz processor was needed to run reliably at 1MHz, and I'm sure there
was no quantity source for 2MHz NMOS processors by that time.

And then of course came the 68K-platforms and took over the market...

I'm not sure I'd agree with that assessment.  But it is certainly
true that 68K-heads took over the Apple management team.  ;-)

In the case of a video game machine, I wouldn't expect any compatible
upgrade path, and the entire hardware arrangement was very ideosyncratic
anyway--so there would be no reason not to do "anything that worked".


Good points.

What would be interesting to know is when did the 6502 programmers
begin using illegal/undocumented opcodes. Right from the start? I
vaguely remember hearing about them first in the mid-eighties.

Right from the start.  The first people to play with 6502s were the
hard-core experimenters, and for them, you take it all apart and put
it back together before you even turn it on the first time.  ;-)

It's only after you begin to think that code you write may be useful
on future extensions of a platform that portablity and definitions
become important.

Non-portable code is written for two quite different reasons:

1) Because the coder doesn't even think about portability or
   doesn't understand it, non-portablility happens.
2) Because the coder understands perfectly, and chooses to
   write non-portable code on purpose.  (One-time use, static
   platform, compelling need,...?)

-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."