November 15, 2010

3 Min Read
The Magic-1 Homebrew CPU

The October issue of IEEE spectrum brought a great article on a DIY web server.  There are lots of ways of building your own WWW servers, from PCs with open source software to development platforms like Arduino or mbed.  Those are good projects but not uncommon, therefore not particularly noteworthy.

Bill Buzbee’s WWW server, however, is noteworthy.  Bill came of age in the 8 bit microcomputer days, and recently got the urge to revisit those days by building a web server around an 8 bit CPU.  He didn’t breadboard a Z80 or 6502, however.  Instead Bill designed his own homebrew microcoded CPU, including virtual memory, user/supervisor modes, external interrupts, and DMA.

Bill could have written the model in Verilog and synthesized it into an FPGA, but that wouldn’t have been extreme enough.  Instead, Magic-1 is implemented with 74 series TTL logic chips, over 200 of them, lovingly wire wrapped together across 5 prototyping boards.  The memory,

microcode store, and some peripherals are “modern” chips but the entire CPU is built from 40 year old logic gates.  The whole thing runs at 4 MHz, twice as fast (to my recollection) as a Z80 CPU as installed in a TRS-80, and about the same as the 8088 found in the original IBM PC.

But that wasn’t even the hard part, according to Bill.  He then had to write the development tools — assembler, linker,  retargeted C compiler, write/port a C library, and finally port Minix, rewriting portions of it along the way to make it understand his virtual memory architecture.

Finally, as you can see in the second photo, it’s housed in a terrific enclosure that brings back that look of the 70s minicomputer, with lots of switches and LEDs.

There are a few comments in the construction notes section about debugging Magic-1 while bringing it up.  I can only imagine the signal integrity problems from all those wire wraps, and the opportunity for miswired connections,  broken wire wrap wires, and software bugs in all that hand written software.  The third photo is of a debugging session.  Bill also has a vintage logic analyzer, obviously put to good use for this project.

You can visit the WWW page served by Magic-1.  You can also telnet to Magic-1 and further your nostalgia kick by having a conversation with ELIZA, or playing Adventure or Hunt the Wumpus.  I just finished having a little session with ELIZA, strangely, it wasn’t nearly as therapeutic today as it was the last time I talked to her, probably about 30 years ago.

Magic-1 also hosts a program that draws a Mandelbrot set, rendered in ASCII art, if you have the time to wait for it.  In case you don’t, I’ll paste the output below, when it finishes.  Looks like it’ll be at least another hour.

******************************************************************************************************************************************************************************************************************************** *********************************************************    ********************************************************    ********************************************************    ****************************************************+*--*+++************************************************** **          **********************************************                  *******************************************                 ****************************************+*                 ******************************************                   ***************************************-                      **************************************                     ***************************** *  +****                      *****************************       **                      ****************************         *                      ****************************         *                      *************************+ *         *                     *************                                              ***************************+ *         *                     *****************************         *                      ****************************         *                      *****************************       **                      ***************************** *  +****                      ***************************************                     **************************************-                      ***************************************                   ****************************************+*                 ********************************************                 ******************************************                  ******************************************* **          *************************************************+*--*+++********************************************************    ********************************************************    ********************************************************    ********************************************************** ***************************************************************************************************************************************

Bill, congratulations on a terrific project.  As Spectrum magazine put it, this is certainly “DIY as an extreme sport”.

Steve Ravet

Design News Gadgeteer

Sign up for the Design News Daily newsletter.

You May Also Like