Introducing the MicroCore Labs MCL8080+

The MCL8080+ is an Intel 8080 emulator written in C which runs on the ATTiny85 microcontroller. 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 complete 8080 emulation and local bus are implemented in the ATTiny85 microcontroller and all of the system RAM, ROM, peripherals, and disk images are provided by a Teensy 4.0. Some resistor voltage dividers are used to convert the ATTiny85’s 5V IO’s to 3.3V for the Teensy 4.0.

The ATTiny85 is a very resource-limited microcontroller which has only 512 bytes of RAM, 8K of ROM, five GPIOs 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.
Due to these optimizations the MCL8080+ boots CP/M just a hint slower than a genuine Altair 8800.
The MCL8080+ is written in simplified C using a lot of inline code and minimal calls and returns to reduce space and execution time. The emulator passed all 8080 opcode tests including ZEXALL:

The MCL8080+ local bus is implemented using a custom SPI bus which is optimized to improve efficiency and speed. All accesses are performed in burst cycles with auto-incrementing addresses until there is an address change. The SPI chip select was converted to a toggle to indicate that there was a new address on the bus which saves the MCL8080+ from having to toggle it at the end of SPI cycles.
The SPI slave controller is supported by a Teensy 4.0 which implements a bit-banged custom SPI controller and provides 64KB of RAM, the floppy ROM bootloader, a UART interface, a floppy controller, multiple BASIC, ROM, and floppy disk images including CP/M.
Running all system RAM, ROM and peripherals over a serial bus would normally make the system too slow to be practical. 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.
The MCL8080+ can run the original Altair 8080 BASIC famously written by Bill Gates and friends.
And when running the Altair floppy bootloader ROM the MCL8080+ can access two emulated floppy drives to run CP/M, MBASIC, and a number of applications and games.




The project source can be found on GitHub:
https://github.com/MicroCoreLabs/Projects/tree/master/MCL8080%2B
You can reach me at: mailto:eastwood90@hush.com






















