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

Silent Hill - Shattered Memories - Memory Stick Not Inserted issue #13781

Open
alkaris2 opened this issue Dec 17, 2020 · 24 comments
Open

Silent Hill - Shattered Memories - Memory Stick Not Inserted issue #13781

alkaris2 opened this issue Dec 17, 2020 · 24 comments
Labels
Platform-specific (Android) Saving issue Prevents or obstructs saving game (not save states.)
Milestone

Comments

@alkaris2
Copy link

What happens?

While playing Silent Hill - Shattered Memories I cannot save the game from the in-game Save Menu, because it's telling me that it can't find the Save Data that I created when I started a new game. It's right there in directory where it first created it, but for some reason the emulator cannot see the data exists for the game to read and save to.

ULUS10450_00000

I can only use Save States to save the game, not the in-game Save option. I tried checking the System settings for Memory Stick Inserted option to check that it is in fact Enabled from the menu. Toggling on and off doesn't seem to change whether if it detects the Save Data that already exists.

I've tried other stuff like creating appropriate directories for SAVEDATA directories like so;

~/.config/ppsspp/PSP/memstick/PSP/SAVEDATA/<GAME_ID_DIR>

~/.config/ppsspp/memstick/PSP/SAVEDATA/<GAME_ID_DIR>

doesn't read or detect any of these directories.

What should happen?

You should be able to save game data from the in-game Save option as normal by reading and saving that data from SAVEDATA in ~/.config/ppsspp/PSP/SAVEDATA directory.

What hardware, operating system, and PPSSPP version? On desktop, GPU matters for graphical issues.

CPU: Intel™ Core® i7-7700K
RAM: Trident Z RGB 32Gb
GPU: Asus GTX 1070

OS: Manjaro Linux - 5.9.11-3-MANJARO
PPSSPP Version: v1.10.3

@hrydgard hrydgard added the Saving issue Prevents or obstructs saving game (not save states.) label Dec 17, 2020
@hrydgard hrydgard added this to the v1.12.0 milestone Dec 17, 2020
@LunaMoo
Copy link
Collaborator

LunaMoo commented Dec 17, 2020

Probably just a duplicate of #7244

Try restarting emulation and loading the game from in-game save(not using savestates), then try to save. If it does save, then it's the mentioned issues. Games have protection/validation for memstick and abusing savestates can break it by simply loading a savestate made before last in-game savedata was made. This is an user time travel issue which can't really be fixed, but games can usually be easily patched via cheats to disable that memstick protection allowing to save anyway.

@alkaris2
Copy link
Author

@LunaMoo I've tried this, I've tried restarting emulation and it does not work. I created a new test file to test it out, but if you try to load the initial save data that it creates, it says the save data it created is corrupt, when the save file isn't corrupt, the save file is sane.

The game is just simply broken with no way to save the game the properly way from in-game. Because new file shouldn't be read as corrupt if the game created it and put it into the SAVEDATA directory as it would on real PSP hardware. No Save States, just save file of the game itself. -- I don't know of any game codes or cheats for SH: Shattered Memories that could bypass this memstick protection if this game has that. So for the time being the only way of saving the game is through Save States unless there's a patch code for the game or something the emulator can provide for the game to recognise the save data correctly.

@unknownbrackets
Copy link
Collaborator

A few suggestions:

  • Try the latest git build.
  • Make sure you're not using a hacked version of the ISO. Some versions were patched to work better on old custom firmware, but this makes them run worse on PPSSPP. You want a clean rip of your disc.

That said, this isn't the first time this has been reported:
https://forums.ppsspp.org/showthread.php?tid=23072&pid=103356#pid103356

The weird thing is, plenty of people have played the game, reported issues with other things, and not had saving issues. This makes me think it's related to a patched ISO.

-[Unknown]

@MiguelCardonaG
Copy link

The same problem also happens on Android, if you make any changes within the Settings section, when saving this problem comes out:

Screenshot_20201227-184839_PPSSPP

I have tried it with a clean ISO and with three different smartphones and in all gives the same problem.

@unknownbrackets
Copy link
Collaborator

It happens when you change settings? That means saving works as long as you don't?

What if you go to settings, change nothing, and return to the game?

-[Unknown]

@MiguelCardonaG
Copy link

@unknownbrackets If I don't change anything within Settings, and I give Cancel there's no error.

@unknownbrackets
Copy link
Collaborator

Interesting. I wonder if it could be checking the mtime of all files on the memory stick, really?

-[Unknown]

@MiguelCardonaG
Copy link

Interesting. I wonder if it could be checking the mtime of all files on the memory stick, really?

-[Unknown]

The funny or strange thing is that if you want to save the game later, that error occurs.

@Saramagrean
Copy link
Contributor

Try with v1.16.6 is work fine on PC but still happen on Android.

FormatFactory.20231019_203431.mp4

@sum2012
Copy link
Collaborator

sum2012 commented Oct 23, 2023

Confirm v1.16.6 is work fine on PC but still happen on Android.
How to test MemstickFixedFree option in android ?
I cannot find compat.ini in android.

@hrydgard
Copy link
Owner

It's built-in the APK on Android, but you can add an extra compat.ini in memstick/PSP/SYSTEM for quick tests.

@sum2012
Copy link
Collaborator

sum2012 commented Oct 23, 2023

unlucky, MemstickFixedFree not work
PPSSPP v1.16.6-235-g3611b4d94 Windows 64 bit log: (Create a new save, Change option,then save again)
https://gist.github.com/sum2012/7ea46cca9f4c3f3079f37d707165c462

@Marcost9
Copy link

Right now, I'm playing: Silent Hill Sharrind Memory on the app. Over the years, I've noticed some changes in the scenery that don't exist in the other version of the console, namely: shadows, detail in the scenery itself. I understood at that moment that there was a limitation of the console, but it was not the console but the application. But I didn't give up, I, being a bit picky, took the courage to fix the problem and it worked. So, checking the option: "software rendering" but another problem appeared, which was a drop in FPS/speed. Perhaps with future updates this graphical problem will appear less. The application has portacia.eu, I intend to study a little programming to solve these problems

@sum2012 sum2012 changed the title Memory Stick Not Inserted issue Silent Hill - Shattered Memories - Memory Stick Not Inserted issue Nov 23, 2023
@blurrred
Copy link

Same problem on Manjaro Linux.
Just gonna try the PCSX2 version and see if it works better.

@antipirgos
Copy link

Same problem with both versions on Android. Any cheat code save fix for this problem ??? Maybe Synchronize Save cheat. 🤔

@sum2012
Copy link
Collaborator

sum2012 commented Jul 14, 2024

Maybe relate to #19275

@hrydgard
Copy link
Owner

Looking at sceUtility output, After LIST, GETSIZE, FILES, WRITEDATASECURE and then LIST again, it gives up on Android while it happily continues on Windows. Must be some filesystem weirdness.. Not sure why it wouldn't recognize its own files in LIST...

Think I'll have to add a bunch of logging to see what's different.

@hrydgard
Copy link
Owner

hrydgard commented Jul 15, 2024

Ok, so this fails on macOS and also Linux and iOS as well, and it doesn't look like it's failing writing. So weird that it only works on Windows..

I'm starting to suspect some more memory issues with the savegame encryption (fixed one bug a while ago, there might be more).

@hrydgard
Copy link
Owner

hrydgard commented Jul 15, 2024

Got some time to valgrind it, and it indeed warns about a use of an uninitialized value in the encryption code, which could definitely cause this type of issue..

EDIT: Hm, this same valgrind warning also occurs in for example Wipeout, which has no problem saving.

This really is baffling. (though would like to fix the warning regardless)..

=5454== Thread 22 SaveIO:
==5454== Use of uninitialised value of size 8
==5454==    at 0x8E63F2: rijndaelEncrypt (AES.c:962)
==5454==    by 0x8E6807: AES_cbc_encrypt (AES.c:1319)
==5454==    by 0x8E5557: kirk_CMD4.part.0 (kirk_engine.c:327)
==5454==    by 0x40F0C3: kirkSendCmd (sceChnnlsv.cpp:102)
==5454==    by 0x40F0C3: sceSdCreateList_(_pspChnnlsvContext2&, int, int, unsigned char*, unsigned char const*) (sceChnnlsv.cpp:436)
==5454==    by 0x5EE4CF: SavedataParam::EncryptData(unsigned int, unsigned char*, int*, int*, unsigned char*, unsigned char*) (SavedataParam.cpp:949)
==5454==    by 0x5F3D17: SavedataParam::Save(SceUtilitySavedataParam*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool) (SavedataParam.cpp:494)
==5454==    by 0x5E9C3F: PSPSaveDialog::ExecuteIOAction() (PSPSaveDialog.cpp:1083)
==5454==    by 0x5E9DE0: DoExecuteIOAction(PSPSaveDialog*) (PSPSaveDialog.cpp:1209)
==5454==    by 0x4C01252: ??? (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30)
==5454==    by 0x4EEEAC2: start_thread (pthread_create.c:442)
==5454==    by 0x4F7FA03: clone (clone.S:100)
==5454== 

@hrydgard hrydgard modified the milestones: Future, v1.18.0 Jul 15, 2024
hrydgard added a commit that referenced this issue Jul 16, 2024
This confused Valgrind and made me think we had another memory bug.

Turns out this is NOT the cause of #13781, which I still don't
understand.
hrydgard added a commit that referenced this issue Jul 16, 2024
This confused Valgrind and made me think we had another memory bug.

Turns out this is NOT the cause of #13781, which I still don't
understand.
@sum2012
Copy link
Collaborator

sum2012 commented Jul 20, 2024

ppsspp v1.17-1-893-gg5c26aa4c96 android version
The same problem also happens on Android, if you make any changes within the Settings section, when saving this problem comes out

@antipirgos
Copy link

antipirgos commented Aug 17, 2024

Still can't save game in version build v1.17.1-980 Android Version 😢

@hrydgard
Copy link
Owner

Yes, this is still unsolved (and quite mysterious). Updates will be posted here if it gets fixed, unless a commit is related to save data or similar, no need to respond with "still not working".

@hrydgard
Copy link
Owner

I've been messing around some more with this, adding more logging, but the API-surface behavior of the game seems to be pretty much identical between Windows (where it works) and Linux (where it doesn't).. no easily detectable errors. No idea what's going on here.

I first thought it had to be some kind of file system semantic, like case sensitivity, but the filenames contain only numbers, and it has problems both on old-school Android shared storage and on scoped storage. I really don't get it :/

@hrydgard hrydgard modified the milestones: v1.18.0, v1.19.0 Sep 26, 2024
@antipirgos
Copy link

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

No branches or pull requests

10 participants