Ok, since i assembled my Book V1 back (connected the LCD screen) for testing VidSync, I've decided to dig into textmode centering issue a bit more.
Everything below is for Book V1 CGA only.
I thought, might reprograming 6845 CRTC help at least to some extent?
This page
https://stanislavs.org/helppc/6845.html has all basic info for that, including init tables for video modes.
I've tried changing registers 02 and 03.
03 seemed to have no effect, but playing with 02 gave a result: if set to 59h instead of 5Ah and video centering fails, it makes screen shift to the right in text mode
. Somewhat usable, but not the real solution. So i extended my PALTSR to change register 02 of 6845 to 5Ah/59h if called from 80x25 text mode.
Odd enough, if centering failed (it's shifted to either left of right), changing register moves screen eating one column from one side (LCD reinits with that new value). BUT, if centering done right, changing that register has no effect at all!
Next, i tried setting screen border via port 3D9h right after setting CGA text mode 80x25 and got some new weird effects. LCD controller alters colors - white becomes kind of opposite to border color, other colors changed as well. On external screen everything is fine, so it's some quirk on either LCD or CGA CLPD LCD part. Might be good for some Book V1 specific virus :D
I also noticed that changing register 0 to any value different from 71h caused LCD to lose signal and figured at some point that returning back from that state positioned screen just right. It's surely pure hit-and-miss, but it worked more reliable than "mode 80" aaand it has some success rate (>30%) with Rogue, which has 0 success rate centering with 8088 chip.
So, keeping LCD with lost signal a bit and returning back definitely helps my text mode centering issues.
PALTSR3 attached to this post and source is here:
https://github.com/jinshin/Book8088/blob/main/PALTSR3.ASM
Press Ctrl+~ (key under Escape) to reset screen in 80x25 text mode.
Knows bugs: you'll need to press CTRL after screen centering as CTRL gets "stuck" after long interrupt processing.