otavepto / gbe_fork

Fork of https://gitlab.com/Mr_Goldberg/goldberg_emulator
https://gitlab.com/Mr_Goldberg/goldberg_emulator
GNU Lesser General Public License v3.0
191 stars 55 forks source link

Issue with the game Final Fantasy IX (377840) and how it interacts with the emulator. #241

Open CHESIRE721 opened 4 days ago

CHESIRE721 commented 4 days ago

I detected another problem, or rather, I discovered something while playing Final Fantasy IX. The game automatically deletes the steam_appid.txt file from its main folder, even if it is in the steam_settings folder. However, if I add a launcher that has the configuration outside the main folder, the game does not delete the steam_appid.txt file.

But making this configuration causes the emulator not to correctly detect the game, preventing the overlay from rendering and also blocking achievements.

Now, the strange part is that if I replace the game's steam_api.dll/steam_api64.dll files (there are 4 in total since it is using Unity in a peculiar way) and then run the game launcher from steamclient_loader_x32.exe, the game manages to render the overlay. However, if I run the game directly from FF9_Launcher.exe, the emulator notifies that the game's AppID is not specified and will use ID 0 until the file is added.

I will attach the game log because it is very strange how FFIX interacts with the emulator. To make it work properly, I have to combine the emulator in its steam_api.dll/steam_api64.dll version with the steamclient.dll/steamclient64.dll version to make the game function correctly.

STEAM_LOG (2).txt

otavepto commented 3 days ago

Avoid dll replacement altogether and use cold client loader from a parent directory outside the game's folder. The problem is the launcher of the game FF9_Launcher.exe. What's happening is that once you configure cold client loader to start their launcher, it will start but just sets some settings and immediately closes, and because cold client loader cleans up the registry after the target exe has closed, the game ends up being unable to find steamclient64.dll.

In ColdClientLoader.ini set Mode=1, it will now keep running in the background until you manually close it (like SSE). And now overlay (and achievements) should work image

otavepto commented 3 days ago

2 important things I noticed, the ExeRunDir must be the root folder of the game not subfolder x64/ If you use their launcher just leave ExeRunDir empty and set Mode=1

[SteamClient]
Exe=FINAL FANTASY IX\FF9_Launcher.exe
ExeRunDir=

[Persistence]
Mode=1

Otherwise set ExeRunDir manually to the root folder

[SteamClient]
Exe=FINAL FANTASY IX\x64\FF9.exe
ExeRunDir=FINAL FANTASY IX

[Persistence]
Mode=0

The game cannot properly handle utf-8 paths, it couldn't even find its own Settings.ini in its root folder if the path contained non-Latin chars

CHESIRE721 commented 3 days ago

2 important things I noticed, the ExeRunDir must be the root folder of the game not subfolder x64/ If you use their launcher just leave ExeRunDir empty and set Mode=1

[SteamClient]
Exe=FINAL FANTASY IX\FF9_Launcher.exe
ExeRunDir=

[Persistence]
Mode=1

Otherwise set ExeRunDir manually to the root folder

[SteamClient]
Exe=FINAL FANTASY IX\x64\FF9.exe
ExeRunDir=FINAL FANTASY IX

[Persistence]
Mode=0

The game cannot properly handle utf-8 paths, it couldn't even find its own Settings.ini in its root folder if the path contained non-Latin chars

I followed the configuration you mentioned, avoiding the hybrid launcher I was using. Initially, the game worked but the overlay didn't activate. After reviewing your point about UTF-8, I searched for a solution and found that Windows has a beta option for global UTF-8 support. This enables the handling of folders and files with characters outside the primary language you use. Enabling this option fixed the issue of the overlay not loading properly due to the language settings on my PC. I also tested this with the game Fatermyth, which resolved the problem with the directory containing Chinese characters, preventing the game from closing after 3 seconds. It's a bit strange how this UTF-8 function fixed the issue.