My 4004 Computer

A guy asked about my first computer. Wow. That was many years ago.

I always wanted a computer of my own as far back as I can remember. When I was in high school, I started collecting electronic parts (200 dual-triode vacuum tubes, filament transformers, etc) so I could build one. I didn't have a clue. One tube can do one flip-flop or maybe two gates; a computer takes thousands of them. My first full-time job as a programmer, I read all the magazine ads, but the cheapest computer was more than $10K, which was two years' salary.

When Intel announced their computer-on-a-chip, I was ecstatic. I went to their seminar, and they told about using a PDP-10 (mainframe computer) to program it, so I put up my hand and asked about a resident assembler. They didn't have anything like that. So I asked, "If I wrote one, would you buy it?" He responded, "See me afterwards." The deal was, they gave me a prototype board and a ROM burner and some time on their PDP-10 in exchange for a resident assembler and simulator that ran on the board. It had 1K 4-bit RAM and slots for 4K ROM, but the assembler had to run on the smaller (1K ROM) prototype board also. It did. All input and output, including binary (hex) code, was an ASR-33 Teletype (TTY), which I had to buy separately.

I guess were happy with my program, because when people asked about programmers, they mentioned my name. I got a lot of business from that.

Using an ultra-violet light to erase ROMs and then re-burning them every time I had a bug to fix got to be a drag, so I designed a wire-wrap state-of-the-art 4K dynamic RAM board to plug into the ROM socket(s) and pretend to be ROM, but connected to one of the I/O ports on the proto board to write to it. The computer was pretty slow, so it had time to refresh memory on every cycle. It didn't work at first, but then I learned you need decoupling capacitors on every RAM chip. I learned a lot about hardware those days.

IBM had invented the 8" floppy disk for loading their S/360 virtual machine with its microcode, and a few of those drives started to show up on the OEM electronics market. I bought an early model and designed a controller something like Steve Wozniak did three years later for the Apple II, but mine had a few more parts because my computer was not fast enough to handle the data in real time. Then I made a very small boot ROM to get programs off the floppy and load them into RAM, and for years I was the only guy at the HomeBrew Computer Club with a 4-bit computer AND a disk operating system. I kept the club mailing list on my computer. I wrote a disk-based sort program, so I could zip-sort the mailing list for mailing, and alpha-sort it for looking up names. It ran all night ("clank-clank" each disk access) to sort a few hundred names, but it was my computer.

When I was at Berkeley I learned that the (analog) TV signal could be understood as time-division multiplexed colors, so I designed a video controller that did color that way, but was otherwise a 32x8 "TV typewriter", and implemented it on one of the new programmable logic arrays just coming out. The chip was expensive and not erasable, so I wrote a simulator on my computer to check all the logic before committing the money. I think it ran for a week to get one video frame (1/60th of a second). When I went for the chip, I discovered one inconsequential flaw, but otherwise it worked great -- except no color. It seems that my crystal oscillator was not accurate enough. I'm not really an electrical engineer, all of this was self-taught, and I had loaded down the oscillator circuit too much, so it ran slow (less than 1% but too far for the TV). I got help with the design and soon had that working too. I still used the TTY for printout and (paper tape) backup files, but the TTY keyboard was clunky so I connected up an electronic keyboard for typing.

I once got a call from the Nielson folks who do TV ratings. They wanted to know if I had a TV (yes) and did it work (yes) and I think how long was it on in a week (maybe 80 hours) and would I be willing to fill out a survey for a week or so of watching for some nominal fee (yes). They didn't ask what I watched on that TV (my computer output the whole time). So I filled out their form and sent it in, I think there was an "other" category for what channel I watched, but I don't remember. I thought it was funny, because the whole time the TV was on, and I watched it, it only displayed computer output. I didn't (and still don't) have any other functional TV in the house. I think I originally got the set to watch broadcast TV, but mostly it wasn't worth the time. I distinctly remember seeing on it, (it must have been) 1976 winter Olympics, the grand slalom downhill ski run, some contestants went down in perfect control, others flailed around and spilled out. After a while you could pretty much predict who would make it to the bottom standing up. So here came this guy flailing his arms around around at every flag, you just knew he was going to spill out -- but he didn't. He won. I took a moral from that incident: in competition, the winner is the one who gets closest to failure without actually failing. Somebody later told me a race car driver wants his engine to blow up just after he crosses the finish line. Same thing: if it doesn't blow up, you could have pushed it harder; if it blows up before you cross, you don't finish.

I used the 4004 system for something like 5-7 years, until I had to move: the condo I bought was one block from a radio tower, and the broadcast signal overwhelmed my rats-nest computer (which acted like an antenna). FCC Rule 15 requires commercial computers to be inside an enclosure to keep the electronic signals from escaping and messing up radio and TV reception; the same shielding protects the computer from interference the other way, but my open-air system didn't have any of that. You maybe heard that the first real program on an Altair 8800 three years after I got my 4004, was the computer playing "Daisy" through a transistor radio sitting nearby. That was what the FCC was trying to prevent. Anyway, by the time I moved I was mostly using an RCA 1802 system (inside a box) which I had bartered the same way, so the 4004 computer went out with a bunch of electronic stuff I gave to the local community college. It didn't occur to me at the time that it might have historical value.

I probably wrote my TinyBasic on that 4004 system, but I don't remember. I know I debugged it on somebody else's computer, because I never had a 6800 (nor 6502) system of my own. I probably could have done a 4004 TinyBasic, but it didn't have enough RAM (other than my pseudo-ROMs) to hold much program, so why bother.

Tom Pittman
2014 March 20