VGA Output, Scalers, and CRTs

d909
Posts: 35
Joined: Sat Sep 12, 2020 3:21 am
Has thanked: 1 time
Been thanked: 10 times

Re: VGA Output, Scalers, and CRTs

Unread post by d909 »

Televicious wrote: Tue Sep 15, 2020 8:08 pm So I tried the 4x mode and set vsync to 60 instead of variable and now DOS games do work unscaled. Windows 3.1 however is still broken like this.
Oh, it never occurred to me to mess with that setting. I set it to variable, and it still works for me. But now at 31khz / 70hz, where its supposed to be! This seems to have largely if not entirely fixed my stuttering.
thorr
Top Contributor
Posts: 1101
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 537 times
Been thanked: 252 times

Re: VGA Output, Scalers, and CRTs

Unread post by thorr »

Televicious wrote: Tue Sep 15, 2020 6:45 pm
thorr wrote: Tue Sep 15, 2020 4:37 am My CRT has been getting less and less reliable and finally won't show a picture anymore unfortunately. As a replacement, I have a 1280x1024 Dell flatscreen LCD monitor that has a VGA input. I have been playing with the settings and I got it to look like a real DOS machine. This might help those who still have working CRT monitors that want it to appear genuine even though it is scaling it. Here are the relevant Mister.INI settings:
vga_scaler=0 <-- Should be 1
forced_scandoubler=1
direct_video=0
video_mode=4 <-- For CRT, I would suggest a 4:3 mode like video_mode=1 or a custom resolution of 1600x1200: video_mode=1600,64,192,304,1200,1,3,46
vscale_mode=0
fb_size=0
fb_terminal=1
vsync_adjust=1 (or 2 if it works - mine does)

And the trick that makes it look perfect is to set the Scale Filter to Custom and Scanlines (Soft).txt from within the Core on the System page of the menu. When launching Monkey Island 2, it looked a little soft/blurry, and I changed it to Scanlines (Sharp).txt and it looked pretty good. I went back to DOS and it still looked pretty good. So, I will keep it at Sharp. Edit: play with all the filters, there are some nice ones in there. Bottom line, using these custom scale filters fixes the wonky looking scaling especially with DOS text. My new favorite is Normal Upscaling - bilinearsharp_08. It looks great for games and text.

Hope this helps.
Video_mode is the scaled resolution though. When vga_scaler is 0 that video mode is bypassed and the core is displaying a raw video signal. I have all the same settings except forced scandoubler which I've tried with and without and it makes no difference. You can boot up in DOS terminal just fine like that screenshot shows, but as soon as Windows 3.11 or a game is executed the resolution changes and the screen is a static corrupted mess. This is on any VGA monitor CRT or LCD.
Yeah, I forgot about that. Remember I am on an LCD now because my CRT died, so that vga_scaler setting is most likely not used in my case. It should be vga_scaler=1. I will go back and edit my post. The idea is to set it to one resolution and everything scales to that. Using the Scale Filter is what makes it look good instead of crappy. I know this is not what we ultimately want since CRT monitors should be able to display all the resolutions, but since it doesn't work with ao486, this is the next best thing in my opinion and it looks pretty good at least on my LCD. Wish I could try it on my CRT. Let me know how it goes...
Televicious
Posts: 93
Joined: Mon May 25, 2020 8:23 pm
Been thanked: 4 times

Re: VGA Output, Scalers, and CRTs

Unread post by Televicious »

Yea, still has some bugs. Any higher res dos games or windows 3.1 are still broken. Willy beamish is working great though. I just assumed the 4x didn't work for dos games as win 3.11 wasn't being affected. Games with trouble would be oregon trail deluxe, duke nukem in vesa modes, SC2000. pretty much anything that is actual 640x480 and higher.
HMPoweredMan
Posts: 38
Joined: Fri Sep 11, 2020 7:37 pm
Been thanked: 2 times

Re: VGA Output, Scalers, and CRTs

Unread post by HMPoweredMan »

640x400 also doesnt work, but this is great so far. I'm using all your settings. vga_scaler is 0.

I too have the jittering though. Also strangely everything was tinted very green. Luckily I can compensate mostly with monitor settings for now.

If I could get rid of the jittering I'd be totally satisfied for now. All things considered it is WAY better than going through the scaler. It feels more responsive as well.
HMPoweredMan
Posts: 38
Joined: Fri Sep 11, 2020 7:37 pm
Been thanked: 2 times

Re: VGA Output, Scalers, and CRTs

Unread post by HMPoweredMan »

Turns out the green tint was due to the sync on green switch on the IO board. With that off, everything is great.

vga_scaler 0 is all I have set but in the core menu I do have the 4x option. Not sure if that's the cause of jittering or my monitor. I suspect the former.
A00D5569-0C5D-4377-A05E-A1C65DFCAF9D.jpeg
A00D5569-0C5D-4377-A05E-A1C65DFCAF9D.jpeg (452.71 KiB) Viewed 9248 times
User avatar
bootsector
Posts: 162
Joined: Sun May 24, 2020 6:58 pm
Has thanked: 4 times
Been thanked: 30 times

Re: VGA Output, Scalers, and CRTs

Unread post by bootsector »

Looking forward to native VGA output through IO board VGA connection on this core! It doesn't make sense to use scaler through VGA and the results are sub-optmal here with my CRT VGA monitor.
HMPoweredMan
Posts: 38
Joined: Fri Sep 11, 2020 7:37 pm
Been thanked: 2 times

Re: VGA Output, Scalers, and CRTs

Unread post by HMPoweredMan »

I don't think Sorgelig has plans to. Without understanding the technical hurdles I hope he reconsiders. This is an open source project though so maybe someone else can step in here since he's focusing on other great stuff like cd rom drive implementation.

https://github.com/MiSTer-devel/ao486_MiSTer/issues/6
User avatar
bootsector
Posts: 162
Joined: Sun May 24, 2020 6:58 pm
Has thanked: 4 times
Been thanked: 30 times

Re: VGA Output, Scalers, and CRTs

Unread post by bootsector »

HMPoweredMan wrote: Mon Sep 28, 2020 9:43 pm I don't think Sorgelig has plans to. Without understanding the technical hurdles I hope he reconsiders. This is an open source project though so maybe someone else can step in here since he's focusing on other great stuff like cd rom drive implementation.

https://github.com/MiSTer-devel/ao486_MiSTer/issues/6
Sorg is for sure not against implementing native VGA output via IO board. It's not just on his priority list. But if any FPGA developer comes up with a good solution for that, I'm pretty sure it will be merged in. I can't wait to enjoy native VGA outpur on my CRT monitor! :mrgreen:
HMPoweredMan
Posts: 38
Joined: Fri Sep 11, 2020 7:37 pm
Been thanked: 2 times

Re: VGA Output, Scalers, and CRTs

Unread post by HMPoweredMan »

You can have native resolutions for the most part.

While using VGA scaler set the video to 4x and the sync to variable. Save those settings to the default in the menu.

Now go to ini settings and set vga_scaler to 0

It works in most cases for me but because of the hsysnc it's a bit jittery but still far better than the janky scaler.

Need those chunky scanlines!
akeley
Top Contributor
Posts: 1303
Joined: Mon May 25, 2020 7:54 pm
Has thanked: 416 times
Been thanked: 399 times

Re: VGA Output, Scalers, and CRTs

Unread post by akeley »

bootsector wrote: Wed Sep 30, 2020 8:44 am Sorg is for sure not against implementing native VGA output via IO board. It's not just on his priority list. But if any FPGA developer comes up with a good solution for that, I'm pretty sure it will be merged in. I can't wait to enjoy native VGA outpur on my CRT monitor! :mrgreen:
For me it's still unclear if he's just not interested (which is understandable) or it just can't be done because of a technical issue.

I hope for the latter and that it will be eventually resolved. If it was it'd be my most used core, because maintaining an old PC with all the necessary slowdown shenanigans is a bit of a pain. Sometimes I wish there was a bounty list somewhere...
User avatar
bootsector
Posts: 162
Joined: Sun May 24, 2020 6:58 pm
Has thanked: 4 times
Been thanked: 30 times

Re: VGA Output, Scalers, and CRTs

Unread post by bootsector »

HMPoweredMan wrote: Wed Sep 30, 2020 1:35 pm You can have native resolutions for the most part.

While using VGA scaler set the video to 4x and the sync to variable. Save those settings to the default in the menu.

Now go to ini settings and set vga_scaler to 0

It works in most cases for me but because of the hsysnc it's a bit jittery but still far better than the janky scaler.

Need those chunky scanlines!
You're right! Aside of the jitter, it's pretty decent already! Hope this gets improved! Thanks for the tip!
thorr
Top Contributor
Posts: 1101
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 537 times
Been thanked: 252 times

Re: VGA Output, Scalers, and CRTs

Unread post by thorr »

I think I may have found a solution. My CRT monitor is currently not working so I can't confirm 100% but it is working on my VGA connected flat panel monitor. I am able to have native resolutions without jitter or sync problems and it looks correct to my eyes. I am not using the scaler.

The trick is to set direct_video=0 for the ao486 core and don't turn on the scaler.

(main top section of Mister.ini)
vga_scaler=0
direct_video=1

[ao486]
direct_video=0

I can set Low-Res to Native and it works. On 4x the picture is sharper looking. On Native it looks more analog. Again this is on my flat panel. Somebody please try it on their CRT and confirm that it works and that you can display different resolutions. All I know is when I launch different games, I have to auto-adjust my monitor to get it to line up which leads me to believe that is changing resolutions. I have black bars on the top and bottom of my 5:4 display as I should with 4:3 resolutions.

Admittedly I am not exactly sure what direct_video is doing when using a VGA adapter, but I think and hope this will work for CRT users. I am planning to try to fix my CRT monitor. I think the flyback transformer needs replacing and I am hoping I can use any pin compatible one I find on ebay. I don't know if it needs to be specifically made for my monitor or not.
HMPoweredMan
Posts: 38
Joined: Fri Sep 11, 2020 7:37 pm
Been thanked: 2 times

Re: VGA Output, Scalers, and CRTs

Unread post by HMPoweredMan »

direct_video = 0 is my default option.
Your LCD monitor can probably just handle the off-spec hsync without jitter. I assume it has display lag and has some sort of internal analog to digital conversion that corrects it.
thorr
Top Contributor
Posts: 1101
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 537 times
Been thanked: 252 times

Re: VGA Output, Scalers, and CRTs

Unread post by thorr »

Thanks for trying. Normally with a CRT you want direct_video=1 so you get the native timings. direct_video=0 re-times the signal a bit but seems to keep the same resolution (I assume). This could add a little lag, not sure. One thing I noticed is that Donkey Kong the arcade game is rotated as it should be with direct_video=0 and not with 1. Perhaps this has to do with my fb settings since a whole frame would have to be drawn in order to know how to rotate it to be upright. Maybe my settings are different than yours.

Here are my main defaults:
forced_scandoubler=1 ; set to 1 to run scandoubler on VGA output always (depends on core).
ypbpr=0 ; set to 1 for YPbPr on VGA output.
composite_sync=1 ; set to 1 for composite sync on HSync signal of VGA output.
vga_scaler=0 ; set to 1 to connect VGA to scaler output.
hdmi_limited=2 ; 1 - use limited (16..235) color range over HDMI
; 2 - use limited (16..255) color range over HDMI, for VGA converters.
direct_video=1 ; 1 - enable core video timing over HDMI, use only with VGA converters.
fb_size=0 ; 0 - automatic, 1 - full size, 2 - 1/2 of resolution, 4 - 1/4 of resolution.
fb_terminal=1 ; 1 - enabled (default), 0 - disabled
video_mode=4 ; 1280x1024x60
vsync_adjust=2 ; Set to 2 for low latency mode (single buffer).

[ao486]
direct_video=0

Edit: to be clear, I am using the HDMI output with a VGA converter, not the Analog VGA IO board.
Televicious
Posts: 93
Joined: Mon May 25, 2020 8:23 pm
Been thanked: 4 times

Re: VGA Output, Scalers, and CRTs

Unread post by Televicious »

Is it working with windows 3.11 or oregon trail deluxe?
Post Reply