Hold mode minutiae
The other day, this nice Teletext birthday card by Will/mode7.club scrolled by, and I thought: Wow, that’s some nice mastery of the hold mode!
“Hold mode, what?” you ask. “And what’s special about this page?”
The magic is in the “Weather News” logo. Let’s do some reverse engineering and dissect what’s going on!
Edit: Added a note on the “WITH MICHAEL FISH” text.
Canvas
Prepare a fresh Teletext canvas: a fixed-size grid of characters, or cells.
Pixels
First, we layout the pixels. Pretty straigtforward.
In Teletext, pixels are really “sixels”, i. e. special block-drawing characters with a mosaic of 6 sub-pixels per character/cell. Think: etc.
To activate graphics mode, we need a special control character. Normally, those are invisible. We’ll use a debug view of the cell grid and the control codes next to the rendered output:
⠝W
= switch to graphics mode, foreground color white
Nice enough, albeit a little weird, typographically.
Foreground, background
Now we add colors, using cyan as the foreground color and red as the background:
⠝R
= graphics mode, foreground redNB
= copy foreground color to background color⠝C
= graphics mode, foreground cyan
Invert
But wait! We are about to introduce some rainbow-y color changes, and quick color changes can only* be done with the foreground color.
So, we invert all the graphic characters (change ⠧
to ⠘
etc.), and draw with
red on a cyan-colored background:
⠝C
= first, switch to cyan graphicsNB
= make cyan the background color⠝R
= use red as foreground color
*) You cannot change the background color directly, but only via the “use foreground color as background now” command we’ve seen above. Thus, a background color change needs three control characters: Set new color as foreground, copy foreground to background, restore foreground color.
Change colors
Let’s add the color changes: red, yellow, green, then blue.
⠝Y
= graphics mode, foreground yellow⠝G
= graphics mode, foreground green⠝B
= graphics mode, foreground blue
Hmm, half the graphics are missing now, what happened?
In normal Teletext mode, any control character “eats up” a whole character – you cannot draw anything else when you change colors, and the cell is left blank.
Hold on!
This is where the magic of the “hold mode” comes into play. In hold mode, a control character is not rendered as an empty space. Instead, the last graphical character is repeated (held).
“Activate hold mode” is also a control character. The debug view of the control characters is a mess now, but the rendered output looks perfect!
H⠝
= activate hold mode
The real trick
For this to work, all the letters have been carefully arranged so that they survive the last-graphical-character repetition
and do not look like pixel sixel garbage!
Now we also know why the letter shapes looked a little weird to begin with:
That must have been a painstaking trial-and-error process! Hats off to Will!
Hold and blast
The “WITH MICHAEL FISH” texts emplys hold mode as well:
In fact, another trick is needed for the switch from text mode back to graphics mode at the end of the line: blast-through text. This is a Teletext feature where there is no switch to text mode at all – the graphical mosaic characters are already arranged in a way that they can co-exist with letters. But only upper-case letters and the space character! All other characters, numbers, symbols etc. get replaced with graphics characters:
You can think of it like this: Graphics mode switches to a different font where all the uppercase letters are the same.
Further holding, erm, reading
You can employ hold mode for many different purposes – often to avoid color change gaps. The end scroller font of 420 Years of Teletext uses it for a gap-less shadow effect:
In Super Santa Brothers, the hold mode also covers up the control characters to switch blinking on and off (upper coin):
If you want to get your feet wet with the joy (and pain) of Teletext art, the zxnet online editor is a good starting point! Try pressing the escape key followed by “Q” to switch the control characters on and off.
Teletext
- Hold mode minutiae
- Worms VBI
- Super Santa Brothers
- Bitte hier das mit den…
- Teletext on Amiga – the real world’s first!
- sinéad
- HO HO
- Back to the Future!
- Teletext on Amiga
- More…
Blog
- Keming war gestern
- Worms DeCoded
- VC³ 2024, an early present
- Fun with Worms DC custom levels
- Modding the Windows boot hand
- Unit Arrr
- I just favican’t
- I consider myself more of a Renaissance man
- Zerosphere on Analogue Pocket
- Amiga Topaz 1.4, part 2
- More…