[hle/fs] fix: handle Temporary/ProperSystem/SafeMode save spaces instead of ASSERT(false)

OpenSaveDataFileSystem and OpenSaveDataFileSystemBySystemSaveDataId mapped the
SaveDataSpaceId to a StorageId with a switch that fell into ASSERT(false) for
Temporary, ProperSystem, and SafeMode. So any game that opens cache storage
(SaveDataSpaceId::Temporary, TOTK being the obvious one) tripped the assert
during save enumeration, before the game even finished loading, which made
those titles completely unplayable.

Nothing exceptional is going on with those spaces, they just were never mapped.
Temporary is user-space scratch storage so it goes on user nand, and
ProperSystem/SafeMode are system spaces so they go on system nand. The id only
feeds the free-space reporter here, so these mappings are safe and just need to
be sane.

Fixes: https://github.com/eden-emulator/Issue-Reports/issues/368
This commit is contained in:
BoiledElectricity 2026-06-05 19:37:49 -04:00
parent 470d43df6d
commit 43238e0a56

View file

@ -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 =