summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/crypto/partition_data_manager.cpp3
-rw-r--r--src/core/hle/service/am/am.cpp36
-rw-r--r--src/core/hle/service/am/am.h4
-rw-r--r--src/core/hle/service/am/omm.cpp34
-rw-r--r--src/core/hle/service/aoc/aoc_u.cpp15
-rw-r--r--src/core/hle/service/aoc/aoc_u.h2
-rw-r--r--src/core/hle/service/audio/audren_u.cpp37
-rw-r--r--src/core/hle/service/es/es.cpp18
-rw-r--r--src/core/hle/service/hid/controllers/controller_base.cpp2
-rw-r--r--src/core/hle/service/hid/controllers/controller_base.h4
-rw-r--r--src/core/hle/service/hid/controllers/debug_pad.cpp2
-rw-r--r--src/core/hle/service/hid/controllers/debug_pad.h1
-rw-r--r--src/core/hle/service/hid/controllers/gesture.cpp2
-rw-r--r--src/core/hle/service/hid/controllers/gesture.h1
-rw-r--r--src/core/hle/service/hid/controllers/keyboard.cpp2
-rw-r--r--src/core/hle/service/hid/controllers/keyboard.h1
-rw-r--r--src/core/hle/service/hid/controllers/mouse.cpp2
-rw-r--r--src/core/hle/service/hid/controllers/mouse.h1
-rw-r--r--src/core/hle/service/hid/controllers/npad.cpp17
-rw-r--r--src/core/hle/service/hid/controllers/npad.h7
-rw-r--r--src/core/hle/service/hid/controllers/stubbed.cpp2
-rw-r--r--src/core/hle/service/hid/controllers/stubbed.h1
-rw-r--r--src/core/hle/service/hid/controllers/touchscreen.cpp2
-rw-r--r--src/core/hle/service/hid/controllers/touchscreen.h1
-rw-r--r--src/core/hle/service/hid/controllers/xpad.cpp2
-rw-r--r--src/core/hle/service/hid/controllers/xpad.h2
-rw-r--r--src/core/hle/service/hid/hid.cpp51
-rw-r--r--src/core/hle/service/nifm/nifm.cpp1
-rw-r--r--src/core/hle/service/nim/nim.cpp17
-rw-r--r--src/core/hle/service/ns/ns.cpp55
-rw-r--r--src/core/hle/service/set/set_cal.cpp3
31 files changed, 250 insertions, 78 deletions
diff --git a/src/core/crypto/partition_data_manager.cpp b/src/core/crypto/partition_data_manager.cpp
index 25cee1f3a..ed0775444 100644
--- a/src/core/crypto/partition_data_manager.cpp
+++ b/src/core/crypto/partition_data_manager.cpp
@@ -516,7 +516,8 @@ void PartitionDataManager::DecryptPackage2(const std::array<Key128, 0x20>& packa
516 out.insert(out.end(), rodata.begin(), rodata.end()); 516 out.insert(out.end(), rodata.begin(), rodata.end());
517 out.insert(out.end(), data.begin(), data.end()); 517 out.insert(out.end(), data.begin(), data.end());
518 518
519 offset += sizeof(KIPHeader) + out.size(); 519 offset += sizeof(KIPHeader) + kip.sections[0].size_compressed +
520 kip.sections[1].size_compressed + kip.sections[2].size_compressed;
520 521
521 if (name == "FS") 522 if (name == "FS")
522 package2_fs[static_cast<size_t>(type)] = std::move(out); 523 package2_fs[static_cast<size_t>(type)] = std::move(out);
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp
index 69bfce1c1..4d1f83170 100644
--- a/src/core/hle/service/am/am.cpp
+++ b/src/core/hle/service/am/am.cpp
@@ -638,10 +638,12 @@ IApplicationFunctions::IApplicationFunctions() : ServiceFramework("IApplicationF
638 {24, nullptr, "GetLaunchStorageInfoForDebug"}, 638 {24, nullptr, "GetLaunchStorageInfoForDebug"},
639 {25, nullptr, "ExtendSaveData"}, 639 {25, nullptr, "ExtendSaveData"},
640 {26, nullptr, "GetSaveDataSize"}, 640 {26, nullptr, "GetSaveDataSize"},
641 {30, nullptr, "BeginBlockingHomeButtonShortAndLongPressed"}, 641 {30, &IApplicationFunctions::BeginBlockingHomeButtonShortAndLongPressed,
642 {31, nullptr, "EndBlockingHomeButtonShortAndLongPressed"}, 642 "BeginBlockingHomeButtonShortAndLongPressed"},
643 {32, nullptr, "BeginBlockingHomeButton"}, 643 {31, &IApplicationFunctions::EndBlockingHomeButtonShortAndLongPressed,
644 {33, nullptr, "EndBlockingHomeButton"}, 644 "EndBlockingHomeButtonShortAndLongPressed"},
645 {32, &IApplicationFunctions::BeginBlockingHomeButton, "BeginBlockingHomeButton"},
646 {33, &IApplicationFunctions::EndBlockingHomeButton, "EndBlockingHomeButton"},
645 {40, &IApplicationFunctions::NotifyRunning, "NotifyRunning"}, 647 {40, &IApplicationFunctions::NotifyRunning, "NotifyRunning"},
646 {50, &IApplicationFunctions::GetPseudoDeviceId, "GetPseudoDeviceId"}, 648 {50, &IApplicationFunctions::GetPseudoDeviceId, "GetPseudoDeviceId"},
647 {60, nullptr, "SetMediaPlaybackStateForApplication"}, 649 {60, nullptr, "SetMediaPlaybackStateForApplication"},
@@ -669,6 +671,32 @@ IApplicationFunctions::IApplicationFunctions() : ServiceFramework("IApplicationF
669 671
670IApplicationFunctions::~IApplicationFunctions() = default; 672IApplicationFunctions::~IApplicationFunctions() = default;
671 673
674void IApplicationFunctions::BeginBlockingHomeButtonShortAndLongPressed(
675 Kernel::HLERequestContext& ctx) {
676 IPC::ResponseBuilder rb{ctx, 2};
677 rb.Push(RESULT_SUCCESS);
678 LOG_WARNING(Service_AM, "(STUBBED) called");
679}
680
681void IApplicationFunctions::EndBlockingHomeButtonShortAndLongPressed(
682 Kernel::HLERequestContext& ctx) {
683 IPC::ResponseBuilder rb{ctx, 2};
684 rb.Push(RESULT_SUCCESS);
685 LOG_WARNING(Service_AM, "(STUBBED) called");
686}
687
688void IApplicationFunctions::BeginBlockingHomeButton(Kernel::HLERequestContext& ctx) {
689 IPC::ResponseBuilder rb{ctx, 2};
690 rb.Push(RESULT_SUCCESS);
691 LOG_WARNING(Service_AM, "(STUBBED) called");
692}
693
694void IApplicationFunctions::EndBlockingHomeButton(Kernel::HLERequestContext& ctx) {
695 IPC::ResponseBuilder rb{ctx, 2};
696 rb.Push(RESULT_SUCCESS);
697 LOG_WARNING(Service_AM, "(STUBBED) called");
698}
699
672void IApplicationFunctions::PopLaunchParameter(Kernel::HLERequestContext& ctx) { 700void IApplicationFunctions::PopLaunchParameter(Kernel::HLERequestContext& ctx) {
673 constexpr std::array<u8, 0x88> data{{ 701 constexpr std::array<u8, 0x88> data{{
674 0xca, 0x97, 0x94, 0xc7, // Magic 702 0xca, 0x97, 0x94, 0xc7, // Magic
diff --git a/src/core/hle/service/am/am.h b/src/core/hle/service/am/am.h
index b39b0d838..095f94851 100644
--- a/src/core/hle/service/am/am.h
+++ b/src/core/hle/service/am/am.h
@@ -154,6 +154,10 @@ private:
154 void SetGamePlayRecordingState(Kernel::HLERequestContext& ctx); 154 void SetGamePlayRecordingState(Kernel::HLERequestContext& ctx);
155 void NotifyRunning(Kernel::HLERequestContext& ctx); 155 void NotifyRunning(Kernel::HLERequestContext& ctx);
156 void GetPseudoDeviceId(Kernel::HLERequestContext& ctx); 156 void GetPseudoDeviceId(Kernel::HLERequestContext& ctx);
157 void BeginBlockingHomeButtonShortAndLongPressed(Kernel::HLERequestContext& ctx);
158 void EndBlockingHomeButtonShortAndLongPressed(Kernel::HLERequestContext& ctx);
159 void BeginBlockingHomeButton(Kernel::HLERequestContext& ctx);
160 void EndBlockingHomeButton(Kernel::HLERequestContext& ctx);
157}; 161};
158 162
159class IHomeMenuFunctions final : public ServiceFramework<IHomeMenuFunctions> { 163class IHomeMenuFunctions final : public ServiceFramework<IHomeMenuFunctions> {
diff --git a/src/core/hle/service/am/omm.cpp b/src/core/hle/service/am/omm.cpp
index 1c37f849f..6ab3fb906 100644
--- a/src/core/hle/service/am/omm.cpp
+++ b/src/core/hle/service/am/omm.cpp
@@ -17,22 +17,24 @@ OMM::OMM() : ServiceFramework{"omm"} {
17 {5, nullptr, "GetCradleStatus"}, 17 {5, nullptr, "GetCradleStatus"},
18 {6, nullptr, "FadeInDisplay"}, 18 {6, nullptr, "FadeInDisplay"},
19 {7, nullptr, "FadeOutDisplay"}, 19 {7, nullptr, "FadeOutDisplay"},
20 {8, nullptr, "Unknown1"}, 20 {8, nullptr, "GetCradleFwVersion"},
21 {9, nullptr, "Unknown2"}, 21 {9, nullptr, "NotifyCecSettingsChanged"},
22 {10, nullptr, "Unknown3"}, 22 {10, nullptr, "SetOperationModePolicy"},
23 {11, nullptr, "Unknown4"}, 23 {11, nullptr, "GetDefaultDisplayResolution"},
24 {12, nullptr, "Unknown5"}, 24 {12, nullptr, "GetDefaultDisplayResolutionChangeEvent"},
25 {13, nullptr, "Unknown6"}, 25 {13, nullptr, "UpdateDefaultDisplayResolution"},
26 {14, nullptr, "Unknown7"}, 26 {14, nullptr, "ShouldSleepOnBoot"},
27 {15, nullptr, "Unknown8"}, 27 {15, nullptr, "NotifyHdcpApplicationExecutionStarted"},
28 {16, nullptr, "Unknown9"}, 28 {16, nullptr, "NotifyHdcpApplicationExecutionFinished"},
29 {17, nullptr, "Unknown10"}, 29 {17, nullptr, "NotifyHdcpApplicationDrawingStarted"},
30 {18, nullptr, "Unknown11"}, 30 {18, nullptr, "NotifyHdcpApplicationDrawingFinished"},
31 {19, nullptr, "Unknown12"}, 31 {19, nullptr, "GetHdcpAuthenticationFailedEvent"},
32 {20, nullptr, "Unknown13"}, 32 {20, nullptr, "GetHdcpAuthenticationFailedEmulationEnabled"},
33 {21, nullptr, "Unknown14"}, 33 {21, nullptr, "SetHdcpAuthenticationFailedEmulation"},
34 {22, nullptr, "Unknown15"}, 34 {22, nullptr, "GetHdcpStateChangeEvent"},
35 {23, nullptr, "Unknown16"}, 35 {23, nullptr, "GetHdcpState"},
36 {24, nullptr, "ShowCardUpdateProcessing"},
37 {25, nullptr, "SetApplicationCecSettingsAndNotifyChanged"},
36 }; 38 };
37 // clang-format on 39 // clang-format on
38 40
diff --git a/src/core/hle/service/aoc/aoc_u.cpp b/src/core/hle/service/aoc/aoc_u.cpp
index 518161bf7..428069df2 100644
--- a/src/core/hle/service/aoc/aoc_u.cpp
+++ b/src/core/hle/service/aoc/aoc_u.cpp
@@ -13,6 +13,7 @@
13#include "core/file_sys/patch_manager.h" 13#include "core/file_sys/patch_manager.h"
14#include "core/file_sys/registered_cache.h" 14#include "core/file_sys/registered_cache.h"
15#include "core/hle/ipc_helpers.h" 15#include "core/hle/ipc_helpers.h"
16#include "core/hle/kernel/event.h"
16#include "core/hle/kernel/process.h" 17#include "core/hle/kernel/process.h"
17#include "core/hle/service/aoc/aoc_u.h" 18#include "core/hle/service/aoc/aoc_u.h"
18#include "core/hle/service/filesystem/filesystem.h" 19#include "core/hle/service/filesystem/filesystem.h"
@@ -55,9 +56,13 @@ AOC_U::AOC_U() : ServiceFramework("aoc:u"), add_on_content(AccumulateAOCTitleIDs
55 {5, &AOC_U::GetAddOnContentBaseId, "GetAddOnContentBaseId"}, 56 {5, &AOC_U::GetAddOnContentBaseId, "GetAddOnContentBaseId"},
56 {6, nullptr, "PrepareAddOnContentByApplicationId"}, 57 {6, nullptr, "PrepareAddOnContentByApplicationId"},
57 {7, &AOC_U::PrepareAddOnContent, "PrepareAddOnContent"}, 58 {7, &AOC_U::PrepareAddOnContent, "PrepareAddOnContent"},
58 {8, nullptr, "GetAddOnContentListChangedEvent"}, 59 {8, &AOC_U::GetAddOnContentListChangedEvent, "GetAddOnContentListChangedEvent"},
59 }; 60 };
60 RegisterHandlers(functions); 61 RegisterHandlers(functions);
62
63 auto& kernel = Core::System::GetInstance().Kernel();
64 aoc_change_event = Kernel::Event::Create(kernel, Kernel::ResetType::Sticky,
65 "GetAddOnContentListChanged:Event");
61} 66}
62 67
63AOC_U::~AOC_U() = default; 68AOC_U::~AOC_U() = default;
@@ -130,6 +135,14 @@ void AOC_U::PrepareAddOnContent(Kernel::HLERequestContext& ctx) {
130 rb.Push(RESULT_SUCCESS); 135 rb.Push(RESULT_SUCCESS);
131} 136}
132 137
138void AOC_U::GetAddOnContentListChangedEvent(Kernel::HLERequestContext& ctx) {
139 LOG_WARNING(Service_AOC, "(STUBBED) called");
140
141 IPC::ResponseBuilder rb{ctx, 2, 1};
142 rb.Push(RESULT_SUCCESS);
143 rb.PushCopyObjects(aoc_change_event);
144}
145
133void InstallInterfaces(SM::ServiceManager& service_manager) { 146void InstallInterfaces(SM::ServiceManager& service_manager) {
134 std::make_shared<AOC_U>()->InstallAsService(service_manager); 147 std::make_shared<AOC_U>()->InstallAsService(service_manager);
135} 148}
diff --git a/src/core/hle/service/aoc/aoc_u.h b/src/core/hle/service/aoc/aoc_u.h
index b3c7cab7a..68d94fdaa 100644
--- a/src/core/hle/service/aoc/aoc_u.h
+++ b/src/core/hle/service/aoc/aoc_u.h
@@ -18,8 +18,10 @@ private:
18 void ListAddOnContent(Kernel::HLERequestContext& ctx); 18 void ListAddOnContent(Kernel::HLERequestContext& ctx);
19 void GetAddOnContentBaseId(Kernel::HLERequestContext& ctx); 19 void GetAddOnContentBaseId(Kernel::HLERequestContext& ctx);
20 void PrepareAddOnContent(Kernel::HLERequestContext& ctx); 20 void PrepareAddOnContent(Kernel::HLERequestContext& ctx);
21 void GetAddOnContentListChangedEvent(Kernel::HLERequestContext& ctx);
21 22
22 std::vector<u64> add_on_content; 23 std::vector<u64> add_on_content;
24 Kernel::SharedPtr<Kernel::Event> aoc_change_event;
23}; 25};
24 26
25/// Registers all AOC services with the specified service manager. 27/// Registers all AOC services with the specified service manager.
diff --git a/src/core/hle/service/audio/audren_u.cpp b/src/core/hle/service/audio/audren_u.cpp
index 6073f4ecd..fac6785a5 100644
--- a/src/core/hle/service/audio/audren_u.cpp
+++ b/src/core/hle/service/audio/audren_u.cpp
@@ -22,20 +22,22 @@ class IAudioRenderer final : public ServiceFramework<IAudioRenderer> {
22public: 22public:
23 explicit IAudioRenderer(AudioCore::AudioRendererParameter audren_params) 23 explicit IAudioRenderer(AudioCore::AudioRendererParameter audren_params)
24 : ServiceFramework("IAudioRenderer") { 24 : ServiceFramework("IAudioRenderer") {
25 // clang-format off
25 static const FunctionInfo functions[] = { 26 static const FunctionInfo functions[] = {
26 {0, &IAudioRenderer::GetAudioRendererSampleRate, "GetAudioRendererSampleRate"}, 27 {0, &IAudioRenderer::GetSampleRate, "GetSampleRate"},
27 {1, &IAudioRenderer::GetAudioRendererSampleCount, "GetAudioRendererSampleCount"}, 28 {1, &IAudioRenderer::GetSampleCount, "GetSampleCount"},
28 {2, &IAudioRenderer::GetAudioRendererMixBufferCount, "GetAudioRendererMixBufferCount"}, 29 {2, &IAudioRenderer::GetMixBufferCount, "GetMixBufferCount"},
29 {3, &IAudioRenderer::GetAudioRendererState, "GetAudioRendererState"}, 30 {3, &IAudioRenderer::GetState, "GetState"},
30 {4, &IAudioRenderer::RequestUpdateAudioRenderer, "RequestUpdateAudioRenderer"}, 31 {4, &IAudioRenderer::RequestUpdate, "RequestUpdate"},
31 {5, &IAudioRenderer::StartAudioRenderer, "StartAudioRenderer"}, 32 {5, &IAudioRenderer::Start, "Start"},
32 {6, &IAudioRenderer::StopAudioRenderer, "StopAudioRenderer"}, 33 {6, &IAudioRenderer::Stop, "Stop"},
33 {7, &IAudioRenderer::QuerySystemEvent, "QuerySystemEvent"}, 34 {7, &IAudioRenderer::QuerySystemEvent, "QuerySystemEvent"},
34 {8, nullptr, "SetAudioRendererRenderingTimeLimit"}, 35 {8, nullptr, "SetRenderingTimeLimit"},
35 {9, nullptr, "GetAudioRendererRenderingTimeLimit"}, 36 {9, nullptr, "GetRenderingTimeLimit"},
36 {10, nullptr, "RequestUpdateAudioRendererAuto"}, 37 {10, nullptr, "RequestUpdateAuto"},
37 {11, nullptr, "ExecuteAudioRendererRendering"}, 38 {11, nullptr, "ExecuteAudioRendererRendering"},
38 }; 39 };
40 // clang-format on
39 RegisterHandlers(functions); 41 RegisterHandlers(functions);
40 42
41 auto& kernel = Core::System::GetInstance().Kernel(); 43 auto& kernel = Core::System::GetInstance().Kernel();
@@ -49,42 +51,42 @@ private:
49 system_event->Signal(); 51 system_event->Signal();
50 } 52 }
51 53
52 void GetAudioRendererSampleRate(Kernel::HLERequestContext& ctx) { 54 void GetSampleRate(Kernel::HLERequestContext& ctx) {
53 IPC::ResponseBuilder rb{ctx, 3}; 55 IPC::ResponseBuilder rb{ctx, 3};
54 rb.Push(RESULT_SUCCESS); 56 rb.Push(RESULT_SUCCESS);
55 rb.Push<u32>(renderer->GetSampleRate()); 57 rb.Push<u32>(renderer->GetSampleRate());
56 LOG_DEBUG(Service_Audio, "called"); 58 LOG_DEBUG(Service_Audio, "called");
57 } 59 }
58 60
59 void GetAudioRendererSampleCount(Kernel::HLERequestContext& ctx) { 61 void GetSampleCount(Kernel::HLERequestContext& ctx) {
60 IPC::ResponseBuilder rb{ctx, 3}; 62 IPC::ResponseBuilder rb{ctx, 3};
61 rb.Push(RESULT_SUCCESS); 63 rb.Push(RESULT_SUCCESS);
62 rb.Push<u32>(renderer->GetSampleCount()); 64 rb.Push<u32>(renderer->GetSampleCount());
63 LOG_DEBUG(Service_Audio, "called"); 65 LOG_DEBUG(Service_Audio, "called");
64 } 66 }
65 67
66 void GetAudioRendererState(Kernel::HLERequestContext& ctx) { 68 void GetState(Kernel::HLERequestContext& ctx) {
67 IPC::ResponseBuilder rb{ctx, 3}; 69 IPC::ResponseBuilder rb{ctx, 3};
68 rb.Push(RESULT_SUCCESS); 70 rb.Push(RESULT_SUCCESS);
69 rb.Push<u32>(static_cast<u32>(renderer->GetStreamState())); 71 rb.Push<u32>(static_cast<u32>(renderer->GetStreamState()));
70 LOG_DEBUG(Service_Audio, "called"); 72 LOG_DEBUG(Service_Audio, "called");
71 } 73 }
72 74
73 void GetAudioRendererMixBufferCount(Kernel::HLERequestContext& ctx) { 75 void GetMixBufferCount(Kernel::HLERequestContext& ctx) {
74 IPC::ResponseBuilder rb{ctx, 3}; 76 IPC::ResponseBuilder rb{ctx, 3};
75 rb.Push(RESULT_SUCCESS); 77 rb.Push(RESULT_SUCCESS);
76 rb.Push<u32>(renderer->GetMixBufferCount()); 78 rb.Push<u32>(renderer->GetMixBufferCount());
77 LOG_DEBUG(Service_Audio, "called"); 79 LOG_DEBUG(Service_Audio, "called");
78 } 80 }
79 81
80 void RequestUpdateAudioRenderer(Kernel::HLERequestContext& ctx) { 82 void RequestUpdate(Kernel::HLERequestContext& ctx) {
81 ctx.WriteBuffer(renderer->UpdateAudioRenderer(ctx.ReadBuffer())); 83 ctx.WriteBuffer(renderer->UpdateAudioRenderer(ctx.ReadBuffer()));
82 IPC::ResponseBuilder rb{ctx, 2}; 84 IPC::ResponseBuilder rb{ctx, 2};
83 rb.Push(RESULT_SUCCESS); 85 rb.Push(RESULT_SUCCESS);
84 LOG_WARNING(Service_Audio, "(STUBBED) called"); 86 LOG_WARNING(Service_Audio, "(STUBBED) called");
85 } 87 }
86 88
87 void StartAudioRenderer(Kernel::HLERequestContext& ctx) { 89 void Start(Kernel::HLERequestContext& ctx) {
88 IPC::ResponseBuilder rb{ctx, 2}; 90 IPC::ResponseBuilder rb{ctx, 2};
89 91
90 rb.Push(RESULT_SUCCESS); 92 rb.Push(RESULT_SUCCESS);
@@ -92,7 +94,7 @@ private:
92 LOG_WARNING(Service_Audio, "(STUBBED) called"); 94 LOG_WARNING(Service_Audio, "(STUBBED) called");
93 } 95 }
94 96
95 void StopAudioRenderer(Kernel::HLERequestContext& ctx) { 97 void Stop(Kernel::HLERequestContext& ctx) {
96 IPC::ResponseBuilder rb{ctx, 2}; 98 IPC::ResponseBuilder rb{ctx, 2};
97 99
98 rb.Push(RESULT_SUCCESS); 100 rb.Push(RESULT_SUCCESS);
@@ -129,6 +131,7 @@ public:
129 {10, &IAudioDevice::GetActiveAudioDeviceName, "GetActiveAudioDeviceNameAuto"}, 131 {10, &IAudioDevice::GetActiveAudioDeviceName, "GetActiveAudioDeviceNameAuto"},
130 {11, nullptr, "QueryAudioDeviceInputEvent"}, 132 {11, nullptr, "QueryAudioDeviceInputEvent"},
131 {12, nullptr, "QueryAudioDeviceOutputEvent"}, 133 {12, nullptr, "QueryAudioDeviceOutputEvent"},
134 {13, nullptr, "GetAudioSystemMasterVolumeSetting"},
132 }; 135 };
133 RegisterHandlers(functions); 136 RegisterHandlers(functions);
134 137
diff --git a/src/core/hle/service/es/es.cpp b/src/core/hle/service/es/es.cpp
index d40f18565..6701cb913 100644
--- a/src/core/hle/service/es/es.cpp
+++ b/src/core/hle/service/es/es.cpp
@@ -9,6 +9,7 @@ namespace Service::ES {
9class ETicket final : public ServiceFramework<ETicket> { 9class ETicket final : public ServiceFramework<ETicket> {
10public: 10public:
11 explicit ETicket() : ServiceFramework{"es"} { 11 explicit ETicket() : ServiceFramework{"es"} {
12 // clang-format off
12 static const FunctionInfo functions[] = { 13 static const FunctionInfo functions[] = {
13 {1, nullptr, "ImportTicket"}, 14 {1, nullptr, "ImportTicket"},
14 {2, nullptr, "ImportTicketCertificateSet"}, 15 {2, nullptr, "ImportTicketCertificateSet"},
@@ -37,15 +38,18 @@ public:
37 {25, nullptr, "DeletePrepurchaseRecord"}, 38 {25, nullptr, "DeletePrepurchaseRecord"},
38 {26, nullptr, "DeleteAllPrepurchaseRecord"}, 39 {26, nullptr, "DeleteAllPrepurchaseRecord"},
39 {27, nullptr, "CountPrepurchaseRecord"}, 40 {27, nullptr, "CountPrepurchaseRecord"},
40 {28, nullptr, "ListPrepurchaseRecord"}, 41 {28, nullptr, "ListPrepurchaseRecordRightsIds"},
41 {29, nullptr, "ListPrepurchaseRecordInfo"}, 42 {29, nullptr, "ListPrepurchaseRecordInfo"},
42 {30, nullptr, "Unknown1"}, 43 {30, nullptr, "CountTicket"},
43 {31, nullptr, "Unknown2"}, 44 {31, nullptr, "ListTicketRightsIds"},
44 {32, nullptr, "Unknown3"}, 45 {32, nullptr, "CountPrepurchaseRecordEx"},
45 {33, nullptr, "Unknown4"}, 46 {33, nullptr, "ListPrepurchaseRecordRightsIdsEx"},
46 {34, nullptr, "Unknown5"}, 47 {34, nullptr, "GetEncryptedTicketSize"},
47 {35, nullptr, "Unknown6"}, 48 {35, nullptr, "GetEncryptedTicketData"},
49 {36, nullptr, "DeleteAllInactiveELicenseRequiredPersonalizedTicket"},
50 {503, nullptr, "GetTitleKey"},
48 }; 51 };
52 // clang-format on
49 RegisterHandlers(functions); 53 RegisterHandlers(functions);
50 } 54 }
51}; 55};
diff --git a/src/core/hle/service/hid/controllers/controller_base.cpp b/src/core/hle/service/hid/controllers/controller_base.cpp
index 1625e9c3d..0993a7815 100644
--- a/src/core/hle/service/hid/controllers/controller_base.cpp
+++ b/src/core/hle/service/hid/controllers/controller_base.cpp
@@ -5,6 +5,8 @@
5#include "core/hle/service/hid/controllers/controller_base.h" 5#include "core/hle/service/hid/controllers/controller_base.h"
6 6
7namespace Service::HID { 7namespace Service::HID {
8
9ControllerBase::ControllerBase() = default;
8ControllerBase::~ControllerBase() = default; 10ControllerBase::~ControllerBase() = default;
9 11
10void ControllerBase::ActivateController() { 12void ControllerBase::ActivateController() {
diff --git a/src/core/hle/service/hid/controllers/controller_base.h b/src/core/hle/service/hid/controllers/controller_base.h
index fa98e2354..f0e092b1b 100644
--- a/src/core/hle/service/hid/controllers/controller_base.h
+++ b/src/core/hle/service/hid/controllers/controller_base.h
@@ -10,8 +10,8 @@
10namespace Service::HID { 10namespace Service::HID {
11class ControllerBase { 11class ControllerBase {
12public: 12public:
13 ControllerBase() = default; 13 ControllerBase();
14 virtual ~ControllerBase() = 0; 14 virtual ~ControllerBase();
15 15
16 // Called when the controller is initialized 16 // Called when the controller is initialized
17 virtual void OnInit() = 0; 17 virtual void OnInit() = 0;
diff --git a/src/core/hle/service/hid/controllers/debug_pad.cpp b/src/core/hle/service/hid/controllers/debug_pad.cpp
index 6f8ef6e3f..3d100763f 100644
--- a/src/core/hle/service/hid/controllers/debug_pad.cpp
+++ b/src/core/hle/service/hid/controllers/debug_pad.cpp
@@ -4,13 +4,13 @@
4 4
5#include <cstring> 5#include <cstring>
6#include "common/common_types.h" 6#include "common/common_types.h"
7#include "common/swap.h"
8#include "core/core_timing.h" 7#include "core/core_timing.h"
9#include "core/hle/service/hid/controllers/debug_pad.h" 8#include "core/hle/service/hid/controllers/debug_pad.h"
10 9
11namespace Service::HID { 10namespace Service::HID {
12 11
13Controller_DebugPad::Controller_DebugPad() = default; 12Controller_DebugPad::Controller_DebugPad() = default;
13Controller_DebugPad::~Controller_DebugPad() = default;
14 14
15void Controller_DebugPad::OnInit() {} 15void Controller_DebugPad::OnInit() {}
16 16
diff --git a/src/core/hle/service/hid/controllers/debug_pad.h b/src/core/hle/service/hid/controllers/debug_pad.h
index e35675fa1..62b4f2682 100644
--- a/src/core/hle/service/hid/controllers/debug_pad.h
+++ b/src/core/hle/service/hid/controllers/debug_pad.h
@@ -14,6 +14,7 @@ namespace Service::HID {
14class Controller_DebugPad final : public ControllerBase { 14class Controller_DebugPad final : public ControllerBase {
15public: 15public:
16 Controller_DebugPad(); 16 Controller_DebugPad();
17 ~Controller_DebugPad() override;
17 18
18 // Called when the controller is initialized 19 // Called when the controller is initialized
19 void OnInit() override; 20 void OnInit() override;
diff --git a/src/core/hle/service/hid/controllers/gesture.cpp b/src/core/hle/service/hid/controllers/gesture.cpp
index b473b9e2b..898572277 100644
--- a/src/core/hle/service/hid/controllers/gesture.cpp
+++ b/src/core/hle/service/hid/controllers/gesture.cpp
@@ -4,7 +4,6 @@
4 4
5#include <cstring> 5#include <cstring>
6#include "common/common_types.h" 6#include "common/common_types.h"
7#include "common/swap.h"
8#include "core/core_timing.h" 7#include "core/core_timing.h"
9#include "core/hle/service/hid/controllers/gesture.h" 8#include "core/hle/service/hid/controllers/gesture.h"
10 9
@@ -12,6 +11,7 @@ namespace Service::HID {
12constexpr std::size_t SHARED_MEMORY_OFFSET = 0x3BA00; 11constexpr std::size_t SHARED_MEMORY_OFFSET = 0x3BA00;
13 12
14Controller_Gesture::Controller_Gesture() = default; 13Controller_Gesture::Controller_Gesture() = default;
14Controller_Gesture::~Controller_Gesture() = default;
15 15
16void Controller_Gesture::OnInit() {} 16void Controller_Gesture::OnInit() {}
17 17
diff --git a/src/core/hle/service/hid/controllers/gesture.h b/src/core/hle/service/hid/controllers/gesture.h
index 0ced50dfd..1056ffbcd 100644
--- a/src/core/hle/service/hid/controllers/gesture.h
+++ b/src/core/hle/service/hid/controllers/gesture.h
@@ -13,6 +13,7 @@ namespace Service::HID {
13class Controller_Gesture final : public ControllerBase { 13class Controller_Gesture final : public ControllerBase {
14public: 14public:
15 Controller_Gesture(); 15 Controller_Gesture();
16 ~Controller_Gesture() override;
16 17
17 // Called when the controller is initialized 18 // Called when the controller is initialized
18 void OnInit() override; 19 void OnInit() override;
diff --git a/src/core/hle/service/hid/controllers/keyboard.cpp b/src/core/hle/service/hid/controllers/keyboard.cpp
index 089c02ac4..ccfbce9ac 100644
--- a/src/core/hle/service/hid/controllers/keyboard.cpp
+++ b/src/core/hle/service/hid/controllers/keyboard.cpp
@@ -4,7 +4,6 @@
4 4
5#include <cstring> 5#include <cstring>
6#include "common/common_types.h" 6#include "common/common_types.h"
7#include "common/swap.h"
8#include "core/core_timing.h" 7#include "core/core_timing.h"
9#include "core/hle/service/hid/controllers/keyboard.h" 8#include "core/hle/service/hid/controllers/keyboard.h"
10 9
@@ -12,6 +11,7 @@ namespace Service::HID {
12constexpr std::size_t SHARED_MEMORY_OFFSET = 0x3800; 11constexpr std::size_t SHARED_MEMORY_OFFSET = 0x3800;
13 12
14Controller_Keyboard::Controller_Keyboard() = default; 13Controller_Keyboard::Controller_Keyboard() = default;
14Controller_Keyboard::~Controller_Keyboard() = default;
15 15
16void Controller_Keyboard::OnInit() {} 16void Controller_Keyboard::OnInit() {}
17 17
diff --git a/src/core/hle/service/hid/controllers/keyboard.h b/src/core/hle/service/hid/controllers/keyboard.h
index 778e14f7e..493e68fce 100644
--- a/src/core/hle/service/hid/controllers/keyboard.h
+++ b/src/core/hle/service/hid/controllers/keyboard.h
@@ -14,6 +14,7 @@ namespace Service::HID {
14class Controller_Keyboard final : public ControllerBase { 14class Controller_Keyboard final : public ControllerBase {
15public: 15public:
16 Controller_Keyboard(); 16 Controller_Keyboard();
17 ~Controller_Keyboard() override;
17 18
18 // Called when the controller is initialized 19 // Called when the controller is initialized
19 void OnInit() override; 20 void OnInit() override;
diff --git a/src/core/hle/service/hid/controllers/mouse.cpp b/src/core/hle/service/hid/controllers/mouse.cpp
index 78e9b5e9e..4e246a57d 100644
--- a/src/core/hle/service/hid/controllers/mouse.cpp
+++ b/src/core/hle/service/hid/controllers/mouse.cpp
@@ -4,7 +4,6 @@
4 4
5#include <cstring> 5#include <cstring>
6#include "common/common_types.h" 6#include "common/common_types.h"
7#include "common/swap.h"
8#include "core/core_timing.h" 7#include "core/core_timing.h"
9#include "core/hle/service/hid/controllers/mouse.h" 8#include "core/hle/service/hid/controllers/mouse.h"
10 9
@@ -12,6 +11,7 @@ namespace Service::HID {
12constexpr std::size_t SHARED_MEMORY_OFFSET = 0x3400; 11constexpr std::size_t SHARED_MEMORY_OFFSET = 0x3400;
13 12
14Controller_Mouse::Controller_Mouse() = default; 13Controller_Mouse::Controller_Mouse() = default;
14Controller_Mouse::~Controller_Mouse() = default;
15 15
16void Controller_Mouse::OnInit() {} 16void Controller_Mouse::OnInit() {}
17 17
diff --git a/src/core/hle/service/hid/controllers/mouse.h b/src/core/hle/service/hid/controllers/mouse.h
index 05358a4f5..543b0b71f 100644
--- a/src/core/hle/service/hid/controllers/mouse.h
+++ b/src/core/hle/service/hid/controllers/mouse.h
@@ -13,6 +13,7 @@ namespace Service::HID {
13class Controller_Mouse final : public ControllerBase { 13class Controller_Mouse final : public ControllerBase {
14public: 14public:
15 Controller_Mouse(); 15 Controller_Mouse();
16 ~Controller_Mouse() override;
16 17
17 // Called when the controller is initialized 18 // Called when the controller is initialized
18 void OnInit() override; 19 void OnInit() override;
diff --git a/src/core/hle/service/hid/controllers/npad.cpp b/src/core/hle/service/hid/controllers/npad.cpp
index d17e64b2a..b26593b4f 100644
--- a/src/core/hle/service/hid/controllers/npad.cpp
+++ b/src/core/hle/service/hid/controllers/npad.cpp
@@ -2,8 +2,6 @@
2// Licensed under GPLv2 or any later version 2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#pragma once
6
7#include <algorithm> 5#include <algorithm>
8#include <array> 6#include <array>
9#include <cstring> 7#include <cstring>
@@ -11,7 +9,6 @@
11#include "common/bit_field.h" 9#include "common/bit_field.h"
12#include "common/common_types.h" 10#include "common/common_types.h"
13#include "common/logging/log.h" 11#include "common/logging/log.h"
14#include "common/swap.h"
15#include "core/core.h" 12#include "core/core.h"
16#include "core/core_timing.h" 13#include "core/core_timing.h"
17#include "core/frontend/input.h" 14#include "core/frontend/input.h"
@@ -20,6 +17,7 @@
20#include "core/settings.h" 17#include "core/settings.h"
21 18
22namespace Service::HID { 19namespace Service::HID {
20
23constexpr u32 JOYCON_BODY_NEON_RED = 0xFF3C28; 21constexpr u32 JOYCON_BODY_NEON_RED = 0xFF3C28;
24constexpr u32 JOYCON_BUTTONS_NEON_RED = 0x1E0A0A; 22constexpr u32 JOYCON_BUTTONS_NEON_RED = 0x1E0A0A;
25constexpr u32 JOYCON_BODY_NEON_BLUE = 0x0AB9E6; 23constexpr u32 JOYCON_BODY_NEON_BLUE = 0x0AB9E6;
@@ -28,9 +26,18 @@ constexpr s32 HID_JOYSTICK_MAX = 0x7fff;
28constexpr s32 HID_JOYSTICK_MIN = -0x7fff; 26constexpr s32 HID_JOYSTICK_MIN = -0x7fff;
29constexpr std::size_t NPAD_OFFSET = 0x9A00; 27constexpr std::size_t NPAD_OFFSET = 0x9A00;
30constexpr u32 BATTERY_FULL = 2; 28constexpr u32 BATTERY_FULL = 2;
31enum class JoystickId : std::size_t { Joystick_Left, Joystick_Right }; 29
30constexpr std::array<u32, 10> npad_id_list{
31 0, 1, 2, 3, 4, 5, 6, 7, 32, 16,
32};
33
34enum class JoystickId : std::size_t {
35 Joystick_Left,
36 Joystick_Right,
37};
32 38
33Controller_NPad::Controller_NPad() = default; 39Controller_NPad::Controller_NPad() = default;
40Controller_NPad::~Controller_NPad() = default;
34 41
35void Controller_NPad::InitNewlyAddedControler(std::size_t controller_idx) { 42void Controller_NPad::InitNewlyAddedControler(std::size_t controller_idx) {
36 const auto controller_type = connected_controllers[controller_idx].type; 43 const auto controller_type = connected_controllers[controller_idx].type;
@@ -315,7 +322,7 @@ void Controller_NPad::SetSupportedNPadIdTypes(u8* data, std::size_t length) {
315 std::memcpy(supported_npad_id_types.data(), data, length); 322 std::memcpy(supported_npad_id_types.data(), data, length);
316} 323}
317 324
318const void Controller_NPad::GetSupportedNpadIdTypes(u32* data, std::size_t max_length) { 325void Controller_NPad::GetSupportedNpadIdTypes(u32* data, std::size_t max_length) {
319 ASSERT(max_length < supported_npad_id_types.size()); 326 ASSERT(max_length < supported_npad_id_types.size());
320 std::memcpy(data, supported_npad_id_types.data(), supported_npad_id_types.size()); 327 std::memcpy(data, supported_npad_id_types.data(), supported_npad_id_types.size());
321} 328}
diff --git a/src/core/hle/service/hid/controllers/npad.h b/src/core/hle/service/hid/controllers/npad.h
index 9d07d258d..7c0f93acf 100644
--- a/src/core/hle/service/hid/controllers/npad.h
+++ b/src/core/hle/service/hid/controllers/npad.h
@@ -15,6 +15,7 @@ namespace Service::HID {
15class Controller_NPad final : public ControllerBase { 15class Controller_NPad final : public ControllerBase {
16public: 16public:
17 Controller_NPad(); 17 Controller_NPad();
18 ~Controller_NPad() override;
18 19
19 // Called when the controller is initialized 20 // Called when the controller is initialized
20 void OnInit() override; 21 void OnInit() override;
@@ -77,7 +78,7 @@ public:
77 position1.Assign(light2); 78 position1.Assign(light2);
78 position1.Assign(light3); 79 position1.Assign(light3);
79 position1.Assign(light4); 80 position1.Assign(light4);
80 }; 81 }
81 union { 82 union {
82 u64 raw{}; 83 u64 raw{};
83 BitField<0, 1, u64> position1; 84 BitField<0, 1, u64> position1;
@@ -91,7 +92,7 @@ public:
91 NPadType GetSupportedStyleSet() const; 92 NPadType GetSupportedStyleSet() const;
92 93
93 void SetSupportedNPadIdTypes(u8* data, std::size_t length); 94 void SetSupportedNPadIdTypes(u8* data, std::size_t length);
94 const void GetSupportedNpadIdTypes(u32* data, std::size_t max_length); 95 void GetSupportedNpadIdTypes(u32* data, std::size_t max_length);
95 std::size_t GetSupportedNPadIdTypesSize() const; 96 std::size_t GetSupportedNPadIdTypesSize() const;
96 97
97 void SetHoldType(NpadHoldType joy_hold_type); 98 void SetHoldType(NpadHoldType joy_hold_type);
@@ -277,9 +278,7 @@ private:
277 std::vector<u32> supported_npad_id_types{}; 278 std::vector<u32> supported_npad_id_types{};
278 NpadHoldType hold_type{NpadHoldType::Vertical}; 279 NpadHoldType hold_type{NpadHoldType::Vertical};
279 Kernel::SharedPtr<Kernel::Event> styleset_changed_event; 280 Kernel::SharedPtr<Kernel::Event> styleset_changed_event;
280 std::size_t dump_idx{};
281 Vibration last_processed_vibration{}; 281 Vibration last_processed_vibration{};
282 static constexpr std::array<u32, 10> npad_id_list{0, 1, 2, 3, 4, 5, 6, 7, 32, 16};
283 std::array<ControllerHolder, 10> connected_controllers{}; 282 std::array<ControllerHolder, 10> connected_controllers{};
284 bool can_controllers_vibrate{true}; 283 bool can_controllers_vibrate{true};
285 284
diff --git a/src/core/hle/service/hid/controllers/stubbed.cpp b/src/core/hle/service/hid/controllers/stubbed.cpp
index 3a13d5991..02fcfadd9 100644
--- a/src/core/hle/service/hid/controllers/stubbed.cpp
+++ b/src/core/hle/service/hid/controllers/stubbed.cpp
@@ -4,13 +4,13 @@
4 4
5#include <cstring> 5#include <cstring>
6#include "common/common_types.h" 6#include "common/common_types.h"
7#include "common/swap.h"
8#include "core/core_timing.h" 7#include "core/core_timing.h"
9#include "core/hle/service/hid/controllers/stubbed.h" 8#include "core/hle/service/hid/controllers/stubbed.h"
10 9
11namespace Service::HID { 10namespace Service::HID {
12 11
13Controller_Stubbed::Controller_Stubbed() = default; 12Controller_Stubbed::Controller_Stubbed() = default;
13Controller_Stubbed::~Controller_Stubbed() = default;
14 14
15void Controller_Stubbed::OnInit() {} 15void Controller_Stubbed::OnInit() {}
16 16
diff --git a/src/core/hle/service/hid/controllers/stubbed.h b/src/core/hle/service/hid/controllers/stubbed.h
index 9c1b57f83..4a21c643e 100644
--- a/src/core/hle/service/hid/controllers/stubbed.h
+++ b/src/core/hle/service/hid/controllers/stubbed.h
@@ -11,6 +11,7 @@ namespace Service::HID {
11class Controller_Stubbed final : public ControllerBase { 11class Controller_Stubbed final : public ControllerBase {
12public: 12public:
13 Controller_Stubbed(); 13 Controller_Stubbed();
14 ~Controller_Stubbed() override;
14 15
15 // Called when the controller is initialized 16 // Called when the controller is initialized
16 void OnInit() override; 17 void OnInit() override;
diff --git a/src/core/hle/service/hid/controllers/touchscreen.cpp b/src/core/hle/service/hid/controllers/touchscreen.cpp
index e97f84ea1..43efef803 100644
--- a/src/core/hle/service/hid/controllers/touchscreen.cpp
+++ b/src/core/hle/service/hid/controllers/touchscreen.cpp
@@ -4,7 +4,6 @@
4 4
5#include <cstring> 5#include <cstring>
6#include "common/common_types.h" 6#include "common/common_types.h"
7#include "common/swap.h"
8#include "core/core_timing.h" 7#include "core/core_timing.h"
9#include "core/frontend/emu_window.h" 8#include "core/frontend/emu_window.h"
10#include "core/frontend/input.h" 9#include "core/frontend/input.h"
@@ -15,6 +14,7 @@ namespace Service::HID {
15constexpr std::size_t SHARED_MEMORY_OFFSET = 0x400; 14constexpr std::size_t SHARED_MEMORY_OFFSET = 0x400;
16 15
17Controller_Touchscreen::Controller_Touchscreen() = default; 16Controller_Touchscreen::Controller_Touchscreen() = default;
17Controller_Touchscreen::~Controller_Touchscreen() = default;
18 18
19void Controller_Touchscreen::OnInit() {} 19void Controller_Touchscreen::OnInit() {}
20 20
diff --git a/src/core/hle/service/hid/controllers/touchscreen.h b/src/core/hle/service/hid/controllers/touchscreen.h
index 1d97b6c2a..e5db6e6ba 100644
--- a/src/core/hle/service/hid/controllers/touchscreen.h
+++ b/src/core/hle/service/hid/controllers/touchscreen.h
@@ -14,6 +14,7 @@ namespace Service::HID {
14class Controller_Touchscreen final : public ControllerBase { 14class Controller_Touchscreen final : public ControllerBase {
15public: 15public:
16 Controller_Touchscreen(); 16 Controller_Touchscreen();
17 ~Controller_Touchscreen() override;
17 18
18 // Called when the controller is initialized 19 // Called when the controller is initialized
19 void OnInit() override; 20 void OnInit() override;
diff --git a/src/core/hle/service/hid/controllers/xpad.cpp b/src/core/hle/service/hid/controllers/xpad.cpp
index df0b48451..cd397c70b 100644
--- a/src/core/hle/service/hid/controllers/xpad.cpp
+++ b/src/core/hle/service/hid/controllers/xpad.cpp
@@ -4,7 +4,6 @@
4 4
5#include <cstring> 5#include <cstring>
6#include "common/common_types.h" 6#include "common/common_types.h"
7#include "common/swap.h"
8#include "core/core_timing.h" 7#include "core/core_timing.h"
9#include "core/hle/service/hid/controllers/xpad.h" 8#include "core/hle/service/hid/controllers/xpad.h"
10 9
@@ -12,6 +11,7 @@ namespace Service::HID {
12constexpr std::size_t SHARED_MEMORY_OFFSET = 0x3C00; 11constexpr std::size_t SHARED_MEMORY_OFFSET = 0x3C00;
13 12
14Controller_XPad::Controller_XPad() = default; 13Controller_XPad::Controller_XPad() = default;
14Controller_XPad::~Controller_XPad() = default;
15 15
16void Controller_XPad::OnInit() {} 16void Controller_XPad::OnInit() {}
17 17
diff --git a/src/core/hle/service/hid/controllers/xpad.h b/src/core/hle/service/hid/controllers/xpad.h
index e2007183d..ff836989f 100644
--- a/src/core/hle/service/hid/controllers/xpad.h
+++ b/src/core/hle/service/hid/controllers/xpad.h
@@ -7,13 +7,13 @@
7#include "common/common_funcs.h" 7#include "common/common_funcs.h"
8#include "common/common_types.h" 8#include "common/common_types.h"
9#include "common/swap.h" 9#include "common/swap.h"
10#include "core/frontend/input.h"
11#include "core/hle/service/hid/controllers/controller_base.h" 10#include "core/hle/service/hid/controllers/controller_base.h"
12 11
13namespace Service::HID { 12namespace Service::HID {
14class Controller_XPad final : public ControllerBase { 13class Controller_XPad final : public ControllerBase {
15public: 14public:
16 Controller_XPad(); 15 Controller_XPad();
16 ~Controller_XPad() override;
17 17
18 // Called when the controller is initialized 18 // Called when the controller is initialized
19 void OnInit() override; 19 void OnInit() override;
diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp
index 8aca0f197..beb89218a 100644
--- a/src/core/hle/service/hid/hid.cpp
+++ b/src/core/hle/service/hid/hid.cpp
@@ -177,6 +177,7 @@ public:
177 {11, &Hid::ActivateTouchScreen, "ActivateTouchScreen"}, 177 {11, &Hid::ActivateTouchScreen, "ActivateTouchScreen"},
178 {21, &Hid::ActivateMouse, "ActivateMouse"}, 178 {21, &Hid::ActivateMouse, "ActivateMouse"},
179 {31, &Hid::ActivateKeyboard, "ActivateKeyboard"}, 179 {31, &Hid::ActivateKeyboard, "ActivateKeyboard"},
180 {32, nullptr, "SendKeyboardLockKeyEvent"},
180 {40, nullptr, "AcquireXpadIdEventHandle"}, 181 {40, nullptr, "AcquireXpadIdEventHandle"},
181 {41, nullptr, "ReleaseXpadIdEventHandle"}, 182 {41, nullptr, "ReleaseXpadIdEventHandle"},
182 {51, &Hid::ActivateXpad, "ActivateXpad"}, 183 {51, &Hid::ActivateXpad, "ActivateXpad"},
@@ -207,6 +208,7 @@ public:
207 {80, nullptr, "GetGyroscopeZeroDriftMode"}, 208 {80, nullptr, "GetGyroscopeZeroDriftMode"},
208 {81, nullptr, "ResetGyroscopeZeroDriftMode"}, 209 {81, nullptr, "ResetGyroscopeZeroDriftMode"},
209 {82, &Hid::IsSixAxisSensorAtRest, "IsSixAxisSensorAtRest"}, 210 {82, &Hid::IsSixAxisSensorAtRest, "IsSixAxisSensorAtRest"},
211 {83, nullptr, "IsFirmwareUpdateAvailableForSixAxisSensor"},
210 {91, &Hid::ActivateGesture, "ActivateGesture"}, 212 {91, &Hid::ActivateGesture, "ActivateGesture"},
211 {100, &Hid::SetSupportedNpadStyleSet, "SetSupportedNpadStyleSet"}, 213 {100, &Hid::SetSupportedNpadStyleSet, "SetSupportedNpadStyleSet"},
212 {101, &Hid::GetSupportedNpadStyleSet, "GetSupportedNpadStyleSet"}, 214 {101, &Hid::GetSupportedNpadStyleSet, "GetSupportedNpadStyleSet"},
@@ -252,6 +254,7 @@ public:
252 {307, nullptr, "FinalizeSevenSixAxisSensor"}, 254 {307, nullptr, "FinalizeSevenSixAxisSensor"},
253 {308, nullptr, "SetSevenSixAxisSensorFusionStrength"}, 255 {308, nullptr, "SetSevenSixAxisSensorFusionStrength"},
254 {309, nullptr, "GetSevenSixAxisSensorFusionStrength"}, 256 {309, nullptr, "GetSevenSixAxisSensorFusionStrength"},
257 {310, nullptr, "ResetSevenSixAxisSensorTimestamp"},
255 {400, nullptr, "IsUsbFullKeyControllerEnabled"}, 258 {400, nullptr, "IsUsbFullKeyControllerEnabled"},
256 {401, nullptr, "EnableUsbFullKeyController"}, 259 {401, nullptr, "EnableUsbFullKeyController"},
257 {402, nullptr, "IsUsbFullKeyControllerConnected"}, 260 {402, nullptr, "IsUsbFullKeyControllerConnected"},
@@ -267,12 +270,24 @@ public:
267 {505, nullptr, "SetPalmaFrModeType"}, 270 {505, nullptr, "SetPalmaFrModeType"},
268 {506, nullptr, "ReadPalmaStep"}, 271 {506, nullptr, "ReadPalmaStep"},
269 {507, nullptr, "EnablePalmaStep"}, 272 {507, nullptr, "EnablePalmaStep"},
270 {508, nullptr, "SuspendPalmaStep"}, 273 {508, nullptr, "ResetPalmaStep"},
271 {509, nullptr, "ResetPalmaStep"}, 274 {509, nullptr, "ReadPalmaApplicationSection"},
272 {510, nullptr, "ReadPalmaApplicationSection"}, 275 {510, nullptr, "WritePalmaApplicationSection"},
273 {511, nullptr, "WritePalmaApplicationSection"}, 276 {511, nullptr, "ReadPalmaUniqueCode"},
274 {512, nullptr, "ReadPalmaUniqueCode"}, 277 {512, nullptr, "SetPalmaUniqueCodeInvalid"},
275 {513, nullptr, "SetPalmaUniqueCodeInvalid"}, 278 {513, nullptr, "WritePalmaActivityEntry"},
279 {514, nullptr, "WritePalmaRgbLedPatternEntry"},
280 {515, nullptr, "WritePalmaWaveEntry"},
281 {516, nullptr, "SetPalmaDataBaseIdentificationVersion"},
282 {517, nullptr, "GetPalmaDataBaseIdentificationVersion"},
283 {518, nullptr, "SuspendPalmaFeature"},
284 {519, nullptr, "GetPalmaOperationResult"},
285 {520, nullptr, "ReadPalmaPlayLog"},
286 {521, nullptr, "ResetPalmaPlayLog"},
287 {522, nullptr, "SetIsPalmaAllConnectable"},
288 {523, nullptr, "SetIsPalmaPairedConnectable"},
289 {524, nullptr, "PairPalma"},
290 {525, nullptr, "SetPalmaBoostMode"},
276 {1000, nullptr, "SetNpadCommunicationMode"}, 291 {1000, nullptr, "SetNpadCommunicationMode"},
277 {1001, nullptr, "GetNpadCommunicationMode"}, 292 {1001, nullptr, "GetNpadCommunicationMode"},
278 }; 293 };
@@ -620,6 +635,7 @@ public:
620 {140, nullptr, "DeactivateConsoleSixAxisSensor"}, 635 {140, nullptr, "DeactivateConsoleSixAxisSensor"},
621 {141, nullptr, "GetConsoleSixAxisSensorSamplingFrequency"}, 636 {141, nullptr, "GetConsoleSixAxisSensorSamplingFrequency"},
622 {142, nullptr, "DeactivateSevenSixAxisSensor"}, 637 {142, nullptr, "DeactivateSevenSixAxisSensor"},
638 {143, nullptr, "GetConsoleSixAxisSensorCountStates"},
623 {201, nullptr, "ActivateFirmwareUpdate"}, 639 {201, nullptr, "ActivateFirmwareUpdate"},
624 {202, nullptr, "DeactivateFirmwareUpdate"}, 640 {202, nullptr, "DeactivateFirmwareUpdate"},
625 {203, nullptr, "StartFirmwareUpdate"}, 641 {203, nullptr, "StartFirmwareUpdate"},
@@ -630,12 +646,23 @@ public:
630 {208, nullptr, "StartFirmwareUpdateForRevert"}, 646 {208, nullptr, "StartFirmwareUpdateForRevert"},
631 {209, nullptr, "GetAvailableFirmwareVersionForRevert"}, 647 {209, nullptr, "GetAvailableFirmwareVersionForRevert"},
632 {210, nullptr, "IsFirmwareUpdatingDevice"}, 648 {210, nullptr, "IsFirmwareUpdatingDevice"},
649 {211, nullptr, "StartFirmwareUpdateIndividual"},
650 {215, nullptr, "SetUsbFirmwareForceUpdateEnabled"},
651 {216, nullptr, "SetAllKuinaDevicesToFirmwareUpdateMode"},
633 {221, nullptr, "UpdateControllerColor"}, 652 {221, nullptr, "UpdateControllerColor"},
634 {222, nullptr, "ConnectUsbPadsAsync"}, 653 {222, nullptr, "ConnectUsbPadsAsync"},
635 {223, nullptr, "DisconnectUsbPadsAsync"}, 654 {223, nullptr, "DisconnectUsbPadsAsync"},
636 {224, nullptr, "UpdateDesignInfo"}, 655 {224, nullptr, "UpdateDesignInfo"},
637 {225, nullptr, "GetUniquePadDriverState"}, 656 {225, nullptr, "GetUniquePadDriverState"},
638 {226, nullptr, "GetSixAxisSensorDriverStates"}, 657 {226, nullptr, "GetSixAxisSensorDriverStates"},
658 {227, nullptr, "GetRxPacketHistory"},
659 {228, nullptr, "AcquireOperationEventHandle"},
660 {229, nullptr, "ReadSerialFlash"},
661 {230, nullptr, "WriteSerialFlash"},
662 {231, nullptr, "GetOperationResult"},
663 {232, nullptr, "EnableShipmentMode"},
664 {233, nullptr, "ClearPairingInfo"},
665 {234, nullptr, "GetUniquePadDeviceTypeSetInternal"},
639 {301, nullptr, "GetAbstractedPadHandles"}, 666 {301, nullptr, "GetAbstractedPadHandles"},
640 {302, nullptr, "GetAbstractedPadState"}, 667 {302, nullptr, "GetAbstractedPadState"},
641 {303, nullptr, "GetAbstractedPadsState"}, 668 {303, nullptr, "GetAbstractedPadsState"},
@@ -643,6 +670,8 @@ public:
643 {322, nullptr, "UnsetAutoPilotVirtualPadState"}, 670 {322, nullptr, "UnsetAutoPilotVirtualPadState"},
644 {323, nullptr, "UnsetAllAutoPilotVirtualPadState"}, 671 {323, nullptr, "UnsetAllAutoPilotVirtualPadState"},
645 {350, nullptr, "AddRegisteredDevice"}, 672 {350, nullptr, "AddRegisteredDevice"},
673 {400, nullptr, "DisableExternalMcuOnNxDevice"},
674 {401, nullptr, "DisableRailDeviceFiltering"},
646 }; 675 };
647 // clang-format on 676 // clang-format on
648 677
@@ -678,7 +707,9 @@ public:
678 {307, nullptr, "GetNpadSystemExtStyle"}, 707 {307, nullptr, "GetNpadSystemExtStyle"},
679 {308, nullptr, "ApplyNpadSystemCommonPolicyFull"}, 708 {308, nullptr, "ApplyNpadSystemCommonPolicyFull"},
680 {309, nullptr, "GetNpadFullKeyGripColor"}, 709 {309, nullptr, "GetNpadFullKeyGripColor"},
710 {310, nullptr, "GetMaskedSupportedNpadStyleSet"},
681 {311, nullptr, "SetNpadPlayerLedBlinkingDevice"}, 711 {311, nullptr, "SetNpadPlayerLedBlinkingDevice"},
712 {312, nullptr, "SetSupportedNpadStyleSetAll"},
682 {321, nullptr, "GetUniquePadsFromNpad"}, 713 {321, nullptr, "GetUniquePadsFromNpad"},
683 {322, nullptr, "GetIrSensorState"}, 714 {322, nullptr, "GetIrSensorState"},
684 {323, nullptr, "GetXcdHandleForNpadWithIrSensor"}, 715 {323, nullptr, "GetXcdHandleForNpadWithIrSensor"},
@@ -703,6 +734,7 @@ public:
703 {546, nullptr, "AcquireDeviceRegisteredEventForControllerSupport"}, 734 {546, nullptr, "AcquireDeviceRegisteredEventForControllerSupport"},
704 {547, nullptr, "GetAllowedBluetoothLinksCount"}, 735 {547, nullptr, "GetAllowedBluetoothLinksCount"},
705 {548, nullptr, "GetRegisteredDevices"}, 736 {548, nullptr, "GetRegisteredDevices"},
737 {549, nullptr, "GetConnectableRegisteredDevices"},
706 {700, nullptr, "ActivateUniquePad"}, 738 {700, nullptr, "ActivateUniquePad"},
707 {702, nullptr, "AcquireUniquePadConnectionEventHandle"}, 739 {702, nullptr, "AcquireUniquePadConnectionEventHandle"},
708 {703, nullptr, "GetUniquePadIds"}, 740 {703, nullptr, "GetUniquePadIds"},
@@ -731,6 +763,7 @@ public:
731 {850, nullptr, "IsUsbFullKeyControllerEnabled"}, 763 {850, nullptr, "IsUsbFullKeyControllerEnabled"},
732 {851, nullptr, "EnableUsbFullKeyController"}, 764 {851, nullptr, "EnableUsbFullKeyController"},
733 {852, nullptr, "IsUsbConnected"}, 765 {852, nullptr, "IsUsbConnected"},
766 {870, nullptr, "IsHandheldButtonPressedOnConsoleMode"},
734 {900, nullptr, "ActivateInputDetector"}, 767 {900, nullptr, "ActivateInputDetector"},
735 {901, nullptr, "NotifyInputDetector"}, 768 {901, nullptr, "NotifyInputDetector"},
736 {1000, nullptr, "InitializeFirmwareUpdate"}, 769 {1000, nullptr, "InitializeFirmwareUpdate"},
@@ -750,6 +783,12 @@ public:
750 {1052, nullptr, "CancelSixAxisSensorAccurateUserCalibration"}, 783 {1052, nullptr, "CancelSixAxisSensorAccurateUserCalibration"},
751 {1053, nullptr, "GetSixAxisSensorAccurateUserCalibrationState"}, 784 {1053, nullptr, "GetSixAxisSensorAccurateUserCalibrationState"},
752 {1100, nullptr, "GetHidbusSystemServiceObject"}, 785 {1100, nullptr, "GetHidbusSystemServiceObject"},
786 {1120, nullptr, "SetFirmwareHotfixUpdateSkipEnabled"},
787 {1130, nullptr, "InitializeUsbFirmwareUpdate"},
788 {1131, nullptr, "FinalizeUsbFirmwareUpdate"},
789 {1132, nullptr, "CheckUsbFirmwareUpdateRequired"},
790 {1133, nullptr, "StartUsbFirmwareUpdate"},
791 {1134, nullptr, "GetUsbFirmwareUpdateState"},
753 }; 792 };
754 // clang-format on 793 // clang-format on
755 794
diff --git a/src/core/hle/service/nifm/nifm.cpp b/src/core/hle/service/nifm/nifm.cpp
index 10611ed6a..75dcd94a3 100644
--- a/src/core/hle/service/nifm/nifm.cpp
+++ b/src/core/hle/service/nifm/nifm.cpp
@@ -219,6 +219,7 @@ IGeneralService::IGeneralService() : ServiceFramework("IGeneralService") {
219 {35, nullptr, "GetScanData"}, 219 {35, nullptr, "GetScanData"},
220 {36, nullptr, "GetCurrentAccessPoint"}, 220 {36, nullptr, "GetCurrentAccessPoint"},
221 {37, nullptr, "Shutdown"}, 221 {37, nullptr, "Shutdown"},
222 {38, nullptr, "GetAllowedChannels"},
222 }; 223 };
223 RegisterHandlers(functions); 224 RegisterHandlers(functions);
224} 225}
diff --git a/src/core/hle/service/nim/nim.cpp b/src/core/hle/service/nim/nim.cpp
index 261ad539c..18091c9bb 100644
--- a/src/core/hle/service/nim/nim.cpp
+++ b/src/core/hle/service/nim/nim.cpp
@@ -71,6 +71,22 @@ public:
71 } 71 }
72}; 72};
73 73
74class NIM_ECA final : public ServiceFramework<NIM_ECA> {
75public:
76 explicit NIM_ECA() : ServiceFramework{"nim:eca"} {
77 // clang-format off
78 static const FunctionInfo functions[] = {
79 {0, nullptr, "CreateServerInterface"},
80 {1, nullptr, "RefreshDebugAvailability"},
81 {2, nullptr, "ClearDebugResponse"},
82 {3, nullptr, "RegisterDebugResponse"},
83 };
84 // clang-format on
85
86 RegisterHandlers(functions);
87 }
88};
89
74class NIM_SHP final : public ServiceFramework<NIM_SHP> { 90class NIM_SHP final : public ServiceFramework<NIM_SHP> {
75public: 91public:
76 explicit NIM_SHP() : ServiceFramework{"nim:shp"} { 92 explicit NIM_SHP() : ServiceFramework{"nim:shp"} {
@@ -214,6 +230,7 @@ private:
214 230
215void InstallInterfaces(SM::ServiceManager& sm) { 231void InstallInterfaces(SM::ServiceManager& sm) {
216 std::make_shared<NIM>()->InstallAsService(sm); 232 std::make_shared<NIM>()->InstallAsService(sm);
233 std::make_shared<NIM_ECA>()->InstallAsService(sm);
217 std::make_shared<NIM_SHP>()->InstallAsService(sm); 234 std::make_shared<NIM_SHP>()->InstallAsService(sm);
218 std::make_shared<NTC>()->InstallAsService(sm); 235 std::make_shared<NTC>()->InstallAsService(sm);
219} 236}
diff --git a/src/core/hle/service/ns/ns.cpp b/src/core/hle/service/ns/ns.cpp
index 98017267c..07c1381fe 100644
--- a/src/core/hle/service/ns/ns.cpp
+++ b/src/core/hle/service/ns/ns.cpp
@@ -93,13 +93,23 @@ public:
93 {86, nullptr, "EnableApplicationCrashReport"}, 93 {86, nullptr, "EnableApplicationCrashReport"},
94 {87, nullptr, "IsApplicationCrashReportEnabled"}, 94 {87, nullptr, "IsApplicationCrashReportEnabled"},
95 {90, nullptr, "BoostSystemMemoryResourceLimit"}, 95 {90, nullptr, "BoostSystemMemoryResourceLimit"},
96 {91, nullptr, "Unknown1"},
97 {92, nullptr, "Unknown2"},
98 {93, nullptr, "GetMainApplicationProgramIndex"},
99 {94, nullptr, "LaunchApplication2"},
100 {95, nullptr, "GetApplicationLaunchInfo"},
101 {96, nullptr, "AcquireApplicationLaunchInfo"},
102 {97, nullptr, "GetMainApplicationProgramIndex2"},
103 {98, nullptr, "EnableApplicationAllThreadDumpOnCrash"},
96 {100, nullptr, "ResetToFactorySettings"}, 104 {100, nullptr, "ResetToFactorySettings"},
97 {101, nullptr, "ResetToFactorySettingsWithoutUserSaveData"}, 105 {101, nullptr, "ResetToFactorySettingsWithoutUserSaveData"},
98 {102, nullptr, "ResetToFactorySettingsForRefurbishment"}, 106 {102, nullptr, "ResetToFactorySettingsForRefurbishment"},
99 {200, nullptr, "CalculateUserSaveDataStatistics"}, 107 {200, nullptr, "CalculateUserSaveDataStatistics"},
100 {201, nullptr, "DeleteUserSaveDataAll"}, 108 {201, nullptr, "DeleteUserSaveDataAll"},
101 {210, nullptr, "DeleteUserSystemSaveData"}, 109 {210, nullptr, "DeleteUserSystemSaveData"},
110 {211, nullptr, "DeleteSaveData"},
102 {220, nullptr, "UnregisterNetworkServiceAccount"}, 111 {220, nullptr, "UnregisterNetworkServiceAccount"},
112 {221, nullptr, "UnregisterNetworkServiceAccountWithUserSaveDataDeletion"},
103 {300, nullptr, "GetApplicationShellEvent"}, 113 {300, nullptr, "GetApplicationShellEvent"},
104 {301, nullptr, "PopApplicationShellEventInfo"}, 114 {301, nullptr, "PopApplicationShellEventInfo"},
105 {302, nullptr, "LaunchLibraryApplet"}, 115 {302, nullptr, "LaunchLibraryApplet"},
@@ -114,6 +124,7 @@ public:
114 {403, nullptr, "GetMaxApplicationControlCacheCount"}, 124 {403, nullptr, "GetMaxApplicationControlCacheCount"},
115 {404, nullptr, "InvalidateApplicationControlCache"}, 125 {404, nullptr, "InvalidateApplicationControlCache"},
116 {405, nullptr, "ListApplicationControlCacheEntryInfo"}, 126 {405, nullptr, "ListApplicationControlCacheEntryInfo"},
127 {406, nullptr, "GetApplicationControlProperty"},
117 {502, nullptr, "RequestCheckGameCardRegistration"}, 128 {502, nullptr, "RequestCheckGameCardRegistration"},
118 {503, nullptr, "RequestGameCardRegistrationGoldPoint"}, 129 {503, nullptr, "RequestGameCardRegistrationGoldPoint"},
119 {504, nullptr, "RequestRegisterGameCard"}, 130 {504, nullptr, "RequestRegisterGameCard"},
@@ -129,6 +140,7 @@ public:
129 {604, nullptr, "RegisterContentsExternalKey"}, 140 {604, nullptr, "RegisterContentsExternalKey"},
130 {605, nullptr, "ListApplicationContentMetaStatusWithRightsCheck"}, 141 {605, nullptr, "ListApplicationContentMetaStatusWithRightsCheck"},
131 {606, nullptr, "GetContentMetaStorage"}, 142 {606, nullptr, "GetContentMetaStorage"},
143 {607, nullptr, "ListAvailableAddOnContent"},
132 {700, nullptr, "PushDownloadTaskList"}, 144 {700, nullptr, "PushDownloadTaskList"},
133 {701, nullptr, "ClearTaskStatusList"}, 145 {701, nullptr, "ClearTaskStatusList"},
134 {702, nullptr, "RequestDownloadTaskList"}, 146 {702, nullptr, "RequestDownloadTaskList"},
@@ -148,6 +160,9 @@ public:
148 {907, nullptr, "WithdrawApplicationUpdateRequest"}, 160 {907, nullptr, "WithdrawApplicationUpdateRequest"},
149 {908, nullptr, "ListApplicationRecordInstalledContentMeta"}, 161 {908, nullptr, "ListApplicationRecordInstalledContentMeta"},
150 {909, nullptr, "WithdrawCleanupAddOnContentsWithNoRightsRecommendation"}, 162 {909, nullptr, "WithdrawCleanupAddOnContentsWithNoRightsRecommendation"},
163 {910, nullptr, "Unknown3"},
164 {911, nullptr, "SetPreInstalledApplication"},
165 {912, nullptr, "ClearPreInstalledApplicationFlag"},
151 {1000, nullptr, "RequestVerifyApplicationDeprecated"}, 166 {1000, nullptr, "RequestVerifyApplicationDeprecated"},
152 {1001, nullptr, "CorruptApplicationForDebug"}, 167 {1001, nullptr, "CorruptApplicationForDebug"},
153 {1002, nullptr, "RequestVerifyAddOnContentsRights"}, 168 {1002, nullptr, "RequestVerifyAddOnContentsRights"},
@@ -162,6 +177,8 @@ public:
162 {1305, nullptr, "TryDeleteRunningApplicationEntity"}, 177 {1305, nullptr, "TryDeleteRunningApplicationEntity"},
163 {1306, nullptr, "TryDeleteRunningApplicationCompletely"}, 178 {1306, nullptr, "TryDeleteRunningApplicationCompletely"},
164 {1307, nullptr, "TryDeleteRunningApplicationContentEntities"}, 179 {1307, nullptr, "TryDeleteRunningApplicationContentEntities"},
180 {1308, nullptr, "DeleteApplicationCompletelyForDebug"},
181 {1309, nullptr, "CleanupUnavailableAddOnContents"},
165 {1400, nullptr, "PrepareShutdown"}, 182 {1400, nullptr, "PrepareShutdown"},
166 {1500, nullptr, "FormatSdCard"}, 183 {1500, nullptr, "FormatSdCard"},
167 {1501, nullptr, "NeedsSystemUpdateToFormatSdCard"}, 184 {1501, nullptr, "NeedsSystemUpdateToFormatSdCard"},
@@ -199,6 +216,28 @@ public:
199 {2015, nullptr, "CompareSystemDeliveryInfo"}, 216 {2015, nullptr, "CompareSystemDeliveryInfo"},
200 {2016, nullptr, "ListNotCommittedContentMeta"}, 217 {2016, nullptr, "ListNotCommittedContentMeta"},
201 {2017, nullptr, "CreateDownloadTask"}, 218 {2017, nullptr, "CreateDownloadTask"},
219 {2018, nullptr, "Unknown4"},
220 {2050, nullptr, "Unknown5"},
221 {2100, nullptr, "Unknown6"},
222 {2101, nullptr, "Unknown7"},
223 {2150, nullptr, "CreateRightsEnvironment"},
224 {2151, nullptr, "DestroyRightsEnvironment"},
225 {2152, nullptr, "ActivateRightsEnvironment"},
226 {2153, nullptr, "DeactivateRightsEnvironment"},
227 {2154, nullptr, "ForceActivateRightsContextForExit"},
228 {2160, nullptr, "AddTargetApplicationToRightsEnvironment"},
229 {2161, nullptr, "SetUsersToRightsEnvironment"},
230 {2170, nullptr, "GetRightsEnvironmentStatus"},
231 {2171, nullptr, "GetRightsEnvironmentStatusChangedEvent"},
232 {2180, nullptr, "RequestExtendRightsInRightsEnvironment"},
233 {2181, nullptr, "GetLastResultOfExtendRightsInRightsEnvironment"},
234 {2182, nullptr, "SetActiveRightsContextUsingStateToRightsEnvironment"},
235 {2190, nullptr, "GetRightsEnvironmentHandleForApplication"},
236 {2199, nullptr, "GetRightsEnvironmentCountForDebug"},
237 {2200, nullptr, "Unknown8"},
238 {2201, nullptr, "Unknown9"},
239 {2250, nullptr, "Unknown10"},
240 {2300, nullptr, "Unknown11"},
202 }; 241 };
203 // clang-format on 242 // clang-format on
204 243
@@ -348,12 +387,15 @@ public:
348 {0, nullptr, "LaunchProgram"}, 387 {0, nullptr, "LaunchProgram"},
349 {1, nullptr, "TerminateProcess"}, 388 {1, nullptr, "TerminateProcess"},
350 {2, nullptr, "TerminateProgram"}, 389 {2, nullptr, "TerminateProgram"},
351 {3, nullptr, "GetShellEventHandle"}, 390 {4, nullptr, "GetShellEventHandle"},
352 {4, nullptr, "GetShellEventInfo"}, 391 {5, nullptr, "GetShellEventInfo"},
353 {5, nullptr, "TerminateApplication"}, 392 {6, nullptr, "TerminateApplication"},
354 {6, nullptr, "PrepareLaunchProgramFromHost"}, 393 {7, nullptr, "PrepareLaunchProgramFromHost"},
355 {7, nullptr, "LaunchApplication"}, 394 {8, nullptr, "LaunchApplication"},
356 {8, nullptr, "LaunchApplicationWithStorageId"}, 395 {9, nullptr, "LaunchApplicationWithStorageId"},
396 {10, nullptr, "TerminateApplication2"},
397 {11, nullptr, "GetRunningApplicationProcessId"},
398 {12, nullptr, "SetCurrentApplicationRightsEnvironmentCanBeActive"},
357 }; 399 };
358 // clang-format on 400 // clang-format on
359 401
@@ -388,6 +430,7 @@ public:
388 {19, nullptr, "GetReceivedEulaDataSize"}, 430 {19, nullptr, "GetReceivedEulaDataSize"},
389 {20, nullptr, "GetReceivedEulaData"}, 431 {20, nullptr, "GetReceivedEulaData"},
390 {21, nullptr, "SetupToReceiveSystemUpdate"}, 432 {21, nullptr, "SetupToReceiveSystemUpdate"},
433 {22, nullptr, "RequestCheckLatestUpdateIncludesRebootlessUpdate"},
391 }; 434 };
392 // clang-format on 435 // clang-format on
393 436
diff --git a/src/core/hle/service/set/set_cal.cpp b/src/core/hle/service/set/set_cal.cpp
index 5af356d10..34654bb07 100644
--- a/src/core/hle/service/set/set_cal.cpp
+++ b/src/core/hle/service/set/set_cal.cpp
@@ -39,7 +39,8 @@ SET_CAL::SET_CAL() : ServiceFramework("set:cal") {
39 {29, nullptr, "GetAmiiboEcqvBlsKey"}, 39 {29, nullptr, "GetAmiiboEcqvBlsKey"},
40 {30, nullptr, "GetAmiiboEcqvBlsCertificate"}, 40 {30, nullptr, "GetAmiiboEcqvBlsCertificate"},
41 {31, nullptr, "GetAmiiboEcqvBlsRootCertificate"}, 41 {31, nullptr, "GetAmiiboEcqvBlsRootCertificate"},
42 {32, nullptr, "GetUnknownId"}, 42 {32, nullptr, "GetUsbTypeCPowerSourceCircuitVersion"},
43 {33, nullptr, "GetBatteryVersion"},
43 }; 44 };
44 RegisterHandlers(functions); 45 RegisterHandlers(functions);
45} 46}