Git Product home page Git Product logo

Comments (19)

vars1ty avatar vars1ty commented on August 12, 2024 1

Yeah I'll try the tests. And regarding onboard GPU, not possible in this case as I disabled it in BIOS and also blacklisted the driver for it on Linux.
On the Windows PC it's also disabled in BIOS.

from hudhook.

veeenu avatar veeenu commented on August 12, 2024 1

Mmm, this is something I definitely want to address before release. Linux compat is not an explicit goal but would be nice to have as other people also have shown interest in running on Linux.

from hudhook.

veeenu avatar veeenu commented on August 12, 2024 1

I traced it back to this:
immagine

Once I added the workaround of using CreateSwapChainForHwnd as per this thread, the computation progressed up until the calls to DirectComposition:
immagine

I have perused the WineHQ bugzilla and general board and ironically Star Stable Online is one of the games that pop up for using DirectComposition and terminating because it's unimplemented.

I want to test this approach: get rid of DirectComposition altogether, and see if I can just use DirectX for the compositing part.

from hudhook.

vars1ty avatar vars1ty commented on August 12, 2024 1

Not at all surprised at this rate. Dealt with this game for years and it does so many weird and hacky things, it's a miracle it even runs. Even the game engine it uses, which is custom, barely even functions anymore.

If you need me to test anything and whatnot, feel free to ping me or add me on Discord if you need faster responses.

from hudhook.

veeenu avatar veeenu commented on August 12, 2024 1

Thank you, will do! But there is never any hurry really -- I prefer async communication like this both because we can't necessarily dedicate enough time to the project for timely responses, and because it will also serve as documentation eventually.

from hudhook.

veeenu avatar veeenu commented on August 12, 2024

Is the error Not implemented on both Windows and Linux? Can you tell me more about the game's architecture?

Could you please post the full backtrace? My hunch there is that DirectX 12 (or some specific API) may not be available.

from hudhook.

vars1ty avatar vars1ty commented on August 12, 2024

It's present on both Windows and Linux, tested on native Windows outside of any VMs.
And there is no full backtrace from what I can see, I just compiled the sample DLL in examples and tried to inject it, then it crashed as soon as it got to the render engine.

The game arch is x64, tried the hook on a DX12 game named The Hunter COTW and it crashed there as well, with the same error message. Compiled with MSVC

from hudhook.

veeenu avatar veeenu commented on August 12, 2024

Yeah backtrace shouldn't show up by itself -- can you set the RUST_BACKTRACE environment variable to 1 from inside the DllMain? That should work.

Peculiar behavior though, the fact that it fails on Windows as well... Which version are you using? And what CPU/GPU? I wonder if the renderer is using a feature that's not available on your hardware 🤔

from hudhook.

vars1ty avatar vars1ty commented on August 12, 2024

Will do in a few hours, currently sorting out some other things.

My specs are:

  • CPU: Intel Core i7 12700k
  • GPU: AMD Radeon RX 6800 XT
  • RAM: 64GB DDR4
  • OS Tested: Arch Linux, Windows 10 Pro with specs listed below.
  • Runner: wine-ge

Windows specs:

  • CPU: Intel Core i7 12700k
  • GPU: AMD Radeon RX 7700 XT
  • RAM: 32GB DDR4
  • OS: Windows 10 Pro

Both machines have the latest drivers and updates installed, plus tried rebooting, recompiling and whatnot, none which worked.

from hudhook.

veeenu avatar veeenu commented on August 12, 2024

Yeah your hardware should be fine honestly. I checked and your GPUs all support the DirectX feature level 12_2 while we require 11_1 (and should ideally be able to go even lower than that). Another hypothesis I have is that EnumAdapters could return the onboard GPU, but that one supports level 12_1 afaik.

I will try and stand up a VM today and install that game on it.

Can you try running the tests in hudhook? If those do not work either, then we can be sure that it's related to the game and not the hardware at all.

from hudhook.

veeenu avatar veeenu commented on August 12, 2024

Mmm, maybe it's something else related to COM. I managed to stand up the VM today but haven't had the time to test the game yet.

from hudhook.

veeenu avatar veeenu commented on August 12, 2024

I have tried running the game in a VM, but the dll hooked successfully, so I can't reproduce it. When you have time, could you try vendoring the library and finding out which one is the call that produces the error (tracing::debug! statements would be the way to go)?

I still want to address this issue, but I will probably release the library on crates.io soon and get at this in a future semver-patch release.

from hudhook.

vars1ty avatar vars1ty commented on August 12, 2024

Hm, weird. Could you try compiling the sample dll on Linux and see if it works for you? If you need MSVC, here's my guide for it.

I'll run the tests and enable backtrace a bit later today or tomorrow, since I haven't used the tracing library before.
Been busy with fixing some issues with my cheat framework, hence the slow responses.

from hudhook.

vars1ty avatar vars1ty commented on August 12, 2024

Alright some bad news for myself, it's a Linux issue. I tried to compile it and run tests on Windows; works there.
I then tried to use that same DLL on Linux, no changes made, VKD3D and all installed, instant crash.
I also tried MSVC compilation on Linux, and even tried the Windows GNU toolchain, both crash.

So until this has been resolved, if it does get resolved, I'm stuck on the versions prior to the simplified Render Engine as my cheat framework advertises itself as compatible with Windows and Linux through Wine/Wine forks.

Also some notes regarding the tests; I tried them on Linux, they just dead-lock and no window shows up.

from hudhook.

veeenu avatar veeenu commented on August 12, 2024

Nada, tried various attempts, BitBlt, Direct2D, acquiring a swap chain for the HWND and do another DX12 render pass -- couldn't get anything working at all. 😞

from hudhook.

veeenu avatar veeenu commented on August 12, 2024

Saving these findings here:

https://gitlab.winehq.org/zhiyi/wine/-/blob/b4ea669754fc0a9d01be048d254a2c29c9fd8647/dlls/dcomp/device.c#L92
https://gitlab.winehq.org/zhiyi/wine/-/compare/master...directcomposition?from_project_id=5&straight=false#3e63fa6bf30e6b1a1d0e80f34cc6250e52c96e77

Chances are following this same approach could work in replacement of DirectComposition.

By the way, that branch is work towards implementation of DirectComposition in Wine. Unfortunately it seems abandoned for now, but not all hope is lost 🤞

from hudhook.

vars1ty avatar vars1ty commented on August 12, 2024

RIP, not even slightly surprised that the game crashes with the workaround you listed in the other project, it has to hack around its own game engine because it uses its own super-flawed scripting language.

If you do find a fix or a workaround, let me know 👍🏽 Until then, I'll lock my projects hudhook version to the commit prior to the refactor.

from hudhook.

veeenu avatar veeenu commented on August 12, 2024

I am actually considering switching off of Windows myself to see if this is the Year Of The Linux Desktop finally so I will keep looking into a way of dealing with this.

from hudhook.

veeenu avatar veeenu commented on August 12, 2024

I wanna say this is not completely flawless, but it's not using DirectComposition. 😅

2024-02-06_141137.mp4

from hudhook.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.