Skip to content

Add support for version 1.1 of Z-Machine specifications

There are some new opcodes that need to be understood (and some errors in opcode scopes) see this link in IntFiction):

  • The EXT opcodes print_unicode and check_unicode are defined for version 5-8
  • The EXT opcode set_true_colour are defined for version 6 and version 5, 7-8 (different definitions).
  • The EXT opcode buffer_screen is defined for version 6.
  • The 2OP opcode throw is also definied for version 5, 7-8 (only defined for version 6 earlier).
txd.c
=====
line 711-
	switch ((unsigned int)header.version) {
	case V5:
	case V7:
	case V8:
	switch (code) {
		caseline (0x0B, "PRINT_UNICODE",   NUMBER,   NIL,      NIL,      NIL,      NONE,   PLAIN);   //new in z-spec 1.1
		caseline (0x0C, "CHECK_UNICODE",   NUMBER,   NIL,      NIL,      NIL,      STORE,  PLAIN);   //new in z-spec 1.1
		caseline (0x0D, "SET_TRUE_COLOUR", NUMBER,   NUMBER,   NIL,      NIL,      NONE,   PLAIN);   //new in z-spec 1.1
	}
	case V6:
	switch (code) {
		caseline (0x0B, "PRINT_UNICODE",   NUMBER,   NIL,      NIL,      NIL,      NONE,   PLAIN);   //new in z-spec 1.1
		caseline (0x0C, "CHECK_UNICODE",   NUMBER,   NIL,      NIL,      NIL,      STORE,  PLAIN);   //new in z-spec 1.1
		caseline (0x0D, "SET_TRUE_COLOUR", NUMBER,   NUMBER,   NUMBER,   NIL,      NONE,   PLAIN);   //new in z-spec 1.1
		caseline (0x1D, "BUFFER_SCREEN",   LOW_ADDR, NIL,      NIL,      NIL,      NONE,   PLAIN);   //new in z-spec 1.1
	}
	}
		
line 802
	caseline (0x1C, "THROW",           ANYTHING, NUMBER,   NIL,      NIL,      NONE,   PLAIN);