Historical source code for Infocom's Z-machine interpreters
Assembly
366
2 commits
updated Nov 23, 2023
This is a collection of Infocom's original Z-code interpreters for various home computers of the 1980s.
Most of the interpreters are provided as assembly source code (for the 6502, Z-80, and so on). Some have compiled binaries as well. As with the Infocom game source code, what's available is what's available.
This repo contains a small amount of internal documentation, mostly about how to create working floppy disks for each platform. It contains no personal or private communication, unless you count one footnote about a "straightforward" porting job.
Below I have documented all the directories and files, as best I understand them. Corrections and further details welcomed.
Interesting tidbits:
Many directories include a large "assembled printout" file (usually .prn or .lst). This is a text file containing the assembler output for a complete program, both hex bytes and opcodes. ("prn" because it is notionally formatted for a line printer.)
The unix directory contains a C implementation of DIP, the virtual machine used to implement Fooblitzky. The atari and ibm directories contain assembly implementations of same. unix/foo.dat is the game file in question; unix/ediptst.sum would be a test suite game.
(Wikipedia refers to this as "GZIP - Graphical Zork Interpreter Program". I'm not sure what the origin of that name is. It doesn't appear in the Infocom source as far as I can tell. A couple of files refer to it as "GRIP" or the "G-machine". I'll stick with "DIP".)
The architecture of DIP is unexplored territory (for my generation at least!) At a glance, it has version byte 1 and a serial number starting at byte 12 (rather than 18, as in the Z-machine). The game file appears to include graphical sprite data in high VM memory, rather than as external resources. The opcodes in the DIP interpreter are different. And so on.
This is the same game file archived here as ziptest-r40-s840613.z3.
The .pre and .pur files concatenate to the original, except that in ziptest.pre, header byte 1 gets the "story file split" bit set and bytes 4-5 (himem) are $05FF. This is the usual way Z-code files are split for platforms that can't fit the whole game in memory at once.
Presumably the C128 image is just the last file that was transferred to a micro before the directory was dumped.
Not sure why there are several versions of the BASIC script. They all start by printing "IBM TFTP RECEIVER", but they diverge from there.
This is the same source archived at the CoCo Archive.
lip.com@piracy ZIP opcode might be kept meaningfulBoth DIP game files appear to include graphical data. Or so I infer from the .pichex files, which are hex dumps of the high end of the game file.
I tried to decode the pichex files. dip.c implies that images are made of 8-byte (8x8 pixel) blocks, and if you split the pichex files that way you get reasonable blocks. One would have to do additional work to figure out which blocks to tile together to make complete "icons" or sprites.
Assembly
80.1%
C
15.3%
OpenEdge ABL
1.7%
Historical source code for Infocom's Z-machine interpreters
Assembly
366
2 commits
updated Nov 23, 2023
This is a collection of Infocom's original Z-code interpreters for various home computers of the 1980s.
Most of the interpreters are provided as assembly source code (for the 6502, Z-80, and so on). Some have compiled binaries as well. As with the Infocom game source code, what's available is what's available.
This repo contains a small amount of internal documentation, mostly about how to create working floppy disks for each platform. It contains no personal or private communication, unless you count one footnote about a "straightforward" porting job.
Below I have documented all the directories and files, as best I understand them. Corrections and further details welcomed.
Interesting tidbits:
Many directories include a large "assembled printout" file (usually .prn or .lst). This is a text file containing the assembler output for a complete program, both hex bytes and opcodes. ("prn" because it is notionally formatted for a line printer.)
The unix directory contains a C implementation of DIP, the virtual machine used to implement Fooblitzky. The atari and ibm directories contain assembly implementations of same. unix/foo.dat is the game file in question; unix/ediptst.sum would be a test suite game.
(Wikipedia refers to this as "GZIP - Graphical Zork Interpreter Program". I'm not sure what the origin of that name is. It doesn't appear in the Infocom source as far as I can tell. A couple of files refer to it as "GRIP" or the "G-machine". I'll stick with "DIP".)
The architecture of DIP is unexplored territory (for my generation at least!) At a glance, it has version byte 1 and a serial number starting at byte 12 (rather than 18, as in the Z-machine). The game file appears to include graphical sprite data in high VM memory, rather than as external resources. The opcodes in the DIP interpreter are different. And so on.
This is the same game file archived here as ziptest-r40-s840613.z3.
The .pre and .pur files concatenate to the original, except that in ziptest.pre, header byte 1 gets the "story file split" bit set and bytes 4-5 (himem) are $05FF. This is the usual way Z-code files are split for platforms that can't fit the whole game in memory at once.
Presumably the C128 image is just the last file that was transferred to a micro before the directory was dumped.
Not sure why there are several versions of the BASIC script. They all start by printing "IBM TFTP RECEIVER", but they diverge from there.
This is the same source archived at the CoCo Archive.
lip.com@piracy ZIP opcode might be kept meaningfulBoth DIP game files appear to include graphical data. Or so I infer from the .pichex files, which are hex dumps of the high end of the game file.
I tried to decode the pichex files. dip.c implies that images are made of 8-byte (8x8 pixel) blocks, and if you split the pichex files that way you get reasonable blocks. One would have to do additional work to figure out which blocks to tile together to make complete "icons" or sprites.
Assembly
80.1%
C
15.3%
OpenEdge ABL
1.7%