From: Michael J. Mahon on
heuser.marcus(a)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."
From: Sam Gillett on

<heuser.marcus(a)freenet.de> wrote ...
>
> 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.

I remember hearing about undocumented opcodes in the mid 80's. But I don't
think I heard the term "illegal opcodes" was used in the Commodore world back
then. Perhaps what was called "undocumented" in the Commodore world was
called "illegal" in the Apple world?

Then, when the two worlds crossed paths via Usenet the difference between
illegal and undocumented became blurred. I suppose we will get over it when
all the 8-bit processors die and go to silicon heaven. :-)
--
Best regards,

Sam Gillett

Change is inevitable,
except from vending machines!



From: heuser.marcus on
> I suppose we will get over it when all the 8-bit processors die and
> go to silicon heaven. :-)

Never, then.

;o)

bye
Marcus

From: Michael J. Mahon on
Sam Gillett wrote:
> <heuser.marcus(a)freenet.de> wrote ...
>
>>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.
>
>
> I remember hearing about undocumented opcodes in the mid 80's. But I don't
> think I heard the term "illegal opcodes" was used in the Commodore world back
> then. Perhaps what was called "undocumented" in the Commodore world was
> called "illegal" in the Apple world?

The difference between the two terms is dependent on point of view.

The chip/system designer tends to regard undocumented or undefined
behavior as the territory reserved for future expansion. Of course,
if the space is not protected, either by trapping or by behaving
as a NOP, then it is "reserved" only by convention, not by silicon.

The on-the-metal programmer sometimes feels that "undefined" is just
an invitation to experiment, and proceeds to at least document, if
not define, the actions that the chip designer did not intend and
has no intention to preserve.

If a chip/system is successful, there comes a time when follow-on
designs are done. If the officially undefined behaviors have become
sufficiently widely used, then they represent a barrier to the orderly
expansion of the design--such as new instructions requiring previously
undefined opcodes that may have been widely, but unwisely, used.

The new designer quickly comes to resent any such barriers, and would
therefore like to think of them as prohibited, or "illegal", but what
is really missing is discipline--on the part of the original designer,
who failed to "protect" the undefined space (to save a few transistors),
and on the part of coders who couldn't resist the temptation to use
whatever they found--even without any guarantee of future support
(to save a cycle or two).

Ironically, the combination of these two lapses in discipline can result
in there being no acceptable space for the expansion of a design, and
therefore they mortgage the future for a pittance today.

(If it isn't obvious, I've played both the designer's part and, earlier,
the coder's part. ;-)

-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."
From: Stephen Harris on
Michael J. Mahon <mjmahon(a)aol.com> wrote:
> is really missing is discipline--on the part of the original designer,
> who failed to "protect" the undefined space (to save a few transistors),

Not really. At the time every gate on the chip was expensive and saving
them was a valid concern. When I studied VLSI design we called these
undefined cased "Don't care" conditions; invalid input meant we didn't
care about the output. You can see this on some cheap LED digital
clocks where pressing wierd button combinations can cause odd displays;
invalid input. That can actually cut down the number of gates by 20%
or more and so reduce the cost, accordingly.

Handling these "don't care" conditions actually requires a level of
optimisation which doesn't exist in a naive design. So it's not a case
of the designers failing to protect the undefined space, but of them
optimising the circuitry for efficiency.

It is a valid design decision.

With the 6502 essentially not having a microcode level, this
optimisation is exposed to the programmer. This also shows up in the
regularity of the opcodes, and allowed hackers to make educated guesses
as to what the undocumented codes could do.

--
Stephen Harris
usenet(a)spuddy.org
The truth is the truth, and opinion just opinion. But what is what?
My employer pays to ignore my opinions; you get to do it for free.
First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Prev: what happened CBM=VGA
Next: 1581 Drive Kits on eBay