MicroCoreLabs Posted May 13, 2022 Share Posted May 13, 2022 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 recent Wordpress blog entries can be found here: MCLZ8 – ZILOG Z80 EMULATOR IN TRS-80 MODEL III MCLZ8 – TESTING VARIOUS APPLICATIONS I will post some videos shortly which demonstrate running the MCLZ8 in cycle accurate and accelerated modes where it appears from initial testing that it can run 15X faster than the stock Zilog Z80! Thanks, -Ted 3 Quote Link to comment Share on other sites More sharing options...
Turbo-Torch Posted May 13, 2022 Share Posted May 13, 2022 Very cool and interesting. How much taller is your replacement compared to the original Z80? I've been wanting to install a speedup kit (mainly for better 5 voice Orchestra 90 music) but there's next to no extra space between my motherboard and hi-res video board. Quote Link to comment Share on other sites More sharing options...
MicroCoreLabs Posted May 13, 2022 Author Share Posted May 13, 2022 (edited) My board is taller than it needs to be... I have an extra socket on the motherboard side to protect the original one, and I have sockets for the Teensy which are raising it up a good deal. If you skipped both sockets the MCLZ8 would be significantly shorter. Similar to any of the other vintage TRS-80 accelerator boards. Edited May 13, 2022 by MicroCoreLabs Quote Link to comment Share on other sites More sharing options...
Calibus Posted May 13, 2022 Share Posted May 13, 2022 I've been interested in something like your project ever since I ran across this project - sadly too late to take advantage of it: https://github.com/hoglet67/AtomBusMon/wiki I personally have no interest in the speedup potential - but I would absolutely love to be able to single step the CPU like they can with the GODIL, set break points etc. And it if you are able to query ROM locations and be able to read/write to RAM - that would be extremely handy for troubleshooting TRS-80s with video problems. I, and probably others here would also be interested in your MCL65+ that you mention here: https://microcorelabs.wordpress.com/2022/02/07/mcl86-design-notes-and-challenges/ Since the 6502 is what runs our Atari, Apple and Commodore 8bit machines. Quote Link to comment Share on other sites More sharing options...
MicroCoreLabs Posted May 13, 2022 Author Share Posted May 13, 2022 Thanks! Yes, having break points, register dumps, and single-stepping are easily done. In-fact, thats how I developed this core! I debugged the MCLZ8's Z80 core using a command-line version on my laptop where a register dump was done after each opcode. I then ran my core in lockstep with a known-working Z80 emulator - stopping on any difference between the PC, registers or flags. I then ran the ZEXALL opcode test to dial-in the Z80 correctness. All that was left after that was to add some code for the Bus Interface Unit (BIU) which toggled the Teensy's GPIOs to emulate the Z80's local bus interface. Oh, and of course build a PCB which contains some buffers to translate the 5V Z80 signals to the Teensy's 3.3V. Ill post all of this on GitHub shortly... Acceleration speed wasn't the goal of this project... Just a cool side-effect! The goal was to write my own Z80 emulator which can be used as a drop-in replacement for the original CPU. Quote Link to comment Share on other sites More sharing options...
Calibus Posted May 13, 2022 Share Posted May 13, 2022 3 hours ago, MicroCoreLabs said: Thanks! Yes, having break points, register dumps, and single-stepping are easily done. In-fact, thats how I developed this core! I'd love to see a video of this in action ? I hope you would make this an optional feature: Quote If we eliminate cycle-accuracy, locate the RAM and ROM into the MCLZ8’s internal RAM and Since accessing the actual RAM and ROM on the TRS-80s would be a major boon for troubleshooting bad chips. What sort of interface do you have to the emulator - command line via serial port? It would also be nice to be able to take a snapshot of the memory (all 64K) and and be able to download it... Basically - a "Freezer" for the TRS-80 Again - would love a video demonstration ? Quote Link to comment Share on other sites More sharing options...
MicroCoreLabs Posted May 13, 2022 Author Share Posted May 13, 2022 Below is a snapshot of running tthe MCLZ8 at the command-line. It would be easy to add this to the hardware version so you could set a breakpoint, then go into single-step mode which would dump registers, flags, and anything else of interest. Quote Since accessing the actual RAM and ROM on the TRS-80s would be a major boon for troubleshooting bad chips. True. I have done this, and was thinking of trying different ROMs on my Model III for fun. One could also make some testing code which exercises all of the TRS-80 motherboard components from the Z80 CPU's slot. I have done this already for the Commodore 64: COMMODORE 64 TESTER USING MCL64 Quote What sort of interface do you have to the emulator - command line via serial port? Yes, I use the USB UART supplied by the Teensy and use the Arduino Serial.xxx function calls. Quote It would also be nice to be able to take a snapshot of the memory (all 64K) and and be able to download it... Easily done.. Just a UART keystroke or an access to specific address could cause the MCLZ8 to stop the emulation, dump the CPU state and any memory ranges you wish. Quote Link to comment Share on other sites More sharing options...
MicroCoreLabs Posted May 14, 2022 Author Share Posted May 14, 2022 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 Quote Link to comment Share on other sites More sharing options...
Calibus Posted May 14, 2022 Share Posted May 14, 2022 OK, Time for the 64K question - are you going to be selling these? I'm sure I'm not the only one would be interested in buying a couple of them. (A Z80 and if possible - a 6502 version) If you don't want to sell them - would you release the gerbers for the boards and firmware for the Teensy so folks like myself could make our own? Quote Link to comment Share on other sites More sharing options...
Turbo-Torch Posted May 14, 2022 Share Posted May 14, 2022 Does disk access work while in accelerated mode? I believe all the old kits disable speedup during disk I/O to keep the drives functional. Quote Link to comment Share on other sites More sharing options...
MicroCoreLabs Posted May 14, 2022 Author Share Posted May 14, 2022 5 hours ago, Calibus said: OK, Time for the 64K question - are you going to be selling these? I'm sure I'm not the only one would be interested in buying a couple of them. (A Z80 and if possible - a 6502 version) If you don't want to sell them - would you release the gerbers for the boards and firmware for the Teensy so folks like myself could make our own? No plans to sell them, but I the short term I will give away some of the first batch of the boards. It cost me only $25 for five of them including shipping! I will upload the project files today so anyone can build one of these boards. The files for the MCL65+ are already on GitHub. I will also try to figure out how to make the PCB available from JLCPCB so that you only need to select it as a pre-made project. Quote Link to comment Share on other sites More sharing options...
MicroCoreLabs Posted May 14, 2022 Author Share Posted May 14, 2022 4 hours ago, Turbo-Torch said: Does disk access work while in accelerated mode? I believe all the old kits disable speedup during disk I/O to keep the drives functional. In acceleration mode-3 the MCLZ8 appear to be 15-20X faster than the stock Z80, which is much too fast for the disk drive to work properly. The keyboard also has difficulty debouncing so you get multiple letters per keystroke. The MCLZ8 is written in C so we could add code to enable/disable acceleration around IO functions like disk and keyboard accesses. But I would need the TRS-80 community's help on this! If someone could give me the memory/IO accesses to look for, I can certainly add this functionality. I just received my TRS-80 Model III from eBay last week, so Im not very familiar with it's inner-workings yet 2 Quote Link to comment Share on other sites More sharing options...
MicroCoreLabs Posted May 14, 2022 Author Share Posted May 14, 2022 Project files are now on GitHub: MCLZ8 Github 2 Quote Link to comment Share on other sites More sharing options...
Calibus Posted May 14, 2022 Share Posted May 14, 2022 I took a look at the your github projects - and got all excited when I saw: https://github.com/MicroCoreLabs/Projects/tree/master/MCL68 But instead of the 6809 version I was hoping for - it was a 68000 If you come up with a 6809 version - you'll have most of the bases covered as far as Radio Shack / Tandy 8bit users are concerned. I'm betting the CoCo guys would love a version for the Coco 1,2,3 2 hours ago, MicroCoreLabs said: I will also try to figure out how to make the PCB available from JLCPCB so that you only need to select it as a pre-made project. That would be perfect! 2 hours ago, MicroCoreLabs said: No plans to sell them, but I the short term I will give away some of the first batch of the boards Well - then you should setup a donation page. In anticipation of your opening this project to the general public - I had already ordered a couple Teensy 4.1's before the rest of the world finds out about the project and buys 'em up ? Quote Link to comment Share on other sites More sharing options...
MicroCoreLabs Posted May 15, 2022 Author Share Posted May 15, 2022 I have four boards to give away, so if anyone wants one please send me a message. You would need a Teensy 4.1 and also do a bit of soldering for your choice of connectors. Quote Link to comment Share on other sites More sharing options...
MicroCoreLabs Posted May 15, 2022 Author Share Posted May 15, 2022 (edited) ... Edited May 15, 2022 by MicroCoreLabs Quote Link to comment Share on other sites More sharing options...
MicroCoreLabs Posted May 25, 2022 Author Share Posted May 25, 2022 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 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.