I decided to experiment again with my textkernel to see if copying the text into zero page memory would be useful. The advantage of using zero page RAM to hold the text is that it removes the need for the text to be in the same bank as the display kernel. The text can be loaded into RAM in one bank and then displayed by bank-switching into the display kernel. Another practical advantage is that it becomes possible to create text dynamically in RAM without the need for the text to be fixed in ROM.
Fortunately, copying into RAM didn't impose too much of a penalty and it allowed the buffer creation code and display kernel code to be overlapped. As a result, I can now display 13 lines of text on the screen, as shown below:
The kernel takes up a whole 4K bank now and is fairly RAM heavy, though some overlapping may be possible (as suggested by supercat in the last entry). The text data is double-buffered, so it would actually be possible to display the last line of text immediately after the second last, though this would look a little odd. I am reasonably happy with this now, as it manages the same number of lines on-screen as the ET Book Cart, while flickering much less! I think this is really as far as it will be possible to go with this approach, without merging the text characters in advance, though I said that last time!
I think this would now make a very nice kernel for a text adventure as it enables text to be loaded from anywhere in ROM. I'm not too keen on this kind of game, so I probably won't be doing it myself. However, I've attached the source code and anyone is free to use it in their own projects (though drop me a line first if you do).
Edit: textkernel3.zip is the new 13 line kernel, and textkernel_zp.zip is the 12 line kernel from the previous post adapted to use zero page RAM.