VOGONS


Scaling issues

Topic actions

First post, by FeedingDragon

User metadata
Rank Oldbie
Rank
Oldbie

OK, I've been fighting with this for quite a while now. I cannot get composite CGA games to display correctly. I've tried all the output types (surface, overlay, ddraw, opengl, & openglnb.) For some reason opengl doesn't work right, have to use openglnb and it is the only one that will resize the display correctly in windowed mode. I've set fullscreen resolution to 1024x768 and to 0x0 (yes I watched the video.) I've set aspect to true and false. I've gone through all of the scaler options. I've tried every possible combination of those without any luck. The 2 games I use CGA composite mode with are Ultima 2 and 3 (I may have others but they aren't currently installed.)

I tend to use 1024x768 resolution because my monitor is "fixed" at 1366x768 resolution. It will automatically letterbox 4:3 resolutions but will also automatically resize non ????x768 resolutions as well. The monitor's method of resizing is not very reliable though, so I put that task off on DOSBox (it does it better.)

Here is where things get interesting. On almost all of my DOS games, when aspect=false (even the VGA ones,) the image is double letterboxed. That is, black bars on left and right (which I expect,) but also black bars on top and bottom. So, I set aspect=true and they display correctly.

However, on my Composite CGA games, if aspect=false, I get double letterbox, but if aspect=true I now get full height but the width is drastically reduced (approximately cut in half,) resulting in an image that is obviously stretched. If I set resolution to 0x0 aspect true remains the same. However aspect false will no longer double letterbox, but now the image width is stretched.

All of this holds true even for games that have composite CGA as an option but EGA or VGA is also available (I generally will use the EGA/VGA options in those cases.) Dragon Wars has that option, and testing by setting graphics to composite CGA produces the exact same effect.

I'm not really an expert on this, but does composite mode actually use 2 pixels to build a single pixel? If this is the case, that would mean that a 320x200 resolution screen would actually display 160x200 in composite mode. From what I understand on original HW, this is the case, but that the width pixels are actually doubled to fill the screen. Not sure if this is done by the card or by the monitor. I have also noticed that in windowed mode (with other than openglnb output,) the window changes size, and ends up with the same stretched image as aspect=true produces. Though with openglnb the windows maintains the same size (800x600,) and the graphics now look like I remember them.

I guess what I'm asking is.... Is thee some way (or will there at some future time be,) to tell DOSBox to force the resolution? That is, if I want a 160x200 image to display at 1024x768, DOSBox will say OK, and resize to that resolution (multiply width by 6.4 and height by 3.84 in this particular case.)

Feeding Dragon

Reply 1 of 6, by HunterZ

User metadata
Rank l33t++
Rank
l33t++

This is a bit off-topic for this thread. I may end up splitting it out.

First of all, set scaler=none, as this is what gets most people into trouble. Trust the output= setting to handle scaling for you, which should work for any setting other than output=surface. I recommend output=opengl for bilinear filtering that simulates fuzzy CRT pixels (pixels in DOS games were never meant to be as sharp as they are on an LCD when filtering is not used).

Additionally, aspect=true will attempt to reconcile differences between the game's aspect ratio and that of the resolution you are scaling to.

Note also that "160x200" composite CGA still uses the 320x200 video mode under the covers, so you're not stretching from 160x200.

Finally, if you're not going to use a scaling method that involves filtering, I recommend choosing an output resolution that is an integer multiple of the source resolution (a multiple of 320x200 in this case) to minimize aliasing. Of course, aliasing is pretty much unavoidable if you want to use aspect=true (which I usually do, giving me another reason to like output=opengl).

My advice on a specific starting point is:
output=opengl
scaler=none
fullscreen=true
fullresolution=0x0 (or 1366x768)
aspect=true

Reply 2 of 6, by VileR

User metadata
Rank l33t
Rank
l33t
FeedingDragon wrote:

on my Composite CGA games, if aspect=false, I get double letterbox, but if aspect=true I now get full height but the width is drastically reduced (approximately cut in half,) resulting in an image that is obviously stretched.

What build are you using? aspect correction is still a bit buggy in current SVN, especially in composite CGA mode (way too much horizontal squashing). As far as I can tell this is fixed in SVN-Daum (ykhwong's build), so try that one.

does composite mode actually use 2 pixels to build a single pixel? If this is the case, that would mean that a 320x200 resolution screen would actually display 160x200 in composite mode. From what I understand on original HW, this is the case, but that the width pixels are actually doubled to fill the screen.

The pixels stay the same width, it's just that NTSC composite video cannot properly separate luma (brightness) from chroma (color), so neighboring pixels tend to blend together to form colors - this is an analog process which doesn't exactly conform to pixel boundaries. You could say that "effective color resolution" is reduced to 160x200, but you still have 320/640 horizontal pixel positions, so neighboring pixels get sort of super-imposed on one another to create color subpixels.
DOSBox renders that at 640x200 (line-doubled to 640x400).

[ WEB ] - [ BLOG ] - [ TUBE ] - [ CODE ]

Reply 3 of 6, by FeedingDragon

User metadata
Rank Oldbie
Rank
Oldbie

HunterZ:
OK, tried those settings again (I had set scaler to none before.) The same results. The final display (with composite enabled,) is roughly 860x768. This is just a rough guess, comparing a properly displayed 1024x768 and a piece of paper with a mark on it to show where 1024 would letterbox out at. With aspect=false it is close to 1200x768. Again that is just a rough guess.

On a side note - I was wrong... OpenGL does work (as well as OpenGLnb,) I guess I had a minor hickup when I tried it the first time> I ended up with what looked like a window at 0x0 or 1x1 or some such resolution (fullscreen worked fine.) It seems to be working just fine now in both window & fullscreen mode.

VileRancour:
I was refering to what I "thought" DOSBox might be displaying. I had assumed that it would calculate what would appear and then display it in single pixel form, since it would not be physically displaying to a composite monitor but to a more modern one.

I am currently using SVN r3824, since it is the latest one I have access too that includes the composite mode support (though I still hate having to hit F12 every time I run the game.) I might be able to get a previous version, but the same thing happens in 0.74 (with comp4.com - I think that is the TSR,) and with the 0.74 Composite mode lite available earlier in this thread.

Feeding Dragon

Reply 4 of 6, by HunterZ

User metadata
Rank l33t++
Rank
l33t++

Definitely suggest trying Ykhwong's DOSBox SVN Daum build. I meant to mention that in my previous post, but it got lost during editing 😜

If you're getting 1200x768 with aspect=false and a fullresolution of 1366x768, then something is wrong with your hardware. With aspect=false, DOSBox will scale its output to take up every single pixel of the specified output resolution.

Is your monitor connected with a VGA cable, or are you using something digital like DVI or HDMI?

Reply 5 of 6, by FeedingDragon

User metadata
Rank Oldbie
Rank
Oldbie

I actually have VGA & DVI connected. I generally have it set to use VGA so my KVM works right. However, when I watch a protected Blu-Ray I have to switch to DVI for some reason, which is why I have both cables attached.

I am currently using an AMD Radeon HD 5570 card with Catalyst 12.6 installed (latest when I last did a re-install.) In case that makes a difference.

Switching to Yhkwong's build and setting aspect=true works correctly now 😀 Thanks for the help. Though now I have to rebuild all my config files it seems. I'll also need to research the docs and find out how to get rid of the window borders in fullscreen mode (start in full screen and you can see a white line around the screen and part of the menu.) But at least it displays correctly now.

Feeding Dragon

Reply 6 of 6, by HunterZ

User metadata
Rank l33t++
Rank
l33t++

Split the topic, since it wasn't very specific to the composite CGA discussion.

Glad you got it working better.