MODE 7 dual-language support

Discussions related to mouse, keyboard, fonts and Graphical User Interface

MODE 7 dual-language support

Post by RichardRussell »

Level 1 teletext (as defined by the ETS specification here) provides support for dual-language operation whereby the character set can be toggled between a 'primary' language (e.g. English) and a 'secondary' language (e.g. Russian) by means of the ESC (&1B) control character. This, like all control characters in Level 1 teletext, is a 'spacing' attribute so you cannot switch language 'mid word' but only between words.

I have been working on supporting this feature in BBC BASIC for SDL 2.0 (the ESC control character can be inserted in MODE 7 using VDU &9B) and hope to do so in the next release (v1.13a); it's quite a difficult modification, not least because it has to be made to both the assembler implementation (used by 32-bit x86 editions such as Windows) and the C implementation (used by 64-bit and ARM editions). In the assembler implementation it has involved freeing up a bit in a set of CPU registers which were already fully utilised!

I happened to mention this in the Matrix Brandy thread at the StarDot forum, since its MODE 7 emulation has been undergoing some changes recently. What I hadn't anticipated is that, as a result, Matrix Brandy now (after only a couple of days) has fully functioning dual-language support. Not so much 'pipping me to the post' but 'beating me by a mile'! :o

So if you're in a hurry for dual-language support, consider switching to Matrix Brandy. It is more actively developed than my BASICs, runs far faster and has a more enthusiastic user base. Although its compatibility with BBC BASIC for Windows and BBC BASIC for SDL 2.0 is improving all the time (for example it already has fairly complete support for 64-bit integers and a large memory model) there are a few features not yet supported. However my experience is that its author can often implement a new feature in only a few hours, if requested.