Menu

Gothic 2 - Steam Version

Polomease
2016-07-29
2021-04-20
  • Polomease

    Polomease - 2016-07-29

    I was wondering if anyone has had any success in getting Gothic 2 to run with Dxwnd?
    I've been trying to get the steam version of Gothis 2 to run properly in a window but I'm not having any luck.
    I have the vinilla version Gothic 2 installed via Steam. By vinilla version, I mean that I haven't installed any mods or changed any settings in the .ini files or done any other manual changes.

    Here is my current profile and I got as far as getting Gothic 2 to run in a window but I'm still having problems.

    I've been keeping up with the documentation updates so I can learn what the settings do and I've been trying different things but nothing seems to work.

    Here a some of the issues I'm having
    Gothic 2 takes control of the mouse and cursor so you can't interact with any other program running and you can't move it's own window. When you try to using ALT+TAB it crashes with a X: XD3D_InitPerDX: Can't create D3DX context! Error: D3DERR_SURFACENOTINVIDMEM" error message.

    When starting a New Game it starts loading but after a minute or so it crashes with the below error. Which looks like it has to be something with the Steam gameoverlayrenderer.dll file. I tried disabling the Steam Overlay but it didn't help the only way I caould find to get araound this is to delete the dll in the Steam install folder but Steam just replaces the dll eventually.
    ======================================= UNHANDLED EXCEPTION OCCURED ======================================================
    ======================================= CRASH INFOS: =====================================================================
    Gothic II - 2.7 (eng), Parser Version: 50
    User: dpolomis, CPUType: 586, Mem: 1024 MB total, 1024 MB free
    Startup Options:
    =============================================== CALLSTACK : ==============================================================
    0023:0F6D6812 (0x00000112 0xB8EE266D 0x0082E6F0 0x1E7961AC) gameoverlayrenderer.dll, OverlayHookD3D3()+3106 byte(s)
    0023:707CD4D5 (0x00C9F260 0x036C2B20 0x00000000 0x008AE770) D3DIM700.DLL
    0023:00657476 (0x0082E6F0 0x1C52C034 0x08980034 0x00000000) Gothic2.exe, zCVertexBuffer_D3D::Optimize()+38 byte(s), P:\dev\g2addon\release\ZenGin_kurt\zRndD3D_VertexBuffer.cpp, line 313+20 byte(s)
    0023:005FCB9A (0x00000001 0x016FF788 0x08980034 0x00000000) Gothic2.exe, zCVertexBufferManager::UnlockOpenVertexBuffers()+330 byte(s), P:\dev\g2addon\release\ZenGin_dieter\zVertexBuffer.cpp, line 392
    0023:0062723A (0x016FF554 0x00000001 0x15FE97BC 0x00000000) Gothic2.exe, zCWorld::LoadWorld()+330 byte(s), P:\dev\g2addon\release\ZenGin_dieter\zWorld.cpp, line 2654
    0023:0077FDFD (0x016FF784 0x00000001 0x016FF9C4 0x15FE97BC) Gothic2.exe, oCWorld::LoadWorld()+669 byte(s), P:\dev\g2addon\release\Gothic_ulf\oWorld.cpp, line 447+13 byte(s)
    0023:006CA4ED (0x016FF9E8 0x0082E6F0 0x1C470034 0x15FE97BC) Gothic2.exe, oCGame::LoadWorldDyn()+589 byte(s), P:\dev\g2addon\release\Gothic_ulf\oGame.cpp, line 31820023:006C9455 (0xFFFFFFFF 0x016FF9C0 0x0082E6F0 0x016FFCA8) Gothic2.exe, oCGame::LoadWorld()+901 byte(s), P:\dev\g2addon\release\Gothic_ulf\oGame.cpp, line 2932
    0023:006C9455 (0xFFFFFFFF 0x016FF9C0 0x0082E6F0 0x016FFCA8) Gothic2.exe, oCGame::LoadWorld()+901 byte(s), P:\dev\g2addon\release\Gothic_ulf\oGame.cpp, line 2932
    0023:006C6C0B (0xFFFFFFFF 0x00000001 0x016FFCA8 0x00000001) Gothic2.exe, oCGame::LoadSavegame()+1051 byte(s), P:\dev\g2addon\release\Gothic_ulf\oGame.cpp, line 2237
    0023:0042A282 (0x00000001 0x0082E6F0 0x00000000 0x016FFCA8) Gothic2.exe, CGameManager::Read_Savegame()+578 byte(s), P:\dev\g2addon\release\Gothic_bert\oGameManager.cpp, line 1557
    0023:00429D02 (0x00000000 0x00400000 0x0026702A 0x016FFECC) Gothic2.exe, CGameManager::Menu()+2610 byte(s), P:\dev\g2addon\release\Gothic_bert\oGameManager.cpp, line 1492
    0023:00425C35 (0x0082F0EC 0x00000000 0x00370BF2 0x15FE97BC) Gothic2.exe, CGameManager::Run()+1029 byte(s), P:\dev\g2addon\release\Gothic_bert\oGameManager.cpp, line 713
    0023:007818AB (0x0000002C 0x00C1C103 0x00000073 0x00000000) Gothic2.exe, MainProg()+75 byte(s), P:\dev\g2addon\release\Gothic_ulf\Phoenix.cpp, line 111
    0023:00503290 (0x00400000 0x00000000 0x0026702A 0x0000000A) Gothic2.exe, HandledWinMain()+928 byte(s), P:\dev\g2addon\release\ZenGin_carsten\zWin32.cpp, line 1169
    0023:00502E1D (0x016FFED0 0x00000000 0x0026702A 0x0000000A) Gothic2.exe, WinMain()+141 byte(s), P:\dev\g2addon\release\ZenGin_carsten\zWin32.cpp, line 1054+17 byte(s)
    0023:007D4418 (0x00000004 0x0000FFFF 0x000000B8 0x00000000) Gothic2.exe, WinMainCRTStartup()+224 byte(s)”ò˜ å¯

    I'm running Win 7 64 bit with a Quadro NVS 295.
    I know it's a crappy card but that why I'm trying to run older games on it.

    Any help with this would just be awesome.
    Thanks.
    Dave P.

     
  • gho

    gho - 2016-07-29

    I can't test the Steam version, but I'll try the CD version, hoping that the problems could be similar.
    In the meanwhile, since the error refers somehow to the surface not in video memory, it could be useful to play with the following flags switched on/off :
    DirectX / Switch VIDEO to SYSTEM on fail
    DirectX2 / No primary SYSTEMMEMORY
    DirectX2 / No backbuffer SYSTEMMEMORY

     
  • Polomease

    Polomease - 2016-07-29

    I tried all combinations of the flags you mentioned and it still didn't work.
    I did notice that the error occurs when the game loses focus for any reason not just alt+tab.
    Hope to hear from you soo, let me know if there's anything I can do to help.

     
  • gho

    gho - 2016-07-29

    Good news: I tried with GOG release, and I got the very same problem, see here. Now it-s time to seek a solution ....

     
  • gho

    gho - 2016-07-29

    Perhaps I got it. It was a check on the surface capabilities that needed to be cheated pretending to be in video memory even if that's not true!
    The archive in attach should make the game working, as it works for me.
    Anyway, the game is rendered in 32 bit depth, so surface emulation is not necessary, and it sould be possible to run the game also with the unfixed dxwnd by setting dxwnd emulation to "none". This way the game would gain some speed too.
    I've got not enough time to test it, but hopefully it could fix your problems. Let me know in any case ...

     

    Last edit: gho 2016-07-29
  • Polomease

    Polomease - 2016-08-02

    Your update did help a lot but unfortunately I'm still having problems.
    Now that the alt+tab doesn't crash the game the issue is that the game takes exclusive control of the mouse/cursor and keyboard. When I alt+tab I can see the other windows get focus but the keyboard and mouse are still locked to the game, it's like the game does not release them.
    I've tried both the Release Mouse Outside Window and Unacquire Input Devices on Focus Lost flags on the Input tab but it didn't help.

    I also tried running with emulation set to 'None' and the game didn't even start.

     
  • gho

    gho - 2016-08-03

    I tried to run the game, replicate the exlusive mouse control problem and seek for illumination in the logs. I got this one while calling DirectInputCreateA:

    DirectInputCreateA: ERROR err=8007047e(unknown)

    this is the explaination I found on the net:
    error 8007047E = OLDDIRECTINPUTVERSION

    That could explain the problem: if the DirectInput session fails, the game recover by switching to GDI mouse API, but this way the patches for Acquire/Unacquire operations and all sort of DirectInput hooks are not activated. Someone reported that it could be a drive problem and directx should be reinstalled, but I can't see why this should happen for a single game only!
    Do you have the same problem? It is enough to activate logs and search for the DirectInputCreateA string in dxwnd.log.

    update

    Wait, perhaps I got it ... the call log tells
    DirectInputCreateA: version=800
    and that means that the program is trying to get a DirectInput8 handle by means of a GirectInput call: maybe this is no longer supported! Let me try a fix .....

    update 2

    Problem apparently fixed, now this attached patched release can succesfully start DirectInput sessions, but I still see no traces of directinput operations in the log. Something must be still wrong, in any case the alt-tabbing seems to work kind of differently.... it's hard for me to judge because my pc is not powerful enough to have no problems in any case, so I'll leave the judgement to you.

     

    Last edit: gho 2016-08-03
  • gho

    gho - 2016-08-03

    No way! The path above doesn't change much. The problem remains the same: the DirectInput devices handled in this way seem not hooked at all! So, if DxWnd doesn't hook the needed methods, of courde it can't do much more..... very strange.

     
  • Polomease

    Polomease - 2016-08-03

    Yeah, I just finished trying the the "Hook dinput" and "Hook diput8" flags and I never got the mouse to work correctly.

    As a side note, I have a question for you, I'm also a programmer and I know DXwnd is open source; Are there any notes or documentation on the source?
    Things like what each project is, how to setup your environment for debugging?

     
    • gho

      gho - 2016-08-03

      DirectInput here is puzzling: clearly the game uses it, but I can see no traces of DirectInput operations in the log, so something went wrong. I'm trying o understand what, but debugging with my portable and this Win7 bogus installation is a pain on the neck: it takes a lot of time just to start the game in debug mode, and when you're close to something, the debugger freezes!
      I was searching also for a directinput wrapper dll to produce logs: there are many for directdraw, but apparently none for directinput!

      About documentation, I'm sorry there is nothing of the technical type, right now the priority is ti finish the user manual (there is a partially up-to-date version in the help folder of recent releases), when this will be done maybe I could write something about internals....

       
  • gho

    gho - 2016-08-04

    Oh, I think I got it! Now some coding and then a patch to test....

     
  • gho

    gho - 2016-08-04

    Here it is: the problem was the hooking of the DirectDrawCreateEx call, completely wrong!
    Thank to this request, next release should fix all input handling of games making use ot DirectInputCreateEx calls instead of DirectInputCreateA/W or DirectInput8Create, I don't know how many on the total number of games, but for sure Gothik alone deserved the effort!
    In my pc things seem to work perfectly, setting "Hook dinput" and "unacquire input devices on focus lost" you have a free mouse to move on other windows, you can change focus by clicking and alt-tabbing, minimize and restore the game. The only thing is that upon surface lostcondition, the recovery takes some time (a few seconds), so you have to wait a little before judging the results.
    Here in attach the patched dll: please let me know if there are still problems.

     
  • Polomease

    Polomease - 2016-08-05

    I'm still having some problems.
    I can control the mouse outside of the game and activate other windows but moving the mouse makes the camera in the game move no matter where the cursor is.
    When I set focus to another window after a few seconds the game grabs focus again and when it does the keyboard no longer works in the game.
    I can't minimize or move the game window at all, after alt+tabbing out of the game and then clicking on its window the game inteprets that as if I had selected the highlighted menu item, usually New Game. This even happens if I click on the Task Bar button for the game window.

    It might be a good idea to send me the profile you're using this way I can make sure that the flags being used are the same. I attached my current profile in case you want to look at it.

    I just hope it's not a Steam vs GOG issue.

    Thanks again for taking time to work with me to figure this out, I really appreciate it.

     
    • gho

      gho - 2016-08-05

      No, it's not a Steam vs GOG issue: I'm experiencing more or less the same problems you reported. I didn't notice them before because it takes a while to finish the intro movies, loading screens and the initial dialog, but once I got to the free movement section, in effect things are like you described.
      In particular, the mouse is listened from the game whenever it is until the game lose focus. Clicking elsewhere could help, but in effect after a short while the game claims the mouse control again. I thing I could do something, I just have to find what, then do some coding.
      Stay tuned for news.

       
  • Polomease

    Polomease - 2016-09-01

    I've been keeping up with your posts on this forum and I know that you've been super busy doing all sorts of work but I was wondering if you had a chance to look into the input issues with gothic2?
    Being a programmer myself I know how tasks keep getting piled on one after another so no rush, just curious if you've made any progress.
    Again thanks for all your help with this.

    As for the Intro movies if you go to the install location of the game and in the System folder there's a file called Gothic.ini.
    In that file there's a setting called "playLogoVideos" set this to 0 and no intro movies.
    There's a lot of settings in there that have to do with graphics but I left them at the default values for using dxwnd.

    For example on my pc: C:\Steam\steamapps\common\Gothic II\system\Gothic.ini ->
    playLogoVideos=0

     
  • gho

    gho - 2016-09-01

    Finally my Win10 pc has been repaired! Now I have to recover the delay.....

     
  • MrPepka

    MrPepka - 2021-04-18

    Could I have a similar fix but for Gothic I? This game only shows a black window when started via DxWnd and only the sound is heard. I have an eXtra classic edition of Saga Gothic, but it's possible that even the GOG.com version is similar

     
  • MrPepka

    MrPepka - 2021-04-20

    I am attaching logs from this game. I warn you in advance that I have contaminated my copy of the game with mods like SystemPack, etc., but without mods, the game works similarly, i.e. it only shows a black screen

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.