Commit Graph

57 Commits (4677fd3f64dd51c7419e0268df9fe10f8f6ce0fd)

Author SHA1 Message Date
Liam 4677fd3f64 am: use applet program loading for tested versions 2 years ago
FearlessTobi 0f9288e38d vfs: Move vfs files to their own directory 2 years ago
Liam 5a09ba7255 vfs: ensure key area keys are validated 3 years ago
Liam 50eee9b218 fssystem: rework for yuzu style 3 years ago
Liam 86f6b6b7b2 vfs: expand support for NCA reading 3 years ago
Tobias 04868ab9da
file_sys/content_archive: Detect compressed NCAs (#11047) 3 years ago
Liam 9737615948 general: fix compile for Apple Clang 3 years ago
Liam d11547024c general: fix compilation on GCC 12 4 years ago
Morph 99ceb03a1c general: Convert source file copyright comments over to SPDX
This formats all copyright comments according to SPDX formatting guidelines.
Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
4 years ago
ReinUsesLisp 1ef64112b3 content_archive: Remove unnecessary include to <ranges>
Fixes build issues on clang.
5 years ago
Lioncash 1da72c7792 file_sys: Resolve cases of variable shadowing
Brings us closer to enabling -Wshadow as an error in the core code.
5 years ago
ReinUsesLisp 3ff978aa4f common/common_funcs: Rename INSERT_UNION_PADDING_{BYTES,WORDS} to _NOINIT
INSERT_PADDING_BYTES_NOINIT is more descriptive of the underlying behavior.
5 years ago
Lioncash b1657b8c6b vfs: Use existing type aliases consistently
Makes use of the VirtualDir and VirtualFile aliases across the board
instead of having a few isolated places that don't use it.
5 years ago
Lioncash 6b7320add4 core: Remove unnecessary enum casts in log calls
Follows the video core PR. fmt doesn't require casts for enum classes
anymore, so we can remove quite a few casts.
5 years ago
bunnei 3d592972dc
Revert "core: Fix clang build" 6 years ago
Lioncash be1954e04c core: Fix clang build
Recent changes to the build system that made more warnings be flagged as
errors caused building via clang to break.

Fixes #4795
6 years ago
Lioncash ff45c39578 General: Make use of std::nullopt where applicable
Allows some implementations to avoid completely zeroing out the internal
buffer of the optional, and instead only set the validity byte within
the structure.

This also makes it consistent how we return empty optionals.
6 years ago
Lioncash 01d1b5cdaf file_sys: Replace inclusions with forward declarations where applicable
Same behavior, minus unnecessary inclusions where not necessary.
6 years ago
Lioncash 15660bd857 aes_util: Allow SetIV to be non-allocating
In a few places, the data to be set as the IV is already within an array.
We shouldn't require this data to be heap-allocated if it doesn't need
to be. This allows certain callers to reduce heap churn.
6 years ago
FearlessTobi 9f82a9a244 crypto: Make KeyManager a singleton class
Previously, we were reading the keys everytime a KeyManager object was created, causing yuzu to reread the keys file multiple hundreds of times when loading the game list.
With this change, it is only loaded once.
On my system, this decreased game list loading times by a factor of 20.
6 years ago
bunnei 1bdae0fe29 common_func: Use std::array for INSERT_PADDING_* macros.
- Zero initialization here is useful for determinism.
7 years ago
Zach Hilman e018a48460 content_archive: Add accessors for Rights ID and SDK Version 7 years ago
jonsn0w e78d069a81
Update content_archive.cpp
log clutter in debug logs when theres really no need
7 years ago
Zach Hilman 318bf7c8e3 content_archive: Add getter for logo section of NCA 7 years ago
Zach Hilman e20db909ee content_archive: Add optional KeyManager parameter to constructor
Allows resuing a common KeyManager when a large amount of NCAs are handled by the same class. Should the parameter not be provided, a new KeyManager will be constructed, as was the default behavior prior to this.
8 years ago
Frederic L 7a5eda5914 global: Use std::optional instead of boost::optional (#1578)
* get rid of boost::optional

* Remove optional references

* Use std::reference_wrapper for optional references

* Fix clang format

* Fix clang format part 2

* Adressed feedback

* Fix clang format and MacOS build
8 years ago
Zach Hilman a25d79cfaa vfs: Remove InterpretAsDirectory and related functions
When writing VFS, it initally seemed useful to include a function to in-place convert container files into directories in one homogenous directory structure, but re-evaluating it now there have been plenty of chances to use it and there has always been a better way. Removing as it is unused and likely will not be used.
8 years ago
Lioncash 871350ae35 content_archive: Simpify assignment of bktr_base_romfs in the constructor
std::move doesn't actually dereference the data, so it doesn't matter
whether or not the type is null.
8 years ago
Lioncash 441b5b97bd content_archive: Make IsValidNCA() an internally linked function
This is only ever used within the cpp file, so it can just be an
internal function.
8 years ago
Lioncash 53e77ffbfe content_archive: Simplify rights ID check
This is the same as using std::any_of with an inverted predicate.
8 years ago
Lioncash d6604fa765 content_archive: Split loading into separate functions
The constructor alone is pretty large, the reading code should be split
into its consistuent parts to make it easier to understand it without
having to build a mental model of a 300+ line function.
8 years ago
Lioncash 4783ad54de content_archive: Pass and take NCASectionHeader instance by reference
Each header is 512 bytes in size, which is kind of an excessive amount
to copy all the time when it's possible to avoid doing so.
8 years ago
Zach Hilman 90c07e0d33 content_archive: Move get key log to Trace level
Avoids printing live keys in the general log.
8 years ago
Lioncash 05ef9dfc10 file-sys: Default heavy-weight class destructors in the cpp file
Several classes have a lot of non-trivial members within them, or don't
but likely should have the destructor defaulted in the cpp file for
future-proofing/being more friendly to forward declarations.

Leaving the destructor unspecified allows the compiler to inline the
destruction code all over the place, which is generally undesirable from
a code bloat perspective.
8 years ago
fearlessTobi 63c2e32e20 Port #4182 from Citra: "Prefix all size_t with std::" 8 years ago
Zach Hilman c913136eb2 bktr: Fix bucket overlap error 8 years ago
Zach Hilman 92e26df00f nsp: Fix error masking issue with XCI files
Now display correct error instead of catch-all MissingProgramNCA
8 years ago
Zach Hilman a6e75cd45b bktr: Implement IVFC offset shifting
Fixes base game read errors
8 years ago
Zach Hilman 1efe5a76b1 content_archive: Add BKTR header parsing to NCA 8 years ago
Lioncash a813c10e1c file_sys: Replace includes with forward declarations where applicable
Cuts down on include dependencies, resulting in less files that need to
be rebuilt when certain things are changed.
8 years ago
Zach Hilman 4f18c17df7 content_archive: Add update title detection
This is needed because the title IDs of update NCAs will not use the update title ID. The only sure way to tell is to look for a partition with BKTR crypto.
8 years ago
Zach Hilman c4845df3d4 xts_encryption_layer: Implement XTSEncryptionLayer 8 years ago
Zach Hilman ec3bef7b4c loader: Add more descriptive errors
Full list of new errors and descriptions in core/loader/loader.h
8 years ago
bunnei fd9da4232b
Merge pull request #850 from DarkLordZach/icon-meta
Add Icons and Metadata Support
8 years ago
Zach Hilman 91cfe70301 loader: Add icon and title support to XCI 8 years ago
Zach Hilman 2cc962e171 content_archive: Add support for titlekey cryptography 8 years ago
Zach Hilman 13cdf1f159 Add missing parameter to files.push_back() 8 years ago
Zach Hilman 187d8e215f Use more descriptive error codes and messages 8 years ago
Zach Hilman a9c921a41d Use ErrorEncrypted where applicable and fix no keys crash 8 years ago
Zach Hilman 03149d3e4a Add missing includes and use const where applicable 8 years ago