VOGONS

Common searches


Reply 100 of 733, by James-F

User metadata
Rank Oldbie
Rank
Oldbie
Ant_222 wrote:
Uploading a little modification that implementents, independently of the hard-coded normal scalers, the lossy interpolative scal […]
Show full quote

Uploading a little modification that implementents, independently of the hard-coded normal scalers, the lossy interpolative scaling technique that is in favour with many gamers (see here, here, and here):

  1. upscale the image in a pixel-perfect manner so that its dimensions exceed those of the display,
  2. let the built-in bilinear interpolation downscale it back to the target dimensions and aspect ratio.

To activate it, simply use the overlay output in fullscreen and with scaler=none (see readme.txt).

The source needs some clean-up so I will attach it to the title post later. I still need advice on the preferred interface to these new scaling modes from the config file.

First, thank you for you efforts to improve this aspect of dosbox, one day I will throw my CRT....maybe.

Am I doing something wrong? It looks like billinear interpolation is completely off.
Look at 60/60 and the "Fog of War", they are uneven with this alpha3 built with the "overlay" setting.
640x480 on a 1900x1200 monitor.

Using "output=opengl" with "scaler=normal3x forced" is ever so slightly blurred but it looks even.
*no picture because printscreen doesn't work with opengl.

super-scaled.png
Filename
super-scaled.png
File size
359.76 KiB
Views
1316 views
File license
Fair use/fair dealing exception
pixel perfect.png
Filename
pixel perfect.png
File size
280.99 KiB
Views
1316 views
File license
Fair use/fair dealing exception


my important / useful posts are here

Reply 101 of 733, by Ant_222

User metadata
Rank Oldbie
Rank
Oldbie
James-F wrote:

Am I doing something wrong? It looks like billinear interpolation is completely off.
Look at 60/60 and the "Fog of War", they are uneven with this alpha3 built with the "overlay" setting.
640x480 on a 1900x1200 monitor.

The first screenshot shows nearest-neighbor interpolation and the second pixel-perfect upscaling by a factor of two.

Looks like you are experienceing the same bevavior as VileRancour does: SDL applies nearest-neighbor interpolation instead of bilinear, while on my and KainXVIII's machines it is bilinear as intended. I will look into problem and solve it even if I must implement quick bilinear interpolation by hand.

Using "output=opengl" with "scaler=normal3x forced" is ever so slightly blurred but it looks even.*no picture because printscreen doesn't work with opengl.

My algorithm, when it finally works, should give the same result. I will show you a screenshot from my home PC when I return home.

Reply 102 of 733, by James-F

User metadata
Rank Oldbie
Rank
Oldbie

BTW, I had to edit the diff files and change the path to "--- src/gui/render.cpp" else it would not patch.
The diff files are already in DOSBOX-SVN directory.

EDIT:
it won't compile at all.

Nuked-OPL patches and compiles flawlessly.

make[3]: Entering directory `/home/TESTER/dosbox/src/gui' g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include -I/mingw/include/SDL […]
Show full quote

make[3]: Entering directory `/home/TESTER/dosbox/src/gui'
g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include -I/mingw/include/SDL -D_GNU_SOU
RCE=1 -Dmain=SDL_main -g -O2 -mno-ms-bitfields -MT sdlmain.o -MD -MP -MF .deps
/sdlmain.Tpo -c -o sdlmain.o sdlmain.cpp
sdlmain.cpp: In function 'char ssdSetSize(Bitu, Bitu, Bitu, double, double, Bitu
*)':
sdlmain.cpp:1025:14: error: 'struct SDL_Block::<anonymous>' has no member named
'type'
sdl.desktop.type=SCREEN_SURFACE_DDRAW;
^
sdlmain.cpp: At global scope:
sdlmain.cpp:1030:2: error: expected initializer before 'if'
if (SDL_LockSurface(sdl.blit.surface)) {
^
sdlmain.cpp:1034:9: error: expected constructor, destructor, or type conversion
before '=' token
*pixels=(Bit8u *)sdl.blit.surface->pixels;
^
sdlmain.cpp:1035:8: error: expected constructor, destructor, or type conversion
before '=' token
*pitch=sdl.blit.surface->pitch;
^
sdlmain.cpp:1036:2: error: expected unqualified-id before 'return'
return 1;
^
sdlmain.cpp:1037:1: error: expected declaration before '}' token
}
^
make[3]: *** [sdlmain.o] Error 1
make[3]: Leaving directory `/home/TESTER/dosbox/src/gui'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/TESTER/dosbox/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/TESTER/dosbox'

Last edited by James-F on 2016-09-05, 15:55. Edited 1 time in total.


my important / useful posts are here

Reply 103 of 733, by Ant_222

User metadata
Rank Oldbie
Rank
Oldbie
James-F wrote:

BTW, I had to edit the diff files and change the path to "--- src/gui/render.cpp" else it would not patch.

I created them from the local directory instead from the project root. I will take it into account when making the next patch.

The diff files are already in DOSBOX-SVN directory.

Glad to know that. Please, let me know if you are going to modify the patch because we must coordinate our efforts.

Reply 104 of 733, by Ant_222

User metadata
Rank Oldbie
Rank
Oldbie
James-F wrote:

EDIT:
it won't compile at all.

That's too bad. Maybe a merge conflict or an end-of-line problem? I will post the whole source files (of alpha 3 at least) a bit later (edit: today).

Nuked-OPL patches and compiles flawlessly.

What does that mean?

Reply 105 of 733, by James-F

User metadata
Rank Oldbie
Rank
Oldbie

All patches on Vogons are made to be patched from within the dosbox directory.

What does that mean?

AUDIO - Nuked OPL3 Patch for DOSBox(+Windows build) (SDL1)
It means I patch with the following command: "patch -p0 < patchname.diff" and compile dosbox as usual, and everything compiles without errors.

Note: I am absolutely clueless about programming and code, I just follow this guide:
https://www.dosbox.com/wiki/Building_DOSBox_with_MinGW


my important / useful posts are here

Reply 107 of 733, by Ant_222

User metadata
Rank Oldbie
Rank
Oldbie
James-F wrote:

Note: I am absolutely clueless about programming and code, I just follow this guide:
https://www.dosbox.com/wiki/Building_DOSBox_with_MinGW

OK, I will test my own patch on the unmodified SVN revision 3989. I used the same guide.

Last edited by Ant_222 on 2016-09-05, 16:13. Edited 1 time in total.

Reply 108 of 733, by James-F

User metadata
Rank Oldbie
Rank
Oldbie

OK, I will test my own patch on the unmodified SVN revision 3989. I used the same guide.

Note the patching command I mentioned is not in the guide (although it should be).
Just download anything from the "DOSBox Patches" sub-forum and have a look.


my important / useful posts are here

Reply 110 of 733, by James-F

User metadata
Rank Oldbie
Rank
Oldbie

Hi,

Replacing the given files within a fresh SVN will not compile (make) either.
But the SVN without the replacement files compiles successfully.

sdlmain.cpp:1073:14: error: 'struct SDL_Block::<anonymous>' has no member named 'type' sdl.desktop.type=SCREEN_SURFACE_DDRAW; […]
Show full quote

sdlmain.cpp:1073:14: error: 'struct SDL_Block::<anonymous>' has no member named
'type'
sdl.desktop.type=SCREEN_SURFACE_DDRAW;
^
sdlmain.cpp: At global scope:
sdlmain.cpp:1078:2: error: expected initializer before 'if'
if (SDL_LockSurface(sdl.blit.surface)) {
^
sdlmain.cpp:1082:9: error: expected constructor, destructor, or type conversion
before '=' token
*pixels=(Bit8u *)sdl.blit.surface->pixels;
^
sdlmain.cpp:1083:8: error: expected constructor, destructor, or type conversion
before '=' token
*pitch=sdl.blit.surface->pitch;
^
sdlmain.cpp:1084:2: error: expected unqualified-id before 'return'
return 1;
^
sdlmain.cpp:1085:1: error: expected declaration before '}' token
}
^
make[3]: *** [sdlmain.o] Error 1
make[3]: Leaving directory `/home/TESTER/dosbox/src/gui'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/TESTER/dosbox/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/TESTER/dosbox'
make: *** [all] Error 2

But the good news I have found a way to create a working diff file from the files you posted.

diff -u -r dosbos(original directory) dosbox(altered directory) > pixelperfect.diff

Might as well include -N to treat missing files as empty (not relevant to your patch), and -b to ignore white space changes which I find "-" the entire file for some reason.
Combine all four: -Nurb.
It will include all the code changes in all files, within one diff.
But I have to manually change the path in the resulting diff file after "---" to "--- src/etc..", no big deal.


my important / useful posts are here

Reply 111 of 733, by Ant_222

User metadata
Rank Oldbie
Rank
Oldbie
James-F wrote:

But the good news I have found a way to create a working diff file from the files you posted.

Thank you, James-F. I too found out how to make proper consolidated patches yesterday evening, but while making one based on the alpha 2 generated from my the separate diff files I was surprised that MinGW's patch creates files with unix EOL format regardless of the format of the source and that MingGW's diff cannot handle files with different EOL formats.

I will sort it out and post a working patch this evening. Sorry for the inconvenience.

Reply 112 of 733, by Ant_222

User metadata
Rank Oldbie
Rank
Oldbie

I have just uploaded a fixed alpha 2 patch. Please, test. Apply it thus:

patch -p0 < pixelprefect-alpha2.patch

from the root project directory, i.e. that contains the AUTHORS file.

Reply 113 of 733, by James-F

User metadata
Rank Oldbie
Rank
Oldbie

It will not compile, same problem as my previous post.

Making all in gui make[3]: Entering directory `/home/TESTER/dosbox/src/gui' g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include -I/ […]
Show full quote

Making all in gui
make[3]: Entering directory `/home/TESTER/dosbox/src/gui'
g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include -I/mingw/include/SDL -D_GNU_SOU
RCE=1 -Dmain=SDL_main -g -O2 -mno-ms-bitfields -MT sdlmain.o -MD -MP -MF .deps
/sdlmain.Tpo -c -o sdlmain.o sdlmain.cpp
sdlmain.cpp: In function 'char ssdSetSize(Bitu, Bitu, Bitu, double, double, Bitu
*)':
sdlmain.cpp:1025:14: error: 'struct SDL_Block::<anonymous>' has no member named
'type'
sdl.desktop.type=SCREEN_SURFACE_DDRAW;
^
sdlmain.cpp: At global scope:
sdlmain.cpp:1030:2: error: expected initializer before 'if'
if (SDL_LockSurface(sdl.blit.surface)) {
^
sdlmain.cpp:1034:9: error: expected constructor, destructor, or type conversion
before '=' token
*pixels=(Bit8u *)sdl.blit.surface->pixels;
^
sdlmain.cpp:1035:8: error: expected constructor, destructor, or type conversion
before '=' token
*pitch=sdl.blit.surface->pitch;
^
sdlmain.cpp:1036:2: error: expected unqualified-id before 'return'
return 1;
^
sdlmain.cpp:1037:1: error: expected declaration before '}' token
}
^
make[3]: *** [sdlmain.o] Error 1
make[3]: Leaving directory `/home/TESTER/dosbox/src/gui'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/TESTER/dosbox/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/TESTER/dosbox'
make: *** [all] Error 2


my important / useful posts are here

Reply 114 of 733, by Ant_222

User metadata
Rank Oldbie
Rank
Oldbie
James-F wrote:

It will not compile, same problem as my previous post.

This is strange, for I have tested it with a freshly downloaded revision 3989. Would you please send me the file

src/gui/sdlmain.cpp

after patching? Which revision did you patch? Did you apply the patch from the MSYS console?

Reply 115 of 733, by James-F

User metadata
Rank Oldbie
Rank
Oldbie

SVN 3993 after patching with pixel-perfect alpha2.
Yes MSYS, from Windows 7.

Everything working correctly when applying other patches like Nuked-OPL.

Attachments

  • Filename
    sdlmain.cpp
    File size
    74.06 KiB
    Downloads
    47 downloads
    File comment
    SVN 3993 patched with pixel-perfect
    File license
    Fair use/fair dealing exception


my important / useful posts are here

Reply 116 of 733, by Ant_222

User metadata
Rank Oldbie
Rank
Oldbie

The error was in Direct-Draw-related code, and I building DOSBox without Direct-Draw suppport, this broken code was ignored due to conditional compilation. I have fixed it now but shall test it only some ten hours later. Meanwhile, you can disable Direct-Draw support or try the fixed patch at your own risk. Sorry for the many errors—this is all very new to me.

Reply 117 of 733, by James-F

User metadata
Rank Oldbie
Rank
Oldbie

This time it got much further into compilation but also had an error:

C:\MinGW\msys\1.0\home\TESTER\dosbox\src\gui/render.cpp:427: undefined reference to `GFX_SetSize(unsigned int, unsigned int, un […]
Show full quote

C:\MinGW\msys\1.0\home\TESTER\dosbox\src\gui/render.cpp:427: undefined reference
to `GFX_SetSize(unsigned int, unsigned int, unsigned int, double, double, void
(*)(GFX_CallBackFunctions_t), float)'
collect2.exe: error: ld returned 1 exit status
make[3]: *** [dosbox.exe] Error 1
make[3]: Leaving directory `/home/TESTER/dosbox/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/TESTER/dosbox/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/TESTER/dosbox'
make: *** [all] Error 2


my important / useful posts are here

Reply 118 of 733, by Ant_222

User metadata
Rank Oldbie
Rank
Oldbie
James-F wrote:

This time it got much further into compilation but also had an error:

If patch did not return any errors, then it looks like make failed to recompile some files from updated sources. Please, try deleting the binary files by calling

find . -type f -name \*.a -delete -o -name \*.o -delete

from the project directory and making again. If it doesn't work, I shall need the following files:

include/video.h
src/gui/render.cpp
src/gui/sdlmain.cpp

as they appear on your machine after patching.

Reply 119 of 733, by James-F

User metadata
Rank Oldbie
Rank
Oldbie

The compiler shows error in render.cpp.

Attachments

  • Filename
    video.h
    File size
    2.29 KiB
    Downloads
    44 downloads
    File license
    Fair use/fair dealing exception
  • Filename
    sdlmain.cpp
    File size
    64.83 KiB
    Downloads
    47 downloads
    File license
    Fair use/fair dealing exception
  • Filename
    render.cpp
    File size
    19.72 KiB
    Downloads
    46 downloads
    File license
    Fair use/fair dealing exception


my important / useful posts are here