Files | |
---|---|
.. | |
README.md | |
storyfile_conv.py | |
zmach5 |
This is an implementation of the Z-Machine, a virtual machine for interactive fiction games originally used by Infocom in the 1980s. It is written per the Z-Machine Standards Document v1.1 and supports story file versions 3, 4, 5, and 8. These are by far the most common versions, encompassing everything from Infocom's original Zork I to much more recent adventures.
Take a .z3
, .z4
, .z5
, or .z8
story file (or .dat
for old Infocom games) and pass it to the
storyfile_conv.py
script, which will convert the binary representation to assembly code.
(Note that .zblorb
format is not supported,
although the story file it contains could be extracted.)
Save the output of this script to a file, and change the @include
directive in zmach5/zmach5.asm
to point to it.
Assemble the interpreter, and puzzle away!
(The interpreter must be assembled for ram-only mode, not combined flash/ram, because the story file constitutes the
read-write memory image of the interpreter in addition to static data.
Use the prototype kernel to load the assembler output into ram.)
save
opcode puts the interpreter into a state
where its memory image can be stored and later restarted from address 0, where the game will resume.Thanks to Czech and other test story files for helping me write and debug this interpreter.