VGA Output, Scalers, and CRTs

deepthaw
Posts: 65
Joined: Wed May 27, 2020 3:45 am
Has thanked: 1 time
Been thanked: 13 times

Re: VGA Output, Scalers, and CRTs

Unread post by deepthaw »

320x200 and 320x240 were upscaled to 640x400 and 640x480 respectively on real hardware.
User avatar
Caldor
Top Contributor
Posts: 930
Joined: Sat Jul 25, 2020 11:20 am
Has thanked: 112 times
Been thanked: 111 times

Re: VGA Output, Scalers, and CRTs

Unread post by Caldor »

deepthaw wrote: Thu Aug 27, 2020 7:42 pm 320x200 and 320x240 were upscaled to 640x400 and 640x480 respectively on real hardware.
That would make a lot of sense.
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 »

akeley wrote: Thu Aug 27, 2020 6:29 pm I have a few VGA monitors, mostly newer 17" ones. The one I've tried with MiSTer is SyncMaster 793df.

What mister.ini settings are you using for non-scaled VGA? I'd like to try it myself..

Overall, I have a bit of an OCD when it comes to displays, so will stick with my DOS PC for now. Hopefully one day there will be solution for this core too, stranger things have happened :)
Well, you can set vga_scaler = 0 which I did or if you have an hdmi to vga you can set direct_video = 1 and that will also bypass the scaler on the hdmi output. For that syncmaster I would just set the scaler vid mode to 4 though and leave the scaler on. That's what I use on my Dell and the only way to get full functionality. Some modes will look chunky, but anything in the 640 range will look perfect. Or since it's a CRT you could just set it to 640x480. Games will look good in that. I agree though, it's not a full replacement for a DOS PC. I'll keep my P3 voodoo2 sli rig forever. It is fun though and with the speed scaling pretty legit for running older titles as intended. It plays Duke3D better than my voodoo2 p3 does for some reason. Probably because my on board vid card sucks.
ash2fpga
Posts: 237
Joined: Tue May 26, 2020 6:20 pm
Has thanked: 62 times
Been thanked: 28 times

Re: VGA Output, Scalers, and CRTs

Unread post by ash2fpga »

Televicious wrote: Fri Aug 28, 2020 7:57 am Or since it's a CRT you could just set it to 640x480. Games will look good in that.
I would have to differ in opinion on that. Any 320x200 content (or any hi-res EGA content) stretched to 480p :cry:. At least any strictly 2D content. Doom, etc. may not be so bad, apart from the HUD.

I am hoping we can get a solution, at least with multiple definable/mappable resolutions, if not true generic multi-resolution ("multisync") output, at some point. Switching alt_X ini files will probably have to do for the moment. Too bad it resets the core (understandably).
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, you're right, it's just not right forcing all resolutions into the scaler. It looks so good and clean unscaled until you try to swtch resolution.
akeley
Top Contributor
Posts: 1441
Joined: Mon May 25, 2020 7:54 pm
Has thanked: 496 times
Been thanked: 467 times

Re: VGA Output, Scalers, and CRTs

Unread post by akeley »

I still don't really know what settings should I use.

When I set direct_video and vga_scaler & scandoubler to 0, I get small, centered image. With direct_video & scandoubler =1 image is good on most cores, but ao486 causes my monitor to lose sync, there is no image. This core only works on direct_video=0 - but then image is squashed vertically. I need to use 16:9 to stretch it. And there are artifacts, the letters all look different. I'd appreciate if somebody could either post their config or tell me exactly which settings need changing.

In any case I'd be careful with using terms as looks perfect/good/great for games etc, unless the IQ really is 1:1 - because it implies that there is no problem, and thus lowers the likeness of somebody coming up with a solution or fix.

CRT SCR$ Project - building a collection of high-quality photos of CRT displays
CRT ART Books - retro-gaming books with authentic CRT photos

thorr
Top Contributor
Posts: 1311
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 634 times
Been thanked: 308 times

Re: VGA Output, Scalers, and CRTs

Unread post by thorr »

I still primarily use Cache 43 because it works for most things without using the scaler.
bertnorg
Posts: 22
Joined: Sun Jul 12, 2020 8:58 am
Been thanked: 1 time

Re: VGA Output, Scalers, and CRTs

Unread post by bertnorg »

yes i'm also switching between Cache 43 and the present core, even the 100 mhz works in Cache 43 perfectly.
d909
Posts: 37
Joined: Sat Sep 12, 2020 3:21 am
Has thanked: 1 time
Been thanked: 13 times

Re: VGA Output, Scalers, and CRTs

Unread post by d909 »

I have a Microvitec Desk Scan 1501 (15VD4DLS2), which syncs to everything between 15 and 64khz, and it works with this core without the scaler turned on. I do have to set Low-Res to 4x in the MiSTer menus or games lose sync for some unknown and probably bugged reason, but once that's set everything seems to look correct. No scaling artifacts and beautiful DOS text. The core sends a 26.8 khz signal in DOS, which is likely why 31khz monitors aren't syncing to it.
Too bad my Microvitec is in such poor shape, with convergence and burn in issues. They're really hard to find.
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 »

Hey there I'm new here but find this topic to be of high importance to me.
All I/O interfaces should be as true to original hardware as possible.

If I'm understanding this thread correctly there is no way to get the resolutions to display correctly without integer scaling in the VGA output? So everything output must be scaled to the native resolution of the CRT monitor? In my case that would be 1280 x 1024 at 85 Hz (monitor still in the mail)

What would a 320x200 game look like on this 1280x1024 monitor with integer scaling?
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 »

It's not integer scaling specific, that is a specific type of scaling that will shrink down to 1:1 or 1:x resolution displayed, that might make the image look better, though shrunk. the core only fully functions when video is output through the general scaler at a fixed resolution. It's not really and Interface IO issue, it's that the MiSTer video output isn't made to handle the various sync modes of VGA without the use of the scaler. It will start up fine, but when it switches to a new sync it comes out all glitched.
low res 4x mode does nothing on native vga output. My CRT does 15khz and 31khz as well and the output is broken when res changes still. It's not a monitor specific thing either. It's definitely a shortcoming of the core or possibly the main firmware that is unable to handle the various resolutions. Seems like there should be a fix since minimig and ST and archie all handle resolution changes on unscaled output fine. Just not on ao486 yet. The scaler does look pretty crap.
deepthaw
Posts: 65
Joined: Wed May 27, 2020 3:45 am
Has thanked: 1 time
Been thanked: 13 times

Re: VGA Output, Scalers, and CRTs

Unread post by deepthaw »

HMPoweredMan wrote: Sat Sep 12, 2020 12:29 pm Hey there I'm new here but find this topic to be of high importance to me.
All I/O interfaces should be as true to original hardware as possible.

If I'm understanding this thread correctly there is no way to get the resolutions to display correctly without integer scaling in the VGA output? So everything output must be scaled to the native resolution of the CRT monitor? In my case that would be 1280 x 1024 at 85 Hz (monitor still in the mail)

What would a 320x200 game look like on this 1280x1024 monitor with integer scaling?
CRT monitors do not have a native resolution. The resolution you have listed it is it’s advertised maximum. It can display 320x200 and everything else fine natively.

The issue is that the core does not send the original video signal, and you have to use a scaler. So if you use a scaler outputting 640x480, the monitor will switch to 640x480 and the 320x200 output will be scaled to fit - which can lead to distortion.

What I’ve found is that even when the scaler should be a perfect integer scale of the intended resolution, the scaler is producing artifacts. Plus, DOS games run at a variety of resolutions, so it’s difficult to pick a “best” scaler resolution.

In previous versions of the core you could disable the scaler and it would output the native signal, albeit poorly (the higher the speed you set the core at, the better the image was.) This no longer seems to work, and it probably was never intended to.
d909
Posts: 37
Joined: Sat Sep 12, 2020 3:21 am
Has thanked: 1 time
Been thanked: 13 times

Re: VGA Output, Scalers, and CRTs

Unread post by d909 »

Televicious wrote: Sat Sep 12, 2020 6:15 pm It's not integer scaling specific, that is a specific type of scaling that will shrink down to 1:1 or 1:x resolution displayed, that might make the image look better, though shrunk. the core only fully functions when video is output through the general scaler at a fixed resolution. It's not really and Interface IO issue, it's that the MiSTer video output isn't made to handle the various sync modes of VGA without the use of the scaler. It will start up fine, but when it switches to a new sync it comes out all glitched.
low res 4x mode does nothing on native vga output. My CRT does 15khz and 31khz as well and the output is broken when res changes still. It's not a monitor specific thing either. It's definitely a shortcoming of the core or possibly the main firmware that is unable to handle the various resolutions. Seems like there should be a fix since minimig and ST and archie all handle resolution changes on unscaled output fine. Just not on ao486 yet. The scaler does look pretty crap.
My personal experience says that if your monitor supported 26.8khz, you'd have a lot more luck.
Pretty sure 26.8khz is not an appropriate scan rate for VGA, but that's what the MiSTer outputs with the scaler off, and it does in fact look fine on a monitor that can sync to it.
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 »

It's not going out of sync when the res changes. If it was going out of sync there would be a complete image cut in half or 8ths and there would be scrolling or jittering. It is displaying a mostly black static screen with some scattered yellow blobs. It's not the fault of the monitor. It's an A1962. My dell 19" does the same thing. I don't think you actually have the scaler disabled or direct video turned on if it's working for you.
d909
Posts: 37
Joined: Sat Sep 12, 2020 3:21 am
Has thanked: 1 time
Been thanked: 13 times

Re: VGA Output, Scalers, and CRTs

Unread post by d909 »

Well, I have vga_scaler=0 set in my MiSTer.ini. I do have direct_video off (0), but I'm using the VGA port on the I/O board, not the hdmi port, and the direct_video setting is supposed to be for HDMI?
vga_scaler=0 and forced_scandoubler=0 as well.
At any rate, my monitor is reporting 26.94 khz right now, and it looks like this:
IMG_0115.jpeg
IMG_0115.jpeg (2.76 MiB) Viewed 12947 times
(https://imgur.com/a/2WsrvLy)
This is a very atypical, industrial monitor. I don't think most monitors can do this really odd frequency?
deepthaw
Posts: 65
Joined: Wed May 27, 2020 3:45 am
Has thanked: 1 time
Been thanked: 13 times

Re: VGA Output, Scalers, and CRTs

Unread post by deepthaw »

If my numbers are right, that’s 640x400 @ 60Hz, which is definitely not vga standard.
d909
Posts: 37
Joined: Sat Sep 12, 2020 3:21 am
Has thanked: 1 time
Been thanked: 13 times

Re: VGA Output, Scalers, and CRTs

Unread post by d909 »

deepthaw wrote: Tue Sep 15, 2020 3:09 am If my numbers are right, that’s 640x400 @ 60Hz, which is definitely not vga standard.
If that's the case, then I'd expect when I run a game the MiSTer tries to output a native 320x200 signal which is below the monitor's minimum 15khz, which is why I need to set Low-Res to 4x in the menus. This brings it up to the same 640x400 which my monitor is able to display.
thorr
Top Contributor
Posts: 1311
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 634 times
Been thanked: 308 times

Re: VGA Output, Scalers, and CRTs

Unread post by thorr »

640x400 was a very common resolution back then.
thorr
Top Contributor
Posts: 1311
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 634 times
Been thanked: 308 times

Re: VGA Output, Scalers, and CRTs

Unread post by thorr »

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=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.
deepthaw
Posts: 65
Joined: Wed May 27, 2020 3:45 am
Has thanked: 1 time
Been thanked: 13 times

Re: VGA Output, Scalers, and CRTs

Unread post by deepthaw »

thorr wrote: Tue Sep 15, 2020 4:31 am 640x400 was a very common resolution back then.
It was, but at 70Hz, not 60Hz. 60Hz drops the horizontal refresh to below 31Khz.
deepthaw
Posts: 65
Joined: Wed May 27, 2020 3:45 am
Has thanked: 1 time
Been thanked: 13 times

Re: VGA Output, Scalers, and CRTs

Unread post by deepthaw »

d909 wrote: Tue Sep 15, 2020 3:17 am
deepthaw wrote: Tue Sep 15, 2020 3:09 am If my numbers are right, that’s 640x400 @ 60Hz, which is definitely not vga standard.
If that's the case, then I'd expect when I run a game the MiSTer tries to output a native 320x200 signal which is below the monitor's minimum 15khz, which is why I need to set Low-Res to 4x in the menus. This brings it up to the same 640x400 which my monitor is able to display.
VGA 320x200 was actually output as 640x400. The VGA card would doublescan the signal when sending it to the monitor. Same for 640x480/320x240.
d909
Posts: 37
Joined: Sat Sep 12, 2020 3:21 am
Has thanked: 1 time
Been thanked: 13 times

Re: VGA Output, Scalers, and CRTs

Unread post by d909 »

deepthaw wrote: Tue Sep 15, 2020 4:34 pm
thorr wrote: Tue Sep 15, 2020 4:31 am 640x400 was a very common resolution back then.
It was, but at 70Hz, not 60Hz. 60Hz drops the horizontal refresh to below 31Khz.
And that explains the mild stuttering I see.
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 »

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
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.
d909
Posts: 37
Joined: Sat Sep 12, 2020 3:21 am
Has thanked: 1 time
Been thanked: 13 times

Re: VGA Output, Scalers, and CRTs

Unread post by d909 »

Televicious wrote: Tue Sep 15, 2020 6:45 pm 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.
Did you set Low-Res to 4x in the ao486 menus (not the ini)? I needed to do that to make games work - though it was a sync problem, and not what you describe.

I haven't tried windows 3.11 - only Windows 95. Windows 95 works fine in 16 color mode, but I get a "static corrupted mess" if I set the color depth any higher. I understand this to be because I haven't installed the video driver.
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, tried with 4x mode, no difference. I guess in Windows 95 the video drivers must work for DOS mode? In plain DOS 6.22 resolution changes corrupt the screen. Also, in win 3.1 or 3.11 the video drivers don't really display up to spec, 640x480 can do 32 million colors, but 1024x768 is only 256 and 1280x1024 is either 16 color or doesn't work, I forget. I found the best mode for function is just 640x480 in the scaler. Everything works and most application and windows looks ok, but anything that doesn't scale well into that is super chunky looking. I'm primarily just trying to output on the CRT which is an OG VGA monitor that does 15k and 31k because it was made for use with Amiga 2000, but use the DELL LCD for testing. With that alone I used scaled 1280x1024. I'll upload a shot of what the screen turns to when res changes on unscaled mode.
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 »

20200915_133700.jpg
20200915_133700.jpg (4.3 MiB) Viewed 13274 times
I have the dell on scaled vid mode 4 and the crt on unscaled vga. If I run the dell unscaled it displays the same image.
d909
Posts: 37
Joined: Sat Sep 12, 2020 3:21 am
Has thanked: 1 time
Been thanked: 13 times

Re: VGA Output, Scalers, and CRTs

Unread post by d909 »

I am running Windows 95 - in other words, DOS 7.0. I did not install any video drivers. It doesn't seem likely that dos 7 vs 6.22 would be the problem, but it is a difference worth investigating perhaps? I know those Amiga monitors can do 15khz and 31khz, but are you absolutely certain they do 27khz? I have a couple sony pro monitors that also do 15 and 31 khz, but nothing in between. I WOULD expect the image to move around a bunch if it was a sync problem though.
d909
Posts: 37
Joined: Sat Sep 12, 2020 3:21 am
Has thanked: 1 time
Been thanked: 13 times

Re: VGA Output, Scalers, and CRTs

Unread post by d909 »

It seems worth noting that when I try to run win 95 in 256 or higher color mode, the corruption I get, which is vaguely similar to yours, only appears from the VGA port and not through the scaled HDMI... Similar to what you describe. So I guess definitely try win 95?

Edit: I tried DOS 6.22. Games still work. Guess that isn't it.
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 »

So I tried the 4x mode and set vsync to 60 instead of variable and now low res DOS games do work unscaled. Windows 3.1 and oregon trail deluxe however are still broken like this.
d909
Posts: 37
Joined: Sat Sep 12, 2020 3:21 am
Has thanked: 1 time
Been thanked: 13 times

Re: VGA Output, Scalers, and CRTs

Unread post by d909 »

IMG_0119.jpeg
IMG_0119.jpeg (4.17 MiB) Viewed 13270 times
This is running in DOS 6.22.
Post Reply