First post, by toughluck
I have already tried searching the web for a possible solution, using: dosbox force resolution, and similar queries, but they turn out nothing
Let me state up-front that I abhor the standard method of correcting the aspect (duplicating every nth line), and that the first resolution which can be cleanly upressed is rather high (1600×1200) and cannot be accessed on virtually all laptop displays and many monitors.
This discussion affects mode 13h (320×200 with non-square pixels on 4:3 displays). Examples are numerous.
It could also affect high-res CGA/low-res SVGA (640×200), as well as limited usage for EGA (640×350) and 320×400 resolutions. Some of these are obvious, while I can only recall low-res SVGA in Wing Commander III cinematics.
VGA (640×480) and higher resolutions usually have square pixels already, and are rarely scaled, so they are beyond the scope of this discussion.
I doubt that rare resolutions (like 320×480 or 360×480) could attract enough attention to be worthwhile to address -- 320×480 already has half-square pixels so it's trivial to scale with overlay, while I only saw 360×480 in image alchemy, graphics workshop, and just one game, I can't recall the title now -- it was too slow for games, anyway.
---------------------------------------------------------------------------------
I will explain first what I am trying to do. I would like to access non-standard resolutions such as: 640×500, 960×700, 960×800 or 1280×1000. While none of these are true 4:3 aspect, they allow integer, or nearly integer scaling.
To clarify:
1. Compared to 640×480, 640×500 is only 4.2% taller, while uncorrected 640×400 is 17% shorter. However, 500 is 2.5×200, meaning every even line is doubled, every odd line is tripled -- this would already look better than the correct 480 lines, where 6 out of 10 lines are doubled, while 4 out of 10 lines is tripled -- the result is uneven tearing. If not 640×500, then 640×499 (there is one less interpolated line than non-interpolated ones).
2. Compared to 960×720, 960×700 is 2.8% shorter, which is rather negligible. 700 is 3.5×200 -- every even line is tripled, every odd line is quadrupled, which looks better. .
3. While 960×800 is 11% taller than 960×720, 800 is exactly 4×200 -- every line is quadrupled, there is no tearing at all. Some games will look better like this, some will look better without any aspect correction at all.
4. 1280×1000 is very close to being a good resolution. It's only 4.2% taller (like 640×500), and requires integer 4×5 upscaling.
800×600 would be a nice, 2.5×3 upscaling, but unfortunately, every odd column is doubled, every even column is tripled -- and that's much more visible than unevenness in rows.
---------------------------------------------------------------------------------
I have tried to choose these resolutions (in windowed mode and fullscreen), and I can confirm that they do not work.
I have tried aspect=true and aspect=false, I have tried specifying various scalers (forced and not), DOSBox does not set the requested resolution. Rather, DOSBox chooses a resolution close to the one that you specify in number of horizontal pixels. If I specified 640×500, it either gave me 640×400 (with aspect=false) or 640×480 (with aspect=true).
In having tried the various options, I found out that surface obviously fails. Overlay will scale as above, but it relies on duplicating lines to achieve aspect correction, therefore there is tearing.
I haven't tried ddraw (using Linux, but I'll try it with Windows soon), and while I cannot force the resolution with opengl or openglnb, and they also set the 4:3 resolution, since they scale the output like a texture, it's possible to achieve smooth scaling with these modes, so it's a nice start. However, it's horrendously slow under Linux with Intel HD3000, but also with ATI 5850 (I'm forced to use the radeon driver due to the problem with fglrx in Debian Wheezy at the moment).
---------------------------------------------------------------------------------
Possible solutions:
1. Allow forcing odd resolutions in any mode. Maybe bring back arbitrary width and height settings?
2. Add an output method that would interpolate the output instead of duplicating lines? That way, although 640×480 would look unsharp, using "scaler=normal2x forced" setting would bring back some sharpness.
3. Combine 1 and 2. 640×500 interpolated from forced normal2x scaler would only add an extra interpolated line between two sharp lines.
4. Allow arbitrary scaling of columns and rows separately in 'normal' mode. Integer-only scaling would be a good start, but also allowing x.5 scaling would be very nice (assuming it would repeat each line x times and then interpolate between these lines for the .5 line).
5a. For mode13h: Add 'normalNxMy' scalers to DOSBox: normal2x25y (to scale to 640×500), normal 25x3y (to scale to 800×600), normal3x35y (to scale to 960×700), normal3x4y (to scale to 960×800) and normal4x5y (to scale to 1280×1000).
5b. For other resolutions, some can have good solutions, like 640×200 could have normal1x25y or normal2x5y.
For some, there are no good solutions.
320×400 could use e.g., normal25x15y to scale to 800×600, or normal3x2y to scale to 960×800, but they are not ideal (1600×1200 is the first 'good' resolution).
640×350 (EGA) could benefit from oddities such as 960×700 (normal15x2y) or 1280×1050 (normal2x3y), which while far from ideal, are somewhat better than current aspect correction. The first 'good' result is normal3x4y, which would result in 1920×1400 resolution, but that can only be used on exotic and expensive QXGA, WQXGA or QHD monitors.
---------------------------------------------------------------------------------
Any thoughts? I'm not a programmer and I'm afraid I won't be able to contribute anything meaningful to the dosbox code, but if it's trivial to implement (at least the integer upscaling), I would be very grateful.