flathub / net.pcsx2.PCSX2

https://flathub.org/apps/details/net.pcsx2.PCSX2
12 stars 11 forks source link

PCSX2 flatpak can't write to .NVM file in custom BIOS directory #54

Closed skierpage closed 2 years ago

skierpage commented 2 years ago

PCSX2 tries to write to the .nvm file in the BIOS directory. I think this works if you put the BIOS files in the default $HOME/.var/app/net.pcsx2.PCSX2/config/PCSX2/bios directory.

However, if you put the files in a different folder and point "PCSX2 First Time Configuration" to it, then ,$HOME/.var/app/net.pcsx2.PCSX2/config/PCSX2/logs/emuLog.txt contains several

Failed to open NVM file '/path/to/PCSX2_bios_files/SCPH-70012_BIOS_V12_USA_200.nvm' for writing

because by default the flatpak does not give itself write access to most filesystem directories. I'm not yet sure what this affects; code in CDVD/CDVD.cpp does most writes to the .nvm file. I find SSX on Tour still runs from a .iso file but not from the game DVD, possibly for other reasons.

Probably the best workaround is to put the BIOS files in the default directory. Another is to grant the flatpak read-write access to your BIOS directory with flatseal or by adding --filesystem=/path/to/PCSX2_bios_files:rw to the flatpak run invocation of PCSX2.

There's also an issue that PCSX2 tries to open the file named _PS2VERSION.nvm but the PS2 BIOS dumper DUMPBIOS-MASS.ELF creates it with an uppercase .NVM extension, so on a case-sensitive filesystem it creates a new file. Until that's fixed, you should rename your existing .nvm file to have an uppercase extension.

Where can these issues with the PCSX2 flatpak be documented where people will see them?

j8r commented 2 years ago

You can also use sudo flatpak override net.pcsx2.PCSX2 --filesystem=/path/to/BIOS (:rw is by default). This can be added in the README.md and the metainfo.xml file, similarly to what has be done with xemu.

I agree just mentioning the default directory and tell the user to put the BIOS there should be enough.

skierpage commented 2 years ago

You can also use sudo flatpak override net.pcsx2.PCSX2 --filesystem=/path/to/BIOS (:rw is by default). This can be added in the README.md and the metainfo.xml file, similarly to what has be done with xemu.

I agree just mentioning the default directory and tell the user to put the BIOS there should be enough.

Thanks. Pull request #56 improves the README (imho :wink:) I didn't mention flatpak override since I don't fully understand that command. Feel free to change, rewrite, or ignore the pull request, or comment on it and I'll revise.