Author Topic: Z80 defective tests  (Read 1955 times)

0 Members and 1 Guest are viewing this topic.

Offline Kris

  • 6128 Plus
  • ******
  • Posts: 553
  • Country: fr
  • Team Impact
  • Liked: 220
  • Likes Given: 816
Z80 defective tests
« on: 14: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 ?





Offline TotO

  • 6128 Plus
  • ******
  • Posts: 3.407
  • Country: fr
    • ?area=showdonations;u=4
  • Liked: 2591
  • Likes Given: 1525
Re: Z80 defective tests
« Reply #1 on: 15:23, 06 October 16 »
Is the two Z80 was replaced before? What models are they?
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.332
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2246
  • Likes Given: 3477
Re: Z80 defective tests
« Reply #2 on: 15: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.

My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline Kris

  • 6128 Plus
  • ******
  • Posts: 553
  • Country: fr
  • Team Impact
  • Liked: 220
  • Likes Given: 816
Re: Z80 defective tests
« Reply #3 on: 16:11, 06 October 16 »
I will place here a picture of both Z80 this evening ;)
Those were the original ones into the CPCs.

Offline Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 10.980
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
  • Liked: 3862
  • Likes Given: 401
Re: Z80 defective tests
« Reply #4 on: 19: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.

Online SRS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 540
  • Country: de
  • Schneider CPC464 - what else ?
  • Liked: 534
  • Likes Given: 280
Re: Z80 defective tests
« Reply #5 on: 19:43, 06 October 16 »

Offline Kris

  • 6128 Plus
  • ******
  • Posts: 553
  • Country: fr
  • Team Impact
  • Liked: 220
  • Likes Given: 816
Re: Z80 defective tests
« Reply #6 on: 23:38, 06 October 16 »
Here is a pic of the 1st one (I don't have the second one yet)



Offline Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 10.980
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
  • Liked: 3862
  • Likes Given: 401
Re: Z80 defective tests
« Reply #7 on: 10:08, 07 October 16 »
Here is a pic of the 1st one (I don't have the second one yet)




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

Bryce.

Offline TotO

  • 6128 Plus
  • ******
  • Posts: 3.407
  • Country: fr
    • ?area=showdonations;u=4
  • Liked: 2591
  • Likes Given: 1525
Re: Z80 defective tests
« Reply #8 on: 10:24, 07 October 16 »
Exactly.
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

Offline Kris

  • 6128 Plus
  • ******
  • Posts: 553
  • Country: fr
  • Team Impact
  • Liked: 220
  • Likes Given: 816
Re: Z80 defective tests
« Reply #9 on: 15:21, 07 October 16 »
I agree but It does not answer my question :D


Offline Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 10.980
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
  • Liked: 3862
  • Likes Given: 401
Re: Z80 defective tests
« Reply #10 on: 15: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.

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.332
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2246
  • Likes Given: 3477
Re: Z80 defective tests
« Reply #11 on: 15:47, 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.



My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline Kris

  • 6128 Plus
  • ******
  • Posts: 553
  • Country: fr
  • Team Impact
  • Liked: 220
  • Likes Given: 816
Re: Z80 defective tests
« Reply #12 on: 16: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.

Offline PulkoMandy

  • 464 Plus
  • *****
  • Posts: 337
  • Country: fr
  • Liked: 268
  • Likes Given: 1
Re: Z80 defective tests
« Reply #13 on: 17: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

Offline Kris

  • 6128 Plus
  • ******
  • Posts: 553
  • Country: fr
  • Team Impact
  • Liked: 220
  • Likes Given: 816
Re: Z80 defective tests
« Reply #14 on: 22:06, 07 October 16 »
Thanks Pulko for the link, I have never hear about this one before tonight  :-\

Offline Docent

  • CPC6128
  • ****
  • Posts: 163
  • Country: pl
  • Liked: 103
  • Likes Given: 0
Re: Z80 defective tests
« Reply #15 on: 07:39, 08 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 ?




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.


Offline Kris

  • 6128 Plus
  • ******
  • Posts: 553
  • Country: fr
  • Team Impact
  • Liked: 220
  • Likes Given: 816
Re: Z80 defective tests
« Reply #16 on: 09: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

Offline gerald

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.403
  • Liked: 992
  • Likes Given: 249
Re: Z80 defective tests
« Reply #17 on: 10:30, 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
The interresting point is that the test consider Zilog Z80 as 'defective' and others OK, while it should be the opposite  :laugh:

Offline 1024MAK

  • Supporter
  • 464 Plus
  • *
  • Posts: 320
  • Country: gb
  • Touching the hot end of an iron will hurt!
  • Liked: 137
  • Likes Given: 183
Re: Z80 defective tests
« Reply #18 on: 16:10, 08 October 16 »
As the test is testing undocumented behaviour, none of the CPU's are "defective"...  :P

Mark
Looking forward to summer in Somerset :-)

Offline gerald

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.403
  • Liked: 992
  • Likes Given: 249
Re: Z80 defective tests
« Reply #19 on: 17:07, 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

Offline Kris

  • 6128 Plus
  • ******
  • Posts: 553
  • Country: fr
  • Team Impact
  • Liked: 220
  • Likes Given: 816
Re: Z80 defective tests
« Reply #20 on: 18:54, 08 October 16 »
But genuine undocumented behaviour are from Zilog implementation, others are just badly emulated  :D


That's true....

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.332
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2246
  • Likes Given: 3477
Re: Z80 defective tests
« Reply #21 on: 19: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: Please re-download test.zip:

www.cpctech.org.uk/test.zip

I want to make sure you have the latest version.
« Last Edit: 19:20, 09 October 16 by arnoldemu »
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline Kris

  • 6128 Plus
  • ******
  • Posts: 553
  • Country: fr
  • Team Impact
  • Liked: 220
  • Likes Given: 816
Re: Z80 defective tests
« Reply #22 on: 08: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...


Offline gerald

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.403
  • Liked: 992
  • Likes Given: 249
Re: Z80 defective tests
« Reply #23 on: 19:17, 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  ;)

Offline Executioner

  • Supporter
  • 6128 Plus
  • *
  • Posts: 783
  • Country: au
  • WinAPE Developer
    • WinAPE
  • Liked: 391
  • Likes Given: 60
Re: Z80 defective tests
« Reply #24 on: 03: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?