The official CP/M edition of the Z-Machine interpreter supports games compatible with ZM v3. The interpreter was released in 3 different versions, and all of the uses the same format for the patching-field. This patch-field for the CP/M-80 interpreter is the very first 256 bytes of the program file. The interpreter executable can be patched to run any v3 compatible Z-Machine game. To change the game, just point it to a different datafile. Be aware that the datafile may have to be padded with zeroes, as its size must be a multiple of 1024 bytes (the game loads its data in 1k chunks). Offset Bytes Content ----------------------------------------------------------------------------------- 00h 3 C3 00 02 ("JP 200h") 03h 1 Characters/line (132 maximum) 04h 1 Lines/screen (NOT including status line) 05h 8 Filename to data/save-file ("ZORK1 " = ZORK1.DAT/ZORK1.SAV). Use spaces as padding. 0Dh 1 1 if LF should print after CR on screen 0Eh 1 1 if LF should print after CR on printer 0Fh 1 Number to add to ASCII value for inverted/highlighted characters Initialization 10h 1 Length of String 11h 32 String: * Move cursor to the lower left corner * If supported: setup scrolling-region to not scroll the status-line. * Clear the screen Reset (at end of game) 31h 1 Length of String 32h 32 String: * If used: Reset scrolling-region to include entire screen * DON'T clear the screen Begin status-line 52h 1 Length of String 53h 32 String: * Move cursor to the upper left corner (status-line area) * If supprted: activate inverted video End status-line 73h 1 Length of String 74h 32 String: * Move cursor to the lower left corner (game-text area) * If used: Clear inverted video Printer Initialization 94h 1 Length of String 95h 32 String: * Prepare printer to print raw ASCII B5h 75 Filler bytes, ignored