Building a computer around a 6502 processor

When it came time to try out some old-school computing [Quinn Dunki] grabbed a 6502 processor and got to work. For those that are unfamiliar, this is the first chip that was both powerful, affordable, and available to the hobby computing market back in the 1970’s. They were used in Apple computers, Commodore 64, and a slew of other hardware.

The first order of business in making something with the chip is to establish a clock signal. She sourced a crystal oscillator which runs at 1 MHz, but also wanted the option to single step through code. Her solution was to build two clock signals in one. A toggle switch allows her to choose the crystal, or a 555 timer circuit which uses a push button to fire each clock pulse.

Check out the video after the break to see some single stepping action. There’s no memory on board just yet. But the input pins have been hard-wired to voltage or ground to simulate data input. We wondered what she was up to with that HEX Out project which stiffs the logic on the data bus. Looks like it’s extremely useful in this project!

24 thoughts on “Building a computer around a 6502 processor

  1. aren`t the 6502s registers Dynamic rather than static?
    this will lead to problems when single stepping at a rate below the required refresh frequency.

    I really hope I`m wrong about this, but I dont think I am :(

    other than that, More of this sort of thing please! :)

    1. With the original NMOS version, yes (although you can still run it pretty slow; I’ve run my Rockwell at 100Hz). The 65C02 can be stopped with CLK0=HIGH at and left in that state indefinitely according to the datasheet.

      1. What he said. :). I noted it in the article, but yes, the single step clock has to stay high between pulses. For this early test, no registers are being used, so it’s okay as-is.

  2. That’s old skool… !

    Takes me back 30 years at tech college programming a D5 proto board before even Commodore PET. Did a whole 12 weeks writing machine code!

    1. Although it appears simple, there’s nothing like building a small system from scratch, and programming it in hand-assembled hex, to give you a good feel for the basics.

      Well done! Now, add a serial port and write some code for a simple monitor.

      The first one I built used a Motorola 6802…

  3. “We wondered what she was up to with that HEX Out project which stiffs the logic on the data bus. Looks like it’s extremely useful in this project!”

    If you ever used a KIM-1 or SYM-1 to work with the 6502 you’d feel like you’re coming home when you see that cheery 4-digit HEX LED display.

    …and I agree with YT2095, more please.

  4. By the way if you want the address bus to change on every clock instead of every other clock, you can just put $A9 on the data bus. But I bet you already thought of that :-)

  5. Oh, reminds me of a Z80, an SRAM and a set of switches to the databus and addressbus about 30 years ago. It was hard work going from instructions to machine code to binary manually programming the SRAM.

    BTW, Commodore 64 had the 6510 chip, not the 6502. Vic 20 had the 6502.

    I was always a fan of the Z80 architecture over the motorola lineage from the 6800 to the 6502.

    The ABC80 http://en.wikipedia.org/wiki/ABC80 was also the first computer I used in the seventies.

  6. Back in the day, I cut my teeth on the 6802 – which is similar enough to the 6502 that I could not tell the difference. We didn’t have an assembler (much less a compiler). Instead, we had to hand assemble our programs and punch them in one nibble at a time. I had the entire instruction set memorized after a while.

    Then the Tandy Coco II came out, and it had a 6809. What a great device that was. It even had a SEX instruction (sign extend).

  7. reminds me of stuff.. OMG I’m soo experienced and have so much to show to prove it..

    the net is flooded with SBC projects like this.. I did a 20Mhz Z80 in the 90s that had PS/2 and NTSC support(through interbus) all on breadboard using wire-wrap.

    P.S. I want to do an OMAP 4 or 5 BGA project but the stuff is to inaccessible.. ROM flashing is a grey area to non-vendors..

    1. Okay, so where’s yours? Why crap on what she did? My keychain has more computing power than that thing does but that’s not the point. You don’t build things like this to prove a point (usually) you do it for the hell of it. So what if it’s “simple” there’s some nice things she did here for example her “clocks”. That’s a nice way to allow for debugging while at the same time keeping things neat enough for when she wants to go full tilt. Again, maybe there’s a better or more elegant way, still not the point…

  8. This chip was also used in the Atari computers, although for later versions of the 800XL and XE computers, Atari developed a cusomized version of the 6502 called Atari 6502c that adds a halt line. Any project that wakes up these processors look beautiful to me.

  9. Nice work, Quinn!

    BTW, let’s not forget the (modified) 6502 in the venerable NES (nor the 65816-derivative in the SNES, for that matter).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s