ramapcsx2 / gbs-control

GNU General Public License v3.0
771 stars 110 forks source link

Slow sync with external clock generator #533

Open TheRetroCarrot opened 4 months ago

TheRetroCarrot commented 4 months ago

I'm having an issue where horizontal sync takes a while to stabilize initially or when changing resolutions. https://youtu.be/nJ5TXbfRE94

This is with an external clock gen, at first I thought it might be the generator itself, so I purchased an adafruit pcb with the same results. This never causes an issue after initial sync so long as the resolution doesn't change, image is perfectly stable with no tearing. Output in the GUI is as follows when enabling my preset:

"clock gen reset: 81000000 Active FrameTime Lock enabled, adjusting external clock gen frequency

preset applied: 720x480 (custom) for EDTV 60Hz

source Hz: 59.93941 new out: 59.93946 clock: 80987928 (-12072)"

Disabling FTL causes things to stabilize much faster, but not instantly. This occurs on many different systems all running component cables with VGA output to an HD CRT with native RGBHV.

Anybody have any ideas or suggestions? I've gone over all my connections many times, there is no bridging and everything has a solid connection. If this is normal behavior I'm fine with it, but I don't believe it is?

TheRetroCarrot commented 4 months ago

So it appears disabling syncwatcher after a system has synced fixed this even on resolution change, the issue is anytime I switch systems I need to re-enable syncwatcher then disable it. This is also system or resolution dependent it seems, PS2 can switch between 240-480i with no issues, Xbox cannot go between 480i-480p. Any ideas?

YoImLee commented 4 months ago

Have you tried a different display? To me it seems like your monitor is sensitive to the algorithm used to bring the input and output frequencies in sync with each other.

ramapcsx2 commented 4 months ago

Yea, I'm sorry but some displays really hate this or that algorithm, in all sorts of variations. I'm surprised that even a CRT does it though. Tough luck :/ Maybe disabling the clock gen works better overall then?

TheRetroCarrot commented 4 months ago

Thanks for the responses. I haven't tried a different display though that would be a good test. Unfortunately I'd need to be running through a VGA-HDMI adapter to do so as I have no other RGBHV displays that wouldn't require a extensive amount of furniture moving haha. That adds another variable but is still more to go off of.

This is a very minor issue anyways, I just like to know everything is working as intended or fix things if possible. For the most part this TV is only used for 480i-1080p content. In the off chance I end up playing through a PS1 game where the resolution changes become a problem, disabling syncwatcher seems to work.

I found some old code in a thread on here to disable syncwatcher after initial sync which was an idea. Unfortunately it's needed going from 480i-480p it seems, just not 240p-480i, so that isn't really an option. Disabling FTL seems to make things better, but still not perfect like when syncwatcher is disabled.

I'm also running this all through an Extron VGA auto switch, I should test without that as well. It is defaulted to the GBS-C though when nothing else is on so no switching is occurring at the time of sync.