Opened 5 years ago
Last modified 3 years ago
#11366 new defect
SCUMM/HE: Problem with Savegame Naming on PS Vita and Other Mobile Ports
Reported by: | Schnida | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | Engine: SCUMM |
Version: | Keywords: | ||
Cc: | Game: | Putt-Putt Enters the Race |
Description (last modified by )
System: PS Vita
Version: https://www.scummvm.org/frs/scummvm/2.1.1/scummvm-2.1.1-vita.vpk
The same problem occurs on the latest nightly version (psp2-master-19fe3521)
Game: Putt-Putt Enters the Race (German Version from Steam)
Problem
When I try to save the game with the in-game load and save interface this error pops up: "Failed to load saved game from file: puttrace-de-Töff-Töff.sg1"
I went to the save folder and found a file called "puttrace-de-temp.sgS".
Observations
I tried to save the game on other devices I own. The results are the following:
- Windows 10 -> Saving works
- 3DS -> Saving doesn't work (same error)
- PSP -> Saving doesn't work (same error)
Interestingly, the English version of the game works just fine on every device, which lead me to believe that the umlaut in "Töff-Töff" might be the problem.
Thanks for taking your time. I hope I didn't leave out any important information.
Attachments (3)
Change History (12)
by , 5 years ago
Attachment: | puttrace-de-temp.sgS added |
---|
comment:1 by , 5 years ago
Description: | modified (diff) |
---|
comment:2 by , 4 years ago
Component: | Port: PSP Vita → Engine: SCUMM |
---|
That error message is from the SCUMM engine when loadState function returns not success:
https://github.com/scummvm/scummvm/blob/master/engines/scumm/scumm.cpp#L2466
The loadState function is here: https://github.com/scummvm/scummvm/blob/master/engines/scumm/saveload.cpp#L320
That should emit a warning if it fails in most cases... Is there one before the error message?
I think the only case where it can return false without a warning is when openSaveFileForReading(slot, compat, filename) fails:
https://github.com/scummvm/scummvm/blob/master/engines/scumm/saveload.cpp#L324
That is defined here where it just calls openForSaving from the _saveFileMan (Save File Manager) which I think is a platform specific singleton:
https://github.com/scummvm/scummvm/blob/master/engines/scumm/saveload.cpp#L155
Hmm I would suspect the issue is either in SaveFileMan when using accented characters or an issue with makeSavefileName i.e.
https://github.com/scummvm/scummvm/blob/master/engines/scumm/saveload.cpp#L595
comment:3 by , 4 years ago
The reporter has also said on the forum post that the problem occurs on:
- Nintendo DS
- Nintendo 3DS
- Nintendo Switch
- PSP
- PS Vita
And it doesn't occur on:
- Windows
comment:4 by , 4 years ago
Summary: | Problem with save file on mobile devices → SCUMM: HE: Problem with Savegame Naming on PS Vita and Other Mobile Ports |
---|
comment:5 by , 4 years ago
User reports that there are no warnings emitted.
They should try running the game with ./scummvm -d 2 or higher.
The issue looks like it might be from the HE code here... as nowhere else would allow .sg1 in the savegame suffix:
https://github.com/scummvm/scummvm/blob/master/engines/scumm/he/script_v60he.cpp#L172
by , 4 years ago
Attachment: | scummvmdebug.txt added |
---|
comment:6 by , 4 years ago
I'm currently playing the german version of "Putt Putt Enters the Race", bought from Steam, via ScummVM on Mac.
I have exactly the same Problem and as the original author I suspect the umlauts are the problem cause here.
I'll attach a log running scummvm -d 2.
I guess the relevant message is this:
DEBUG: Couldn't open file *\T�ff-T�ff.sg0 for Writing in Write-The-Catalog
I was running scummvm from within iterm2 which i guess can usually display utf8 characters.
comment:7 by , 3 years ago
Summary: | SCUMM: HE: Problem with Savegame Naming on PS Vita and Other Mobile Ports → SCUMM/HE: Problem with Savegame Naming on PS Vita and Other Mobile Ports |
---|
by , 3 years ago
Attachment: | image-20220515-210743.png added |
---|
comment:8 by , 3 years ago
Same issue occurs on android.
The Steam Version of Putt-Putt Enters the Race works fine on the Steamdeck tho.
I did notice however while browsing the local savegame files from the steam version that the umlaut in the filename isn't correctly utf-8 encoded, it's broken.
In the attached screenshot you can see the broken german saves, 2 english saves (without umlauts) and a .dummy file manually created with the ö umlaut.
comment:9 by , 3 years ago
I looked into it some more, the problem is the umlauts in savegame filenames appear to be encoded as ISO-8859-1.
So ö becomes \366 which causes the issue on the mentioned systems (android,switch,psp etc.)
For reference (autocomplete from linux utf-8 terminal):
puttrace-T$'\366'ff-T$'\366'ff.sg0
This file is created in the save folder after the error message pops up. It works on Windows when I rename it btw.