Indeed. Since I started doing PC coding around 1985, I was hit by the entire "You need to cheat to do direct CRT I/O on the PC good" and it seems I have to something with it once again, until I accept my fate and either do only text stdout or dig into proper gui mess
The problem is that while Crt works, extensions really fast become unportable. We also had that with the IDE/turbo vision driver underpinnings, and since TV is also not based on
Crt in TP, kept that difference in FPC too, but made the console (screen, keyboard,mouse) support in our Turbo Vision system in separate units (to split out platform dependent FV/TV drivers unit code from the main code body into a set of separate units outside of FV). The textmode IDE also works on Linux with some limitations (not all keyboard combinations are possible on all terminals, and there are some issues with the "output" window too. Some of that works on a physical Linux textmode terminal login, but not in ssh/xterm etc)
So the problem is not that you should go GUI, but more that maybe rethink what the minimal abstraction is that you need.
If you only use gotoxy() write('rewrwe) like sequences you might not require all the line wrapping stuff (which, with unicode and older East Asian character sets workarounds is quite involved)
Funny you should mention the FP IDE, because I was just looking through that code to see how it handled the problem. In this particular case, speed is probably not the main issue, but rather the ability to create "windows", scrolling content, direct positioning, and what not. Maybe the IDE way of doing it might work.
It will work, the IDE does it doesn't it? And on Windows quite well.
The only problem is that that code factored out of TV (units video/keyboard/mouse) are real driver units, and miss some easy to use layer on top of them.
But I'm a few hundred units away until I get to that part ...
What I'm suggesting is writing a small subset interface of whatever you need on top of those units to bridge the gap between the virtual screen emulation and your code. I've played with that in the past, and could help you here and there.
Some of my past experiments (fairly old, think 2000-2003) are in the FPC demoes, the textmode console games fpctris and samegame, and a start for a list.com clone called "lister". If you have a standalone FPC (not lazarus) install, they are in c:\fpc\<version\demo and then mainly the graph\ and lister\ directories. Seems that the makefile is broken due to upgrade to make 3.82 or changes in the makefile generator, so build by hand (make sure gameunit.pp doesn't define "usegraphics", edit if necessary)
These programs worked at some time, but I haven't seriously looked at them since 2005, YMMV
The only thing that might be a bit difficult is that the TV code needs an explicit command to update the screen from the virtual buffer. You can force that on every write, but that is slow for complicated screens