I ported Patrik Rak's Spectrum Z80 tests to CP/M 2.2
I hadn't seen this done before (though I'm sure someone has done it) and I was curious what bugs in might find in my emulator. The tests have some Spectrum dependencies and use an older assembler, so it took a little work. I ran some popular emulators with the tests. It can be found here: ntvcm/z80test-cpm at main · davidly/ntvcm
The net: there's not a lot of interesting new test coverage in these tests beyond what's available in other well-known Z80 test suites.
The only real bugs I found were in my emulator, NTVCM. Using Z80 loop instructions to create self-modifying code wasn't supported (though every other emulator I ran pass that test without a problem).
NTVCM also doesn't update the R register by default because it's unused and slows execution substantially. Once enabled with a #define those tests pass too.
Details about the results are in the link above. Some emulators don't support IN/OUT instructions (why would they?) and that causes some tests to fail.
Almost all Z80 emulators pass the well-known test ZEXDOC.COM, which covers documented instructions. Some also pass ZEXALL.COM, which covers undocumented instructions. Many emulators fail ZEXALL.COM in the name of code clarity, performance, and need -- apps don't use those instructions so why implement them?
I created ZEXSUP.MAC (supplemental) to cover documented instructions not tested in ZEXDOC.COM. I found that all emulators that pass ZEXDOC.COM also pass ZEXSUP.COM. It can be found here: cpm_compilers/m80/ZEXSUP.MAC at main · davidly/cpm_compilers