summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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/audio/audren_u.cpp13
-rw-r--r--src/core/hle/service/nfp/nfp.cpp48
-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.cpp43
-rw-r--r--src/core/hle/service/prepo/prepo.h23
-rw-r--r--src/core/hle/service/service.cpp4
-rw-r--r--src/core/hle/service/ssl/ssl.cpp12
-rw-r--r--src/core/hle/service/ssl/ssl.h1
13 files changed, 140 insertions, 13 deletions
diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp
index 26cd75a3e..618be0864 100644
--- a/src/common/logging/backend.cpp
+++ b/src/common/logging/backend.cpp
@@ -48,6 +48,7 @@ namespace Log {
SUB(Service, NS) \
SUB(Service, NVDRV) \
SUB(Service, PCTL) \
+ SUB(Service, PREPO) \
SUB(Service, SET) \
SUB(Service, SM) \
SUB(Service, SPL) \
diff --git a/src/common/logging/log.h b/src/common/logging/log.h
index 45821850c..1b29ce6e0 100644
--- a/src/common/logging/log.h
+++ b/src/common/logging/log.h
@@ -65,6 +65,7 @@ enum class Class : ClassType {
Service_NS, ///< The NS services
Service_NVDRV, ///< The NVDRV (Nvidia driver) service
Service_PCTL, ///< The PCTL (Parental control) service
+ Service_PREPO, ///< The PREPO (Play report) service
Service_SET, ///< The SET (Settings) service
Service_SM, ///< The SM (Service manager) service
Service_SPL, ///< The SPL service
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index f4be926e4..45dbd6796 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -185,6 +185,8 @@ add_library(core STATIC
hle/service/pctl/module.h
hle/service/pctl/pctl.cpp
hle/service/pctl/pctl.h
+ hle/service/prepo/prepo.cpp
+ hle/service/prepo/prepo.h
hle/service/service.cpp
hle/service/service.h
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 72810b436..291885db8 100644
--- a/src/core/hle/service/audio/audren_u.cpp
+++ b/src/core/hle/service/audio/audren_u.cpp
@@ -162,12 +162,13 @@ public:
{0x3, &IAudioDevice::GetActiveAudioDeviceName, "GetActiveAudioDeviceName"},
{0x4, &IAudioDevice::QueryAudioDeviceSystemEvent, "QueryAudioDeviceSystemEvent"},
{0x5, &IAudioDevice::GetActiveChannelCount, "GetActiveChannelCount"},
- {0x6, nullptr, "ListAudioDeviceNameAuto"},
- {0x7, nullptr, "SetAudioDeviceOutputVolumeAuto"},
+ {0x6, &IAudioDevice::ListAudioDeviceName,
+ "ListAudioDeviceNameAuto"}, // TODO(ogniK): Confirm if autos are identical to non auto
+ {0x7, &IAudioDevice::SetAudioDeviceOutputVolume, "SetAudioDeviceOutputVolumeAuto"},
{0x8, nullptr, "GetAudioDeviceOutputVolumeAuto"},
- {0x10, nullptr, "GetActiveAudioDeviceNameAuto"},
- {0x11, nullptr, "QueryAudioDeviceInputEvent"},
- {0x12, nullptr, "QueryAudioDeviceOutputEvent"}};
+ {0xa, &IAudioDevice::GetActiveAudioDeviceName, "GetActiveAudioDeviceNameAuto"},
+ {0xb, nullptr, "QueryAudioDeviceInputEvent"},
+ {0xc, nullptr, "QueryAudioDeviceOutputEvent"}};
RegisterHandlers(functions);
buffer_event =
@@ -257,7 +258,7 @@ void AudRenU::GetAudioRendererWorkBufferSize(Kernel::HLERequestContext& ctx) {
IPC::ResponseBuilder rb{ctx, 4};
rb.Push(RESULT_SUCCESS);
- rb.Push<u64>(0x400);
+ rb.Push<u64>(0x4000);
NGLOG_WARNING(Service_Audio, "(STUBBED) called");
}
diff --git a/src/core/hle/service/nfp/nfp.cpp b/src/core/hle/service/nfp/nfp.cpp
index 6627aaddc..cc0247881 100644
--- a/src/core/hle/service/nfp/nfp.cpp
+++ b/src/core/hle/service/nfp/nfp.cpp
@@ -12,10 +12,52 @@ namespace Service::NFP {
Module::Interface::Interface(std::shared_ptr<Module> module, const char* name)
: ServiceFramework(name), module(std::move(module)) {}
-void Module::Interface::Unknown(Kernel::HLERequestContext& ctx) {
- NGLOG_WARNING(Service_NFP, "(STUBBED) called");
- IPC::ResponseBuilder rb{ctx, 2};
+class IUser final : public ServiceFramework<IUser> {
+public:
+ IUser() : ServiceFramework("IUser") {
+ static const FunctionInfo functions[] = {
+ {0, &IUser::Initialize, "Initialize"},
+ {1, nullptr, "Unknown1"},
+ {2, nullptr, "Unknown2"},
+ {3, nullptr, "Unknown3"},
+ {4, nullptr, "Unknown4"},
+ {5, nullptr, "Unknown5"},
+ {6, nullptr, "Unknown6"},
+ {7, nullptr, "Unknown7"},
+ {8, nullptr, "Unknown8"},
+ {9, nullptr, "Unknown9"},
+ {10, nullptr, "Unknown10"},
+ {11, nullptr, "Unknown11"},
+ {12, nullptr, "Unknown12"},
+ {13, nullptr, "Unknown13"},
+ {14, nullptr, "Unknown14"},
+ {15, nullptr, "Unknown15"},
+ {16, nullptr, "Unknown16"},
+ {17, nullptr, "Unknown17"},
+ {18, nullptr, "Unknown18"},
+ {19, nullptr, "Unknown19"},
+ {20, nullptr, "Unknown20"},
+ {21, nullptr, "Unknown21"},
+ {22, nullptr, "Unknown22"},
+ {23, nullptr, "Unknown23"},
+ {24, nullptr, "Unknown24"},
+ };
+ RegisterHandlers(functions);
+ }
+
+private:
+ void Initialize(Kernel::HLERequestContext& ctx) {
+ NGLOG_WARNING(Service_NFP, "(STUBBED) called");
+ IPC::ResponseBuilder rb{ctx, 2};
+ rb.Push(RESULT_SUCCESS);
+ }
+};
+
+void Module::Interface::CreateUserInterface(Kernel::HLERequestContext& ctx) {
+ NGLOG_DEBUG(Service_NFP, "called");
+ IPC::ResponseBuilder rb{ctx, 2, 0, 1};
rb.Push(RESULT_SUCCESS);
+ rb.PushIpcInterface<IUser>();
}
void 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..262a666cb 100644
--- a/src/core/hle/service/nfp/nfp.h
+++ b/src/core/hle/service/nfp/nfp.h
@@ -14,7 +14,7 @@ public:
public:
Interface(std::shared_ptr<Module> module, const char* name);
- void Unknown(Kernel::HLERequestContext& ctx);
+ void CreateUserInterface(Kernel::HLERequestContext& ctx);
protected:
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..b608fe693 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 {
NFP_User::NFP_User(std::shared_ptr<Module> module)
: Module::Interface(std::move(module), "nfp:user") {
static const FunctionInfo functions[] = {
- {0, &NFP_User::Unknown, "Unknown"},
+ {0, &NFP_User::CreateUserInterface, "CreateUserInterface"},
};
RegisterHandlers(functions);
}
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 1e457ae6e..3c78ecaea 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>&
std::memcpy(&params, input.data(), input.size());
NGLOG_WARNING(Service_NVDRV, "(STUBBED) called, mask={:#X}, mask_buf_addr={:#X}",
params.mask_buf_size, params.mask_buf_addr);
+ params.unk = 0xcafe; // TODO(ogniK): Needs to be non 0, what does this actually do?
std::memcpy(output.data(), &params, sizeof(params));
return 0;
}
diff --git a/src/core/hle/service/prepo/prepo.cpp b/src/core/hle/service/prepo/prepo.cpp
new file mode 100644
index 000000000..eaf30ee6b
--- /dev/null
+++ b/src/core/hle/service/prepo/prepo.cpp
@@ -0,0 +1,43 @@
+#include <cinttypes>
+#include "common/logging/log.h"
+#include "core/hle/ipc_helpers.h"
+#include "core/hle/kernel/event.h"
+#include "core/hle/service/prepo/prepo.h"
+
+namespace Service::PlayReport {
+PlayReport::PlayReport(const char* name) : ServiceFramework(name) {
+ static const FunctionInfo functions[] = {
+ {10100, nullptr, "SaveReport"},
+ {10101, &PlayReport::SaveReportWithUser, "SaveReportWithUser"},
+ {10200, nullptr, "RequestImmediateTransmission"},
+ {10300, nullptr, "GetTransmissionStatus"},
+ {20100, nullptr, "SaveSystemReport"},
+ {20200, nullptr, "SetOperationMode"},
+ {20101, nullptr, "SaveSystemReportWithUser"},
+ {30100, nullptr, "ClearStorage"},
+ {40100, nullptr, "IsUserAgreementCheckEnabled"},
+ {40101, nullptr, "SetUserAgreementCheckEnabled"},
+ {90100, nullptr, "GetStorageUsage"},
+ {90200, nullptr, "GetStatistics"},
+ {90201, nullptr, "GetThroughputHistory"},
+ {90300, nullptr, "GetLastUploadError"},
+ };
+ RegisterHandlers(functions);
+};
+
+void PlayReport::SaveReportWithUser(Kernel::HLERequestContext& ctx) {
+ // TODO(ogniK): Do we want to add play report?
+ NGLOG_WARNING(Service_PREPO, "(STUBBED) called");
+
+ IPC::ResponseBuilder rb{ctx, 2};
+ rb.Push(RESULT_SUCCESS);
+};
+
+void InstallInterfaces(SM::ServiceManager& service_manager) {
+ std::make_shared<PlayReport>("prepo:a")->InstallAsService(service_manager);
+ std::make_shared<PlayReport>("prepo:m")->InstallAsService(service_manager);
+ std::make_shared<PlayReport>("prepo:s")->InstallAsService(service_manager);
+ std::make_shared<PlayReport>("prepo:u")->InstallAsService(service_manager);
+}
+
+} // 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..3708e0dcb
--- /dev/null
+++ b/src/core/hle/service/prepo/prepo.h
@@ -0,0 +1,23 @@
+// Copyright 2018 yuzu emulator team
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#include <memory>
+#include <string>
+#include "core/hle/kernel/event.h"
+#include "core/hle/service/service.h"
+
+namespace Service::PlayReport {
+
+class PlayReport final : public ServiceFramework<PlayReport> {
+public:
+ explicit PlayReport(const char* name);
+ ~PlayReport() = default;
+
+private:
+ void SaveReportWithUser(Kernel::HLERequestContext& ctx);
+};
+
+void InstallInterfaces(SM::ServiceManager& service_manager);
+
+} // namespace Service::PlayReport
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp
index a85c406be..34d691b90 100644
--- a/src/core/hle/service/service.cpp
+++ b/src/core/hle/service/service.cpp
@@ -29,7 +29,8 @@
#include "core/hle/service/nifm/nifm.h"
#include "core/hle/service/ns/ns.h"
#include "core/hle/service/nvdrv/nvdrv.h"
-#include "core/hle/service/pctl/module.h"
+#include "core/hle/service/pctl/pctl.h"
+#include "core/hle/service/prepo/prepo.h"
#include "core/hle/service/service.h"
#include "core/hle/service/set/settings.h"
#include "core/hle/service/sm/controller.h"
@@ -192,6 +193,7 @@ void Init(std::shared_ptr<SM::ServiceManager>& sm) {
NS::InstallInterfaces(*sm);
Nvidia::InstallInterfaces(*sm);
PCTL::InstallInterfaces(*sm);
+ PlayReport::InstallInterfaces(*sm);
Sockets::InstallInterfaces(*sm);
SPL::InstallInterfaces(*sm);
SSL::InstallInterfaces(*sm);
diff --git a/src/core/hle/service/ssl/ssl.cpp b/src/core/hle/service/ssl/ssl.cpp
index c7788da5c..b3dad8b06 100644
--- a/src/core/hle/service/ssl/ssl.cpp
+++ b/src/core/hle/service/ssl/ssl.cpp
@@ -96,12 +96,22 @@ SSL::SSL() : ServiceFramework("ssl") {
{2, nullptr, "GetCertificates"},
{3, nullptr, "GetCertificateBufSize"},
{4, nullptr, "DebugIoctl"},
- {5, nullptr, "SetInterfaceVersion"},
+ {5, &SSL::SetInterfaceVersion, "SetInterfaceVersion"},
{6, nullptr, "FlushSessionCache"},
};
RegisterHandlers(functions);
}
+void SSL::SetInterfaceVersion(Kernel::HLERequestContext& ctx) {
+ NGLOG_WARNING(Service_SSL, "(STUBBED) called");
+ IPC::RequestParser rp{ctx};
+ u32 unk1 = rp.Pop<u32>(); // Probably minor/major?
+ u32 unk2 = rp.Pop<u32>(); // TODO(ogniK): Figure out what this does
+
+ IPC::ResponseBuilder rb{ctx, 2};
+ rb.Push(RESULT_SUCCESS);
+}
+
void InstallInterfaces(SM::ServiceManager& service_manager) {
std::make_shared<SSL>()->InstallAsService(service_manager);
}
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:
private:
void CreateContext(Kernel::HLERequestContext& ctx);
+ void SetInterfaceVersion(Kernel::HLERequestContext& ctx);
};
/// Registers all SSL services with the specified service manager.