diff options
| -rw-r--r-- | src/core/CMakeLists.txt | 6 | ||||
| -rw-r--r-- | src/core/hle/service/am/am.cpp | 18 | ||||
| -rw-r--r-- | src/core/hle/service/am/am.h | 16 | ||||
| -rw-r--r-- | src/core/hle/service/am/applet_oe.cpp | 22 | ||||
| -rw-r--r-- | src/core/hle/service/am/applet_oe.h | 19 | ||||
| -rw-r--r-- | src/core/hle/service/apm/apm.cpp | 27 | ||||
| -rw-r--r-- | src/core/hle/service/apm/apm.h | 22 | ||||
| -rw-r--r-- | src/core/hle/service/lm/lm.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/service/service.cpp | 4 | ||||
| -rw-r--r-- | src/core/hle/service/sm/sm.cpp | 2 |
10 files changed, 136 insertions, 2 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 40083607e..4e9570424 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt | |||
| @@ -48,6 +48,9 @@ set(SRCS | |||
| 48 | hle/kernel/wait_object.cpp | 48 | hle/kernel/wait_object.cpp |
| 49 | hle/lock.cpp | 49 | hle/lock.cpp |
| 50 | hle/romfs.cpp | 50 | hle/romfs.cpp |
| 51 | hle/service/am/am.cpp | ||
| 52 | hle/service/am/applet_oe.cpp | ||
| 53 | hle/service/apm/apm.cpp | ||
| 51 | hle/service/dsp_dsp.cpp | 54 | hle/service/dsp_dsp.cpp |
| 52 | hle/service/gsp_gpu.cpp | 55 | hle/service/gsp_gpu.cpp |
| 53 | hle/service/hid/hid.cpp | 56 | hle/service/hid/hid.cpp |
| @@ -137,6 +140,9 @@ set(HEADERS | |||
| 137 | hle/lock.h | 140 | hle/lock.h |
| 138 | hle/result.h | 141 | hle/result.h |
| 139 | hle/romfs.h | 142 | hle/romfs.h |
| 143 | hle/service/am/am.h | ||
| 144 | hle/service/am/applet_oe.h | ||
| 145 | hle/service/apm/apm.h | ||
| 140 | hle/service/dsp_dsp.h | 146 | hle/service/dsp_dsp.h |
| 141 | hle/service/gsp_gpu.h | 147 | hle/service/gsp_gpu.h |
| 142 | hle/service/hid/hid.h | 148 | hle/service/hid/hid.h |
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp new file mode 100644 index 000000000..482aa07ef --- /dev/null +++ b/src/core/hle/service/am/am.cpp | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | // Copyright 2017 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include "common/logging/log.h" | ||
| 6 | #include "core/hle/ipc_helpers.h" | ||
| 7 | #include "core/hle/service/am/am.h" | ||
| 8 | #include "core/hle/service/am/applet_oe.h" | ||
| 9 | |||
| 10 | namespace Service { | ||
| 11 | namespace AM { | ||
| 12 | |||
| 13 | void InstallInterfaces(SM::ServiceManager& service_manager) { | ||
| 14 | std::make_shared<AppletOE>()->InstallAsService(service_manager); | ||
| 15 | } | ||
| 16 | |||
| 17 | } // namespace AM | ||
| 18 | } // namespace Service | ||
diff --git a/src/core/hle/service/am/am.h b/src/core/hle/service/am/am.h new file mode 100644 index 000000000..0aab51bba --- /dev/null +++ b/src/core/hle/service/am/am.h | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | // Copyright 2017 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | #include "core/hle/service/service.h" | ||
| 8 | |||
| 9 | namespace Service { | ||
| 10 | namespace AM { | ||
| 11 | |||
| 12 | /// Registers all AM services with the specified service manager. | ||
| 13 | void InstallInterfaces(SM::ServiceManager& service_manager); | ||
| 14 | |||
| 15 | } // namespace AM | ||
| 16 | } // namespace Service | ||
diff --git a/src/core/hle/service/am/applet_oe.cpp b/src/core/hle/service/am/applet_oe.cpp new file mode 100644 index 000000000..a5d80f5c7 --- /dev/null +++ b/src/core/hle/service/am/applet_oe.cpp | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | // Copyright 2017 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include "common/logging/log.h" | ||
| 6 | #include "core/hle/ipc_helpers.h" | ||
| 7 | #include "core/hle/service/am/applet_oe.h" | ||
| 8 | |||
| 9 | namespace Service { | ||
| 10 | namespace AM { | ||
| 11 | |||
| 12 | AppletOE::AppletOE() : ServiceFramework("appletOE") { | ||
| 13 | static const FunctionInfo functions[] = { | ||
| 14 | {0x00000000, nullptr, "OpenApplicationProxy"}, | ||
| 15 | }; | ||
| 16 | RegisterHandlers(functions); | ||
| 17 | } | ||
| 18 | |||
| 19 | AppletOE::~AppletOE() = default; | ||
| 20 | |||
| 21 | } // namespace AM | ||
| 22 | } // namespace Service | ||
diff --git a/src/core/hle/service/am/applet_oe.h b/src/core/hle/service/am/applet_oe.h new file mode 100644 index 000000000..1385428b1 --- /dev/null +++ b/src/core/hle/service/am/applet_oe.h | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | // Copyright 2017 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | #include "core/hle/service/service.h" | ||
| 8 | |||
| 9 | namespace Service { | ||
| 10 | namespace AM { | ||
| 11 | |||
| 12 | class AppletOE final : public ServiceFramework<AppletOE> { | ||
| 13 | public: | ||
| 14 | explicit AppletOE(); | ||
| 15 | ~AppletOE(); | ||
| 16 | }; | ||
| 17 | |||
| 18 | } // namespace AM | ||
| 19 | } // namespace Service | ||
diff --git a/src/core/hle/service/apm/apm.cpp b/src/core/hle/service/apm/apm.cpp new file mode 100644 index 000000000..37b5bd647 --- /dev/null +++ b/src/core/hle/service/apm/apm.cpp | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | // Copyright 2017 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include "common/logging/log.h" | ||
| 6 | #include "core/hle/ipc_helpers.h" | ||
| 7 | #include "core/hle/service/apm/apm.h" | ||
| 8 | |||
| 9 | namespace Service { | ||
| 10 | namespace APM { | ||
| 11 | |||
| 12 | void InstallInterfaces(SM::ServiceManager& service_manager) { | ||
| 13 | std::make_shared<APM>()->InstallAsService(service_manager); | ||
| 14 | } | ||
| 15 | |||
| 16 | APM::APM() : ServiceFramework("apm") { | ||
| 17 | static const FunctionInfo functions[] = { | ||
| 18 | {0x00000000, nullptr, "OpenSession"}, | ||
| 19 | {0x00000001, nullptr, "GetPerformanceMode"}, | ||
| 20 | }; | ||
| 21 | RegisterHandlers(functions); | ||
| 22 | } | ||
| 23 | |||
| 24 | APM::~APM() = default; | ||
| 25 | |||
| 26 | } // namespace APM | ||
| 27 | } // namespace Service | ||
diff --git a/src/core/hle/service/apm/apm.h b/src/core/hle/service/apm/apm.h new file mode 100644 index 000000000..ce6ac0f66 --- /dev/null +++ b/src/core/hle/service/apm/apm.h | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | // Copyright 2017 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | #include "core/hle/service/service.h" | ||
| 8 | |||
| 9 | namespace Service { | ||
| 10 | namespace APM { | ||
| 11 | |||
| 12 | class APM final : public ServiceFramework<APM> { | ||
| 13 | public: | ||
| 14 | explicit APM(); | ||
| 15 | ~APM(); | ||
| 16 | }; | ||
| 17 | |||
| 18 | /// Registers all AM services with the specified service manager. | ||
| 19 | void InstallInterfaces(SM::ServiceManager& service_manager); | ||
| 20 | |||
| 21 | } // namespace APM | ||
| 22 | } // namespace Service | ||
diff --git a/src/core/hle/service/lm/lm.cpp b/src/core/hle/service/lm/lm.cpp index 7296b531b..3c5fa7de3 100644 --- a/src/core/hle/service/lm/lm.cpp +++ b/src/core/hle/service/lm/lm.cpp | |||
| @@ -14,7 +14,7 @@ void InstallInterfaces(SM::ServiceManager& service_manager) { | |||
| 14 | } | 14 | } |
| 15 | 15 | ||
| 16 | /** | 16 | /** |
| 17 | * SRV::Initialize service function | 17 | * LM::Initialize service function |
| 18 | * Inputs: | 18 | * Inputs: |
| 19 | * 0: 0x00000000 | 19 | * 0: 0x00000000 |
| 20 | * Outputs: | 20 | * Outputs: |
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp index 3141b71f5..153277681 100644 --- a/src/core/hle/service/service.cpp +++ b/src/core/hle/service/service.cpp | |||
| @@ -15,6 +15,8 @@ | |||
| 15 | #include "core/hle/kernel/server_session.h" | 15 | #include "core/hle/kernel/server_session.h" |
| 16 | #include "core/hle/kernel/thread.h" | 16 | #include "core/hle/kernel/thread.h" |
| 17 | #include "core/hle/kernel/handle_table.h" | 17 | #include "core/hle/kernel/handle_table.h" |
| 18 | #include "core/hle/service/am/am.h" | ||
| 19 | #include "core/hle/service/apm/apm.h" | ||
| 18 | #include "core/hle/service/dsp_dsp.h" | 20 | #include "core/hle/service/dsp_dsp.h" |
| 19 | #include "core/hle/service/gsp_gpu.h" | 21 | #include "core/hle/service/gsp_gpu.h" |
| 20 | #include "core/hle/service/hid/hid.h" | 22 | #include "core/hle/service/hid/hid.h" |
| @@ -157,6 +159,8 @@ void Init() { | |||
| 157 | SM::g_service_manager = std::make_shared<SM::ServiceManager>(); | 159 | SM::g_service_manager = std::make_shared<SM::ServiceManager>(); |
| 158 | SM::ServiceManager::InstallInterfaces(SM::g_service_manager); | 160 | SM::ServiceManager::InstallInterfaces(SM::g_service_manager); |
| 159 | 161 | ||
| 162 | AM::InstallInterfaces(*SM::g_service_manager); | ||
| 163 | APM::InstallInterfaces(*SM::g_service_manager); | ||
| 160 | LM::InstallInterfaces(*SM::g_service_manager); | 164 | LM::InstallInterfaces(*SM::g_service_manager); |
| 161 | 165 | ||
| 162 | HID::Init(); | 166 | HID::Init(); |
diff --git a/src/core/hle/service/sm/sm.cpp b/src/core/hle/service/sm/sm.cpp index 2068471f2..b027651d0 100644 --- a/src/core/hle/service/sm/sm.cpp +++ b/src/core/hle/service/sm/sm.cpp | |||
| @@ -103,7 +103,7 @@ void SM::GetService(Kernel::HLERequestContext& ctx) { | |||
| 103 | IPC::RequestParser rp{ctx}; | 103 | IPC::RequestParser rp{ctx}; |
| 104 | u32 unk1 = rp.Pop<u32>(); | 104 | u32 unk1 = rp.Pop<u32>(); |
| 105 | u32 unk2 = rp.Pop<u32>(); | 105 | u32 unk2 = rp.Pop<u32>(); |
| 106 | auto name_buf = rp.PopRaw<std::array<char, 6>>(); | 106 | auto name_buf = rp.PopRaw<std::array<char, 9>>(); |
| 107 | std::string name(name_buf.data()); | 107 | std::string name(name_buf.data()); |
| 108 | 108 | ||
| 109 | // TODO(yuriks): Permission checks go here | 109 | // TODO(yuriks): Permission checks go here |