17

I've recently really wanted to try and design a computer system around a retro 8-bit CPU such as the Zilog Z80 or the Intel 8080, and I would appreciate some sanity checks! I was inspired by Ben Eater's series on making a breadboard CPU, and I've built a large section of his project using the TI 74LS series TTL chips. Now, I was wondering if it was a reasonable project to design a retro computer based on the Z80, 8080, or other comparable 8-bit CPU. (perhaps the Motorola 6800?)

I understand that I'd have to get printed PCBs for any sort of reliability (no breadboards at this scale!) or at least get some solder-on boards. Also, I would have to get chips from unconventional sources (used or niche shops).

I've researched the Intel 8080 and it seems that they made (at least back then) a wide range of companion chips like the memory controller, IO controller, a chip that generated all the necessary system clocks/signals, etc. That seems rather convenient, but I worry that those companion chips would be even harder to acquire than the CPU itself.

I have a pretty good conceptual understanding of how these basic CPUs work, as well as a general understanding of assembly, machine code, stacks, instructions, etc.

Is this an impossible undertaking, or something that has been done many times before? My final goal would be to get some simple C compiler working, like Small-C, along with a terminal.

Thanks!

Edit: For future visitors, here is a link to a site with a very barebones Z80 implementation: http://searle.hostei.com/grant/z80/SimpleZ80.html

  • 4
    Take a look at sites.google.com/site/zberrysbc - basically a Raspberry Pi style board with a Z80. – manassehkatz Jul 30 '17 at 3:46
  • 2
    I haven't done either one (zberry or total homebrew system) myself, so it is hard to say. The nice thing about retro systems are the low clock rates, which should give a LOT more leeway on physical system design than with modern Ghz systems. But I'm no expert on this and my soldering of components has been minimal over the years (probably less than once a year now even for simple fixes) and I've never done any real hardware system design - contemplated it but always either found a commercial system cheaper/easier or just never had the time to implement my latest grand idea. – manassehkatz Jul 30 '17 at 4:19
  • 2
    Grant Searle's pages seem like a great starting point for me, except he only uses the Z80 (no Intel). Which is fine. He does his projects on standard old breadboards! Which is crazy awesome. He even has one that has NTSC output, straight from breadboard. – Zee2 Jul 30 '17 at 4:22
  • 2
    Grant Searle's stuff looks great. Good luck! – manassehkatz Jul 30 '17 at 4:53
  • 2
    You should avoid components as the i8080 or some vintage DRAMs that needed several power rails. 5V FTW ! – TEMLIB Jul 31 '17 at 20:20
8

It's absolutely possible and fun as well!

First, skip the 8080 projects for now. They require much more "glue" logic and knowledge to get a basic computer up and running. Second, focus on either the 6502 or Z80 CPU's. BOTH, BTW, are still being made NEW today. They are still in production.

I'm going to offer a little biased opinion here but for good reason. I would personally recommend starting out with the 6502 CPU over the Z80. I'm not interested in "holy wars" on which is better. Z80 certainly has plenty of CP/M support. However, I still recommend the 6502 because:

  • It's still being produced (so is the Z80). But, to be technical, you want the MODERN version of the 6502 which is the 65C02 (notice the "C"). The "C" is for CMOS which is a much easier chip to work with, supports different voltage and can be single-stepped.

  • The 65C02 has a few I/O chips that fit its bus design PERFECTLY. Such as the amazing 65C22 VIA chip and the 65C51 ACIA (serial) chip. BTW, both the 65C22 and the 65C51 are also still in production! The VIA (65C22) has so many practical uses you could write a book on it.

  • The 65C02 has one of the best, ACTIVE bunch of enthusiasts I have ever known. Yes, I know the Z80 is active too. But I have not seen a better bunch of guys that REALLY know their stuff than the group over at 6502.org. (http://forum.6502.org/). Not only do these guys know the 65C02, but they actually use them in their professional careers (along with other chips).

  • The 65C02 (and Z80, for that matter) is very easy to get going. A CPU, RAM, ROM (EEPROM), NAND gate and a serial or VIA is all you need for a real computer. So the design is very easy.

  • There is an AMAZING "primer" for the 65C02 over at this site (http://wilsonminesco.com/6502primer/). That site is indispensable for learning basic computer design with the 65C02. The guy who wrote it, BTW, is also a very active forum member over at 6502.org.

  • Skip the PCB for now. PCB layout is a completely different topic and will only add complications. Baby steps. Using breadboards is perfectly fine.

  • Don't try to build the next iMac on your first attempt. Start small. Very small. The primer site above will teach you how to do that.

  • It's easy to get a full BASIC up and running including the original Microsoft BASIC and/or EhBASIC. Not to mention Tiny BASIC, FORTH, Pascal, etc. Don't let the lack of CP/M harm your opinion of the 65C02.

At the end of the day, you really can't go wrong with choosing either the Z80 or 65C02 to build a simple, 8-bit computer. Both are very well supported. I just favor the 65C02 over the Z80 for the reasons listed above.

Good luck on your project!

  • Thanks for the comprehensive answer! You mention that the modern 65C02 variant allows for single stepping the processor: I wasn't aware you couldn't do this on others. I saw a pretty neat YouTube video of somebody stepping through a Z80 (not "single" stepping, but the clock was at like 1 hz). Do all Z80s do this? Do I need to be aware of CMOS variants of the Z80 as well, to allow very slow clocks? – Zee2 Aug 2 '17 at 17:08
  • @Zee2 I don't know as much about the Z80 as I do the 6502. But it's my understanding that the "C" (CMOS) versions of either chip is what allows this. It's static in nature and can be held high/low forever. NMOS based chips (the original Z80/6502) could not do this IIRC. But either way, I definitely recommend using CMOS versions of the Z80 if you go that route. – cbmeeks Aug 2 '17 at 17:17
  • 1
    @Zee2 also, I forgot another reason in my list. There is a 16-bit version called the 65C816. It's the same CPU used in the Apple IIgs and the SNES. It's backwards compatible with the 65C02. So it provides an easy upgrade path to 16-bit. And, the 65C816 is also still in production. – cbmeeks Aug 2 '17 at 17:19
  • Appreciate you recommend what you know best - I'd do the same. But there actually is a fully static CMOS version of the Z80 available (actually, all Z80 derivates still available new are in CMOS technology) and there are a number of "carefully upgraded" Z80-alikes around that have very interesting features, some with a whole lot of on-chip peripherals, so it should be pretty easy to find exactly what you want and need.. – tofro Aug 3 '17 at 7:35
  • 1
    Another alternative CPU is the CDP1802, which is also still available. While it's slower than the 6502 or Z80, its power consumption is way lower. Its power consumption is proportional to speed, with a quiescent current of less than a microamp, so it would be suitable for use in long-running applications with small batteries. An interesting feature of the 1802 is that it's practical to design a ROMless machine with a row of switches for entering code. – supercat Aug 4 '17 at 15:27
9

Custom PCBs wouldn't even be necessary, and if you want to design iteratively, could even be a hindrance. Since you will be dealing with slow rise times and a slow clock, even point or strip matrix boards and enameled wire will work, inverse dead bug (mounting IC sockets on standoff boards, or standing on their ground pins, on a continuous groundplane) can even work for far faster stuff (if I was ever to attempt say an 68000 or 80386, this would be the method of choice).

Keep the actual 8080 or even older chips for a second project: This chip is comparatively rare, and this chip and its contemporary entourage (first generation DRAMs, early IO chips) have complex power supply needs and are said to be rather easily damaged by mistakes.

An 8051 system (eg based on an in system programmable version like the 80S52, OR with external RAM and a monitor program and/or BASIC52) is a good starter project: Serial communication is quick to set up since there is an onboard UART that only needs a level converter (which you should build as a module and keep).

An EPROM programmer (plus eraser if you go use real EPROM. If you have a host PC capable of running 90s era OS and with a real parallel port, older programmers should be cheap to come by) and some execute-in-place capable EPROM/28-type FLASH/parallel EEPROM (try salvaging these off old PC mainboards) will be needed.

Z80, 6800, or 8085 (the tamed 8080) sound like the most reasonable second project.

For 8088, google up the difference between minimal and maximal mode systems.

Even if it sounds blasphemous: Get some broken/not worth restoring 8 bit computers and peripherals (dot matrix printers: often 8085/Z80 systems. 90s plasticky inkjets: often 80188 systems. dumb terminals (if you find a working one consider making it work!!): 6502 or 8085 or Z80 often. multisync CRT monitors, video recorders, processor-controlled stereo gear, button-and-LED appliances: /EA-capable 8051 usually), and cannibalize.

BTW: https://archive.org/stream/byte-magazine-1982-11/1982_11_BYTE_07-11_Graphics#page/n79/mode/2up .... any. questions. ?

  • Thanks for all the info! It sounds like the Z80 or 6502 is better for my needs because of the simpler power supply and modern production. The serial-based EPROM programmer sounds cool, but I was thinking of just hooking up an Arduino to program some EEPROMs. It would definitely be very anachronistic but historical accuracy isn't my priority :) – Zee2 Aug 2 '17 at 17:10
  • You'll need 28 style EPROM/FLASH, not 29, 24 or 93 style! While not having direct experience with the 6502, the dynamic-uber-alles mentality that is even found in the hyperactive bus protocol (seems 6502ish stuff ain't getting /CSed and otherwise left alone but constantly clocked... and internally, the 6502 seems to be one great hot potato game - everything that you can stuff in a DRAM cell long enough to survive a clock cycle got stuffed in one) sounds like a headache. – rackandboneman Aug 2 '17 at 23:45
  • Just heard that in an interview (CHM oral histories...) with some old Motorola staff: The 68000 series CPUs up to the 68030 were actually developed on a hardware breadboard, a whole TTL version of these complex CPUs existed... – rackandboneman Aug 3 '17 at 1:58
  • That is amazing about the TTL version. I built a little TTL breadboard ALU and it was really fun. I can't imagine prototyping an entire 68000 on TTL! – Zee2 Aug 3 '17 at 17:53
3

It's definitely possible, and you can get away with breadboards up to a point. There's a few examples around of some pretty cool machines being built on breadboards.

I'm currently in the process of building a 68k based machine myself, sounds like your software knowledge of these things is similar to mine, and I know sod all about electronics but I'm learning fast as I go. Currently I've got the CPU running code from EEPROM chips, next up is adding RAM and then some IO. I got sidetracked on the EEPROM part and built an EEPROM programming shield for an Arduino, definitely a huge side project but it provided a lot of useful learning for the overall project as I made my first PCB etc. as part of it.

Best advice I can offer is find a good book, and get hold of a cheap logic analyzer that works with Sigrok/PulseView... that's worth it's weight (if not more for the particularly cheap and light ones) in gold.

  • You mention building a EEPROM programming shield for Arduino and it being a pain; Ben Eater designed a similar system for programming his EEPROMs for his TTL CPU architecture (he used them for programming the instruction decoders and 7-segment display decoder). I wasn't aware it was such a difficult part! That sort of worries me, because that was exactly the technique I was planning on using! – Zee2 Aug 2 '17 at 17:05
  • Oh it wasn't painful, it was just pretty involved. I could have bought a programmer for $60 or so, but it was a useful learning exercise and cost me far less! There's a quick write up of it here: hackaday.io/project/20970-lacey-mk-i/log/… – Matt Lacey Aug 2 '17 at 23:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.