Grabulosaure wrote:The current implementation is slow to realign the phase. After frequency and phase alignment, only small adjustments are necessary, within TV tolerance.
How about this idea: No need to adjust the pixel clock. When VSync on output happens, keep it active till VSync (or other sync point) from the core's video happens. To provide more consistent video, output VSync must be held the whole line, so it should not be finished earlier than current output line ends. It especially should work good for cores outputing slightly lower refresh than standard. But i think it's not a problem to find the solution for higher refresh if this solution will work.
There can be variations. May be tweak the VSync won't work well, then probably bottom blank can be made variable, so when sync point from input happens, then output code will start to generate standard VSync and then new frame according to standard. Key point: always finish the current line, never break it, so HSync will be at standard same intervals. So only total amount of lines will vary.