-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Z80 test suites #98
Comments
Hey @floooh , I have been told that in order to pass Rak's 1.2a it is recommended that Z80 Block Flags Test is a pass beforehand. Additional infos can be found at: |
Hmm, we should confirm those findings against the netlist simulation: https://floooh.github.io/visualz80remix/ I had looked at those instructions here: https://floooh.github.io/2021/12/06/z80-instruction-timing.html, but didn't pay particular attention to the flag bits. ...still strange that those are not caught be ZEXALL though, but I guess if those differing flag states only happen during the LDIR/LDDR loops, but not when the loop is finished it might explain it (e.g. ZEXALL most likely only cares about the end result after the loop has finished). |
Btw, many thanks for listing all this information here, it's a great reference. |
Man, @hoglet67 really is the Z80 master mind, he also figured out what was wrong with the netlist simulation code in https://github.com/floooh/v6502r (https://stardot.org.uk/forums/viewtopic.php?p=349760#p349760). |
Hey @floooh,
Below you can find information about some very complete test suites for the Z80.
The tests have been running in a ZX Spectrum emulator of mine.
Please check the results for each test where possible.
I have used tests, documentation and guidelines found in https://github.com/redcode/Z80 to create this ticket.
Please do not hesitate to ask me to re-run tests under different conditions and/or ask for new tests if needed.
Zilog Z80 CPU Test Suite, by Patrik Rak
Github
This set of programs is intended to help the emulator authors to reach the desired level of the CPU emulation authenticity. Each of the included programs performs an exhaustive computation using each of the tested Z80 instructions, compares the results with values obtained from a real Sinclair ZX Spectrum 48K with Zilog Z80 CPU, and reports any deviations detected.
Download suite v1.0
CCF
after each instruction tested (z80ccf).BIT N,(HL)
after each instruction tested (z80memptr).Download suite v1.2a
CCF
after each instruction tested (z80ccf).CCF
instruction (z80ccfscr).BIT N,(HL)
after each instruction tested (z80memptr).Results v1.0 (69 issues found)
z80memptr.tap.txt
z80ccf.tap.txt
z80doc.tap.txt
z80docflags.tap.txt
z80flags.tap.txt
z80full.tap.txt
Results v1.2a (83 issues found)
z80memptr.tap.txt
z80ccf.tap.txt
z80ccfscr.tap.txt
z80doc.tap.txt
z80docflags.tap.txt
z80flags.tap.txt
z80full.tap.txt
Z80 Test Suite, by Mark Woodmass
This suite performs a series of tests to verify the MEMPTR documents - (English, Russian), which are spot on, as well as a brief run through several of the
CBh/DDh/FDh
opcode ranges. The test results in the program are compared against those from a NEC D780C-1 CPU, but Simon Conway kindly tested several other Z80 clones, confirming the same results.Results (3 issues found)
z80tests.tap.1.txt
z80tests.tap.2.txt
Z80 Instruction Set Exerciser, by Frank D. Cringle
Frank Cringle's Z80 Instruction Set Exerciser attempts to execute every Z80 opcode, putting them through a cycle of tests and comparing the results to actual results from running the code on a real Z80. The exerciser is supplied with Frank's Yaze (Yet Another Z80 Emulator). It is often difficult to track down, so Jonathan Graham Harston put it together here, as well as some conversions. The latest release of Yaze is available at Andreas Gerlich's website.
bit
instructions.Results (2 issues found)
zexbit.tap.txt
zexall.tap.txt
zexall2.tap.txt
zexfix.tap.txt
zexdoc.tap.txt
Z80 XCF Flavor, by Manuel Sainz de Baranda y Goñi
Github project
Finally, this is a test for the ZX Spectrum that detects the Z80 CPU type. It is based on the behavior of the undocumented flags in the ccf and scf instructions.
The test is reporting a NEC NMOS type whereas I think we want it to be a pure Zilog one.
Please double check the resulting image for a detailed matrix of all the flag combinations involved.
Results
Z80 XCF Flavor.tap.txt
The text was updated successfully, but these errors were encountered: