In the Dialog compiler’s Z-machine veneer, there’s a specific bit of code that checks if the interpreter’s reported screen width is less than 40; if it is, the veneer returns 40 instead.
A comment in the code marks this as “workaround for winfrotz bug”. Unfortunately, it’s now causing problems when I try to support screens less than 40 characters wide.
Does anyone know what bug in particular is being worked around here? Ideally I’d like to find a workaround that doesn’t interfere with supporting smaller screens. (For example, I’m typing this message on a phone screen 32 characters wide, thanks to my poor eyesight.)
Given that even Trinity can’t run on earlier versions of Frotz, I’m inclined to break compatibility with earlier versions in order to ensure compatibility with modern interpreters on small screens. There probably aren’t too many people running pre-2021 versions of Frotz on monitors more than 255 columns wide, right? I expect most people using old versions are doing so on old hardware too.
Right after the screen size in units is the font in units, which you should be able to use to calculate the size in characters. Though most non-Z6 terps should just say 1 for the units. (Of course you’ll have to check that they’re not 0.)