dolphin/Source/Core
Léo Lam f743f100b1 IOS/FS: Add base FST functions
Some official titles rely on implementation details of Nintendo's
FS sysmodule and will not work properly if those are changed.
Notably, some games and older versions of the System Menu appear
to be relying on the order of files returned by FS::ReadDirectory
and will either fail to find their save data (for Bolt) or
outright crash (for the System Menu).

Some titles also actually expect filesystem metadata to be correct.
One title that has been confirmed to do this is DQX, which generates
paths based on the GID of files within its own title directory.

While it is easy to make workarounds for these issues -- and in fact
we already do have some for the sysmenu and DQX, having hacks
is obviously nonideal and adding yet another hack would be required
to fix Bolt -- one that would be even uglier.

Furthermore, while it is currently unknown whether any official
title cares about permissions, the lack of FS metadata means that
we are unable to implement them if that turns out to be desirable
or necessary.

By adding a FST, we can implement things correctly and solve all
those problems without hacks.

Apart from DQX, the sysmenu and Bolt, this changeset also fixes
the Photo Channel complaining about corrupted system files
on the initial launch.

This first commit adds the basic structures and functions that
are necessary to load, save, query and update our version of the FST.

For simplicity, a binary format that is inspired from Nintendo's FST
structure was chosen for serialization. It is not expected to ever
receive an update.

PS: an update on the NAND image backend:

A long time ago I had planned to add another FS backend which would
be using a NAND image/blob as the storage. While I have already
written an implementation that has been tested, solves all the
aforementioned issues and more, produces images that are fully
compatible with IOS's FS driver, I feel like NAND images raise too
many issues: savestate sizes, code complexity and maintenance cost.

Since many fixes and additions that are part of that implementation
(e.g. FS timings, utility structures, FST) have already been merged
or will be submitted as part of this changeset, I will likely not
submit the branch.
2020-01-25 17:51:37 +01:00
..
AudioCommon Use std::istringstream or std::ostringstream instead of std::stringstream where possible. 2019-12-29 23:45:02 -05:00
Common StringUtil: Add IsPrintableCharacter and use it 2020-01-16 00:22:26 +01:00
Core IOS/FS: Add base FST functions 2020-01-25 17:51:37 +01:00
DiscIO Merge pull request #8573 from JosJuice/ciso-size 2020-01-22 19:20:36 +01:00
DolphinNoGUI Add an ARM64 target to Visual Studio projects 2019-12-28 19:20:41 +10:00
DolphinQt Merge pull request #8366 from Techjar/high-dpi-auto-adjust 2020-01-24 11:31:09 +10:00
InputCommon InputCommon: List IMUAccelerometer's Up/Down inputs first for consistency. 2020-01-18 13:56:11 -06:00
MacUpdater Reformat repo to clang-format 7.0 rules 2019-05-06 18:48:04 +00:00
UICommon Use pre-increment for iterators instead of post-increment. 2019-12-29 23:45:02 -05:00
UpdaterCommon Add an ARM64 target to Visual Studio projects 2019-12-28 19:20:41 +10:00
VideoBackends Add Dolphin version and current video backend to shader compilation logs 2020-01-24 03:29:38 -05:00
VideoCommon Merge pull request #8336 from Ebola16/PS 2020-01-25 11:52:14 +10:00
WinUpdater Add an ARM64 target to Visual Studio projects 2019-12-28 19:20:41 +10:00
CMakeLists.txt WinUpdater: Add CMakeLists.txt 2019-05-08 23:59:04 +02:00