DxWnd 1.034 released

I’ve released a new version of DxWnd (requires the VC8SP0 CRT) – version 1.034. This is a minor release that, among fixing a couple of various bugs and some internal code cleanup and reorganization to build under VC8, adds a new feature: Video output rescaling.

I recently got a nice 20.1″ LCD to use as a second monitor for my main laptop at home. Unfortunately, I discovered that a lot of my old favorite classic games tended to do not-so-great things to your desktop color depth when you run them natively (in fullscreen mode), which while you might normally not care about, turns out to be a real bummer if you have something like an IM client or whatnot up on a second monitor.

So, I turned to a program I had written a couple of years ago – DxWnd. DxWnd is a program that lets you run DirectDraw 7 (or below) programs that only support fullscreen mode in a window. It accomplishes this by hooking various DirectDraw APIs and tricking the program into thinking that it is running at 640×480 (or whatever resolution it wants) fullscreen, when it is in fact running in a plain window at that resolution. Unfortunately, while DxWnd solves the color depth issue, running games at 640×480 on a 1920×1200 desktop is not really the best experience. Thus, I set out to make a couple of minor modifications to DxWnd to support rescaling the output. These are fairly simple in principle:

  • Use StretchBlt instead of BitBlt to copy data from the DirectDraw surface that the program writes to into the GDI device context associated with the actual window I am displaying on screen. The reason why I perform this extra buffering step in the first place is that GDI provides nice automatic palette conversions from DirectDraw surface DCs to plain desktop window DCs. Changing the BitBlt to a StretchBlt simply rescales the current video image to a new resolution as it is copied for display purposes.
  • For programs that call ScreenToClient / ClientToScreen / MapWindowPoints (or deal with mouse cursor coordinates), but do not correctly handle the fact that their program’s client area may not be centered at (0, 0) (after all, the program was written to only run in fullscreen mode, so normally this shortcut can be taken), DxWnd needs to alter the lie it tells in these functions. Previously, DxWnd would “fix up” the coordinates that get returned to a program (or that a program gives to Windows) so that the program only sees things centered at (0, 0). Now, in addition to that, DxWnd needs to scale these coordinates either from the real output resolution to the resolution that the program appears to be running at, or vice versa, depending on whether the coordinates are going “into” or “out of” the program. This does have one unfortunate side effect, which is that relative to a program that natively supports a given resolution, there is a perceived loss of precision when you move the mouse pointer in the rescaled video output window. This is because mouse cursor coordinates must be rescaled to values that are relative to the resolution that the program is expecting to be running at. For example, if you are running at twice the program’s native resolution, and the program draws a custom mouse cursor, then the cursor may only appear to move every two pixels that you move it instead of every one pixel (like you might expect).
  • For programs that use DirectInput for mouse coordinates, these coordinates also need to be scaled so that they are relative to the virtual screen at (0, 0) that the program expects all coordinates to be relative to.
  • Since we are scaling the output of a program, DxWnd can now allow the user to resize, maximize, or restore the window it creates to contain the video data from the program being hooked. For programs where the user has asked DxWnd to capture the mouse to the client area of the video output window, the mouse cursor capture needs to be recalculated if the window size changes (otherwise, you could not move the mouse cursor outside of the original window size).

With the new DxWnd, I can play some old classics like Master of Orion 2 or Privateer 2 rescaled to my desktop resolution on one monitor while still using a second monitor for things like e-mail or IM – and, without the color depth on my auxiliary display being reduced to 8-bit (or worse). There is some more information about DxWnd on the corresponding topic on the Valhalla Legends forum, if you are interested.

56 Responses to “DxWnd 1.034 released”

  1. tom vanhoof says:

    how u do windowed ms

  2. thanh says:

    hey can some one teach me how to download this ?

  3. Snowie says:

    Tom, don’t be a fucking a retard.

  4. Aaron says:

    Huh… none of the links to valhallalegends work for me. Is that site down? I’d really love to have a copy of this program. I’m a huge MoO2 fan.

    If the site’s down, maybe I could talk someone into e-mailing me a copy?

  5. Skywing says:

    The DNS server is (temporarily) offline, unfortunately, which is why it isn’t reachable.

  6. Aaron says:

    Looks like it’s back up. Got a copy. Thanks :)

  7. Skywing says:

    Ah, interesting that there are still people who play MOO2 out there, anyway. Some time ago, I was working on developing something to inject netplay into MOO2 via hacking up the serial play interface; I never fully finished the project, however.

  8. Question Man says:

    how do i get mapel into a smaller screen so i can click on the hacks easyer

  9. parrotslave says:

    Thanks for the outstanding application.

    Thanks to you I can play SMAC and mud at the same time.

    Is there any chance you’ll make it work with newer games like Civ4?

  10. AXvirtue says:

    Er. I need some help to window maple story… A friend sent an older version I think. I deleted it and downloaded the one from the above link, but I can’t quite seem how to figure it out, as there was no readme bundled with the .rar, like my other version was. Please help me out. >

  11. Steve says:

    Thought I’d give this a try with Fallout II, and it works pretty good except for the FMV. I get perfect sound, but video goes to black which pretty makes it unplayable. Do you have a possible config solution?

  12. Skywing says:

    I don’t have Fallout II here, so I don’t have any specific advice for it unfortunately. You could try playing with the force 8/16-bit color depth options (not sure offhand which color depth Fallout II is intended to use at fullscreen, but you’d want to pick the correct one or you won’t see anything) and see if that produces any change.

  13. Patrick says:

    Yeah I am trying with Fallout as well and no matter what I do the FMV will not work. I can get you a copy for testing if you would like.

  14. Blaze of x86 says:

    Thanks for the new version of the program; I’ve been using an older version for a long time and stretching the output is pretty nice on my 1400×900 screen. :)

  15. joakim says:

    Hey, anybody cared to send me the latest dxwnd? Site’s down, again. Zip it down and ship it to skjefstad_joakim at hotmail dot com.
    I would appreciate it. Cheers.

  16. Skywing says:

    It should be up in a few hours. The server hosting it is in the middle of being moved to a different location.

  17. O'Neill says:

    Doh its the 26th now and the sites still down :( any alt sites for this yet?

  18. IAMNUM1 says:

    yeah, i cant download it either cause sites down, can you get it back up fast?

  19. The site is still down. The latest version is 1.035, but I can only find 1.032 on other sites. Are you considering adding the resizing to the StarCraft patcher as well, or at least add a flag for 800×600 and 1024×768 options? This could be done with -86 or -768 flags. Maybe for 1.036? Get the latest version back up ASAP PLEASE! :-) You could host it here, couldn’t you? If not, I can host it no problem.

    Thanks again for such a great program! I will blog about it when the site is back up.

  20. Skywing says:

    I’ve temporarily rehosted the files; the link at the top of the post should work now.

  21. Vlyxnol says:

    hmmm… followed your instructions to set this up and every time i run it i get a “This application has failed to start because the application configuration is incorrect…..”

    i’ve used this in my “Target” : D:\Games\Starcraft\DxWnd\DxWnd.exe “D:\Games\Starcraft\starcraft.exe” “D:\Games\Starcraft\DxWnd\Starcraft.dxw”

    I thought maybe it is because i do not have “requires the VC8SP0 CRT” installed.

    If this is the case… I have tried to install it.. but every time i get “error 1723. There is a problem with this Windows Installer Package. A DLL required for this install to complete could not be run…..”

    Any ideas would be greatly appreciated… I too have troubles with 640×480 res’d games.

    Thanks,

    Vlyxnol

  22. Skywing says:

    Yes, that typically means that you don’t have the CRT installed. That is a generic error that is thrown when a manifest dependency is missing.

    If you can’t run the CRT redist package, you may need to update Windows Installer to v3.1. See this link: http://www.microsoft.com/downloads/details.aspx?familyid=889482FC-5F56-4A38-B838-DE776FD4138C&displaylang=en

  23. Vlyxnol says:

    Thanks that worked!

  24. Cyt93 says:

    Who can teach me how to download Dxwnd of MapleSea??

  25. radhys says:

    erm…i dloaded the program…..question is…howta use it with maplestory??

  26. £L1†£ says:

    sry and all…but DXwind does no longer work for maplestory, or Halo, or even Counter Strike….thank you for reading this and i hope that it helps you in the future =]

  27. Clean Cheese says:

    ok listen to this,

    I download’d like 10 vertions of DXwnd and none work on my laptop its like bran new and it runs vista can Dxwnd work for vista cause it workes on my old computer not this one and i want to no why cause windows supports it but the file cant contrackt it or reflect the files.

  28. Skywing says:

    Yes, DxWnd supports Vista. Make sure that you installed the correct CRT (see the link at the top of the post).

  29. like i said before, DXwind does not support Maplestory anymore, my friend is the creator of DXwind, and he would have to make another copy of it, heis working on it though. It should be released on http://www.mpcdownloads.com in about 15 day, i hope that i have helped you guys (again)

  30. […] in a window. That’d be the best thing for your problem. To run Starcraft in a window you need DxWnd. Here is a direct link to the download (requires the VC8SP0 CRT. Id recommend going to the site […]

  31. […] in a window. That’d be the best thing for your problem. To run Starcraft in a window you need DxWnd. Here is a direct link to the download (requires the VC8SP0 CRT). Id recommend going to the site […]

  32. Jon says:

    Im not sure if i am even using it right. First i download it. Then i downloaded the vcredist_x86.exe and installed it. I proceeded to unzip dxwind.zip and put in on my desktop. Opened DxWnd.exe. Selected Starcraft/Diablo I/ Warcraft II and selected run.
    C:/program files/diablo/diablo.exe

    “This application has failed to start because MSVCR70.dll was not found. Re-installing the application may fix this problem.”

    I hit OK, It comes up again, I hit OK, then:

    “ScWnd.hdl must be placed in either the Starcraft directory or the DxWnd directory in order to use this extension.”

    I hit OK and thats it. Am i doing something in this process wrong?

  33. Skywing says:

    You’ll have to grab the VC7 C runtimes (for instance, from http://www.valhallalegends.com/files/vc7_crt.zip) and place them in your system32 directory. This step is required because the Starcraft patcher module was not rebuilt using VC8.

    BTW, I should also point out that Diablo 1 support is not something I fully tested and I’ve had reports that it doesn’t work completely (don’t have D1 installed anymore and I haven’t really had time to fix it anyway).

  34. Batch says:

    Hi I have heard guys using this software to get Warcraft 3 in window mode, but I just can’t seem to figure out how to do it. Can anybody help me? I tried almost all the options..

  35. Skywing says:

    I seem to recall Warcraft III having a built-in option for windowed mode (try “-w” on the command line, perhaps). There shouldn’t be any need to use DxWnd if my recollection there is correct.

  36. Diablo1 says:

    Yes. it doesn’t work completely with DIABLO1. I had older version which doesn’t work too.

    D1 just runs in fullscreen.

  37. Batch says:

    The reason I want Warcraft 3 to run in this program is that the built in windowed mode doesn’t allow you to scroll properly in window mode.

    Any one can help me get Warcraft 3 to work in windowed mode with this software?

  38. Derek says:

    Hi there is there anyway to get this to work with Voyage Century Online? I have gotten it to work with the 1.2 ver. but it has not mouse! Also with the new ver. of this program it will not intercept the program when it starts. Thats sucks because VCO has to go through a update program first then it starts the game. If you would be willing ot take a look at it and get a fix for it, that would be great.

    Derek

  39. NEED HEP says:

    back to the maplestory, when i open dxwnd it doesnt ahve edit and add its just this little square with configure,run, and 3 little selections, anyone know why

  40. Just a Plain guy says:

    Hello guys?
    I hope you can help me.
    I am in need of an Auto Clicker (AC) and i heard from some freinds that it is requirred to run in DxWnd.
    I saw on some other site a lots of people said that it was a Keylogger (Not that i think it is)
    How can i ge it to work- Im not that good at english-
    And DOES it work in Europe MapleStory?
    My freind says that he has it, but someone here posted that you cant use for Maple- Reply please.

    I need desperately help.

  41. Pomax says:

    If anyone has figured out how to resize DxWnd windows, I would love to know. As Ken points out, playing a 640×480 game on a high resolution isn’t quite as tasty as running it streched to 1~2 times original size, but there are no options in DxWnd itself for this, and the window frame does not allow resizing so…

    If anyone’s compiled a configuration for it that forces the initial window size to 800×600, 1024×768, 1280×1024 etc, it would be lovely if those configurations were linked to in the comments somewhere for others to download =)

  42. Cyclone says:

    Trying to get this to work with Master of Orion 2…have to admit I’m more than a little retarded when it comes to computers. Help?

  43. abdul says:

    whats the password to extract?

  44. AuSEA says:

    hihi, i’ve been trying this programme out on audition sea,
    any ideas on how to make it work? i follow the instructions and it juts gets me back on full screen =(

  45. […] Nynaeve » Blog Archive » DxWnd 1.034 released __________________ Got SC/SCBW Maps Upload them to Oh Hai Maps! Suffering becomes beautiful when anyone bears great calamities with cheerfulness, not through insensibility but through greatness of mind. -Aristotle […]

  46. […] Nynaeve » Blog Archive » DxWnd 1.034 released there is skywings blog you can read it there and download from the hyperlinked text __________________ Got SC/SCBW Maps Upload them to Oh Hai Maps! Suffering becomes beautiful when anyone bears great calamities with cheerfulness, not through insensibility but through greatness of mind. -Aristotle […]

  47. Grom says:

    So how do you get Starcraft to run above 640×480 (eg. 1280×1024)?

  48. Szoopen says:

    How i can launch StarCraft in window using this? I was checking ‘launch in 256 colors mode’ but it didn’t help. Maybe problem is that i have Brood War?