Glk implementation of TADS banner API

I’ve updated Gargoyle’s Glk/ANSI port of TADS to include support for the banner API.

The banner API is almost Glk friendly: window splits and space allocation between parent and child windows work in exactly the same way. The catch is that TADS allows subsequently declared banners to usurp space from siblings (by declaring themselves ‘first’ or ‘before’) which is a very un-Glk way of doing things.

Unfortunately this means that every time a window is added, we have to close all banners, resize and restyle them, and restore the contents. The good news is that the collective banners rarely represent more than a screenful of text, so the inherent inefficiency isn’t as painful as it might otherwise be.

osglkban.c implements the required window and contents management code. There are a couple tweaks unique to Gargoyle but all core functionality is pure Glk and should work with any other library. Size to contents doesn’t work quite right, and besides the basic text styles, only reversed colors and a single custom color are supported. For the most part these are Glk limitations.

Gargoyle’s next release will include this feature, which means (among other things) that the TADS exit lister will actually work now. My hope is that this is the first milestone on the road to full HTML TADS support.

Awesome Ben!

Interesting coincidence that you posted this, I was browsing IF stuff on github yesterday and found this,

2011, the year of TADS 3? :slight_smile:

Cool! A ZMPP implementation of TADS 3 could mean a native Kindle app as well, which is high on next year’s Christmas list.

Yay! Cool.


there I thought no one would notice until I got something showable :wink:
But it’s looking pretty good, I think that I got a pretty solid grasp of how TADS3 works now, it’s just simply the large amount of libraries that need to be implemented in the VM…


Wow, the first independent implementation of the TADS3 VM!

I’d be keen to coordinate a group to write a JS implementation as well. Anyone else interested?

This entire thread is making me very happy. Thanks for your work on this, Ben!

Gargoyle uses the reference implementation. This is about the T3 banner API being implemented in Glk.

Don’t know about the others, but to me this looks like quite a Christmas gift :mrgreen: Thanks for you hard work on this!

I was referring to ZMPP…