Z-machine standard: unclear aspects/ambiguities

Thanks, I will keep those in mind.

Yeah, it is pretty much obvious why saving in this case is explicitly forbidden, but other actions such as restore might also need special handling if invoked while reading user input, depending on the implementation. That’s why I had to clarify this. Technically, it wouldn’t be very difficult to support them, but it would complicate the architecture a bit in my case. I would like to ensure that everything that is theoretically legal is properly implemented, although it might be hard to test corner cases in practice.

Here are a couple examples. All dictionary words are numbered from 0 upwards.

  1. sampler1_R55.z3 (from Appendix C) - word #433 (“multi”), unique;
  2. zork1-r15-sUG3AU5.z2 (from eblong dot com) - word #347 (“nasty”), a duplicate of word #348; word #514 (“storm”), unique;

There is also a zork1.dat I got from somewhere I can’t actually remember (basically, by random googling) when setting up the project so that I could have something to run initial tests on (I missed the links in Appendix C at first for some unknown reason, and the site I got the 2nd file from I did not discover until much later). The file length in the header (multiplied by 2, for it is a V3 file) is 84876 bytes, and the checksum is 41257 (hex $A129). Actual file length is 92160 bytes. There are unique words #200 “fcd#” and #437 “pdp1” in the dictionary that both do not have the highest bit set in the last 2-byte word.

I first thought it was a bug somewhere in my code, and I cannot rule it out with absolute certainty even now, but it seems strange that the dictionary reader reacts to these particular words specifically, so I have to assume something is indeed wrong with the data. My suspicions are additionally corroborated by the fact that in the last case the problematic words in question are rather unusual: perhaps some kind of debugging commands or similar.

1 Like