VOGONS


A Little Feature Request

Topic actions

First post, by avatar_58

User metadata
Rank Oldbie
Rank
Oldbie

Normally I never ask for features, especially when they aren't game-specific, but this little 'issue' had me thinking.

I found when I bought my new 24" widescreen monitor that suddenly DOSBox stopped behaving. Not speed wise or anything, but just the scaling to my display. As a more advanced user I know how to make it behave, but I worry about what other inexperienced dos gamers are seeing......

Heres the deal - in order to force my monitor to display full screen with stretching (no bars) I must use "normal2x" and "aspect correction. Now correct me if I'm wrong, but why would aspect correction make it 16:10? Shouldn't it be corrected to the original resolution?

If I do not use "normal2x" it is in a small square in the center of my monitor in it's native resolution (thanks to aspect correction). The minute I introduce normal2x it goes fullscreen and stretched. Whats the deal here? If I remove aspect correction then again it's a small screen centered, only this time it's the wrong aspect ratio (wide).

It seems to me what DOSBox needs is a "stretch to monitor" option that works regardless of one's native resolution. It also needs a proper "aspect ratio" option to force the game to use it's original ratio.

Can anyone else reproduce this behavior? I have the game set to "original" resolution because setting anything else will never stretch to my screen height.....let alone width. Surely there must be more widescreen LCD dosbox users than myself? This problem came to the surface with id's steam pack because I noticed on shacknews that many others couldn't get some games fullscreen on their different monitor setups.

So maybe those screen options need some tweaking, so that it's understandable. I mean instead of having to fool with scalers I should just be able to set my native resolution and choose "stretch to screen" and have it scale the full height x width. Then if I want I should be able to ask for borders.

Reply 1 of 36, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

I have an ATi Radeon vid card and a Samsung 1280x1024 native res LCD and I get the same sort of thing. There is an option in the video driver's FPD display properties for "Scale image to panel size" that seems to control the behavior. If I select that option, any game at any resolution is scaled to 1280x1024 in a somewhat blurry manner and without regard for proper aspect ratio; but with the option deselected the image is shown in the middle of the screen without the blurry scaling IF it's a small image... if it's big enough, it gets scaled regardless. I haven't determined the exact threshold, but an image of 640x400 or larger will always get scaled up, and that includes a 320x200 game being expanded with a 2x scaler in DOSBox. This same behavior occurs running DOS games in the WinXP command shell, and even native Windows games. For example, Diablo 1 & 2 (640x480, 800x600) are always scaled, which is bad because the aspect is off and they're kind of blurry. 😒

It seems to me that the ideal way to do image centering is to render at the native res of the monitor with the smaller image drawn into the center of the larger area (black borders), because the monitor's internal scaling can't kick in when it's being fed an image at its native res. Should DOSBox have an option to do rendering like that, or should it be left to the video drivers? BTW, I've heard that nVidia does a better job at centering images than ATi, but I don't have firsthand experience with that.

Reply 2 of 36, by Miki Maus

User metadata
Rank Member
Rank
Member
avatar_58 wrote:

It seems to me what DOSBox needs is a "stretch to monitor" option that works regardless of one's native resolution. It also needs a proper "aspect ratio" option to force the game to use it's original ratio.

In dosbox.conf line where it says:

fullresolution=original

change to any resolution you want DOSBox to stretch whole screen to.

Reply 3 of 36, by avatar_58

User metadata
Rank Oldbie
Rank
Oldbie

It doesn't. It makes it really tiny in the center of my screen. If I use a scaler is stretches a little, but not full screen (unless I use 640x480 and normal2x)

This is exactly my complaint - what is setting a resolution for if it doesn't fill it out? I need a "fit to screen" option.

Reply 5 of 36, by doomer

User metadata
Rank Member
Rank
Member
tannerstevo wrote:

Try different output such as ddraw with fullscreen.

Confirmed. Output modes such as surface do not stretch. But when you select fullresolution=640x480, set scaler to none, aspect to true, and output to ddraw, dosbox stretches the display properly.

Reply 6 of 36, by avatar_58

User metadata
Rank Oldbie
Rank
Oldbie

I remember trying this and it didn't work for me, but I'll try it again just be sure when I get home.

However I ask once again - why does "aspect" induce stretching? Shouldn't it just change the aspect ratio to it's original dos format? Why would it match my 16:10 screen when clearly DOS games are not that aspect ratio. Thats where some confusion is coming up for me personally.

It's not so much "I can't get fullscreen" - it's "Why is this so convoluted?". I mean I can only imagine how confusing this would be for a new user. I mean a resolution is a resolution, there ought to be global "stretch to fullscreen" modes that work regardless of scalers/outputs/etc right? That would make things far less confusing.

Reply 7 of 36, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Well maybe somebody implements an output=optimal, but as you already
seem to experience yourself the different output modes do quite funny
things by times (that is the respective rendering device, be it gdi or a
directx component or whatever).
aspect correction cares about fixing the width to height ratio on square pixel
devices, so 320x200 modes look fine (windowed mode/3:2 targets).

Reply 8 of 36, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

I remember there being this discussion before and someone suggest an aspect=wrong feature? Going to go digging around.....

DOSBox Compilation Guides
DosBox Feature Request Thread
PC Game Compatibility List
How To Ask Questions The Smart Way
Running DRM games offline

Reply 9 of 36, by avatar_58

User metadata
Rank Oldbie
Rank
Oldbie
wd wrote:

aspect correction cares about fixing the width to height ratio on square pixel
devices, so 320x200 modes look fine (windowed mode/3:2 targets).

Indeed, thats what is *should* do right? When I go to windowed mode it clearly keeps the original game's aspect ratio. Yet with "normal2x" and "surface" it is full screen 16:10. Thats what is confusing me. If I remove one or the other it is small centered image.

It's more curiously entertaining than annoying for me. 😉 I mean it wouldn't be half as bad if I could just try to understand why exactly this is happening.

Reply 10 of 36, by `Moe`

User metadata
Rank Oldbie
Rank
Oldbie

The problem with full screen is that DOSBox assumes the screen is 4:3, which used to be true until 1280x1024 LCDs came (and later, widescreen ones), while in windowd mode it assumes square pixels (which is usually true on LCDs in native resolution, but not on CRTs in 1280x1024 resolution).

I am not sure what DOSBox assumes when you set fullresolution to a fixed value, but it might make a difference.

At the core of all those problems lies the fact that there is no reliable way to detect what screen size is connected. While there is DDC which is supposed to transmit exactly that information to the PC, it is often incorrect (containing phony values like "400mm x 300mm" on a widescreen display), often not available if the display is off while the PC starts, and thus it is mostly ignored by the OS.

Reply 11 of 36, by avatar_58

User metadata
Rank Oldbie
Rank
Oldbie

But why even ask for detection? If I set "1920x1200" then shouldn't DOSBox know I'm using a 16:10 panel and provide stretching (if I wanted to?).

I just tried DDraw and yes - setting the resolution manually worked. I set it to 1920x1200 and my test game - Alley Cat - was the size of my screen. Thats how it should behave. One little problem - Duke Nukem 3D has pillarboxing on the sides. Why is that? I didn't enable aspect correction so why does it auto assume I wanted it, yet in Alley Cat it stretched?

I enabled aspect correction for fun and Duke didn't change. Eh? So what good is aspect correction if it doesn't work? This is where my suggestion lies - there ought to be a "stretch to width" option. If I want to play Duke fullscreen ignoring the aspect ratio there should be a way right?

If I use normal2x + aspect correction Duke is full screen stretched. Yeah that makes little sense for a 1920x1200 panel, but thats what happens. If I set 1920x1200 as the fullresolution it does not stretch, though it does look much better clarity wise (most like due to ddraw I guess).

So is there perhaps any way to have a true aspect ratio option? One thats asks

"Original game aspect" (for game's aspect)
"Use custom resolution aspect" (aspect is determined by your set resolution)

That way one could play at their native resolution and choose whether or not the image stretches to full screen or maintains the aspect. As it is right now I can't use ddraw + 1920x1200 and get games like Duke3D to go fullscreen. I notice it mainly affects later games like this and some sierra games like Larry 7.

EDIT - Well a temp solution for me is to try "1920x1200" since most of my games seem to go fullscreen + stretched when I do. If that doesn't work I try a 4:3 resolution like 1280x960 and it will make it stretch.....since my monitor is not 4:3. So while thats not a perfect fix, it definitely solves my personal issues with getting fullscreen. (This is using DDraw btw, the other modes don't stretch correctly)

Reply 12 of 36, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

If I set "1920x1200" then shouldn't DOSBox know I'm using a 16:10

No, as this might as well be some non-square pixel mode of a 4:3 monitor.
As moe said, there's no real way to determine the actual output dimensions
of the monitor.

so why does it auto assume I wanted it, yet in Alley Cat it stretched?

Maybe ask the various graphics card developers, what their magic is behind
what modes stretch what to what.
Suppose you'd need a dedicated rendering type in dosbox that adds black
fields to the left and right, but that neither sounds fast nor does it look like
there's an easy way to add that. Harekiet might know, dunno if he cares though.
Maybe the aspect ratio of the target device might be a hint at what to use.

Reply 13 of 36, by `Moe`

User metadata
Rank Oldbie
Rank
Oldbie

Please bear with the math, but there is a logical explanation to your observations (and one that you could have deducted from my previous post):

Case 1: Alley Cat

If there is no aspect correction going on, DOSBox assumes all emulated modes have square pixels, even 320x200, which doesn't. That resolution is thus assumed to be 16:10, surprise!.

Furthermore, in fullfixed and windowed mode, DOSBox assumes the display device has square pixels (that's true for your display, but may be wrong for others).

So, scaling a 16:10 game to a 16:10 resolution is simple, just expand the image until it fills the screen, it will fill it totally. Note that without aspect correction, it will be distorted. It is not what you'd have seen on a DOS machine, and thus it is not the correct behaviour. In some games, that's a good thing (X-Com looks actually better that way), in others it's annoying.

If you enable aspect correction, DOSBox will stretch the image to a 4:3 resolution, so it must add black bars to the left and right, because you can't fill a 16:10 screen with a 4:3 image. You simply can't.

Case 2: Duke3D

It probably uses 640x480 or some other real 4:3 resolution. It will always look the same, regardless of aspect setting, since it is already correct 4:3.
If you scale it to a 16:10 resolution, it will get black bars, just like Alley cat with aspect on.

With stock DOSBox, the only way to fill your screen no matter what the input is, is to either not set fullfixed, or to set it to a 4:3 resolution and enable aspect correction. The reason is that while DOSBox can do extra work to fix an image (aspect=true is slower that aspect=false) if it isn't already correct, it won't do extra work to break an already correct image (which is what you want).

Reply 14 of 36, by avatar_58

User metadata
Rank Oldbie
Rank
Oldbie

That explains a few of my questions, thanks. However I'm curious - you mention "fullfixed". How do I enable this in DOSBox 0.72? Since last I checked the option vanished from the dosbox.conf and I just assumed it was no longer supported. Enabling it in D-fend did nothing, so I figured "oh well, I guess it's been removed'.

If fullfixed still existed my problem would be solved, as I could just set my native resoluition and turn it on/off depending on the game.

Reply 15 of 36, by `Moe`

User metadata
Rank Oldbie
Rank
Oldbie

I think these days the corresponding option is called "fullresolution". I just hope you understood correctly what I was explaining, since setting it to your native resolution won't stretch duke3d to fill the whole display area. Set it to 1600x1200 (4:3) and set aspect=true, then your whole screen area will be used.

Reply 16 of 36, by avatar_58

User metadata
Rank Oldbie
Rank
Oldbie
`Moe` wrote:

I think these days the corresponding option is called "fullresolution". I just hope you understood correctly what I was explaining, since setting it to your native resolution won't stretch duke3d to fill the whole display area. Set it to 1600x1200 (4:3) and set aspect=true, then your whole screen area will be used.

No I know that, I figured that out yesterday from playing around with the different resolution settings. I found using a 4:3 resolution like 1600x1200 goes full screen even without aspect correction - the reason is because my Nvidia driver is set to "scale" 4:3 resolutions. So essentially dosbox itself isn't stretching, my monitor/gpu is.

However for everything else I can just set 1920x1200 (in ddraw) and it works.

Reply 17 of 36, by Ken

User metadata
Rank Newbie
Rank
Newbie

I'm new to dosbox and recently bought a 22" widescreen and nVidia 8600 video card.

I have a 4:3 resolution DOS game, while I play it on a 16:10 widescreen LCD in full screen mode, the dosbox stretched the image to fit the widescreen, which distorted the image. Now my question is, if I want to play the game in full screen mode while keeping it at the 4:3 resolution which the game was designed for(I don't mind the black bars to the left or right), what should I do? thx

Reply 18 of 36, by `Moe`

User metadata
Rank Oldbie
Rank
Oldbie

Set "fullresolution=" to your display's native resolution (otherwise it will stretch the image, which is what's happening in your case), set "output=" to any value except "surface" (use whatever mode works and seems fastest to you), and probably you'll want "aspect=true" (try with and without: for some games, it doesn't make a difference, others may actually look better without, they look better when stretched, like X-Com).

See the guides section in the forum list to see how to change the settings in the configfile.

Reply 19 of 36, by canadacow

User metadata
Rank Member
Rank
Member

This is a known issue with DosBox. I noticed as well when I bought a 22" widescreen LCD monitor for myself. I've coded a fix but haven't committed it as I was expecting a more elegant solution. Basically DosBox needs to know exactly what aspect ratio you're working with and whether or not to pillar box.

The result on my monitor, for instance, is native display at 1680x1050 and an actual output from DosBox to a centered area of 1400 pixels wide. This is a pillar boxed 4:3 display area.

Since no widescreen resolutions or monitors existed in the DOS era, I believe it always safe to assume the DOS program is expecting a 4:3 display.