Commit graph

89 commits

Author SHA1 Message Date
Zach Hilman
b273b19576 loader: Propagate NCA logo section to ReadBanner and ReadLogo 2019-01-15 16:01:04 -05:00
Zach Hilman
4c20a39828 loader: Add accessor for Manual RomFS 2018-12-28 15:32:39 -05:00
bunnei
795335af0f
Merge pull request #1928 from lioncash/caps
kernel: Handle kernel capability descriptors
2018-12-27 11:15:34 -05:00
Zach Hilman
0756f29a2c loader: Add accessor for game control data 2018-12-27 00:16:55 -05:00
Lioncash
002ae08bbd kernel/process: Hook up the process capability parser to the process itself
While we're at it, we can also toss out the leftover capability parsing
from Citra.
2018-12-21 07:05:34 -05:00
bunnei
2c45c6d234
Merge pull request #1819 from DarkLordZach/disable-addons
patch_manager: Add support for disabling patches
2018-12-10 21:52:19 -05:00
Lioncash
de323851b4 loaders: Make GetFileType() a const qualified member function
No implementations actually modify instance state (and it would be
questionable to do that in the first place given the name), so we can
make this a const member function.
2018-12-05 17:49:34 -05:00
Zach Hilman
5f0217592b loader: Add support for reading the name of game's developer 2018-12-03 17:21:25 -05:00
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
2018-10-30 00:03:25 -04:00
Lioncash
bed872ed38 nso: Return an optional address from LoadModule
If a malformed NSO is attempted to be loaded, we shouldn't continue
onwards. We should be reporting an error and bailing out.
2018-10-15 17:02:11 -04:00
Zach Hilman
5045748829 loader: Add getter for packed update
Reads the update included with the game if it has one and adds the new ErrorNoPackedUpdate status.
2018-10-05 08:46:31 -04:00
Lioncash
a63e6f9dfd loader: Make the Load() function take a process as a regular reference, not a SharedPtr
A process should never require being reference counted in this
situation. If the handle to a process is freed before this function is
called, it's definitely a bug with our lifetime management, so we can
put the requirement in place for the API that the process must be a
valid instance.
2018-09-29 16:00:03 -04:00
Zach Hilman
a6e75cd45b bktr: Implement IVFC offset shifting
Fixes base game read errors
2018-09-04 16:24:02 -04:00
Zach Hilman
9664ce255d bktr: Fix missing includes and optimize style 2018-09-04 16:24:02 -04:00
Zach Hilman
f5e03b9173 loader: Add BKTR-specific error messages and codes 2018-09-04 16:23:44 -04:00
Zach Hilman
b555311438 loader: Add NSP file type and NSP-specific errors 2018-09-04 14:25:54 -04:00
Lioncash
a405373144 vfs_real: Forward declare IOFile
Eliminates the need to rebuild some source files if the file_util header
ever changes. This also uncovered some indirect inclusions, which have
also been fixed.
2018-09-02 12:38:14 -04:00
Zach Hilman
b247e0cab0 loader: Add new NAX-specific errors and messages 2018-08-23 11:52:44 -04:00
Zach Hilman
2164702cf7 nax: Add AppLoader_NAX and update loader to support it 2018-08-23 11:52:44 -04:00
Lioncash
87d8a9c986 loader: Make ResultStatus directly compatible with fmt
We can make the enum class type compatible with fmt by providing an
overload of operator<<.

While we're at it, perform proper bounds checking. If something exceeds
the array, it should be a hard fail, because it's, without a doubt, a
programmer error in this case.
2018-08-15 05:52:37 -04:00
Lioncash
96c0b81a51 loader: Remove address mapping remnants from citra
These mappings are leftovers from citra and don't apply to the Switch.
2018-08-14 21:37:03 -04:00
David Marcec
98b940052c made ResultStatus a u16 2018-08-12 14:56:22 +10:00
Zach Hilman
ec3bef7b4c loader: Add more descriptive errors
Full list of new errors and descriptions in core/loader/loader.h
2018-08-09 21:06:59 -04:00
Zach Hilman
dad2ae1ee0 loader: Remove unused IdentifyFile overload 2018-08-08 21:18:45 -04:00
Zach Hilman
9e88f03e75 Avoid parsing RomFS to directory in NCA 2018-08-06 23:06:33 -04:00
bunnei
2b06301dbf
Merge pull request #849 from DarkLordZach/xci
XCI and Encrypted NCA Support
2018-08-04 14:33:11 -04:00
Lioncash
bf45092c61 kernel: Move object class to its own source files
General moving to keep kernel object types separate from the direct
kernel code. Also essentially a preliminary cleanup before eliminating
global kernel state in the kernel code.
2018-08-01 23:34:42 -04:00
Zach Hilman
187d8e215f Use more descriptive error codes and messages 2018-08-01 00:16:54 -04:00
Zach Hilman
df5b75694f Remove files that are not used 2018-08-01 00:16:54 -04:00
Lioncash
1d755abce4 core: Make converting constructors explicit where applicable
Avoids unwanted implicit conversions. Thankfully, given the large amount
of cleanup in past PRs, only this tiny amount is left over to cover.
2018-07-23 23:13:22 -04:00
Lioncash
50d08beed2 loader: Amend Doxygen comments
These weren't adjusted when VFS was introduced
2018-07-19 14:04:33 -04:00
Zach Hilman
29aff8d5ab Virtual Filesystem 2: Electric Boogaloo (#676)
* Virtual Filesystem

* Fix delete bug and documentate

* Review fixes + other stuff

* Fix puyo regression
2018-07-18 18:07:11 -07:00
bunnei
913896cbd9 Revert "Virtual Filesystem (#597)"
This reverts commit 77c684c114.
2018-07-07 20:24:51 -07:00
Zach Hilman
77c684c114 Virtual Filesystem (#597)
* Add VfsFile and VfsDirectory classes

* Finish abstract Vfs classes

* Implement RealVfsFile (computer fs backend)

* Finish RealVfsFile and RealVfsDirectory

* Finished OffsetVfsFile

* More changes

* Fix import paths

* Major refactor

* Remove double const

* Use experimental/filesystem or filesystem depending on compiler

* Port partition_filesystem

* More changes

* More Overhaul

* FSP_SRV fixes

* Fixes and testing

* Try to get filesystem to compile

* Filesystem on linux

* Remove std::filesystem and document/test

* Compile fixes

* Missing include

* Bug fixes

* Fixes

* Rename v_file and v_dir

* clang-format fix

* Rename NGLOG_* to LOG_*

* Most review changes

* Fix TODO

* Guess 'main' to be Directory by filename
2018-07-06 10:51:32 -04:00
Zach Hilman
63f26d5c40 Add support for decrypted NCA files (#567)
* Start to add NCA support in loader

* More nca stuff

* More changes to nca.cpp

* Now identifies decrypted NCA cont.

* Game list fixes and more structs and stuff

* More updates to Nca class

* Now reads ExeFs (i think)

* ACTUALLY LOADS EXEFS!

* RomFS loads and games execute

* Cleanup and Finalize

* plumbing, cleanup and testing

* fix some things that i didnt think of before

* Preliminary Review Changes

* Review changes for bunnei and subv
2018-06-21 11:16:23 -04:00
N00byKing
358050cfc6 core, main.h: Abort on 32Bit ROMs (#309)
* core, main.h: Abort on 32Bit ROMs

* main.cpp: Fix Grammar
2018-04-06 11:06:32 -04:00
bunnei
386df282a3 loader: Clean up ctors and includes. 2018-01-20 15:54:17 -05:00
bunnei
e75aba3ed0 loader: Add DeconstructedRomDirectory for game dumps. 2018-01-20 15:54:15 -05:00
bunnei
023aef053c loader: Refactor to also pass filepath into IdentifyType. 2018-01-20 14:59:44 -05:00
bunnei
746c2a3ae7 core: Refactor MakeMagic usage and remove dead code. 2017-10-15 00:11:38 -04:00
bunnei
72b03025ac Remove lots more 3DS-specific code. 2017-10-12 21:21:49 -04:00
bunnei
b1d5db1cf6 Merge remote-tracking branch 'upstream/master' into nx
# Conflicts:
#	src/core/CMakeLists.txt
#	src/core/arm/dynarmic/arm_dynarmic.cpp
#	src/core/arm/dyncom/arm_dyncom.cpp
#	src/core/hle/kernel/process.cpp
#	src/core/hle/kernel/thread.cpp
#	src/core/hle/kernel/thread.h
#	src/core/hle/kernel/vm_manager.cpp
#	src/core/loader/3dsx.cpp
#	src/core/loader/elf.cpp
#	src/core/loader/ncch.cpp
#	src/core/memory.cpp
#	src/core/memory.h
#	src/core/memory_setup.h
2017-10-09 23:56:20 -04:00
bunnei
33ea53094c loader: Add support for NRO, as well as various fixes and shared linker. 2017-10-05 23:30:08 -04:00
bunnei
6bafd3f4f7 loader: Add support for loading an NSO. 2017-09-30 14:32:53 -04:00
Subv
7f48aa8d25 Loaders: Don't automatically set the current process every time we load an application.
The loaders will now just create a Kernel::Process, construct it and return it to the caller, which is responsible for setting it as the current process and configuring the global page table.
2017-09-26 18:17:47 -05:00
Max Thomas
c91ccbd0ba Loader/NCCH: Add support for loading application updates (#2927)
* loader/ncch: split NCCH parsing into its own file

* loader/ncch: add support for loading update NCCHs from the SD card

* loader/ncch: fix formatting

* file_sys/ncch_container: Return a value for OpenFile

* loader/ncch: cleanup, always instantiate overlay_ncch to base_ncch

* file_sys/ncch_container: better encryption checks, allow non-app NCCHs to load properly and for the existence of NCCH structures to be checked

* file_sys/ncch_container: pass filepath as a const reference
2017-09-25 08:17:38 +02:00
bunnei
f5cf9960d9 loader: Expose program title. 2017-08-03 20:10:37 -04:00
TheKoopaKingdom
f008b22e3b Addressed Bunnei's review comments, and made some other tweaks:
- Deleted GetStatus() because it wasn't used anywhere outside of Core::System.
 - Fixed design flaw where the message bar status could be set despite the game being stopped.
2017-06-02 18:40:39 -04:00
TheKoopaKingdom
a8aef599e0 Created a whitelist of system archives to prevent false positives creating dialogs. 2017-06-02 18:28:14 -04:00
TheKoopaKingdom
37bec598ea Made some changes from review comments:
- Made LoadKernelSystemMode return a pair consisting of a system mode and a result code (Could use review).
- Deleted ErrorOpenGL error code in favor of just having ErrorVideoCore.
- Made dialog messages more clear.
- Compared archive ID in fs_user.cpp to ArchiveIdCode::NCCH as opposed to hex magic.
- Cleaned up some other stuff.
2017-06-02 18:28:14 -04:00