aqualung99 wrote:As for your "pixel perfect" patch, there is no need. I have already recently implemented that in my code. I've posted a new Window binary containing this change. To use it, you will need to edit your "DosBox-0.74-ES.conf" file.
I have added a new option to the [sdl] section of the config called "make_square_pixels". This only works properly in Windowed mode, unfortunately. It does not work in fullscreen.
From my viewpoint, this is a serious limitation.
In Windowed mode, if you set "make_square_pixels=true" then the window will always be a 4x3 aspect ratio. If you set "make_square_pixels=false" then the pixel layout from the DOS program is used as-is.
These settings seem reversed. In order to make a 4:3 image from a 320 x 200 game its pixels should be treated as 5:6 rectangles. Maybe you can rename the flag to something like stretch_to_43?
You can then use perfect multiples of your target resolution to get pixel-perfect doubling, tripling, etc.
If your build will not try to interpolate the result, it will be indeed equivalent to running the pixel-perfect patch in windowed mode.
For example, if your target program runs at 320x200, and you set your window resolution to 640x400 and set make_square_pixels=false, then you will get perfect doubled pixels with no correction.
This is another problem. My patch will automatically calculate the optimal integer scaling factors, taking into account the pixel aspect ratio and double-width and double-height flags. This must be done on the CPU and the result passed to the shader.
If you would pass horizontal and vertical scales to the pixel shaders as parameters, you would have pixel-perfect scaling in fullscreen too.