Commit Graph

222 Commits

Author SHA1 Message Date
Zach Hilman
052d16c05f fsp-srv: Implement OutputAccessLogToSdCard
Allows games to log data to the SD.
2019-06-28 21:02:34 -04:00
bunnei
87bed7210e Merge pull request #2548 from DarkLordZach/applet-shopn
applets: Implement backend and default frontend for Parental Controls and EShop (ShopN) applets
2019-06-26 15:55:24 -04:00
Zach Hilman
6592b3d8a4 applets: Pass current process title ID to applets
Avoids using system accessor to get current process in applet code.
2019-06-24 20:07:10 -04:00
Zach Hilman
61292dc1b9 glue: Implement arp:w and arp:r services
These keep track of running process' launch properties and control properties and allows for issuing and reading them by process and title ID.
2019-06-24 19:26:16 -04:00
bunnei
814eb9cbad Merge pull request #2482 from DarkLordZach/prepo
core: Add detailed local reporting feature for development
2019-06-21 14:05:18 -04:00
David Marcec
f0bc7b0713 Addressed issues 2019-06-17 08:17:26 +10:00
Zach Hilman
68eba9cc80 service: Save report on unimplemented function call 2019-05-25 16:09:20 -04:00
bunnei
242d80b21c Merge pull request #2223 from lioncash/error
core/hle/result: Tidy up the base error code result header.
2019-03-13 14:43:14 -04:00
Lioncash
b92671cedb core/hle/result: Relocate IPC error code to ipc_helpers
Relocates the error code to where it's most related, similar to how all
the other error codes are. Previously we were including a non-generic
error in the main result code header.
2019-03-10 18:23:42 -04:00
Lioncash
f98bb48c89 service/service: Remove unncessary calls to c_str()
These can just be passed regularly, now that we use fmt instead of our
old logging system.

While we're at it, make the parameters to MakeFunctionString
std::string_views.
2019-03-10 18:00:57 -04:00
Lioncash
2a4e34bb72 core_timing: Convert core timing into a class
Gets rid of the largest set of mutable global state within the core.
This also paves a way for eliminating usages of GetInstance() on the
System class as a follow-up.

Note that no behavioral changes have been made, and this simply extracts
the functionality into a class. This also has the benefit of making
dependencies on the core timing functionality explicit within the
relevant interfaces.
2019-02-15 21:50:25 -05:00
Jens Schmer
563536738e Fix Service object leak on emulation stop
Services created with the ServiceFramework base class install themselves as HleHandlers with an owning shared_ptr in the ServerPort ServiceFrameworkBase::port member variable, creating a cyclic ownership between ServiceFrameworkBase and the ServerPort, preventing deletion of the service objects.

Fix that by removing the ServiceFrameworkBase::port member because that was only used to detect multiple attempts at installing a port. Instead store a flag if the port was already installed to achieve the same functionality.
2018-12-13 20:08:23 +01:00
Lioncash
74928e4ce3 hle/service: Replace log + UNIMPLEMENTED with UNIMPLEMENTED_MSG
Combines the two into one, shortening the amount of code here.
2018-12-06 01:40:23 -05:00
Lioncash
26460deb52 hle/service: Remove unnecessary using declarations
Only one usage of the specified objects made use of the lack of
namespacing. Given the low usage, we can just remove these.
2018-12-06 01:37:41 -05:00
Lioncash
de156d3323 hle/service, hle/sm: Compress usages of MakeResult()
These auto-deduce the result based off its arguments, so there's no need
to do that work for the compiler, plus, the function return value itself
already indicates what we're returning.
2018-12-06 01:33:22 -05:00
Lioncash
cd50b203f5 hle/service, hle/sm: Use structured bindings where applicable
Gets rid of the need to keep the variables separate from their actual
initialization spots.
2018-12-06 01:31:26 -05:00
Lioncash
103083d9fd service: Mark MakeFunctionString with the [[maybe_unused]] attribute.
When yuzu is compiled in release mode this function is unused, however,
when compiled in debug mode, it's used within a LOG_TRACE statement.
This prevents erroneous compilation warnings about an unused function
(that isn't actually totally unused).
2018-11-14 00:49:04 -05:00
bunnei
4d0f84d748 Merge pull request #1545 from DarkLordZach/psm
psm: Add psm service and stub commands 0 and 1
2018-10-22 15:27:05 -04:00
Lioncash
b56debe3c8 service: Add the basic skeleton for the NPNS services 2018-10-21 17:11:05 -04:00
Zach Hilman
618525c951 service: Add skeleton for psm service
Seems to be the power controller. Listed in switchbrew under the category PTM services.
2018-10-20 18:01:07 -04:00
Lioncash
733e7039c7 filesystem: Make CreateFactories() and InstallInterface() take a VfsFilesystem instance by reference
Neither of these functions alter the ownership of the provided pointer,
so we can simply make the parameters a reference rather than a direct
shared pointer alias. This way we also disallow passing incorrect memory values like
nullptr.
2018-10-13 11:36:35 -04:00
bunnei
83a6a038e1 Merge pull request #1312 from lioncash/fwd
service/vi: Replace includes with forward declarations where applicable
2018-09-17 12:32:28 -04:00
fearlessTobi
ac0723e7be Port #4182 from Citra: "Prefix all size_t with std::" 2018-09-15 15:21:06 +02:00
Lioncash
b0fce9243c service/vi: Replace includes with forward declarations where applicable 2018-09-13 16:55:47 -04:00
Lioncash
e69d76f60e service: Remove unused g_kernel_named_ports variable
With the named port functionality all migrated over to the kernel,
there's no need to keep this around anymore.
2018-09-09 22:10:54 -04:00
Lioncash
4bbc5fa00c service: Migrate global named port map to the KernelCore class
Now that we have a class representing the kernel in some capacity, we
now have a place to put the named port map, so we move it over and get
rid of another piece of global state within the core.
2018-09-02 12:35:30 -04:00
Lioncash
7f6717b5aa 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
9568ba4e3b core: Port core to VfsFilesystem for file access 2018-08-08 21:18:45 -04:00
Lioncash
0eed37c5e1 nvdrv: Get rid of global std::weak_ptr
Rather than use global state, we can simply pass the instance into the
NVFlinger instance directly.
2018-08-07 21:53:05 -04:00
Lioncash
5d306538b6 service: Add usb services
Adds basic skeleton for the usb services based off the information provided by Switch Brew.
2018-08-07 03:14:03 -04:00
Lioncash
631b0e887a service: Add arp services
Adds the basic skeleton of the arp services based off the information
provided by Switch Brew.
2018-08-04 18:01:12 -04:00
bunnei
cbd9a3b278 Merge pull request #898 from lioncash/mig
service: Add migration services
2018-08-03 11:00:27 -04:00
Lioncash
f0cd2dce54 service: Add migration services
Adds the basic skeleton for the mig:usr service based off information
provided by Switch Brew.
2018-08-02 10:09:45 -04:00
Lioncash
47c7ae6104 service: Add psc services
Adds the basic skeleton for the psc services based off the information
provided by Switch Brew.
2018-08-01 23:31:27 -04:00
bunnei
5c45261082 Merge pull request #888 from lioncash/caps
service: Add capture services
2018-08-01 21:34:28 -04:00
Lioncash
f5ebd027d1 service: Add capture services
Adds the basic skeleton for the capture services based off information
provided by Switch Brew.
2018-08-01 16:45:51 -04:00
Lioncash
869a6df725 service: Add bpc and pcv services
Adds the basic skeleton for the remaining pcv-related services based off
information on Switch Brew.
2018-08-01 16:13:04 -04:00
bunnei
d706dffcbf Merge pull request #875 from lioncash/fgm
service: Add fgm services
2018-07-31 09:23:17 -07:00
Lioncash
7ed1ce5553 service: Add fgm services
Adds the basic skeleton for the fgm services based off the information
provided by Switch Brew.
2018-07-31 08:01:19 -04:00
Lioncash
5f55b93cd9 service: Add the pcie service
Adds the basic skeleton of the pcie service based off information on
Switch Brew.
2018-07-31 06:40:21 -04:00
bunnei
f90f407361 Merge pull request #857 from lioncash/wlan
service: Add wlan services
2018-07-30 10:06:52 -07:00
Lioncash
b226315a34 service: Add wlan services
Adds the basic skeleton for the wlan services based off the information
on Switch Brew.
2018-07-28 21:54:55 -04:00
Lioncash
a2fbb0afaa service: Add btm services
Adds the skeleton for the btm services based off the information on
Switch Brew.
2018-07-28 21:09:07 -04:00
bunnei
8335889db7 Merge pull request #847 from lioncash/ncm
service: Add ncm services
2018-07-28 10:46:09 -07:00
bunnei
2a0ba2ad5e Merge pull request #846 from lioncash/mii
service: Add mii services
2018-07-28 10:45:31 -07:00
Lioncash
11ce0d5301 service: Add ncm services
Adds the basic skeleton for the ncm services based off information on
Switch Brew.
2018-07-27 17:38:30 -04:00
bunnei
f7ed5a6e29 Merge pull request #845 from lioncash/nfc
service: Add nfc services
2018-07-27 14:29:27 -07:00
bunnei
1e78ef897d Merge pull request #844 from lioncash/lbl
service: Add the lbl service
2018-07-27 13:06:11 -07:00
Lioncash
4bf7a98ab8 service: Add mii services
Adds the skeleton for the mii services based off information provided by
Switch Brew
2018-07-27 16:01:29 -04:00
Lioncash
405dde83f1 service: Add nfc services
Adds the skeleton of the nfc service based off the information provided
on Switch Brew.
2018-07-27 14:50:24 -04:00