I’m doing something a little different this week: I’m planning something larger-scale than my last few projects, something that’s going to take a while to realize, and something that I may or may not actually succeed at. If it works, it’ll be cool – at least to me.
A couple weeks ago, I almost decided to build a computer. I mean that in the modern sense, where you order a bunch of components from NewEgg and put them together like so many Legos. In the end, I decided against it and just bought a complete machine. When I thought about it, that wasn’t the kind of computer that I wanted to build. I wanted to do something a little more… primal.
I blame the stuff I’ve been reading lately. That includes a lot of articles linked off the 6502.org projects page, and in particular some pages by Garth Wilson and Quinn Dunki. It turns out that there are a lot of people out there building and designing their own computers. By which I mean taking a handful of microchips, hooking them together, and making them sing. I really recommend checking out Quinn’s Veronica project – she does a great job describing not only the things that work, but also the problems and mistakes that happen on the way.
(As another aside, there are also people who take an even more basic approach – take a look at this homebrew 8-bit processor, or the “NAND to Tetris” online course from MIT. But I’ve got to start somewhere, and I’ve always been a top-down kind of designer.)
And that brings me to my point, and to the title of this post. I’ve gathered up a few components and I’m going to be trying to put them together under the auspices of something I’m calling “Project:65” (because it sounds cool, and I had to name the folder with all my notes in it something).
Project:65’s first component is a 65C02 processor. It turns out that this legendary CPU is still being manufactured and sold by the Western Design Center, a company founded by ex-Commodore engineer Bill Mensch. Their motto? “Keeping technology manufactured for the long term”. And I guess they aren’t kidding!
WDC’s 65C02 has a few differences from the original, besides the manufacturing process. It doesn’t support all the MOS 6502’s “illegal opcodes”, which were really just undocumented side effects of how the original 6502 decoded instructions in the first place. It also has a few new opcodes, like TSB (test-and-set), WAI (wait for interrupt), and STZ (store zero), which may or may not come in handy.
More interestingly, the 65C02 is fully static, and you can clock it as slow as you like. You can even stop the clock for arbitrary lengths of time. On the other end of the spectrum, the chips I bought are rated for up to 14 MHz, which is not shabby at all.
Another chip that I think will come in handy is a 6522 VIA (Versatile Interface Adapter). The VIA was used as the I/O chip of the Commodore VIC-20, and is the predecessor of the C64’s 6526 CIA. WDC sells a modern 65C22, but not a 6526, which is why I’m going with the earlier chip. The two have enough in common that I plan to use the C64 as a development platform for some of the software I’ll need to power this thing.
Getting from a handful of chips to something that kind of sort of works like a computer is going to be complicated. The way I figure it, my first few steps will work something like this:
- Get the 65C02 on a breadboard and see if I can get it to do anything at all. This is to see if I understand how it needs to be connected, and see if I can come up with a workable way to clock the thing.
- Get instructions to the 65C02. I think I know how to program an EEPROM using the hardware I have on hand. I’m sure you can expect at least one post describing my experiments – and more, depending on how many snags I hit.
- Figure out how to handle the memory addressing, and hook the 65C02 up with actual RAM and ROM and validate that it is in fact running some kind of program.
- Add the 6522 VIA into the mix and write a program that can talk to another computer.
If I get that far, I’ll have something that could very charitably be called a computer. At that point, it’ll be time to evaluate and decide where to go next. If I’m still having fun with it, I might look into rebuilding it on something more permanent than a pile of breadboards, or maybe adding more advanced input and output. Maybe a keyboard, or some actual storage. There are a lot of directions I could go.
For now, though, I don’t want to get too far ahead of myself. I’m going to take this one step at a time. And I’m really excited to get started.