Header info from old-style Infocom graphics

The Curses and Dumb interfaces of Unix Frotz have V6 “semi-support”, that is, they draw outlines of graphics on the terminal where they should be along with a resource number, but that’s it. That support was written by Alembic Petrofsky, who seems to have gone missing several years ago.

Somehow I forgot to add Blorb support for this semi-support and I’m wondering what’s going on with the headers of Infocom’s original graphic files. Here are offsets defined in ux_pic.c:

#define PIC_FILE_HEADER_FLAGS 1
#define PIC_FILE_HEADER_NUM_IMAGES 4
#define PIC_FILE_HEADER_ENTRY_SIZE 8
#define PIC_FILE_HEADER_VERSION 14

#define PIC_HEADER_NUMBER 0
#define PIC_HEADER_WIDTH 2
#define PIC_HEADER_HEIGHT 4

Of these, I can determine all but PIC_FILE_HEADER_FLAGS and PIC_FILE_HEADER_VERSION by going through the Blorb library. These two are unsigned short and unsigned char respectively. What are these numbers for? The flags one seems to have something to do with scaling whereas the version is stored in the zeroth entry of an array of structs for storing picture resources (original dimensions, scaled dimensions, and resource number). By asking for the zeroth picture, the game is then given the number of pictures as the height and the version number as the width.

I suppose that I can cause Frotz to return the “correct” version number by using the existing mechanisms for handling special conditions, but I’d really like to know what Infocom did with that version number.

I see version numbers listed at http://ifarchive.org/if-archive/infocom/info/fact-sheet.txt

Partial answer: it’s worth noting that the Fact Sheet isn’t sure if the version numbers are actually useful:

I don’t know whether the “version numbers” shown by the VERSION command (byte 0x1b of the graphics file) are really version numbers or just random bytes.

(Byte 0x1b of course being contained within word 14, the offset you cited.)

The only use I can find is in the VERSION command:

ZORK ZERO: The Revenge of Megaboz
Copyright © 1988 by Infocom, Inc. All rights reserved.
ZORK is a registered trademark of Infocom, Inc.
Debugging Interpreter version 6.67
Release 393 / Pix 0 / Serial number 890714

(Emphasis mine. The zero here is because I didn’t bother to locate the blorb of images, so I’m playing graphics-less.)

Oh duh… Section 11.1 of the Blorb spec discusses the version number. Still trying to understand the flags.

As far as I can tell:
CGA and EGA images are designed for a screen resolution of 640x200. MCGA images are for 320x200. That flag determines which scale is being used.

The “pix version” is stored as the “Release Number Chunk” (‘RelN’) and seems to have meaning only for Infocom’s V6 games. Whatever Alembic was doing with the “flag” seems obviated by the “Resolution Chunk” (‘Reso’).