Closed myst6re closed 3 weeks ago
Thanks a lot for this info. I'll try to make use of it to provide a launcher that works with both the native driver as well as FFNx.
Ok good news and bad news, I think we need to reverse a bit more the process but we're almost there! With this commit https://github.com/julianxhokaxhiu/FF78Launcher/commit/a2eaac88fb479a87eeaa2fa1de725de15f7c882c I am able to launch the game, however it remains in a frozen state. Any idea?
Some more updates: for FF7 I'm able to almost launch the game, however I think we miss the CONFIG_KEYS
part which probably tells the driver the resolution and so on how to run.
On top of your list, this is what I am currently sending now:
LOCALE_DATA_DIR - lang-en
USER_SAVE_DIR - C:\Users\USERNAME\Documents\Square Enix\FINAL FANTASY VII Steam\user_XXXXYYYY
DOC_DIR - C:\Users\USERNAME\Documents\Square Enix\FINAL FANTASY VII Steam\
INSTALL_DIR - C:\Program Files (x86)\Steam\steamapps\common\FINAL FANTASY VII
END_USER_INFO
Maybe the game needs more to work yes. Without sending complex messages, maybe you can try to add:
GAME_VERSION(string)
DISABLE_CLOUD()
BG_PAUSE_ENABLED(int)
I looked at what the Launcher seems to answer, and for the main game:
Thanks a lot for coming back. So I added the new opcodes as you mentioned here https://github.com/julianxhokaxhiu/FF78Launcher/commit/cef1da20d592829c6d502e1e42f5c8478b11ba92 however the behavior is still the same.
What I noticed though is that the game (FF7 in this case) for some unknown reason is not reading this configuration despite me sending the data. App.log
and cache
folder are being created in the game dir instead of the Documents path. This might be the culprit of why it's not starting as expected probably. Any idea what am I doing wrong?
Finally some good news :) We are able to launch the games!
FF7:
FF8:
When FF78Launcher is used with the unmodified game, a message box appear that ask to use the launcher before starting the game.
For FF8, this message is triggered if some semaphores and the shared memory file do not exist. Those are created by the original Launcher before running the game.
But creating these handles is not enough: you also need to communicate with the game using those semaphores and the shared memory.
Minimum code to launch the Chocobo World
Known messages (FF8)
Known messages (FF7 e-store)
List of messages sent by the launcher when starting the game instance
(Note that the game or the chocobo world starts as soon as the
END_USER_INFO
is received, but if you miss to send some data, crashes may happen. For the Chocobo World, onlyUSER_SAVE_DIR
is actually required)About concurrency
The current implementation of the actual FF8_Launcher is a bit more complicated, there is one thread to consume game message and one thread to send messages to the game. The main process push messages through a non-blocking queue, consumed by the thread that send messages to the game.
I choose to not care about this on my implementation, because I assume we don't need concurrency for this task. Eventually we will wait for the game process anyway.