hoglet67 / RGBtoHDMI

Bare-metal Raspberry Pi project that provides pixel-perfect sampling of Retro Computer RGB/YUV video and conversion to HDMI
GNU General Public License v3.0
842 stars 115 forks source link

Improvement: Generate permanent HDMI sync to prevent "flashing" when sync is regained #392

Open G4DDS opened 3 months ago

G4DDS commented 3 months ago

I don't know whether this is possible, but the idea comes from using the interface with my ZX81 which as you will be aware switches the TV/composite output off when loading, saving and performing other various operations. When the ZX81 enables the output again there can be a delay and/or multiple "flashing" as the RGBtoHDMI interface and monitor re-syncs.

Is it possible for the RGBtoHDMI interface to generate a permanent (sync) signal and just display a blank screen (or perhaps hold the last display frame with an overlayed message?) when the ZX81 output is disabled so that when the output is re-enabled the monitor does not need to re-sync and hopefully it would mean there would be no "flashing".

As I say, I don't know whether this is possible.

IanSB commented 3 months ago

@G4DDS The HDMI output is already permanently enabled and generating syncs. However, when the source sync is stopped and then restarted the HDMI output has to be re-genlocked to that new sync position. This is done by varying the HDMI clock until the syncs are aligned again and some monitors see that as a loss of sync or a mode change and blank the screen so the results will vary from monitor to monitor.

There are already some options that can mitigate or eliminate this problem but using them does have compromises:

  1. Try changing the "Genlock Speed" option in the settings menu to "Medium" or "Slow". This controls the speed that the HDMI clock is changed and reducing the rate of change can sometimes stop the monitor from blanking.

  2. Change the "Genlock Mode" option in the settings menu to "Off". This will disable the genlock completely and should stop all blanking but the output will not be locked to the input and will usually be 60Hz. This will potentially cause quality issues with the video as smooth scrolling will be juddery and you will get video tears in any motion. This is unlikely to be an issue with the ZX81 but would be more visible on something like the BBC micro or Commodore 64. You can eliminate any tearing by increasing the "Num Buffers" also in the settings menu but that adds a frame of Lag to the video for each increase in value.