MCLZ8 project, (fast) Z80 replacement

صفحة 1/2
| 2

بواسطة lintweaker

Champion (474)

صورة lintweaker

20-01-2023, 13:18

A couple of weeks ago I came across the MCLZ8 project where a Teensy 4.1 microcontroller on a PCB with level shifters is used a (fast) Z80 processor replacement.
The MCZL8 has been successfully tested as a Z80 replacement in a TRS-80 and the NABU PC. For both systems significant speedups are possible.
It supports a few different modes where mode 0 gives a cycle accurate Z80. Other modes provide system speedups e.g. by putting the system ROMs in the Teensy RAM and also using the Teensy internal RAM as memory for the host system.

The Teensy 4.1 is quite a capable microcontroller board with an Arm Cortex M7 microcontroller (IMXTR1062) which, by default, runs on 600MHz. Written in C, the Z80 emulator can be programmed using the Arduino IDE. Adding new features to the emulated Z80 like R800 multiply should be feasible and hopefully there are possibilities to speedup the MSX as well.
There are quite a few built in pheriperhals on the Teensy which should be interesting to see if these can be utilized from an MSX host.

Intrigued by the project and its potential possibilites for MSX, I decided to built my own PCB for testing with my DIY MSX. Last week I had it successfully booting MSX1. MSX2 and MSX2+ did not really work properly.
Today, after reflowing the solder joints of those small level shift ICs my board can now also successfully boot to MSX2 and 2+!
It is still early days but if there is interest we could develop a version which can replace a DIP40 Z80 in MSX1 and MSX2 machines.

Original project: MicroCoreLabs MCLZ8
my initial project: Z8TY MCLZ8

Login أوregister لوضع تعليقاتك

بواسطة Matej

Expert (73)

صورة Matej

20-01-2023, 14:33

Nice so like tutbocard PiStorm on Amiga. Like this idea for example even MSX1 can have more cpu time so better games (bigger objects, parallel scrolling etc).

بواسطة st1mpy

Paladin (947)

صورة st1mpy

20-01-2023, 16:16

Cool. A dip40 version with some of msx2 features emulated would enable msx1 to msx2/2+ upgrade.

بواسطة sdsnatcher73

Enlighted (4289)

صورة sdsnatcher73

20-01-2023, 18:27

Cool stuff, Sony MSX2+ machines use regular DIP40 Z80 so even those could be a target for this. Were you able to load systemroms into the RAM? Is this done through the emulation (by providing .rom files) or is the ROM read through the bus on boot?

بواسطة lintweaker

Champion (474)

صورة lintweaker

21-01-2023, 08:29

sdsnatcher73 wrote:

Cool stuff, Sony MSX2+ machines use regular DIP40 Z80 so even those could be a target for this. Were you able to load systemroms into the RAM? Is this done through the emulation (by providing .rom files) or is the ROM read through the bus on boot?

For MSX, the emulator needs to know about (sub)slots. I am busy adding that to the emulator, once that is done I can fully test putting the MSX BIOS into the emulator. After that, a memory mapper...?

بواسطة S0urceror

Master (220)

صورة S0urceror

22-01-2023, 09:18

Like it. Would be a nice testbed for in-machine soft- and hardware development if we keep the USB connection to a master PC controlling it. This way we can develop software on the PC, put it in memory of the MSX and run it in-system. Or emulate virtual software that is not really connected to the MSX but to the software running on it made to look like being there.

Thanks Lintweaker for posting about this. I’ll make one too!

بواسطة lintweaker

Champion (474)

صورة lintweaker

22-01-2023, 12:29

After some quick changes to the code, the Teensy internal RAM can now be used to hold the MSX1 32k BIOS and RAM.
On startup the MCLZ8 will the copy 32k of BIOS to the internal RAM (*).

Found a few BASIC benchmarks:
Basic benchmarks
Altered benchmark 5 to use for testing:

10 time=0
20 k=0
30 k=k+1
40 a=k/2*3+4-5
45 gosub700
50 ifk<10000thengoto30
60 ?time:end
700 return

Relative performance using the MCLZ8 various accelerator modes:
M0 - all memory access uses external RAM (cycle accurate)
M1 - MSX1 32k BIOS via internal RAM, rest via external
M3 - All memory access (so also BIOS) from internal RAM.

Came to these figures:
M0: 27.73 secs
M1: 13.1 secs
M3: 6.83 secs

M0 is a bit to slow with the current code compared to a normal Z80. M3 is really fast. Here we get screen corruption (as excpected). Enabling VPD wait does help but it is not enough. Extra waits for writes to VRAM are needed.
Switching between modes can be done on the fly using a few OUT commands (added a MSX switched IO port to the code).

(*) this mode is only useful for testing MSX1 in BASIC mode. MSX (sub)slot awareness is needed for general use

بواسطة lintweaker

Champion (474)

صورة lintweaker

29-01-2023, 12:25

Small update. MSX can now fully use ROM and RAM inside of the microcontroller for full performance.
ROMs can be loaded from the micro SD card. MSX1,2 and 2+ mode are all working.
I hope to show it using an original MSX computer in Nijmegen this March.

بواسطة lintweaker

Champion (474)

صورة lintweaker

30-01-2023, 15:23

After some updates to the emulator code, I am now able to boot the Turbo-R roms!
In the fastest mode, it really feels like a Turbo-R. With this solution it should be possible to get the Turbo-R experience on a MSX2+ or converted MSX2 with a V9958.

بواسطة tfh

Prophet (3425)

صورة tfh

05-03-2023, 09:59

This sounds like it's becomming a nice "want-to-have" for my NMS-8250 which is indeed converted to 2+ Smile Nice stuff.
Too bad I'm unable to come to Nijmegen this year...

بواسطة BillGates

Rookie (18)

صورة BillGates

05-03-2023, 18:19

Please post a vid of this device. It sounds awesome!

صفحة 1/2
| 2