PCSX2 / pcsx2

PCSX2 - The Playstation 2 Emulator
https://pcsx2.net
GNU General Public License v3.0
11.54k stars 1.6k forks source link

[BUG]: Local File Loading doesn't work on Linux. #9731

Closed AmyRoxwell closed 1 year ago

AmyRoxwell commented 1 year ago

Describe the Bug

While trying to use modded elfs to make certain games load faster by loading the files from a folder instead of a iso, on Linux this will just cause the game to load indefinitely.

Reproduction Steps

https://youtu.be/YwQ1cMtoGrE Basically, do the following:

  1. Boot in any modern linux distro.
  2. Download the patch or modified .28 file.
  3. Mount your iso for outbreak file 1, file 2 or Vento aureo.
  4. Copy the files of the iso to a folder.
  5. Replace the original ".28" file with the modified or patched one and, after the ".28" put an ".elf" (In the case of file 1 the final file name would be "SLPM_654.28.elf"
  6. Go to settings and enable "Enable Host Filesystem"
  7. On PCSX2, add the elf to the game list, right click it and select "Properties"
  8. Then, at last, on the space that says "Disc Path", search and select the original Iso.
  9. Try to but the elf, in the case of outbreak file 1 & 2, it will say "loading" and go to black without loading, for Vento Aureo, it will just stay on a black screen.

Expected Behavior

Game loads just fine and you can enjoy faster loading times :D

PCSX2 Revision

v1.7.4873

Operating System

Linux (64bit) - Specify distro below

If Linux - Specify Distro

EndeavourOS (Arch Linux based distro)

Logs & Dumps

log.txt

stenzek commented 1 year ago

I don't have this game, so I can't check the specifics, but hostfs works fine for me on Linux, as does automounting of an ISO when launching an ELF.

stenzek commented 1 year ago
Program Path: /opt/pcsx2/pcsx2-qt

Doesn't sound like any of our builds. Please contact your packager for support, or if the issue occurs with the Flatpak/AppImage, and someone can reproduce it, we can reopen. But as it stands, I have no clue what the issue might be, other than package specific changes.

AmyRoxwell commented 1 year ago

Stenzek, I'm literally using the source code from the AUR cuz it has a terminal logging system, on appimage it doesn't work either ...

F0bes commented 1 year ago

Couldn't tell anyone why this was closed after I self assigned it. I'm busy and I'm meaning to check this out when I have time. Edit: I'm primarily interested in the difference in behaviour between Windows and Linux.

stenzek commented 1 year ago

There is no difference between windows and Linux. I closed it because I wasted an hour last night trying to reproduce on source builds, the appimage, and the Flatpack, all worked identically.

Both hostfs access and iso automounting work fine.

The only thing I didn't do, was test this specific mod, because it is piracy.

Quoting the linked page:

Extract the game-specific SLPM_xxx.xx file from the zip archive you downloaded into the folder that you created, and overwrite the original.

F0bes commented 1 year ago

There is no difference between windows and Linux.

Both hostfs access and iso automounting work fine.

The only thing I didn't do, was test this specific mod, because it is piracy.

Quoting the linked page:

Extract the game-specific SLPM_xxx.xx file from the zip archive you downloaded into the folder that you created, and overwrite the original.

In discord I was told that windows works fine.

stenzek commented 1 year ago

If they can give instructions in a way which we can reproduce the issue, that doesn't involve piracy, then I'm more than happy to look into it again.

AmyRoxwell commented 1 year ago

If they can give instructions in a way which we can reproduce the issue, that doesn't involve piracy, then I'm more than happy to look into it again.

Follow the guide from outbreak but instead just use it for the vento aureo video, that one is a simple ips patch, so no piracy involved

stenzek commented 1 year ago

What is the log file for this ips patch? And it breaks on the AppImage/Flatpak?

You should also check that the patch itself isn't doing something Windows specific with regards to pathing.

AmyRoxwell commented 1 year ago

What is the log file for this ips patch? And it breaks on the AppImage/Flatpak?

You should also check that the patch itself isn't doing something Windows specific with regards to pathing.

It breaks also on AppImage, the patch for that one is also working on macos so it is strange that is not working on linux only, well let me get that log for you then

stenzek commented 1 year ago

the patch for that one is also working on macos so it is strange that is not working on linux only

That makes perfect sense if the patch is using incorrect casing. Windows/Mac are case-insensitive, Linux is case sensitive.

(file not found also unfortunately won't show in the log... I mainly wanted to check that to see if it was the folder restriction breaking, but a difference in case will just go through as a failure to the guest)

Edit: Going further with that theory, I'm hypothesizing that the patch just replaced all instances of cdrom: with host:, and the casing of the filenames in the ELF differs from what is on the disc, or perhaps whatever you used to extract it auto-uppercased everything because it's base ISO9660 without any extensions. In other words, the patch should be fixed, not PCSX2.

You could check that by running strings on the ELF, and looking for any filename-like strings, then comparing the casing to that on disk.

AmyRoxwell commented 1 year ago

the patch for that one is also working on macos so it is strange that is not working on linux only

That makes perfect sense if the patch is using incorrect casing. Windows/Mac are case-insensitive, Linux is case sensitive.

(file not found also unfortunately won't show in the log... I mainly wanted to check that to see if it was the folder restriction breaking, but a difference in case will just go through as a failure to the guest)

Edit: Going further with that theory, I'm hypothesizing that the patch just replaced all instances of cdrom: with host:, and the casing of the filenames in the ELF differs from what is on the disc, or perhaps whatever you used to extract it auto-uppercased everything because it's base ISO9660 without any extensions. In other words, the patch should be fixed, not PCSX2.

You could check that by running strings on the ELF, and looking for any filename-like strings, then comparing the casing to that on disk.

Okay, I will have to sent you the log tomorrow and also check that out, my dvd reader is not wanting to cooperate ;w;

AmyRoxwell commented 1 year ago

log.txt Alright, here is the log for it, it doesn't work but a lot of the files on the dvd are on caps.

edit: tried to rename everything to lowercase, still broken, sadly.

AmyRoxwell commented 1 year ago

Okay, after lots of testing, I was able to convert the elf for vento aureo into a functional one, had to rename a lot of things on the .elf itself using hexediting to use lowercase instead but it works! So yeah, it is a "Case-sensitive" situation. Closed as this is not a bug with PCSX2 itself and also deleting one of the links to avoid piracy.

stenzek commented 1 year ago

Makes sense.

An alternative option could be using a case-insensitive filesystem, or using ext4's option to do so. But I haven't used it myself, so can't comment on the effectiveness.

scrubslayer0104 commented 1 year ago

Okay, after lots of testing, I was able to convert the elf for vento aureo into a functional one, had to rename a lot of things on the .elf itself using hexediting to use lowercase instead but it works! So yeah, it is a "Case-sensitive" situation. Closed as this is not a bug with PCSX2 itself and also deleting one of the links to avoid piracy.

Could you help me with this? I'm tryna do the quick load method for obsrv and it doesn't load sadly:/

AmyRoxwell commented 1 year ago

Okay, after lots of testing, I was able to convert the elf for vento aureo into a functional one, had to rename a lot of things on the .elf itself using hexediting to use lowercase instead but it works! So yeah, it is a "Case-sensitive" situation. Closed as this is not a bug with PCSX2 itself and also deleting one of the links to avoid piracy.

Could you help me with this? I'm tryna do the quick load method for obsrv and it doesn't load sadly:/

Can't help ya with that, they contain copyrighted files, so you are on your own, sorry!