CPCWiki forum

General Category => Technical Support - General => Topic started by: Kris on 12:30, 06 October 16

Title: Z80 defective tests
Post by: Kris on 12:30, 06 October 16
Hi all,


Yesterday evening, I tried to launch the Z80 full test package on different CPCs and found 2 of them with the attached results.....It seems that some tests are not OK. However, I have tried to launch several games, demos etc....without any concerns.
Both defective Z80 were from Zilog, I have replaced them by Z80 from ST and 100% of the tests are OK now.
Does anyone already faced this kind of results ? Are Z80 from Zilog really dead ?


(http://nsa37.casimages.com/img/2016/10/06/mini_161006014650891534.jpg)

(http://www.casimages.com/i/161006014650891534.jpg.html)
Title: Re: Z80 defective tests
Post by: TotO on 13:23, 06 October 16
Is the two Z80 was replaced before? What models are they?
Title: Re: Z80 defective tests
Post by: arnoldemu on 13:41, 06 October 16
http://www.worldofspectrum.org/forums/discussion/41704/

I believe other Z80's may give different results for those specific tests. It depends on if the z80 was licensed from zilog or implemented separately.

Which model of the Z80 did you test?

I think I have NEC based ones which pass this ok. I will confirm.

Title: Re: Z80 defective tests
Post by: Kris on 14:11, 06 October 16
I will place here a picture of both Z80 this evening ;)
Those were the original ones into the CPCs.
Title: Re: Z80 defective tests
Post by: Bryce on 17:36, 06 October 16
What exactly is this test testing? I have a box full of different Z80s here, everything from the late 70's variations up modern clones. Is it testing real failures or is it testing non-implemented features?

Bryce.
Title: Re: Z80 defective tests
Post by: SRS on 17:43, 06 October 16
Guess this one ? http://ace.cpcscene.net/tests:arnold_test_suite

Title: Re: Z80 defective tests
Post by: Kris on 21:38, 06 October 16
Here is a pic of the 1st one (I don't have the second one yet)


(http://nsa38.casimages.com/img/2016/10/06/mini_161006105502475216.jpg) (http://www.casimages.com/i/161006105502475216.jpg.html)
Title: Re: Z80 defective tests
Post by: Bryce on 08:08, 07 October 16
Quote from: Kris on 21:38, 06 October 16
Here is a pic of the 1st one (I don't have the second one yet)


(http://nsa38.casimages.com/img/2016/10/06/mini_161006105502475216.jpg)
(http://www.casimages.com/i/161006105502475216.jpg.html)

That's as authentic as they get. Can't get better than a real Zilog part from the late 80's.

Bryce.
Title: Re: Z80 defective tests
Post by: TotO on 08:24, 07 October 16
Exactly.
Title: Re: Z80 defective tests
Post by: Kris on 13:21, 07 October 16
I agree but It does not answer my question :D

Title: Re: Z80 defective tests
Post by: Bryce on 13:31, 07 October 16
True, but I haven't got an answer either to: "What exactly is it testing?".

If I knew what it was testing and how it does it, it may answer your question. I can also test known good and known bad Z80s from Zilog and others which might also give us an answer.

Bryce.
Title: Re: Z80 defective tests
Post by: arnoldemu on 13:47, 07 October 16
Quote from: Bryce on 13:31, 07 October 16
True, but I haven't got an answer either to: "What exactly is it testing?".

If I knew what it was testing and how it does it, it may answer your question. I can also test known good and known bad Z80s from Zilog and others which might also give us an answer.

Bryce.
It is running instructions with known data and comparing that against known and measured results.
I made the conversion to cpc, I will check again but I am confident it worked on the z80 in my gx4000.

It is also mostly concentrating on the "undocumented" flag operation - specifically bits 3 and 5 of the flags register.

The specific tests that are failing probably rely on exact operation of the specific instructions which were compared against one known z80.

It can only tell you if everything it tests matches that known z80.

Not all z80's are identical when it comes to the undocumented registers, especially z80 clones such as the u880.

Does it mean the z80 is broken? unlikely.

To be more confident run other cpu tests too.



Title: Re: Z80 defective tests
Post by: Kris on 14:23, 07 October 16
I have several CPCs here with me, I will perform the test on each ones and will give you a feedback.
Title: Re: Z80 defective tests
Post by: PulkoMandy on 15:27, 07 October 16
Maybe also try running ZEXALL, which does similar tests (runs under CP/M): http://cpcrulez.fr/applications_CPM-util-zexall.htm
Title: Re: Z80 defective tests
Post by: Kris on 20:06, 07 October 16
Thanks Pulko for the link, I have never hear about this one before tonight  :-\
Title: Re: Z80 defective tests
Post by: Docent on 05:39, 08 October 16
Quote from: Kris on 12:30, 06 October 16
Hi all,


Yesterday evening, I tried to launch the Z80 full test package on different CPCs and found 2 of them with the attached results.....It seems that some tests are not OK. However, I have tried to launch several games, demos etc....without any concerns.
Both defective Z80 were from Zilog, I have replaced them by Z80 from ST and 100% of the tests are OK now.
Does anyone already faced this kind of results ? Are Z80 from Zilog really dead ?


(http://nsa37.casimages.com/img/2016/10/06/mini_161006014650891534.jpg)
(http://www.casimages.com/i/161006014650891534.jpg.html)

I bet you have both NMOS and CMOS Z80 cpus and the error you have encountered is related to the test software you used.
Patrik Rak some time ago found interesting behavior of SCF/CCF instructions - if an instruction modifies the flags, the immediately following SCF/CCF does move bits 5+3 from A to F, whereas if an instruction doesn't modify flags, the SCF/CCF does OR of bits 5+3 from A to F. Z80 clones behave differently in this area than original Zilog Z80s hence you got this error.
btw: your cpus are ok, they are just different it handling internal alu operations - it should not have any impact on how the code work on them.

Title: Re: Z80 defective tests
Post by: Kris on 07:09, 08 October 16
Thank you Docent, I have find some infos yesterday evening here:


http://faqwiki.zxnet.co.uk/wiki/Z80
http://scratchpad.wikia.com/wiki/Z80


The second explains exactly what you reported here; I think this is what I found on my Z80 from Zilog.
FYI, all tests performed on other brand (ST, SSG, NEC..) don't show this "discrepancy" ;the most important is that there is no impact and both CPUs are OK  ;D
Title: Re: Z80 defective tests
Post by: gerald on 08:30, 08 October 16
Quote from: Kris on 07:09, 08 October 16
Thank you Docent, I have find some infos yesterday evening here:


http://faqwiki.zxnet.co.uk/wiki/Z80 (http://faqwiki.zxnet.co.uk/wiki/Z80)
http://scratchpad.wikia.com/wiki/Z80 (http://scratchpad.wikia.com/wiki/Z80)


The second explains exactly what you reported here; I think this is what I found on my Z80 from Zilog.
FYI, all tests performed on other brand (ST, SSG, NEC..) don't show this "discrepancy" ;the most important is that there is no impact and both CPUs are OK  ;D
The interresting point is that the test consider Zilog Z80 as 'defective' and others OK, while it should be the opposite  :laugh:
Title: Re: Z80 defective tests
Post by: 1024MAK on 14:10, 08 October 16
As the test is testing undocumented behaviour, none of the CPU's are "defective"...  :P

Mark
Title: Re: Z80 defective tests
Post by: gerald on 15:07, 08 October 16
Quote from: 1024MAK on 14:10, 08 October 16
As the test is testing undocumented behaviour, none of the CPU's are "defective"...  :P

Mark
But genuine undocumented behaviour are from Zilog implementation, others are just badly emulated  :D
Title: Re: Z80 defective tests
Post by: Kris on 16:54, 08 October 16
Quote from: gerald on 15:07, 08 October 16
But genuine undocumented behaviour are from Zilog implementation, others are just badly emulated  :D


That's true....
Title: Re: Z80 defective tests
Post by: arnoldemu on 17:15, 09 October 16
I ran the test again on my GX4000 and it works fine.

I'm not sure which Z80 it has, probably a ST Z8400AB1.

EDIT: @Kris (http://www.cpcwiki.eu/forum/index.php?action=profile;u=175): Please re-download test.zip:

www.cpctech.org.uk/test.zip (http://www.cpctech.org.uk/test.zip)

I want to make sure you have the latest version.
Title: Re: Z80 defective tests
Post by: Kris on 06:56, 10 October 16
@Arnoldemu:I just dump ther above version from you link and It seems that I was working with the latest one...Anyway,  iwill test those Z80 this evening, just to be sure.


@Gerald: Are you that this prog has been written for Zilog ? If not, It may explains the actual result...

Title: Re: Z80 defective tests
Post by: gerald on 17:17, 10 October 16
Quote from: Kris on 06:56, 10 October 16
@Gerald: Are you that this prog has been written for Zilog ? If not, It may explains the actual result...
It might be written to test specific implementation of the Z80, I have no idea on how the result have been gathered/validated.
However, it would be nice to have a detection of the Z80 implementation.

Anyway, if you have to name a 'defective' implementation, the original Z80 should be the reference  ;)
Title: Re: Z80 defective tests
Post by: Executioner on 01:11, 13 October 16
The accurate SCF/CCF emulation described here is something I've just implemented for WinAPE 2.0B3. I based that emulation on Patrik Rak's documentation and tested using the tests Kev created. I haven't tested my real CPCs yet. Do you have documentation on the flag values for a real Zilog Z80?
Powered by SMFPacks Menu Editor Mod