PSZM

From IFWiki

Revision as of 23:01, 13 August 2020 by Zzo38 (talk | contribs) (How to adjust parameters for printing)

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 was not implemented at first, but now it is implemented.

There is a section near the top of the file labeled "Parameters for printing", which specifies the fonts and margins to use; you can change this if you want to use different fonts and margin settings.

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.

External

This article is a stub. You can help IFWiki by expanding it.