aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoiledElectricity <james.dellamorte@gmail.com>2026-06-15 03:00:21 +0200
committercrueter <crueter@eden-emu.dev>2026-06-15 03:00:21 +0200
commitd698c3b60189e25488c58c5fa00d067e5955a4b6 (patch)
tree554a083992af8d0a333c805d5d3e4b837f19a35f
parent60e10327715e420f652ed148e72e22ce8ded55a3 (diff)
[hle/fs] fix handle Temporary/ProperSystem/SafeMode save spaces instead of ASSERT(false) (#4069)
OpenSaveDataFileSystem was missing a few SaveDataSpaceId mappings, so it would hit ASSERT(false). This broke games that open cache storage, with TOTK being the obvious one, because save enumeration could assert before the game even finished loading. Fixed this by mapping Temporary to user nand, and ProperSystem/SafeMode to system nand. These only get used for the free-space check here, so they just need to point somewhere sane. Fixes: https://github.com/eden-emulator/Issue-Reports/issues/368 Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4069 Reviewed-by: Lizzie <lizzie@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev>
-rw-r--r--src/core/hle/service/filesystem/fsp/fsp_srv.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/core/hle/service/filesystem/fsp/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp/fsp_srv.cpp
index 0ee68c0332..78a1dac81b 100644
--- a/src/core/hle/service/filesystem/fsp/fsp_srv.cpp
+++ b/src/core/hle/service/filesystem/fsp/fsp_srv.cpp
@@ -284,9 +284,17 @@ Result FSP_SRV::OpenSaveDataFileSystem(OutInterface<IFileSystem> out_interface,
id = FileSys::StorageId::NandSystem;
break;
case FileSys::SaveDataSpaceId::Temporary:
+ // ok this is definitely wrong. ASSERT(false) here just kills the whole game the first
+ // time it opens cache storage, and plenty of games do that (TOTK for one). there is
+ // user-space scratch storage so it belongs on user nand. map it, do not crash.
+ id = FileSys::StorageId::NandUser;
+ break;
case FileSys::SaveDataSpaceId::ProperSystem:
case FileSys::SaveDataSpaceId::SafeMode:
- ASSERT(false);
+ // same deal for these two. they are system-level spaces so they go on system nand.
+ // way better than nuking the title over a save-space id we just did not list out.
+ id = FileSys::StorageId::NandSystem;
+ break;
}
*out_interface =
@@ -324,9 +332,15 @@ Result FSP_SRV::OpenSaveDataFileSystemBySystemSaveDataId(OutInterface<IFileSyste
id = FileSys::StorageId::NandSystem;
break;
case FileSys::SaveDataSpaceId::Temporary:
+ // same broken switch as OpenSaveDataFileSystem above. do not ASSERT(false) and kill the
+ // game over a save-space id, just map Temporary to user nand like it should be.
+ id = FileSys::StorageId::NandUser;
+ break;
case FileSys::SaveDataSpaceId::ProperSystem:
case FileSys::SaveDataSpaceId::SafeMode:
- ASSERT(false);
+ // system spaces -> system nand. handled, not crashed.
+ id = FileSys::StorageId::NandSystem;
+ break;
}
*out_interface =