Commit Graph

391 Commits

Author SHA1 Message Date
Lioncash
83377113bf memory: Dehardcode the use of fixed memory range constants
The locations of these can actually vary depending on the address space
layout, so we shouldn't be using these when determining where to map
memory or be using them as offsets for calculations. This keeps all the
memory ranges flexible and malleable based off of the virtual memory
manager instance state.
2018-09-24 22:16:03 -04:00
Lioncash
75603b005b process/vm_manager: Amend API to allow reading parameters from NPDM metadata
Rather than hard-code the address range to be 36-bit, we can derive the
parameters from supplied NPDM metadata if the supplied exectuable
supports it. This is the bare minimum necessary for this to be possible.

The following commits will rework the memory code further to adjust to
this.
2018-09-24 17:24:50 -04:00
David
1db1e013e0 Added support for uncompressed NSOs (#1374)
* Added support for uncompressed NSOs

* Moved compressed section check to NsoHeader
2018-09-21 00:39:30 -04:00
Lioncash
45195a51a7 nax: Avoid re-parsing NAX data with GetFileType()
An instance of the NAX apploader already has an existing NAX instance in
memory. Calling directly into IdentifyType() directly would re-parse the
whole file again into yet another NAX instance, only to toss it away
again.

This gets rid of unnecessary/redundant file parsing and allocations.
2018-09-19 14:22:37 -04:00
Lioncash
c8c4105659 nax: Avoid unnecessary calls to AsNCA() in IdentifyType()
AsNCA() allocates an NCA instance every time it's called. In the current
manner it's used, it's quite inefficient as it's making a redundant
allocation.

We can just amend the order of the conditionals to make it easier to
just call it once.
2018-09-19 14:22:37 -04:00
fearlessTobi
63c2e32e20 Port #4182 from Citra: "Prefix all size_t with std::" 2018-09-15 15:21:06 +02:00
Lioncash
2ea45fe75b kernel/thread: Include thread-related enums within the kernel namespace
Previously, these were sitting outside of the Kernel namespace, which
doesn't really make sense, given they're related to the Thread class
which is within the Kernel namespace.
2018-09-13 16:05:57 -04:00
Zach Hilman
c913136eb2 bktr: Fix bucket overlap error 2018-09-04 17:01:54 -04:00
Zach Hilman
7d5d781b20 drd: Parse title ID from program metadata 2018-09-04 16:25:30 -04:00
Zach Hilman
23a16c1720 patch_manager: Centralize Control-type NCA parsing 2018-09-04 16:25:10 -04:00
Zach Hilman
c91b60a421 game_list: Fix version display on non-NAND titles 2018-09-04 16:24:02 -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
08fcb4694f loader: Ignore patches on NRO and DRD 2018-09-04 16:23:15 -04:00
Zach Hilman
97bf83bc56 patch_manager: Add usages of patches to ExeFS 2018-09-04 16:23:15 -04:00
Zach Hilman
87be4bc283 main: Only show DRD deprecation warning once 2018-09-04 14:44:48 -04:00
Zach Hilman
e4e55d064e nsp: Comply with style and performance guidelines 2018-09-04 14:29:19 -04:00
Zach Hilman
d7518cf6e0 loader: Add AppLoader for NSP files 2018-09-04 14:27:33 -04:00
Zach Hilman
5c8aff984e card_image: Parse XCI secure partition with NSP
Eliminated duplicate code and adds support for Rev1+ carts
2018-09-04 14:27:33 -04:00
Zach Hilman
a040929c90 drd: Load title ID from program metadata
Previously only loaded from control metadata
2018-09-04 14:25:54 -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
Lioncash
4a587b81b2 core/core: Replace includes with forward declarations where applicable
The follow-up to e2457418da, which
replaces most of the includes in the core header with forward declarations.

This makes it so that if any of the headers the core header was
previously including change, then no one will need to rebuild the bulk
of the core, due to core.h being quite a prevalent inclusion.

This should make turnaround for changes much faster for developers.
2018-08-31 16:30:14 -04:00
Lioncash
0cbcd6ec9a kernel: Eliminate kernel global state
As means to pave the way for getting rid of global state within core,
This eliminates kernel global state by removing all globals. Instead
this introduces a KernelCore class which acts as a kernel instance. This
instance lives in the System class, which keeps its lifetime contained
to the lifetime of the System class.

This also forces the kernel types to actually interact with the main
kernel instance itself instead of having transient kernel state placed
all over several translation units, keeping everything together. It also
has a nice consequence of making dependencies much more explicit.

This also makes our initialization a tad bit more correct. Previously we
were creating a kernel process before the actual kernel was initialized,
which doesn't really make much sense.

The KernelCore class itself follows the PImpl idiom, which allows
keeping all the implementation details sealed away from everything else,
which forces the use of the exposed API and allows us to avoid any
unnecessary inclusions within the main kernel header.
2018-08-28 22:31:51 -04:00
Zach Hilman
6314a799aa file_sys/crypto: Fix missing/unnecessary includes 2018-08-24 22:15:32 -04:00
Zach Hilman
a7e8d10969 file_sys: Cut down on includes and copies 2018-08-23 11:53:30 -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
Zach Hilman
a9dc5a3c10 xci: Fix error masking issue
Prevents NCA-related errors from being masked into MissingProgramNCA or MissingKeyFile
2018-08-23 11:52:44 -04:00
Lioncash
477eee3993 service/filesystem: Use forward declarations where applicable
Avoids the need to rebuild multiple source files if the filesystem code
headers change.

This also gets rid of a few instances of indirect inclusions being
relied upon
2018-08-20 23:28:46 -04:00
bunnei
24a759de4a
Merge pull request #1075 from lioncash/include
loader/{nca, xci}: Remove unnecessary includes and unused member variables
2018-08-16 00:04:25 -04:00
bunnei
c594ec3417
Merge pull request #1005 from DarkLordZach/registered-fmt
file_sys: Add support for registration format
2018-08-15 23:11:58 -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
0769aa594e loader/nca: Remove unnecessary includes and member variables 2018-08-15 01:41:40 -04:00
Lioncash
c8e3f98c27 loader/xci: Remove unnecessary includes and member variables
Many of these aren't necessary and will cause this file to be required
to be recompiled whenever any changes to those files are made, which
lengthens compile times for no reason.

This also removes an unused metadata variable from AppLoader_XCI
2018-08-15 01:41:35 -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
David Marcec
a1fb8a331f Fixed invalid cast in loader
GetMessageForResultStatus takes a u16, not a size_t.
2018-08-12 13:31:15 +10:00
Zach Hilman
5b4119fa7f loader: Recognize filename '00' as NCA
Needed to avoid mismatch filetype warnings on split NAND NCAs
2018-08-11 22:50:08 -04: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
bunnei
fd9da4232b
Merge pull request #850 from DarkLordZach/icon-meta
Add Icons and Metadata Support
2018-08-08 12:27:19 -04:00
Zach Hilman
3e81c09094 loader: Fix scope error in DeconstructedRomDirectory 2018-08-07 10:37:38 -04:00
Zach Hilman
91cfe70301 loader: Add icon and title support to XCI 2018-08-06 23:13:42 -04:00
Zach Hilman
5927cf0e17 Use const where applicable 2018-08-06 23:06:33 -04:00
Zach Hilman
9e88f03e75 Avoid parsing RomFS to directory in NCA 2018-08-06 23:06:33 -04:00
Zach Hilman
7f9430f7ae loader: Make AppLoader_NCA rely on directory loading code
Eliminates duplicate code shared between their Load methods, after all the only difference is how the romfs is handled.
2018-08-05 18:28:15 -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
2beda7c2b3 kernel/process: Use accessors instead of class members for referencing segment array
Using member variables for referencing the segments array increases the
size of the class in memory for little benefit. The same behavior can be
achieved through the use of accessors that just return the relevant
segment.
2018-08-03 14:45:45 -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
0497bb5528 Fix merge conflicts with opus and update docs 2018-08-01 00:16:54 -04:00
Zach Hilman
187d8e215f Use more descriptive error codes and messages 2018-08-01 00:16:54 -04:00
Zach Hilman
a9c921a41d Use ErrorEncrypted where applicable and fix no keys crash 2018-08-01 00:16:54 -04:00
Zach Hilman
03149d3e4a Add missing includes and use const where applicable 2018-08-01 00:16:54 -04:00
Zach Hilman
239a3113e4 Make XCI comply to review and style guidelines 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
4cf2185e81 deconstructed_rom_directory: Remove unused FindRomFS() function 2018-07-24 10:54:07 -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
bunnei
84cc5dd35d
Merge pull request #784 from lioncash/loader
loader: Minor cleanup
2018-07-23 19:08:12 -07:00
bunnei
1ce5e04be8
Merge pull request #783 from lioncash/linker
linker: Remove unused parameter from WriteRelocations()
2018-07-23 19:07:22 -07:00
Lioncash
a147fa5825 loader: Remove unnecessary constructor call in IdentifyFile()
RealVfsFile inherits from VfsFile, the instance from std::make_shared is
already compatible with the function argument type, making the copy
constructor call unnecessary.
2018-07-23 17:44:58 -04:00
Lioncash
184c516182 linker: Remove unused parameter from WriteRelocations()
is_jump_relocation is never used within the function, so we can just
remove it.
2018-07-23 17:40:12 -04:00
Lioncash
1b4d0ac20e nro: Replace inclusion with a forward declaration
It's sufficient to use a forward declaration instead of a direct
inclusion here.
2018-07-23 17:29:02 -04:00
Lioncash
2b497e5830 nro: Make bracing consistent
Makes the code more uniform, and also braces cases where the body of an
unbraced conditional travels more than one line.
2018-07-23 17:24:29 -04:00
Lioncash
ac8133b9ee nro: Make constructor explicit
Makes it consistent with the other Apploader constructors, and prevents
implicit conversions.
2018-07-23 17:20:33 -04:00
Lioncash
1c16700372 nro: Remove unused forward declaration
This isn't used anywhere in the header.
2018-07-23 17:19:42 -04:00
Zach Hilman
e8f641a52d NRO Assets and NACP file format
Cleanup

Review fixes
2018-07-23 12:34:26 -04:00
Lioncash
398444e676 file_util, vfs: Use std::string_view where applicable
Avoids unnecessary construction of std::string instances where
applicable.
2018-07-22 03:22:21 -04:00
Lioncash
0ba7fe4ab1 file_util: Use a u64 to represent number of entries
This avoids a truncating cast on size. I doubt we'd ever traverse a
directory this large, however we also shouldn't truncate sizes away.
2018-07-21 22:42:08 -04:00
bunnei
d85cfc94e2
Merge pull request #752 from Subv/vfs_load
Loader: Only print the module names and addresses if they actually exist.
2018-07-20 22:57:18 -07:00
Subv
966874e357 Loader: Only print the module names and addresses if they actually exist. 2018-07-20 19:59:15 -05:00
bunnei
ffbd51e207
Merge pull request #737 from lioncash/move
filesys/loader: std::move VirtualFile instances in constructors where applicable
2018-07-20 09:21:15 -07:00
Lioncash
8874d0e657 loader/{nca, nro}: std::move VirtualFile in the constructors where applicable
This avoids unnecessary atomic reference count increments and decrements
2018-07-20 00:10:24 -04:00
Lioncash
364b950515 nso: Silence implicit sign conversion warnings 2018-07-19 20:51:15 -04:00
Lioncash
a25c5b982a nso: Remove unused function ReadSegment() 2018-07-19 20:49:27 -04:00
bunnei
b5c77313de
Merge pull request #719 from lioncash/docs
loader: Amend Doxygen comments
2018-07-19 16:11:09 -07:00
bunnei
dd0446ff43
Merge pull request #718 from lioncash/read
loader/nso: Check if read succeeded in IdentifyFile() before checking magic value
2018-07-19 16:10:29 -07:00
Lioncash
50d08beed2 loader: Amend Doxygen comments
These weren't adjusted when VFS was introduced
2018-07-19 14:04:33 -04:00
Lioncash
9b22f856c2 loader/nso: Check if read succeeded in IdentifyFile() before checking magic value
We should always assume the filesystem is volatile and check each IO
operation. While we're at it reorganize checks so that early-out errors
are near one another.
2018-07-19 12:43:21 -04:00
Lioncash
55ab369043
loader/nro: Resolve sign mismatch warnings 2018-07-18 22:27:22 -04:00
Lioncash
1831b5ef62
loader/nso: Remove unnecessary vector resizes
We can just initialize these vectors directly via their constructor.
2018-07-18 22:26:41 -04:00
Lioncash
e3a30ccc7c
loader/nso: Resolve sign mismatch warnings 2018-07-18 22:26:37 -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
Zach Hilman
69bfe075b5 General Filesystem and Save Data Fixes (#670) 2018-07-17 12:42:15 -07:00
Hedges
e066bc75b9 More improvements to GDBStub (#653)
* More improvements to GDBStub
- Debugging of threads should work correctly with source and assembly level stepping and modifying registers and memory, meaning threads and callstacks are fully clickable in VS.
- List of modules is available to the client, with assumption that .nro and .nso are backed up by an .elf with symbols, while deconstructed ROMs keep N names.
- Initial support for floating point registers.

* Tidy up as requested in PR feedback

* Tidy up as requested in PR feedback
2018-07-12 20:22:59 -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
James Rowe
0d46f0df12 Update clang format 2018-07-02 21:45:47 -04:00
James Rowe
638956aa81 Rename logging macro back to LOG_* 2018-07-02 21:45:47 -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
Lioncash
7c9644646f
general: Make formatting of logged hex values more straightforward
This makes the formatting expectations more obvious (e.g. any zero padding specified
is padding that's entirely dedicated to the value being printed, not any pretty-printing
that also gets tacked on).
2018-05-02 09:49:36 -04:00
Lioncash
8475496630
general: Convert assertion macros over to be fmt-compatible 2018-04-27 10:04:02 -04:00
Lioncash
cc2e14ec2a
loader: Move old logging macros over to new fmt-capable ones 2018-04-24 20:22:32 -04:00
Subv
a70ed9c8ae Kernel: Use 0x2C as default main thread priority for homebrew and lone NRO/NSOs 2018-04-20 21:04:35 -05: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
N00byKing
1aafb0f3a3
deconstructed_rom_directory.cpp: Fix Typo 2018-04-03 00:20:35 +02:00
bunnei
b27ab46bde memory: Fix stack region. 2018-03-31 16:06:45 -04:00
N00byKing
ef875d6a35 Clean Warnings (?) 2018-03-19 17:07:08 +01:00
bunnei
8581404482 kernel: Move stack region outside of application heap. 2018-03-16 18:32:23 -04:00
bunnei
7d6653268f core: Move process creation out of global state. 2018-03-14 18:42:19 -04:00
Subv
827f8ca3c7 Kernel: Store the program id in the Process class instead of the CodeSet class.
There may be many CodeSets per Process, so it's wasteful and overcomplicated to store the program id in each of them.
2018-03-01 19:03:53 -05:00
shinyquagsire23
487f8bc018 loader: Check error on NPDM load, use TID for CodeSet 2018-02-25 07:41:36 -07:00
shinyquagsire23
fd3806fd30 loader: Use NPDM information when loading NSOs 2018-02-25 07:02:47 -07:00
Lioncash
e6bf72877f
nso: Silence formatting specifier warnings 2018-02-14 01:52:55 -05:00
Lioncash
2ade136ff4
deconstructed_rom_directory: Silence formatting specifier warnings 2018-02-14 01:52:55 -05:00
David Marcec
f9ba5a7e11 Changed .istorage to .romfs 2018-02-05 00:01:10 -08:00
bunnei
d9a91d7678 deconstructed_rom_directory: Implement istorage loading for RomFS. 2018-01-21 15:39:31 -05:00
bunnei
defaaf4519
Merge pull request #92 from gdkchan/nro_refactor
Fix NRO entry point
2018-01-20 23:10:15 -05:00
Rozlette
3315af8f09 loader: Minor style fix in deconstructed_rom_directory 2018-01-20 20:13:53 -06:00
bunnei
557b2496d7
Merge pull request #117 from jroweboy/clang-format
Clang format as a build target
2018-01-20 19:12:21 -05:00
James Rowe
096be16636 Format: Run the new clang format on everything 2018-01-20 16:45:11 -07: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
2dafd0d287 nso: Remove code specific to directory loading. 2018-01-20 14:59:42 -05:00
gdkchan
3a409d5c8f Fix NRO Entry Point 2018-01-18 17:18:43 -03:00
gdkchan
d3e63e4220 Fix NRO loading 2018-01-17 20:16:09 -03:00
gdkchan
c65ac49238 Remove relocation on NSO/NRO 2018-01-17 17:01:10 -03:00
bunnei
07b465d24e
Merge pull request #44 from Rozelette/master
nso: Modify .bss size calculation logic
2018-01-16 17:24:49 -05:00
MerryMage
e35644c005 clang-format 2018-01-16 18:05:21 +00:00
Rozlette
09bcc2042c nso: Modify .bss size calculation logic 2018-01-16 11:14:36 -06:00
bunnei
6f904bb622 nso: Load subsdk4 if available. 2018-01-15 17:18:24 -05:00
Thog
06e288cea0
Add missing FileType declarations in GuessFromExtension and GetFileTypeString 2018-01-14 19:00:16 +01:00
bunnei
1247c53786 yuzu: Update license text to be consistent across project. 2018-01-13 16:22:39 -05:00
bunnei
bc77a7580e nso: Always load the filepath specified by the user. 2018-01-07 12:44:36 -05:00
bunnei
3f0caefdf5 nso: Load more common submodules. 2017-10-22 23:50:26 -04:00
bunnei
9ceb0d9381 memory: Support 32-bit paging, move heap address space up. 2017-10-22 23:17:59 -04:00
bunnei
746c2a3ae7 core: Refactor MakeMagic usage and remove dead code. 2017-10-15 00:11:38 -04:00
bunnei
12c7469d81 nso: Add a log for loading submodules. 2017-10-14 17:37:51 -04:00
bunnei
dbd15b0d10 Remove more 3DS-specific code. 2017-10-12 21:29:53 -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
23ce4f5afc loader: Various improvements for NSO/NRO loaders. 2017-10-09 21:39:32 -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
d454364bca nso: Fixes to support homebrew NSOs without a MOD header. 2017-10-03 18:30:02 -04:00
shinyquagsire23
4887d18591 file_sys, loader: add support for reading TMDs to determine app paths 2017-10-01 10:54:02 -06:00
bunnei
8c92435ded nso: Refactor and allocate .bss section. 2017-09-30 14:33:58 -04:00
bunnei
6bafd3f4f7 loader: Add support for loading an NSO. 2017-09-30 14:32:53 -04:00
bunnei
1c4f9e822c elf: Check if machine is ARM. 2017-09-30 14:28: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
Subv
774e7deae8 HLE/Archives: Allow multiple loaded applications to access their SelfNCCH archive independently.
The loaders now register each loaded ROM with the SelfNCCH factory, which keeps the data around for the duration of the emulation session.

When opening the SelfNCCH archive, the factory queries the current program's programid and uses that as a key to the map that contains the NCCHData structure (RomFS, Icon, Banner, etc).

3dsx files do not have a programid and will use a default of 0 for this value, thus, only 1 3dsx file with RomFS is loadable at the same time.
2017-09-25 09:45:02 -05:00
B3n30
d881dee818 Merge pull request #2952 from MerryMage/page-tables
Switchable Page Tables
2017-09-25 08:29:32 +02: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
MerryMage
c02bbb7030 memory: Add GetCurrentPageTable/SetCurrentPageTable
Don't expose Memory::current_page_table as a global.
2017-09-24 22:42:42 +01:00
Subv
6d2734a074 Kernel/Memory: Give each Process its own page table.
The loader is in charge of setting the newly created process's page table as the main one during the loading process.
2017-09-10 15:13:41 -05:00
B3n30
5d0a1e7efd Added missing parts in libnetwork (#2838)
* Network: Set and send the game information over enet

Added Callbacks for RoomMember and GetMemberList to Room in preparation for web_services.
2017-08-19 11:14:33 -06:00
bunnei
f5cf9960d9 loader: Expose program title. 2017-08-03 20:10:37 -04:00
bunnei
df8b9863f9 telemetry: Log performance, configuration, and system data. 2017-07-17 21:32:28 -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