VOGONS

Common searches


First post, by Ant_222

User metadata
Rank Oldbie
Rank
Oldbie

Hello, all

I can't seem to make normal scaling (integer scales, no interpolation) work with any renderer in either windowed or full-screen modes. Here's what I have with my 1680x1050 display while running Romance of the Three Kingdoms I:

+--------------------------------------------+
|Renderer Windowed Full Screen |
+--------------------------------------------+
|surface 640x480 640x480 (no scaling) |
|overlay 640x480 crash |
|opengl 640x480 1680x1050 (smoothing) |
|ddraw 640x480 1680x1050 (smoothing) |
+--------------------------------------------+

Attached is the blurry KOEI logo that I have in fullscreen mode. It is a fragment of the original unmodified image at pixel-to-pixel scale, so the the blurring is due to DOSBox.

The other settings in the config file are:

fullresolution=1680x1050
windowresolution=original
aspect=false
scaler=normal2x

Can you help me?

Attachments

  • koei.png
    Filename
    koei.png
    File size
    16.79 KiB
    Views
    2449 views
    File license
    Fair use/fair dealing exception

Reply 1 of 13, by Ant_222

User metadata
Rank Oldbie
Rank
Oldbie

The problem is treated in the FAQ under "DOSBox in fullscreen looks blurred", but unfortunately it does not solve my problem. There is no reason for a blurred image in fullscreen if DOSBox is running at the display's native resolution with integer scaling (normal2x, normal3x...). Does the scaler setting apply to fullscreen mode?

Reply 3 of 13, by VileR

User metadata
Rank l33t
Rank
l33t

The problem is in the video mode used by the game- IIRC it runs at 640x200, which DOSBox treats as a 'double-height' mode and displays as 640x400. Scalers do not apply at all in double-height (or double-width) modes.

However, you may try this patch which enables normal2x and normal3x for the doubled modes (only those two, and only if you specify the 'forced' switch).

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

Reply 4 of 13, by Ant_222

User metadata
Rank Oldbie
Rank
Oldbie

Aideka, openglnb crashed this morning but works tonight... It is a very strange mode that preserves sharp pixels but performs scaling in a non-uniform way: applying alternative scaling to alternative rows and columns. Attached are sample fragments rendered natively and by openglnb and scaled to approximately the same size.

VileRancour, yes the game runs in double-height mode and DOSBox correctly doubles every pixel vertically (while in windowed mode). Thank you, I will try the patch. I wonder why so mechanical a procedure as integer scaling cannot be implemented indifferently of the graphical mode, as a filter on top of what the game outputs to the screen. For DOSBox it is a necessity.

Attachments

  • rotk-sample-openglnb.png
    Filename
    rotk-sample-openglnb.png
    File size
    1.8 KiB
    Views
    2385 views
    File comment
    OpenGLNB sample
    File license
    Fair use/fair dealing exception
  • rotk-sample-native.png
    Filename
    rotk-sample-native.png
    File size
    1.48 KiB
    Views
    2385 views
    File comment
    Native resolution sample
    File license
    Fair use/fair dealing exception

Reply 5 of 13, by James-F

User metadata
Rank Oldbie
Rank
Oldbie
Ant_222 wrote:

Can you help me?

* Use latest Dosbox SVN from EmuCR.

fullresolution=desktop
windowresolution=800x600
output=opengl

aspect=true
scaler=normal3x forced
# You can try normal2x forced, for slightly blurrier picture but it may look more accurate on your 1680x1050 screen.

This is important that you use bilinear filtering with OpenGL for proportional pixels, so don't use openglnb.
Now you super-sample by forcing normal3x and opengl will downscale it to you monitor, this will make sure you have pixel perfect image with no blurring.
Super-sampling is a well known technique to make low res image keep the pixel size/ratio with no blurring.
You also have to specify window resolution, if not, the window will be huge when you exit fullscreen.

All my emulators are set this way to be pixel perfect with no blur.
Bilinear=ON, Scaler=normal/simple x3 or x4.


my important / useful posts are here

Reply 6 of 13, by Ant_222

User metadata
Rank Oldbie
Rank
Oldbie

I have downloaded and am trying the latest build. My setup using the -userconf and -conf options to employ a generic config file together with a game-specific one no longer works. The new DOSBox seems to ignore the generic config. I shall let you know about my luck with pixel-perfect display when have sorted out this config problem.

Reply 7 of 13, by Ant_222

User metadata
Rank Oldbie
Rank
Oldbie

I accidentally rewrote my general config. The latest build seems to be DOSBox SVN r3985, and does not seem to support normal4x (ignoring it even when forced). In which section ought I to put the Bilinear parameter, for it is not present in the config file? Why do you propose to activate aspect correction—it will only further distort the image by stretching it to different (and probably non-proportional) vertical and horizontal scales?

Anyway, I tried your method with normal3x and did not obtain a pixel-perfect image. It did not work at all with ROTK-1 and 2 because they use a double-height graphical mode, whereas my results with ROTK-3 are shown in the attached screenshot. The picture is still blurred noticeably.

James-F wrote:

This is important that you use bilinear filtering with OpenGL for proportional pixels, so don't use openglnb.

If by proportional you mean aspect-corrected, then I don't need them. If you mean a mode in which each original pixel is shown as an n-by-n-pixel square on my LCD display then that is my purpose.

James-F wrote:

Now you super-sample by forcing normal3x and opengl will downscale it to you monitor, this will make sure you have pixel perfect image with no blurring.

I don't see how this may happen, because the final downscaling will not be to an integer scale and therefore will introduce rounding errors (and blur in case of interpolation).

James-F wrote:

Super-sampling is a well known technique to make low res image keep the pixel size/ratio with no blurring.

Have never heard of it. The obvious way is simply to apply an integer scale so that each pixel shall be mapped into the target resolution without rounding errors. Why DOSBox is unable to do it in full-screen is beyond me. In windows mode it works perfectly. I have downloaded the source but am not sure I shall ever manage to compile it.

Attachments

  • rotk-3.png
    Filename
    rotk-3.png
    File size
    1.63 KiB
    Views
    1906 views
    File license
    Fair use/fair dealing exception

Reply 8 of 13, by Aideka

User metadata
Rank Member
Rank
Member

If by proportional you mean aspect-corrected, then I don't need them. If you mean a mode in which each original pixel is shown as an n-by-n-pixel square on my LCD display then that is my purpose.

You do know that not every resolution in the dos era used square pixels, right? Some games used "widescreen" resolutions, but since the monitors were 4:3 aspect ratio, the pixels weren't exactly square anymore.

8zszli-6.png

Reply 9 of 13, by James-F

User metadata
Rank Oldbie
Rank
Oldbie

@Ant_222
You want pixel perfect image fullscreen with black borders around the image, AKA Centered?
There is not option for that, fullscreen is always stretched.

The latest Dosbox SVN is found in EmuCR by using the searching function:
http://www.emucr.com/2016/05/dosbox-svn-r3985.html


my important / useful posts are here

Reply 10 of 13, by Ant_222

User metadata
Rank Oldbie
Rank
Oldbie
Aideka wrote:

You do know that not every resolution in the dos era used square pixels, right? Some games used "widescreen" resolutions, but since the monitors were 4:3 aspect ratio, the pixels weren't exactly square anymore.

Yes, but sharp square pixels are still better than blurred rectangular ones. If one must have non-square pixels, let them be n-by-m rectangles where n and m are integers approximatng the target aspect ratio. That will keep the image sharp.

James-F wrote:

You want pixel perfect image fullscreen with black borders around the image, AKA Centered?There is not option for that, fullscreen is always stretched.

Yes.

Reply 11 of 13, by James-F

User metadata
Rank Oldbie
Rank
Oldbie
Ant_222 wrote:
James-F wrote:

You want pixel perfect image fullscreen with black borders around the image, AKA Centered?

Yes.

If you use Nvidia this will give you what you want:
Set fullresolution in dosbox to original and use scaler.

scaling options.png
Filename
scaling options.png
File size
57.84 KiB
Views
1829 views
File license
Fair use/fair dealing exception


my important / useful posts are here