I have written a new Z-machine interpreter, with many debugging features, and is also hopefully much cleaner than the other ones I (and others) have previously done. In addition, in checks various errors.
Please make any bug reports, features suggestions, questions, complaints, etc on here and/or on ifMUD.
Download (source (public domain), and man page): http://zzo38computer.org/zmachine/interp/zorkmid.zip
Note that it only implements ZIP (Z-code version 3); I may later write EZORKMID and XZORKMID for implementing other Z-code versions.
This interpreter does a lot of error checking in order that you can check if the program is correct; in most such cases the debugger is then activated so that you can examine the program to see what went wrong. The debugger also allows editing data in memory (including locations above ENDLOD), single-stepping through the program, disassembling codes, decoding packed text strings, checking the highest stack usage of the program, setting breakpoints (both at specific addresses as well as for specific instruction opcodes), and a few other things.
This is also believed to be the only existing Z-machine interpreter that supports small-endian story files (although I do not recommend using this feature except for testing and for extremely specialized implementations; it is included only for completeness).
This interpreter passes ziptest.