VOGONS


First post, by doublebuffer

User metadata
Rank Member
Rank
Member

Has anyone managed to get good picture through PC VGA (320x200, 320x240, etc.) resolutions? I was thinking that maybe modern 4k high refresh rate displays would be finally able to resize the source image to (almost) full screen (with some black borders) without screen tearing (afaik VGA is natively 70hz).

Are there any displays that natively support this, or is it possible with OSSC?

Reply 1 of 19, by The Serpent Rider

User metadata
Rank l33t++
Rank
l33t++

Pixel perfect scaling of 320x200 (720x400) is impossible by definition. Although, you can scale through DOSBOX with a monitor that has at least 1200 horizontal lines.

I must be some kind of standard: the anonymous gangbanger of the 21st century.

Reply 2 of 19, by doublebuffer

User metadata
Rank Member
Rank
Member
The Serpent Rider wrote on 2023-07-15, 10:03:

Pixel perfect scaling of 320x200 (720x400) is impossible by definition. Although, you can scale through DOSBOX with a monitor that has at least 1200 horizontal lines.

If dosbox can do it, it means it's not impossible on real hardware, maybe there's not sufficient solution yet, but in theory it should be possible (I think).

Reply 3 of 19, by Gmlb256

User metadata
Rank l33t
Rank
l33t

Without emulation, check if the monitor has a 4:3 aspect ratio option. Pixel scaling won't be perfect, especially with smaller resolutions.

With emulators, 1600x1200 resolution with aspect correction enabled would be a nice starting point for good pixel scaling.

LCD monitors and mostly all PC/DOS emulators don't provide support for overscan borders, though.

Last edited by Gmlb256 on 2023-07-15, 13:32. Edited 1 time in total.

VIA C3 Nehemiah 1.2A @ 1.46 GHz | ASUS P2-99 | 256 MB PC133 SDRAM | GeForce3 Ti 200 64 MB | Voodoo2 12 MB | SBLive! | AWE64 | SBPro2 | GUS

Reply 4 of 19, by doublebuffer

User metadata
Rank Member
Rank
Member
Gmlb256 wrote on 2023-07-15, 13:25:

LCD monitors don't provide support for overscan borders, though.

At least some 1920x1200 monitors are able to run 1600x1200, which is then pixel perfect from 800x600 SVGA source, as far as I know. Now if the same could be achieved for 640x480 somehow...

Reply 5 of 19, by Gmlb256

User metadata
Rank l33t
Rank
l33t
doublebuffer wrote on 2023-07-15, 13:32:

At least some 1920x1200 monitors are able to run 1600x1200, which is then pixel perfect from 800x600 SVGA source, as far as I know. Now if the same could be achieved for 640x480 somehow...

Yep, I used to have one of these monitors and pixel scaling was very good. Unfortunately, mine only supported 60 Hz refresh rate.

VIA C3 Nehemiah 1.2A @ 1.46 GHz | ASUS P2-99 | 256 MB PC133 SDRAM | GeForce3 Ti 200 64 MB | Voodoo2 12 MB | SBLive! | AWE64 | SBPro2 | GUS

Reply 6 of 19, by clb

User metadata
Rank Member
Rank
Member

There are two major reasons that VGA-based LCD solutions struggle to produce pixel perfect upscaling of Mode 13h 320x200 -> 1600x1200.

The first reason is that VGA does not actually carry a pixel clock line, so the horizontal scanlines are analog and require the LCD to do clock reconstruction to find the pixel clock. This "genlock" mechanism needs to rely on heuristics since it cannot know what the original pixel width of the image was (was it 320? 360? 640? 720? or something custom?) If you check the VGA capture threads, it is a common issue that LCD displays mis-guess the input video to be e.g. 640 pixels wide when it should be 720 pixels, or vice versa.

The second, and far more trickier reason is because the DOS Mode 13h is not actually a 320x200 resolution as far as the signal on the VGA line is considered, but first, it is actually padded with an active picture "border" signal to grow it to 328x414 pixels. (328, or 656 pixels horizontally, you can think of it as either, since there is no pixel clock), and then on top of that, it is further enlarged to become a 356x447 pixel signal after adding horizontal and vertical front and back porches.

Reliably cropping this border and the porches is what constitutes a major workload for implementing pixel perfect upscaling. Doing so correctly would require a heuristic in the LCD displays that would contain deep domain-specific knowledge about the different video modes. A display should heuristically count and match this 356x447 size, to know that it should crop away exactly 10 pixels from the left, 22 pixels from the right, 13 pixels from the top and 34 pixels from the bottom from the image. And this should only be done when the picture pixel contents, clocks and syncs are first deemed to follow what looks like a Mode 13h.

Further, these video modes are just conventions and the VGA adapter is programmable, so game programmers could (and did) freely have changed the border and porch sizes to have different pixel sizes.

800x600 is slightly different in that when VESA standardized SVGA, it did away with the programmable width border in that video mode. And by that time, programming custom timings was far less of a thing that it used to be, so LCD manufacturers could read the "one true 800x600 SVGA timings mode" off of a predetermined VESA DMT.pdf standards specification, and develop mode and crop detection based on that.

After DVI-D came along, having a pixel-perfect VGA support would probably not be the biggest selling point that a LCD display could have, since DVI-D was marketed exactly for that, so I presume no vendor ever tried to perfect the ultimate DOS VGA border+porch cropping heuristic for differently shaped video signals, and they generally just do one heuristic that is good enough for most video modes, even if not perfect. And then expect that users would have moved on to DVI-D to get the pixel-perfect result.

Our CRT Terminator project does solve these issues by implementing this type of deep signal shape heuristic analysis to figure out the required border and porch crop sizes, and bypasses the analog VGA signal altogether: CRT Terminator Digital VGA Feature Card ISA DV1000 , although unfortunately the project is not yet at a stage where the card would be available. Hopefully still later this year though.

It upscales 320x200, 320x240 and 800x600 pixel-perfect to 1600x1200 for viewing on 1600x1200 and 1920x1200 displays. We find that viewing 640x480 gives best results when first upscaled 2x to 1280x960, and then letting the LCD monitor do its own scaling to upscale the 1280x960 image further up to 1600x1200. 70hz modes are supported as long as the monitor in question supports viewing 70hz modes (there exists two modern 1920x1200@75hz displays that I have found, ASUS ProArt PA248QV and Philips Brilliance 252B9/00 that can both do this fine. I like ASUS a little bit better for its UI buttons), but CRT Terminator does also support decimation down to 60hz as well if using a monitor or capture card that would not support 70hz.

Reply 7 of 19, by The Serpent Rider

User metadata
Rank l33t++
Rank
l33t++

Keep in mind that there are practically zero monitors which combine 1600x1200 resolution and 70Hz without some sort of frame skipping. Modern(ish) 1920x1200 panels are better, but I haven't seen any that can output true 8-bit color, only 6-bit FRC.

I must be some kind of standard: the anonymous gangbanger of the 21st century.

Reply 8 of 19, by doublebuffer

User metadata
Rank Member
Rank
Member
clb wrote on 2023-07-15, 14:58:

Our CRT Terminator project does solve these issues by implementing this type of deep signal shape heuristic analysis to figure out the required border and porch crop sizes, and bypasses the analog VGA signal altogether: CRT Terminator Digital VGA Feature Card ISA DV1000 , although unfortunately the project is not yet at a stage where the card would be available. Hopefully still later this year though.

I just noticed your project, the solution seems perfect for me, sign me up! Will it support upscaling to 4k or 2k resolutions? These panels are nowdays more common and come with higher quality panels than 1600x1200, I have not done math how much borders it would leave though.

Reply 9 of 19, by clb

User metadata
Rank Member
Rank
Member
The Serpent Rider wrote on 2023-07-15, 15:54:

Keep in mind that there are practically zero monitors which combine 1600x1200 resolution and 70Hz without some sort of frame skipping. Modern(ish) 1920x1200 panels are better, but I haven't seen any that can output true 8-bit color, only 6-bit FRC.

Totally agree with that. In my test lab I have verified Dell 2007FPB (1600x1200) and Dell 2007WFP (1680x1050), both manufactured in year 2006, and while both of them do take in 70 Hz video signal, they both show it with frame skip to 60 Hz.

Oddly, I do have an older Fujitsu-Siemens P19-1 YEGA519530 display (1280x1024), manufactured in 2003, and that does take in 70 Hz signal, and displays it as 70 Hz without frame skip. Although the panel pixel response time quality was not that great, there was a bit too noticeable ghosting for modern taste, for example when playing Prince of Persia 1 with white character on black background.

I do not have anything negative to say about the color quality of ASUS ProArt PA248QV or Philips Brilliance 252B9/00. Subjectively ASUS might be a tiny bit better colors to my liking, although I haven't got a HDMI splitter to be able to test side by side. (probably should get one)

DOS VGA palette is after all also 6-bit, so I suppose I would not be able to observe any difference with 6-bit + FRC vs true 8-bit with such old content anyways.

Reply 10 of 19, by clb

User metadata
Rank Member
Rank
Member
doublebuffer wrote on 2023-07-15, 16:14:

I just noticed your project, the solution seems perfect for me, sign me up! Will it support upscaling to 4k or 2k resolutions? These panels are nowdays more common and come with higher quality panels than 1600x1200, I have not done math how much borders it would leave though.

Cool! Keep an eye out for updates towards the end of the year.

Unfortunately 4K and 2K resolutions are beyond what the FPGA chip on the card will be able to do. The pixel clock speeds are too high for those resolutions. Max output resolution is 1920x1200, although most people probably will prefer 1600x1200 for 4:3, or 1440x1080 if on a 1080p display. Maybe give the still screenshots and videos a look, and see if the current resolutions will be suitable for your target. It would be cool to do upscaling up to 4K, maybe version two might be able to do that (one can dream 😀 )

Reply 11 of 19, by The Serpent Rider

User metadata
Rank l33t++
Rank
l33t++

75Hz support on 1280x1024 panels was pretty common. So late professional 1280x1024 should be good to go in terms of response time, color and scaling options. Like NEC 1990SXi.

I must be some kind of standard: the anonymous gangbanger of the 21st century.

Reply 12 of 19, by doublebuffer

User metadata
Rank Member
Rank
Member
clb wrote on 2023-07-15, 16:35:

1600x1200 for 4:3

Do you know any 70hz capable 4:3 displays? I think I'm going to buy the Asus you recommended, it's much easier to get something that definitely works than try to figure it out from online reviews. But you're right, 4:3 would be more period accurate but they are even more rare than x1200 widescreens.

Reply 13 of 19, by clb

User metadata
Rank Member
Rank
Member

The Dell 2007FPB (1600x1200) is the only 4:3 display in my test lab, and that unfortunately was not able to do 70 hz without frameskip.

One drawback with ASUS PA248QV is that it has this magic sensing functionality of the input resolution, and whether to display it as 4:3 or 16:10. Basically if the input resolution is 16:10 or wider, then it will always show it as 16:10. So the DOS 720x400 from analog VGA input side will show up as 16:10 full screen, even if one attempts to force aspect to 4:3. (one can view that as a feature or a bug)

CRT Terminator bypasses that situation with ASUS on 720x400 from happening by upscaling it 2xwide, 3xtall to 1440x1200 so it is <16:10 aspect ratio. Then PA248QV will show it as 4:3. That looks loosely similar to what you can see at the end of this video: https://www.youtube.com/watch?v=i14WJheyG14 (that video is captured via StarTech and not via ASUS though)

CRT Terminator actually harnesses that scaling behavior from ASUS as a feature, and it enables games like Axia and The Incredible Machine 1 and 2 to run in full screen 16:10 modes without blank areas. (ASUS PA248QV has been the main test display that CRT Terminator has been developed against)

Reply 14 of 19, by doublebuffer

User metadata
Rank Member
Rank
Member
clb wrote on 2023-07-15, 17:08:

CRT Terminator bypasses that situation with ASUS on 720x400 from happening by upscaling it 2xwide, 3xtall to 1440x1200

Sounds almost too good to be true, but seeing is believing 😀

Reply 16 of 19, by agent_x007

User metadata
Rank Oldbie
Rank
Oldbie
doublebuffer wrote on 2023-07-15, 08:35:

Has anyone managed to get good picture through PC VGA (320x200, 320x240, etc.) resolutions? I was thinking that maybe modern 4k high refresh rate displays would be finally able to resize the source image to (almost) full screen (with some black borders) without screen tearing (afaik VGA is natively 70hz).

Are there any displays that natively support this, or is it possible with OSSC?

Let's start with 320x200 being usually recognised on modern LCDs as "widescreen" resolution (since it has 16:10 aspect ratio).
Trouble is, everyone wants it to be made into a 4:3 (because that's what CRTs did back in the day). So, unless your scaler is capable of morphing 16:10 input resolution into 4:3 output that is displayed on 16:9 monitor (1440p/4k), you will never see a "pixel perfect" CRT 320x200 on a modern LCD/OLED.

320x240 should be easier to do, since that get's "upscaled" to 640x480 no problem.
However, getting 70/75Hz from it may be a bit difficult on DVI/HDMI port (VGA/Composite is a beter option in this case).

Reply 17 of 19, by Joseph_Joestar

User metadata
Rank l33t
Rank
l33t
doublebuffer wrote on 2023-07-15, 16:54:

Do you know any 70hz capable 4:3 displays? I think I'm going to buy the Asus you recommended, it's much easier to get something that definitely works than try to figure it out from online reviews. But you're right, 4:3 would be more period accurate but they are even more rare than x1200 widescreens.

Rumor is that some 16:10 monitors with TN panels might be able to display 320x200 @ 70 Hz without frame skipping, while those with IPS panels can not. Not sure how to test this properly though. Is there a DOS game where frame skipping would be very noticeable?

As for pixel perfect upscaling, something like that can be achieved by running DOSBox at 1600x1200 on a 16:10 monitor. Phil showcases it near the end of this video. But if we're talking about real hardware, you will likely get some blurring from the monitor's built-in upscaler, although the end result still looks pretty decent to my eyes.

PC#1: Pentium MMX 166 / Soyo SY-5BT / S3 Trio64V+ / Voodoo1 / YMF719 / AWE64 Gold / SC-155
PC#2: AthlonXP 2100+ / ECS K7VTA3 / Voodoo3 / Audigy2 / Vortex2
PC#3: Athlon64 3400+ / Asus K8V-MX / 5900XT / Audigy2
PC#4: i5-3570K / MSI Z77A-G43 / GTX 970 / X-Fi

Reply 18 of 19, by clb

User metadata
Rank Member
Rank
Member

It is doubtful that the panel technology itself would have an intrinsic restricting/enabling effect, but maybe indirectly there may have been some development that coincided.

The Yo! demo https://www.pouet.net/prod.php?which=2999 is a quick easy way to test, it implements a 70Hz demo with full screen panning pixels at constant speed, so 70hz->60hz stuttering is very observable there if it happens.

Reply 19 of 19, by doublebuffer

User metadata
Rank Member
Rank
Member
clb wrote on 2023-07-17, 07:20:

It is doubtful that the panel technology itself would have an intrinsic restricting/enabling effect, but maybe indirectly there may have been some development that coincided.

There are modern displays which apparently can handle all vintage resolutions: https://www.kickstarter.com/projects/checkmat … nd-new-systems/

So yes, with a proper driver board everything seems to be possible.