What is hold graphics mode?
For a teletext graphician, hold graphics mode is an arcane trick leading to some nice effects. For the author of a teletext frame renderer or editor, they are the bane of their lives, or at least a recurring topic in the bug tracker. Ordinarily, whenever a control character appears in a teletext frame it is replaced by an ugly space. However, sometimes it's required to have one colour changing seamlessly into another, for example on this weather map.
Say hold graphics mode has been enabled. For the rest of the line, wherever a control character is encountered, instead of being shown as a space, it will be shown as the most recent graphics ('mosaics') character (with bit 6 set). This character is displayed in the foreground and background colours currently set. In the weather map, the places near where the colours change would ordinarily be shown as a space, but instead are often shown as the block of six subpixels.
Zooming in, we notice the use of hold graphics mode on the southern border of Poland:
The gory details
In both the red and white pairs of characters, the first character of the pair is a graphics character defining which subpixels are shown, and the second a colour change control character. These colour changes come into effect beginning from the next character cell (in teletext terminology, 'set-after').
Because hold graphics is active, the most recent graphics character on the line — in this case the one just before it — is shown instead, continuing the jagged southern border rather than leaving an empty space. By performing this substitution, most attribute changes are possible without the appearance of intervening spaces.
Hold graphics mode can be disabled with the release graphics control character. The control code which enables hold graphics mode takes effect immediately (in teletext terminology, 'set-at'). On the other hand, when the mode is cancelled with the release graphics code, it will take effect on the next character ('set-after'). That means that the character cell containing the enable hold graphics control code will <em>itself</em> appear as the most recent graphics character on the line, as will the release graphics control code (providing, of course, the hold graphics mode is active at that point).
Scanning across the line from left to right, the substituted character is reset to space in these situations:
- At the beginning of each line;
- When there is a change between text ('alphanumeric') and graphics mode;
- When there is a change between single and double height, but not by reinforcement of the current size setting.
Perhaps counter-intuitively, cancelling the hold graphics mode doesn't reset the substituted character to a space. It only stops the substitution from taking place. So, you could switch back into hold graphics mode and still see whatever the most recent graphics character on the line is at the point being substituted, even if it is before the release graphics code.
You can't tell from the map example, but even if you change from contiguous to separated graphics, the substituted character is still shown in its original contiguous or separated form. For the truly obsessed, this is all covered in European Telecommunication Standard ETS 300 706 published by the European Broadcasting Union. In particular, section G.3.3 gives an example of how the substitution should work between separated and contiguous mode.
- I've tried to make a reasonable implementation of the Polish weather map above, just without the Polish diacritics.
- You sometimes see boxes with curved corners done with hold graphics. The left-hand side of the box gives us no problems, but for the right-hand side, we need to switch seamlessly between blue background and blue foreground to provide detail for the curve. Hold graphics is the only way we can do this.
- Simon Waite and Parnikkapore Prompt demonstrate in this Facebook thread how to do a cool drop-shadow effect
- We thought about making frames for posing 8×8 go problems. The grid proved to be a bit of a challenge, but hold graphics allows the grid to abut each stone, and to allow a nice fading effect with separated graphics right up to some text, since the text control code which starts the text is also substituted (while simultaneously resetting the substituted character to a space, of course). The stones couldn't be fully round, and the black stones need to be red or some other colour, but I think what's there is the best that can be done. It's possible to mark stones with an internal square, as shown in the top right. I accidentally twiddled some of the pixels and realised I could anthopomorphise the stones by giving them little eyes and mouths. Silly.
- The final screen from the CRTC production 'Some Nasty Effects' makes use of hold graphics in the way the lettering at the top changes colour and the colour graduation in the rainbow-coloured lines near the lettering.
- The first edit.tf splash screen doesn't rely on foreground black but instead a sequence of control characters which switch between a blue background and blue foreground. Along the horizontal borders of the box, the colours change frequently without a gap. Both of these aim to give a sort-of 3D effect.
- This picture of a well-known ogre relies heavily on hold graphics for the graduation effect in the dithering behind the head and on the cheek.