Hacker News new | ask | show | jobs
by PhantomGremlin 4227 days ago
Not a bad talk, considering that the guy wasn't even alive when the original 6502 was designed. He was confused on a few minor points, some of which Wikipedia clears up.[1][2]

a) There were really two chips done, the 6501 and 6502. The difference was in a few pins, the 6501 was fully pin-compatible with the 6800, the 6502 was easier to use in a system design since it did not require a two-phase non-overlapping 5V rail-to-rail clock.

b) The 6501 cost $20, the 6502 cost $25. Quantity 1. They ran at 1 MHz. You could send a letter to the company in Pennsylvania, with a check enclosed, and buy 1 chip for that price. Try buying one CPU chip from Intel nowadays. :)

c) The lawsuit by Motorola that he mentions resulted in MOS agreeing to discontinue the 6501. But that didn't matter much for 99% of their potential customers. First, the pin differences were very minor. Second, the TTL-level clock input in the 6502 meant that an external clock driver chip wasn't needed.

[1] http://en.wikipedia.org/wiki/MOS_Technology_6502 [2] http://en.wikipedia.org/wiki/Motorola_6800

2 comments

I forgot to mention another thing he didn't know was useful

d) BCD instructions, which he thinks are "kind of silly", and perhaps they are now that computers run at many GHz. But they were very useful in the old days. E.g. CBASIC [1] implemented BCD floating point math. Here's what Wiki says about it:

   CBASIC proved very popular because it
   incorporated 14-digit binary-coded decimal
   (BCD) math which eliminated MBASIC's rounding
   errors that were sometimes troublesome for
   accounting.
As the reference manual linked [2] from Wiki says:

   Real numbers are stored in eight bytes of
   memory. The first byte is the sign and
   exponent. The exponent is maintained in
   excess 64 code. The seven remaining bytes
   contain a normalized mantissa stored as
   packed decimal digits. The high order four
   bits of the rightmost byte is the most
   significant digit of the mantissa.
That was of course long before IEEE 754 floating point.[3] BTW did anyone know that IEEE defined decimal floating point? I didn't know that until just now. It's probably not that popular.

When a CPU runs at 1 MHz instead of 3 GHz, doing FP in BCD means much simpler and much faster conversion between internal representation and display. A lot of early microcomputers were used by small business. BCD is inferior for complicated scientific calculations, but is ideal for simple small business accounting, which was CBASICs target market.

[1] http://en.wikipedia.org/wiki/CBASIC [2] http://www.cpm.z80.de/manuals/cbasic-m.pdf [3] http://en.wikipedia.org/wiki/IEEE_floating_point

An interesting related tidbit was that the BCD implementation was the only part of the 6502 that MOS patented. As you could not copyright an IC mask at the time, Nintendo/Ricoh were able to clone the 6502 without paying license fees simply by cutting the traces to that part of the chip. (Ricoh was a licensed second source for the 6502. I imagine Commodore was not happy with them after that...)
Incidentally BCD is one of the "perks" you get with Intel in mobile/embedded. When Intel says "x86 compatibility" they dont mean reusing pre compiled binaries, what they really mean is 30 year old legacy cruft like BCD, or 64 bit processors booting in real mode.
I did not watch the talk yet, but there was also a third model (maybe later): The 6510 -- it was fully software compatible, but had 6 integrated I/O pins that could make small computer designs easier. Commodore used it for the C64 computer, because the 6 I/O pins saved for extra I/O chips. The 6 I/O pins would also be faster than external circuits because they could be accessed via the zero-page (address 0 and 1, as much I remember). One of the functions in the C64, they where used for, was bank-switching, since the C64 had 64kB RAM and additional ROM and memory mapped I/O regions. Thus bank switching was a must to be able to access all memory and I/O locations.

... unbelievable today, that the "operating system" resided in less than 8kB .... ;) The Basic interpreter occupied a little more than that ... so the C64 had 16kB ROM altogether.

(to be fair: The "operating system" of the C64 was not one according to today's standards, it was little more than a number of handling functions for some hardware basics ... todays BIOSes can be better compared to it)

There were several other models. Some of the Amiga models have a 6502 compatible SoC with an embedded PROM and small bit of RAM on chip for example.

(Then of course there's the Western Design Centre 6502 descendants, which include 16-bit extensions etc.)

Wut ? Amiga's runs over 680X0 cpus.
The CPU, yes. But the Amiga 500 and 2000 at least had 650x cores on the keyboard, that implemented the keyboard end of the serial protocol sending keystrokes to the motherboard, as well as managing the leds etc.. Commodore had a long tradition for "smart" peripherals and for favouring using their own chips wherever possible.

Some searches led me to this [1]. The 6570-036 is the 6502-based SOC.

[1] http://deskthority.net/wiki/File:Amiga_2000_Mitsumi_controll...

I believe the 6502 was used as part of a keyboard controller in at least some Amiga models.