Menu

Theocracy crashes

Grab
2016-09-20
2022-01-19
1 2 3 > >> (Page 1 of 3)
  • Grab

    Grab - 2016-09-20

    Hello. I tried to use DxWnd(newest version) with Theocracy to play it in window but it's not possible. Theocracy crashes(theocracy-0.6.85.exe stopped working) no matter what. Black screen after running. Same thing in fullscreen and windowed mode.
    I tried to disable everything - nothing.
    I followed these(https://sourceforge.net/p/dxwnd/discussion/general/thread/c0259953/) instructions - nothing.
    Any chances for fixes?

     
  • gho

    gho - 2016-09-21

    Many thanks for this notification: this is one of the rare games that uses the IID_DirectDrawFactory class! So far I knew about one single game, "Whiteout" (see https://sourceforge.net/p/dxwnd/discussion/general/thread/e9640a75/#d4ca ) and Theocracy is the second one.

    I understand that you may not bother about this technicality, but I'm going to try to understand better what's going on behing the scene and make a proper fixing. Since it may take a while, maybe you could download from the SF area some older DxWnd release, since this game usesd to work quite well in the past.
    In any case, please stay tuned 'cause I'm goig to try to handle this case properly!

     
  • Grab

    Grab - 2016-09-21

    Thanks! I know that Theocracy is game of "special care" :D.
    In small Theocracy community we had guy who tried to move Theo to window mode and high resolution but hes offline for few months.
    Thanks for your answer, I'll wait for fix!

     
  • gho

    gho - 2016-09-22

    It has been more complicated than expected, and maybe the job is not finished yet, but it was also a good chance to learn something (weird!) about ddraw and ddrawex. In addition, now I was able to see the game movies that (I don't remember why) I never saw before and are really gorgeous.
    In attach the fix to play the game, waiting for a stable (sic!) release. There is also an exported file with the two tricks necessary for the game:
    1) force cursor clipping to make the game playable
    2) DirectX version set to 1~6 to force hooking of the ddrawex.dll, otherwise the intro movies will set the program in fullscreen mode.

    Please, enjoy and please me with some hopefully positive feedback: I tested the game on Win7, hopefully it may work also on Win10.

     
  • gho

    gho - 2016-09-23

    Changes made on thee beta above were included in latest release v2.03.87, so you may download and use this one. But a quick test I made on Win10 showed different problems, including a lock error dialog box that appears both with and without DxWnd. I'm not sure if this is (hopefully) a problem of my environment only, but just in case be aware that the work may be not finished yet ....
    @Grab: How things are going?

     
  • gho

    gho - 2016-09-23

    Fixed. Win10 reacts differently from the other systems, and the settings that works perfectly on Win7 seem to block the application forever. It is strange, and could easily impact other games, but at least for Theocracy I found a neat and clean solution.
    It is necessary to replace the dll in the last distribution v2.03.87 with this one, then (IMPORTANT!) avoid to set the "DirectDraw version hook" to DirectX1 and leave it to the default "Automatic" value.
    This way the game worked gorgeously on my Win10!

     

    Last edit: gho 2016-09-24
  • Grab

    Grab - 2016-09-26

    That works! Thank you for fixing Theo! I'll explain other people how to use DxWnd for Theocracy now.

     
  • Anonymous

    Anonymous - 2018-02-17
     

    Last edit: Anonymous 2018-10-20
    • gho

      gho - 2018-02-17

      Curious: now Theocracy changes the screen resolution on Win10, probably because of the intro movie. Who knows why it ceased to work, the problem appeared also with some old DxWnd release!

       
  • gho

    gho - 2018-02-18

    Uhm ... I think I posted something ... where's it gone?

     
  • gho

    gho - 2018-02-18

    In short: the game is peculiar, uses this ddrawex interface. I added a missing hook to the created DirectDraw session, but this operation isn't too "safe" and makes the primary surface emulation not working. The problem occurs when creating the service surfaces, so using a SDL emulation fixes the problem, though this way the movies become awfully slow. Definitely the whole thing has to be arranged better.
    P.s. "Wipeout" (the other game mentioned above ..) has similar problems too!
    @SnD: does the game run in window on XP? I suspect the video resolution may depend on something changed on Win10, but I'm not sure ...

     

    Last edit: gho 2018-02-18
    • Anonymous

      Anonymous - 2018-02-19
       

      Last edit: Anonymous 2018-10-20
  • gho

    gho - 2018-02-19

    Thank you for bringing my attention to this problem: it seems I introduced a bug in v2.04.54 affecting all ddrawex games (so far, Theocracy and Whiteout the only known ones).
    The CD version seems more robust than the demo version, but Win+D and recover may move the game window to a different position where it's not possible to blit to screen. If this is causing problems, setting video position mode to "Anchored" may fix the problem.
    Please, try this new beta: here on Win7 makes the game working as before.

     
    • Anonymous

      Anonymous - 2018-02-19
       

      Last edit: Anonymous 2018-10-20
  • gho

    gho - 2018-02-19

    Very good. I'm about to post v2.04.66, exactly the same files as the last beta.
    But there's a little bonus that may please people with performance issues: in the archive there is also a dxwnd.stream.dll file, the same dll but compiled without any sort of logging. This way you save almost half size (555K rather than 932k) and a huge lot of 'if' statements to decide you're not interested to logging. To use it you just have to rename dxwnd.dll to any different name and rename dxwnd.stream.dll to dxwnd.dll. Of course, in case of troubles you'll have to recover the original dll and get some logs. Enjoy ...

     
    • Anonymous

      Anonymous - 2018-02-19
       

      Last edit: Anonymous 2018-10-20
  • Grab

    Grab - 2018-05-27

    What happened here?! Does newest DxWnd support Theocracy or do I still need to use special DxWnd you sent me in 2016? I am working on Theocracy Discord and wanted to make post about DxWnd fix.

     
    • Anonymous

      Anonymous - 2018-05-27
       

      Last edit: Anonymous 2018-10-20
  • gho

    gho - 2018-05-27

    Cloudstr always likes joking .... Due to personal problems and poor social support, but mainly because a dumb smartphone, I sometimes find it hard to post a reply.
    Current DxWnd v2.04.78 seems ok with Theocracy, but the export file is bugged. I got good results with this one in attach, that differs from the old file by only the "DirectX version hook" selector set to "Automatic". Here in attach, anyway.
    Please, let me know if it doesn't work as expected.

     
  • Grab

    Grab - 2018-05-29

    Export works fine for me. There is just one bug, cursor is flickering especialy when moving mouse. It is pretty annoying.
    Also FPS are pretty bad in game. I have like 65 FPS after starting campaign. This is not big problem because game itself is "slow working" like slow camera movement, etc. Just saying.
    Also, would it be possible to run Theocracy in fullscreen but with original 4:3 ratio and black bars on sides? Like this:
    https://imgur.com/a/HAmBqEv
    If you wan't fast communication join me on Discord: https://discord.gg/aWdKzbd

     
    • gho

      gho - 2018-05-29

      Also, would it be possible to run Theocracy in fullscreen but with original 4:3 ratio and black bars on sides?

      This game can be run with "Keep aspect ratio" and fake fullscreen mode "Desktop work area", but doesn't work with "Hide desktop background" that is supposed to create black bars to get the effect you asked for.
      But you can run the blacker tool (DxWnd -> Tools -> Run "blacker") that does the same trick, but as an external probram that does not interfere with the game. The blacker can be left running in background, it will surround every game you start by DxWnd until you will terminate it.

      p.s. "blacker" is in last DxWnd v2.04.78 release only ...

       

      Last edit: gho 2018-05-29
  • Grab

    Grab - 2018-06-28

    Hey, it is me again. I started playing Theocracy after long time and it still crashes. Same error happens just after playing for some time, 2-10 minutes.

     
    • gho

      gho - 2018-06-28

      Let's see ... you may set loging options like in the screenshot here attached. This will provide a circular buffer in two log files (dxwnd.log and dxwnd.0.log) with detailed logs of the last operations. When the game crashes, the error should be there, in either one or the other log file (send them both, of course) ...

       

      Last edit: gho 2018-06-28
  • Grab

    Grab - 2018-06-28

    Well, I was playing for few hours now and there is no longer this error but game freezes and need to kill process to stop it. Here are crash logs:

     
  • gho

    gho - 2018-06-29

    Well, what's going on is pretty clear: the game keeps refreshing the video by looping with these operations, that you can find countless times:

    Lock(1): lpdds=99a108(PRIM) flags=1(DDLOCK_WAIT) lpDDSurfaceDesc=6c0df8 rect=(NULL)
    Lock: lPitch=1600 lpSurface=91b3028 SurfaceDesc: [Locked] Flags=100f(DDSD_CAPS+HEIGHT+WIDTH+PITCH+PIXELFORMAT) Width=800 Height=600 Pitch=1600 Caps=840(DDSCAPS_OFFSCREENPLAIN+SYSTEMMEMORY)  PixelFormat flags=40(DDPF_RGB) BPP=16 RGB=(f800,7e0,1f)
    Unlock(1): lpdds=99a108(PRIM) lpvoid=0
    Unlock: dest=99a108(PRIM) src=99a108(PRIM) dwFlags=0() destrect=(NULL) srcrect=(NULL)
    [BACK2PRIM] src=(0,0)-(800,600) dest=(193,0)-(1634,1080) at 436
    GetSurfaceDesc(1): lpdds=99a088 SurfaceDesc: GetSurfaceDesc Flags=100f(DDSD_CAPS+HEIGHT+WIDTH+PITCH+PIXELFORMAT) Width=800 Height=600 Pitch=3200 Caps=840(DDSCAPS_OFFSCREENPLAIN+SYSTEMMEMORY)  PixelFormat flags=40(DDPF_RGB) BPP=32 RGB=(ff0000,ff00,ff)
    Unlock: done ret=0 at 441
    Unlock OK
    

    At a given point, the log changes and you start to see this instead, more and more frequently:

    Lock(1): lpdds=99a108(PRIM) flags=1(DDLOCK_WAIT) lpDDSurfaceDesc=6c0df8 rect=(NULL)
    Lock: lPitch=1600 lpSurface=91b3028 SurfaceDesc: [Locked] Flags=100f(DDSD_CAPS+HEIGHT+WIDTH+PITCH+PIXELFORMAT) Width=800 Height=600 Pitch=1600 Caps=840(DDSCAPS_OFFSCREENPLAIN+SYSTEMMEMORY)  PixelFormat flags=40(DDPF_RGB) BPP=16 RGB=(f800,7e0,1f)
    Unlock(1): lpdds=99a108(PRIM) lpvoid=0
    Unlock: dest=99a108(PRIM) src=99a108(PRIM) dwFlags=0() destrect=(NULL) srcrect=(NULL)
    EmuBlt: Lock ERROR res=887601ae(DDERR_SURFACEBUSY) at 3208
    sBlt ERROR: Color conversion failed res=887601ae(DDERR_SURFACEBUSY)
    Unlock ERROR res=887601ae(DDERR_SURFACEBUSY) at 4280
    Unlock OK
    

    In this situation the game is working, but the screen is not refreshed, so you have the impression of a blocked program.
    Now the difficult part: why this happens and what to do?
    It is possible that the problem is due to a too frequent (and not syncronized) video update rate, possibly also because of the "Auto primary surface blit" flag that forces a continuous video refresh. I don't remember if that flag can be safely avoided (maybe it was for initial menus only?) or not. There are several things one may try, I'll try some of them as soon as I will have a chance:

    • turn "Auto primary surface blit" flag off
    • try switching some flag in DirectX(2) section, like vSync or Flip/Blit wait options
    • try defining a FPS limitation in the Timing / Frame per Second section
    • try to find a programmatic solution to unlock the busy resource (a thing that is less easy than it seems!)
    • learn how to blindly save the game session (though the screen doesn't refresh, the game should work underneath), terminate and start the game from the saving point.

    work in progress ...

     

    Last edit: gho 2018-06-29
1 2 3 > >> (Page 1 of 3)

Log in to post a comment.