24

Quite a few successful early microcomputers used the MOS 6502 CPU. This included, but was not limited to, systems like the Apple I, Apple II, Commodore PET, and Ataris. A followup known as the MOS 6510 was used as the main CPU for the Commodore 64 (the floppy disk drive used its own 6502), and variants of these were used in many other systems of the time.

But why? What made the 6502 the CPU of choice for so many different computer designs over several years? (The Apple I was introduced in 1976, and the C-64 was introduced in 1982, which conservatively gives a time period of at least five years. I also suspect that the Apple I wasn't the first system to use the 6502, though it might well have been one of the first that were widely available.)

For comparison, the Intel 8085 was introduced in 1975, and could run at up to 3-6 MHz, while the 6502 was introduced in the same year but could run only at up to 1-3 MHz, both depending on variant. The Intel 8086 came later, in 1978, and even the slow variants could run at up to 5 MHz; faster 8086 CPUs could be clocked at up to 10 MHz.

Was it an issue of cost? Availability? Simplicity of board design? Instruction set? Or what?

What do we know, and what can we deduce from available information? Bonus points for answers that include citations.

  • 9
    retrocomputing.stackexchange.com/questions/2760/… gives a lot of of the answer: the 6502 was a third of the price of the Z80. – pndc May 14 '17 at 13:01
  • 7
    You mention clock speed; the 6502 at 1-2MHz often outperformed higher-clocked contemporaries (I remember reading an article talking specifically about efficiency of handling interrupts as one of the reasons, can't find it at the moment) – Joe May 14 '17 at 19:38
  • 9
    Clock speed probably isn't terribly relevant as the Z80 family takes 7 cycles for LD A,$34 but the 6502 takes 2 cycles for LDA #34. For clock comparisons I seem to recall that a figure of 3 times was used to compare 6502 with Z80 clock rates. Also the 6502 made it easy to use the other edge of the clock cycle to steal bus access for the video system as the Apple ][ did (and I think Atari did for spriteless video lines). To be honest I suspect cost was the major driver. – PeterI May 15 '17 at 9:54
  • 3
    6502 is awesome. 'nuff said. – cbmeeks May 15 '17 at 18:47
  • 2
    @cbmeeks Care to post that as an answer, so the community can vote on it? ;-) – a CVn May 15 '17 at 18:57
27

First, for Commodore's part, it should be obvious the reason for choosing the 6502 microprocessor for all their 8-bit machines (notwithstanding the dual-processor CBM 9000 and C128) - Commodore owned MOS. Jack Tramiel was very focused on vertically integrating his manufacturing, which basically assured Commodore's use of MOS CPUs and support chips. Since Commodore sold more 8-bit home computers than any other vendor, this fact alone greatly influenced the 6502's preeminence.

Second, the aggressively low price point of the 6502. Chuck Peddle's team developed the 6502 to be a low-cost, compatible, Motorola 6800 "killer", much the same way as Zilog did in targeting the Intel 8080 with the Z80. Again, Jack Tramiel's willingness to far undercut his competition kept the 6502 as a relative bargain among the early 8-bit options. As noted in this question the 6502 was around 1/3 the cost of the Z80, and both were far cheaper than Motorola and Intel equivalents.

Third, MOS also created system support chips that were designed to easily interface with the 6502, such as the 6522 VIA. This made adding I/O capabilities very simple for system designers, and that freed them to focus more on custom circuitry that would help distinguish their system in the marketplace of many computers built around this basic chipset.

Fourth, the early success of the several 8-bit machines in both North America and Europe created a virtuous ecosystem of hardware designers and software programmers that knew how to work with the 6502. The momentum and professional user base made for a popular "platform" even before that term was widely used, and this reinforced vendors to stick with it as long as it remained technologically competitive with newer CPUs, and perhaps even longer. Indeed, the video game console industry shared in this platform ecosystem, and the 6502 dominated that category too. First in Atari consoles and then in the original NES, which used an ASIC version of the 6502 in the form of the Ricoh 2A03.

Fifth, the 6502 had robust industry support that delivered enhanced versions (65C02 CMOS version, 65C816 16-bit version), higher clock speeds (capping out at 14MHz), alternative chip manufacturing sources (Rockwell, Synertek), and licensing of the 6502 IP to create custom ASIC devices. In this sense, it was a precursor to what happened with the ARM platform in the embedded computer (phones, etc.) industry. These enhancements and licensing extended the lifespan of the platform, leading to its inclusion in many additional computer and console products.

If the KIM-1, released in 1976, and the Super NES (65c816 core), released in 1991, can serve as "bookends" for the 6502 platform dominant years, that represents a 15-year run in the home computer and console market. Of course, by 1991, the computing world was rapidly consolidating around the IBM PC "clone" standard, but the low-cost, high-volume, Super NES was capable of graphics, sound, and gaming abilities that exceeded much more expensive PCs. It was even competitive with newer 16-bit CPU systems more purpose-built for gaming, like the Amiga, Atari ST, and of course the 68000-based Sega Genesis. Even today, the 65C02 CPU continues to be manufactured and licensed (as a core CPU) for use in embedded systems.

  • See Mitsubishi MELPS 740 series for descendents of the 6502. – amI Aug 25 '17 at 20:13
6

The fast "zero page" addressing mode of the 6502, allowing to think of the lowest 256 bytes as "registers", could have contributed to its popularity among programmers, prolonging the demand for 6502-based systems.

Quoting from Wikipedia:

Many instructions are coded differently for zero page and non-zero page addresses:

LDA $00            ; zero page
LDA $0000          ; non-zero page

The above two instructions both accomplish the same thing: they load the value of memory location $00 into the .A register (accumulator).

However, the first instruction is only two bytes long and requires three clock cycles to complete. The second instruction is three bytes in length and requires four clock cycles to execute. Obviously, the difference in execution time could significantly improve performance in repetitive code.

Using single-byte addresses for size-critical code could also somehow mitigate the difference in code density compared to Z80.

  • This was a great feature. CBM BASIC gobbled up most of zero page for its own functions, but if you knew it well (Mapping the Vic and Mapping the C64 were a terrific help), you could make use of certain bytes when BASIC wasn't looking. They left you a couple or three user defined bytes. But of course if you were writing assembly, you could use nearly all of it. – Cliff Hall Jun 30 at 23:22
5

There were two major reasons:

1: On introduction, the 6502 (at $25) was considerably cheaper than its nearest competitors; at the time, those were the 6800 ($175) and the 8080 ($179); the Z80 would not be released until the following year, and even then its initial price was $200.

2: Despite its low cost and simplicity, the 6502 was relatively fast for a given clock speed and memory type. At the time, CPU speed was limited more by memory access constraints than anything else. The program code it needed was also acceptably compact for the time.

  • 2
    Nobody else seems to have mentioned it, but the price consideration counts doubly for Atari: the 28-pin 6507 significantly reduced board costs over a full 40 pins, encouraging their entry into MOS world. – Tommy Jun 29 at 15:10
4

An advantage of the 6502 which favors its usage in the Apple II series and Commodore VIC-20 and 64 (though not the Atari 400/800) is that it accesses memory on a very regular cycle--once every full clock cycle. This makes it very easy to split each clock cycle into two parts--one of which is given to the CPU and the other of which is given to video (and--for the Apple--DRAM refresh) circuitry. This makes it very easy for the CPU and video to use the same memory system, and also makes it possible for code to access memory that holds display data as quickly as it can access any other memory.

The Atari 400/800 use shared memory for CPU and video, but don't subdivide cycles. The CPU runs at 1.79Mhz [chroma/2] (vs. 1.022MHz [2*chroma/7] for the Apple II, VIC-20, and C64) but it has to stall the CPU every time it fetches data for the video subsystem. On the other hand, the earlier Atari 2600 used a 28-pin version of the 6502 (called the 6507) running at 1.19MHz [chroma/3] which benefited enormously from the zero-page addressing mode, and inertia would have encouraged use of the 6502 on the later 400/800. Since a memory bus speed of 1.19MHz would have been insufficient, it was boosted to 1.79Mhz.

  • 1
    The Motorola 6800 also could be run in the same "split cycle" mode, using the first half of the cycle for video and the second for the CPU. The MC6800 also included a VMA (Valid Memory Address) pin that could allow cycles to be suppressed if not needed. At the time, the 6502 was much cheaper (at least to me) than the 6800. Was it also true that Bill's Tiny Basic ran on the 6502 but not the 6800? I remember modifying my 6800 home-brew to use a 6502 for a night to try it out. – cmm Apr 1 at 22:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.