summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/CMakeLists.txt2
-rw-r--r--src/core/hle/service/audio/audren_u.cpp15
-rw-r--r--src/core/hle/service/nfp/nfp.cpp21
-rw-r--r--src/core/hle/service/nfp/nfp.h2
-rw-r--r--src/core/hle/service/nfp/nfp_user.cpp2
-rw-r--r--src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp1
-rw-r--r--src/core/hle/service/prepo/prepo.cpp40
-rw-r--r--src/core/hle/service/prepo/prepo.h23
-rw-r--r--src/core/hle/service/service.cpp2
-rw-r--r--src/core/hle/service/ssl/ssl.cpp11
-rw-r--r--src/core/hle/service/ssl/ssl.h1
11 files changed, 109 insertions, 11 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index c1a645460..c2a6f56cd 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -187,6 +187,8 @@ add_library(core STATIC
187 hle/service/pctl/pctl.h 187 hle/service/pctl/pctl.h
188 hle/service/pctl/pctl_a.cpp 188 hle/service/pctl/pctl_a.cpp
189 hle/service/pctl/pctl_a.h 189 hle/service/pctl/pctl_a.h
190 hle/service/prepo/prepo.cpp
191 hle/service/prepo/prepo.h
190 hle/service/service.cpp 192 hle/service/service.cpp
191 hle/service/service.h 193 hle/service/service.h
192 hle/service/set/set.cpp 194 hle/service/set/set.cpp
diff --git a/src/core/hle/service/audio/audren_u.cpp b/src/core/hle/service/audio/audren_u.cpp
index d9245cb19..fe445552a 100644
--- a/src/core/hle/service/audio/audren_u.cpp
+++ b/src/core/hle/service/audio/audren_u.cpp
@@ -162,12 +162,15 @@ public:
162 {0x3, &IAudioDevice::GetActiveAudioDeviceName, "GetActiveAudioDeviceName"}, 162 {0x3, &IAudioDevice::GetActiveAudioDeviceName, "GetActiveAudioDeviceName"},
163 {0x4, &IAudioDevice::QueryAudioDeviceSystemEvent, "QueryAudioDeviceSystemEvent"}, 163 {0x4, &IAudioDevice::QueryAudioDeviceSystemEvent, "QueryAudioDeviceSystemEvent"},
164 {0x5, &IAudioDevice::GetActiveChannelCount, "GetActiveChannelCount"}, 164 {0x5, &IAudioDevice::GetActiveChannelCount, "GetActiveChannelCount"},
165 {0x6, nullptr, "ListAudioDeviceNameAuto"}, 165 {0x6, &IAudioDevice::ListAudioDeviceName,
166 {0x7, nullptr, "SetAudioDeviceOutputVolumeAuto"}, 166 "ListAudioDeviceNameAuto"}, // Are these any different?
167 {0x7, &IAudioDevice::SetAudioDeviceOutputVolume,
168 "SetAudioDeviceOutputVolumeAuto"}, // Are these any different?
167 {0x8, nullptr, "GetAudioDeviceOutputVolumeAuto"}, 169 {0x8, nullptr, "GetAudioDeviceOutputVolumeAuto"},
168 {0x10, nullptr, "GetActiveAudioDeviceNameAuto"}, 170 {0xa, &IAudioDevice::GetActiveAudioDeviceName,
169 {0x11, nullptr, "QueryAudioDeviceInputEvent"}, 171 "GetActiveAudioDeviceNameAuto"}, // Are these any different?
170 {0x12, nullptr, "QueryAudioDeviceOutputEvent"}}; 172 {0xb, nullptr, "QueryAudioDeviceInputEvent"},
173 {0xc, nullptr, "QueryAudioDeviceOutputEvent"}};
171 RegisterHandlers(functions); 174 RegisterHandlers(functions);
172 175
173 buffer_event = 176 buffer_event =
@@ -257,7 +260,7 @@ void AudRenU::GetAudioRendererWorkBufferSize(Kernel::HLERequestContext& ctx) {
257 IPC::ResponseBuilder rb{ctx, 4}; 260 IPC::ResponseBuilder rb{ctx, 4};
258 261
259 rb.Push(RESULT_SUCCESS); 262 rb.Push(RESULT_SUCCESS);
260 rb.Push<u64>(0x400); 263 rb.Push<u64>(0x4000);
261 264
262 LOG_WARNING(Service_Audio, "(STUBBED) called"); 265 LOG_WARNING(Service_Audio, "(STUBBED) called");
263} 266}
diff --git a/src/core/hle/service/nfp/nfp.cpp b/src/core/hle/service/nfp/nfp.cpp
index 91e5f527a..2f21d8f56 100644
--- a/src/core/hle/service/nfp/nfp.cpp
+++ b/src/core/hle/service/nfp/nfp.cpp
@@ -12,10 +12,27 @@ namespace Service::NFP {
12Module::Interface::Interface(std::shared_ptr<Module> module, const char* name) 12Module::Interface::Interface(std::shared_ptr<Module> module, const char* name)
13 : ServiceFramework(name), module(std::move(module)) {} 13 : ServiceFramework(name), module(std::move(module)) {}
14 14
15void Module::Interface::Unknown(Kernel::HLERequestContext& ctx) { 15class IUser final : public ServiceFramework<IUser> {
16public:
17 IUser() : ServiceFramework("IUser") {
18 static const FunctionInfo functions[] = {
19 {0, &IUser::Initialize, "Initialize"},
20 };
21 RegisterHandlers(functions);
22 }
23
24private:
25 void Initialize(Kernel::HLERequestContext& ctx) {
26 IPC::ResponseBuilder rb{ctx, 2};
27 rb.Push(RESULT_SUCCESS);
28 }
29};
30
31void Module::Interface::GetIUserInterface(Kernel::HLERequestContext& ctx) {
16 LOG_WARNING(Service_NFP, "(STUBBED) called"); 32 LOG_WARNING(Service_NFP, "(STUBBED) called");
17 IPC::ResponseBuilder rb{ctx, 2}; 33 IPC::ResponseBuilder rb{ctx, 2, 0, 1};
18 rb.Push(RESULT_SUCCESS); 34 rb.Push(RESULT_SUCCESS);
35 rb.PushIpcInterface<IUser>();
19} 36}
20 37
21void InstallInterfaces(SM::ServiceManager& service_manager) { 38void InstallInterfaces(SM::ServiceManager& service_manager) {
diff --git a/src/core/hle/service/nfp/nfp.h b/src/core/hle/service/nfp/nfp.h
index 095209ad8..c0688f232 100644
--- a/src/core/hle/service/nfp/nfp.h
+++ b/src/core/hle/service/nfp/nfp.h
@@ -14,7 +14,7 @@ public:
14 public: 14 public:
15 Interface(std::shared_ptr<Module> module, const char* name); 15 Interface(std::shared_ptr<Module> module, const char* name);
16 16
17 void Unknown(Kernel::HLERequestContext& ctx); 17 void GetIUserInterface(Kernel::HLERequestContext& ctx);
18 18
19 protected: 19 protected:
20 std::shared_ptr<Module> module; 20 std::shared_ptr<Module> module;
diff --git a/src/core/hle/service/nfp/nfp_user.cpp b/src/core/hle/service/nfp/nfp_user.cpp
index e94c271e7..678f7a927 100644
--- a/src/core/hle/service/nfp/nfp_user.cpp
+++ b/src/core/hle/service/nfp/nfp_user.cpp
@@ -9,7 +9,7 @@ namespace Service::NFP {
9NFP_User::NFP_User(std::shared_ptr<Module> module) 9NFP_User::NFP_User(std::shared_ptr<Module> module)
10 : Module::Interface(std::move(module), "nfp:user") { 10 : Module::Interface(std::move(module), "nfp:user") {
11 static const FunctionInfo functions[] = { 11 static const FunctionInfo functions[] = {
12 {0, &NFP_User::Unknown, "Unknown"}, 12 {0, &NFP_User::GetIUserInterface, "GetIUserInterface"},
13 }; 13 };
14 RegisterHandlers(functions); 14 RegisterHandlers(functions);
15} 15}
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp
index 18ea12ef5..44ae9c08a 100644
--- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp
+++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp
@@ -79,6 +79,7 @@ u32 nvhost_ctrl_gpu::GetTPCMasks(const std::vector<u8>& input, std::vector<u8>&
79 std::memcpy(&params, input.data(), input.size()); 79 std::memcpy(&params, input.data(), input.size());
80 LOG_WARNING(Service_NVDRV, "(STUBBED) called, mask=0x%x, mask_buf_addr=0x%" PRIx64, 80 LOG_WARNING(Service_NVDRV, "(STUBBED) called, mask=0x%x, mask_buf_addr=0x%" PRIx64,
81 params.mask_buf_size, params.mask_buf_addr); 81 params.mask_buf_size, params.mask_buf_addr);
82 params.unk = 0xcafe; // Needs to be non 0, what does this actually do?
82 std::memcpy(output.data(), &params, sizeof(params)); 83 std::memcpy(output.data(), &params, sizeof(params));
83 return 0; 84 return 0;
84} 85}
diff --git a/src/core/hle/service/prepo/prepo.cpp b/src/core/hle/service/prepo/prepo.cpp
new file mode 100644
index 000000000..b9a7e1ff0
--- /dev/null
+++ b/src/core/hle/service/prepo/prepo.cpp
@@ -0,0 +1,40 @@
1#include <cinttypes>
2#include "common/logging/log.h"
3#include "core/hle/ipc_helpers.h"
4#include "core/hle/kernel/event.h"
5#include "core/hle/service/prepo/prepo.h"
6
7namespace Service::Playreport {
8Playreport::Playreport(const char* name) : ServiceFramework(name) {
9 static const FunctionInfo functions[] = {
10 {10101, &Playreport::SaveReportWithUser, "SaveReportWithUser"},
11 };
12 RegisterHandlers(functions);
13};
14
15void Playreport::SaveReportWithUser(Kernel::HLERequestContext& ctx) {
16 /*IPC::RequestParser rp{ctx};
17 auto Uid = rp.PopRaw<std::array<u64, 2>>();
18 u64 unk = rp.Pop<u64>();
19 std::vector<u8> buffer;
20 buffer.reserve(ctx.BufferDescriptorX()[0].Size());
21 Memory::ReadBlock(ctx.BufferDescriptorX()[0].Address(), buffer.data(), buffer.size());
22
23 std::vector<u8> buffer2;
24 buffer.reserve(ctx.BufferDescriptorA()[0].Size());
25 Memory::ReadBlock(ctx.BufferDescriptorA()[0].Address(), buffer.data(), buffer.size());*/
26
27 // If we ever want to add play reports
28
29 IPC::ResponseBuilder rb{ctx, 2};
30 rb.Push(RESULT_SUCCESS);
31};
32
33void InstallInterfaces(SM::ServiceManager& service_manager) {
34 std::make_shared<Playreport>("prepo:a")->InstallAsService(service_manager);
35 std::make_shared<Playreport>("prepo:m")->InstallAsService(service_manager);
36 std::make_shared<Playreport>("prepo:s")->InstallAsService(service_manager);
37 std::make_shared<Playreport>("prepo:u")->InstallAsService(service_manager);
38}
39
40} // namespace Service::Playreport
diff --git a/src/core/hle/service/prepo/prepo.h b/src/core/hle/service/prepo/prepo.h
new file mode 100644
index 000000000..77457b7bd
--- /dev/null
+++ b/src/core/hle/service/prepo/prepo.h
@@ -0,0 +1,23 @@
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#include <string>
7#include "core/hle/kernel/event.h"
8#include "core/hle/service/service.h"
9
10namespace Service::Playreport {
11
12class Playreport final : public ServiceFramework<Playreport> {
13public:
14 Playreport(const char* name);
15 ~Playreport() = default;
16
17private:
18 void SaveReportWithUser(Kernel::HLERequestContext& ctx);
19};
20
21void InstallInterfaces(SM::ServiceManager& service_manager);
22
23}; // namespace Service::Playreport
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp
index 08ce29677..1e759b21e 100644
--- a/src/core/hle/service/service.cpp
+++ b/src/core/hle/service/service.cpp
@@ -30,6 +30,7 @@
30#include "core/hle/service/ns/ns.h" 30#include "core/hle/service/ns/ns.h"
31#include "core/hle/service/nvdrv/nvdrv.h" 31#include "core/hle/service/nvdrv/nvdrv.h"
32#include "core/hle/service/pctl/pctl.h" 32#include "core/hle/service/pctl/pctl.h"
33#include "core/hle/service/prepo/prepo.h"
33#include "core/hle/service/service.h" 34#include "core/hle/service/service.h"
34#include "core/hle/service/set/settings.h" 35#include "core/hle/service/set/settings.h"
35#include "core/hle/service/sm/controller.h" 36#include "core/hle/service/sm/controller.h"
@@ -192,6 +193,7 @@ void Init(std::shared_ptr<SM::ServiceManager>& sm) {
192 NS::InstallInterfaces(*sm); 193 NS::InstallInterfaces(*sm);
193 Nvidia::InstallInterfaces(*sm); 194 Nvidia::InstallInterfaces(*sm);
194 PCTL::InstallInterfaces(*sm); 195 PCTL::InstallInterfaces(*sm);
196 Playreport::InstallInterfaces(*sm);
195 Sockets::InstallInterfaces(*sm); 197 Sockets::InstallInterfaces(*sm);
196 SPL::InstallInterfaces(*sm); 198 SPL::InstallInterfaces(*sm);
197 SSL::InstallInterfaces(*sm); 199 SSL::InstallInterfaces(*sm);
diff --git a/src/core/hle/service/ssl/ssl.cpp b/src/core/hle/service/ssl/ssl.cpp
index 11d438728..7e21fec8e 100644
--- a/src/core/hle/service/ssl/ssl.cpp
+++ b/src/core/hle/service/ssl/ssl.cpp
@@ -96,12 +96,21 @@ SSL::SSL() : ServiceFramework("ssl") {
96 {2, nullptr, "GetCertificates"}, 96 {2, nullptr, "GetCertificates"},
97 {3, nullptr, "GetCertificateBufSize"}, 97 {3, nullptr, "GetCertificateBufSize"},
98 {4, nullptr, "DebugIoctl"}, 98 {4, nullptr, "DebugIoctl"},
99 {5, nullptr, "SetInterfaceVersion"}, 99 {5, &SSL::SetInterfaceVersion, "SetInterfaceVersion"},
100 {6, nullptr, "FlushSessionCache"}, 100 {6, nullptr, "FlushSessionCache"},
101 }; 101 };
102 RegisterHandlers(functions); 102 RegisterHandlers(functions);
103} 103}
104 104
105void SSL::SetInterfaceVersion(Kernel::HLERequestContext& ctx) {
106 IPC::RequestParser rp{ctx};
107 u32 unk1 = rp.Pop<u32>(); // Probably minor/major?
108 u32 unk2 = rp.Pop<u32>();
109
110 IPC::ResponseBuilder rb{ctx, 2};
111 rb.Push(RESULT_SUCCESS);
112}
113
105void InstallInterfaces(SM::ServiceManager& service_manager) { 114void InstallInterfaces(SM::ServiceManager& service_manager) {
106 std::make_shared<SSL>()->InstallAsService(service_manager); 115 std::make_shared<SSL>()->InstallAsService(service_manager);
107} 116}
diff --git a/src/core/hle/service/ssl/ssl.h b/src/core/hle/service/ssl/ssl.h
index 87538a639..8fef13022 100644
--- a/src/core/hle/service/ssl/ssl.h
+++ b/src/core/hle/service/ssl/ssl.h
@@ -15,6 +15,7 @@ public:
15 15
16private: 16private:
17 void CreateContext(Kernel::HLERequestContext& ctx); 17 void CreateContext(Kernel::HLERequestContext& ctx);
18 void SetInterfaceVersion(Kernel::HLERequestContext& ctx);
18}; 19};
19 20
20/// Registers all SSL services with the specified service manager. 21/// Registers all SSL services with the specified service manager.