Menu

Warcraft 2 BNE Crashes on start

DaFox
2015-02-21
2015-03-12
  • DaFox

    DaFox - 2015-02-21

    Using DxWnd 2.03.11 and the included "Warcraft 2 Battlenet Ed.dxw"

     
    • gho

      gho - 2015-02-21

      I tested it, and the game is not crashing on my pc.
      Neverthless, the exported file misses one flag to cope with aero mode, so the attached one should be used instead.
      I tested it on Win7: maybe Win8 is more "delicate"... what platform did you test the game with?

       
      • DaFox

        DaFox - 2015-02-23

        Hmm Weird, I'm on Win7 x64. I wonder are you guys all testing on the latest patch (2.02)?

        I tried redownloading DxWnd and importing this new .dxw file, changed the Path to my war2 and that's it.

        It crashes as soon as the little animated DxWnd logo goes away.
        If I uncheck "Run in Window" it works fine. (though somewhat pointless)

        Might just be a weird issue with my system. I'm not too fussed about it.

         

        Last edit: DaFox 2015-02-23
  • aqrit

    aqrit - 2015-02-21

    War2 BNE works okay here ( though I might be using custom dxw settings )

    Except, on the battle.net screen itself... there is missing child-window text.

    On the Battle.net screen... it appears to be using BeginPaint and GetDC to draw text using GDI.

    Theoretically, those DC's should be redirected to the emulated primary surface?

    (same problem as broodwar? )


    Other than that the game appears to be pretty much a straight port from DOS... it only uses ddraw to get a pointer to the video memory of the primary surface.

    I've been trying to get my ddwrapper to covert the game to 32bpp but also keep the GDI text without hooking GetDC and BeginPaint...

    basically if I hijack one of the palette entries I can TransparentBlt only the changes to the screen, which prevents the GDI text that is only on the real primary from being overwritten. This works but I'm not thrilled with it.
    http://bitpatch.com/downloads/war2_ddraw_test.zip

    *edit formatting, spelling

     

    Last edit: aqrit 2015-02-21
  • ilwar2

    ilwar2 - 2015-02-22

    Nice job, aqrit, thank you for your research!
    What i can say about your war2_ddraw_test:

    1. it definitely helps with color fix for win7 same as your previous ddwrapper project.

    2. When alt-tabing from game (and chat also) and back to game it definitely keeps proper palette for both ingame screen and chat buttons. (Previous version broke chat background in most cases).

    3. it works the same way for both winxp and win7. I have no win 8/8.1/10 now, so i'll check it in several days (after i install that versions) and append my report.

    4. Severe problem found: try to press PrtScr while being ingame or in bnet chat. Screen should blink and the file screenXXX.PCX appears in your game directory then.
      When your fix applied, you will see an emply cyan screen instead of ingame srceenshot and empty purple screen instead of chat screenshot.
      You previous version broke bnet chat text and buttons keeping chat background and made proper ingame screenshots also.

    5. Small problem found: sometimes alt-tab breaks the palette for banner in bnet chat lobby.
      Repeated alt-tab doesn't fix it. Banner rotation probably fixes it. Not sure about other problems with banner palette. Previous version caused white background for chat text during banner rotation (very rear), so looks like banners are being handled by some additional layers and banner palette requires to be fixed.

    So, thanks a lot for your forces with your research: war2 community appreciates your part in your research. This version is much better than anything else, the only big problem is screenshots and another small problem is banners.
    I'll also test your fix for win8, 8.1 and 10 in several days and let you know.

     
  • ilwar2

    ilwar2 - 2015-02-22

    I also just installed win 8.1 pro vl x64 and win 10 enterprise technical preview x64 and got this behaviour for both:

    Clean war2 (without ddraw fixes) works fine in game and in menus, alt-tab works fine too.
    Clean war2 have 3 problems in chat:
    1. bnet icons (in the players list, right part of screen) are not displayed.
    2. Letters above chat buttons have black background (not transparent), that looks like black square around each word above each button.
    3. Also prtscr works fine in game, but saves only chat background and chat icons.
    Your ddraw_test fix changes nothing in 1,2,3, and it also forces cyan and purple empty screen during ptrscr.

     

    Last edit: ilwar2 2015-02-22
  • aqrit

    aqrit - 2015-02-22

    sorry didn't mean to set off a round of testing :)
    that was just a proof-of-concept while I poke around.

    What I'm thinking is:

    Detect Battle.net Screen via FindWindow().
    On Lock() of the emulated primary, make a copy of it.
    On Unlock() compare with the above copy to create a mask of changed areas.
    Then only upload the changes to real primary.
    This should fix the in-game screen shots, both because we won't be doing this in-game
    and also because it will leave the fake primary 'intact'.
    It is also a "cleaner" solution than setting one of the palette entries to transparent.

    I don't think the battle.net screen shot is fixable without adding our own print-screen handler.

    1. [Win8] Letters above chat buttons have black background (not transparent), that looks like black square around each word above each button.

    This is a problem I saw with with some other wrappers, I'll look into it when I get that far.

    alt-tab breaks the palette for banner in bnet chat lobby.
    Repeated alt-tab doesn't fix it.

    hmmm....


    btw, I tried signing up for http://www.forum.war2.ru/ but never received an activation email, and also the url without without 'www' doesn't resolve -> http://forum.war2.ru/

     
  • ilwar2

    ilwar2 - 2015-02-22

    I see, and your proof-of-concept demonstrated the best results as against any other solutions!

    I'm sorry, looks like i'm not so experienced to comment your thoughts:
    Not sure why such hacks for Lock & Unlock should fix in-game screenshots...
    I hope on any possible solution from your side to check that...

    That's sad about print screen in chat. My only idea was to check the caller functions for each wrapped function and skip any fixing for calls from printscreen hanlder.
    But it will mean chat screenshot in win 8.1-10 will be still unfixed.
    I also have no idea what do your wrappers break in screenshots making...

    I'll send you any screenshots you need to show how it's going.

    about forum: www.forum is just the CNAME or forum, wondering how it can be failed to resolve.
    Thank you for your feedback about possible problem found for forum.war2.ru registration: probably some spam false-positive problem. As i checked that should work for each mail domain, just goes into spam folder for hotmail.com and outlook.com...
    Sorry for our moderator deleted your account as inactive, please, try to register again, i can confirm it manually if you get some email delivery problems...

     
  • aqrit

    aqrit - 2015-03-12

    letters have black background.

    This is caused by DWM Desktop Composition.
    Drawings on a ScreenDC no longer appear in a WindowDC.

    "GDI DC of an HWND, it no longer is the DC of the primary video buffer" [1]

    (AFAIK) The solution is to copy the fake primary ddraw surface into all top-level windows... instead of onto the screen. War2 uses WS_CLIPCHILDREN, hopefully GetDCEx will let me ignore that.

    [1] http://blogs.msdn.com/b/greg_schechter/archive/2006/05/02/588934.aspx


    www.forum is just the CNAME of forum

    It worked after I cleared my DNS cache, sorry for the false report.
    I was also able to log in to forum.war2.ru, thanks.

     
  • ilwar2

    ilwar2 - 2015-03-12

    Thanks a lot for your research, aqrit!

    Do you plan to release some working code for DWM Desktop Composition amd especially for print screen fixing (ingame at least)?

    Your previous war2_ddraw_test is perfect except prtscr, that is the only reason to not share it to community. Prtscr ingame is an important part of gameplay and being used to catch cheaters, so it's not possible to play without working thus.

    I'm not so experienced in windows graphics to release something based on your ideas easily, so i can read several thick books and try, but you are the main hope for the whole war2 (and probably starcraft) community.

     

Log in to post a comment.