PSZM is a public-domain Z-machine implementation written in PostScript. Both small-endian and big-endian are implemented, but only ZIP (not EZIP/XZIP/YZIP), and the status line and split screen are not implemented. Printer output (for transcript) is (as of this writing) not yet implemented, but I intend to add it in future.
Save game format
A save game file in PSZM is a PostScript file which does the following:
- Push the Z-machine program counter to the stack.
- Push a string to the stack, containing the contents of the Z-machine memory from 64 to PURBOT.
- Execute the PostScript name "?".
- Push a procedure onto the stack, which pushes the contents of the operand stack (for all Z-machine functions), with marks delimiting the stack frame per function.
- Push an array onto the stack, which contains one array per entry in the Z-machine call stack; each array contains the program counter to return to (points to the variable number to store the result) as its first element, and values of local variables as the rest of the elements.