Dan Moos wrote:
Hello, I'm a hobbyist who recently got the itch to do a retro computer build. I've been lurking the net, and have just enough scattered knowledge on 6502 builds to be dangerous, but not enough to pull the trigger on some parts.
Firstly, welcome to our 6502 world. Don't be afraid to ask questions...we're never afraid to give answers.
Quote:
I plan on using Mouser (out of habit I guess), but I'm open to suggestion.
Mouser is a fine choice, as is
Digi-Key and to a lesser extent,
Jameco. Prices vary and one vendor may not have everything that another vendor has, but between the three of them, you will find everything you need.
Quote:
So I want as close to an original 6502 experience I can get with a modern CMOS part. Which WDC part fills that bill?
You would want WDC part number W65C02S6TPG-14, which is the 65C02 in a DIP40 package. An alternative if you plan to do this on a printed circuit board is W65C02S6TPLG-14, which is in a PLCC44 package. There are pros and cons with using either package.
Quote:
My next question might determine the answer to the last one. What logic family for glue logic will be the most trouble free? I plan to run at 1 Mhz. Would 74HC be fine?
74HC logic is suitable to 8 MHz in most cases. Beyond 8 MHz, 74AC logic is best used, but will require better physical layout and design to avoid problems with ringing and other switching-related maladies. Assuming you stick with all CMOS parts, you don't need or want 74HCT or 74ACT logic. Also, do not use 74LS or 74F logic, for various reasons that are best explained elsewhere.
Quote:
Ok, every video I see the builder never seems to specifically say what RAM and ROM chips they use. I have no idea what to get. I just want something that works.
Most hobby builds are equipped with static RAM (SRAM), which is straightforward to interface to the 65C02, using standard glue logic. It is possible to use dynamic RAM (DRAM), but then you have to provide refresh circuitry, which can be a pain to set up. As the 65C02 cannot address more than 64KB and as you need address space for the ROM and some I/O hardware, you probably can do fine with a 32Kb × 8 SRAM (giving you 32 kilobytes), such as
this Mouser item.
Quote:
The ROM I'd think EEPROM, and hopefully one that can be written without to (sic) much extra hardware. Are there such chips?
Your options are limited with an EEPROM. The logical choices for your build would be a 28C64 (8KB) or a 28C256 (32KB), both of which are obtainable in a PDIP28 package. The main thing to consider with any EEPROM is its relatively slow access time, which will set a hard limit on circuit speed, although that won't be too much a consideration in a first build running at no more than a few megahertz.
It is possible to reprogram an EEPROM in-circuit, but it's not a trivial matter to set up such a thing. I recommend that you invest in an inexpensive EPROM programmer and do it that way. There are sources on eBay.
Quote:
About the PIA. I'm not completely clear what its for...
The 65C21 peripheral interface adapter (PIA) is used to drive an external device from your system. The PIA provides two eight bit parallel ports whose individual bits can be programmed as inputs or outputs. For example, a PIA could be used to interface a parallel port printer to a 65C02 system. That said, most builds use the more capable 65C22 versatile interface adapter (VIA) due to it including a precision timer and a bi-directional serial shift register, as well as the two parallel ports of the PIA.
Although not something about which you should think as you design your first build, there are lots of I/O devices that can be interfaced to a 65C02. You're not limited to just the WDC products.
Quote:
My immediate goal is just to get a working computer that can talk to my modern computer via a serial connection. I plan to use a Bus Pirate as a serial to USB adapter, but I'm not clear exactly how to get the serial from the CPU. I know the PIA is part of that equation, just not exactly which part. I also thought a seven segment display driven by an AVR (that's the MCU I'm most familiar with) would be nice. I'm thinking maybe a Raspberry PI for getting keyboard/screen I/O. Open to suggestion on all of this.
A TIA-232 (aka RS-232) serial link is usually established with a universal asynchronous receiver/transmitter (UART), which is designed to convert parallel input into a serial bit stream output and convert a serial bit stream input to parallel output. The only UART in the 6502 family is the 65C51, currently available as WDC part number W65C51N6TPG-14. Be aware that although the WDC part is up-to-date as far as fabrication goes, it is a very old design reflecting mid-1970s technology, and has a hardware bug involving the transmitter. Better UARTs are available, but adapting them to the 65C02 bus is not as simple as using the 65C51.
Ultimately, what you do depends on how much a purist you want to be and how much dependence on other hardware you are willing to accept. Some builders have used MCUs as I/O devices or even as bus logic controllers. My opinion is offloading that stuff to an opaque piece of hardware takes away some of the learning opportunity you would get working with basic discrete logic devices. Modern MCus do offer convenience—you just have to decide how much convenience you want vs. how much learning experience you want.
Quote:
Long term goal is a computer that is not dependent on modern interfaces for keyboard/screen/storage.
The easiest route to take for a beginner would be to connect your 65C02 system's serial port to a PC and run terminal emulation software on the latter. That way you can focus most of your attention on getting your contraption running and getting your firmware refined.
First thing for you to do, however, is read
Garth's primer in its entirety, which will stimulate your thought processes and give you a broad picture of the world of 65C02 computing.