I could listen to this all day. And probably will.
how did they do that ? ( It always bugged me)
As time progresses between vsyncs, the CRT electron beam scans left-to-right, then moves down a line, then left-to-right, until it hits the bottom-right - then it starts again at the next vsync. You set the video controller registers to mode A before the first line hits the CRT. A bit later, but before it reaches the bottom of the screen, you push new values into the video controller registers changing it to mode B; all the remaining lines are sent to the CRT in the new mode. You just have to make sure that the video controller register values get changed at the right point during each frame, and make sure that the mapped video memory contains data in the right format either side of the mode 'boundary' (although no boundary really exists). You can change mode more than once per frame if you want.
You could always read the Elite source code to see how Bell+Braben did it.