Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Versions after 1.4.4 no longer work in older setup #49

Open
CactusWizard opened this issue Mar 16, 2021 · 11 comments
Open

Versions after 1.4.4 no longer work in older setup #49

CactusWizard opened this issue Mar 16, 2021 · 11 comments

Comments

@CactusWizard
Copy link

The last version that worked for me is 1.4.4. I'm using Windows 7 on a laptop (yes, I'm well aware that it's nowhere near the ideal minium setup, I even have to use the smallest resolution possible). I use the fix mainly for the FPS improvement and the enemy intel fix but I wanted the fixes for #19 and #20. When I tried to upgrade to anything newer than 1.4.4 I get the issue #33 for menus, loading screens and mission summary and lose the previous fixes. I even get a Windows system sound during the Square Enix screen. I hope there's a way to fix it. I'll stick to 1.4.4 for now.
FF13Fix.log

@rebtd7
Copy link
Owner

rebtd7 commented Mar 16, 2021

Hi,

I don't have W7 installed, but I think this may be unrelated to it. I suspect the Direct3D hooks are not working properly. If that's the case, 1.4.4 is probably not working perfectly for you either (you are missing performance fixes)

The Windows sound in 1.5.0+ is expected and not an issue btw

Could you list the dlls in the ffxiiiimg.exe process? I suspect something else is hooking D3D, causing issues

You can use: https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer
Then enable DLL display: View → Lower Pane View → DLLs
Select the ffxiiiimg.exe process from the list, and go to File->Save As

Other way to do it is to use this command line tool: https://docs.microsoft.com/en-us/sysinternals/downloads/listdlls

Could you also try something else that hooks D3D9 and see if it it works? e.g. Reshade or DXVK

@Nucleoprotein Do you have any idea on how to better troubleshoot this?

@Nucleoprotein
Copy link
Collaborator

Nucleoprotein commented Mar 17, 2021

@rebtd7
I see game calls IDirect3D9::GetAdapterIdentifier only once and this is laptop, maybe it's running on Intel GPU and this is related? it will be good to print data returned from IDirect3D9::GetAdapterIdentifier to log so we have more data - also because in most cases users report problems without any information about their systems...
We can validate memory patches by reading memory and compare after writing it.
ScissorRect fix is not a hook but it is wrapped in hkIDirect3DDevice9, maybe we should just hook member we need and not wrap full COM objects (similar like here for DirectInput: https://github.com/x360ce/x360ce/blob/master/x360ce/InputHook/HookDI.cpp)
Maybe also compile version with printing every hkIDirect3DDevice9::SetScissorRect to log to debug this? it will be ultra slow - i made less blocking than before but it's synchronous and very slow, for faster log we can migrate to https://github.com/gabime/spdlog - we can then add verbosity option to ini file.

@CactusWizard
This is happening too with 1.6.0 + DXVK?

@CactusWizard
Copy link
Author

I'm very sorry, my old toaster is indeed using Intel GPU and has 6 GB RAM.
I tried to get the dlls list but the programs are not working for me. I'm trying to see what the problem is.

Now the results of the tests:

  • Reshade only: it works properly but the game ran worse.
  • DXVK only: the game ran worse as if it had only the original files.
  • Fix 1.60 + DXVK: the game is not as slow as with DXVK alone but I got the loading screen graphic issues I mentioned in the OP.

I think 1.4.4 is actually improving performance somehow. As I mentioned, the game ran worse when I removed 1.4.4 to test the other options or just ran the game with only the original files.

Thank you both for looking into this.

@Nucleoprotein
Copy link
Collaborator

Nucleoprotein commented Mar 18, 2021

@rebtd7
1.4.6 is patch based, first one with ScissorRect Fix, 1.4.4 have no ScissorRect fix at all. I think there are two versions of executable ww and asia and maybe this is the case - memory patches NOP bad memory location and game is applying ScissorRect scaling too. Can you add memory reading for ScissorRect fix to check for expected values before NOP them?

EDIT: Maybe i will be have so time to check and add this today after work.

@CactusWizard
Copy link
Author

My game is the NA/Global version (steam_appid: 292120).

I got the dlls list for the game when using version 1.6.0.
FF13 dlls.txt

Thank you both.

@Nucleoprotein
Copy link
Collaborator

Nucleoprotein commented Mar 18, 2021

"C:\Program Files (x86)\AVG\Antivirus\x86\aswhook.dll"
Antivirus software can block our hooks/patches because of they nature - we are overwriting process memory which can be detected as malicious.
Also AVG Antivirus is ... trash, it's better to use built-in Windows Defender - which is now best free antivirus.

EDIT: Storing games in "C:\Program Files (x86)" or "C:\Program Files" is also not great idea because of Windows User Account Control virtualization.

@CactusWizard
Copy link
Author

Disabling the antivirus didn't work. And disabling both the antivirus and UAC didn't work either. Unfortunately I only have C:

@Nucleoprotein
Copy link
Collaborator

Make sure "C:\Program Files (x86)\AVG\Antivirus\x86\aswhook.dll" is not loaded to game process.

@rebtd7
Copy link
Owner

rebtd7 commented Mar 19, 2021

I've attempted to reproduce the issue in a old W7(x86) laptop with an Intel GPU, but it works fine for me (just slow)

DLLs for comparison:
out.txt

@Nucleoprotein
Copy link
Collaborator

Maybe forced DEP?
@CactusWizard
Right click on "Computer"
Select "Properties" and "System Protection"
Choosing "System Protection" in the left pane
Click on "Advanced System Settings"
Under "Performance" click "Settings"
Click on "Data Execution Prevention"
Check the box: "Turn on DEP for essential Windows programs and services only"
http://www.interdesigner.com/images/DEP_off.jpg

@CactusWizard
Copy link
Author

DEP was already in the essential-only configuration.
Here's the dlls list without the antivirus dll just in case.
DLL new.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants