Commit graph

53 commits

Author SHA1 Message Date
Weiyi Wang
2a411bb501 Kernel: wrap resource limit state into kernel state; pass ref to resource limit 2018-10-18 21:41:36 -04:00
Weiyi Wang
9565091fc2 kernel: pass ref in Process 2018-10-18 21:41:36 -04:00
Weiyi Wang
213b259cf1 kernel: pass ref in CodeSet 2018-10-18 21:41:36 -04:00
Weiyi Wang
389d3d630e fs/archive: wrap states into archive manager 2018-10-06 01:23:03 -04:00
Weiyi Wang
7d8f115185 Prefix all size_t with std::
done automatically by executing regex replace `([^:0-9a-zA-Z_])size_t([^0-9a-zA-Z_])` -> `$1std::size_t$2`
2018-09-06 16:03:28 -04:00
fearlessTobi
2abe11ee1e Fix compile errors 2018-08-23 18:23:21 +02:00
wwylele
d4a808c885 ncch_container: support encrypted games 2018-08-07 18:53:06 +03:00
wwylele
0eab948728 reformat all files with clang-format 2018-06-29 16:56:12 +03:00
wwylele
7c5a76e58b log: replace all NGLOG with LOG 2018-06-29 14:18:07 +03:00
Daniel Lim Wee Soong
fbfc1103fd core/loader: Migrate logging macros
Replace logging to use NGLOG instead of LOG.
2018-03-29 00:08:26 +08: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
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
wwylele
20544977da loader: use self NCCH archive 2017-02-13 13:57:38 +02:00
Thomas Farr
bb1f277db1
loader: Add support for 3DSX special relocation types, fixes citra-emu/citra#2449
As per devkitPro/3dstools@47bea18
2017-01-19 01:34:58 +13:00
Yuri Kunde Schlesner
84fbbe2629 Use negative priorities to avoid special-casing the self-include 2016-09-21 00:15:56 -07:00
Emmanuel Gil Peyrot
ebdae19fd2 Remove empty newlines in #include blocks.
This makes clang-format useful on those.

Also add a bunch of forgotten transitive includes, which otherwise
prevented compilation.
2016-09-21 11:15:47 +09:00
Emmanuel Gil Peyrot
dc8479928c Sources: Run clang-format on everything. 2016-09-18 09:38:01 +09:00
Emmanuel Gil Peyrot
8fc9c03126 Loader, Frontends: Refactor loader creation and game loading
This allows frontends to keep a single loader and use it multiple times
e.g. for code loading and SMDH parsing.
2016-05-21 17:09:56 +01:00
Alexander Laties
0a31e373f1 fixup simple type conversions where possible 2016-05-07 11:41:55 -04:00
wwylele
5d5dd66d92 add icon & title to game list 2016-05-04 13:02:49 +03:00
Lioncash
1cc183703a core: Clean out some unnecessary header includes 2016-04-16 00:08:49 -04:00
Emmanuel Gil Peyrot
14af5919ba CitraQt, SkyEye, Loader, VideoCore: Remove newlines in LOG_* calls.
The LOG_* function itself already appends one.
2015-10-09 22:14:56 +01:00
Cruel
d60a9be5c6 Implement 3dsx RomFS 2015-09-21 13:03:18 -04:00
zawata
972dccc3f6 Core : Change variable type
and fix various warnings
2015-07-19 04:12:39 -07:00
Yuri Kunde Schlesner
2d7299a86f Loader: Remove unnecessary pointer indirection to IOFile 2015-07-13 20:00:56 -03:00
Yuri Kunde Schlesner
5c5cf2f8e0 Core: Properly configure address space when loading a binary
The code now properly configures the process image to match the loaded
binary segments (code, rodata, data) instead of just blindly allocating
a large chunk of dummy memory.
2015-07-11 23:54:42 -03:00
Yuri Kunde Schlesner
34f5f77507 Loader: Clean up 3dsx loader a bit, fixing a potential buffer overrun 2015-07-11 23:49:52 -03:00
Yuri Kunde Schlesner
fdbf410bd7 Loader: Make 3dsx loader logs a bit less confusing 2015-07-11 23:49:52 -03:00
Emmanuel Gil Peyrot
b1503b2020 Remove every trailing whitespace from the project (but externals). 2015-05-29 21:59:29 +01:00
Subv
d3634d4bf4 Core/ResourceLimits: Implemented the basic structure of ResourceLimits.
Implemented svcs GetResourceLimit, GetResourceLimitCurrentValues and GetResourceLimitLimitValues.

Note that the resource limits do not currently keep track of used objects, since we have no way to distinguish between an object created by the application, and an object created by some HLE module once we're inside Kernel::T::Create.
2015-05-14 22:50:13 -05:00
Yuri Kunde Schlesner
7ada357b2d Memmap: Re-organize memory function in two files
memory.cpp/h contains definitions related to acessing memory and
configuring the address space
mem_map.cpp/h contains higher-level definitions related to configuring
the address space accoording to the kernel and allocating memory.
2015-05-15 00:04:38 -03:00
Yuri Kunde Schlesner
1c0b87edc2 Memory: Re-organize and rename memory area address constants 2015-05-09 01:29:52 -03:00
Yuri Kunde Schlesner
3cb19c9589 Process: Rename StaticAddressMapping => AddressMapping 2015-05-08 22:12:10 -03:00
Yuri Kunde Schlesner
2af30d465f Process: Support parsing of exheader kernel caps 2015-05-08 22:11:44 -03:00
Yuri Kunde Schlesner
6d60acf0f1 Kernel: Introduce skeleton Process class to hold process data 2015-05-08 22:11:02 -03:00
Yuri Kunde Schlesner
e1fbac3ca1 Common: Remove common.h 2015-05-07 15:45:22 -03:00
Emmanuel Gil Peyrot
df0d66c7cf Loader: Clean up the ELF AppLoader. 2015-01-15 22:23:08 +01:00
Emmanuel Gil Peyrot
84e52a944d Loader: Clean up the 3DSX AppLoader. 2015-01-15 22:23:08 +01:00
Emmanuel Gil Peyrot
82ec17db7d Loader: Guess filetype from the magic, or fallback to the extension. 2015-01-15 22:23:08 +01:00
Emmanuel Gil Peyrot
04622a859c Loader: Don’t assume the file hasn’t been read before. 2015-01-15 22:23:07 +01:00
Emmanuel Gil Peyrot
b5237e885d Loader: Keep a reference to the file and pass it to the correct AppLoader, instead of loading it multiple times. 2015-01-15 21:21:26 +00:00
Emmanuel Gil Peyrot
9d3bb8b7c0 Loader: Remove the useless THREEDSXReader class. 2015-01-15 21:21:26 +00:00
Emmanuel Gil Peyrot
85030c6e6b Loader: Never forget to change is_loaded. 2015-01-15 21:21:26 +00:00
Emmanuel Gil Peyrot
43e699d849 Loader: Don’t duplicate the docstring into the cpp file. 2015-01-15 21:21:26 +00:00
Emmanuel Gil Peyrot
bc2212106f Loader: Fix indentation, whitespace, and a few other such cosmetic stuff. 2015-01-15 21:21:25 +00:00
bunnei
0de6a08d75 Merge pull request #291 from purpasmart96/license
License change
2014-12-21 16:05:44 -05:00
purpasmart96
ebfd831ccb License change 2014-12-20 21:20:24 -08:00
Chin
e795692614 Clean up some warnings 2014-12-20 10:03:36 -05:00