Commit Graph

78 Commits

Author SHA1 Message Date
PixelyIon
036416fde7 Address CR Comments (#150)
Correct a single grammatical error
2021-03-23 02:24:16 +05:30
PixelyIon
b0e53d4aad Extend Perfetto Tracing
Add Tracing for SVCs, Services, NVDRV, and Synchronization Primitives. In addition, fix `TRACE_EVENT_END("guest")` being emitted when a signal is received while being in the guest rather than host which would cause an exception. This commit also disables warnings for the Perfetto library as we do not control fixing them.
2021-03-21 20:13:29 +05:30
PixelyIon
4e51d76fa6 Logger Function Prefix Support 2021-03-21 20:13:03 +05:30
Billy Laws
d8d4b4c9e0 Address review feedback 2021-03-21 18:56:31 +05:30
Billy Laws
34cb0b49e8 Implement the entirety of time services
This reimplements our time backend to be significantly more accurate to
the real PSC and provides complete implementations for every time IPC
allowing many newer games to work properly.

Time is unique in its use of glue services, the core sysmodule is fully
isolated and doesn't interface with any other services. Glue is instead
used where that is needed (e.g. for fetching settings), this distinction
is also present in our implementation.

Another unique feature of time is its global state, as time is
calibrated from the start of the service its state cannot be lost as
that would result in the application offsetting time incorrectly
whenever it closed a session.

A large proportion of this is based off of Thog's 9.0.0 PSC reversing.
2021-03-21 18:56:31 +05:30
Billy Laws
937e3d6f68 Add endiannes swapping helper functions
Avoid using compiler functions manually to create a cleaner interface,
and allow swapping the endianness of arbritary lengths.
2021-03-21 18:56:31 +05:30
Billy Laws
def9f96b02 Add a ResultValue helper class to simplify result handling
This is a very common usecase for result handling and allows much
cleaner code.
2021-03-21 18:56:31 +05:30
Billy Laws
48acb6d369 Address a bunch of issues detected by clang-tidy 2021-03-06 18:58:04 +05:30
PixelyIon
fe5061a8e0 Address CR Comments (#132) + Change Core Migration API
This addresses all CR comments including more codebase-wide changes arising from certain review comments like proper usage of its/it's and consistent contraction of it is into it's. 

An overhaul was made to the presentation and formatting of `KThread.h` and `LoadBalance` works has been superseded by `GetOptimalCoreForThread` which can be used alongside `InsertThread` or `MigrateToCore`. It makes the API far more atomic and neater. This was a major point of contention for the design prior, it's simplified some code and potentially improved performance.
2021-03-05 14:55:34 +05:30
◱ PixelyIon
a621408b9c Move to using ASCII separators for Logger
We've moved to using RS and GS from ASCII as delimiters rather than
'\n' and '|', this allows more robust parsing and increases the
readability of the log files
2021-03-05 14:55:34 +05:30
◱ PixelyIon
80302cf1ad Update NDK, Gradle and dependencies + Improve Settings API + Migrate to PugiXML 2021-03-05 14:55:34 +05:30
◱ PixelyIon
ebadc1d1e1 Generate Stack Traces + More Robust Terminate Handler + Exit Process on Signal in Guest 2021-03-05 14:55:34 +05:30
◱ PixelyIon
cf000f5750 Implement Cooperative Scheduling With Load Balancing 2021-03-05 14:55:34 +05:30
◱ PixelyIon
8564edcb16 Address CR Comments #2 2020-11-23 11:44:43 +05:30
◱ PixelyIon
fbf9f06244 Address CR Comments + Fix Clock Rescaling 2020-11-22 23:56:17 +05:30
◱ PixelyIon
bc5c094860 Fix CircularQueue + NPDM ACI0 & Kernel Capability Parsing 2020-11-22 23:56:17 +05:30
◱ PixelyIon
a5927c5c7b Fix Native-Initiated Exiting 2020-11-22 23:56:17 +05:30
◱ PixelyIon
d155e9cd71 Complete Exceptional Signal Handler Implementation + Fix More Destruction Behavior 2020-11-22 23:56:17 +05:30
◱ PixelyIon
668f623256 Implement Exceptional Signal Handler + Fix Destruction Behavior
An exceptional signal handler allows us to convert an OS signal into a C++ exception, this allows us to alleviate a lot of crashes that would otherwise occur from signals being thrown during execution of games and be able to handle them gracefully.
2020-11-22 23:56:17 +05:30
◱ PixelyIon
3cde568c51 Run Guest on Main Emulator Thread + Remove Mutex/GroupMutex + Introduce PresentationEngine 2020-11-22 23:56:17 +05:30
◱ PixelyIon
c65c91e1bc Implement NPDM, Core Mask SVCs + Fix VMM bug + Introduce Verbose Log Level 2020-11-22 23:56:17 +05:30
◱ PixelyIon
369bd469f6 Dynamic Guest Memory Base Allocation 2020-11-22 23:56:17 +05:30
◱ PixelyIon
745ea19f42 Use u64s for FmtCast + Remove Functional Casts + Fix VMM Bugs 2020-11-22 23:56:17 +05:30
◱ PixelyIon
1db76dee1e NCE3: In-Process Guest Execution 2020-11-22 23:56:17 +05:30
◱ PixelyIon
90127740f0 Rework NCE/KThread/KProcess + Remove Guest Process 2020-11-22 23:56:17 +05:30
◱ PixelyIon
878cb24389 Make fmt::ptr implicit for raw pointers + Update Submodules 2020-11-22 23:56:17 +05:30
◱ PixelyIon
60e82e6af0 Rework VMM + Adapt KMemory Objects to be in-process
Note: This commit isn't functional on it's own, it will require the rest of NCE3 to work
2020-11-22 23:56:17 +05:30
◱ PixelyIon
7ad86ec46f Improve span::as_string and other minor fixes 2020-10-02 15:28:48 +00:00
◱ PixelyIon
97ac45d83b Update Logger to use NDK Logger APIs + Improve Backing API + Fix FDSAN issues 2020-10-02 15:28:48 +00:00
◱ PixelyIon
4070686897 Refactor Comments + Other Minor Fixes 2020-10-02 15:28:48 +00:00
◱ PixelyIon
429af1990a Equal -> Brace Initializer + Remove Constexpr Auto for Integers 2020-10-02 15:28:48 +00:00
◱ PixelyIon
2764bd7c96 Use Vector for Kernel Handles + Remove Redundant Includes 2020-10-02 15:28:48 +00:00
◱ PixelyIon
20559c5dca Introduce Custom Span Class + IPC Buffer -> Span 2020-10-02 15:28:48 +00:00
◱ PixelyIon
4970e58999 Address CR Comments (#102) 2020-09-20 20:07:33 +00:00
◱ PixelyIon
a5fece8020 NVDRV IOCTL Refactor
Buffer -> Span + All buffers as arguments + Return -> NvStatus + Print Service Names + Function Names
2020-09-20 20:07:33 +00:00
◱ PixelyIon
20253a9573 Improve NvDevice Registration + Access 2020-09-20 20:07:33 +00:00
Willi Ye
4076d84efc
NCA decryption (#99)
* NCA decryption
* Remove unnecessary new lines
* Remove loader error dialog
* Always show ROMs
* Address CRs
* Add subtitle padding in grid mode
2020-09-14 19:23:40 +05:30
◱ PixelyIon
65019375ca Implement Guest Touch-Screen Support 2020-09-08 12:55:33 +00:00
Billy Laws
89718804d0 Refactor service functions to return result codes 2020-09-06 19:12:18 +00:00
◱ PixelyIon
1a58a2e967 Implement Rumble Support for Controllers and Device Vibrators 2020-09-06 15:31:20 +00:00
◱ PixelyIon
102f26d08e Refactor C++ Input
This commit refactors the C++ end of Input so it'll be in line with the rest of the codebase and be ready for the extension with multiple players and controller configuration.
2020-08-21 11:48:29 +00:00
Billy Laws
0219eda2db Initial C++ Input Implementation
This commit contains the C++ side of the initial Input implementation, this is based on the work done in the `hid` branch in `bylaws/skyline`.
Co-authored-by: ◱ PixelyIon <pixelyion@protonmail.com>
2020-08-21 11:48:29 +00:00
Billy Laws
6edf89b538
Initial Savedata Implementation (#75)
* Rework VFS to support creating and writing files and introduce OsFileSystem
OsFileSystem abstracts a directory on the device using the filesystem API.
This also introduces GetEntryType and changes FileExists to use it.

* Implement the Horizon FileSystem APIs using our VFS framework
Horizon provides access to files through its IFileSystem class, we can
closely map this to our vfs::FileSystem class.

* Add support for creating application savedata
This implements basic savedata creation using the OsFileSystem API. The
data is stored in Skyline's private directory is stored in the same
format as yuzu.
2020-08-09 01:08:51 +05:30
Willi Ye
1f282af87e More code style aligning
* Null terminate nickname array and correct character limit in settings perference
2020-07-21 18:29:45 +00:00
Willi Ye
93da9f2826 Align code style with project
* Return correct error code for invalid user
* Always return first icon color
2020-07-21 18:29:45 +00:00
Willi Ye
ffb9e743dd Add profile service to support custom usernames 2020-07-21 18:29:45 +00:00
Billy Laws
b9b889fc3c Add loader to the emulator state
This will allow accessing data from the loader within other parts of the
emulator, such as in fssrv for RomFS.
2020-06-22 16:45:32 +00:00
Billy Laws
dca06f2b49 Rework loader abstractions and the NRO loader to use the vfs APIs
This will make it easier for us to implement more executable formats in
the future.
2020-06-20 20:26:53 +00:00
◱ PixelyIon
05f3e3c3ac Improve NCE and Finish Up Refactor
This commit mainly finishes up refactor by fixing everything brought up in the CR + Improving NCE somewhat and actually killing the child processes properly now.
2020-04-23 22:26:27 +05:30
◱ PixelyIon
c76ef3730b Move to MPL-2.0
We earlier moved to LGPLv3.0 or Later. This was a mistake as what we wanted was being able to link to proprietary libraries but LGPL is the opposite and it allows linking proprietary libraries to libskyline instead. After further consideration, we've moved to MPL-2.0, it allows linking to proprietary libraries and is a standardized license as compared to adding an exception to GPL.
2020-04-23 22:26:27 +05:30