Vga scaler and horizontal scanlines on CRT VGA PC monitor

Discussion about displays and related hardware including MiSTer filters and video settings.
AmintaMister
Posts: 277
Joined: Thu Sep 16, 2021 10:54 pm
Has thanked: 720 times
Been thanked: 44 times

Vga scaler and horizontal scanlines on CRT VGA PC monitor

Unread post by AmintaMister »

Hi!

Usually I use my MISTer with a Sony PVM but to play the computer cores I've bought a 17" CRT VGA PC Monitor, the LG Studioworks 700S (https://mobilespecs.net/monitor/LG/LG_S ... _700S.html).

I use the Vga analog output.

I've set the MISTer.in this way:

vga_scaler=1
forced_scandoubler=1
vscale_mode=1
video_mode=6

I've noticed that outputting on PC Monitor I can use the Custom MISTer video filters for the scaler (https://github.com/MiSTer-devel/Filters_MiSTer) but the ones with horizontal scanlines don't work (the vertical ones do). Why?

What is the difference with the ScandoublerFX scanlines option (that works) and what is better ?

What filter do you recommend for A0486 core (maybe no filter at all), for Apple IIe, for C64 and for Amiga respectively so they resemble as much as possible to the original ones?

If I connect the MISTer via an Hdmi to Vga adapter does the filters behavior changes?

Thanks!
User avatar
mapf
Posts: 153
Joined: Mon Aug 31, 2020 8:05 pm
Has thanked: 58 times
Been thanked: 51 times

Re: Vga scaler and horizontal scanlines on CRT VGA PC monitor

Unread post by mapf »

Scandoubler and vga_scaler are two functions that are independent. Scandoubling turns the 15kHz TV-compatible signal into a 31kHz VGA CRT-compatible signal. In order to use your monitor, scandoubling is sufficient.

The scaler works on the image produced by the core and scales it to fit into a fixed resolution. It is normally active on the HDMI output. The vga_scaler option activates it also on the analog output. I is an option when the scandoubled image cannot be displayed by your crt monitor, or when you want to play a "tate" mode arcade game on your horizontally oriented CRT.

Both functions can be active at the same time, but they interfere with each other. The scandoubler doubles the vertical resolution of the image, and depending on the input and output resolution, integer scaling might no longer be possible - then you either have a very small image on the screen or need to use non-integer scaling, which has visual artifacts.

Regarding your question on filters and scandoubler fx: Filters work on the scaled image, the fx change the behaviour of the scandoubler.

As for recommendations: With a VGA CRT, using the scandoubler with 25% black lines looks very similar to a high-quality PWM monitor image. If you want to try more elaborate filters, disable the scandoubler and use a high resolution (like 1280×960) video mode with the vga_scaler active.
AmintaMister
Posts: 277
Joined: Thu Sep 16, 2021 10:54 pm
Has thanked: 720 times
Been thanked: 44 times

Re: Vga scaler and horizontal scanlines on CRT VGA PC monitor

Unread post by AmintaMister »

mapf wrote: Thu Oct 14, 2021 4:48 pm Scandoubler and vga_scaler are two functions that are independent. Scandoubling turns the 15kHz TV-compatible signal into a 31kHz VGA CRT-compatible signal. In order to use your monitor, scandoubling is sufficient.

The scaler works on the image produced by the core and scales it to fit into a fixed resolution. It is normally active on the HDMI output. The vga_scaler option activates it also on the analog output. I is an option when the scandoubled image cannot be displayed by your crt monitor, or when you want to play a "tate" mode arcade game on your horizontally oriented CRT.

Both functions can be active at the same time, but they interfere with each other. The scandoubler doubles the vertical resolution of the image, and depending on the input and output resolution, integer scaling might no longer be possible - then you either have a very small image on the screen or need to use non-integer scaling, which has visual artifacts.

Regarding your question on filters and scandoubler fx: Filters work on the scaled image, the fx change the behaviour of the scandoubler.

As for recommendations: With a VGA CRT, using the scandoubler with 25% black lines looks very similar to a high-quality PWM monitor image. If you want to try more elaborate filters, disable the scandoubler and use a high resolution (like 1280×960) video mode with the vga_scaler active.
THANKS for your explanation I'm beginning to understand, tough I have stil some questions:

1) so in the case of a VGA CRT Monitor like mine I MUST force scandoubler, isn't?

2) It would be a better option to use the Hdmi port so I don't need the scandoubler?

3) How can I choose the correct value for video_mode? Why for example 1280×960?

4) Why, if I use via_scaler=1 together to video_mode 1280×960 a core like C64 is very small and still I can't see horizontal scanlines tough I activate the appropriate filters?

5) What is the "best" video mode to use the A0486 core? IMPORTANT: in this case the only video_mode I can get a full screen of the PC core on my CRT VGA 17" is video_mode=6 (640x480@60), but why?! I had a PC in the mid '90s and I remember that resolutions like 1280x720@60 can be achieved as full screen and not "small" like on MISTer... Maybe is the vscale_mode=1 ?
FoxbatStargazer
Top Contributor
Posts: 994
Joined: Thu Dec 10, 2020 5:44 pm
Has thanked: 309 times
Been thanked: 228 times

Re: Vga scaler and horizontal scanlines on CRT VGA PC monitor

Unread post by FoxbatStargazer »

1) You must use scandoubler *IF* using "original" analog output (vga_scaler=0 on the VGA port, of direct_video=1 on an HDMI->VGA adapter.)

2) vga_scaler=1 will let you use the scaler on the VGA port, so you can turn scandoubler off. It will use whatever resolution in your video_mode.

3) Varies based on what your monitor can do. For horizontal scanline filters I would say you want at least a 3x vertical scale for them to be visible, and 4x delivers better quality. If you want absolute best results you can customize to an integer multiple for each core (example: 1280x89y for Genesis), or for a more generic pick you can use a "superwide" resolution (like 1920x976), with any kind of interpolation you won't notice horizontal scaling artifacts as you are probably pushing past your monitor's effective TVL. See note 5 about the aspect ratio though.

4) Don't know about C64 in particular but some NTSC cores draw around 244p instead of 240p. Sometimes there is some kind of border/cropping setting in the core menu's video settings that reduces this area to like 224p so it can scale better. If not something like 976p (244x4) might be a safer value for integer scaling. You can make your own resolutions with a custom video mode.

5) the scaler assumes you are using an LCD display with square pixels, so 1280x720 would be a 16:9 display, and default "normal" scaling uses black borders on the sides to have the active image be around 4:3. A CRT monitor compresses the pixel width to be 4:3 anyway so in these cases, in the core menu video options set aspect ratio to "full" or "wide" and it will effectively remove the side borders and the monitor will squish it to appear correct.

A simple setting for DOS is something like 1920x400, that gives you perfect 6x width for 320x200 games, and enough pixels so the 720x400 DOS text isn't garbled. Make sure refresh rate is set to be variable and vsync_adjust=1 or 2 though, because 400p typically won't show on a VGA monitor unless you are at least 70hz. If you are using WIndows I would try to match your video mode to the resolution you are emulating.
AmintaMister
Posts: 277
Joined: Thu Sep 16, 2021 10:54 pm
Has thanked: 720 times
Been thanked: 44 times

Re: Vga scaler and horizontal scanlines on CRT VGA PC monitor

Unread post by AmintaMister »

FoxbatStargazer wrote: Thu Oct 14, 2021 11:58 pm 1) You must use scandoubler *IF* using "original" analog output (vga_scaler=0 on the VGA port, of direct_video=1 on an HDMI->VGA adapter.)

2) vga_scaler=1 will let you use the scaler on the VGA port, so you can turn scandoubler off. It will use whatever resolution in your video_mode.

3) Varies based on what your monitor can do. For horizontal scanline filters I would say you want at least a 3x vertical scale for them to be visible, and 4x delivers better quality. If you want absolute best results you can customize to an integer multiple for each core (example: 1280x89y for Genesis), or for a more generic pick you can use a "superwide" resolution (like 1920x976), with any kind of interpolation you won't notice horizontal scaling artifacts as you are probably pushing past your monitor's effective TVL. See note 5 about the aspect ratio though.

4) Don't know about C64 in particular but some NTSC cores draw around 244p instead of 240p. Sometimes there is some kind of border/cropping setting in the core menu's video settings that reduces this area to like 224p so it can scale better. If not something like 976p (244x4) might be a safer value for integer scaling. You can make your own resolutions with a custom video mode.

5) the scaler assumes you are using an LCD display with square pixels, so 1280x720 would be a 16:9 display, and default "normal" scaling uses black borders on the sides to have the active image be around 4:3. A CRT monitor compresses the pixel width to be 4:3 anyway so in these cases, in the core menu video options set aspect ratio to "full" or "wide" and it will effectively remove the side borders and the monitor will squish it to appear correct.

A simple setting for DOS is something like 1920x400, that gives you perfect 6x width for 320x200 games, and enough pixels so the 720x400 DOS text isn't garbled. Make sure refresh rate is set to be variable and vsync_adjust=1 or 2 though, because 400p typically won't show on a VGA monitor unless you are at least 70hz. If you are using WIndows I would try to match your video mode to the resolution you are emulating.
Thanks! A last question: how you can predict the behaviour of a scaler if a core has not a fixed resolution?

I mean: in Amiga, for example, "the so-called Super Agnus display chip can drive screen modes varying from 320×200 pixels to 1280×512 pixels, with different frequency sync" (from Wikipedia).

So let that I choose 1280x1040@50 video_mode, that is very good scaling for 320x200; what if Amiga uses for some Game / App 1280×512 resolution? The same problem of "multi resolution" is shared, for example, by Commodore 64 and Snes (but even Dos can be 320x200 for old games and 800x600 for newer)....
FoxbatStargazer
Top Contributor
Posts: 994
Joined: Thu Dec 10, 2020 5:44 pm
Has thanked: 309 times
Been thanked: 228 times

Re: Vga scaler and horizontal scanlines on CRT VGA PC monitor

Unread post by FoxbatStargazer »

In all cases when using the scaler the output resolution is fixed according to your video mode. Resolutions may scale differently depending on your settings but it always ends up scaled to the same video mode. vsync_adjust=1 or 2 will allow the core to adjust the refresh rate but never the resolution. Only the "direct" analog output will spit out different resolutions, and specific modes like Amiga RTG or AO486 don't have real analog output and use the video_mode. If you can't find a scaled resolution that is a good compromise for all your original resolutions on a core, you can use the alternate ini system for fast switching.

One thing to keep in mind is that the scanline filters all do some blurring especially on the horizontal axis. So its not super critical to have the horizontal resolution be some exact integer scale, especially if you make it extra large like 1920. It is crucial when using the scanline filters to keep a vertical integer scale to avoid un-even scanlines, but vscale_mode=1 (or 2 if you must) takes care of that pretty well.
FoxbatStargazer
Top Contributor
Posts: 994
Joined: Thu Dec 10, 2020 5:44 pm
Has thanked: 309 times
Been thanked: 228 times

Re: Vga scaler and horizontal scanlines on CRT VGA PC monitor

Unread post by FoxbatStargazer »

I should also say you could probably just do boring old 1600x1200 on your monitor, then you never have to play with the aspect ratio and get a 5x vertical scale. Certainly the simplest fire-and-forget solution.
Post Reply