New ScummGlk engine added to ScummVM

A tester for my new ScummGlk engine reported a somewhat interesting problem playing Beyond Zork. In the attached save there’s an endurance indicator visible, and if you W, SW, SW, then the text description fills up the remaining area of the info box, and it displays a ‘[MORE]’ and Use ‘down arrow’ to scroll. However, it doesn’t seem possible to do so, since the up/down arrows are used to scroll through the history of entered lines in Frotz. I’ve tried as well using Windows Frotz, and it also doesn’t work, indicating it’s an issue with Frotz itself.

I’m wondering if anyone has any idea how the original Beyond Zork interpreter handled this? Is a down arrow key meant to interrupt and abort the read line with a special return value to indicate it? Or is the arrow key down meant to some kind of special processing without interrupting the line entry that Frotz currently doesn’t implement?

Didn’t help. I’ll try a different daily build sometime in the future.

Nowadays of course the convention is to scroll through command history with the up and down arrows, but Infocom interpreters never did such a thing. The up and down arrows in Infocom’s Beyond Zork interpreters did just what the prompt indicates, paged the description window. But Frotz lets you do that with the Page Down and Page Up keys.

So how do you do that on a keyboard without Page Up and Page Down keys? My Macbook keyboard doesn’t have those. In some apps you can use Alt + arrow or Ctrl + arrow instead, but not in Gargoyle.

All Macbook keyboards support fn-up/down for Page Up/Down. Gargoyle is good with it.

By default, Gargoyle uses Bocfel for Z5 games rather than Frotz. In Bocfel, Page Up appears to do a full page of scrollback, but Frotz doesn’t have that function.
So I assume those keystrokes would work to scroll the description window when running Beyond Zork in Frotz on a Macbook, but not in Gargoyle.

I know Zoom is popular on macOS, so I gave it a try too (I only use Linux).
The arrow keys do the Infocom thing rather than the Frotz thing, but at least on my system the Beyond Zork map is hopelessly garbled.

Ah, it seems that this is a different problem being experienced in the last week. See this forum thread. No resolution seems to have been found yet, though.

Thanks. I now see where I had trouble recognizing it. At first i tried your suggestion with the Windows Frotz pre-built executable, and it didn’t work, nor did the source code for it have any reference to special handling for the key. The Gargoyle source code also didn’t, though it in any case co-opts the PageUp/PageDn keys for scrolling through the text buffer history. It was only when I went to the latest source at DavidGriffith/frotz.git that I now see that os_read_line has special handling for the key.

So it should hopefully be straightforward to retrofit the changes back, and suppress the buffer scrolling logic to allow the description scrolling to occur when appropriate. Maybe even intercept the specific text for the paging description and replace the arrow key with ‘PgDn’ for clarity.

“Reputable source” and “free” can mean a number of things 8) “R (Pron: Arrr…)” at least was circulated freely as an IFcomp entry, and you can find its data file at samiam.org/moof/cloak-scott-0.1.zip

The Other-Ventures were sold through Adventure International (apparently Jyym also sold a few that were too outre through Med Systems / Screenplay), Asgard Software sold a pile of them for the TI-99/4A Adventure Module, Adventuresoft in the UK sold a few…

If you like I can probably find you links for the other Scott Adams-format games – while they were commercially sold and have not been relinquished into the public domain, you say “the autodetection only currently recognizes the freely available games” and they are about as freely available as the ones you currently support. 8)

We’re pedantic about not supporting any abandonware or similar websites that provide downloads without authorization. Which is why the current set of detected games comprises everything only from the if-archive and Scott Adams own website. But for other free ones that are available, they’ll be easy to add in. Commercial ones, I can’t accept links to them unless the company themselves says they’re free. But in any case, as I said previously, if anyone actually has them and is willing to devote a few minutes of work, they can generate the md5s of the first 5000 bytes and provide them and the filesizes. I don’t physically need the games themselves to add them in as detection entries.

I hear you, I know many times in the past I have seen SCUMMVM devs announce that they were waiting for game media to arrive in order to implement support.

I wasn’t surprised to see that Scott Adams was giving his old games away, but I didn’t necessarily expect that Brian Howarth would have followed suit with his Digital Fantasia games. (And huh, I suspect he does have other Scott Adams format games, such as Gremlins, that aren’t included there.) Do we have it on good understanding that PDD got his authorization before posting the conversions to the IF Archive or is it just considered to have lapsed into public domain status after having sat there unchallenged for so long? (Same deal with the otheradv titles – I wonder how an unknown author could have given authorization for “James Bond Adventure”, using intellectual property they surely weren’t allowed to use, without revealing their identity 8)

But I digress. I will put a bug in the ear of a few collectors I know to generate some md5s for you.

Just in case anyone still cares about the issue of scrolling the description window in Beyond Zork, it turns out that if the storyfile thinks it’s running on a Macintosh, it gives you the option of scrolling using the slash and backslash keys as well as the arrows.

Thanks :slight_smile:. And in any case, as I think I mentioned earlier, as long as a Scott Adams gamefile has a .saga extension, it’ll be detected as a generic Scott Adams game, even if t’s not in the list (I didn’t do likewise for .dat files, since they’re simply too generic). So it’s not that big a problem.

Okay, scrolling is now sorted out. Luckily, the Glk base code had a concept of an optional array of “line terminators” that I was able to utilize, though I did have to make some minor changes to detect the line terminators before the commands area scrolling code consumed the keys. And with a bit of code transplanted from the latest Frotz to translate PgUp/Dn back to the arrow keys, and voila. Though there’s no easy/clean way to replace the arrow keys in the scroll message with a ‘PgUp’/‘PgDn’ on the fly… my first attempt ended up overflowing the bounds of the textbox. I suspect there’s a hardcoded text cursor positioning based on the known length of the message… I may have to eventually look into implementing a patch system that can change the zcode itself on the fly to set a different cursor position and then print a different message.

Apparently the Adventure Module for the TI/99 (I may have mentioned this in a previous post here) structures games in the Scott Adams format; a significant chunk of the post-AI Scott Adams-format games were made by users of that platform through that avenue. And apparently authors are still at it, as per atariage.com/forums/topic/286530 … try4186457

The TI format is different from the ScottFree (TRS-80) one.
Bunyon, available in the IF Archive, is an interpreter for the TI format.
The scott2zip tool can convert both formats to Z-code.
I’ve been looking for a tool to convert from the ScottFree format to the TI, but I don’t think it exists yet.

I went back and tried the most recent daily build, and it’s functional on MacOS now. Nifty.

Today ScummVM announced that Glk support is going into “official testing mode.” https://www.scummvm.org/news/20200622

But I, too, don’t see how to test it. I downloaded today’s Jun 22 build from https://buildbot.scummvm.org/builds.html and tried to “add game,” but it didn’t allow me to add any files with extension .z3, .z5, .zblorb or .gblorb, even if I put them in a folder by themselves.

@dreammaster is there a trick to getting this to work? I’m on macOS 10.15.5, if that matters.

EDIT: I also filed this on the ScummVM bug tracker. https://bugs.scummvm.org/ticket/11514

EDIT 2: Turns out it just doesn’t work on x64 macOS builds at all today!

EDIT 3: It’s fixed now.

1 Like

I don’t love the look of ScummGlk on a high-resolution retina display like my MacBook Pro.

In particular, it looks to me like the text is being rendered at low resolution. Here’s a zoomed in view. Notice how the window title, “Spider And Web” is nicely smoothed, but the game text is pixelated.

Screen Shot 2020-06-23 at 4.47.22 PM

Also, there appears to be no margin on the toolbar at the top of the screen; the E is End of Alley is flush with the edge of the window, whereas the rest of the text has a 1em left margin.

There also appears to be no text configuration options at all (font, colors, zoom).