elishacloud / dxwrapper

Fixes compatibility issues with older games running on Windows 10/11 by wrapping DirectX dlls. Also allows loading custom libraries with the file extension .asi into game processes.
zlib License
1.15k stars 82 forks source link

Armada 1 wiki instructions still lead to missing menu animations #240

Closed Lewiscowles1986 closed 6 months ago

Lewiscowles1986 commented 7 months ago

So I got the files from the wiki entry the game loads, but it also does without any of the wiki instructions using just DxWnd. It's probably DxWnd and this not being configured to work correctly, but DxWnd works without this (with this menu animation bug) and things don't seem to work the opposite way around.

I am running on an Apple M2, not a real windows 10 machine.

Wondering if anyone else has run into this.

dxwnd ini ``` [window] showhelp=NO expert=1 exepath=C:\GOG Games\Star Trek Armada\ title0=Armada [target] path0=C:\GOG Games\Star Trek Armada\Armada.exe startfolder0= launchpath0="C:\GOG Games\Star Trek Armada\Armada.exe -windowed" cmdline0= msshims0= icon0= module0= opengllib0= notes0= registry0= ver0=0 monitorid0=-1 filterid0=0 renderer0=3 coord0=1 flag0=136314922 flagg0=1276248080 flagh0=18 flagi0=138412068 flagj0=4226 flagk0=65552 flagl0=0 flagm0=33685504 flagn0=25165828 flago0=0 flagp0=10240 flagq0=0 flagr0=128 flags0=2 flagt0=0 flagu0=0 tflag0=0 dflag0=0 dflagb0=0 posx0=50 posy0=50 sizx0=800 sizy0=600 maxfps0=0 initts0=0 winver0=0 maxres0=0 swapeffect0=0 maxddinterface0=7 slowratio0=2 scanline0=0 initresw0=800 initresh0=600 fakehddrive0=C: fakecddrive0=D: cdvol0=0 codepage0=0 lang0=0 country0=0 commitaddress0=0 commitlength0=0 ```

Without DxWnd, it doesn't seem that the game will launch at all; I tried using the documentation here to flip various switches.

I imagine this is not OSx specific, but would benefit the wider Wine community; I just don't have any answers. I of course tried the bundled dxwnd from releases, having read the note that the compatibility with that wrapper needs a specific version.

elishacloud commented 6 months ago

I have never tested Armada 1 with DxWnd before. I also noticed that you are using the C:\GOG Games\Star Trek Armada\Armada.exe -windowed command from DxWnd. Have you tried using that command to load the game without DxWnd and just dxwrapper? I am just wondering if it is the -windowed that makes it run rather than DxWnd.

Ideally, it would be good to figure out what part of DxWnd makes the game load.

Also, can you try the debug build of dxwrapper without DxWnd and send me the log files?

Lewiscowles1986 commented 6 months ago

This might sound like a dumb question, but where would I expect to find the logs? I Get just the armada 1 window, and no errors, but nothing past the splash screen when using without dxwnd.

Is there a part of docs / wiki I'm missing a link to? Note: dxwrapper-game.log does not exist, and neither does any dxwrapper-*.log file https://github.com/elishacloud/dxwrapper#logging

Lewiscowles1986 commented 6 months ago

dxwnd.log I got this by running the dxwnd shipping with debug build and turning on all logs. TBH It seems the same as just running dxwnd It's also 10MB (I didn't even start game yet 😆 )

elishacloud commented 6 months ago

If dxwrapper is being loaded then you will see a file called dxwrapper-armada.log in the game folder. If you don't see that file then it means that dxwrapper is never loaded.

Lewiscowles1986 commented 6 months ago

So I know it's at least attempting to load, as I get a STDOUT saying that it's loading settings. This could all be that WINE is not Windows, but an emulator and some spookiness around that. The main reason I originally brought it up was because DxWnd works flawlessly; bar the fix for GDI and DDraw (which even newer windows suffer with).

Thank you so much; I can close, unless you feel very passionate about debugging with me.

elishacloud commented 6 months ago

I believe what is happening is that WINE is loading the ddraw.dll file from System32 not from the game folder. You need to configure it to load from the local folder for this game. That will allow dxwrapper.dll to load into this game. Then you should disable DxWnd and it should work.

BTW: dxwrapper does not send anything to STDOUT.

Lewiscowles1986 commented 6 months ago
Screenshot 2023-12-02 at 19 57 12

The below, only the third launch uses armada.exe directly with your ddraw stub...

I'd love to know what besides STDOUT could write that

Lewiscowles1986 commented 6 months ago

I've manually rotated the log file that I shared

[  LogClasses::            log::  574@      1] Logging the Following LogClasses:
[  LogClasses::            log::  309@      2]   PHYSICS              [0001-0000000001]
[  LogClasses::            log::  309@      2]   MemoryFail           [0012-0000001100]
[  LogClasses::            log::  309@      2]   Fatal                [0039-0000100111]
[  LogClasses::            log::  309@      3]   LogClasses           [0279-0100010111]
[  LogClasses::            log::  309@      3]   Exception            [0441-0110111001]
[  LogClasses::            log::  309@      3]   Warning              [0473-0111011001]
[  LogClasses::            log::  309@      3]   Error                [0568-1000111000]
[  LogClasses::            log::  309@      3]   Assertion            [0634-1001111010]
[  LogClasses::            log::  309@      4]   MemoryLeak           [0914-1110010010]
[  LogClasses::            log::  309@      4]   Diagnostic           [0920-1110011000]
[       Error::        IParser::  245@     34] IParse ERROR: Config or AIP int parameter 'GIVE_ALL_MISSIONS' not found. 
[     Warning::ST3D_GraphicsEngine::   82@    610] Storm3D Warning: CreateWindow: HWND 0x500c0
[  Diagnostic::    UserProfile::  750@    754] DeviceUpdateCallback: HWND 0x500c0
[     Warning::ST3D_GraphicsEngine::   82@    939] Storm3D Warning: Sprites\emitter.spr: Couldn't find particle sprite node definition 'wborgbpart'
[  Diagnostic::   AudioManager::  665@   1053] DirectSound: Microsoft Certified Driver
[  Diagnostic::   AudioManager::  667@   1053] DirectSound: Supports sample rates within 10 Hz of requested.
[  Diagnostic::   AudioManager::  671@   1053] DirectSound: Supports 16-bit primary buffer.
[  Diagnostic::   AudioManager::  673@   1053] DirectSound: Supports 8-bit primary buffer.
[  Diagnostic::   AudioManager::  675@   1053] DirectSound: Supports monophonic primary buffer.
[  Diagnostic::   AudioManager::  677@   1053] DirectSound: Supports stereo primary buffer.
[  Diagnostic::   AudioManager::  679@   1054] DirectSound: Supports 16-bit secondary buffer.
[  Diagnostic::   AudioManager::  681@   1054] DirectSound: Supports 8-bit secondary buffer.
[  Diagnostic::   AudioManager::  683@   1054] DirectSound: Supports monophonic secondary buffer.
[  Diagnostic::   AudioManager::  685@   1054] DirectSound: Supports stereo secondary buffer.
[  Diagnostic::   AudioManager::  688@   1054] DirectSound: Minimum Secondary Sample Rate 100
[  Diagnostic::   AudioManager::  689@   1054] DirectSound: Maximum Secondary Sample Rate 200000
[  Diagnostic::   AudioManager::  690@   1054] DirectSound: Primary Buffers (should be 1) 1
[  Diagnostic::   AudioManager::  691@   1054] DirectSound: Maximum Hardware Mixing - All 1
[  Diagnostic::   AudioManager::  692@   1055] DirectSound: Maximum Hardware Mixing - Static 1
[  Diagnostic::   AudioManager::  693@   1055] DirectSound: Maximum Hardware Mixing - Streaming 1
[  Diagnostic::   AudioManager::  694@   1055] DirectSound: Free Hardware Mixing - All 0
[  Diagnostic::   AudioManager::  695@   1055] DirectSound: Free Hardware Mixing - Static 0
[  Diagnostic::   AudioManager::  696@   1055] DirectSound: Free Hardware Mixing - Streaming 0
[  Diagnostic::   AudioManager::  697@   1055] DirectSound: Maximum Hardware 3D - All 0
[  Diagnostic::   AudioManager::  698@   1055] DirectSound: Maximum Hardware 3D - Static 0
[  Diagnostic::   AudioManager::  699@   1055] DirectSound: Maximum Hardware 3D - Streaming 0
[  Diagnostic::   AudioManager::  700@   1055] DirectSound: Free Hardware 3D - All 0
[  Diagnostic::   AudioManager::  701@   1056] DirectSound: Free Hardware 3D - Static 0
[  Diagnostic::   AudioManager::  702@   1056] DirectSound: Free Hardware 3D - Streaming 0
[  Diagnostic::   AudioManager::  703@   1056] DirectSound: Total Hardware Memory Bytes 0
[  Diagnostic::   AudioManager::  704@   1056] DirectSound: Free Hardware Memory Bytes 0
[  Diagnostic::   AudioManager::  705@   1056] DirectSound: Maximum Contiguous Free Hardware Memory Bytes 0
[  Diagnostic::   AudioManager::  706@   1056] DirectSound: Unlock Transfer Rate Hardware (unreliable) 0
[  Diagnostic::   AudioManager::  707@   1056] DirectSound: CPU Overhead Software Buffers (unreliable) 0
[  Diagnostic::      GameEvent::  428@   5065] GameEvent ComputerAcknowledge sound gvobcv13.wav does not exist. 
[  Diagnostic::        Program:: 1773@   5068] Program::GameSystemOpen() took 3 seconds. 
[  Diagnostic::   AudioSound2D::   31@  10075] AudioSound2D buffers stored: 0
[  Diagnostic::   AudioSound3D::  163@  10076] AudioSound3D buffers stored: 0
[  Diagnostic::  AudioStream2D::  136@  10076] AudioStream2D buffers stored: 0
[       Error::         Entity::  333@  10213] Entities High Water Mark is 0

That is DxWrapper, successfully completing the intro videa and booting to the menu, which works, but is graphically glitched.

Lewiscowles1986 commented 6 months ago

dx-wrapper-logfile.txt

And here is a clean log file using dxwrapper

Lewiscowles1986 commented 6 months ago

and that STDOUT only happens if I use your stubbed debug ddraw.dll

elishacloud commented 6 months ago

dx-wrapper-logfile.txt

And here is a clean log file using dxwrapper

I see the issue. Those log files are NOT from this dxwrapper project. They come from some other dxwrapper project.

Lewiscowles1986 commented 6 months ago

mind.... blown...

Lewiscowles1986 commented 6 months ago

this will be gog's fault?

elishacloud commented 6 months ago

I don't know where the other dxwrapper comes from. But you could try to replace it with my dxwrapper.

Lewiscowles1986 commented 6 months ago

I've only downloaded your debug files, so it must come with GOG Armada, or Wine. That makes it difficult to find and replace. If I knew how and where it was, I would; but I don't, and I am not close enough to Windows development to be able to locate it

elishacloud commented 6 months ago

Try downloading the files from the files from the wiki and copying them into the Star Trek Armada folder along side the Armada.exe file. Backup and overwrite any files that already exist.

Lewiscowles1986 commented 6 months ago

That is exactly what I did. I also told Wine to use user supplied DLLs and everything I know about windows DLL loading suggests same directory is highest precedence without additional work, which I don't see how could be happening. But I accept this is all very complex.

After using the files from the wiki, which did not work, I tried the same files from the debug download and overwrote the wiki files, to no luck.

elishacloud commented 6 months ago

Can you send me the log file using the dxwrapper from the wiki here? Is will be called dxwrapper-armada.log.

Lewiscowles1986 commented 6 months ago

It does not create that file mate. We've been over this; I copy the exact files from the wiki, tell the WINE to load dll, put the dll in the same folder. Get the weird log you say is not from this dxwrapper, no log file.

elishacloud commented 6 months ago

Try renaming ddraw.dll to another supported name. Maybe winmm.dll, dsound.dll or version.dll.

Edited: added version.dll.

elishacloud commented 6 months ago

BTW: make sure you remove and disable DxWnd for the game. It may conflict with the fixes I added in dxwrapper.

Lewiscowles1986 commented 6 months ago

I removed DxWnd (although I keep restoring it after testing because it works). I think we should both put this down. I don't want to waste your time, and it seems clear neither of us know how to locate the oddity that would cause

To cause the issues I'm describing here.


The reason I felt compelled to post here, was to save others time and investigate if there was a known-path, maybe find out a bit more about how the fix works (in-case I can toggle options in DxWnd to get the same effect), but I now feel bad for taking up so much of your time. Thank you, I'm unsubscribing from this thread.