Commit Graph

328 Commits

Author SHA1 Message Date
Willi Ye
3057e4b29a Add on screen controls
* Fix missing default constructor for dialog fragments
2020-11-12 22:19:55 +05:30
Billy Laws
85d5dd3619
Extend NvServices and implement IDirectory (#107)
* Fix alignment handling in NvHostAsGpu::AllocSpace

* Implement Ioctl{2,3} ioctls

These were added in HOS 3.0.0 in order to ease handling ioctl buffers.

* Introduce support for GPU address space remapping

* Fix nvdrv and am service bugs

Syncpoints are supposed to be allocated from ID 1, they were allocated
at 0 before. The ioctl functions were also missing from the service map

* Fix friend:u service name

* Stub NVGPU_IOCTL_CHANNEL_SET_TIMESLICE

* Stub IManagerForApplication::CheckAvailability

* Add OsFileSystem Directory support and add a size field to directory entries

The size field will be needed by the incoming HOS IDirectory support.

* Implement support for IDirectory

This is used by applications to list the contents of a directory.

* Address feedback
2020-11-03 15:10:42 +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
4d6ae9aa26 Constexpr Maps for Service Functions 2020-10-02 15:28:48 +00:00
◱ PixelyIon
157c54f918 Implement a few HID Functions + Fix FAB handler 2020-10-02 15:28:48 +00:00
◱ PixelyIon
4970e58999 Address CR Comments (#102) 2020-09-20 20:07:33 +00:00
◱ PixelyIon
bb2c31264d Implement IOCTL2 & IOCTL3 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
70d67ef563 Constexpr Maps for NvDevice IOCTLs 2020-09-20 20:07:33 +00:00
◱ PixelyIon
20253a9573 Improve NvDevice Registration + Access 2020-09-20 20:07:33 +00:00
◱ PixelyIon
4cc3a3b2e8 Move NVDRV + IHOSBinder Internals to Discrete Components + Fix Lint 2020-09-20 20:07:33 +00:00
◱ PixelyIon
5f0073dd87 Fix Surface Deswizzling OOB writes + Fix PL README 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
Billy Laws
74a150dff1 Rework service API to be cleaner with significantly less boilerplate
This patch reduces the burden of adding services significantly, rather
than having to create an enum entry and add strings in the constructor
it will all be determined at runtime through RTTI. A macro is also used
in the service creation case to reduce clutter.
2020-09-06 19:12:18 +00:00
◱ PixelyIon
21e2c826a1 Improve Accuracy of Vibration + Unify Translation + Add Comments 2020-09-06 15:31:20 +00:00
◱ PixelyIon
1a58a2e967 Implement Rumble Support for Controllers and Device Vibrators 2020-09-06 15:31:20 +00:00
Billy Laws
d8ccdd723e
Refactor Audio + Fix NV Bugs (#92)
* Fix NvHostCtrl:EventSignal event ID parsing
* Divide the audout buffer length by the sample size
* Correct audout channel quantity handling
* A few bugfixes for audio tracks
* * Correctly lock in CheckReleasedBuffers and only call the callback once
* * Check if the identifier queue is empty before accessing it's iterator
* Refactor audio to better fit the codestyle
* Explictly specify reference when using GetReference
* Fix CheckReleasedBuffers
2020-08-21 18:58:47 +05:30
◱ PixelyIon
7290a80c3e Move to Callback for Input Initialization + ConditionalVariable for Surface 2020-08-21 11:48:29 +00:00
◱ PixelyIon
07c2f2d891 Significantly Improve Accuracy of HID
This commit significantly increases the accuracy of the prior HID code due to testing on the Switch. It is now fully accurate in all supported scenarios, them being assignment mode, orientation, color writes and system properties. In addition, review comments were addressed and fixed in the PR.
2020-08-21 11:48:29 +00:00
◱ PixelyIon
ee2fdbdf6a Fix Joy-Con Pair Crash + Implement More HID Service Functions
This fixes a Joy-Con Pair bug which caused a crash when a partner device was set to none while being set as a partner. In addition, the following HID service functions were implemented:
* GetSupportedNpadStyleSet
* ActivateNpadWithRevision
* GetNpadJoyHoldType
* AcquireNpadStyleSetUpdateEventHandle
2020-08-21 11:48:29 +00:00
◱ PixelyIon
6a931b95b0 Implement C++ Support for Controller Configuration
This commit adds support to the C++ end of things for controller configuration. It isn't targeting being 1:1 to HOS for controller assignment but is rather based on intuition of how things should be.
2020-08-21 11:48:29 +00:00
◱ PixelyIon
75d485a9a7 Addition of Controller Configuration UI
This commit adds in the UI for Controller Configuration to Settings, in addition to introducing the storage and loading of aforementioned configurations to a file that can be saved/loaded at runtime. This commit also fixes updating of individual fields in Settings when changed from an external activity.
2020-08-21 11:48:29 +00:00
◱ PixelyIon
8e1f8ae7e9 Make UI fully usable using a controller
This commit focuses on making the UI completely usable using a controller so that a user won't have to switch between their device's touch screen and a controller constantly.
2020-08-21 11:48:29 +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
◱ PixelyIon
5fec7eefd0 Refactor HID Shared Memory
This commit refactors and reorders a lot of the HID Shared Memory from the previous commits to be in line with the rest of the codebase.
2020-08-21 11:48:29 +00:00
Billy Laws
b167abcdb7 Initial Kotlin Input Implementation
This commit contains the Kotlin 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
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
817d37600e Convert all make all hex uppercase according to codestyle 2020-08-15 10:21:41 +00:00
Billy Laws
e5264f7762 Address review comments 2020-08-15 10:21:41 +00:00
Billy Laws
ae131502c6 Fix reservation in GPU VMM
Rather than reserving a region so it *can* be used by MapAllocate
reserved actually prevents a region from being used by MapAllocate.
2020-08-15 10:21:41 +00:00
Billy Laws
ade8a711fb Format code and misc cleanup 2020-08-15 10:21:41 +00:00
Billy Laws
fcae5d54da Switch NvHostCtrlGpu to use QueryEvent 2020-08-15 10:21:41 +00:00
Billy Laws
cf60869fac Stub INotificationService 2020-08-15 10:21:41 +00:00
Billy Laws
9d90cd877c Stub IFile:Flush 2020-08-15 10:21:41 +00:00
Billy Laws
c69efed2ad Implement GetAccumulatedSuspendedTickChangedEvent 2020-08-15 10:21:41 +00:00
Billy Laws
6c9e0a943c Add some IApplicationFunctions calls used by newer games 2020-08-15 10:21:41 +00:00
Billy Laws
9e39cbaf7b Implement GetBase in IProfile 2020-08-15 10:21:41 +00:00
Billy Laws
dc6da8303e Add support for listing users in account services 2020-08-15 10:21:41 +00:00
Billy Laws
cae270a174 Use nvhost fences in IHOSBinderDriver 2020-08-15 10:21:41 +00:00
Billy Laws
94d1b40faf Add an empty ISslContext service 2020-08-15 10:21:41 +00:00
Billy Laws
7503496bb0 Implement the basis of the Maxwell 3D engine together with a macro
interpreter.

The Maxwell 3D engine handles all 3D rendering, currently only non
rendering related methods are implemented. Macros are small pieces of
code that run on the GPU and allow methods to be quickly called for
things like instanced drawing.
2020-08-15 10:21:41 +00:00
Billy Laws
68d5a48df1 Implement syncpoints and nvhost events and fix an nvmap bug
These are used to allow the CPU to synchronise with the GPU as it
reaches specific points in its command stream.

Also fixes an nvmap bug where a struct was incorrect.
2020-08-15 10:21:41 +00:00
Billy Laws
ed3ff862f6 Extend GPU VMM with unmapping/remapping support + code cleanup 2020-08-15 10:21:41 +00:00