Re: Need help analyzing infocom v6 file


2 Feb 1995 11:39:49 -0500

In article <GHAZELWO.95Feb1193339@occs.cs.oberlin.edu>,
Galen Hazelwood <ghazelwo@cs.oberlin.edu> wrote:
>
> I was wondering if some of the old hands at the Z-code game
>could help me. I am attempting to disassemble a version 6 game file
>(Zork zero) and seem to have found a discrepancy with the
>specifications as set forth by Graham Nelson in the Inform
>documentation.
>
> The initial value of the program counter is still in the same
>place in the header, and is still supposedly in bytes. Yet the
>location it points to dosen't disassemble into anything coherent.
>Have I missed something obvious? The specifications don't seem to say
>anything about changes made to this between versions 5 and 6.

I'm not an old hand, but I do know the answer to this one. Version 6
has two game scalers. One of them is 8 (quadwords): This is used for
the file size, global function offset, and global string offset. The
other is 4 (just like version 5) and is used for everything else.

Function addresses are
Packed_Address * 4 + global_function_offset * 8

Also, the initial PC in Version 6 is now a function address-- it
follows the formula above, and no longer has the 'off-by-one' anomaly.

The mac version of Infocom's interpreters calculate address by doing
something similar to

(global_function_offset*2 + packed_address) * 4, but I don't know if
this means anything-- it may be just something their compiler did.