From the code, BCM2835 peripherals pdf and [1], I gather that this is writing to the pixelvalve1 region of the Videocore to change PAL resolution. But there's nothing about this in the Videocore docs. Anybody here knows where this is documented and what pixelvalve0 in [1] is?
As I understand it, it's moving the active display area of the analogue output to a position 16 lines earlier than it would normally be. In effect that moves the top of the display area into the Vertical Blanking Interval.
From there the code is painting the required 0 and 1 pulses as a bitmap onto the top region of the Pi's display (which is now in the VBI area that teletext sets will be looking at.) Voila - right signal, right place, right time. Very elegant solution.
[1]: https://github.com/msperl/rpi-registers/blob/master/md/READM...