The Good Old 6502 Microprocessor, But 7000x Bigger!

The MOS 6502 was revolutionary, it was used in several famous commercial products, for instance, Apple I or Atari 800. It has been fully reverse engineered at transistor level and you can simulate it on your computer right now! But one thing was missing, a life-sized 6502 microprocessor made up of discrete surface mount transistors, but that’s not the case anymore!

To fully understand the extent of this work, let’s start with the 6502 microprocessor and see why is it so popular. Then go through the reverse engineering process, and finally the creation of the MOnSter 6502.

MOS 6502

History

The story begins at Motorola, where Chuck Peddle began working on the Motorola 6800 in 1973. At the time Motorola was having problems with fabrication and originally was focused on lowering costumer’s total design cost. Motorola was offering its chips for $175, however Peddle who accompanied costumers knew they were put off by the high price of the chips; He decided to make a cost-effective microprocessor by cutting away “fancy instructions” and reducing the size of the chip. But Motorola that was overwhelmed with problems, showed no interest in the low-cost microprocessor plan and asked him to stop working on it. Later Motorola admitted that this decision was a mistake and blamed it on the management system of the company.

designers of the mos 6502

Figure 1. MOS Technology employees posing with print of CPU Rubylith. Standing: Mike Janes (left) and Harry Bawcom (right). Seated: Rod Orgill  Source: Team 6502

But Peddle and his team didn’t give up, they went looking for a source of funding, and they found a newly formed company which was working on calculator chips, the MOS Technology. The MOS Technology accepted the concept with open hands; So on 19 August 1974, Chuck Peddle, Bill Mensch, Rod Orgill, Harry Bawcom, Ray Hirt, Mike Janes, Terry Holdt, and Wil Mathys left Motorola to join MOS.

The goal of the team was to design and produce a low-cost microprocessor for embedded applications and to target as wide as possible of a customer base; This would be possible only if the microprocessor was low cost. Finally, in 1975 they launched the 6502 for each chip priced at $25, 1/7th of the price of the competitors.

steve wozniak and steve jobs with a die shot of 6502

Figure 2. Steve Jobs and Steve Wozniak with the Apple II. On the wall behind them hangs a print of the 6502 CPU. Source: Team 6502

The chip now regarded as one of the most influential microchips ever designed, was used in various famous commercial products. Apple I, Commodore PET, Apple II, Atari 8-bit family, Acorn Atom, BBC Micro, Commodore VIC-20, Commodore 64, Nintendo Entertainment System (NES) and Atari Lynx were among the top names to incorporate the MOS 6502 into their system in the 1970s.

Technical details

The 6502 is an 8-bit microprocessor which can address 64 KB of memory. It originally had a die size of  3.9 mm x 4.3 mm, and was fabricated using an 8 µm process. It only has 56 instructions compared to 72 in the Motorola 6800 and Intel 8080, which translated to a smaller decoder and control logic.

Despite the low clock speed of only 1 to 2 MHz, 6502’s performance was competitive with CPUs running at much higher speeds; The reason was that it used more combinational logic compared to other processors. Much like the 6800, 6502 has very few registers. The 6502’s registers include one 8-bit accumulator register (A), two 8-bit index registers (X and Y), 7 processor status flag bits (P), an 8-bit stack pointer (S), and a 16-bit program counter (PC).

Reverse engineering

To reverse engineer the processor we needed accurate and comprehensive information; But there was very little official documentation and information available about the 6502. MOS Technology was bought by Commodore in 1976, but Commodore went bankrupt in 1994, and ESCOM and GMT Microelectronics bought different parts of it. It doesn’t end here, ESCOM went bankrupt in 1995 and 3 or 4 other companies bought different parts of ESCOM.

Also, the original design of the microprocessor was lost, because back in those days integrated circuits were designed purely by hand on special Rubylith plastics and there were no digital copies of it available. Pretty much the only worthy thing that was available, was the chip itself. In 2001, Beregnyei Balázs, analyzed the chip with microscopic images from the 6502 and made a schematic of every single transistor existing on that chip. But the results were published in Hungarian and there was room for improvement.

In 2009, Greg James, Barry Silverman, and Brian Silverman, started Visual6502 to properly reverse engineer the 6502. They decapped the 6502D by squirting sulfuric acid onto it. Then they made an 18,000 x 19,000 image by capturing it under microscope. Those images weren’t enough because metal layers were not distinguishable flawlessly, so metal and polysilicon layers were stripped off and captured again.

image taken by microscope from the 6502 die

Figure 3. Image taken from the surface of the 6502’s die by microscope. Click for full resolution. Source: Visual 6502

They used the images to locate and record every transistor or trace. They analyzed and debugged the data, and wrote an open-source simulation in JavaScript, which you can run in your browser right now! Their work is astounding, and they are using their experience to apply this method to other chips.

vectors generated by reverse engineering the 6502

Figure 4. Vector polygons created by reverse engineering the images of the 6502. Source: Visual 6502

MOnSter 6502

Eric Schlaepfer is the founder of this project; He states that initially he had the idea of creating a discrete version of a microprocessor, But he thought it would be time-consuming, difficult or even impractical. There is around 3500 transistors inside a 6502; If we could fit 4 surface mount transistors in a square centimeter, the final board would be around 32 x 32 cm. Some dynamic NMOS logic used in the 6502 were hard to find, but Eric managed to find a 4-terminal MOSFET. He prototyped a few boards and found that it can actually work.

sample board of the Monster 6502

Figure 5. Image of the board at the development stage. Source: TubeTime

Then on 3 July 2015 he wrote a Python program that turned the Visual6502 netlist into a 3500 line spreadsheet. After that he entered all the transistors one by one into a 61-page schematic. Eric also added 167 colorful LEDs to various control lines and data bits.

close up of the board

Figure 6. Close up image of the board and its transistors. Source: MOnSter 6502

Eric then had to design the board layout; There were 4,304 parts placed manually and wired all by hand over the course of several months. It came out to be a 30.5 x 38 cm 4-layer board with surface mount components on both sides. After the board was manufactured it worked flawlessly. The board draws almost 2 Amps at 5 V, or 10 W total. The LEDs are a significant part of the power consumption.

finished state of the monster 6502

Figure 7. Finished state of the MOnSter 6502 Project. Source: MOnSter 6502

This board can run at 60kHz which is a lot lower compared to 1 to 2 MHz on the original chip. But it is still enough to run programs. Since it is just a microprocessor, Eric has also worked hard to build a fully functional computer around it with keyboard and monitor interfaces. He has built a single board computer which runs with the MOnSter 6502 as its processor. You can actually use either the 30 x 38 cm board or the original socketed 6502 IC in that computer.

 

5 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.