CPCWiki forum

General Category => Amstrad CPC hardware => Topic started by: Fessor on 23:15, 07 August 21

Title: IZE80 - In Circuit Simulation of a Z80
Post by: Fessor on 23:15, 07 August 21
As is well known, the gate array hinders the acceleration by increasing the system frequency, but perhaps another approach will work.
Can our hardware experts take a look at this nice piece of hardware?
Would it be possible with in-circuit emulation to simulate a faster Z80, where the execution time of each instruction would practically only take one NOP? (To practically have Winape's turbo mode in hardware?)

Unfortunately, he has not yet been able to bring himself to offer it for sale.
https://www.youtube.com/watch?v=Gdode3PfTbs&t=2s (https://www.youtube.com/watch?v=Gdode3PfTbs&t=2s)
Title: Re: IZE80 - In Circuit Simulation of a Z80
Post by: GUNHED on 17:46, 08 August 21
It would be awesome to 'just' exchange the Z80 and have a CPU with a smaller number of machine cycles. This really would speed the system up.  :) :) :)
Title: Re: IZE80 - In Circuit Simulation of a Z80
Post by: genesis8 on 10:42, 11 August 21
Interesting and I found other ICE Z80 on internet.
Now some days/weeks ago there was on CPCWiki a ICE Gate Array thread, but I didnt succeed to find it again, if you are luckier than me thanks.
Title: Re: IZE80 - In Circuit Simulation of a Z80
Post by: Sykobee (Briggsy) on 11:05, 11 August 21
This should work, as long as its external timings are the same, but it seems his implementation has some specific support for the video chips and sound chips in the MSX (but that might just be supporting interrupts correctly, it's unclear).


It may not be massively faster due to the limitation of main memory access cycles, but I don't know how efficient the Z80 was with using its memory access slots.


Maybe a cache is implemented if this is an issue.


Obviously you can then extend the instruction set, multiply, divide, fast memory copy, graphical blitting, raster coprocessor, and so on. You can't add other hardware features, just provide faster implementations of algorithms you would have done on the Z80 in code before.
Title: Re: IZE80 - In Circuit Simulation of a Z80
Post by: Fessor on 11:06, 11 August 21
Quote from: genesis8 on 10:42, 11 August 21
Interesting and I found other ICE Z80 on internet.
Now some days/weeks ago there was on CPCWiki a ICE Gate Array thread, but I didnt succeed to find it again, if you are luckier than me thanks.
This one? https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/creating-a-replacemant-gate-array/ (https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/creating-a-replacemant-gate-array/)
Title: Re: IZE80 - In Circuit Simulation of a Z80
Post by: genesis8 on 11:11, 11 August 21
Doh, how could I miss it ! Thanks a lot, now I will write about the ICE on my web site today or tomorrow.
Title: Re: IZE80 - In Circuit Simulation of a Z80
Post by: GUNHED on 13:17, 11 August 21
Quote from: genesis8 on 10:42, 11 August 21
Interesting and I found other ICE Z80 on internet.
Is there a commercial source for a Z80 replacement?

I would luckily buy and test one, but can't find any seller.
Title: Re: IZE80 - In Circuit Simulation of a Z80
Post by: zhulien on 14:37, 12 October 22
I also had no luck trying to find a seller of this but i think it could be a cool thing to experiment with - especially if it works on the CPC.
Title: Re: IZE80 - In Circuit Simulation of a Z80
Post by: TotO on 14:42, 12 October 22
Currently, a Z80 CPU cost 1$ and it is highly available. A replacement is useless.
The interrest is to see if it can be used to improve the speed on a 4MHz bus.
For that, it will be required to use a core compatible with the NMOS version.
Title: Re: IZE80 - In Circuit Simulation of a Z80
Post by: GUNHED on 17:58, 12 October 22
That's the idea.
Title: Re: IZE80 - In Circuit Simulation of a Z80
Post by: Bread80 on 18:12, 12 October 22
Once you've replaced the CPU and the gate array you'll find that the DRAMs and multiplexers are consuming half of the available cycle time. Replace that lot with modern, fast, SRAM and you'll have a system which is capable of significantly higher speeds.

However, by that point you've replaced most of the system and you may as well design a new motherboard from scratch.
Title: Re: IZE80 - In Circuit Simulation of a Z80
Post by: GUNHED on 19:06, 12 October 22
RAMs seen not to be the problem. My 6 MHz CPC runs with 450 ns RAMs and 150 ns RAMs equal well. The Gate Array seems to be the limiting factor for an even higher speed.
Title: Re: IZE80 - In Circuit Simulation of a Z80
Post by: Bread80 on 13:21, 13 October 22
I'd be interested to see what speed improvement you get with a 6MHz CPU.

The READY/WAIT signal is only high for about five of every 16 clocks from the crystal. Is there enough leeway in that timing for it to get more instructions processed?
Title: Re: IZE80 - In Circuit Simulation of a Z80
Post by: pelrun on 14:26, 13 October 22
Unfortunately there's a lot of caveats with the IZE80; it runs slower than a real Z80 (multiple cycles are lost while processing each instruction) and doesn't do a great job handling WAIT either. It's apparently mostly fine for his MSX but it wouldn't do well in a CPC.

Title: Re: IZE80 - In Circuit Simulation of a Z80
Post by: pelrun on 14:29, 13 October 22
As for theoretical benefits of an ICE... there's many smarter ways a z80 ice can boost performance than just crudely reducing the cycle time of instructions. Also, why do that? Compatibility is bound to suffer - you really want anything hitting the bus to mimic the Z80 as closely as possible. However who says you have to hit the bus for every instruction? Add some local ram, detect and subvert any banking commands to allow mapping it as if it was "real" ram, and when executing out of that bank you can fetch as fast as the local bus lets you, only slowing down for any instruction that has to hit the real bus, like IO.

...I may have something brewing in the pipeline.  :laugh:
Title: Re: IZE80 - In Circuit Simulation of a Z80
Post by: eto on 15:35, 13 October 22
Quote from: pelrun on 14:29, 13 October 22As for theoretical benefits of an ICE... there's many smarter ways a z80 ice can boost performance than just crudely reducing the cycle time of instructions. Also, why do that? Compatibility is bound to suffer - you really want anything hitting the bus to mimic the Z80 as closely as possible. However who says you have to hit the bus for every instruction? Add some local ram, detect and subvert any banking commands to allow mapping it as if it was "real" ram, and when executing out of that bank you can fetch as fast as the local bus lets you, only slowing down for any instruction that has to hit the real bus, like IO.

...I may have something brewing in the pipeline.  :laugh:

Nice - looking forward to it

I have thought about that lately too. For the Amiga there is the PiStorm project. Something similar would probably also work for the CPC. You could have CPU/RAM/ROM and even a graphics card emulated in the PI with full backwards compatibility, where it behaves exactly like a NMOS Z80 and plain slow RAM.

A Pi Zero 2 would probably fit into most CPC cases and provide more than enough performance to simulate all relevant hardware add-ons we currently stack to the back of our CPC.

However, frankly speaking, this is no longer a CPC. It's an emulated Z80 computer, running on a Raspi that uses the CPC for I/O to create the impression of a real CPC that seems to be 50x faster than an original CPC.

But... if it's fully backward compatible - why not. A 50€ device that removes the requirement for any further add-on is tempting.

Title: Re: IZE80 - In Circuit Simulation of a Z80
Post by: pelrun on 05:27, 14 October 22
A Pi is both too much and not enough, and good luck getting the other hardware a PiStorm style device needs at the moment (but LCSC just got 160 xc9572xl's in, I should buy a few spares quick).

Out of all the hardware in the CPC, the Z80 is the least interesting. It's everything else (GA, CRTC, AY3, etc) that gives our machines their character, so I don't see a problem with replacing the CPU with an emulation - you're still using the original "everything else". And speedups aren't actually the real use case for it anyway...
Title: Re: IZE80 - In Circuit Simulation of a Z80
Post by: zhulien on 11:11, 14 October 22


I still debate it being a CPC.  Are you still you if you get a bionic ear?  Is a cyborg eto still eto?  I still see my Amiga with Vampire as an Amiga - it runs AmigaOS, it behaves the same as the Amiga did albeit a lot faster with more RAM - an Amstrad CPC Vampire card or PiStorm CPC of course would still be a CPC - just an enhanced one.
Title: Re: IZE80 - In Circuit Simulation of a Z80
Post by: eto on 12:42, 14 October 22
Quote from: zhulien on 11:11, 14 October 22I still debate it being a CPC.  Are you still you if you get a bionic ear?  Is a cyborg eto still eto? 

bionic ear: of course - cyborg - definitely not. And it's not so much how I see it, but how my beloved ones would see it. And I guess they don't have an issue with the ear, but a cyborg that looks and acts like me, might freak them out.

But for technology: I would see it as something else, that is not a CPC - but as long as it is fully backwards compatible, I would still try it out.
Title: Re: IZE80 - In Circuit Simulation of a Z80
Post by: andycadley on 13:13, 14 October 22
The CPC of Theseus.  :laugh:
Title: Re: IZE80 - In Circuit Simulation of a Z80
Post by: GUNHED on 15:20, 14 October 22
Quote from: Bread80 on 13:21, 13 October 22I'd be interested to see what speed improvement you get with a 6MHz CPU.
By exchanging the 16 MHz Crystal by a 24 Mhz Crystal, this happens:
- CPU 50% faster (6 MHz instad of 4 MHz)
- 50% more space on floppy discs (need own format)
- picture 50% smaller in X (not in Y), so you can have 50% more pixel in every scanline.
This enables a visible 32 KB V-RAM screen with fantastic resolution and colors
- PSG 50 quicker: less bass, songs need to be adapted
- Expansion port: also 50% more quick - not all expansions work. RRB not, EPROM cards yes.
Title: Re: IZE80 - In Circuit Simulation of a Z80
Post by: TotO on 18:05, 14 October 22
But the reality is not 50% more speed for the CPU, just the clock.
Title: Re: IZE80 - In Circuit Simulation of a Z80
Post by: GUNHED on 14:14, 15 October 22
In my case it's 50% more of everything. I did a lot of testing to verify that.
Title: Re: IZE80 - In Circuit Simulation of a Z80
Post by: zhulien on 18:09, 15 October 22
I wonder if this z80 patcher would work in cpc

https://github.com/ninomegadriver/Z80Patcher
Title: Re: IZE80 - In Circuit Simulation of a Z80
Post by: genesis8 on 13:23, 04 August 23
MCLZ8 Drop-in Z80 Emulator and Accelerator (https://hackaday.io/project/188682-mclz8-drop-in-z80-emulator-and-accelerator) (2023 post on Hackaday)
Powered by SMFPacks Menu Editor Mod