Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Z80 test suites #98

@r-lyeh

Description

@r-lyeh

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

    • 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 CCF after each instruction tested (z80ccf).
    • Tests all flags after executing BIT N,(HL) after each instruction tested (z80memptr).
  • Download suite v1.2a

    • 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 CCF after each instruction tested (z80ccf).
    • Visualise (random) behavior of flags after CCF instruction (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)

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.

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
Z80 XCF Flavor.tap.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions