-
Notifications
You must be signed in to change notification settings - Fork 83
Description
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
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.
-
- Tests all flags and registers (z80full).
- Tests all registers, but only officially documented flags (z80doc).
- Tests all flags, ignores registers (z80flags).
- Tests documented flags only, ignores registers (z80docflags).
- Tests all flags after executing
CCFafter each instruction tested (z80ccf). - Tests all flags after executing
BIT N,(HL)after each instruction tested (z80memptr).
-
- Tests all flags and registers (z80full).
- Tests all registers, but only officially documented flags (z80doc).
- Tests all flags, ignores registers (z80flags).
- Tests documented flags only, ignores registers (z80docflags).
- Tests all flags after executing
CCFafter each instruction tested (z80ccf). - Visualise (random) behavior of flags after
CCFinstruction (z80ccfscr). - Tests all flags after executing
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)
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.
- Jonathan Graham Harston's versions:
- Download suite. Tests all flag changes.
- Download suite. Tests documented flag effects.
- Jan Bobrowski's versions:
- Download suite. Tests all flag changes.
- Download suite. Tests all flag changes of the
bitinstructions.
- Patrik Rak's version:
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
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.