Hello!
There are 625 horizontal lines in a normal PAL frame…
Parameter _PAL_LINE_FRAME must be 312.5, not 312. Other timings depends on it and field duration is not exactly correct – 19.96 ms, should be – 20 ms. Changing to 312.5 – fixing problem.
And I have a question: why _PAL_LINE_DISPLAY is 260 and not 288 lines?