VileR wrote on 2023-02-07, 07:01:
For video modes that do not have the possibility of pixel perfect upscaling, CRT Terminator's MultiMode feature carefully tunes a balance between aspect ratio and pixel correct upscaling.
Well done on giving this some extra attention! Non-integer scaling has always been a problem on flat panels, but those three screenshots at the bottom look good indeed. How does that work - do you first scale to the closest possible integer resolution, then apply a non-integer step? Does it correct for gamma when blending the color values of adjacent pixels?
Also curious to know how this might deal with demos like Copper or Ambience. 😉
Both Copper and Ambience demos (and several others) have been used as test cases during development, and they do both work in that they do not lose sync and are able to show through the demo, but unfortunately there are limitations.
The challenge with Ambience is that it wants to configure a 120hz video mode. (If I recall correctly, it was possible to decrease the frame rate in Ambience down to 90hz at smallest, though that is still not quite small enough for LCDs). The issue here is that there does not seem to exist any flat displays that would allow a 120hz refresh rate at retro small resolutions like 640x400 or 640x480, those two developments seem to be very contrary in business cases to each other.
In Passthrough mode, whatever rate the demo is posting, will be forwarded to the display, so if there does exist a display that does support such a combination, it would work.
In Upscaled mode, posting e.g. 1600x1200@120hz or 1920x1080@120hz is beyond the DVI-D single link spec (and CRTT max pixel clock speeds), there is no way to get that much data over to the cable. So what CRTT will do in Upscaled mode is that it will implement frame skip down to 75 hz, so Ambience will show and retain sync, but naturally the intended demo effect will not be perfect. At least it won't be a black screen, and one can get an impression of the demo.
The Copper demo does also work, CRTT does not lose sync. But it should be noted that in the "wobbler" parts of the demo, it does very nonconforming things by programming the CRTC video frame registers on the fly to implement the horizontal sine wave style effect. This was something that was flaky already among different VGA adapters and CRT monitors.
While it would be possible to recognize this behavior on CRTT, doing so was found to be counterproductive against another goal, that is to ensure wide support to signal stability from different VGA adapters. On some cards we see fluctuating hsync or hblank timings, which is caused by poor signal on the Feature Connector line, so we carefully do a "lax" interpretation of these timings to help reconstruct a stable video sync signal. This is at odds against what the Copper demo is intentionally doing. So we leaned on the side of implementing sync stabilization at the expense of this demo. Basically, CRTT will think in Copper that the VGA adapter is losing its sync, and it will work hard to keep the framing intact, so the sine wave parts of the demo will look pretty "interesting". The non-wobbly parts of the demo will work as intended.
While we are visiting this topic, there is also a third demo, Kukoo 2, which was consciously rejected from being supported. It does palette color changes at each scanline to get more than 256 colors in a single frame. Supporting that demo would require actively delaying the video signal in order to sync up palette writes and the Feature Connector video signal with each other at hsync. Supporting this demo would add more processing delays to CRTT, which many people would not prefer, so we chose to be practical and optimize to keep the processing latency down. The Kukoo2 demo will show on CRTT, but the palette will be off.
The most important demoscene video effects, i.e. the Pinball games 😀 , are fully supported however, like you can see a screenshot of on the web page.
In terms of video scaling, the MultiMode setting relies on active coordination with the LCD display. CRT Terminator will reframe the timings of the video signal for aspect ratio control, and then implement integer scaling on the video signal. The LCD display should be set in "Force 4:3" mode, and it will then do the final bilinear filtering part to shape the output image to cover the 4:3 screen. We find this combination works best for pixel art content.
If only point scaling is desired, one can disable the MultiMode feature, and have CRT Terminator implement point sampling to produce a 4:3 image. Or if only bilinear filtering is desired, then one can run in Passthrough mode to have the display perform the scaling (which typically looks very close to being bilinearly filtered).
Btw, if you are looking close on the screenshots, one thing to note is that USB3HDCAP with which those images were captured, is a lossy YUV 4:2:0 capture card, so there is a chroma loss in the images, which will produce more softness. I haven't dared to pull the trigger to purchase one of the >500 eur capture cards until I find which would be able to do full lossless YUV 4:4:4 (especially when I count I already have accumulated 11(!) different capture cards in my test lab by now when testing CRTT compatibility)