summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/common/logging/backend.cpp1
-rw-r--r--src/common/logging/log.h1
-rw-r--r--src/core/CMakeLists.txt2
-rw-r--r--src/core/hle/service/psc/psc.cpp77
-rw-r--r--src/core/hle/service/psc/psc.h15
-rw-r--r--src/core/hle/service/service.cpp2
6 files changed, 98 insertions, 0 deletions
diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp
index d6714587c..43561d607 100644
--- a/src/common/logging/backend.cpp
+++ b/src/common/logging/backend.cpp
@@ -192,6 +192,7 @@ void FileBackend::Write(const Entry& entry) {
192 SUB(Service, PCTL) \ 192 SUB(Service, PCTL) \
193 SUB(Service, PCV) \ 193 SUB(Service, PCV) \
194 SUB(Service, PREPO) \ 194 SUB(Service, PREPO) \
195 SUB(Service, PSC) \
195 SUB(Service, SET) \ 196 SUB(Service, SET) \
196 SUB(Service, SM) \ 197 SUB(Service, SM) \
197 SUB(Service, SPL) \ 198 SUB(Service, SPL) \
diff --git a/src/common/logging/log.h b/src/common/logging/log.h
index e96d817f4..1763bdeaf 100644
--- a/src/common/logging/log.h
+++ b/src/common/logging/log.h
@@ -79,6 +79,7 @@ enum class Class : ClassType {
79 Service_PCTL, ///< The PCTL (Parental control) service 79 Service_PCTL, ///< The PCTL (Parental control) service
80 Service_PCV, ///< The PCV (Parental control) service 80 Service_PCV, ///< The PCV (Parental control) service
81 Service_PREPO, ///< The PREPO (Play report) service 81 Service_PREPO, ///< The PREPO (Play report) service
82 Service_PSC, ///< The PSC service
82 Service_SET, ///< The SET (Settings) service 83 Service_SET, ///< The SET (Settings) service
83 Service_SM, ///< The SM (Service manager) service 84 Service_SM, ///< The SM (Service manager) service
84 Service_SPL, ///< The SPL service 85 Service_SPL, ///< The SPL service
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index 3cc9160ca..5567737a1 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -261,6 +261,8 @@ add_library(core STATIC
261 hle/service/pm/pm.h 261 hle/service/pm/pm.h
262 hle/service/prepo/prepo.cpp 262 hle/service/prepo/prepo.cpp
263 hle/service/prepo/prepo.h 263 hle/service/prepo/prepo.h
264 hle/service/psc/psc.cpp
265 hle/service/psc/psc.h
264 hle/service/service.cpp 266 hle/service/service.cpp
265 hle/service/service.h 267 hle/service/service.h
266 hle/service/set/set.cpp 268 hle/service/set/set.cpp
diff --git a/src/core/hle/service/psc/psc.cpp b/src/core/hle/service/psc/psc.cpp
new file mode 100644
index 000000000..bbad870a2
--- /dev/null
+++ b/src/core/hle/service/psc/psc.cpp
@@ -0,0 +1,77 @@
1// Copyright 2018 yuzu emulator team
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#include <memory>
6
7#include "common/logging/log.h"
8#include "core/hle/ipc_helpers.h"
9#include "core/hle/service/psc/psc.h"
10#include "core/hle/service/service.h"
11#include "core/hle/service/sm/sm.h"
12
13namespace Service::PSC {
14
15class PSC_C final : public ServiceFramework<PSC_C> {
16public:
17 explicit PSC_C() : ServiceFramework{"psc:c"} {
18 // clang-format off
19 static const FunctionInfo functions[] = {
20 {0, nullptr, "Unknown1"},
21 {1, nullptr, "Unknown2"},
22 {2, nullptr, "Unknown3"},
23 {3, nullptr, "Unknown4"},
24 {4, nullptr, "Unknown5"},
25 {5, nullptr, "Unknown6"},
26 {6, nullptr, "Unknown7"},
27 };
28 // clang-format on
29
30 RegisterHandlers(functions);
31 }
32};
33
34class IPmModule final : public ServiceFramework<IPmModule> {
35public:
36 explicit IPmModule() : ServiceFramework{"IPmModule"} {
37 // clang-format off
38 static const FunctionInfo functions[] = {
39 {0, nullptr, "Initialize"},
40 {1, nullptr, "GetRequest"},
41 {2, nullptr, "Acknowledge"},
42 {3, nullptr, "Unknown1"},
43 };
44 // clang-format on
45
46 RegisterHandlers(functions);
47 }
48};
49
50class PSC_M final : public ServiceFramework<PSC_M> {
51public:
52 explicit PSC_M() : ServiceFramework{"psc:m"} {
53 // clang-format off
54 static const FunctionInfo functions[] = {
55 {0, &PSC_M::GetPmModule, "GetPmModule"},
56 };
57 // clang-format on
58
59 RegisterHandlers(functions);
60 }
61
62private:
63 void GetPmModule(Kernel::HLERequestContext& ctx) {
64 IPC::ResponseBuilder rb{ctx, 2, 0, 1};
65 rb.Push(RESULT_SUCCESS);
66 rb.PushIpcInterface<IPmModule>();
67
68 LOG_DEBUG(Service_PSC, "called");
69 }
70};
71
72void InstallInterfaces(SM::ServiceManager& sm) {
73 std::make_shared<PSC_C>()->InstallAsService(sm);
74 std::make_shared<PSC_M>()->InstallAsService(sm);
75}
76
77} // namespace Service::PSC
diff --git a/src/core/hle/service/psc/psc.h b/src/core/hle/service/psc/psc.h
new file mode 100644
index 000000000..5052eb02c
--- /dev/null
+++ b/src/core/hle/service/psc/psc.h
@@ -0,0 +1,15 @@
1// Copyright 2018 yuzu emulator team
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7namespace Service::SM {
8class ServiceManager;
9}
10
11namespace Service::PSC {
12
13void InstallInterfaces(SM::ServiceManager& sm);
14
15} // namespace Service::PSC
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp
index 828666e9b..025f0c696 100644
--- a/src/core/hle/service/service.cpp
+++ b/src/core/hle/service/service.cpp
@@ -52,6 +52,7 @@
52#include "core/hle/service/pcv/pcv.h" 52#include "core/hle/service/pcv/pcv.h"
53#include "core/hle/service/pm/pm.h" 53#include "core/hle/service/pm/pm.h"
54#include "core/hle/service/prepo/prepo.h" 54#include "core/hle/service/prepo/prepo.h"
55#include "core/hle/service/psc/psc.h"
55#include "core/hle/service/service.h" 56#include "core/hle/service/service.h"
56#include "core/hle/service/set/settings.h" 57#include "core/hle/service/set/settings.h"
57#include "core/hle/service/sm/controller.h" 58#include "core/hle/service/sm/controller.h"
@@ -238,6 +239,7 @@ void Init(std::shared_ptr<SM::ServiceManager>& sm) {
238 PCV::InstallInterfaces(*sm); 239 PCV::InstallInterfaces(*sm);
239 PlayReport::InstallInterfaces(*sm); 240 PlayReport::InstallInterfaces(*sm);
240 PM::InstallInterfaces(*sm); 241 PM::InstallInterfaces(*sm);
242 PSC::InstallInterfaces(*sm);
241 Set::InstallInterfaces(*sm); 243 Set::InstallInterfaces(*sm);
242 Sockets::InstallInterfaces(*sm); 244 Sockets::InstallInterfaces(*sm);
243 SPL::InstallInterfaces(*sm); 245 SPL::InstallInterfaces(*sm);