Skip to content

Latest commit

 

History

History
57 lines (34 loc) · 4.12 KB

README.md

File metadata and controls

57 lines (34 loc) · 4.12 KB

0. Introduction

Trying to build a 6502 based computer

I took up the challenge of building my own computer. I grew up with the Commodore 64. It has a 6502 processor. This processor was also used by Apple, Atari, Nintendo. It is simple, still available, and many hobbyist before me documented their projects. So 6502 it was.

The contents of this chapter

0.1. Which variant

I started by ordering hardware. I already had breadboards, jumper wires, resistors, LEDs. The main (first) purchase was the 6502 itself. The first variant (left) I got was an original one from MOS from 1985 (I think, you never know with AliExpress). I had problems resetting it (on power up it runs, but after a reset if freezes - is it broken?). A variant (right) seems to also be an old one again, although the logo and time stamp look different from the first. It does work, but it gets warm.

6502 variant 1 6502 variant 3

Then I learned that the old ones are NMOS, and that there are new CMOS versions. I got a new variant from Rockwell (left), which works well. So I bought another Rockwell (right) but this time I got R6502, not an R65C02. It works, but you can't slow clock it.

6502 variant 2 6502 variant 4

The latest greatest seem to be the ones from The Western Design Center (WDC). But they are a bit hard to source. I stumbled on these at aliexpress. I ordered a batch of five, and there where at least three types in the batch. Here are photos of two of them. Still have to check these.

6502 variant 5 6502 variant 6

0.2. Slow clock

One of the advantages of the CMOS version is that the clock can be really slow. I like that for a development system, because it makes it easy to debug hardware. But it also allows for hardware-based single stepping.

This is what the respective datasheets have to say about it.

MOS 6502 datasheet says "Clock cycle time is minimal 1000ns" or 1us, or you operate the device out of spec. So the old NMOS is not very forgiving.

Rockwell R65C02 datasheet says "Caution must be exercised when configuring the R65C02 in the standby mode (i.e. PHI0 clock stopped). The input clock can be held in the high state indefinitely; however, if the input clock is held in the low state longer than 5 microseconds, internal register and data status can be lost." I tried it, and my chip allowed me about 25 seconds low, but then still, it would loose state.

Western Design Center still makes 6502s (in CMOS). Their W65C02 datasheet says "Phase 2 In (PHI2) is the system clock input to the microprocessor internal clock. During the low power Standby Mode, PHI2 can be held in either high or low state to preserve the contents of internal registers since the microprocessor is a fully static design." So the modern CMOS version is most flexible. Didn't buy one yet.

0.3. Documents

Datasheets on the 6502 variants

Detailed technical

(end of doc)