Z-machine versus Glulx appearances

I have a game that uses nothing special in terms of color, sound, or screen handling. I would like the game to look the same no matter if it is compiled for Z-machine or Glulx. As-is now, this is not true. I’m not sure if the difference happens in the compiler or interpreter Attached are screenshots of Frotz and Glulxe running the same test game compiled for their respective VMs. The status line for the Z-machine one matches the standard Infocom model of inverse text taking up the first line with game text beginning on the next line… For the Glulx game, the status line is in normal text and set off from the game text by a line of dashes and a line is then skipped before beginning the game text. Is there some way I can force the Glulx results to look just like the Z-machine results?

It looks like you’re using glkterm as the Glk implementation, which is responsible for the appearance. glkterm supports the options “-revgrid yes” and “-border no”; the fomer makes textgrid windows reverse video, and the latter removes borders between windows. These are specific to glkterm (and glktermw).

There is a flag (winmethod_NoBorder) which the game can use to ask for no border between the windows. (Pass as part of the method argument of glk_window_open().)

However, GlkTerm’s -border flag overrides this flag. That is, if you run GlkTerm with “-border yes”, it will always use the border, and “-border no” will always remove it.

I’ve identified the parts of parserm.h that call glk_window_open() by calling glk($0023, …)[1] and identified the one that generates the status line (at line 6430 in the latest repo) . It looks like I OR the proper winmethods to get the effect I want. That works to get rid of the borders. The next step is to make the status line display in reverse video. The best I came up with is this line placed above or below the former glk() call:

glk($00B0, 4, 0, 9, 0);

$00B0 codes for glk_stylehint_set. 4 is for the wintype taken from the glk_window_open() call I modified. 0 is for style_Normal. 9 is for stylehint_ReverseColor. 0 is for val (I don’t know what this one is for). What am I doing wrong?

[1] Would it be a good idea to put infglk.h into the library to add some sort of syntactic sugar to the way this is done? It might ease getting color and sound working with Inform6 and Glulx.

As a note to anyone else, I found this: adamcadre.ac/gull/ which seems to neatly explain things.