(Edit: I realized I had made a slight mistake in my code. Characters are supposed to be 10 pixels tall (6+4), not 12 (6+6). I’ve updated the code and sample output accordingly.)
While browsing through the Infocom source code, I came across the file vt220.mud in the Beyond Zork directory. It’s filled with what at first looks like gibberish like
<PRINC "~QcGCA@?/F??@????;"> ; a
<PRINC "~PPiiCC?/FCCAA@@?;"> ; b
<PRINC "_??~ACG?/?@AF????;"> ; c
After skimming through the relevant part of the VT220 manual, I came up with this little piece of C code which I think decodes it correctly:
void print_sixels(char *row, int height) {
int i, j;
for (i = 0; i < height; i++) {
for (j = 0; j < 8; j++) {
if ((row[j] - 0x3F) & (1 << i)) {
printf("*");
} else {
printf(".");
}
}
printf("\n");
}
}
void print_glyph(char *glyph) {
print_sixels(glyph, 6);
print_sixels(glyph + 9, 4);
}
Feeding the first of the “RUNICS” strings ("~QcGCA@?/F??@???;"), what came out was this:
(Note that your C compiler may try to interpret parts of the strings as trigraphs, which is just evil.)
They’re a bit differently drawn than the ones presented in the Z-Machine specification (though this particular one is pretty close), which I think makes them at least somewhat interesting. Also, I have no idea what the “CARLSET” characters are supposed to be. But is it useful? I don’t know. Maybe to the PDP-10 / PDP-11 port of Frotz that was released recently? Otherwise, I guess it might make more sense to map the Beyond Zork runes to the appropriate Unicode runes and include some free font file that has them. (Unfortunately, I don’t think there is a match for the box-drawing characters among the Unicode ones.)
Ah, I didn’t realize that. According to the Z-Machine specification, there were two sets of fonts which it refers to as the “Amiga and PC forms”, and includes the shapes for the Amiga form. Redrawing it to match the output from my code, this is how one of the runes compare between the three:
This is the C code I used to decode the chars.dat file, if anyone else wants to play around with it:
#include <stdio.h>
int main() {
FILE *f;
int c, i, n;
n = 0;
f = fopen("char.dat", "rb");
while ((c = fgetc(f)) != EOF) {
for (i = 0x80; i >= 0x01; i >>= 1) {
if (c & i) {
printf("*");
} else {
printf(".");
}
}
printf("\n");
if (++n == 8) {
printf("\n");
n = 0;
}
}
return 0;
}
Frotz has issue #193 that is to add sixel graphics to the curses interface (although I think that it was later discussed that it might be easier to create a new frontend that does its own screen handling rather than mixing sixels with curses). That might be a good place to use these characters.
As I said, I have no idea what CARLSET is supposed to be. The glyphs don’t look like anything I’ve seen in Beyond Zork; in fact, I don’t recognize them at all. There is a Carl Genatossio in the game’s credits, but that may be just a coincidence.