Mikro, if you read this, do you have any idea why the left/right borders behave well in 256 colors and true colors but seems totally wrong in STe mode ?
I use your formulas to compute them (with border_offsets values).
Mikro overlooked this. Well, hard to say in general but I remember how I solved similar situations when learning about Videl: take the standard values from TOS and recalculate them step by step. In that case you'll see if you still get correct values from your formulas or not. Sometimes you even have the good values but you realize you forgot some thing (like the fact you can move/center screen, i.e. the formulas just give some idea about screen limits but there's free interval, sometimes even 100-200 pixels which you can't derive but you have to use some heuristics -- average, median etc).
Btw, about the demo: I can test on RGB, maybe even right now, I'm going to try it and describe what does it do :)