MCLZ8 - Zilog Z80 Emulator in TRS-80 Model III

I wanted to share my latest project, the MCLZ8, which is a Zilog Z80 emulator which can be used as a drop-in replacement for the original Z80.

My Wordpress blog can be found here: MCLZ8 Link

For now, the MCLZ8 is running as a cycle-accurate Zilog Z80; however the next (fun) step will be to start integrating stuff like the TRS-80’s RAM and ROMS and running/caching them at the full speed of the 800Mhz Teensy microcontroller to see just how fast we can make this TRS-80 Model III, and see how it compares to the the accelerators which were available back in those days!

Thanks,
-Ted

4 Likes

Nice work! It will be interesting to hear about acceleration performance.

Perhaps see also this previous thread:

Preliminary results indicate that the MCLZ8 is more than 15 times faster than the stock Z80 in the TRS-80 Model III… This is with cycle accuracy disabled and both ROM and RAM running at the microcontroller’s top speed… More testing needed, but it looks promising…

1 Like

More application testing results for the MCLZ8:
https://microcorelabs.wordpress.com/2022/05/13/mclz8-testing-various-applications/

What about using it as a replacement for a Z80 in other Z80 machines?

Aside from BUSREQ/BUSACK signals the MCLZ8 is drop-in compatible to any Z80 socket.

1 Like

Nice project! The Teensy 4.1 is one of the few high performance boards that only rarely goes out of stock. The manufacturer did some clever planning and took a gamble on securing enough processors that he can meet steady (if not expanded) demand.

1 Like

I posted some videos of a few games and also a quick demo of the degree of acceleration achieved with the MCLZ8.

Posted on my blog here: MCLZ8 VIDEOS – GAMES AND Z80 ACCELERATION

1 Like

Project files are now on GitHub: MCLZ8 Github​​​​​​​

1 Like

I integrated the TRS-80 Model I ROMs into my MCLZ8 Z80 emulator and mapped the UART to the TRS-80’s keyboard and video RAM and now have it running on a standalone Teensy 4.1 board!
TRS-80 MODEL I EMULATOR USES MCLZ8 IN A TEENSY

2 Likes

I built this for my Freebee (Microbee clone) machine.

Due to space constraints, I redesigned the board with the voltage translators so it fit neatly under the teensy, with the pads for the Z80 on 0.4" spacing, then put a second passive board underneath to go back to 0.6". It’s tall, but no wider than the Z80 it replaces.

It works, but I’ve noticed a couple of things which I’m now getting in to the code to play with:

  1. IN a, (n) on a real Z80 outputs register A to the upper 8 address lines. Perverse as it is, the too-clever-by-half designers of the Microbee utilised this to do IO output. Alas that doesn’t work (yet) with MCLZ8 as it appears to do nothing with hiogh order addresses during IO read or write.
  2. Execution speed is a long way off. I’m clocking at 3.375 MHz, and there’s a bunch of stuff on the microbee that’s bit-banged (tape I/O, serial I/O and sound). I found it just won’t read tapes. I measured the speaker frequency when playing tones, and they’re about 70% of what they should be, so I slowed down the tape to 70% and it worked. Not sure whether it’s because my 3.375 MHz clock is just too fast for the teensy so I’m dropping clocks, or if perhaps there are (big) issues with cycle timing. I suspect the former, which will be something of a bummer as that’s hard to fix.

Anyway, check out a couple of pictures of the thing on my blog. Even with the timing issues I see a whole lot of potential for a debug device.

http://www.suzyj.net/2025/02/mclz8-on-freebee.html

2 Likes