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!

Comments

  1. agtrier says:

    YES! I knew that one day my early attempts of assembler on the C64 would turn out to be good for something… :-)

  2. YT2095 says:

    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! :)

  3. kukuta says:

    For a “slightly” more advanced computer:

    http://eluabrain.blogspot.com

  4. Peewee says:

    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!

    • Peter says:

      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…

  5. cncdreamer says:

    “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.

  6. 6502 != 6510

    anyway, check out 6502asm.com. ;)

  7. Tom Hargrave says:

    The Commodore 64 was based on the 6510 processor. The 6502 was used in the Commodore VIC-20

  8. Jac Goudsmit says:

    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 :-)

  9. renaak says:

    6510 is based on 6502, barely much difference really

  10. Pete S says:

    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.

  11. YT2095 says:

    Thanks for the info, it`s certainly encouraging to know that the 6502 can be run in a near near static mode, I may just make a 6502 cpu card ZED ( http://hackaday.com/2011/06/24/zero-overhead-z80-computer-focuses-on-performance/ ) now, it was the whole dynamic register thing that put me off making one.

  12. jomegat says:

    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).

  13. xorpunk says:

    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..

    • shadowruni says:

      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…

  14. Cosco says:

    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.

  15. Miroslav says:

    Keep up the good work. More of this type of stuff is what’s needed.

  16. RunnerPack says:

    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).

  17. Jeff says:

    If you force 0x4C on the data bus, within three clocks the address bus should be asking for 0x4C4C

  18. lamer says:

    10 PRINT “back then my C64 ran basic”
    20 PRINT “and i could barely figure that out”
    30 RETURN

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

Follow

Get every new post delivered to your Inbox.

Join 96,764 other followers