Warning!! The following is a bit technical and probably only of
interest to people familiar with the Specification of the Z-Machine.
Gareth Rees (gdr11@cl.cam.ac.uk) wrote:
: Infocom released some version 3 games for the Commodore 64 (at least
: Zork I, Zork II, Zork III, Deadline, Starcross and Suspended), so if you
: can get hold of one of them, you can probably patch the interpreter so
: that it will play Inform's .z3 story-files (for example, Release 10 of
: "Curses").
I did this about a year ago for a friend whose only computer was
a Commodore 128. I ran into a snag, however. The MoveFloatingObjects
routine in the VerbLib.h file caused the Commodore 64's .z3 interpreter
to crash. (Again, this was about a year ago, and the routine I'm
refering to has been greatly modified since then.) I traced the
problem down to the specific instruction i.found_in~=0. It turned out
that the Z-code assembly instruction get_prop would crash if the
object in question had more than one property value. I also had this
same problem with the Toyshop demo in the Cube_Class routine where
it used the instruction "print_addr e.name" This would assemble using
the get_prop instruction, and the cube object having more than one property
value for its name, would cause the interpreter to crash. After making
minor changes in the code to avoid get_prop, the Toyshop demo ran fine.
: I don't know if Infocom ever wrote a version 5 interpreter for the
: Commodore 128. If they did, then you will be able to patch it so that
: you can play Inform's .z5 story files.
Yes, they did make a .z5 version of Zork I that would run both on the
Commodore 64 and the Commodore 128. It used two single sided 5.25 inch
disks (or one double sided, both sides). I patched it so that you
could play Advent. The get_prop assembly instruction was no longer a
problem. It could now get the first property value of an object with
more than one property value.
However I did run into a differnt problem. Apparently the interpreter
would use the "Start of Code Area (Resident Size)" value from the header
to determine how much to load off of the first disk, before asking you to
insert the second disk. After experimentation, I determined that it
was using a "packed address" and not a byte address as advertised in
the Specification of the Z-Machine. After taking this into account, I
was able to get Advent to work okay. Well, it seemed to work okay,
I must admit I didn't do very much play testing.
I was considering trying to port Curses, however, it would have taken
a considerable amout of effort to try and figure out how the interpreter
maps the z-file onto the track & sectors of the floppy disk. Since
Advent was about the same size as Zork, I could determine this by
seeing how Zork I was laid out on the floppy. But since Curses is much
larger than Zork I, this 'trick' won't work.
Oh, I did patch the .z3 version of Curses, but I did not play test it.
I'm sure there is probably a get_prop lurking in there somewhere that
would crash it.
Since then, my friend got an Amiga, so I have lost interest in
patching Commodore 64/128 Infocom Interpreters. I have also given
away my own Commodore 128.
- Gregory Riggs
greg@nmia.com