3

I'm using Windows 8.1 and running some old games on it (they are fully compatible). Lots of them use 800x600 or even 640x480 resolutions, but I have 1920x1080 display. While scaling, Windows provides some kind of smoothing (Nearest-neighbor algorithm, I guess), but it's quite poor. I want to use some advanced methods, like 2xSAI for example. If I run something in DOS-box, I can easily choose scaling algorithm, and I want anything like this in Windows. As I have AMD videocard (r9 380), I find some graphics enhancements in it's driver, including smoothing method. But it has no effect on old games (I guess it's because they even don't use OpenGL or DirectX). So, is there any way to choose low-resolution smoothing method?

UPD. Found "GPU Scaling" flag in AMD driver. With it some anti-aliasing can be used even to old 2D game. Nevertheless, no interpolation algorithm choice available here.

Games list: Dispel (1999), Horde 2: Citadel (2001), StarCraft: Brood War (1998), Rage of Mages 2: Necromancer (1999), Primitive wars (2002) and Warlords 3: Darklords Rising (1998).

3
  • I believe if GPU (i.e. videocard hardware) scaling is off (which is probably that way by default), the monitor does the scaling. In any case, windows is not involved. So you would need to somehow hack a scaler inbetween your game output and your GPU input. Since most games explicitly instruct OS to change screen to a fixed resolution, there is probably no universal system-wide solution for this. However, hacking some games may be possible - but it depends on how those output video. One example is sol.gfxile.net/ddhack Please update your question with a list of games you need scaled.
    – Jack White
    Commented Aug 1, 2016 at 22:00
  • @JackWhite I need to launch Dispel (1999), Horde 2: Citadel (2001), StarCraft: Brood War (1998), Rage of Mages 2: Necromancer (1999), Primitive wars (2002) and Warlords 3: Darklords Rising (1998).
    – JustLogin
    Commented Aug 2, 2016 at 9:57
  • Please click edit below your question and insert the game list there - not everyone is willing to look through the comments. Unfortunately there is no reliable hacks I know for games you listed (and similar games of the 1995-2005 epoch) but anyway I restructured what I know as an answer and posted it. It probably won't actually help you but may at least give hints on why it is that way.
    – Jack White
    Commented Aug 2, 2016 at 15:41

1 Answer 1

2
+100

2017+ update

Since the answer was posted, Blizzard rewritten Starcraft rendering completely, so methods described no longer work with that game. It should now have an upscaler built in, and brand new "remastered" HD texture pack is available for purchase through official blizzard store.

I decided to keep text below as it because it may be helpful for dealing with older games with similar engines such as original Diablo or playing older custom maps that only work with v1.16.1.

Explanation

By default the monitor itself does the scaling. Different monitors have vastly different scalers - some are pretty good, some a painful to look at, but none are 2xsai or advmame. Generally TVs with VGA inputs do a bit better scaling than mainstream monitors.

Some people even go as far as buying used CRT monitors: those generally present a better picture because they don't have fixed physical pixels - their resolutions are analog, "smoothing" nearby pixels, and old games generally expect this kind of "scaling" to happen.

Enabling GPU scaling (if available) makes the video card do the scaling instead using whatever scaler implemented in its hardware. It is not configurable but may include some filtering and therefore do a better job than your monitor.

Because to do that you would need to at least intercept explicit resolution-change commands from the game, any solution to the problem is some sort of a hack, which is a very complicated task, and as any hack can introduce video or gameplay problems.

In other words you would need to somehow hack a scaler inbetween your game output and your GPU input.

Some old games now have modern fan-made versions or wrappers that may support scalers, however these are mostly limited to emulators (such as MAME, PCSX, DOSBOX, SCUMMVM). That is because those do not need to hack between OS/videocard and the game - they emulate the whole video-system anyway, so it is easier for them to just apply a filter to a resulting image.

For some games hacks were developed to show larger part of the game world onscreen (without scaling) - this is not what you are asking for, but at least games look not as ugly as when scaled.

Games output their graphics differently - some use windows API (GDI), some rely on videocard hardware to render a 3D image (Direct 3D, OpenGL), still others (mostly 2D / pseudo-3D) use DirectDraw to directly output 2D image to the video card. It may be useful to know which your game uses because there may be different tools or modes to work with each.

From what I found:

  • Primitive wars seems to work with DirectX/OpenGL
  • Starcraft (before 1.18), Horde 2 and Warlords 3 probably use DirectDraw
  • I didn't find any info on Dispel and Rage of Mages 2 but by the looks of them I'd guess DirectDraw too.

Unfortunately, as far as I know, there are no hacks that support any advanced scalers on any of the listed games. Starcraft (1.16 and below) has some expanders listed below.

DDHack

However, there is a program called DDHack aka DirectDraw Hack that you may want to try. It provides at least some sort of scaler for DirectDraw games. Not as good as 2xSAI but better then nothing. It only works with some games, and may be buggy even if it works, but probably worth a try.

It works like this:

  • Download and unpack. There are several version you may want to try: One, Two, Three
  • Replace ddraw.dll file within your game folder with the one included in the download. If you cannot find such a file, most likely it won't work with your game. Be sure to backup original file!
  • Edit ddhack.cfg file with a plain-text editor like notepad. It has a list of options separated by spaces. You are probably interested in halfnhalf and bilinear options - type one of them into the file and save. If you only get a black screen when starting the game, try also including altwinpos option.
  • Run the game. If it works, it should look at least a little bit better.

DxWnd

There is another program that may now work with some types of games (DirectDraw and Direct3D), but it only has a bilinear scaler. Still better then none, I suppose.

  • Download it here, unpack and run
  • Go to Menu -> Edit -> Add to create a new game profile
  • Enter path to the game you wish to run
  • Untick Run in window if you would like to run the game in fullscreen mode
  • Go to Video -> Resolution and set it to monitor's native resolution
  • Under DirectX -> Filtering select Full Bilinear
  • Click Ok, select newly created profile, select Menu -> File -> Run to start the game
  • If the game does not work, select Menu -> Edit -> Modify and try tweaking other parameters therein.
  • Documentation for DxWnd is here

In theory, I guess it would not be too hard to implement scalers like 2xsai in DxWnd, and the source code is open, but it is still some work someone would need to get done...

Starcraft (v1.16 and below) hacks

Please read the message on top of this post.

Some resolution expanders (i.e. see more of the map but with original resolution) are available for this game:

Those should have basic instructions included. Most require StarCraft to be updated to latest non-remastered version (1.16.1).

Totally Insane Kludge

This is pure madness, but in theory you could:

  • force your video-card to recognize a non-existing monitor
  • make your game draw picture to its screen (which you won't see)
  • get a DirectX screen grabber (such as those used to stream youtube videos) to stream your invisible screen
  • open the video stream with a video player on a normal monitor
  • load FFmpeg libmpcodecs' hq2x, 2xsai or similar filters (if those even work on Windows OS)
  • Expand the player window to fullscreen and then alt+tab to your actual game

You would then look into a video player streaming video from your game from your own computer. It wouldn't work if the game requires hardware mouse cursor, it would also have a small delay.

I realize this is ridiculous and never tried it. I'm totally unsure if this could actually work. If it so happens that there is someone who in fact thinks this method is even worth a try, please comment.

4
  • Thank you for the programs, that's exactly what I need: not a patch to a particular game, but a software, which will intercept an output stream, and modify the picture (whatever is it, maybe not even a game), before it goes to screen. DxWnd is open source, so, I think, I can add 2xSAI to it.
    – JustLogin
    Commented Aug 2, 2016 at 18:44
  • Then yes, DxWnd is probably the closest you can get. But it is far from being universal. It would be really great if you manage to implement a scaler in it!
    – Jack White
    Commented Aug 2, 2016 at 20:35
  • Edited to prevent "new" starcraft confusion. I realized that it is several years too late but also remembered that you could in theory hook to screen compositor aka DWM.exe to access entire screen (resolution changes must still be intercepted with detours or something). This is seems to be a proof of concept of DWM hooking - github.com/steeve/dwmaxx2 - demo at youtube.com/watch?v=Fpvh16VjrRE
    – Jack White
    Commented May 3, 2018 at 18:39
  • DxWnd supports a scaler now, HQ 2x-4x among others.
    – ade.se
    Commented Jan 27, 2019 at 13:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .