Warhammer Dark Omen Forum

Warhammer Dark Omen => Help Section => Topic started by: moktira on April 19, 2022, 01:38:26 PM



Title: Dark Omen Linux Textures flipped
Post by: moktira on April 19, 2022, 01:38:26 PM
After a lot of perseverance I have got Dark Omen running on Linux. This required creating a new Wine Prefix and replacing ddraw.dll and d3drm.dll in System32 with the dlls from the disc and the patch. In Xephyr 16 bit I can get it to run but the background textures for the load screen, menus and briefings are doubled over, here's some examples:

(https://i.imgur.com/Mj3Ci8t.png)
(https://i.imgur.com/AlwiRuD.png)

From the errors in the console in the first image, this might be to do with dplay, I did try to use the dplay.dll and dplayx.dll that are with the game but they haven't made a difference. I also tried the dlls from dgvoodoo2.

Anyone got any other suggestions? I've tried the various executables in the patches from here (with 3d fix, no 3d, etc.) but they're all the same.

Also I have not had any success in getting Xephyr to scale up but I haven't tried much yet either so if anyone knows how to get it full screen that would be ideal. Or alternatively get it full screen to play without Xephyr. I don't need to use Xephyr for Shadow of the Horned Rat for example.

Full instructions
Create a wineprefix for Dark Omen, these require absolute paths so you'll need to use /home/ followed by your username:
Code:
Winearch=win32 WINEPREFIX="/home/USERNAME/.darkomenprefix32/" winecfg
On newer versions of wine you don't need to run winecfg after doing this line. From the extracted iso, run the setup file, if you're in home and that's extracted to home this will be:
Code:
WINEPREFIX=/home/USERNAME/.darkomenprefix32/ wine DarkOmen/SETUP.EXE

Once that has installed, you need to rename the DDRAW.DLL in the DirectX folder of the extracted iso to ddraw.dll and overwrite this to system32 directory in the wineprefix:
Code:
mv DarkOmen/DIRECTX/DDRAW.DLL DarkOmen/DIRECTX/ddraw.ddl
mv DarkOmen/DIRECTX/ddraw.ddl .darkomentprefix32/drive_c/windows/system32

You can also use ddraw.dll from the patch on this website. It should run in Xephyr then:
Code:
Xephyr :1 -ac -screen 640x480x16 &
DISPLAY=:1 WINEPREFIX=/home/padraig/.darkomenprefix32/ wine EngRel.exe

If the cutscene plays you know it's worked. This will require the CD. Using the patched version on this website this can be avoided, also I moved d3drm.dll to system32 in the wine prefix but I'm not sure that was necessary.


Title: Re: Dark Omen Linux Textures flipped
Post by: olly on April 19, 2022, 09:40:25 PM
Hi and well done, as certainly helps progress it further. Its been awhile since I last tried but gives us hope, it will work in the future. Thank you

:)


Title: Re: Dark Omen Linux Textures flipped
Post by: moktira on April 19, 2022, 09:54:31 PM
Glad to get this far and hope others will try it and get it working! It is playable anyway even with these texture issues. I'll modify it to put the commands in for other users shortly. In principle this should work on Steam Deck too.


Title: Re: Dark Omen Linux Textures flipped
Post by: olly on April 19, 2022, 10:01:12 PM
Nice!  8)


Title: Re: Dark Omen Linux Textures flipped
Post by: aqrit on April 22, 2022, 10:11:35 PM
The primary directdraw surface is specified as both the source and destination of a DDBLTFX_MIRRORUPDOWN operation.

I actual wrote a wrapper to fix this ~6 years ago... old versions of dgvoodoo2 had a similar issue with this operation.

I'll see what I can dig up this weekend.

p.s. I got SOTHR working with Wine. I patched it to use 32-bit color... because when I tried playing around with
Code:
Xephyr :1 -screen 640x480x8
I messed something up and couldn't use my Ubuntu install for a week.  :'(



Title: Re: Dark Omen Linux Textures flipped
Post by: olly on April 22, 2022, 11:13:02 PM
Excellent!

:)


Title: Re: Dark Omen Linux Textures flipped
Post by: moktira on April 23, 2022, 11:59:59 AM
The primary directdraw surface is specified as both the source and destination of a DDBLTFX_MIRRORUPDOWN operation.

I actual wrote a wrapper to fix this ~6 years ago... old versions of dgvoodoo2 had a similar issue with this operation.

I'll see what I can dig up this weekend.

p.s. I got SOTHR working with Wine. I patched it to use 32-bit color... because when I tried playing around with
Code:
Xephyr :1 -screen 640x480x8
I messed something up and couldn't use my Ubuntu install for a week.  :'(



Thanks, yeah let me know, would be great to have it running properly!

I actually got the Gog version of Shadow of the Horned Rat working nicely without Xephyr, I can write up my guide if you want?


Title: Re: Dark Omen Linux Textures flipped
Post by: aqrit on April 23, 2022, 05:00:50 PM
I thinking my ddwrapper (http://www.bitpatch.com/ddwrapper.html) should work with `BltMirror=1`.
So the `to do` is to check that the wrapper works properly with Dark Omen's Direct3D on Windows (ddwrapper doesn't work with most d3d games...). Figure out how to use a proxy dll of a built-in dll in Wine...

My GOG Sothr install guide for Wine is here (https://github.com/danoon2/Boxedwine/discussions/34).
Check out my *newly fixed* color cursors for SOTHR here (http://www.bitpatch.com/sothr.html).


Title: Re: Dark Omen Linux Textures flipped
Post by: moktira on April 23, 2022, 09:31:35 PM
I thinking my ddwrapper ([url]http://www.bitpatch.com/ddwrapper.html[/url]) should work with `BltMirror=1`.
So the `to do` is to check that the wrapper works properly with Dark Omen's Direct3D on Windows (ddwrapper doesn't work with most d3d games...). Figure out how to use a proxy dll of a built-in dll in Wine...

My GOG Sothr install guide for Wine is here ([url]https://github.com/danoon2/Boxedwine/discussions/34[/url]).
Check out my *newly fixed* color cursors for SOTHR here ([url]http://www.bitpatch.com/sothr.html[/url]).


Hmmm, I tried it but it hasn't made a difference yet. I might need to do more messing though.

It seems I refigured out your Sothr installation method, pity I didn't find it sooner but glad we both have the same solution. I didn't find it when I was googling a few weeks back.


Title: Re: Dark Omen Linux Textures flipped
Post by: moktira on April 23, 2022, 09:42:59 PM
Nevermind, I got it working! I added ddraw to winecfg as native and then it worked, you're a genius, thanks so much!!
(https://i.imgur.com/RaBpVfn.png)

Now I just need to figure out how to upscale it!


Title: Re: Dark Omen Linux Textures flipped
Post by: olly on April 23, 2022, 10:28:16 PM
Sounds great, so does this now fully work on Linux, even the battle terrain etc? If so, could one of you post a beginners Linux help/fix guide, for others to easily follow please. Thanks :)


Title: Re: Dark Omen Linux Textures flipped
Post by: moktira on April 24, 2022, 03:23:18 AM
Basically yes it runs perfectly, though right now I don't know an easy way to get it full screen but I'll work on that next. I'll update my first post in the morning with the full instructions but it's actually not too difficult. I might test it on another machine first and then could create a guide for it. Delighted right now!!

Edit: Turns out I can't modify the initial post any more, here's the full instructions but I might create a new post as a guide for future users.

Create a wineprefix for Dark Omen, these require absolute paths so you'll need to use /home/ followed by your username:
Code:

Code:
WINEARCH=win32 WINEPREFIX="/home/USERNAME/.darkomen/" winecfg

You can close winecfg. The prefix is not 100% necessary but it's good practice. Navigate to where the extracted ISO is and run:

Code:
WINEPREFIX=~/.darkomen/ wine SETUP.EXE

Once that has installed, you need to get Aqrit's ddraw.dll (http://www.bitpatch.com/ddwrapper.html) and place it and the aqrit.cfg in the directory with the EngRel.exe in
Code:
~/.darkomen/drive_c/Program Files (x86)/Dark Omen/PRG_ENG/

Edit aqrit.cfg and change BltMirror=1.

You then need to open winecfg again:
Code:
WINEPREFIX=~/.darkomen/ winecfg

Go to Libraries tab, if "ddraw" is not in the "Existing overrides" then click on "New override for library:", type "ddraw" and click "Add". It will give you a warning about the order but just say yes. Then make sure in the "Existing overrides" that it's "native" first.

Get the HexEdited EngRel.exe from here (http://www.mediafire.com/file/fnnkq89xdjy75m0/DarkOmenMods.zip/file) and put that in PRG_ENG too (maybe rename the original EngRel.exe just in case instead of overwriting it).

Then to play:
Code:
Xephyr :1 -ac -screen 640x480x16 &
DISPLAY=:1 WINEPREFIX=~/.darkomen/ wine EngRel.exe

That should be it, you can add it on Lutris, in Game Options you can add the prefix and in System Options there's a tick box for Xephyr at the bottom.


Title: Re: Dark Omen Linux Textures flipped
Post by: olly on August 26, 2023, 11:37:34 PM
Just watched this vid as well

https://www.youtube.com/watch?v=HPe_w-YwLno (https://www.youtube.com/watch?v=HPe_w-YwLno)

https://github.com/kjliew/qemu-3dfx (https://github.com/kjliew/qemu-3dfx)