Ted Fried's MCL8080+ Crams a Working Intel 8080 Emulator Into Microchip's Teeny-Weeny ATtiny85
What took Intel a 40-pin DIP chip can now be achieved in an eight-pin microcontroller — complete with CP/M compatibility.
Ted Fried has demonstrated the march of technological progress with a call-back to Intel's classic 8080 microprocessor — by emulating it on a low-cost, low-resource Microchip ATtiny85 microcontroller: the MicroCore Labs MCL8080+.
"The MCL8080+ is an Intel 8080 emulator written in C which runs on the [Microchip] ATTiny85 microcontroller," Fried explains of the project. "Instead of the 40-pin package that Intel used the MCL8080+ local bus is implemented with a SPI serial bus with a number of optimizations! The ATTiny85 is a very resource-limited microcontroller which has only 512 bytes of RAM, 8k of ROM, five GPIOs [General-Purpose Input/Output pins] plus minimal serial bus support. The MCL8080+ 8080 emulation code was developed to save enough space to allow for a small 128-byte direct-mapped cache that greatly improved the performance by reducing activity over the SPI bus where all of the program code and data resides."
The Intel 8080 launched in 1974 as a follow-up to the 8008, which was in turn an eight-bit successor to the four-bit Intel 4004 microprocessor. While Intel launched the chip with embedded control systems in mind, its flexibility and performance saw it adopted by the nascent microcomputer industry: the Intel 8080 was the first chip targeted by Gary Kildall for his popular CP/M operating system, while MITS decision to use it at the heart of the Altair 8800 would see it become the de-facto standard for Altair-bus — later S-100 bus — microcomputers from a vast array of manufacturers.
Intel's original 8080 was packaged as a ceramic 40-pin dual-inline pin (DIP) chip, but Fried's emulated recreation is a lot smaller. It's running on Microchip ATtiny85, an eight-bit AVR microcontroller packaged in plastic with just eight pins — and definitely in no way designed as a general-purpose processor for a microcomputing system. Despite limited RAM and ROM Fried was able to write an emulator capable of running original software written for the Intel 8080, including Microsoft's Altair BASIC and Kildall's CP/M, though it has a little help: the ATtiny85 only replaces the Intel 8080, with the rest of the hardware required for a fully-functional microcomputer emulated on a considerably more powerful Teensy 4.0 microcontroller communicating with the ATtiny85 via SPI bus.
"Running all system RAM, ROM and peripherals over a serial bus would normally make the system too slow to be practical," Fried admits. "The MCL8080+ achieves a massive speed improvement by using a 128-byte direct-mapped cache which eliminates unnecessary SPI bus reads for code loops and frequently used code. Due to these optimizations the MCL8080+ boots CP/M just a hint slower than a genuine Altair 8800."
More information is available on the MicroCore Labs blog, with design fiels and source code available on GitHub under an unspecified open source license.