VGA Output, Scalers, and CRTs

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 »

Well, the scaling is off because I'm running the 31k core on a 15k monitor with a custom expiramental video mode. It's not intended to actually function, but thanks to MiSTer it is magically working. I haven't tried native 31k on my 31k monitor because I use all sorts of cores on it that do need the scaling and it's easier to set the monitors native resolution as the end scale. It makes more sense that it switches the resolution on the fly internally outputting a constant native resolution. Which I might add 1280x960 seems to be perfect for a lot of the 640x480 stuff. Otherwise you have monitor signal searching, which you can miss a lot with LCD's doing that with games that do change resolution a lot, and need to reorient it constantly even on old vga crt's. I remember doing that with my 486's crt all the time, which is why they made those pot adjusters front and center in that era.

I'll give the scalerless option a go on the 31k just to see what you mean. Seems like it would work. It did the whole scrolling double image when i tried it on a 15k.
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 »

Ok, so I tested it out. It's weird because I forgot the scalerless mister menu is like 240p which doesn't display without scaling on this monitor. Anyhow from what I can see is the main DOS mode works perfectly fine, the text actually looks much better unscaled. Now my 31k monitor is a dell 1908fp which won't display lower than 640x480 at a specific frequency. So anything that was intended to display at 200 or 240 does not sync. It would need an older vga or early svga crt. So I'm guessing it will work fine if you have the proper monitor. Though windows 3.11 did not show properly, but i had it set to a funky 480 setting that might not have the right frequency on the Dell. Though after reading that github thread it looks like it's designed to be scaled no matter what so it makes sense that the default dos resolution is the only thing that functions. Well, maybe someone will incorporate an unscaled vga mode down the line. I'd love a TTL output mode personally since I have a bunch of TTL monitors laying around, but ya know, it's a hobbyist product. Makes me want to learn how to solve it.
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 »

Could you, or somebody else post .ini settings for the unscaled VGA output? I've tried yesterday and was unable to do it. I'm using Direct Video though.

Are you sure it's really perect? Don't get me wrong, I really want to believe you but then we have this thread and git issue ticket. Also, not sure what exactly "proper monitor" means in this context. From my understanding VGA should display on any VGA capable monitor, and older 200/240 games were upscaled (though do not quote me on that :))
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 »

Oh I guess my post was confusing. You are correct. By perfect I mean the core boots and displays DOS commandline perfectly. However if I run anything that isn't that weird 720x400 DOS text resolution I get either a black screen or video garbage, and you are also right that VGA 200 or 240 should be scandoubled. I was just kind of speculating through the evidence to see what it was doing. The github post is correct and it is intentional that it works this way. Someone would have to program completely different video logic to handle native vga output, if even possible with the main mister output, and also maintain the current one to enable or disable or switch between to maintain that functionality with all the different displays that it does work on currently. Your best option is to set the scaler to the native resolution of your vga display and maybe someone will expand functionality eventually.

Btw, what kind of monitor are you using?
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 »

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 :)
deepthaw
Posts: 55
Joined: Wed May 27, 2020 3:45 am
Has thanked: 1 time
Been thanked: 10 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: 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 »

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.
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 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: 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 »

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: 55
Joined: Wed May 27, 2020 3:45 am
Has thanked: 1 time
Been thanked: 10 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: 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: 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: 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 »

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 11072 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: 55
Joined: Wed May 27, 2020 3:45 am
Has thanked: 1 time
Been thanked: 10 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: 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 »

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: 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 »

640x400 was a very common resolution back then.
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 »

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: 55
Joined: Wed May 27, 2020 3:45 am
Has thanked: 1 time
Been thanked: 10 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: 55
Joined: Wed May 27, 2020 3:45 am
Has thanked: 1 time
Been thanked: 10 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: 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 »

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: 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 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.
Post Reply