Commit graph

538 commits

Author SHA1 Message Date
Ben
b20607dfc6 Add system time configuration (#4043)
* Add setting to switch between a fixed start time and the system time

Add clock settings to SDL

Make clock configureable in qt

Add a SharedPage handler class

Init shared_page_handler for tests
2018-08-26 11:47:45 -06:00
Merry
9b9227089b
Merge pull request #4121 from FearlessTobi/port-894
Port #894 from yuzu: "kernel: Move object class to its own source files"
2018-08-26 00:02:33 +01:00
Merry
cf4f8463f1
Merge pull request #4122 from FearlessTobi/port-905
Port #905 from yuzu: "kernel/vm_manager: Minor changes"
2018-08-24 19:01:57 +01:00
Merry
f2816aa430
Merge pull request #4123 from FearlessTobi/port-914
Port #914 from yuzu: "kernel/process: Use accessors instead of class members for referencing segment array"
2018-08-24 19:01:07 +01:00
zhaowenlan1779
642f0bd62b Port "kernel/event: Make data members private" from yuzu (#4077)
* kernel/event: Make data members private

Instead we can simply provide accessors to the required data instead of
giving external read/write access to the variables directly.

* fix compile error
2018-08-24 19:43:28 +02:00
zhaowenlan1779
75927ee462 Port "client_port: Make all data members private" from yuzu (#4064)
* client_port: Make all data members private

These members don't need to be entirely exposed, we can instead expose
an API to operate on them without directly needing to mutate them

We can also guard against overflow/API misuse this way as well, given
active_sessions is an unsigned value.

* make the condition an assert
2018-08-24 19:31:20 +02:00
Lioncash
c786df3e4b kernel/process: Use std::array where applicable 2018-08-23 18:08:20 +02:00
Lioncash
37e78de206 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-23 18:08:03 +02:00
Lioncash
469ed4a09f kernel/vm_manager: Convert loop into std::any_of() 2018-08-23 17:53:37 +02:00
Lioncash
c7e1dab45b kernel/vm_manager: Use const where applicable
Makes our immutable state explicit.
2018-08-23 17:53:20 +02:00
Lioncash
bb88c3b7b5 kernel/vm_manager: Use the VAddr type alias in CarveVMA()
These two variables correspond to address ranges.
2018-08-23 17:39:18 +02:00
Lioncash
63c7b44ba8 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-23 17:31:59 +02:00
Merry
44fc338f21
Merge pull request #4083 from zhaowenlan1779/port-yuzu-904
Port "kernel/thread: Minor changes" from yuzu
2018-08-10 21:08:22 +01:00
Lioncash
39d5ada4e1 kernel/thread: Remove unimplemented function prototype
Given there's no implementation, we may as well remove the code
entirely.
2018-08-10 17:05:01 +08:00
Lioncash
596caf70b7 kernel/thread: Make GetFreeThreadLocalSlot()'s loop indices size_t
Avoids using a u32 to compare against a range of size_t, which can be a
source of warnings. While we're at it, compress a std::tie into a
structured binding.
2018-08-10 10:13:50 +08:00
Lioncash
893d9c5ff3 kernel/thread: Make GetFreeThreadLocalSlot() reference parameter a const reference
This function only reads the data being referenced, it doesn't modify
it, so we can turn the reference into a const reference.
2018-08-10 10:13:49 +08:00
Lioncash
c71c9e63ec kernel/thread: Make GetFreeThreadLocalSlot() internally linked
This function isn't used outside of this translation unit, so we can
make it internally linked.
2018-08-10 10:13:48 +08:00
BreadFish64
74cd98ecad core: clean up warnings 2018-08-01 14:10:23 -05:00
Lioncash
8e103d0675
kernel/timer: Make data members private where applicable
Instead, we can just expose functions that return the queryable state
instead of letting anything modify it.
2018-08-01 17:49:52 +08: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
NarcolepticK
ed18140daa hle/kernel: Addressed comment about obscure formating 2018-06-23 14:12:54 -04:00
NarcolepticK
d433a07b6b hle/kernel: Fix clang format 2018-06-22 19:20:58 -04:00
NarcolepticK
a8110cfd3f hle/kernel: Migrate logging macros 2018-06-22 18:54:50 -04:00
Daniel Lim Wee Soong
730f8a4103 Fix formatting mistakes 2018-03-28 22:28:55 +08:00
Daniel Lim Wee Soong
20776b37be Fix wrongly converted specifiers
Sorry that was a lot in one go so some of them had some mistakes
2018-03-27 23:37:36 +08:00
Daniel Lim Wee Soong
968569aa61 Replace format specifiers for all usages of ASSERT_MSG 2018-03-27 23:28:42 +08:00
James Rowe
f61141e86a Update the entire application to use the new clang format style 2018-03-09 10:54:43 -07:00
Weiyi Wang
4befbddc34
Merge pull request #3281 from jroweboy/texcache-pt2
Texture Cache Rework
2018-03-05 11:57:25 +02:00
B3n30
98771a6363 GSP_GPU: Release the GPU right if the active session closes the gsp_gpu session 2018-03-01 14:54:38 +01:00
Weiyi Wang
48512d9011
Merge pull request #3101 from Subv/hle_thread_pause2
Kernel/Threads: Add a new thread status that will allow using a Kernel::Event to put a guest thread to sleep inside an HLE handler until said event is signaled
2018-02-22 16:23:34 +02:00
wwylele
42ab8d9d0b HLE: specify that the command buffer is an array of u32_le 2018-02-22 16:12:39 +02:00
Subv
b0f4390247 HLE: Use std::chrono::nanoseconds instead of a plain u64 in SleepClientThread. 2018-02-21 22:03:46 -05:00
wwylele
c4db298a7d
HLE/IPC: remove assertion on empty buffer.
Some service functions do require to push an empty buffer in some cases. See APT:ReceiveParameter/GlanceParameter
2018-02-11 00:09:52 +02:00
bunnei
dca5fd291f
Merge pull request #3272 from MerryMage/dynarmic
core/arm: Backend-specific context implementations
2018-02-02 12:27:52 -08:00
B3n30
33b0b5163f
Merge pull request #3136 from Subv/mem_aliasing1
Kernel/Memory: Added a function to change the memory state of an address range
2018-01-24 10:17:25 +01:00
Subv
a7a5c5aa0d Kernel/IPC: Partially implement MappedBuffer translation.
Right now only MappedBuffers that only span a single page and are not aligned are implemented.

MappedBuffers are unmapped during the reply part of ReplyAndReceive. Only unmapping of ReadOnly buffers is currently implemented.
2018-01-23 08:27:00 -05:00
Subv
928202f744 Kernel/VMManager: Added a function to map a block of memory into the first available address after a given base. 2018-01-23 08:24:15 -05:00
Subv
e4f35f70ac Memory: Added a function to change the memory state of an address range.
This will be useful when implementing memory aliasing operations.
2018-01-23 08:19:47 -05:00
Weiyi Wang
9b647d459b
Merge pull request #3324 from Subv/gspgpu
Services: Keep track of per-session data in GSPGPU
2018-01-11 20:03:46 +02:00
Subv
aa90198ec5 Services: Make SessionDataBase's destructor virtual. 2018-01-03 10:52:46 -05:00
wwylele
7daa2a51d7
Kernel/SVC: fix typo in GetResourceLimitLimitValues 2017-12-30 23:42:32 +02:00
James Rowe
13606a6d0b Memory: Remove count of cached pages and add InvalidateRegion
In a future commit, the count of cached pages will be reintroduced in
the actual surface cache. Also adds an Invalidate only to the cache
which marks a region as invalid in order to try to avoid a costly flush
from 3ds memory
2017-12-23 16:10:25 -07:00
Sebastian Valle
c3c684cd2b
Merge pull request #3301 from Subv/exitprocess2
Kernel/SVC: Partially implemented svcExitProcess.
2017-12-23 10:49:36 -05:00
Subv
1856aa7b32 Kernel/SVC: Partially implemented svcExitProcess.
Terminating processes with ready threads is not currently implemented and will assert. It is currently unknown how the 3DS kernel stops ready threads or threads running in another core.
2017-12-15 15:47:33 -05:00
Subv
daecd812b0 HLE/Services: Allow specifying a SessionData template parameter to ServiceFramework.
Some services can have multiple clients at the same time, and they identify the different clients using the server session as a key.
This parameter (if present) should be a structure that contains the per-session data for each service.
The data can be retrieved using ServiceFramework::GetSessionData(session)
2017-12-14 18:24:02 -05:00
MerryMage
fb2d34997e core/arm: Backend-specific context implementations 2017-12-12 19:12:03 +00:00
Subv
c9ddd5b0ae HLE/FS: Implemented FSFile::OpenSubFile.
The File class now holds a list of connected sessions along with data unique to each session.

A subfile is a window into an existing file. They have a few limitations compared to normal files:

* They can't be written to.
* They can't be flushed.
* Their size can not be changed.
* New subfiles can't be created from another subfile.
2017-12-12 13:34:02 -05:00
Lioncash
c31f932afe common/core: Silence initialization order warnings 2017-12-10 19:50:45 -05:00
B3n30
2146311ad1
Merge pull request #3091 from Subv/hle_request_delat
Kernel/IPC: Add a small delay after each SyncRequest to prevent thread starvation.
2017-12-10 19:59:19 +01:00