clementgallet / libTAS

GNU/Linux software to (hopefully) give TAS tools to games
GNU General Public License v3.0
495 stars 58 forks source link

[Wine] Multiple issues with Sora #278

Open ToonLucas22 opened 4 years ago

ToonLucas22 commented 4 years ago

Hi, I'm letcreate123. This is a fairly niche game, so I'll just say it's a neat little shoot-em-up. It does not have an official Linux release, so I'm using Wine to run it.

Running the game in libTAS requires enabling Native events in Debug for the launcher screen to work properly and for the game itself to accept inputs, and requires enabling time tracking events to prevent a softlock at startup (IDK the exact combination, but enabling all of them works).

Even with this, though, it has multiple issues that prevent it from being TAS'd correctly: -Sound does not mute even with Sound > Mute on. This prevents savestates from loading correctly without crashing. A workaround for this is to remove or rename bgm.dat, se.dat and se2.dat. -Inputs are registered, but not recorded (OSD is completely frozen, except for the frame counter). Forcing software rendering, however, causes inputs to not be accepted at all. -Save files do not load when running the game in libTAS. This is especially troublesome because of an unskippable 1 minute cutscene that appears when booting the game without a savefile, plus the player being forced to play Stage 1 on Easy without getting to choose their difficulty level until they get to the main menu, after beating Stage 1 on Easy. For reference, the game locates them in /home/<user>/Documents/Fruitbat Factory/Sora/. -Game crashes when trying to switch from one music track to the other, even with the music files renamed/removed. Here's the console log without gdb:

terminate called after throwing an instance of 'libtas::ThreadExitException' wine client error:2f: write: Bad file descriptor 002f:err:seh:raise_exception Exception frame is not in stack limits => unable to dispatch exception. wine client error:2f: write: Bad file descriptor 002f:err:seh:raise_exception Exception frame is not in stack limits => unable to dispatch exception. wine client error:2f: write: Bad file descriptor 002f:err:seh:raise_exception Exception frame is not in stack limits => unable to dispatch exception. wine client error:2f: write: Bad file descriptor 002f:err:seh:raise_exception Exception frame is not in stack limits => unable to dispatch exception. wine client error:2f: write: Bad file descriptor 002f:err:seh:raise_exception Exception frame is not in stack limits => unable to dispatch exception. wine client error:2f: write: Bad file descriptor 002f:err:seh:raise_exception Exception frame is not in stack limits => unable to dispatch exception. wine client error:2f: write: Bad file descriptor The connection to the game was lost. Exiting

And with gdb:

terminate called after throwing an instance of 'libtas::ThreadExitException' Thread 10 "sora.exe" received signal SIGABRT, Aborted. [Cambiando a LWP 16756] 0xf7ffd929 in ?? () (gdb) orden indefinida: «yy». Intente con «help» (gdb)

clementgallet commented 4 years ago

Checking "Native Events" will disable some features, it is used as a debug feature only. You need to find a way to disable the launcher screen somehow.

ToonLucas22 commented 4 years ago

I was able to fix every issue except the input not recorded issues. Sound is still not hooked but the workaround works. There is still a way to TAS individual levels and bosses thanks to the game having its own replay system, fortunately enough.

I tried poking around the executable in Windows (7zip seems to open it as a compressed file just fine) but couldn't figure out how to actually disable the launcher. Note that the launcher and the actual game are tied together in the same .exe file.

ToonLucas22 commented 4 years ago

Just updated to the latest interim build after downgrading to Ubuntu 18.04.3 LTS from 19.10. Now attempting to open the game (after the launcher window) results in Wine crashing and throwing out the following error in the log: wine: Unhandled page fault on read access to 0x00000000 at address (nil) (thread 0029), starting debugger... I am unsure if this is because I'm somehow missing any packages or due to a bug introduced in the newer interim commits, though I should mention that the game works just fine when ran through Proton and Wine regularly.

EDIT: Tried running the game through the October 3rd 2019 commit and it works fine there.