Doom Eternal - script not working on Linux version, but fine with the Windows version through Wine

Doubts, help and support about QuickBMS and other game research tools
leveste
Posts: 3
Joined: Sun Jan 17, 2021 12:19 pm

Doom Eternal - script not working on Linux version, but fine with the Windows version through Wine

Post by leveste »

Hi. I'm new here, so if this should've been posted elsewhere, let me know.

I'm having trouble running Quickbms on Linux. I'm trying to run it to exctract the "*.resources" file from Doom Eternal for modding purposes. Interestingly enough, if I run the Windows exe through Wine with the same script, all the files are extracted successfully.

Here's what I get when I run it

offset filesize filename
--------------------------------------
00230000 1119 art/tile/hell_earth/ash_chunky_h.tga
Info: algorithm 650
offset 00230000
input size 0x0000034b 843
output size 0x0000045f 1119
result 0xffffffff -1

Error: the uncompressed data (-1) is bigger than the allocated buffer (1119)
It usually means that data is not compressed or uses another algorithm

Last script line before the error or that produced the error:
133 clog NAME OFFSET ZSIZE SIZE


The script is the one from here with no changes made to it.

What I've tried so far:
- Installing from the Arch User Repository - installs successfully, but gives this error when ran
- compiling from source code(both with and without the "-DDISABLE" flag) - same result as above. All dependencies(and then some) were installed as per the document.
- running the Linux static executables provided on the website - again, same result

I'm fine with running the Windows version since it shows no issues with Wine, but i've been researching this for the past few days and couldn't find anything useful(and I would perefer to run the native version, if possible). If anyone could help, it would be gratly appreciated.

One last thing to add, is that it seems to start creating the relevant folders, just that it fails to extract the files.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Doom Eternal - script not working on Linux version, but fine with the Windows version through Wine

Post by aluigi »

The oodle library is not available on Linux because there is no .so publicly released (as far as I know since Warframe is for Windows only).

While there is an unofficial open source version on github, it's not implemented in quickbms. I guess I planned to support it in the current beta but then something went wrong during the implementation and therefore I gave up. Additionally, being an old reverse engineered code, it may not cover all the features of the library.

So if there is any game with an oodle shared library publicly available (32bit is better but I suppose it's 64bit only) I think I can implement it very easily just like I did for the Windows code.
Otherwise no solutions.
leveste
Posts: 3
Joined: Sun Jan 17, 2021 12:19 pm

Re: Doom Eternal - script not working on Linux version, but fine with the Windows version through Wine

Post by leveste »

Thank you for the reply. It's unfortunate that it doesn't work, but I'll keep an eye on future updates in case it gets implemented.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Doom Eternal - script not working on Linux version, but fine with the Windows version through Wine

Post by aluigi »

The current beta uses the reverse engineered version of oodle.
The only requirement is an x86/x64 CPU because that code uses the SSE2 extensions.
Beta source code if you want to try:
https://aluigi.org/beta/quickbms_beta.zip

I created a compressed oodle file with quickbms on windows and I successfully decompressed it on linux, so it works even if it may not support all the less used oodle algorithms (but even oodle itself doesn't support them since they change at every release! :D ).
PowerBall253
Posts: 4
Joined: Wed Mar 17, 2021 3:38 pm

Re: Doom Eternal - script not working on Linux version, but fine with the Windows version through Wine

Post by PowerBall253 »

aluigi wrote:The current beta uses the reverse engineered version of oodle.
The only requirement is an x86/x64 CPU because that code uses the SSE2 extensions.
Beta source code if you want to try:
https://aluigi.org/beta/quickbms_beta.zip

I created a compressed oodle file with quickbms on windows and I successfully decompressed it on linux, so it works even if it may not support all the less used oodle algorithms (but even oodle itself doesn't support them since they change at every release! :D ).


Tried to compile it on Manjaro, got a bunch of errors which seem Windows-library related. I'm attaching the output here.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Doom Eternal - script not working on Linux version, but fine with the Windows version through Wine

Post by aluigi »

quickbms 0.11 is out and it solves all these problems that were in the beta.
PowerBall253
Posts: 4
Joined: Wed Mar 17, 2021 3:38 pm

Re: Doom Eternal - script not working on Linux version, but fine with the Windows version through Wine

Post by PowerBall253 »

aluigi wrote:quickbms 0.11 is out and it solves all these problems that were in the beta.


Tried to compile on Gentoo, having problems again.
I'll attach the output here again.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Doom Eternal - script not working on Linux version, but fine with the Windows version through Wine

Post by aluigi »

The Makefile doesn't include amiga and oodle if uname -m doesn't contain 86 (which may also include 64bit I guess) so you have to manually comment those lines:

From:

Code: Select all

ifeq ($(filter-out %86, $(shell uname -m)),)
EXTRA_TARGETS   = libs/amiga/amiga.s libs/powzix/*.cpp
CFLAGS   += -msse2
endif

To:

Code: Select all

#ifeq ($(filter-out %86, $(shell uname -m)),)
EXTRA_TARGETS   = libs/amiga/amiga.s libs/powzix/*.cpp
CFLAGS   += -msse2
#endif
leveste
Posts: 3
Joined: Sun Jan 17, 2021 12:19 pm

Re: Doom Eternal - script not working on Linux version, but fine with the Windows version through Wine

Post by leveste »

We've managed to compile it successfully, but are still encountering an issue. When trying to extract the .resource where getting a segmentation fault.

I'm on Manjaro and tried both normal and 4gb version. PowerBall253(Gentoo) only tried the 4gb version, but got the same result. The Windows exe still runs fine thorugh Wine and extracts everything.

Here's the output

QuickBMS generic files extractor and reimporter 0.11.0 (64bit test)
by Luigi Auriemma
e-mail: me@aluigi.org
web: aluigi.org
(Apr 30 2021 - 23:34:14)

quickbms.com Homepage
zenhax.com ZenHAX Forum
@zenhax @quickbms Twitter & Scripts

- open input file /home/leveste/.local/share/Steam/steamapps/common/DOOMEternal/base/gameresources_patch1.resources
- open script /home/leveste/.local/share/Steam/steamapps/common/DOOMEternal/doometernal.bms
- set output folder Documente/EternalOutput/

offset filesize filename
--------------------------------------
0000000000280000 12 generated/decls/renderparm/editorlightprobeid.decl
0000000000280040 16 generated/decls/renderparm/editorshadingmultiplier.decl
0000000000280080 19 generated/decls/renderparm/editorsurfacealpha.decl
00000000002800c0 19 generated/decls/renderparm/editorsurfacezbias.decl
0000000000280100 19 generated/decls/renderparm/editorviewscalefactor.decl
0000000000280140 19 generated/decls/renderparm/editorsurfacebackfacealpha.decl
0000000000280180 20 generated/decls/renderparm/instancespectre.decl
00000000002801c0 36 generated/decls/renderparm/darklordshieldtint.decl
0000000000280200 33 generated/decls/renderparm/snowflakesampler.decl
0000000000280240 55 generated/decls/renderparm/nearestmipmapclamptoborderblacksampler.decl
0000000000281000 175199 textures/effects/misc/ice_local
Segmentation fault (core dumped)
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Doom Eternal - script not working on Linux version, but fine with the Windows version through Wine

Post by aluigi »

Unfortunately there is nothing I can do there because oodle on non-Windows is only available as the open source reverse engineered code of powzix.

I did some tests with that library when I implemented it in the beta and it worked correctly with my data but probably the algorithms used by Doom Eternal are not supported.
Indeed oodle is only a container of various algorithms that get changed, removed and added at every release of the library, while powzix isn't.
PowerBall253
Posts: 4
Joined: Wed Mar 17, 2021 3:38 pm

Re: Doom Eternal - script not working on Linux version, but fine with the Windows version through Wine

Post by PowerBall253 »

aluigi wrote:Unfortunately there is nothing I can do there because oodle on non-Windows is only available as the open source reverse engineered code of powzix.

I did some tests with that library when I implemented it in the beta and it worked correctly with my data but probably the algorithms used by Doom Eternal are not supported.
Indeed oodle is only a container of various algorithms that get changed, removed and added at every release of the library, while powzix isn't.


What do you use for Windows though? The DLL? If so I may be able to get it working.
PowerBall253
Posts: 4
Joined: Wed Mar 17, 2021 3:38 pm

Re: Doom Eternal - script not working on Linux version, but fine with the Windows version through Wine

Post by PowerBall253 »

So after checking out the source code, I think I may be able to get this working. Will report back.