touchHLE / touchHLE

High-level emulator for iPhone OS apps. This repo is used for issues, releases and CI. Submit patches at: https://review.gerrithub.io/admin/repos/touchHLE/touchHLE
https://touchhle.org/
Mozilla Public License 2.0
2.55k stars 92 forks source link

Issues with Tony Hawk's Pro Skater 2 #256

Open joao678 opened 3 months ago

joao678 commented 3 months ago

On Windows, the latest release "v0.2.1: All treat, no trick!" of touchHLE, it does not run at all. By grabbing the latest release from GitHub Actions and placing the .exe overriding the previous one a different error pops up.

Unexpected I/O failure when trying to access real path "touchHLE_dylibs/libstdc++.6.0.9.dylib": O sistema não pode encontrar o arquivo especificado. (os error 2). This might indicate that files needed by touchHLE are missing, or were moved while it was running.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Note that the file "libstdc++.6.0.4.dylib" comes inside the "touchHLE_dylibs" folder, renaming this file to "libstdc++.6.0.9.dylib" makes it work.

However there are more issues. Completing the first level and saving the game results in a error

Unexpected I/O failure when trying to access real path "touchHLE_sandbox\\com.activision.thps2\\Documents\\THPS2 CAREER- Bob 2-29-24 4:0:11 $0.SAV": A sintaxe do nome do arquivo, do nome do diretório ou do rótulo do volume está incorreta. (os error 123). This might indicate that files needed by touchHLE are missing, or were moved while it was running.

This does not happen on android using the latest release, I suspect this happens because touchHLE tries to create a file with the name containg ":" which is not possible on windows under normal circumstances

nighto commented 3 months ago

Hi João,

first of all THPS2 not working on 0.2.1 is expected because when that version was launched, that game wasn't supported yet.

Then, you should not rename libstdc++ to a different number, but rather get the correct version of it; that might be the issue. Dependencies might change between versions (and have changed since 0.2.1 release), and the action generated zip file only includes the .exe binary without any of the needed dependencies.

(@hikari-no-yume @ciciplusplus maybe we could create another action that makes a zip file ready to be used, including vendor directory?)

Just tried running trunk version on Windows with cmd and indeed, when saving career, this error happens (copying again because OP posted their error message in portuguese):

touchHLE::fs: Warning: attempt to create file at path GuestPath("/THPS2 CAREER- Tony 2-29-24 8:18:45 $0.SAV"), but directory is read-only
thread 'main' panicked at 'Unexpected I/O failure when trying to access real path "touchHLE_sandbox\\com.activision.thps2\\Documents\\THPS2 CAREER- Tony 2-29-24 8:18:45 $0.SAV": The filename, directory name, or volume label syntax is incorrect. (os error 123). This might indicate that files needed by touchHLE are missing, or were moved while it was running.', src\fs.rs:340:19

The same error happens with PowerShell and Git Bash as well; tested on Windows 11.

Reproduce path:

  1. Open touchHLE and open THPS2
  2. Click on Career Mode, New Career, choose whatever player and start the first level
  3. Open Menu (top i button) and choose End Run, Continue
  4. Press Save Career, Yes and touch on --Empty Slot--
hikari-no-yume commented 3 months ago

Yeah the dylibs issue is because the set of bundled dylibs changed since last release. Not including those in CI builds was deliberate but I didn't have any particularly good reason, so I might change it.

The save data path issue is interesting however. I've been afraid we'd run into this eventually. Hmm.

nighto commented 3 months ago

@hikari-no-yume I'll create a side issue just so it doesn't get buried here :)

joao678 commented 3 months ago

Thanks for the quick responses guys, hope this gets fixed soon. Valeu! 🤙