Page 1 of 1

Possible to emulate 15 kHz display on 31 kHz (480p) by using scanlines?

Posted: Mon Jun 07, 2021 1:40 pm
by sofakng
Is it possible to have a 31 kHz monitor emulate a 15 kHz display by injecting blank/scanlines?

I was watching a video from Bob at RetroRGB (https://www.youtube.com/watch?v=iLkN2AZLBMA) that showed a 31 kHz (480p) VGA monitor connected to an OSSC and by using the OSSC scanline feature he was able to have the 31 kHz monitor look identical to the 15 kHz display.

Can MiSTer do this? If so, are there optimal settings?

Re: Possible to emulate 15 kHz display on 31 kHz (480p) by using scanlines?

Posted: Mon Jun 07, 2021 2:19 pm
by mapf
MiSTer has the

Code: Select all

forced_scandoubler
parameter. When it is active, 15 kHz signals get line-doubled to 31 kHz. In the OSD you can then choose from 25%, 50% or 75% "blank" depending on your preference.

Re: Possible to emulate 15 kHz display on 31 kHz (480p) by using scanlines?

Posted: Mon Jun 07, 2021 3:04 pm
by akeley
Yes, but 15Khz CRTs weren't just about scanlines. It might look similar in a youtube video, but in reality image from most VGA monitors will look duller.

Re: Possible to emulate 15 kHz display on 31 kHz (480p) by using scanlines?

Posted: Mon Jun 07, 2021 10:52 pm
by thorr
Agreed. TV's are made for viewing across the room. Monitors sit in front of your face and are not as bright. Also CRT TV's tend to bloom much more than monitors which black scanlines alone won't replicate. With that being said, I like the idea of having a scan doubler option with black lines instead of duplicated lines.

Re: Possible to emulate 15 kHz display on 31 kHz (480p) by using scanlines?

Posted: Mon Jun 07, 2021 11:49 pm
by sofakng
Yeah I do understand a CRT monitor won’t be the same as a TV hopefully it’s still a good option.

Does 100% scan lines display the original 240p and then blank (black) lines where they would normally be?

Re: Possible to emulate 15 kHz display on 31 kHz (480p) by using scanlines?

Posted: Tue Jun 08, 2021 2:07 am
by FoxbatStargazer
Theoretically it would but there's no 100% framedoubler scanline option in any core at the moment, 75% is the max. Where that is basically 25% brightness on the doubled lines, so dark but not quite black.

For fun you can make a custom resolution for 240p/120hz with vysnc_adjust=0 and vga_scaler=1 (and forced_scandoubler=0), and it will display natural scanlines on your VGA CRT, though it will add a bit of lag.

Probably the more useful option is to use vga_scaler to go to 720p resolution or higher (and again turn off scandoubler) and use one of the scanline filters, just like you would on an HDMI display. This lets you use vsync_adjust=2 for minimal lag.

Re: Possible to emulate 15 kHz display on 31 kHz (480p) by using scanlines?

Posted: Tue Jun 08, 2021 1:45 pm
by ash2fpga
akeley wrote: Mon Jun 07, 2021 3:04 pm Yes, but 15Khz CRTs weren't just about scanlines. It might look similar in a youtube video, but in reality image from most VGA monitors will look duller.
Wishful thinking, but I would love to see a low lag external shader video processor.

Megathread on libretro showing what shaders can do:
https://forums.libretro.com/t/please-sh ... n-do/19193

Re: Possible to emulate 15 kHz display on 31 kHz (480p) by using scanlines?

Posted: Tue Jun 08, 2021 2:42 pm
by rcade
It doesn't look the same. 15KHz machines output the 60Hz picture twice on the same scanlines instead of every other line, which makes it brighter.

A VGA monitor won't do that, you just get one scanline and then a black one. It's darker... like all fake scanline options.

Maybe you can adjust the brightness way up to compensate.

Re: Possible to emulate 15 kHz display on 31 kHz (480p) by using scanlines?

Posted: Sat Jun 12, 2021 7:03 pm
by Sepheriel
I've implemented 100% scanlines in the NES Core (i just hardcoded it into "scanlines.v" to rapidly see the results) to test it out on a Sony CPD-420GS and it's looking great. The brightness could easily be compensated within the monitors settings.

NES Core 75% Scanlines
IMG_20210612_191943.jpg
IMG_20210612_191943.jpg (7.65 MiB) Viewed 6078 times
NES Core 100% Scanlines
IMG_20210612_191843.jpg
IMG_20210612_191843.jpg (4.18 MiB) Viewed 6078 times
It would be awesome to have it as an option without the need to patch it manually :/

Re: Possible to emulate 15 kHz display on 31 kHz (480p) by using scanlines?

Posted: Sun Jun 13, 2021 12:50 am
by sofakng
Could you upload your modified core so I can give it a test?

Re: Possible to emulate 15 kHz display on 31 kHz (480p) by using scanlines?

Posted: Sun Jun 13, 2021 9:53 am
by Sepheriel
My settings are "forced_scandoubler=1" and i've connected my VGA monitor to my MiSTer I/O Board.

You'll have to set the "scandoubler fx" to 75% in the modified cores settings. This will enable 100% Scanlines in the modified cores despite the wrong labelling.

I've also made two more pictures, as the previous ones weren't that good to show the differences

SNES core 75%
IMG_20210613_113809[1].jpg
IMG_20210613_113809[1].jpg (3.42 MiB) Viewed 6020 times
SNES core 100%
IMG_20210613_113712[1].jpg
IMG_20210613_113712[1].jpg (3.45 MiB) Viewed 6020 times

Re: Possible to emulate 15 kHz display on 31 kHz (480p) by using scanlines?

Posted: Sun Jun 13, 2021 3:36 pm
by Sepheriel
Seems my post was moderated and the links to the cores were deleted without a notification or edit message from the mod. I suppose links to external file service are not allowed?

Re: Possible to emulate 15 kHz display on 31 kHz (480p) by using scanlines?

Posted: Sun Jun 13, 2021 4:03 pm
by Sepheriel
I zipped the modified NES and SNES cores and attached the archive to this post :)

Re: Possible to emulate 15 kHz display on 31 kHz (480p) by using scanlines?

Posted: Tue Jun 15, 2021 1:39 pm
by FoxbatStargazer
I figured there was some technical reason for no 100% scanlines in official, but here it is working. Would love to hear an explanation why this wasn't implemented sooner.

Re: Possible to emulate 15 kHz display on 31 kHz (480p) by using scanlines?

Posted: Tue Jun 15, 2021 6:07 pm
by Sepheriel
I think it was simply not thought about that use case. The MiSTer plattforms main focus is to bring old systems to modern hardware (modern Displays, USB Input etc ) and with the I/O boards purists can even use "original" periphery (PAL/NTSC CRT TV etc.). The target audience for this specific use case is small and from that small group only a bunch will even notice or care about the emulation of 240p scanlines on VGA CRTs and that emulation also has negative side effects like reduced brightness (halved).

But it would certainly be nice for that small group to have the option :D

Also, my "implementation" is rather a quick hack and was only tested on my CRT :)

Re: Possible to emulate 15 kHz display on 31 kHz (480p) by using scanlines?

Posted: Tue Jun 15, 2021 7:08 pm
by FoxbatStargazer
Well no you probably just answered it. The scandoubler options were probably created for 15+31khz PVMs (which would just cycle to scandoubler off for genuine 240p), and not the far more common/cheaper VGA monitors. (Why are they the "niche" choice?)