Heya, thank you so much for all the detailed feedback. This has been a very interesting read. Let me try to unpack my thoughts one at a time below.
keenmaster486 wrote on 2025-02-27, 18:01:
My capture card works fine with 1920x1080 from the CRTT. 1600x1200 is what it doesn't like - it scans it as 800x600.
Hmm this is indeed a bit annoying. I wonder how that happens, and if that is common. Was this on the EVGA XR1 Lite, or some other device? I think I should have an EVGA XR1 to test - capture devices should definitely not misdetect or guess the resolution, but they can precisely and exactly count the pixels and scanlines, so they should never miss the correct resolution. (only caveat I know is that some devices require that the width of a resolution is a multiple of 2 or 4 pixels, which is common with all these resolutions)
If you find other devices that do this, it would be interesting to know. I'll try to see if I can reproduce this issue, to see if it can be worked around.
keenmaster486 wrote on 2025-02-27, 18:01:First, the mode switching: I have some videos if you want to see them, but I'm still experiencing the "blip" when switching DOS […]
Show full quote
First, the mode switching: I have some videos if you want to see them, but I'm still experiencing the "blip" when switching DOS video modes, despite the output mode remaining the same.
Example:
- I have the output mode set to 1600x1200x60Hz. Multimode off, Stutterstop off, vsync off (fixed 60Hz). This mode does not change throughout the test, and I can verify it by checking the info on my monitor. I'm using a monitor only, no capture card.
- I'm in DOS text mode
- I change the DOS video mode to any graphics mode
- The monitor blanks for 1-2 seconds as though it has detected a mode change
- But there has not been a mode change. The mode is still 1600x1200x60Hz.
- I change the DOS video mode back to text mode
- There is no "blip" this time. The modeswitch happens instantaneously and my monitor does not see an interruption in the 1600x1200x60Hz signal.
So I'm seeing a blip going from text->graphics, but not from graphics->text.
I troubleshooted this issue today, and I was able to reproduce and fix this. This is definitely a bug in CRT Terminator firmware.
What is happening here is that when a video mode is changed, the video mode/resolution counters on the PC VGA card are reset, i.e. the new video mode on the PC starts clocking out the new video mode abruptly, unsynchronized with the previous video mode. This will generally cause a vsync pulse to be emitted at a random time with respect to the old video mode scanout.
CRT Terminator's interlaced video mode detection misinterpreted this unexpected vsync pulse timing, and for a duration of a single frame, misunderstood that an interlaced video mode is being activated. Due to internal memory framebuffer bandwidth limitations, there are specific restrictions to interlaced video modes. This resulted in CRT Terminator thinking it needed to switch the output video mode, and as result the the output video mode briefly lost sync. The very next frame, CRT Terminator would then realize that the current video mode is not interlaced at all, and it would resume the normal operation.
I have authored a fix, which will go through testing and verification. I'll push an update out as soon as that is done. Thanks for reporting this issue! If you find any other video sync losses when MultiMode and StutterStop are disabled, please let me know.
keenmaster486 wrote on 2025-02-27, 18:01:
My LCD monitor does not let me force the aspect ratio to 4:3. It only lets me set it to "original", which means it preserves the original aspect ratio of the mode rather than stretching it to fill the screen. This means that many of the Multimode modes get scanned at their native non-4:3 aspect ratios. For example text modes come in as 1440x1200 in Multimode, and consequently appear stretched vertically on my screen, despite having perfect scaling.
This is a great observation, and something that did turn up in our design process. Letterboxing directly in CRT Terminator is something that we did consider, but were compelled to turn down, because the focus was to develop that "holy grail" pixel-perfect and no-frame-skip support for 1600x1200 @ 70Hz.
As data points:
- The FPGA is rated up to 118.8 MHz video pixel clock.
- Displaying 1600x1200 @ 60 Hz @ CVT-RBv2 requires a 124.2 MHz pixel clock. That is just a tiny amount of overclocking over 118.8 MHz, which we found to practically always work.
- Displaying 1600x1200 as letter-boxed 1920x1200 @ 60 Hz @ CVT-RBv2, requires a 148.5 MHz pixel clock. This is a larger overclock that the FPGA vendor has not guaranteed.
I.e. adding extra black pixels to letter-box, would take the FPGA pixel clock further into the overclock domain, so we did not go into that direction, thinking it is better to choose a monitor that has the 4:3 support built-in. This way the video pixel "overclock bandwidth" could be allocated towards getting up to 70Hz.
Another challenge is that the video upscaler process is the "tightest"/highest performance loop construct in the FPGA. The process runs in the highest video pixel clock speed, e.g. that 124.2 MHz or 148.5 MHz. The internal operation of the FPGA itself works up to about 180-200MHz. So there is very little headroom to run any logic at per-pixel domain. A single if() branch in that area already is critical overhead in that per-pixel domain.
Originally we struggled with these high resolutions - and eventually ended up purchasing Gowin's highest binned speed grade FPGA for the particular SKU that we are using, in order to stretch the limits. Though the FPGA is still a ~200 MHz max part. In order to be able to produce more complex upscaling logic, a 300 or 400 MHz switching speed part would be needed, but the price points then creep into several hundreds more, like the new OSSCs and RetroTinks are showing the way.
I did try to squeeze in letterboxing, but unfortunately was not able to make it without it resulting in tradeoffs to the max video pixel clock speeds. I can try to give this another go in the future, given that since the first attempt, we have spent time developing a new timing closure optimizer, but I cannot make any promises on this front unfortunately. For best image quality, MultiMode is the recommended path.
keenmaster486 wrote on 2025-02-27, 18:01:
GRIDTEST program:
The attachment GRIDTEST.EXE is no longer available
Thanks for this test program. I gave this a run at 640x350 outputting to fixed 1600x1200, and capturing in OBS. The output pattern here looks correct and as expected:
The attachment fixed_resolution_upscaled_pixel_grid.png is no longer available
Horizontally, 1600 / 640 = 2.5, so 50% of source pixels should upscale to 2 pixels, and 50% of them should upscale to 3 pixels. So the upscaling will alternate each pixel between 2,3,2,3,2,3,2... upscaling pattern.
Vertically, 1200 / 350 = 3.428571428571429, so 42.8% of source pixels should upscale to 4 pixels, and 57.1% of source pixels should upscale to 3 pixels. So the upscaling will alternate between 3 and 4 pixels in almost 50-50 manner.
I agree that the result is not great for dithered patterns, although there is no good strategy to my knowledge to improve dithers, that would not cause more distortion to the image.
In your camera photos, I can see an effect that looks like double scaling has taken place. CRT Terminator upscaled 640x350 up to 1600x1200, and then maybe the display was a 1920x1080?, so it had to vertically shrink the upscaled pixel grid a little bit, and horizontally extend? Try outputting 1920x1080 directly from CRT Terminator in that case, so that the display will not need to apply further scaling to the CRT Terminator scaled image. Maybe that might give a bit better output.
keenmaster486 wrote on 2025-02-27, 18:07:
And I have one more question - is there a way to make the overscan border persistent? I can turn it on with the CRTT tool, but it goes away the next time I power cycle the machine.
CRT Terminator settings do not persist over power cycling. The idea with CRTT.EXE is to make the tool small so that it could be placed in AUTOEXEC.BAT for persisting over boots. Would that work?
keenmaster486 wrote on 2025-02-28, 23:58:
Another update: The CLGD tool works on my CL-GD5428 card. So I have hardware pallette updates without needing PALTSR. Certain demos actually work now.
So it worked on 5428, but not on 5426. I wonder if it's the chip or something to do with the design of the card that carries the chip.
That's really interesting to hear. I am puzzled as well, not sure what the detail with different CL variants here might be.
keenmaster486 wrote on 2025-03-01, 04:22:
I have just thought of something else.
Probably about half of widescreen LCD monitors have the ability to display the image in its original aspect ratio, or perhaps force it to 4:3.
It might be useful for the CRTT to have an optional mode to output a 4:3 image centered in the middle of a wider output resolution, to handle the aspect ratio correction itself, especially moving into the future when it is not guaranteed that the average monitor 10 years from now for example is going to have the ability to display a 4:3 aspect ratio properly.
This sounds like the letterboxing idea above? I'll give this a possibility in the future, to see if there is enough timing headroom to make it possible. Though it is not certain if this will be feasible to implement.