Introduction to the 6502 and L-Star
The 6502 started out as a cheap processor for small systems, and ended up being one of the most popular and important processors in the history of computing. It’s still in production today, and still popular with hobbyists and professionals. The L-Star project can help you learn about the processor, and about computer architecture in general. Let’s start with a short history of the 6502, and then I’ll give a short “how and why” of L-Star.
History of the 6502 in a Nutshell
In the early 1970s, companies such as Intel and Motorola came up with the idea to put an entire Central Processing Unit of a computer into a single chip. These chips got the name “micro-processors”. The first microprocessors were expensive: hundreds of dollars per chip.
In 1975, Chuck Peddle, Bill Mensch and most of the team that had worked on the 6800 microprocessor at Motorola, wanted to create a new affordable microprocessor with enough power for simple things like terminals and calculators. But Motorola management wasn’t interested. The entire team quit their jobs and started working for MOS Technology. There, they created the 6502 and sold it for less than 10% of the price of the 6800.
Meanwhile, a small company called Commodore that had started out making typewriters and office furniture, but was making electronic calculators in the early 1970s, was having trouble sourcing the chips for their products. To fix that problem, they decided to buy their own chip factory which happened to be MOS Technology.
After this happened, Chuck Peddle at MOS persuaded Jack Tramiel, the CEO of Commodore, to start a project to make a personal computer based on the 6502. That computer became the PET 2001 which was a big success. Later on, they also produced the Commodore 64 which became the best sold personal computer ever, but they eventually went out of business in 1994.
Bill Mensch didn’t stay with MOS Technology / Commodore for long; he decided to start his own company called Western Design Center. WDC now owns the intellectual property of the 6502 and to many other chips related to it, and still sells millions of their version of the 6502, the WDC 65C02S, per year. The L-Star uses the WDC 65C02S but I’ll refer to it as the 6502 in most texts here and elsewhere. In most cases, the differences between this particular version and the original 6502 are irrelevant.
Fast Forward to L-Star
Obviously, the world has moved on from 8-bit processors. Most personal computers nowadays use a processor derived from the Intel 8086, which had a versatile but complicated instruction set. The latest incarnations have multiple cores, multi-level cache memory, pipeline execution with branch prediction and other features to improve performance. Others such as the ARM family of processors have a RISC instruction set which gives them other advantages. But the bottom line is: most computers and processors still use the same principles as the 6502.
That makes the 6502 a great processor to learn and teach computer architecture. A computer based on the 6502 has all of the essential properties of a modern computer system, but none of the improvements that would only distract from the essentials anyway. And even in this day and age, it’s definitely possible to build a 6502 computer that can be useful.
There are many replicas of successful 6502 computers, as well as new computer designs, based on the 6502. Replicas allow you to use existing software for a computer you may have once owned, or still own, or wanted to own, using the actual hardware rather than some sort of emulator. But if you want to design your own computer, you’ll have the freedom to make the computer exactly the way you want it, perhaps specialized to a specific purpose.
But a replica won’t allow you to use software for any computer besides the one that it replicates, and if you design and build your own computer and discover a mistake, it may not be that easy to fix.
L-Star is a bit different from other 6502 computers: It’s not exactly a replica because it’s not some kind of close approximation of the hardware of any specific computer. It’s also not exactly an emulator: there’s a real 6502 on board, not some other processor that imitates a 6502. But instead of the other chips that you might normally find in a 6502 computer, there’s a Parallax Propeller.
The Propeller is a powerful microcontroller with 8 cores (named “cogs”), each of which can run a separate program. For example, one cog can be used to generate video and another cog can be connected to a serial port or a keyboard. The Propeller determines how the 6502 sees the world by monitoring the address bus, data bus and control signals of the 6502. Of course you can also connect real I/O devices and/or memory, but it’s surprising how much you can do with just the Propeller. The L-Star Plus kit has a RAM chip but it’s not required for all configurations.
So the configuration of the computer as the 6502 sees it, is pretty much completely under control of the Propeller. I call this concept a “Software-Defined Computer”. This makes the computer versatile, and doesn’t require special hardware (e.g. to program an EPROM). Of course if you want a different software-defined computer, you have to change the Propeller software. If you can’t, or don’t want to do your own Propeller programming, you can use one of the projects I prepared earlier, which will turn your L-Star into an Apple-1 or an OSI Challenger. Other computers such as the PET-2001 and the Acorn Atom may be added in the future.
The next article in this section will be an introduction to the basics of the 6502 architecture: bits, bytes, registers, buses and control signals will help you understand how the Propeller “bitbangs” the 6502.