aboutsummaryrefslogtreecommitdiff
path: root/src/core/file_sys/submission_package.cpp
AgeCommit message (Collapse)Author
2023-09-05core: Add support for loading NSPs with personalized tickets. (#10048)Steveice10
Co-authored-by: Morph <39850852+Morph1984@users.noreply.github.com>
2023-08-16file_sys: tolerate empty NCALiam
2023-08-15fssystem: rework for yuzu styleLiam
2023-08-15vfs: expand support for NCA readingLiam
2022-04-23general: Convert source file copyright comments over to SPDXMorph
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.
2021-11-03core: Remove unused includesameerj
2021-07-20file_sys: Support load game collection (#6582)Feng Chen
Adds support for loading games with multiple programs embedded within such as the Dragon Quest 1+2+3 Collection
2021-05-16core: Make variable shadowing a compile-time errorLioncash
Now that we have most of core free of shadowing, we can enable the warning as an error to catch anything that may be remaining and also eliminate this class of logic bug entirely.
2021-05-02file_sys: Resolve cases of variable shadowingLioncash
Brings us closer to enabling -Wshadow as an error in the core code.
2020-11-24core: loader: Implement support for loading indexed programs.bunnei
2020-10-12Merge pull request #3929 from FearlessTobi/ticket-keysbunnei
file_sys/nsp: Make SetTicketKeys actually do something
2020-09-24submission_package: Fix updates integrated into cartridge images.Morph
2020-09-17submission_package: Account for multi-content NSPsMorph
Previously we assumed a submission package can only contain one Program NCA with a single TitleID. However, Super Mario 3D All-Stars contains four Program NCAs, each with their unique TitleIDs. This accounts for the existence of multi-content games such as this one. - Fixes booting Super Mario 3D All-Stars from the games list.
2020-08-23file_sys: Replace inclusions with forward declarations where applicableLioncash
Same behavior, minus unnecessary inclusions where not necessary.
2020-07-18file_sys/nsp: Make SetTicketKeys actually do somethingFearlessTobi
Previously, the method wasn't modifying any class state and therefore not having any effects when called. Since this has been the case for a very long time now, I'm not sure if we couldn't just remove this method altogether.
2020-07-01key_manager: Correct casing of instance()Lioncash
Our codebase uppercases member function names.
2020-05-20crypto: Make KeyManager a singleton classFearlessTobi
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.
2019-09-21submisson_package: Fix edge case with improperly sized filenamesZach Hilman
Prevents a crash if the filename is less than 9 characters long.
2019-09-21Merge pull request #2576 from DarkLordZach/nsp-fix-1David
nsp: Fix various errors with loading and processing of extracted NSPs
2019-07-01file_sys/submission_package: Don't warn about missing DeltaFragment NCAsBakugo
DeltaFragments are not useful to us and are often not included in patch NSPs.
2019-06-12common/hex_util: Combine HexVectorToString() and HexArrayToString()Lioncash
These can be generified together by using a concept type to designate them. This also has the benefit of not making copies of potentially very large arrays.
2019-06-10nsp: Correct status codes for extracted NSPsZach Hilman
Avoids all extracted NSPs being marked as error file type because they don't have program NCAs.
2019-06-10nsp: Use title ID from NPDM metadata for extracted type NSPsZach Hilman
Avoids 0 being used as title ID for all extracted NSPs.
2019-03-26core: Port current uses of RegisteredCache to ContentProviderZach Hilman
2018-11-01file_sys: Use common KeyManager in NCA container typesZach Hilman
Creates a single KeyManager for the entire container and then passes it into the NCA constructor, eliminating several unnecessary KeyManager reads.
2018-10-19vfs: Remove InterpretAsDirectory and related functionsZach Hilman
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.
2018-10-05romfs_factory: Extract packed update setter to new functionZach Hilman
2018-10-03submission_package: Avoid dangling std::string_view within SetTicketKeys()Lioncash
GetName() returns a std::string by value, not by reference, so after the std::string_view is constructed, it's not well defined to actually execute any member functions of std::string_view that attempt to access the data, as the std::string has already been destroyed. Instead, we can just use a std::string and erase the last four characters.
2018-10-03submission_package: Correct location of null check within SetTicketKeys()Lioncash
If a ticket file was ever a null pointer, we'd cause a null pointer dereference, as we were calling GetExtension() on the pointer instance.
2018-10-03submission_package: Use std::string's rfind() when looking for the extension ↵Lioncash
in InitializeExeFSAndRomFS() When searching for a file extension, it's generally preferable to begin the search at the end of the string rather than the beginning, as the whole string isn't going to be walked just to check for something at the end of it.
2018-10-03submission_package: Ensure the 'extracted' member variable is always initializedLioncash
If an error occurs when constructing the PartitionFilesystem instance, the constructor would be exited early, which wouldn't initialize the extracted data member, making it possible for other code to perform an uninitialized read by calling the public IsExtractedType() member function. This prevents that.
2018-10-03submission_package: Move ExeFS and RomFS initialization to its own functionLioncash
Like the other two bits of factored out code, this can also be put within its own function. We can also modify the code so that it accepts a const reference to a std::vector of files, this way, we can deduplicate the file retrieval. Now the constructor for NSP isn't a combination of multiple behaviors in one spot. It's nice and separate.
2018-10-03submission_package: Move NCA reading code to its own functionLioncash
This too, is completely separate behavior from what is in the constructor, so we can move this to its own isolated function to keep everything self-contained.
2018-10-03submission_package: Move ticket key setting to its own functionLioncash
This behavior is entirely independent of the surrounding code, so it can be put in its own function to keep the behavior separate.
2018-10-03submission_package: Invert conditionals within NSP's constructor to reduce ↵Lioncash
nesting We can use early continues here to reduce the amount of nesting.
2018-09-05Merge pull request #1242 from lioncash/file-sysbunnei
file_sys/submission_package: Replace includes with forward declarations where applicable
2018-09-05file_sys/submission_package: Correct constructor initialization list orderLioncash
Orders the elements in the sequence to match the order in which they'll actually be initialized in.
2018-09-05file_sys/submission_package: Replace includes with forward declarations ↵Lioncash
where applicable
2018-09-04nsp: Fix error masking issue with XCI filesZach Hilman
Now display correct error instead of catch-all MissingProgramNCA
2018-09-04main: Only show DRD deprecation warning onceZach Hilman
2018-09-04nsp: Comply with style and performance guidelinesZach Hilman
2018-09-04file_sys: Add Nintendo Submission Package (NSP)Zach Hilman