Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to save data #18929

Open
5 tasks done
javoerro opened this issue Mar 16, 2024 · 11 comments
Open
5 tasks done

unable to save data #18929

javoerro opened this issue Mar 16, 2024 · 11 comments
Labels
Libretro Issue on Libretro but not all ports. Platform-specific (iOS) Saving issue Prevents or obstructs saving game (not save states.)

Comments

@javoerro
Copy link

Game or games this happens in

ULUS10346

What area of the game / PPSSPP

I'm using ppsspp 1.17.1 as a core in retroarch for ios.

Every time it try to create or write saved data in the memory stick (SAVEDATA folder) it indicates that it is not possible. I even tried to import data in SAVEDATA created in an android version and it can't overwrite it.

The problem happens in all games and the save states are working.

What should happen

write the savedata

Logs

no logfiles

Platform

iOS

Mobile device model or graphics card (GPU)

iphone 14 pro

PPSSPP version affected

v1.17.1-40-ga0aab9

Last working version

v1.17.1-40-ga0aab9 in android

Graphics backend (3D API)

Vulkan

Checklist

  • Test in the latest git build in case it's already fixed.
  • Search for other reports of the same issue.
  • Try resetting settings or older versions and include if the issue is related.
  • Try without any cheats and without loading any save states.
  • Include logs or screenshots of issue.
@LunaMoo
Copy link
Collaborator

LunaMoo commented Mar 16, 2024

You're on iOS which is pretty known from having write priviledges issues.
From what I remember it was common in the past that people who used some very popular method of copying files to iOS used software which gained ownership of the folders they copied files to, and as such PPSSPP was unable to write to those folders causing such issues.

Ofc it could be something else, but that's what commonly happened since forever to users of this platform. Unfortunately I don't recall more details about it.

@LunaMoo LunaMoo added Saving issue Prevents or obstructs saving game (not save states.) Platform-specific (iOS) Libretro Issue on Libretro but not all ports. labels Mar 16, 2024
@javoerro
Copy link
Author

i understand. it would be nice to know some workaround. i tried to find some solutions, but never found for ios. but could be also a bug, because other cores in retroarch, like mGBA, can write data in the same directory.

@LunaMoo
Copy link
Collaborator

LunaMoo commented Mar 16, 2024

Try this as I still believe that's your problem, the reason savestates work while savedata doesn't is probably because libretro has it's own savestates stored in different folder.

@javoerro
Copy link
Author

javoerro commented Mar 16, 2024

Try this as I still believe that's your problem, the reason savestates work while savedata doesn't is probably because libretro has it's own savestates stored in different folder.

OK. I tried it, but I'm not sure if I did it correctly, since in retroarch there is no PSP directory, however I did it on the RetroArch/system/PPSSPP directory

The tools you quote are no longer available. Instead I used a-Shell and finally executed:

chmod 777 /private/var/mobile/Containers/Data/Application/[Long_ID]/Documents/RetroArch/system/PPSSPP

Then check the permissions changes with ls -l and they had changed. However, the problem continues.

Should I give those permissions to another directory?

@LunaMoo
Copy link
Collaborator

LunaMoo commented Mar 17, 2024

Sorry I have no idea about libretro directories and where PSP memstick ends up on it.

@javoerro
Copy link
Author

javoerro commented Mar 18, 2024

I found the cause of the problem and was able to solve it:

After trying several times and discovering that the problem also happens in the android version, I came to the conclusion that it was not a matter of the platform and that it could have to do with the configuration since it worked before on android

In the latest versions of retroarch there is in settings > saving a number of options to determine with which names the save and state subdirectories will be created.
They are options of the on/off type. by default the options that are enabled are "Sort save/states into folders by core name". In PPSSPP case, the states and memstick data are saved within a so-called PPSSPP directory.

However, I changed that option to
"Sort save/states into folders by content directory" in that case, the SAVESTATE directory that needs PPSSPP to put memstick data is created within a directory with a name other than PPSSPP.

For example, in my case, the general directory of saved data was set to RetroArch/saves, then:

Directory structure for memstick obtained:
RetroArch/saves/psp/SAVEDATA
(Where psp is the name of the directory where I keep the contents that I use with PPSSPP)

What PPSSPP needs to work is:
RetroArch/saves/PPSSPP/SAVEDATA

Then the solution I found was to make a config override for the PPSSPP core, making the option "Sort save into folders by core name" checked in Settings > Savings.

It is not clear to me if I should inform RetroArch of this bug, at most so that they report it in the wiki of this core, or if PPSSPP could fix it in future versions.

Thanks for the help!

@hrydgard
Copy link
Owner

Seems like a retroarch bug to me, since we didn't change anything...

@LunaMoo
Copy link
Collaborator

LunaMoo commented Mar 18, 2024

Actually it's probably a duplicate or related to this old thing ~ #15437
In short libretro/retroarch has an option which doesn't respect the fact that PSP games have hardcoded paths to savedata and allows users to store those anywhere where the game is stored/outside of memstick.

@bslenul
Copy link
Contributor

bslenul commented Mar 20, 2024

Hey! Do you mind testing this version of the core? https://git.libretro.com/bslenul/ppsspp/-/jobs/4926744/artifacts/browse

edit: Didn't realized the link would be temporary, here's the core: ppsspp_ios.zip

It's just the current version with a small tweak to it: https://git.libretro.com/bslenul/ppsspp/-/commit/c37e86337bad55e0428134d50c60f8a62301d798#1a8a971e2421e9a92bc76fb2c59075bc6651236e
But I don't have any Apple device to test myself so I can't confirm if it'll work or not.

@gouchi
Copy link
Contributor

gouchi commented Apr 8, 2024

@javoerro @LunaMoo Can you make a test and report ?

Thank you for your tests.

@javoerro
Copy link
Author

javoerro commented Apr 8, 2024

@javoerro @LunaMoo Can you make a test and report ?

Thank you for your tests.

@gouchi i going to test it this week for sure. i will post the results here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Libretro Issue on Libretro but not all ports. Platform-specific (iOS) Saving issue Prevents or obstructs saving game (not save states.)
Projects
None yet
Development

No branches or pull requests

5 participants