Page 1 of 1
100% scanlines?
Posted: Thu Feb 25, 2021 11:16 pm
by H6rdc0re
I was wondering why there is no option for 100% scanlines. Always use those on my OSSC and Analogue devices (Super NT and Mega SG). Looks absolutely wonderful. Any plans to introduce 100% scanlines?
Re: 100% scanlines?
Posted: Fri Feb 26, 2021 1:13 am
by FoxbatStargazer
Does 100% mean the same thing here versus those other products? I think on Mister 100% would mean a black screen.
Re: 100% scanlines?
Posted: Fri Feb 26, 2021 1:58 am
by SuperBabyHix
In the filters if you go to the misc folder there are the two scanline folders (sharp and soft). Within them you can find from 10% to 100% I believe.
Foxbat, on Mister it means the alternating scanlines themselves are 100% pure black.
Re: 100% scanlines?
Posted: Fri Feb 26, 2021 12:33 pm
by H6rdc0re
Yep I ment 100% black scanlines. This will get rid of the blockiness. I will look into the sharp and soft scanlines, thanks.
Re: 100% scanlines?
Posted: Fri Feb 26, 2021 2:09 pm
by ash2fpga
You can test out the polyphase filters with this app:
https://github.com/rikard-softgear/PolyphasePreviewer
Here are a couple examples of the 100% scanline filter (the regular one, not the "bright" or "soft" ones) - parts of the images, zoomed in 4x.
Test image that comes with the app.
- testimage_scanlines_100_4x.png (1.89 KiB) Viewed 12186 times
SF2 select screen.
- sf2select_scanlines_100_4x.png (6.67 KiB) Viewed 12186 times
Re: 100% scanlines?
Posted: Fri Feb 26, 2021 3:02 pm
by Dacaskos
That would be great since I can't make the Filters look good
I prefer using the doublescan FX feature... It gives exactly the same look as using native 224/240p resolution on 120hz in a PC/VGA Crt
But at 75% you can still see through the lines
- dBMqkGT.jpeg (186.39 KiB) Viewed 9596 times
- Ubdnfhp.jpeg (214.25 KiB) Viewed 9596 times
Top is 640x480 + Crt Doublescan FX
Bottom is native 224p resolution under a 120hz frequency (in order to display on 31khz)
Re: 100% scanlines?
Posted: Fri Feb 26, 2021 3:47 pm
by FoxbatStargazer
I see your point!
I'm guessing there is a technical reason since every single core maxes out at 75% for scandoubler but, maybe not?
(Also maybe a framedoubler for 31khz analog output would be an interesting alternative to scandoubler?)
Re: 100% scanlines?
Posted: Fri Feb 26, 2021 5:48 pm
by LamerDeluxe
Make sure you use integer vertical scaling for clean scan lines with the video filters. (vscale_mode=1 in mister.ini, or use a 5x scale option if a core has it).
Re: 100% scanlines?
Posted: Fri Feb 26, 2021 6:45 pm
by Dacaskos
I had so far terrible results using Vga_scale with a crt (even if it's the only way to get native resolution with double refresh rate, which still gives strobing and small scrolling hiccups (calculating the modeline "by hand")
I prefer disabling it and sticking to doublescan + scanline fx for now. At least it displays the native refresh rate of the core, no motion issues, Would be great if it had a option for crt users to use 120hz without much of hassle
A Black Frame Insertion option would be great too.
Re: 100% scanlines?
Posted: Sat Feb 27, 2021 7:53 pm
by H6rdc0re
I tried the scanline sharp and soft filters but both seem pretty blurry compared to regular 75% scanlines. Do these force interpolation? Running integer scaling on both axis you want to use the regular scanlines. Let’s hope these smart people developing will enable a 100% scanline filter without interpolation.
Re: 100% scanlines?
Posted: Sat Feb 27, 2021 11:19 pm
by ash2fpga
H6rdc0re wrote: ↑Sat Feb 27, 2021 7:53 pm
I tried the scanline sharp and soft filters but both seem pretty blurry compared to regular 75% scanlines. Do these force interpolation? Running integer scaling on both axis you want to use the regular scanlines. Let’s hope these smart people developing will enable a 100% scanline filter without interpolation.
From what I understand, Scandoubler FX and the polyphase filters work in different stages of the video pipeline.
My impression, in general, is Scandoubler FX results are sharper, and the polyphase filters are smoother.
I hope we get to see hybrid scanlines, à la ossc, eventually.
https://github.com/MiSTer-devel/Filters_MiSTer
Q: Doesn't MiSTer already have scanlines through the "Scandoubler FX" option in the OSD?
A: Yes, but the scanlines available with "Scandoubler FX" are aligned to the scandoubled image and the scanlines through the filter coefficients are aligned to the original pixels in the scanline. So you achieve better scanlines with filter coefficients in most cases.
https://github.com/MiSTer-devel/Templat ... /ascal.vhd
-- Upscaling : Nearest, Bilinear, Sharp Bilinear, Bicubic, Polyphase
Re: 100% scanlines?
Posted: Tue Mar 02, 2021 4:32 am
by FoxbatStargazer
Scandoubler FX apply to the analog output, which you can see directly if you are using a 31khz capable analog display, or you can look at the screenshots by Dackascos in this thread. Like the title suggests it literally takes the analog output and doubles the vertical resolution, one line at a time. The scandoubler scanlines just darken these extra lines (i.e. every other line), so you're going to get a fairly thick effect. This analog output is then scaled in the framebuffer and you can apply a scaling filter on top of it if you want. Vertical interpolation should somewhat smooth the scandoubler lines with the rest of the image because they are just being treated as part of analog output at that point.
A major advantage of using filter-based scanlines instead of scandoubler is that you can make them narrower than half a pixel of the original resolution. You can also apply other effects like interpolation or brightening. These effects will only show up on HDMI or vga_scaler output though, as they are applied to the framebuffer.
Re: 100% scanlines?
Posted: Wed Mar 03, 2021 4:08 pm
by Bahn Yuki
Dacaskos wrote: ↑Fri Feb 26, 2021 3:02 pm
That would be great since I can't make the Filters look good
I prefer using the doublescan FX feature... It gives exactly the same look as using native 224/240p resolution on 120hz in a PC/VGA Crt
But at 75% you can still see through the lines
Top is 640x480 + Crt Doublescan FX
Bottom is native 224p resolution under a 120hz frequency (in order to display on 31khz)
How did you get 240p@120hz out of Mister?
Re: 100% scanlines?
Posted: Wed Mar 03, 2021 4:22 pm
by FoxbatStargazer
vga_scaler lets you apply the video mode to analog output, and you can made custom video modes, see other thread on that topic.
Re: 100% scanlines?
Posted: Wed Mar 03, 2021 10:37 pm
by Dacaskos
Bahn Yuki wrote: ↑Wed Mar 03, 2021 4:08 pm
How did you get 240p@120hz out of Mister?
Like FoxbatStargazer said, by making modelines
This is the modeline I used for CPS1 (CPS 1 native vertical resolution is 224p)
video_mode=1920,48,192,240,224,3,10,7,69750
vsync_adjust=2
vga_scaler=1
forced_scandoubler=1
refresh_min=119
refresh_max=120
You can use this spreadsheet to help you.
http://ramos.elo.utfsm.cl/~elo212/docs/CVTd6r1.xls
The order is
Horizontal Resolution, Horizontal front porch, Horizontal Sync, Hor Back Porch, Vertical Resolution, V Front Porch, V Sync, V Back Porch, Actual Pixel Frequency (pixel clock)
Re: 100% scanlines?
Posted: Fri Mar 05, 2021 3:54 pm
by Bahn Yuki
https://youtu.be/HjTNmwl3jWM
I got it working. I'll look into the vsync adjust changes you have. What is your vscale set to? Also you're using 224 height?
Re: 100% scanlines?
Posted: Mon Mar 08, 2021 2:00 pm
by Dacaskos
Bahn Yuki wrote: ↑Fri Mar 05, 2021 3:54 pm
https://youtu.be/HjTNmwl3jWM
I got it working. I'll look into the vsync adjust changes you have. What is your vscale set to? Also you're using 224 height?
My vscale is set to 1
But it is pretty much it.
The only issue is it will display some minor strobing (scroll ghosting). Vga scale off + Scandouble fx 75% delivers pretty much the visual quality without it.
Re: 100% scanlines?
Posted: Mon Mar 08, 2021 4:08 pm
by Bahn Yuki
Dacaskos wrote: ↑Mon Mar 08, 2021 2:00 pm
Bahn Yuki wrote: ↑Fri Mar 05, 2021 3:54 pm
https://youtu.be/HjTNmwl3jWM
I got it working. I'll look into the vsync adjust changes you have. What is your vscale set to? Also you're using 224 height?
My vscale is set to 1
But it is pretty much it.
The only issue is it will display some minor strobing (scroll ghosting). Vga scale off + Scandouble fx 75% delivers pretty much the visual quality without it.
Unfortunately my monitor loses sync on cps1+2
Re: 100% scanlines?
Posted: Thu Mar 11, 2021 2:17 am
by Dacaskos
Bahn Yuki wrote: ↑Mon Mar 08, 2021 4:08 pm
Dacaskos wrote: ↑Mon Mar 08, 2021 2:00 pm
Bahn Yuki wrote: ↑Fri Mar 05, 2021 3:54 pm
https://youtu.be/HjTNmwl3jWM
I got it working. I'll look into the vsync adjust changes you have. What is your vscale set to? Also you're using 224 height?
My vscale is set to 1
But it is pretty much it.
The only issue is it will display some minor strobing (scroll ghosting). Vga scale off + Scandouble fx 75% delivers pretty much the visual quality without it.
Unfortunately my monitor loses sync on cps1+2
I don't remember if increasing or decreasing, but, try to mess around with horizontal porch or other values. I think decreasing a bit may work.
Re: 100% scanlines?
Posted: Thu Mar 11, 2021 3:12 am
by FoxbatStargazer
This looks kind of suspect actually. It might work for you but fail for others.
video_mode=1920,48,192,240,224,3,10,7,69750
vsync_adjust=2
vga_scaler=1
forced_scandoubler=1
refresh_min=119
refresh_max=120
Not sure it hurts but we don't want or need forced_scandoubler, we are aiming to output 240p after all. So set that to 0.
vsync_adjust=2 and refresh min/max 119/120 isn't doing what you probably expect. Basically its looking if the core output is between 119-120 hz. If not, then set vsync_adjust=0, therefore using the modeline for refresh rate. Since our core is never going to output 120hz its easier to remove these lines and just say vsync_adjust=0. (Yes this introduced a tiny bit of lag, but that's what we had using refresh min/max anyway!)
If you want to try alternative video mode, I use this site to generate timings:
https://tomverbeure.github.io/video_timings_calculator
Try the CVT timings for CRT monitors. The ones this site gives will be higher pixel clock and may sync better. Here's what 1920x240@120hz yields for a modeline:
video_mode=1920,48,192,240,240,3,10,8,74750
so here are suggested settings for 240p/120hz on VGA monitor:
video_mode=1920,48,192,240,240,3,10,8,74750
vsync_adjust=0
forced_scandoubler=0
vga_scaler=1
Once you get into the core set the aspect ratio to wide/full and probably scale filter to sharp interpolation. Also turn off any borders/overscan or else you'll probably need to raise the vertical resolution a little.
edit: holy cow do these settings look AMAZING on my lousy compaq! The whole image is bright and high-contrast, and the scanlines are thinner than I could ever get with scandoubler. Is this the PVM experience? I don't know how feasible it is but an analog framedoubler would absolutely rock VGA CRTs.
Re: 100% scanlines?
Posted: Mon Mar 15, 2021 8:34 pm
by Dacaskos
FoxbatStargazer wrote: ↑Thu Mar 11, 2021 3:12 am
This looks kind of suspect actually. It might work for you but fail for others.
video_mode=1920,48,192,240,224,3,10,7,69750
vsync_adjust=2
vga_scaler=1
forced_scandoubler=1
refresh_min=119
refresh_max=120
Not sure it hurts but we don't want or need forced_scandoubler, we are aiming to output 240p after all. So set that to 0.
vsync_adjust=2 and refresh min/max 119/120 isn't doing what you probably expect. Basically its looking if the core output is between 119-120 hz. If not, then set vsync_adjust=0, therefore using the modeline for refresh rate. Since our core is never going to output 120hz its easier to remove these lines and just say vsync_adjust=0. (Yes this introduced a tiny bit of lag, but that's what we had using refresh min/max anyway!)
If you want to try alternative video mode, I use this site to generate timings:
https://tomverbeure.github.io/video_timings_calculator
Try the CVT timings for CRT monitors. The ones this site gives will be higher pixel clock and may sync better. Here's what 1920x240@120hz yields for a modeline:
video_mode=1920,48,192,240,240,3,10,8,74750
so here are suggested settings for 240p/120hz on VGA monitor:
video_mode=1920,48,192,240,240,3,10,8,74750
vsync_adjust=0
forced_scandoubler=0
vga_scaler=1
Once you get into the core set the aspect ratio to wide/full and probably scale filter to sharp interpolation. Also turn off any borders/overscan or else you'll probably need to raise the vertical resolution a little.
edit: holy cow do these settings look AMAZING on my lousy compaq! The whole image is bright and high-contrast, and the scanlines are thinner than I could ever get with scandoubler. Is this the PVM experience? I don't know how feasible it is but an analog framedoubler would absolutely rock VGA CRTs.
Thanks for taking the time explaining the settings. I honestly think they seem kinda ambiguous for the more "layman" user
And yeah, sorry about the forced_scandoubler parameter. But I guess the vga scaler kinda overrides (if not it wouldnt work).
It looks good isn't it? That's way sharper than anything. Some people don't like because of that. To be honest I stll prefer default vga_scaler=0 + doublescan + CRT 75%. It doesn't have scroll strobing this way and is pretty much lagless as far as I know with vsync=2.
Re: 100% scanlines?
Posted: Tue Mar 16, 2021 2:17 am
by FoxbatStargazer
Speaking of settings not made clear: vsync_adjust only applies to scaler output. If vga_scaler=0 then the vga output is already lagless, your vsync_adjust setting won't matter!
Another note is that 244p is actually a safer resolution than 240p, that seems to be more like the actual usable NTSC range and it seems that even cores pushing borders respect it. For PAL you probably want 288p or even 290p unless you reduce the viewing window like on Minimig. I also found weird sync things if you try to raise the horizontal resolution much beyond 1920, but this may be a limitation of vga_scaler and work fine using an HDMI->VGA converter.
For my experience it more comes down to the CRT I picked up being pretty lousy. If I turn up the scanlines on analog output then the image darkens, and I have to turn up the brightness so high to see some games that black becomes grey. (Its unfortunate that there is no MiSTer adjustment for lowering gamma curve instead of raising it?) WIth 120hz output the brightness of the lines is much higher, seems nearly double. Still I find myself forced back to analog for the zero lag so I'm just getting by with 75% scanlines for now.
Re: 100% scanlines?
Posted: Tue Mar 16, 2021 10:36 am
by Aspie
When I see things like this:
video_mode=1920,48,192,240,240,3,10,8,74750
I am completely lost. I don't have a clue what any of the numbers mean. Are these settings for CRT?
Re: 100% scanlines?
Posted: Thu Mar 25, 2021 4:30 pm
by Newsdee
Aspie wrote: ↑Tue Mar 16, 2021 10:36 am
video_mode=1920,48,192,240,240,3,10,8,74750
I am completely lost. I don't have a clue what any of the numbers mean. Are these settings for CRT?
It's a custom resolution with a bunch of settings for signal timings.
That partucular one is for a CRT display. I'm not sure if it would work om 15khz (regular TV/PVM) or if it's for a PC/VGA monitor at 31khz.
Re: 100% scanlines?
Posted: Wed Apr 28, 2021 1:15 pm
by joolz
FoxbatStargazer wrote: ↑Tue Mar 16, 2021 2:17 am
Speaking of settings not made clear: vsync_adjust only applies to scaler output. If vga_scaler=0 then the vga output is already lagless, your vsync_adjust setting won't matter!
Another note is that 244p is actually a safer resolution than 240p, that seems to be more like the actual usable NTSC range and it seems that even cores pushing borders respect it. For PAL you probably want 288p or even 290p unless you reduce the viewing window like on Minimig. I also found weird sync things if you try to raise the horizontal resolution much beyond 1920, but this may be a limitation of vga_scaler and work fine using an HDMI->VGA converter.
For my experience it more comes down to the CRT I picked up being pretty lousy. If I turn up the scanlines on analog output then the image darkens, and I have to turn up the brightness so high to see some games that black becomes grey. (Its unfortunate that there is no MiSTer adjustment for lowering gamma curve instead of raising it?) WIth 120hz output the brightness of the lines is much higher, seems nearly double. Still I find myself forced back to analog for the zero lag so I'm just getting by with 75% scanlines for now.
Can you explain how a 244p or 240p scale can work for consoles that has a native resolution of 224p? I tried your vide_mode with 240p and although it looks amazing, the scaling is off, some lines does not look right. Look for example on the life multiplier in Super mario world:
- 20210428_151211.jpg (3.21 MiB) Viewed 10065 times
Re: 100% scanlines?
Posted: Thu Apr 29, 2021 2:57 am
by FoxbatStargazer
For vertical integer scaling, make sure vscale_mode=1 and forced_scandoubler=0 when using vga_scaler. Also in the core HUD settings make sure any scandoublerfx are off.
Re: 100% scanlines?
Posted: Thu Apr 29, 2021 9:00 am
by joolz
FoxbatStargazer wrote: ↑Thu Apr 29, 2021 2:57 am
For vertical integer scaling, make sure vscale_mode=1 and forced_scandoubler=0 when using vga_scaler. Also in the core HUD settings make sure any scandoublerfx are off.
Thanks, vscale_mode=1 did the trick. I also changed the refresh to 120.2 for perfect sync for SNES. My final config:
Code: Select all
[SNES]
video_mode=1920,56,192,248,240,1,3,14,74920 ; 1920x240@120.2Hz
vsync_adjust=0
forced_scandoubler=0
vga_scaler=1
vscale_mode=1
The picture looks fantastic, but I've still to decide if I can live with the 2 frames of lag or not.
Re: 100% scanlines?
Posted: Thu Apr 29, 2021 2:35 pm
by FoxbatStargazer
Well more like "1 frame" of 60hz since its happening at double speed right?
But yeah the lag is a bit of a bummer. Good tip on getting the exact refresh.
Still think vsync_adjust=3 where it's like vsync_adjust=1 but double the refresh would be super useful for this.