• Please review our updated Terms and Rules here

MCL8080+: The Ultimate Intel 8080 Emulator for the ATTiny85

MicroCoreLabs

Veteran Member
Joined
Feb 12, 2016
Messages
1,267
Introducing the MicroCore Labs MCL8080+


1780623395465.png

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.

1780623424560.png

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:

1780623472857.png
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.

1780623505206.png

1780623516313.png

1780623526579.png

1780623538700.png

1780623554659.png
The project source can be found on GitHub:
 
Last edited:
Fascinating! How come this product didn't change the face of computing when it came out in 1975? I assume the details posted here are directly from the article in Popular Electronics. ;)

(I Wonder what the 2026 indicated on the PCB. Perhaps that the design was way ahead of it's time?)
 
Fascinating! How come this product didn't change the face of computing when it came out in 1975? I assume the details posted here are directly from the article in Popular Electronics. ;)

(I Wonder what the 2026 indicated on the PCB. Perhaps that the design was way ahead of it's time?)
Na, just a good edit job on the cover,:ROFLMAO:
 
Na, just a good edit job on the cover,:ROFLMAO:

OMG, it's a DEEP FAKE! @MicroCoreLabs must have used AI to get such believable results. My years of experience photo-editing proves no human being could have done this.

Thanks for cluing us all in. For those who want to see the original cover that got doctored, I show it here. It took a while to find, since he had the AI change the date on the cover too. The original was from 2015, not 1975:
 

Attachments

  • PopularElectronicsCover-iPhone.jpg
    PopularElectronicsCover-iPhone.jpg
    689.7 KB · Views: 11
Funny that the magazine cover is getting more interest than the project :) I thought this would be an amusing addition since the Intel 8080 was an Altair-era CPU and the MCL8080+ can run Altair software. I felt that the people in the know would recognize that magazine cover...

The goal of the project was to see if an 8080 emulator would fit (and run fast enough to be usable) in such a weak microcontroller with a serial SPI bus interface. Someone tried this already with an ATMega328 (with a CPU more powerful than the ATTiny85 that I used) and got results that were too slow to be usable. My approach was to target the smallest microcontroller, streamline my emulator code, add a cache, and streamline the SPI bus controller.

Nerdy fun!
 
Someone tried this already with an ATMega328 (with a CPU more powerful than the ATTiny85 that I used) and got results that were too slow to be usable.
I am aware of at least two projects which are very usable:
  • I've implemented an 8080 core on an ATMega8515, using its XMEM interface for easy and fast memory access. It's optimized for size, but still delivers ~2 MHz on a 16 MHz clock.
  • On the [mikrocontroller.net] forum, a group of developers have implemented full Z80 emulation on an ATMega88 (later ATMega328P) by bit-banging a single 4-bit vintage DRAM chip.
    • Based on [this] project, which then got heavily extended.
    • They got up to almost ~4 MHz Z80 speed on a somewhat overclocked AVR, but I think getting there required two 4-bit DRAM chips.
    • The I2C bus is exposed to CP/M, for use with RTC, GPIO, serial and parallel ports. The latter three are exposed to standard software through IOBYTE.
 
Funny that the magazine cover is getting more interest than the project :)

I would have worded that "The magazine cover is getting more funny interest than the project." And rightly so, since you put it at the start of your post as an amusing joke. My apologies if my attempts at continuing the joke weren't picked up on. While I got the laughs ( i. e. :ROFLMAO: ) I had expected, I'm now wondering if they were for the wrong reason.

I felt that the people in the know would recognize that magazine cover...

I can't imagine anyone who read this thread and saw that the MCL8080+ was a functioning ALTAIR 8800 emulator would not immediately recognize the cover that introduced the original S-100 system.

I'm sorry if it seemed that I was ignoring your creation and focusing on the joke. As with all your projects, I'm impressed with your achievement. My original joking comments were intended to show how far we've come since 1975. What once was considered a powerful system built around the impressive microprocessor is now a palm-sized package built around an insignificant microcontroller. The original project you you mention didn't make this point anywhere near as definitively as yours does.
 
I can't imagine anyone who read this thread and saw that the MCL8080+ was a functioning ALTAIR 8800 emulator would not immediately recognize the cover that introduced the original S-100 system.
This magazine cover was more than a decade before my birth and from a country an ocean and an iron curtain away. No, I did not recognize this particular cover.
 
No, I did not recognize this particular cover.

I'm surprised you hadn't seen it before. Even if you hadn't been born or in the USA when it came out, this cover is frequently included with articles about the Altair 8800. The cover is currently a part of the en.wikipedia.org article on the Altair 8800, for example. (It's also the image that accompanies the Wikpedia article about Popular Electronics.)

So that everyone fully understands my second post (post #4 in this thread), it is also a continuation of the joke. I edited the same cover by replacing the picture of the Altair with a picture of an iPhone 6s and changed the cover date to September 2015 coinciding with the launch of that device. The idea was again to show how far technology had come, this time on the 40 year anniversary of the Altair. Popular Electronics ended its print run in 2003, so my cover was definitely a joke image.
 
Back
Top