CPCWiki forum

General Category => Amstrad CPC hardware => Topic started by: darkhalf on 16:58, 18 May 21

Title: Replacement Z80A CPU
Post by: darkhalf on 16:58, 18 May 21
Unfortunately my recently aquired CPC464 will did not power on. Sometimes screen would scroll random patterns and then stop.


I swapped the Z80A over (from the other CPC464) and all came to life fortunately. Was hoping it wasn't one of the ASIC Amstrad parts!


So now I'm in the hunt for another Z80A. Do you need to use the Zilog ones or can the Sharp ones be used?

https://www.ebay.com.au/itm/372272867554 (https://www.ebay.com.au/itm/372272867554)


Does anyone know of a reliable source for these?


I'm in Australia, and freight is a nightmare 60GBP just to get the 464 here due from the UK. Many ebay sellers have complaints of counterfeit chips. I've seen this first hand with CRTC chips. Had one good one, and one fake


thanks
Matt
Title: Re: Replacement Z80A CPU
Post by: TotO on 17:05, 18 May 21
Use NMOS Z80 CPU to be fully compatible with CPC programs like Z0840004PSC.
I don't know about if the Sharp Z80 are NMOS or CMOS...
Title: Re: Replacement Z80A CPU
Post by: darkhalf on 00:36, 19 May 21
Okay thanks will dig further


Part number on working 464: MOSTEK MK3860N-4
Dead 464 and my working 6128: Zilog Z8400A PS (380A)


Edit: CPC service manual has IC111 as Z84400 APS
Title: Re: Replacement Z80A CPU
Post by: RetroCPC on 16:38, 19 May 21
Are you sure the Mostek part number is not MOSTEK MK3880N-4 ?

Anyway, this is a better link for a NMOS Z80A:-

https://www.ebay.com/itm/402782080514?hash=item5dc7aece02:g:-Y8AAOSwSddgbVrT

With ordering from China, you always have the risk of fake parts but the cost of this part its not going to break the bank...
Title: Re: Replacement Z80A CPU
Post by: TotO on 17:22, 19 May 21
Z0840004PSC

- 1x https://www.ebay.com/itm/174313284022?hash=item2895e1a1b6:g:Rz4AAOSwS7xe4eMj (https://www.ebay.com/itm/174313284022?hash=item2895e1a1b6:g:Rz4AAOSwS7xe4eMj)
- 5x https://www.ebay.com/itm/174313289653?hash=item2895e1b7b5:g:Rz4AAOSwS7xe4eMj (https://www.ebay.com/itm/174313289653?hash=item2895e1b7b5:g:Rz4AAOSwS7xe4eMj)
- 10x https://www.ebay.com/itm/392833995040?hash=item5b76bb1120:g:Rz4AAOSwS7xe4eMj (https://www.ebay.com/itm/392833995040?hash=item5b76bb1120:g:Rz4AAOSwS7xe4eMj)

Best price. Fee shipping, free return. Already ordered to this seller. Why searching another CPU version? :D
Title: Re: Replacement Z80A CPU
Post by: Bryce on 17:36, 19 May 21
I've bought parts from them in the past too and they were always good. Now if I could just convince them to stop using that non-ESD safe pink foam they use, they would make it higher on my favourites list!

Bryce.
Title: Re: Replacement Z80A CPU
Post by: matburton on 21:24, 11 November 21
Quote from: TotO on 17:05, 18 May 21Use NMOS Z80 CPU to be fully compatible with CPC programs like Z0840004PSC.

I've also had to replace a CPU (among other things) and bought a Z0840004PSC.

How can I check it's genuine, i.e. NMOS and not re-badged CMOS? Anything I can do at the basic prompt?
Title: Re: Replacement Z80A CPU
Post by: TotO on 22:09, 11 November 21
Quote from: matburton on 21:24, 11 November 21How can I check it's genuine, i.e. NMOS and not re-badged CMOS? Anything I can do at the basic prompt?
I have bought them two times from this seller two years ago and they worked properly:
https://www.ebay.fr/itm/254599020800?hash=item3b4748c100:g:-DwAAOxy63FSvE2K (https://www.ebay.fr/itm/254599020800?hash=item3b4748c100:g:-DwAAOxy63FSvE2K)
Title: Re: Replacement Z80A CPU
Post by: matburton on 22:14, 11 November 21
Quote from: TotO on 22:09, 11 November 21I have bought them two times from this seller two years ago and they worked properly:

How did you know they were genuine NMOS? Were there any checks you performed?
Title: Re: Replacement Z80A CPU
Post by: ajcasado on 22:29, 11 November 21
Quote from: matburton on 22:14, 11 November 21How did you know they were genuine NMOS? Were there any checks you performed?

Run any program that uses the Arkos sound engine (for instance adios a la casta), if the sound is OK then the CPU is NMOS. It uses undocumented opcodes that perform different actions in cmos and nmos z80's.
Title: Re: Replacement Z80A CPU
Post by: TotO on 00:54, 12 November 21
Exactly.
Title: Re: Replacement Z80A CPU
Post by: VincentGR on 14:06, 12 November 21
Relentless also has problems with the other Z80, dunno if it is a 128K game though.
Title: Re: Replacement Z80A CPU
Post by: GUNHED on 14:51, 12 November 21
Quote from: ajcasado on 22:29, 11 November 21
Run any program that uses the Arkos sound engine (for instance adios a la casta), if the sound is OK then the CPU is NMOS. It uses undocumented opcodes that perform different actions in cmos and nmos z80's.


Which Z80 commands / opcodes are the problematic ones?
Title: Re: Replacement Z80A CPU
Post by: ajcasado on 15:44, 12 November 21
I guess that is OUT (c),0, it outputs 0 in nmos and 255 in the cmos version.
Title: Re: Replacement Z80A CPU
Post by: GUNHED on 15:49, 12 November 21
Quote from: ajcasado on 15:44, 12 November 21
I guess that is OUT (c),0, it outputs 0 in nmos and 255 in the cmos version.
Thank's a lot for that information. Well, I used that instruction too. Good to know in case of problems.
Title: Re: Replacement Z80A CPU
Post by: TotO on 18:17, 12 November 21
TFM knew it. :P
Title: Re: Replacement Z80A CPU
Post by: matburton on 18:21, 12 November 21
Quote from: ajcasado on 15:44, 12 November 21
I guess that is OUT (c),0, it outputs 0 in nmos and 255 in the cmos version.

Long shot, but is there any way to try this Z80 instruction from basic?

I have a working keyboard but not a working tape drive for this CPC.(The idler tyre has perished)
Title: Re: Replacement Z80A CPU
Post by: Axelay on 03:52, 13 November 21
Quote from: VincentGR on 14:06, 12 November 21
Relentless also has problems with the other Z80, dunno if it is a 128K game though.


It's not 128k, only 64k required, was designed to fit in a 16k ROM for the wiki compo.  But it uses the Arkos Tracker 1 replayer, which does use that OUT (C),0 instruction.
Title: Re: Replacement Z80A CPU
Post by: GUNHED on 02:58, 14 November 21
Quote from: TotO on 18:17, 12 November 21
TFM knew it. :P
Now  ;) :)
Title: Re: Replacement Z80A CPU
Post by: TotO on 04:26, 14 November 21
Quote from: GUNHED on 02:58, 14 November 21
Now  ;) :)
"Oh crap! I didn't know!" Since January 2016 (https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/z80-cpu-nmos-or-cmos/msg116840/#msg116840)! ;)
Title: Re: Replacement Z80A CPU
Post by: GUNHED on 21:44, 14 November 21
Quote from: TotO on 04:26, 14 November 21
"Oh crap! I didn't know!" Since January 2016 (https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/z80-cpu-nmos-or-cmos/msg116840/#msg116840)! ;)


Your memories are exzellent! Congratulations. I'm happy to know what I did last weekend.  :-\
Title: Re: Replacement Z80A CPU
Post by: TotO on 14:16, 15 November 21
Quote from: GUNHED on 21:44, 14 November 21
Your memories are exzellent! Congratulations. I'm happy to know what I did last weekend.  :-\
Thank you, my own X-MEM. ;D 
Title: Re: Replacement Z80A CPU
Post by: eto on 21:10, 27 September 22
Just out of curiosity: are there any "faster" CPUs that would be 100% compatible with the NMOS Z80? Or FPGA implementations?
Title: Re: Replacement Z80A CPU
Post by: Prodatron on 01:11, 28 September 22
There was another thread here in the forum about this some monthes ago. Having a CPU, which is working faster internally wouldn't help so much, as the Z80 is only able to access the 2mhz CPC bus with 1mhz (the second 1mhz is used by the gate array).
The R800 of the MSX TurboR is nearly 100% Z80 compatible and it only needs one cycle/command byte instead of usually >=4 like the Z80. But in case of the CPC it wouldn't help so much because of the 1mhz bus limit.
Title: Re: Replacement Z80A CPU
Post by: eto on 10:36, 28 September 22
Yes, I know. And I don't want to start the discussion again.

I was just wondering if there is any CPU that is indeed 100% compatible (or has compatibility mode) when clocked at 4MHz. Would the Z80H be such an option? Or could that only be achieved by an FPGA implementation?

The R800 is a perfect example for not being an option as it will not work with all programs that rely on the number of cycles per command (probably many games). And of course: it's not available.
Title: Re: Replacement Z80A CPU
Post by: MaV on 12:15, 28 September 22
The Z80B and Z80H are NMOS chips which were produced with the same chip mask as the Z80A, so there should be no problem using them instead of a Z80A.
Title: Re: Replacement Z80A CPU
Post by: SerErris on 20:12, 02 November 22
And again - without changes to other components you will not gain any benefit from it. 

The GA is clocking the CPU with 4Mhz and a Memory cycle is allways 4 ticks from the clock. So actually the CPU needs 1µs per memory read and also 1µs for anything internally (4 ticks per Mcycle at 4Mhz ~ 1M Mcycles per second). 

So the CPU in the CPC (and actually the Z80A) is working in memory cycles and having multiple of those per command. Simple ones take only 1M cycle (NOP) more complex can add up pretty large amount of cycles.

For the CPC it is allways 4 cycles so all the commands are calculated in NOPs (1M = 1NOP) and the most expensive ones are 7 NOPs, like  RRC (IX+dd). 

So where a NOP takes 1µs to execute, a RRC (IX+dd) takes 7µs. 

The CPU is very closely aligned to the gatearray as the GA needs to read from the memory all the time (2 bytes per µs). That is why actually the GA is in control of the clock AND the access to memory. So just increasing the CPU clock frequency will not solve anything. 

Title: Re: Replacement Z80A CPU
Post by: WacKEDmaN on 22:28, 02 November 22
i wonder if an option could be added to the fpga gate array to allow it to run double speed..

eg it clocks the cpu at 8mhz..getting 2mhz on the mcycles... 
(most 4mhz z80s will run at 8mhz perfectly fine with only a slight increase in temp..i do it on my z80-mbc2)
Title: Re: Replacement Z80A CPU
Post by: Bread80 on 14:58, 03 November 22
Quote from: WacKEDmaN on 22:28, 02 November 22i wonder if an option could be added to the fpga gate array to allow it to run double speed..

eg it clocks the cpu at 8mhz..getting 2mhz on the mcycles...
(most 4mhz z80s will run at 8mhz perfectly fine with only a slight increase in temp..i do it on my z80-mbc2)
The major limitation with that is the RAM access times - both the RAM itself and the multiplexers (for video/CPU address to RAM). There might also be some issues with hardware and I/O. I don't the timings on all those chips.

In theory if you sort that then you could just divide down the crystal and use that instead of the PHI signal coning from the GA. You still get a lot of the cycle where the GA is pausing the CPU while it accesses memory.

My preference would just be to design a new M/B with SRAM and faster multiplexers, then rework the signal timings to work with them.
Title: Re: Replacement Z80A CPU
Post by: PulkoMandy on 19:12, 03 November 22
There were some experiments with replacing the clock in the CPC, you can go up to 6MHz without problems. Going higher than this you start to run into problems with the ROMs, so you need to replace these with more modern and faster ones.

Of course, you need to adjust a few other things: CRTC settings are incompatible (each character will be narrower so you need more of them to keep the same timings) and floppy timings would be off as well. But if you manage to run at 8MHz, you get exactly the right timings to use HD floppies  8)

Title: Re: Replacement Z80A CPU
Post by: TotO on 20:11, 03 November 22
Exactly. With a 32MHz Gate Array, you got a nice computer close to the Atari ST.

- 8MHz CPU
- 2MHz AY sound
- HD Floppy Drive
- 320x200 with 16 colours (32K page)
Title: Re: Replacement Z80A CPU
Post by: GUNHED on 20:13, 03 November 22
Let's go for it!  :)
Powered by SMFPacks Menu Editor Mod