Vintage COSMAC Elf is Pretty Close to Original

Popular Electronics was famous for the article introducing the Altair 8800 back in 1975 (well, the cover date was 1975; it really came out in late 1974). That was so popular (no pun intended), that they ran more computer construction articles, including the SWTPC 680 late in 1975. But in 1976 a very popular article ran on building a very simple computer called the COSMAC ELF. [Youtubba] had an Altair, but always wanted a “cute” COSMAC ELF. Now, forty-something years later, he finally got around to it. He made the very detailed video about his experience, below.

Surprisingly, he didn’t have to look very hard for too many of the components as most of them were available from Digikey. He had to get compatible RAM chips, the 1802 CPU and LED displays. He also couldn’t find a look-alike crystal, so he used a fake one and a hidden oscillator. The result looks awfully close to the original. He even did a nice front panel using Front Panel Express.

It might be hard to understand why people got excited over a little computer with a handful of switches. Consider the Altair, though. For $439 you got a very basic machine with 256 bytes of RAM (upgradable to 1K, or beyond if you bought more boards). If you wanted to expand it to something really useful with RAM, disk drives, and a terminal you were still talking lots of cash. And that was 1975 cash. In equivalent terms, that Altair kit would cost $2000 today.

The ELF, on the other hand, could be put together on a piece of perf board. If you had to buy everything from scratch, it might cost $100 back then. If you had a well-stocked junk box, you could cut that down a good bit. The DMA onboard the 1802 chip made the front panel simple, and it facilitated a companion graphics chip that produced crude black and white graphics on a monitor or TV.

If you are too lazy to do the build, you can always play with the computer in your browser. If you don’t care about having an authentic look, there’s always the membership card.

29 thoughts on “Vintage COSMAC Elf is Pretty Close to Original

  1. Honest question… how does the 1802 stack up compared to, say, a 6502? I’m not just looking for raw performance, i.e. how fast it crunches numbers, but rather more of a “what can you do with it” sort of comparison. I can tell offhand, for example, that the 1802’s on-die DMA gives it at least /some/ advantage, but I can’t tell how much because I just plain don’t know.

    As an aside — I’ll check back tomorrow morning (I’m on East-Coast US time, FWIW) to see what you folks have to say — I don’t want my phone pinging all night and Hackaday’s “subscribe” doesn’t do just a single thread…

      1. It is not radiation hardened by design but by assembly technique. The silicon chip was monted on saphire and this was encased in cemaric instead of plastic. The cheap plastic version were not radiation hardened at all although it was the same chip.
        It was radiation hardened on purpose to be used on space probes and it was used on space probes because it was the first CMOS CPU available on market. It is compleletly static, meaning that its clock can be stopped without loosing the internal states reducing power consumption. But this CPU is rather slow it need 16 clocks per instruction or 24 for long jumps and branches. Compare it with an AVR core which only need 1 clock per instruction.

        The COSMAC ELF was running on a 3.579Mhz crystal which frequency was divide by 2 thus executing 111,860 instruction per second. SLOW!

    1. The COSMAC 1802 is all about it’s cool factor. It’s one of the first 8 bit CPU’s and Joseph Weisbecker (creator extraordinaire) had to invent *NEW* ideas from scratch. Today, there is nothing really new in technology, it’s the same as yesterday’s chips, only smaller, faster and cheaper.

      The 1802 is a great processor to play with. Like a Ford Model T this processor has it’s own unique style. One of the nice things about this processor is the multiple clocks required to complete each instruction. You can think of it as “seeing the moving parts”. I may be a little biased, since my first computer was a COSMAC ELF. The 1802 is nothing less than a treasure.

      To answer your question about 1802 vs 6502. While the 1802 has a lot more cool features, it lacks some of the advanced programming abilities that the 6502 has. The 6502 was an improved version of the 6500 which was modeled and made as a drop in replacement for the 6800. The 1802 stands in a class of it’s own.
      The bottom line, the 6502 is definitely much more suited to computing (better addressing modes) and easily out performs an 1802 with the right coding. The 1802 has some extra features that make it easier to use in a more minimal design, ie DMA, Direct Pin I/O (4 “EF” inputs, 1 “Q” output). Let me back up to where I spoke of “right coding”. The ComX-35 is an 1802 based system that runs BASIC and supports floppy drives and printers. It performs as well as the Ohio Scientific Superboard which runs a 6502. But the VIC-20 out performs both those computers with the same 6502. Perhaps I’ll display this comparison at VCF Midwest in Chicago this year.
      It should be said that the 1802 did advance to the 1805 processor which improved the instruction set. Being a 2nd generation 8 bit, I believe it would be more “fair” to compare the 6502 vs 1805.

      Josh Bensadon

      PS. I have found the best use of new technology is to preserve and illustrate the old technology. The best movies released on Blu-ray are the old classics.

      1. The original Cosmac Elf kit was my first. Clearly remember buying the IC sockets exactly doubled the price of the project. My “Hello World” program simply blinked the LED which of course had to be shown to the wife immediately. Big mistake. “You spent $$$ to just blink a light!!!?”. An excellent learning experience… never did let her know how much $$$ the soldering iron was. It’s still my front-line iron serving faithfully to this day.

        OSI Superboard II was the second… funded by converting tv sets to monitors… the Aim/Sym/Kim years.

    2. The 1802 is very simple to interface from a hardware point of view and has a very easy to learn machine language – a very small, very regular instruction set. It lends itself to simple, low power, controller applications with no, or limited RAM.
      By actual benchmark, in a complex programming environment, it’s about 20% the speed of a Z80 BUT, i was able to single-handedly adapt a compiler for it in a relatively short period. I’m pretty sure I’d still be working at it if i tried that with a 6502 or Z80.
      https://olduino.wordpress.com/2015/12/20/z80-vs-1802what-do-i-think/

      1. For several years, I used mine as a digital enlarger timer. The program was so short, I had it memorized so I could
        reload it by hand whenever the power went out. Worked fine, back in the day when digital timers cost hundreds of bucks. The code is still out there on the internets somewhere.

    3. CMOS, not NMOS.
      Many registers, not “very few”.
      Beautifully symmetrical instruction set. I’ve only seen one other that was more pleasing.
      Fully static operation (you can single-step the clock, or freeze it).
      Boot time autoloader.

    4. The 1802 was an “interesting” chip — one of, if not the, first CMOS (and thus, very low power for the day) CPU. It had a huge number of registers for the day (16 x 16 bit registers), any of which could be used as the program counter, any of which could be used as a memory pointer. I’m aware of no other 8 bit CPU with that many on-board registers. Want to call a subroutine? Put it’s address in one of those registers, change the program counter to be that register, ta-da, you just called the subroutine. Return by changing the PC back to the old register.

      There were a lot of nifty features that made it easy to build such a simple machine. For example, on reset, R0 (one of those 16 sixteen bit registers) was the default program counter, but also the DMA register, and it was reset to 0000h. So to load data into RAM, you could just reset the machine, hold it in halt state, put data on the bus (toggle switches), and hit the DMA IN line. Data is written to RAM, the DMA register is incremented, and the system is ready for you to put the next value in RAM. Most other computers required either a set of address switches, or a ROM monitor to load data, greatly raising the price and/or difficulty in home-brew work.

      There are a few input lines and one output line that are easy to use in HW and software. People built serial interfaces out of one of the input lines and the output line.

      Performance … well, did we mention that the hw was easy to work with? :) Really, performance was not this chip’s goal, apparently. The 1802 had an 8 clock cycle “machine cycle”, and each instruction took two or three machines cycles, so 16 or 24 clock cycles. Compared to the 6502, which as I recall, could execute some instructions in one clock cycle (granted, the 6502 had a two-phase clock, and used all four transitions, so one could argue that a 1MHz 6502 was really a 4MHz device, but still, the throughput of the 1802 was SLOW by compared to anything else of the day).

      While jumping subroutines was easy by changing the PC to point to a different register, the 1802 lacked a real stack. There were a couple instructions that were close — something like “put data in D register into memory location pointed to by the active index register, then increment the index register” and an almost corresponding “get data from memory location pointed to by the active index register, put in D reg, then INCREMENT the index register”. So close, but one should be incrementing, other should be decrementing to really make it a stack-like operation.

      In short — probably a fantastic microcontroller for the day, but the 6502 (and most other 8 bit chips) were better general purpose devices. Chip count for the simplest system could be very low compared to almost any other CPU of the day, but performance and flexibility were a bit behind the competition.

    5. Like Nick said, comparing raw clock cycles and processing power the 1802 chugs along while the 6502 (with its pipeline architecture) blazes. (Relatively speaking–the 6502 also hold up well against things like the Z80.)

      My first computer was an Ohio Scientific C1P so I’m partial to the 6502. Lately I’ve been playing with various “retro computing” kits and gizmos.

      I have the 1802 Membership Card. I will probably build an Elf clone also. (I have most of the chips already.) It is fun to play with, but the novelty of toggle switches wears off pretty quick. I have the Tiny BASIC ROM and machine monitor in mine now which makes it usable.

      I’m scratch building a W65C02 an have been doing a lot of work in assembly language on it. I struggled with the 1802 assembly language. Yes, there are a lot of 16 bit registers, but they seem to mainly get used as memory pointers. I wrote a few dozen programs for the 1802 and can make things work, but I really can’t imagine taking on a large project with it. It does have more on-board I/O features than your typical processor.

      With the 6502, I have Microsoft’s version of BASIC (the source code is floating around) working in an emulator and have built up a fairly robust machine language monitor without too much head scratching. I also have a EB50 kit on order from Apatco which uses the W65C816. I’m thinking about ordering the L-Star (just because it can emulate the C1P I originally had).

      (The scratch built machine will have a Batsocks TellyMate for video–kind of cool and a video card the size of your thumb with the micro version.)

      You might want to look at the 6502 based Dodo machine that is in the works also.

      You might want to check out the Z180 based P112 (or, if you want to go all the way, the Stack180). I have a P112 kit that I’m getting ready to build. The fact that it can run an OS that is compatible with CP/M gives you access to tons of code and software to play with.

      Bottom line is it all depends what you want to do. Also, prices have dropped enough that you can try two or three if you choose. I like the 1802 with it’s front panel for the novelty factor. The Z80 gives me lots of compilers and cross assemblers to play with. The 6502 is still my favorite and pretty easy to build around. Add a few 6522 VIAs and you have all the I/O you could want.

      They all have their niche and they all have their quirks.

      Jim

      1. Hi Jim,

        I want to just say that the 16 bit registers in the 1802 are not majorly used for memory data pointers.

        The 1802 has 16 of these 16 bit registers. 1 must be the program counter. For quick call/returns, another register can be used for the program counter (why push the PC to the stack, just change the PC to a different register!).
        But there are definitely times when you do need a stack, so another register is used for that. And if you are using interrupts, then there’s a fixed register for that (R1).

        When processing data in memory, you typically only need 2 registers (source and destination). Although, sometimes you can use just 1 (ie, Clear memory) or 3 registers (A=B+C). The other registers are commonly used for loop counters, flags, a temp location for your accumulator.

        I haven’t done any big programs in 1802, but I did manage to write John Conway’s game of Life on it.
        It uses the video pixie chip, so that requires R0 for DMA, R1 for interrupt, R2 for Stack and R3=PC.
        1 register holds the video page to display (while working the alternate page with the next generation).
        2 registers for memory pointers (old page & new page)
        1 register as a counter of cells
        3 registers are used as temp/scratch

        that leaves about 5 registers unused.

        The use of those registers in the 1802 makes it unlike any other processor. The instructions are very simple, and in fact, this processor is considered a RISC. If it had any of the speed of the later processors, it could have been very efficient and successful.

        Cheers,
        Josh Bensadon
        Toronto

    6. The 1802 and 6502 are both Turing-complete, so anything you can do with one you can do with the other. This is true for just about all microcomputers, new and old. The important differences are how fast; and how much memory it takes.

      According to Tom Pittman, who wrote BASICs for several of these classic microprocessors, the 1802 used less memory, but was slower than the 6502.

    1. We actually built an Elf just like this at the 2016 VCF-MW (Vintage Computer Festival – Midwest). The computer was built in a day by visitors to our table, and then raffled off. :-)

      All the design files are at www. sunrise-ev. com/vcf-elf.htm. (Hmm… how do I get a link to work here?)

  2. In the late 1970’s I worked for Hughes Aircraft who designed and built KuBand, the combination radar and communication system for the Space Shuttle. Control of the KuBand dish antenna was done using a mil spec 1802 processor running at, as I recall, 1.25 Mhz clock speed. Software commanded the antenna to perform a variety of scans to acquire either a rendezvous target in radar mode or one of the TDRSS satellites in communications mode. The 24 Kbytes of software were stored in power strobed, fuse link, bipolar PROMs. Software development was done in assembly language using a cross assembler which was written in-house and ran on Computer Automation Alpha LSI minicomputers. I was the lead engineer for the software development. As I recall the software development team was about 8 programmers. The 1802 was also used as a telemetry processor on the Hughes designed Galileo Probe.

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