From 3769a80faca76c7ed77540607fef03ef26b28501 Mon Sep 17 00:00:00 2001 From: mailwl Date: Tue, 10 Apr 2018 10:18:52 +0300 Subject: [PATCH 01/22] Service/ACC: convert to module, add acc:aa, acc:su, acc:u1 services --- src/core/CMakeLists.txt | 6 ++ src/core/hle/service/acc/acc.cpp | 130 +++++++++++++++++++++++++++- src/core/hle/service/acc/acc.h | 19 ++++ src/core/hle/service/acc/acc_aa.cpp | 22 +++++ src/core/hle/service/acc/acc_aa.h | 18 ++++ src/core/hle/service/acc/acc_su.cpp | 55 ++++++++++++ src/core/hle/service/acc/acc_su.h | 18 ++++ src/core/hle/service/acc/acc_u0.cpp | 113 +++--------------------- src/core/hle/service/acc/acc_u0.h | 28 +----- src/core/hle/service/acc/acc_u1.cpp | 42 +++++++++ src/core/hle/service/acc/acc_u1.h | 18 ++++ 11 files changed, 342 insertions(+), 127 deletions(-) create mode 100644 src/core/hle/service/acc/acc_aa.cpp create mode 100644 src/core/hle/service/acc/acc_aa.h create mode 100644 src/core/hle/service/acc/acc_su.cpp create mode 100644 src/core/hle/service/acc/acc_su.h create mode 100644 src/core/hle/service/acc/acc_u1.cpp create mode 100644 src/core/hle/service/acc/acc_u1.h diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 97d795d5f3..9877b83fe5 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -88,8 +88,14 @@ add_library(core STATIC hle/romfs.h hle/service/acc/acc.cpp hle/service/acc/acc.h + hle/service/acc/acc_aa.cpp + hle/service/acc/acc_aa.h + hle/service/acc/acc_su.cpp + hle/service/acc/acc_su.h hle/service/acc/acc_u0.cpp hle/service/acc/acc_u0.h + hle/service/acc/acc_u1.cpp + hle/service/acc/acc_u1.h hle/service/am/am.cpp hle/service/am/am.h hle/service/am/applet_ae.cpp diff --git a/src/core/hle/service/acc/acc.cpp b/src/core/hle/service/acc/acc.cpp index 5716577d6b..cfb6e05a5a 100644 --- a/src/core/hle/service/acc/acc.cpp +++ b/src/core/hle/service/acc/acc.cpp @@ -2,14 +2,142 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#include "common/logging/log.h" +#include "core/hle/ipc_helpers.h" #include "core/hle/service/acc/acc.h" +#include "core/hle/service/acc/acc_aa.h" +#include "core/hle/service/acc/acc_su.h" #include "core/hle/service/acc/acc_u0.h" +#include "core/hle/service/acc/acc_u1.h" namespace Service { namespace Account { +// TODO: RE this structure +struct UserData { + INSERT_PADDING_WORDS(1); + u32 icon_id; + u8 bg_color_id; + INSERT_PADDING_BYTES(0x7); + INSERT_PADDING_BYTES(0x10); + INSERT_PADDING_BYTES(0x60); +}; +static_assert(sizeof(UserData) == 0x80, "UserData structure has incorrect size"); + +struct ProfileBase { + u8 user_id[0x10]; + u64 timestamp; + u8 username[0x20]; +}; +static_assert(sizeof(ProfileBase) == 0x38, "ProfileBase structure has incorrect size"); + +using Uid = std::array; +static constexpr Uid DEFAULT_USER_ID{0x10ull, 0x20ull}; + +class IProfile final : public ServiceFramework { +public: + IProfile() : ServiceFramework("IProfile") { + static const FunctionInfo functions[] = { + {1, &IProfile::GetBase, "GetBase"}, + }; + RegisterHandlers(functions); + } + +private: + void GetBase(Kernel::HLERequestContext& ctx) { + LOG_WARNING(Service_ACC, "(STUBBED) called"); + ProfileBase profile_base{}; + IPC::ResponseBuilder rb{ctx, 16}; + rb.Push(RESULT_SUCCESS); + rb.PushRaw(profile_base); + } +}; + +class IManagerForApplication final : public ServiceFramework { +public: + IManagerForApplication() : ServiceFramework("IManagerForApplication") { + static const FunctionInfo functions[] = { + {0, &IManagerForApplication::CheckAvailability, "CheckAvailability"}, + {1, &IManagerForApplication::GetAccountId, "GetAccountId"}, + }; + RegisterHandlers(functions); + } + +private: + void CheckAvailability(Kernel::HLERequestContext& ctx) { + LOG_WARNING(Service_ACC, "(STUBBED) called"); + IPC::ResponseBuilder rb{ctx, 3}; + rb.Push(RESULT_SUCCESS); + rb.Push(true); // TODO: Check when this is supposed to return true and when not + } + + void GetAccountId(Kernel::HLERequestContext& ctx) { + LOG_WARNING(Service_ACC, "(STUBBED) called"); + IPC::ResponseBuilder rb{ctx, 4}; + rb.Push(RESULT_SUCCESS); + rb.Push(0x12345678ABCDEF); + } +}; + +void Module::Interface::GetUserExistence(Kernel::HLERequestContext& ctx) { + LOG_WARNING(Service_ACC, "(STUBBED) called"); + IPC::ResponseBuilder rb{ctx, 3}; + rb.Push(RESULT_SUCCESS); + rb.Push(true); // TODO: Check when this is supposed to return true and when not +} + +void Module::Interface::ListAllUsers(Kernel::HLERequestContext& ctx) { + LOG_WARNING(Service_ACC, "(STUBBED) called"); + constexpr std::array user_ids{DEFAULT_USER_ID}; + ctx.WriteBuffer(user_ids.data(), user_ids.size()); + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(RESULT_SUCCESS); +} + +void Module::Interface::ListOpenUsers(Kernel::HLERequestContext& ctx) { + LOG_WARNING(Service_ACC, "(STUBBED) called"); + constexpr std::array user_ids{DEFAULT_USER_ID}; + ctx.WriteBuffer(user_ids.data(), user_ids.size()); + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(RESULT_SUCCESS); +} + +void Module::Interface::GetProfile(Kernel::HLERequestContext& ctx) { + IPC::ResponseBuilder rb{ctx, 2, 0, 1}; + rb.Push(RESULT_SUCCESS); + rb.PushIpcInterface(); + LOG_DEBUG(Service_ACC, "called"); +} + +void Module::Interface::InitializeApplicationInfo(Kernel::HLERequestContext& ctx) { + LOG_WARNING(Service_ACC, "(STUBBED) called"); + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(RESULT_SUCCESS); +} + +void Module::Interface::GetBaasAccountManagerForApplication(Kernel::HLERequestContext& ctx) { + IPC::ResponseBuilder rb{ctx, 2, 0, 1}; + rb.Push(RESULT_SUCCESS); + rb.PushIpcInterface(); + LOG_DEBUG(Service_ACC, "called"); +} + +void Module::Interface::GetLastOpenedUser(Kernel::HLERequestContext& ctx) { + LOG_WARNING(Service_ACC, "(STUBBED) called"); + IPC::ResponseBuilder rb{ctx, 6}; + rb.Push(RESULT_SUCCESS); + rb.PushRaw(DEFAULT_USER_ID); +} + +Module::Interface::Interface(std::shared_ptr module, const char* name) + : ServiceFramework(name), module(std::move(module)) {} + void InstallInterfaces(SM::ServiceManager& service_manager) { - std::make_shared()->InstallAsService(service_manager); + auto module = std::make_shared(); + std::make_shared(module)->InstallAsService(service_manager); + std::make_shared(module)->InstallAsService(service_manager); + std::make_shared(module)->InstallAsService(service_manager); + std::make_shared(module)->InstallAsService(service_manager); } } // namespace Account diff --git a/src/core/hle/service/acc/acc.h b/src/core/hle/service/acc/acc.h index 44d024f489..2d2f57b7de 100644 --- a/src/core/hle/service/acc/acc.h +++ b/src/core/hle/service/acc/acc.h @@ -9,6 +9,25 @@ namespace Service { namespace Account { +class Module final { +public: + class Interface : public ServiceFramework { + public: + Interface(std::shared_ptr module, const char* name); + + void GetUserExistence(Kernel::HLERequestContext& ctx); + void ListAllUsers(Kernel::HLERequestContext& ctx); + void ListOpenUsers(Kernel::HLERequestContext& ctx); + void GetLastOpenedUser(Kernel::HLERequestContext& ctx); + void GetProfile(Kernel::HLERequestContext& ctx); + void InitializeApplicationInfo(Kernel::HLERequestContext& ctx); + void GetBaasAccountManagerForApplication(Kernel::HLERequestContext& ctx); + + protected: + std::shared_ptr module; + }; +}; + /// Registers all ACC services with the specified service manager. void InstallInterfaces(SM::ServiceManager& service_manager); diff --git a/src/core/hle/service/acc/acc_aa.cpp b/src/core/hle/service/acc/acc_aa.cpp new file mode 100644 index 0000000000..76deaa07fd --- /dev/null +++ b/src/core/hle/service/acc/acc_aa.cpp @@ -0,0 +1,22 @@ +// Copyright 2018 yuzu emulator team +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#include "core/hle/service/acc/acc_aa.h" + +namespace Service { +namespace Account { + +ACC_AA::ACC_AA(std::shared_ptr module) : Module::Interface(std::move(module), "acc:aa") { + static const FunctionInfo functions[] = { + {0, nullptr, "EnsureCacheAsync"}, + {1, nullptr, "LoadCache"}, + {2, nullptr, "GetDeviceAccountId"}, + {50, nullptr, "RegisterNotificationTokenAsync"}, + {51, nullptr, "UnregisterNotificationTokenAsync"}, + }; + RegisterHandlers(functions); +} + +} // namespace Account +} // namespace Service diff --git a/src/core/hle/service/acc/acc_aa.h b/src/core/hle/service/acc/acc_aa.h new file mode 100644 index 0000000000..5069c68900 --- /dev/null +++ b/src/core/hle/service/acc/acc_aa.h @@ -0,0 +1,18 @@ +// Copyright 2018 yuzu emulator team +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +#include "core/hle/service/acc/acc.h" + +namespace Service { +namespace Account { + +class ACC_AA final : public Module::Interface { +public: + explicit ACC_AA(std::shared_ptr module); +}; + +} // namespace Account +} // namespace Service diff --git a/src/core/hle/service/acc/acc_su.cpp b/src/core/hle/service/acc/acc_su.cpp new file mode 100644 index 0000000000..538f9d9b1c --- /dev/null +++ b/src/core/hle/service/acc/acc_su.cpp @@ -0,0 +1,55 @@ +// Copyright 2018 yuzu emulator team +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#include "core/hle/service/acc/acc_su.h" + +namespace Service { +namespace Account { + +ACC_SU::ACC_SU(std::shared_ptr module) : Module::Interface(std::move(module), "acc:su") { + static const FunctionInfo functions[] = { + {0, nullptr, "GetUserCount"}, + {1, &ACC_SU::GetUserExistence, "GetUserExistence"}, + {2, &ACC_SU::ListAllUsers, "ListAllUsers"}, + {3, &ACC_SU::ListOpenUsers, "ListOpenUsers"}, + {4, &ACC_SU::GetLastOpenedUser, "GetLastOpenedUser"}, + {5, &ACC_SU::GetProfile, "GetProfile"}, + {6, nullptr, "GetProfileDigest"}, + {50, nullptr, "IsUserRegistrationRequestPermitted"}, + {51, nullptr, "TrySelectUserWithoutInteraction"}, + {60, nullptr, "ListOpenContextStoredUsers"}, + {100, nullptr, "GetUserRegistrationNotifier"}, + {101, nullptr, "GetUserStateChangeNotifier"}, + {102, nullptr, "GetBaasAccountManagerForSystemService"}, + {103, nullptr, "GetBaasUserAvailabilityChangeNotifier"}, + {104, nullptr, "GetProfileUpdateNotifier"}, + {105, nullptr, "CheckNetworkServiceAvailabilityAsync"}, + {110, nullptr, "StoreSaveDataThumbnail"}, + {111, nullptr, "ClearSaveDataThumbnail"}, + {112, nullptr, "LoadSaveDataThumbnail"}, + {113, nullptr, "GetSaveDataThumbnailExistence"}, + {190, nullptr, "GetUserLastOpenedApplication"}, + {191, nullptr, "ActivateOpenContextHolder"}, + {200, nullptr, "BeginUserRegistration"}, + {201, nullptr, "CompleteUserRegistration"}, + {202, nullptr, "CancelUserRegistration"}, + {203, nullptr, "DeleteUser"}, + {204, nullptr, "SetUserPosition"}, + {205, nullptr, "GetProfileEditor"}, + {206, nullptr, "CompleteUserRegistrationForcibly"}, + {210, nullptr, "CreateFloatingRegistrationRequest"}, + {230, nullptr, "AuthenticateServiceAsync"}, + {250, nullptr, "GetBaasAccountAdministrator"}, + {290, nullptr, "ProxyProcedureForGuestLoginWithNintendoAccount"}, + {291, nullptr, "ProxyProcedureForFloatingRegistrationWithNintendoAccount"}, + {299, nullptr, "SuspendBackgroundDaemon"}, + {997, nullptr, "DebugInvalidateTokenCacheForUser"}, + {998, nullptr, "DebugSetUserStateClose"}, + {999, nullptr, "DebugSetUserStateOpen"}, + }; + RegisterHandlers(functions); +} + +} // namespace Account +} // namespace Service diff --git a/src/core/hle/service/acc/acc_su.h b/src/core/hle/service/acc/acc_su.h new file mode 100644 index 0000000000..3894a6991b --- /dev/null +++ b/src/core/hle/service/acc/acc_su.h @@ -0,0 +1,18 @@ +// Copyright 2018 yuzu emulator team +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +#include "core/hle/service/acc/acc.h" + +namespace Service { +namespace Account { + +class ACC_SU final : public Module::Interface { +public: + explicit ACC_SU(std::shared_ptr module); +}; + +} // namespace Account +} // namespace Service diff --git a/src/core/hle/service/acc/acc_u0.cpp b/src/core/hle/service/acc/acc_u0.cpp index 52c3491d5f..7b9c667ef5 100644 --- a/src/core/hle/service/acc/acc_u0.cpp +++ b/src/core/hle/service/acc/acc_u0.cpp @@ -2,120 +2,31 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. -#include "common/logging/log.h" -#include "core/hle/ipc_helpers.h" #include "core/hle/service/acc/acc_u0.h" namespace Service { namespace Account { -using Uid = std::array; -static constexpr Uid DEFAULT_USER_ID{0x10ull, 0x20ull}; - -class IProfile final : public ServiceFramework { -public: - IProfile() : ServiceFramework("IProfile") { - static const FunctionInfo functions[] = { - {1, &IProfile::GetBase, "GetBase"}, - }; - RegisterHandlers(functions); - } - -private: - void GetBase(Kernel::HLERequestContext& ctx) { - LOG_WARNING(Service_ACC, "(STUBBED) called"); - ProfileBase profile_base{}; - IPC::ResponseBuilder rb{ctx, 16}; - rb.Push(RESULT_SUCCESS); - rb.PushRaw(profile_base); - } -}; - -class IManagerForApplication final : public ServiceFramework { -public: - IManagerForApplication() : ServiceFramework("IManagerForApplication") { - static const FunctionInfo functions[] = { - {0, &IManagerForApplication::CheckAvailability, "CheckAvailability"}, - {1, &IManagerForApplication::GetAccountId, "GetAccountId"}, - }; - RegisterHandlers(functions); - } - -private: - void CheckAvailability(Kernel::HLERequestContext& ctx) { - LOG_WARNING(Service_ACC, "(STUBBED) called"); - IPC::ResponseBuilder rb{ctx, 3}; - rb.Push(RESULT_SUCCESS); - rb.Push(true); // TODO: Check when this is supposed to return true and when not - } - - void GetAccountId(Kernel::HLERequestContext& ctx) { - LOG_WARNING(Service_ACC, "(STUBBED) called"); - IPC::ResponseBuilder rb{ctx, 4}; - rb.Push(RESULT_SUCCESS); - rb.Push(0x12345678ABCDEF); - } -}; - -void ACC_U0::GetUserExistence(Kernel::HLERequestContext& ctx) { - LOG_WARNING(Service_ACC, "(STUBBED) called"); - IPC::ResponseBuilder rb{ctx, 3}; - rb.Push(RESULT_SUCCESS); - rb.Push(true); // TODO: Check when this is supposed to return true and when not -} - -void ACC_U0::ListAllUsers(Kernel::HLERequestContext& ctx) { - LOG_WARNING(Service_ACC, "(STUBBED) called"); - constexpr std::array user_ids{DEFAULT_USER_ID}; - ctx.WriteBuffer(user_ids.data(), user_ids.size()); - IPC::ResponseBuilder rb{ctx, 2}; - rb.Push(RESULT_SUCCESS); -} - -void ACC_U0::ListOpenUsers(Kernel::HLERequestContext& ctx) { - LOG_WARNING(Service_ACC, "(STUBBED) called"); - constexpr std::array user_ids{DEFAULT_USER_ID}; - ctx.WriteBuffer(user_ids.data(), user_ids.size()); - IPC::ResponseBuilder rb{ctx, 2}; - rb.Push(RESULT_SUCCESS); -} - -void ACC_U0::GetProfile(Kernel::HLERequestContext& ctx) { - IPC::ResponseBuilder rb{ctx, 2, 0, 1}; - rb.Push(RESULT_SUCCESS); - rb.PushIpcInterface(); - LOG_DEBUG(Service_ACC, "called"); -} - -void ACC_U0::InitializeApplicationInfo(Kernel::HLERequestContext& ctx) { - LOG_WARNING(Service_ACC, "(STUBBED) called"); - IPC::ResponseBuilder rb{ctx, 2}; - rb.Push(RESULT_SUCCESS); -} - -void ACC_U0::GetBaasAccountManagerForApplication(Kernel::HLERequestContext& ctx) { - IPC::ResponseBuilder rb{ctx, 2, 0, 1}; - rb.Push(RESULT_SUCCESS); - rb.PushIpcInterface(); - LOG_DEBUG(Service_ACC, "called"); -} - -void ACC_U0::GetLastOpenedUser(Kernel::HLERequestContext& ctx) { - LOG_WARNING(Service_ACC, "(STUBBED) called"); - IPC::ResponseBuilder rb{ctx, 6}; - rb.Push(RESULT_SUCCESS); - rb.PushRaw(DEFAULT_USER_ID); -} - -ACC_U0::ACC_U0() : ServiceFramework("acc:u0") { +ACC_U0::ACC_U0(std::shared_ptr module) : Module::Interface(std::move(module), "acc:u0") { static const FunctionInfo functions[] = { + {0, nullptr, "GetUserCount"}, {1, &ACC_U0::GetUserExistence, "GetUserExistence"}, {2, &ACC_U0::ListAllUsers, "ListAllUsers"}, {3, &ACC_U0::ListOpenUsers, "ListOpenUsers"}, {4, &ACC_U0::GetLastOpenedUser, "GetLastOpenedUser"}, {5, &ACC_U0::GetProfile, "GetProfile"}, + {6, nullptr, "GetProfileDigest"}, + {50, nullptr, "IsUserRegistrationRequestPermitted"}, + {51, nullptr, "TrySelectUserWithoutInteraction"}, + {60, nullptr, "ListOpenContextStoredUsers"}, {100, &ACC_U0::InitializeApplicationInfo, "InitializeApplicationInfo"}, {101, &ACC_U0::GetBaasAccountManagerForApplication, "GetBaasAccountManagerForApplication"}, + {102, nullptr, "AuthenticateApplicationAsync"}, + {103, nullptr, "CheckNetworkServiceAvailabilityAsync"}, + {110, nullptr, "StoreSaveDataThumbnail"}, + {111, nullptr, "ClearSaveDataThumbnail"}, + {120, nullptr, "CreateGuestLoginRequest"}, + {130, nullptr, "LoadOpenContext"}, }; RegisterHandlers(functions); } diff --git a/src/core/hle/service/acc/acc_u0.h b/src/core/hle/service/acc/acc_u0.h index 222f372820..d4f36e1723 100644 --- a/src/core/hle/service/acc/acc_u0.h +++ b/src/core/hle/service/acc/acc_u0.h @@ -4,36 +4,14 @@ #pragma once -#include "core/hle/service/service.h" +#include "core/hle/service/acc/acc.h" namespace Service { namespace Account { -// TODO: RE this structure -struct UserData { - INSERT_PADDING_BYTES(0x80); -}; -static_assert(sizeof(UserData) == 0x80, "UserData structure has incorrect size"); - -// TODO: RE this structure -struct ProfileBase { - INSERT_PADDING_BYTES(0x38); -}; -static_assert(sizeof(ProfileBase) == 0x38, "ProfileBase structure has incorrect size"); - -class ACC_U0 final : public ServiceFramework { +class ACC_U0 final : public Module::Interface { public: - ACC_U0(); - ~ACC_U0() = default; - -private: - void GetUserExistence(Kernel::HLERequestContext& ctx); - void ListAllUsers(Kernel::HLERequestContext& ctx); - void ListOpenUsers(Kernel::HLERequestContext& ctx); - void GetLastOpenedUser(Kernel::HLERequestContext& ctx); - void GetProfile(Kernel::HLERequestContext& ctx); - void InitializeApplicationInfo(Kernel::HLERequestContext& ctx); - void GetBaasAccountManagerForApplication(Kernel::HLERequestContext& ctx); + explicit ACC_U0(std::shared_ptr module); }; } // namespace Account diff --git a/src/core/hle/service/acc/acc_u1.cpp b/src/core/hle/service/acc/acc_u1.cpp new file mode 100644 index 0000000000..dea353554a --- /dev/null +++ b/src/core/hle/service/acc/acc_u1.cpp @@ -0,0 +1,42 @@ +// Copyright 2018 yuzu emulator team +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#include "core/hle/service/acc/acc_u1.h" + +namespace Service { +namespace Account { + +ACC_U1::ACC_U1(std::shared_ptr module) : Module::Interface(std::move(module), "acc:u1") { + static const FunctionInfo functions[] = { + {0, nullptr, "GetUserCount"}, + {1, &ACC_U1::GetUserExistence, "GetUserExistence"}, + {2, &ACC_U1::ListAllUsers, "ListAllUsers"}, + {3, &ACC_U1::ListOpenUsers, "ListOpenUsers"}, + {4, &ACC_U1::GetLastOpenedUser, "GetLastOpenedUser"}, + {5, &ACC_U1::GetProfile, "GetProfile"}, + {6, nullptr, "GetProfileDigest"}, + {50, nullptr, "IsUserRegistrationRequestPermitted"}, + {51, nullptr, "TrySelectUserWithoutInteraction"}, + {60, nullptr, "ListOpenContextStoredUsers"}, + {100, nullptr, "GetUserRegistrationNotifier"}, + {101, nullptr, "GetUserStateChangeNotifier"}, + {102, nullptr, "GetBaasAccountManagerForSystemService"}, + {103, nullptr, "GetProfileUpdateNotifier"}, + {104, nullptr, "CheckNetworkServiceAvailabilityAsync"}, + {105, nullptr, "GetBaasUserAvailabilityChangeNotifier"}, + {110, nullptr, "StoreSaveDataThumbnail"}, + {111, nullptr, "ClearSaveDataThumbnail"}, + {112, nullptr, "LoadSaveDataThumbnail"}, + {113, nullptr, "GetSaveDataThumbnailExistence"}, + {190, nullptr, "GetUserLastOpenedApplication"}, + {191, nullptr, "ActivateOpenContextHolder"}, + {997, nullptr, "DebugInvalidateTokenCacheForUser"}, + {998, nullptr, "DebugSetUserStateClose"}, + {999, nullptr, "DebugSetUserStateOpen"}, + }; + RegisterHandlers(functions); +} + +} // namespace Account +} // namespace Service diff --git a/src/core/hle/service/acc/acc_u1.h b/src/core/hle/service/acc/acc_u1.h new file mode 100644 index 0000000000..432d5b3e97 --- /dev/null +++ b/src/core/hle/service/acc/acc_u1.h @@ -0,0 +1,18 @@ +// Copyright 2018 yuzu emulator team +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +#include "core/hle/service/acc/acc.h" + +namespace Service { +namespace Account { + +class ACC_U1 final : public Module::Interface { +public: + explicit ACC_U1(std::shared_ptr module); +}; + +} // namespace Account +} // namespace Service From 84d39530cf1b60f8c5f61e9fc6d52de1c2e239c7 Mon Sep 17 00:00:00 2001 From: Hexagon12 Date: Tue, 10 Apr 2018 18:36:00 +0300 Subject: [PATCH 02/22] Updated AM with more service names. --- src/core/hle/service/am/am.cpp | 84 +++++++++++++++++++++++++++++++++- 1 file changed, 82 insertions(+), 2 deletions(-) diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index bab338205b..cda1f419a3 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp @@ -19,8 +19,11 @@ namespace AM { IWindowController::IWindowController() : ServiceFramework("IWindowController") { static const FunctionInfo functions[] = { + {0, nullptr, "CreateWindow"}, {1, &IWindowController::GetAppletResourceUserId, "GetAppletResourceUserId"}, {10, &IWindowController::AcquireForegroundRights, "AcquireForegroundRights"}, + {11, nullptr, "ReleaseForegroundRights"}, + {12, nullptr, "RejectToChangeIntoBackground"}, }; RegisterHandlers(functions); } @@ -78,8 +81,11 @@ IDebugFunctions::IDebugFunctions() : ServiceFramework("IDebugFunctions") {} ISelfController::ISelfController(std::shared_ptr nvflinger) : ServiceFramework("ISelfController"), nvflinger(std::move(nvflinger)) { static const FunctionInfo functions[] = { + {0, nullptr, "Exit"}, {1, &ISelfController::LockExit, "LockExit"}, {2, &ISelfController::UnlockExit, "UnlockExit"}, + {3, nullptr, "EnterFatalSection"}, + {4, nullptr, "LeaveFatalSection"}, {9, &ISelfController::GetLibraryAppletLaunchableEvent, "GetLibraryAppletLaunchableEvent"}, {10, &ISelfController::SetScreenShotPermission, "SetScreenShotPermission"}, {11, &ISelfController::SetOperationModeChangedNotification, @@ -88,8 +94,29 @@ ISelfController::ISelfController(std::shared_ptr nvflinger "SetPerformanceModeChangedNotification"}, {13, &ISelfController::SetFocusHandlingMode, "SetFocusHandlingMode"}, {14, &ISelfController::SetRestartMessageEnabled, "SetRestartMessageEnabled"}, + {15, nullptr, "SetScreenShotAppletIdentityInfo"}, {16, &ISelfController::SetOutOfFocusSuspendingEnabled, "SetOutOfFocusSuspendingEnabled"}, + {17, nullptr, "SetControllerFirmwareUpdateSection"}, + {18, nullptr, "SetRequiresCaptureButtonShortPressedMessage"}, + {19, nullptr, "SetScreenShotImageOrientation"}, + {20, nullptr, "SetDesirableKeyboardLayout"}, {40, &ISelfController::CreateManagedDisplayLayer, "CreateManagedDisplayLayer"}, + {41, nullptr, "IsSystemBufferSharingEnabled"}, + {42, nullptr, "GetSystemSharedLayerHandle"}, + {50, nullptr, "SetHandlesRequestToDisplay"}, + {51, nullptr, "ApproveToDisplay"}, + {60, nullptr, "OverrideAutoSleepTimeAndDimmingTime"}, + {61, nullptr, "SetMediaPlaybackState"}, + {62, nullptr, "SetIdleTimeDetectionExtension"}, + {63, nullptr, "GetIdleTimeDetectionExtension"}, + {64, nullptr, "SetInputDetectionSourceSet"} + {65, nullptr, "ReportUserIsActive"}, + {66, nullptr, "GetCurrentIlluminance"}, + {67, nullptr, "IsIlluminanceAvailable"}, + {68, nullptr, "SetAutoSleepDisabled"}, + {69, nullptr, "IsAutoSleepDisabled"}, + {70, nullptr, "ReportMultimediaError"}, + {80, nullptr, "SetWirelessPriorityMode"}, }; RegisterHandlers(functions); @@ -206,9 +233,30 @@ ICommonStateGetter::ICommonStateGetter() : ServiceFramework("ICommonStateGetter" static const FunctionInfo functions[] = { {0, &ICommonStateGetter::GetEventHandle, "GetEventHandle"}, {1, &ICommonStateGetter::ReceiveMessage, "ReceiveMessage"}, + {2, nullptr, "GetThisAppletKind"}, + {3, nullptr, "AllowToEnterSleep"}, + {4, nullptr, "DisallowToEnterSleep"}, {5, &ICommonStateGetter::GetOperationMode, "GetOperationMode"}, {6, &ICommonStateGetter::GetPerformanceMode, "GetPerformanceMode"}, + {7, nullptr, "GetCradleStatus"}, + {8, nullptr, "GetBootMode"}, {9, &ICommonStateGetter::GetCurrentFocusState, "GetCurrentFocusState"}, + {10, nullptr, "RequestToAcquireSleepLock"}, + {11, nullptr, "ReleaseSleepLock"}, + {12, nullptr, "ReleaseSleepLockTransiently"}, + {13, nullptr, "GetAcquiredSleepLockEvent"}, + {20, nullptr, "PushToGeneralChannel"}, + {30, nullptr, "GetHomeButtonReaderLockAccessor"}, + {31, nullptr, "GetReaderLockAccessorEx"}, + {40, nullptr, "GetCradleFwVersion"}, + {50, nullptr, "IsVrModeEnabled"}, + {51, nullptr, "SetVrModeEnabled"}, + {52, nullptr, "SwitchLcdBacklight"}, + {55, nullptr, "IsInControllerFirmwareUpdateSection"}, + {60, nullptr, "GetDefaultDisplayResolution"}, + {61, nullptr, "GetDefaultDisplayResolutionChangeEvent"}, + {62, nullptr, "GetHdcpAuthenticationState"}, + {63, nullptr, "GetHdcpAuthenticationStateChangeEvent"}, }; RegisterHandlers(functions); @@ -278,7 +326,7 @@ public: {104, nullptr, "PopInteractiveOutData"}, {105, nullptr, "GetPopOutDataEvent"}, {106, nullptr, "GetPopInteractiveOutDataEvent"}, - {120, nullptr, "NeedsToExitProcess"}, + {110, nullptr, "NeedsToExitProcess"}, {120, nullptr, "GetLibraryAppletInfo"}, {150, nullptr, "RequestForAppletToGetForeground"}, {160, nullptr, "GetIndirectLayerConsumerHandle"}, @@ -330,6 +378,7 @@ public: : ServiceFramework("IStorageAccessor"), buffer(std::move(buffer)) { static const FunctionInfo functions[] = { {0, &IStorageAccessor::GetSize, "GetSize"}, + {10, nullptr, "Write"}, {11, &IStorageAccessor::Read, "Read"}, }; RegisterHandlers(functions); @@ -372,6 +421,7 @@ public: : ServiceFramework("IStorage"), buffer(std::move(buffer)) { static const FunctionInfo functions[] = { {0, &IStorage::Open, "Open"}, + {1, nullptr, "OpenTransferStorage"}, }; RegisterHandlers(functions); } @@ -392,12 +442,42 @@ private: IApplicationFunctions::IApplicationFunctions() : ServiceFramework("IApplicationFunctions") { static const FunctionInfo functions[] = { {1, &IApplicationFunctions::PopLaunchParameter, "PopLaunchParameter"}, + {10, nullptr, "CreateApplicationAndPushAndRequestToStart"}, + {11, nullptr, "CreateApplicationAndPushAndRequestToStartForQuest"}, + {12, nullptr, "CreateApplicationAndRequestToStart"}, + {13, nullptr, "CreateApplicationAndRequestToStartForQuest"}, {20, &IApplicationFunctions::EnsureSaveData, "EnsureSaveData"}, {21, &IApplicationFunctions::GetDesiredLanguage, "GetDesiredLanguage"}, {22, &IApplicationFunctions::SetTerminateResult, "SetTerminateResult"}, + {23, nullptr, "GetDisplayVersion"}, + {24, nullptr, "GetLaunchStorageInfoForDebug"}, + {25, nullptr, "ExtendSaveData"}, + {26, nullptr, "GetSaveDataSize"}, + {30, nullptr, "BeginBlockingHomeButtonShortAndLongPressed"}, + {31, nullptr, "EndBlockingHomeButtonShortAndLongPressed"}, + {32, nullptr, "BeginBlockingHomeButton"}, + {33, nullptr, "EndBlockingHomeButton"}, + {40, &IApplicationFunctions::NotifyRunning, "NotifyRunning"}, + {50, nullptr, "GetPseudoDeviceId"}, + {60, nullptr, "SetMediaPlaybackStateForApplication"}, + {65, nullptr, "IsGamePlayRecordingSupported"}, {66, &IApplicationFunctions::InitializeGamePlayRecording, "InitializeGamePlayRecording"}, {67, &IApplicationFunctions::SetGamePlayRecordingState, "SetGamePlayRecordingState"}, - {40, &IApplicationFunctions::NotifyRunning, "NotifyRunning"}, + {68, nullptr, "RequestFlushGamePlayingMovieForDebug"}, + {70, nullptr, "RequestToShutdown"}, + {71, nullptr, "RequestToReboot"}, + {80, nullptr, "ExitAndRequestToShowThanksMessage"}, + {90, nullptr, "EnableApplicationCrashReport"}, + {100, nullptr, "InitializeApplicationCopyrightFrameBuffer"}, + {101, nullptr, "SetApplicationCopyrightImage"}, + {102, nullptr, "SetApplicationCopyrightVisibility"}, + {110, nullptr, "QueryApplicationPlayStatistics"}, + {120, nullptr, "ExecuteProgram"}, + {121, nullptr, "ClearUserChannel"}, + {122, nullptr, "UnpopToUserChannel"}, + {500, nullptr, "StartContinuousRecordingFlushForDebug"}, + {1000, nullptr, "CreateMovieMaker"}, + {1001, nullptr, "PrepareForJit"}, }; RegisterHandlers(functions); } From 0cc2e7d81d819c4ca17c45045f27de24413f87ca Mon Sep 17 00:00:00 2001 From: Hexagon12 Date: Tue, 10 Apr 2018 18:39:46 +0300 Subject: [PATCH 03/22] Updated AppletAE with more service names. --- src/core/hle/service/am/applet_ae.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/hle/service/am/applet_ae.cpp b/src/core/hle/service/am/applet_ae.cpp index 0e51caa70d..154d346d59 100644 --- a/src/core/hle/service/am/applet_ae.cpp +++ b/src/core/hle/service/am/applet_ae.cpp @@ -21,6 +21,7 @@ public: {2, &ILibraryAppletProxy::GetWindowController, "GetWindowController"}, {3, &ILibraryAppletProxy::GetAudioController, "GetAudioController"}, {4, &ILibraryAppletProxy::GetDisplayController, "GetDisplayController"}, + {10, nullptr, "GetProcessWindingController"}, {11, &ILibraryAppletProxy::GetLibraryAppletCreator, "GetLibraryAppletCreator"}, {20, &ILibraryAppletProxy::GetApplicationFunctions, "GetApplicationFunctions"}, {1000, &ILibraryAppletProxy::GetDebugFunctions, "GetDebugFunctions"}, From 434cffa37d66d1acae0816620ab38fcdfadaf833 Mon Sep 17 00:00:00 2001 From: Hexagon12 Date: Tue, 10 Apr 2018 18:41:17 +0300 Subject: [PATCH 04/22] Updated AppletOE with more service names. --- src/core/hle/service/am/applet_oe.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/hle/service/am/applet_oe.cpp b/src/core/hle/service/am/applet_oe.cpp index bdcebe689e..334c38392b 100644 --- a/src/core/hle/service/am/applet_oe.cpp +++ b/src/core/hle/service/am/applet_oe.cpp @@ -21,6 +21,7 @@ public: {2, &IApplicationProxy::GetWindowController, "GetWindowController"}, {3, &IApplicationProxy::GetAudioController, "GetAudioController"}, {4, &IApplicationProxy::GetDisplayController, "GetDisplayController"}, + {10, nullptr, "GetProcessWindingController"}, {11, &IApplicationProxy::GetLibraryAppletCreator, "GetLibraryAppletCreator"}, {20, &IApplicationProxy::GetApplicationFunctions, "GetApplicationFunctions"}, {1000, &IApplicationProxy::GetDebugFunctions, "GetDebugFunctions"}, From c79c9755b4f68f3faaac5985d6f99512981688ba Mon Sep 17 00:00:00 2001 From: Hexagon12 Date: Tue, 10 Apr 2018 18:42:28 +0300 Subject: [PATCH 05/22] Updated AOC with more service names. --- src/core/hle/service/aoc/aoc_u.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/hle/service/aoc/aoc_u.cpp b/src/core/hle/service/aoc/aoc_u.cpp index 8b55d2fcb6..f64001df36 100644 --- a/src/core/hle/service/aoc/aoc_u.cpp +++ b/src/core/hle/service/aoc/aoc_u.cpp @@ -19,6 +19,7 @@ AOC_U::AOC_U() : ServiceFramework("aoc:u") { {5, nullptr, "GetAddOnContentBaseId"}, {6, nullptr, "PrepareAddOnContentByApplicationId"}, {7, nullptr, "PrepareAddOnContent"}, + {8, nullptr, "GetAddOnContentListChangedEvent"}, }; RegisterHandlers(functions); } From 4cf4a5ecdca6a5841b41c87ec8270c560697311e Mon Sep 17 00:00:00 2001 From: Hexagon12 Date: Tue, 10 Apr 2018 18:47:52 +0300 Subject: [PATCH 06/22] Updated audin with more service names. --- src/core/hle/service/audio/audin_u.cpp | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/src/core/hle/service/audio/audin_u.cpp b/src/core/hle/service/audio/audin_u.cpp index ee749fddd5..f312c57785 100644 --- a/src/core/hle/service/audio/audin_u.cpp +++ b/src/core/hle/service/audio/audin_u.cpp @@ -14,15 +14,20 @@ class IAudioIn final : public ServiceFramework { public: IAudioIn() : ServiceFramework("IAudioIn") { static const FunctionInfo functions[] = { - {0x0, nullptr, "GetAudioInState"}, - {0x1, nullptr, "StartAudioIn"}, - {0x2, nullptr, "StopAudioIn"}, - {0x3, nullptr, "AppendAudioInBuffer_1"}, - {0x4, nullptr, "RegisterBufferEvent"}, - {0x5, nullptr, "GetReleasedAudioInBuffer_1"}, - {0x6, nullptr, "ContainsAudioInBuffer"}, - {0x7, nullptr, "AppendAudioInBuffer_2"}, - {0x8, nullptr, "GetReleasedAudioInBuffer_2"}, + {0, nullptr, "GetAudioInState"}, + {1, nullptr, "StartAudioIn"}, + {2, nullptr, "StopAudioIn"}, + {3, nullptr, "AppendAudioInBuffer"}, + {4, nullptr, "RegisterBufferEvent"}, + {5, nullptr, "GetReleasedAudioInBuffer"}, + {6, nullptr, "ContainsAudioInBuffer"}, + {7, nullptr, "AppendAudioInBufferWithUserEvent"}, + {8, nullptr, "AppendAudioInBufferAuto"}, + {9, nullptr, "GetReleasedAudioInBufferAuto"}, + {10, nullptr, "AppendAudioInBufferWithUserEventAuto"}, + {11, nullptr, "GetAudioInBufferCount"}, + {12, nullptr, "SetAudioInDeviceGain"}, + {13, nullptr, "GetAudioInDeviceGain"}, }; RegisterHandlers(functions); } @@ -33,6 +38,8 @@ AudInU::AudInU() : ServiceFramework("audin:u") { static const FunctionInfo functions[] = { {0x00000000, nullptr, "ListAudioIns"}, {0x00000001, nullptr, "OpenAudioIn"}, + {0x00000003, nullptr, "OpenAudioInAuto"}, + {0x00000004, nullptr, "ListAudioInsAuto"}, }; RegisterHandlers(functions); } From a886e3bc2a6590e476caaedbbb57718516d88f81 Mon Sep 17 00:00:00 2001 From: Hexagon12 Date: Tue, 10 Apr 2018 18:51:50 +0300 Subject: [PATCH 07/22] Updated audout with more service names. --- src/core/hle/service/audio/audout_u.cpp | 29 ++++++++++++++----------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/src/core/hle/service/audio/audout_u.cpp b/src/core/hle/service/audio/audout_u.cpp index 8e935cb7f3..db6e6647c3 100644 --- a/src/core/hle/service/audio/audout_u.cpp +++ b/src/core/hle/service/audio/audout_u.cpp @@ -25,15 +25,18 @@ class IAudioOut final : public ServiceFramework { public: IAudioOut() : ServiceFramework("IAudioOut"), audio_out_state(AudioState::Stopped) { static const FunctionInfo functions[] = { - {0x0, &IAudioOut::GetAudioOutState, "GetAudioOutState"}, - {0x1, &IAudioOut::StartAudioOut, "StartAudioOut"}, - {0x2, &IAudioOut::StopAudioOut, "StopAudioOut"}, - {0x3, &IAudioOut::AppendAudioOutBuffer_1, "AppendAudioOutBuffer_1"}, - {0x4, &IAudioOut::RegisterBufferEvent, "RegisterBufferEvent"}, - {0x5, &IAudioOut::GetReleasedAudioOutBuffer_1, "GetReleasedAudioOutBuffer_1"}, - {0x6, nullptr, "ContainsAudioOutBuffer"}, - {0x7, nullptr, "AppendAudioOutBuffer_2"}, - {0x8, nullptr, "GetReleasedAudioOutBuffer_2"}, + {0, &IAudioOut::GetAudioOutState, "GetAudioOutState"}, + {1, &IAudioOut::StartAudioOut, "StartAudioOut"}, + {2, &IAudioOut::StopAudioOut, "StopAudioOut"}, + {3, &IAudioOut::AppendAudioOutBuffer, "AppendAudioOutBuffer"}, + {4, &IAudioOut::RegisterBufferEvent, "RegisterBufferEvent"}, + {5, &IAudioOut::GetReleasedAudioOutBuffer, "GetReleasedAudioOutBuffer"}, + {6, nullptr, "ContainsAudioOutBuffer"}, + {7, nullptr, "AppendAudioOutBufferAuto"}, + {8, nullptr, "GetReleasedAudioOutBufferAuto"}, + {9, nullptr, "GetAudioOutBufferCount"}, + {10, nullptr, "GetAudioOutPlayedSampleCount"}, + {11, nullptr, "FlushAudioOutBuffers"}, }; RegisterHandlers(functions); @@ -94,7 +97,7 @@ private: rb.PushCopyObjects(buffer_event); } - void AppendAudioOutBuffer_1(Kernel::HLERequestContext& ctx) { + void AppendAudioOutBuffer(Kernel::HLERequestContext& ctx) { LOG_WARNING(Service_Audio, "(STUBBED) called"); IPC::RequestParser rp{ctx}; @@ -105,7 +108,7 @@ private: rb.Push(RESULT_SUCCESS); } - void GetReleasedAudioOutBuffer_1(Kernel::HLERequestContext& ctx) { + void GetReleasedAudioOutBuffer(Kernel::HLERequestContext& ctx) { LOG_WARNING(Service_Audio, "(STUBBED) called"); // TODO(st4rk): This is how libtransistor currently implements the @@ -196,8 +199,8 @@ void AudOutU::OpenAudioOut(Kernel::HLERequestContext& ctx) { AudOutU::AudOutU() : ServiceFramework("audout:u") { static const FunctionInfo functions[] = {{0x00000000, &AudOutU::ListAudioOuts, "ListAudioOuts"}, {0x00000001, &AudOutU::OpenAudioOut, "OpenAudioOut"}, - {0x00000002, nullptr, "Unknown2"}, - {0x00000003, nullptr, "Unknown3"}}; + {0x00000002, nullptr, "ListAudioOutsAuto"}, + {0x00000003, nullptr, "OpenAudioOutAuto"}}; RegisterHandlers(functions); } From c0011fdacd251105702cbed6e32c67b2cceaa74a Mon Sep 17 00:00:00 2001 From: Hexagon12 Date: Tue, 10 Apr 2018 18:53:33 +0300 Subject: [PATCH 08/22] Updated audrec with more service names. --- src/core/hle/service/audio/audrec_u.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/core/hle/service/audio/audrec_u.cpp b/src/core/hle/service/audio/audrec_u.cpp index f2626ec70b..953104f196 100644 --- a/src/core/hle/service/audio/audrec_u.cpp +++ b/src/core/hle/service/audio/audrec_u.cpp @@ -14,13 +14,15 @@ class IFinalOutputRecorder final : public ServiceFramework public: IFinalOutputRecorder() : ServiceFramework("IFinalOutputRecorder") { static const FunctionInfo functions[] = { - {0x0, nullptr, "GetFinalOutputRecorderState"}, - {0x1, nullptr, "StartFinalOutputRecorder"}, - {0x2, nullptr, "StopFinalOutputRecorder"}, - {0x3, nullptr, "AppendFinalOutputRecorderBuffer"}, - {0x4, nullptr, "RegisterBufferEvent"}, - {0x5, nullptr, "GetReleasedFinalOutputRecorderBuffer"}, - {0x6, nullptr, "ContainsFinalOutputRecorderBuffer"}, + {0, nullptr, "GetFinalOutputRecorderState"}, + {1, nullptr, "StartFinalOutputRecorder"}, + {2, nullptr, "StopFinalOutputRecorder"}, + {3, nullptr, "AppendFinalOutputRecorderBuffer"}, + {4, nullptr, "RegisterBufferEvent"}, + {5, nullptr, "GetReleasedFinalOutputRecorderBuffer"}, + {6, nullptr, "ContainsFinalOutputRecorderBuffer"}, + {8, nullptr, "AppendFinalOutputRecorderBufferAuto"}, + {9, nullptr, "GetReleasedFinalOutputRecorderBufferAuto"}, }; RegisterHandlers(functions); } From ed2da0ef70f804496ead0e770fbf816841719637 Mon Sep 17 00:00:00 2001 From: Hexagon12 Date: Tue, 10 Apr 2018 18:56:57 +0300 Subject: [PATCH 09/22] Updated audren with more service names. --- src/core/hle/service/audio/audren_u.cpp | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/core/hle/service/audio/audren_u.cpp b/src/core/hle/service/audio/audren_u.cpp index 7990595aa1..0e78c57e94 100644 --- a/src/core/hle/service/audio/audren_u.cpp +++ b/src/core/hle/service/audio/audren_u.cpp @@ -19,16 +19,18 @@ class IAudioRenderer final : public ServiceFramework { public: IAudioRenderer() : ServiceFramework("IAudioRenderer") { static const FunctionInfo functions[] = { - {0x0, nullptr, "GetAudioRendererSampleRate"}, - {0x1, nullptr, "GetAudioRendererSampleCount"}, - {0x2, nullptr, "GetAudioRendererMixBufferCount"}, - {0x3, nullptr, "GetAudioRendererState"}, - {0x4, &IAudioRenderer::RequestUpdateAudioRenderer, "RequestUpdateAudioRenderer"}, - {0x5, &IAudioRenderer::StartAudioRenderer, "StartAudioRenderer"}, - {0x6, &IAudioRenderer::StopAudioRenderer, "StopAudioRenderer"}, - {0x7, &IAudioRenderer::QuerySystemEvent, "QuerySystemEvent"}, - {0x8, nullptr, "SetAudioRendererRenderingTimeLimit"}, - {0x9, nullptr, "GetAudioRendererRenderingTimeLimit"}, + {0, nullptr, "GetAudioRendererSampleRate"}, + {1, nullptr, "GetAudioRendererSampleCount"}, + {2, nullptr, "GetAudioRendererMixBufferCount"}, + {3, nullptr, "GetAudioRendererState"}, + {4, &IAudioRenderer::RequestUpdateAudioRenderer, "RequestUpdateAudioRenderer"}, + {5, &IAudioRenderer::StartAudioRenderer, "StartAudioRenderer"}, + {6, &IAudioRenderer::StopAudioRenderer, "StopAudioRenderer"}, + {7, &IAudioRenderer::QuerySystemEvent, "QuerySystemEvent"}, + {8, nullptr, "SetAudioRendererRenderingTimeLimit"}, + {9, nullptr, "GetAudioRendererRenderingTimeLimit"}, + {10, nullptr, "RequestUpdateAudioRendererAuto"}, + {11, nullptr, "ExecuteAudioRendererRendering"}, }; RegisterHandlers(functions); @@ -237,6 +239,8 @@ AudRenU::AudRenU() : ServiceFramework("audren:u") { {0, &AudRenU::OpenAudioRenderer, "OpenAudioRenderer"}, {1, &AudRenU::GetAudioRendererWorkBufferSize, "GetAudioRendererWorkBufferSize"}, {2, &AudRenU::GetAudioDevice, "GetAudioDevice"}, + {3, nullptr, "OpenAudioRendererAuto"}, + {4, nullptr, "GetAudioDeviceServiceWithRevisionInfo"}, }; RegisterHandlers(functions); } From ee3ca32fa3fb1f690e06e97ae9933778afff31df Mon Sep 17 00:00:00 2001 From: Hexagon12 Date: Tue, 10 Apr 2018 18:58:14 +0300 Subject: [PATCH 10/22] Updated CodecCtl with more service names. --- src/core/hle/service/audio/codecctl.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/hle/service/audio/codecctl.cpp b/src/core/hle/service/audio/codecctl.cpp index d2a7f4cd0d..1c86d8d177 100644 --- a/src/core/hle/service/audio/codecctl.cpp +++ b/src/core/hle/service/audio/codecctl.cpp @@ -22,9 +22,9 @@ CodecCtl::CodecCtl() : ServiceFramework("codecctl") { {0x00000007, nullptr, "SetCodecActiveTarget"}, {0x00000008, nullptr, "Unknown"}, {0x00000009, nullptr, "BindCodecHeadphoneMicJackInterrupt"}, - {0x0000000A, nullptr, "IsCodecHeadphoneMicJackInserted"}, - {0x0000000B, nullptr, "ClearCodecHeadphoneMicJackInterrupt"}, - {0x0000000C, nullptr, "IsCodecDeviceRequested"}, + {0x00000010, nullptr, "IsCodecHeadphoneMicJackInserted"}, + {0x00000011, nullptr, "ClearCodecHeadphoneMicJackInterrupt"}, + {0x00000012, nullptr, "IsCodecDeviceRequested"}, }; RegisterHandlers(functions); } From ae5e2d07c61bd06e7ef35132739c5a0dddda36d8 Mon Sep 17 00:00:00 2001 From: Hexagon12 Date: Tue, 10 Apr 2018 19:30:27 +0300 Subject: [PATCH 11/22] Updated fsp-srv with more service names. --- src/core/hle/service/filesystem/fsp_srv.cpp | 106 +++++++++++++++++++- 1 file changed, 102 insertions(+), 4 deletions(-) diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp index 10fa3a4d62..92e48a7573 100644 --- a/src/core/hle/service/filesystem/fsp_srv.cpp +++ b/src/core/hle/service/filesystem/fsp_srv.cpp @@ -22,8 +22,12 @@ public: IStorage(std::unique_ptr&& backend) : ServiceFramework("IStorage"), backend(std::move(backend)) { static const FunctionInfo functions[] = { - {0, &IStorage::Read, "Read"}, {1, nullptr, "Write"}, {2, nullptr, "Flush"}, - {3, nullptr, "SetSize"}, {4, nullptr, "GetSize"}, + {0, &IStorage::Read, "Read"}, + {1, nullptr, "Write"}, + {2, nullptr, "Flush"}, + {3, nullptr, "SetSize"}, + {4, nullptr, "GetSize"}, + {5, nullptr, "OperateRange"}, }; RegisterHandlers(functions); } @@ -72,8 +76,12 @@ public: explicit IFile(std::unique_ptr&& backend) : ServiceFramework("IFile"), backend(std::move(backend)) { static const FunctionInfo functions[] = { - {0, &IFile::Read, "Read"}, {1, &IFile::Write, "Write"}, {2, nullptr, "Flush"}, - {3, &IFile::SetSize, "SetSize"}, {4, &IFile::GetSize, "GetSize"}, + {0, &IFile::Read, "Read"}, + {1, &IFile::Write, "Write"}, + {2, nullptr, "Flush"}, + {3, &IFile::SetSize, "SetSize"}, + {4, &IFile::GetSize, "GetSize"}, + {5, nullptr, "OperateRange"}, }; RegisterHandlers(functions); } @@ -227,11 +235,21 @@ public: : ServiceFramework("IFileSystem"), backend(std::move(backend)) { static const FunctionInfo functions[] = { {0, &IFileSystem::CreateFile, "CreateFile"}, + {1, nullptr, "DeleteFile"}, {2, &IFileSystem::CreateDirectory, "CreateDirectory"}, + {3, nullptr, "DeleteDirectory"}, + {4, nullptr, "DeleteDirectoryRecursively"}, + {5, nullptr, "RenameFile"}, + {6, nullptr, "RenameDirectory"}, {7, &IFileSystem::GetEntryType, "GetEntryType"}, {8, &IFileSystem::OpenFile, "OpenFile"}, {9, &IFileSystem::OpenDirectory, "OpenDirectory"}, {10, &IFileSystem::Commit, "Commit"}, + {11, nullptr, "GetFreeSpaceSize"}, + {12, nullptr, "GetTotalSpaceSize"}, + {13, nullptr, "CleanDirectoryRecursively"}, + {14, nullptr, "GetFileTimeStampRaw"}, + {15, nullptr, "QueryEntry"}, }; RegisterHandlers(functions); } @@ -356,14 +374,94 @@ private: FSP_SRV::FSP_SRV() : ServiceFramework("fsp-srv") { static const FunctionInfo functions[] = { + {0, nullptr, "MountContent"}, {1, &FSP_SRV::Initialize, "Initialize"}, + {2, nullptr, "OpenDataFileSystemByCurrentProcess"}, + {7, nullptr, "OpenFileSystemWithPatch"}, + {8, nullptr, "OpenFileSystemWithId"}, + {9, nullptr, "OpenDataFileSystemByApplicationId"}, + {11, nullptr, "OpenBisFileSystem"}, + {12, nullptr, "OpenBisStorage"}, + {13, nullptr, "InvalidateBisCache"}, + {17, nullptr, "OpenHostFileSystem"}, {18, &FSP_SRV::MountSdCard, "MountSdCard"}, + {19, nullptr, "FormatSdCardFileSystem"}, + {21, nullptr, "DeleteSaveDataFileSystem"}, {22, &FSP_SRV::CreateSaveData, "CreateSaveData"}, + {23, nullptr, "CreateSaveDataFileSystemBySystemSaveDataId"}, + {24, nullptr, "RegisterSaveDataFileSystemAtomicDeletion"}, + {25, nullptr, "DeleteSaveDataFileSystemBySaveDataSpaceId"}, + {26, nullptr, "FormatSdCardDryRun"}, + {27, nullptr, "IsExFatSupported"}, + {28, nullptr, "DeleteSaveDataFileSystemBySaveDataAttribute"}, + {30, nullptr, "OpenGameCardStorage"}, + {31, nullptr, "OpenGameCardFileSystem"}, + {32, nullptr, "ExtendSaveDataFileSystem"}, + {33, nullptr, "DeleteCacheStorage"}, + {34, nullptr, "GetCacheStorageSize"}, {51, &FSP_SRV::MountSaveData, "MountSaveData"}, + {52, nullptr, "OpenSaveDataFileSystemBySystemSaveDataId"}, + {53, nullptr, "OpenReadOnlySaveDataFileSystem"}, + {57, nullptr, "ReadSaveDataFileSystemExtraDataBySaveDataSpaceId"}, + {58, nullptr, "ReadSaveDataFileSystemExtraData"}, + {59, nullptr, "WriteSaveDataFileSystemExtraData"}, + {60, nullptr, "OpenSaveDataInfoReader"}, + {61, nullptr, "OpenSaveDataInfoReaderBySaveDataSpaceId"}, + {62, nullptr, "OpenCacheStorageList"}, + {64, nullptr, "OpenSaveDataInternalStorageFileSystem"}, + {65, nullptr, "UpdateSaveDataMacForDebug"}, + {66, nullptr, "WriteSaveDataFileSystemExtraData2"}, + {80, nullptr, "OpenSaveDataMetaFile"}, + {81, nullptr, "OpenSaveDataTransferManager"}, + {82, nullptr, "OpenSaveDataTransferManagerVersion2"}, + {100, nullptr, "OpenImageDirectoryFileSystem"}, + {110, nullptr, "OpenContentStorageFileSystem"}, {200, &FSP_SRV::OpenDataStorageByCurrentProcess, "OpenDataStorageByCurrentProcess"}, + {201, nullptr, "OpenDataStorageByProgramId"}, {202, nullptr, "OpenDataStorageByDataId"}, {203, &FSP_SRV::OpenRomStorage, "OpenRomStorage"}, + {400, nullptr, "OpenDeviceOperator"}, + {500, nullptr, "OpenSdCardDetectionEventNotifier"}, + {501, nullptr, "OpenGameCardDetectionEventNotifier"}, + {510, nullptr, "OpenSystemDataUpdateEventNotifier"}, + {511, nullptr, "NotifySystemDataUpdateEvent"}, + {600, nullptr, "SetCurrentPosixTime"}, + {601, nullptr, "QuerySaveDataTotalSize"}, + {602, nullptr, "VerifySaveDataFileSystem"}, + {603, nullptr, "CorruptSaveDataFileSystem"}, + {604, nullptr, "CreatePaddingFile"}, + {605, nullptr, "DeleteAllPaddingFiles"}, + {606, nullptr, "GetRightsId"}, + {607, nullptr, "RegisterExternalKey"}, + {608, nullptr, "UnregisterAllExternalKey"}, + {609, nullptr, "GetRightsIdByPath"}, + {610, nullptr, "GetRightsIdAndKeyGenerationByPath"}, + {611, nullptr, "SetCurrentPosixTimeWithTimeDifference"}, + {612, nullptr, "GetFreeSpaceSizeForSaveData"}, + {613, nullptr, "VerifySaveDataFileSystemBySaveDataSpaceId"}, + {614, nullptr, "CorruptSaveDataFileSystemBySaveDataSpaceId"}, + {615, nullptr, "QuerySaveDataInternalStorageTotalSize"}, + {620, nullptr, "SetSdCardEncryptionSeed"}, + {630, nullptr, "SetSdCardAccessibility"}, + {631, nullptr, "IsSdCardAccessible"}, + {640, nullptr, "IsSignedSystemPartitionOnSdCardValid"}, + {700, nullptr, "OpenAccessFailureResolver"}, + {701, nullptr, "GetAccessFailureDetectionEvent"}, + {702, nullptr, "IsAccessFailureDetected"}, + {710, nullptr, "ResolveAccessFailure"}, + {720, nullptr, "AbandonAccessFailure"}, + {800, nullptr, "GetAndClearFileSystemProxyErrorInfo"}, + {1000, nullptr, "SetBisRootForHost"}, + {1001, nullptr, "SetSaveDataSize"}, + {1002, nullptr, "SetSaveDataRootPath"}, + {1003, nullptr, "DisableAutoSaveDataCreation"}, + {1004, nullptr, "SetGlobalAccessLogMode"}, {1005, &FSP_SRV::GetGlobalAccessLogMode, "GetGlobalAccessLogMode"}, + {1006, nullptr, "OutputAccessLogToSdCard"}, + {1007, nullptr, "RegisterUpdatePartition"}, + {1008, nullptr, "OpenRegisteredUpdatePartition"}, + {1009, nullptr, "GetAndClearMemoryReportInfo"}, + {1100, nullptr, "OverrideSaveDataTransferTokenSignVerificationKey"}, }; RegisterHandlers(functions); } From 7788178f015898dedae0c9d6575db2aa5df9457d Mon Sep 17 00:00:00 2001 From: Hexagon12 Date: Tue, 10 Apr 2018 20:00:36 +0300 Subject: [PATCH 12/22] Updated friend:a with more service names. --- src/core/hle/service/friend/friend_a.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/hle/service/friend/friend_a.cpp b/src/core/hle/service/friend/friend_a.cpp index e1f2397c27..d64fe846aa 100644 --- a/src/core/hle/service/friend/friend_a.cpp +++ b/src/core/hle/service/friend/friend_a.cpp @@ -10,7 +10,8 @@ namespace Friend { Friend_A::Friend_A(std::shared_ptr module) : Module::Interface(std::move(module), "friend:a") { static const FunctionInfo functions[] = { - {0, &Friend_A::Unknown, "Unknown"}, + {0, &Friend_A::CreateFriendService, "CreateFriendService"}, + {1, nullptr, "CreateNotificationService"}, }; RegisterHandlers(functions); } From be50a6ceefa0e4e12cad12628d554d7966733d36 Mon Sep 17 00:00:00 2001 From: Hexagon12 Date: Tue, 10 Apr 2018 20:01:33 +0300 Subject: [PATCH 13/22] Updated the unknown name --- src/core/hle/service/friend/friend.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/hle/service/friend/friend.cpp b/src/core/hle/service/friend/friend.cpp index fc5adc56d3..051448b2ad 100644 --- a/src/core/hle/service/friend/friend.cpp +++ b/src/core/hle/service/friend/friend.cpp @@ -11,7 +11,7 @@ namespace Service { namespace Friend { -void Module::Interface::Unknown(Kernel::HLERequestContext& ctx) { +void Module::Interface::CreateFriendService(Kernel::HLERequestContext& ctx) { IPC::ResponseBuilder rb{ctx, 2}; rb.Push(RESULT_SUCCESS); LOG_WARNING(Service_Friend, "(STUBBED) called"); From 9e2f30ab4af7d05b5679d61b96a93d7939237cd5 Mon Sep 17 00:00:00 2001 From: Hexagon12 Date: Tue, 10 Apr 2018 20:02:11 +0300 Subject: [PATCH 14/22] Updated friend:u with more service names. --- src/core/hle/service/friend/friend_u.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/hle/service/friend/friend_u.cpp b/src/core/hle/service/friend/friend_u.cpp index 084388e5f1..9a4b05b38a 100644 --- a/src/core/hle/service/friend/friend_u.cpp +++ b/src/core/hle/service/friend/friend_u.cpp @@ -10,7 +10,8 @@ namespace Friend { Friend_U::Friend_U(std::shared_ptr module) : Module::Interface(std::move(module), "friend:u") { static const FunctionInfo functions[] = { - {0, &Friend_U::Unknown, "Unknown"}, + {0, &Friend_U::CreateFriendService, "CreateFriendService"}, + {1, nullptr, "CreateNotificationService"}, }; RegisterHandlers(functions); } From 2d2de1422ee0e13ba69baa594f1fd372b15472bb Mon Sep 17 00:00:00 2001 From: Hexagon12 Date: Tue, 10 Apr 2018 20:17:22 +0300 Subject: [PATCH 15/22] Updated hid with more service names. --- src/core/hle/service/hid/hid.cpp | 50 ++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp index 019a094443..868ac6f46d 100644 --- a/src/core/hle/service/hid/hid.cpp +++ b/src/core/hle/service/hid/hid.cpp @@ -198,25 +198,75 @@ public: {11, &Hid::ActivateTouchScreen, "ActivateTouchScreen"}, {21, &Hid::ActivateMouse, "ActivateMouse"}, {31, &Hid::ActivateKeyboard, "ActivateKeyboard"}, + {40, nullptr, "AcquireXpadIdEventHandle"}, + {41, nullptr, "ReleaseXpadIdEventHandle"}, + {51, nullptr, "ActivateXpad"}, + {55, nullptr, "GetXpadIds"}, + {56, nullptr, "ActivateJoyXpad"}, + {58, nullptr, "GetJoyXpadLifoHandle"}, + {59, nullptr, "GetJoyXpadIds"}, + {60, nullptr, "ActivateSixAxisSensor"}, + {61, nullptr, "DeactivateSixAxisSensor"}, + {62, nullptr, "GetSixAxisSensorLifoHandle"}, + {63, nullptr, "ActivateJoySixAxisSensor"}, + {64, nullptr, "DeactivateJoySixAxisSensor"}, + {65, nullptr, "GetJoySixAxisSensorLifoHandle"}, {66, &Hid::StartSixAxisSensor, "StartSixAxisSensor"}, + {67, nullptr, "StopSixAxisSensor"}, + {68, nullptr, "IsSixAxisSensorFusionEnabled"}, + {69, nullptr, "EnableSixAxisSensorFusion"}, + {70, nullptr, "SetSixAxisSensorFusionParameters"}, + {71, nullptr, "GetSixAxisSensorFusionParameters"}, + {72, nullptr, "ResetSixAxisSensorFusionParameters"}, + {73, nullptr, "SetAccelerometerParameters"}, + {74, nullptr, "GetAccelerometerParameters"}, + {75, nullptr, "ResetAccelerometerParameters"}, + {76, nullptr, "SetAccelerometerPlayMode"}, + {77, nullptr, "GetAccelerometerPlayMode"}, + {78, nullptr, "ResetAccelerometerPlayMode"}, {79, &Hid::SetGyroscopeZeroDriftMode, "SetGyroscopeZeroDriftMode"}, + {80, nullptr, "GetGyroscopeZeroDriftMode"}, + {81, nullptr, "ResetGyroscopeZeroDriftMode"}, + {82, nullptr, "IsSixAxisSensorAtRest"}, + {91, nullptr, "ActivateGesture"}, {100, &Hid::SetSupportedNpadStyleSet, "SetSupportedNpadStyleSet"}, {101, &Hid::GetSupportedNpadStyleSet, "GetSupportedNpadStyleSet"}, {102, &Hid::SetSupportedNpadIdType, "SetSupportedNpadIdType"}, {103, &Hid::ActivateNpad, "ActivateNpad"}, + {104, nullptr, "DeactivateNpad"}, {106, &Hid::AcquireNpadStyleSetUpdateEventHandle, "AcquireNpadStyleSetUpdateEventHandle"}, + {107, nullptr, "DisconnectNpad"}, + {108, nullptr, "GetPlayerLedPattern"}, {120, &Hid::SetNpadJoyHoldType, "SetNpadJoyHoldType"}, {121, &Hid::GetNpadJoyHoldType, "GetNpadJoyHoldType"}, {122, &Hid::SetNpadJoyAssignmentModeSingleByDefault, "SetNpadJoyAssignmentModeSingleByDefault"}, + {123, nullptr, "SetNpadJoyAssignmentModeSingleByDefault"}, {124, &Hid::SetNpadJoyAssignmentModeDual, "SetNpadJoyAssignmentModeDual"}, + {125, nullptr, "MergeSingleJoyAsDualJoy"}, + {126, nullptr, "StartLrAssignmentMode"}, + {127, nullptr, "StopLrAssignmentMode"}, {128, &Hid::SetNpadHandheldActivationMode, "SetNpadHandheldActivationMode"}, + {129, nullptr, "GetNpadHandheldActivationMode"}, + {130, nullptr, "SwapNpadAssignment"}, + {131, nullptr, "IsUnintendedHomeButtonInputProtectionEnabled"}, + {132, nullptr, "EnableUnintendedHomeButtonInputProtection"}, {200, &Hid::GetVibrationDeviceInfo, "GetVibrationDeviceInfo"}, {201, &Hid::SendVibrationValue, "SendVibrationValue"}, {202, &Hid::GetActualVibrationValue, "GetActualVibrationValue"}, {203, &Hid::CreateActiveVibrationDeviceList, "CreateActiveVibrationDeviceList"}, + {204, nullptr, "PermitVibration"}, + {205, nullptr, "IsVibrationPermitted"}, {206, &Hid::SendVibrationValues, "SendVibrationValues"}, + {300, nullptr, "ActivateConsoleSixAxisSensor"}, + {301, nullptr, "StartConsoleSixAxisSensor"}, + {302, nullptr, "StopConsoleSixAxisSensor"}, + {400, nullptr, "IsUsbFullKeyControllerEnabled"}, + {401, nullptr, "EnableUsbFullKeyController"}, + {402, nullptr, "IsUsbFullKeyControllerConnected"}, + {1000, nullptr, "SetNpadCommunicationMode"}, + {1001, nullptr, "GetNpadCommunicationMode"}, }; RegisterHandlers(functions); From ac50d2cd60ef5cb0a2136be85e621a1c73aa88e2 Mon Sep 17 00:00:00 2001 From: Hexagon12 Date: Tue, 10 Apr 2018 20:23:21 +0300 Subject: [PATCH 16/22] Updated pl:u with more service names. --- src/core/hle/service/ns/pl_u.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/hle/service/ns/pl_u.cpp b/src/core/hle/service/ns/pl_u.cpp index ef3c7799a0..d5e0b5f147 100644 --- a/src/core/hle/service/ns/pl_u.cpp +++ b/src/core/hle/service/ns/pl_u.cpp @@ -37,7 +37,9 @@ PL_U::PL_U() : ServiceFramework("pl:u") { {1, &PL_U::GetLoadState, "GetLoadState"}, {2, &PL_U::GetSize, "GetSize"}, {3, &PL_U::GetSharedMemoryAddressOffset, "GetSharedMemoryAddressOffset"}, - {4, &PL_U::GetSharedMemoryNativeHandle, "GetSharedMemoryNativeHandle"}}; + {4, &PL_U::GetSharedMemoryNativeHandle, "GetSharedMemoryNativeHandle"}, + {5, nullptr, "GetSharedFontInOrderOfPriority"}, + }; RegisterHandlers(functions); // Attempt to load shared font data from disk From 4d1a2509dfb1c45406010df1cdf36675d3d7fec7 Mon Sep 17 00:00:00 2001 From: Hexagon12 Date: Tue, 10 Apr 2018 20:26:49 +0300 Subject: [PATCH 17/22] Updated nvdrv with more service names. --- src/core/hle/service/nvdrv/interface.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/core/hle/service/nvdrv/interface.cpp b/src/core/hle/service/nvdrv/interface.cpp index c70370f1f4..567c2cd7c4 100644 --- a/src/core/hle/service/nvdrv/interface.cpp +++ b/src/core/hle/service/nvdrv/interface.cpp @@ -96,7 +96,14 @@ NVDRV::NVDRV(std::shared_ptr nvdrv, const char* name) {2, &NVDRV::Close, "Close"}, {3, &NVDRV::Initialize, "Initialize"}, {4, &NVDRV::QueryEvent, "QueryEvent"}, + {5, nullptr, "MapSharedMem"}, + {6, nullptr, "GetStatus"}, + {7, nullptr, "ForceSetClientPID"}, {8, &NVDRV::SetClientPID, "SetClientPID"}, + {9, nullptr, "DumpGraphicsMemoryInfo"}, + {10, nullptr, "InitializeDevtools"}, + {11, nullptr, "Ioctl2"}, + {12, nullptr, "Ioctl3"}, {13, &NVDRV::FinishInitialize, "FinishInitialize"}, }; RegisterHandlers(functions); From 177bdb94df763e4f509989bc09ceb3ecf2aeb8c4 Mon Sep 17 00:00:00 2001 From: Hexagon12 Date: Tue, 10 Apr 2018 20:28:15 +0300 Subject: [PATCH 18/22] Updated nvmemp with new service names. --- src/core/hle/service/nvdrv/nvmemp.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/hle/service/nvdrv/nvmemp.cpp b/src/core/hle/service/nvdrv/nvmemp.cpp index 5a13732c7e..35d6c0c134 100644 --- a/src/core/hle/service/nvdrv/nvmemp.cpp +++ b/src/core/hle/service/nvdrv/nvmemp.cpp @@ -13,17 +13,17 @@ namespace Nvidia { NVMEMP::NVMEMP() : ServiceFramework("nvmemp") { static const FunctionInfo functions[] = { - {0, &NVMEMP::Unknown0, "Unknown0"}, - {1, &NVMEMP::Unknown1, "Unknown1"}, + {0, &NVMEMP::Cmd0, "Cmd0"}, + {1, &NVMEMP::Cmd1, "Cmd1"}, }; RegisterHandlers(functions); } -void NVMEMP::Unknown0(Kernel::HLERequestContext& ctx) { +void NVMEMP::Cmd0(Kernel::HLERequestContext& ctx) { UNIMPLEMENTED(); } -void NVMEMP::Unknown1(Kernel::HLERequestContext& ctx) { +void NVMEMP::Cmd1(Kernel::HLERequestContext& ctx) { UNIMPLEMENTED(); } From 88f1fe79c64cd2d95c693ace5925e8c8d7395dc1 Mon Sep 17 00:00:00 2001 From: Hexagon12 Date: Tue, 10 Apr 2018 21:03:23 +0300 Subject: [PATCH 19/22] Updated pctl:a with new service names. --- src/core/hle/service/pctl/pctl_a.cpp | 105 ++++++++++++++++++++++++++- 1 file changed, 101 insertions(+), 4 deletions(-) diff --git a/src/core/hle/service/pctl/pctl_a.cpp b/src/core/hle/service/pctl/pctl_a.cpp index c65fffa070..3d04741057 100644 --- a/src/core/hle/service/pctl/pctl_a.cpp +++ b/src/core/hle/service/pctl/pctl_a.cpp @@ -11,10 +11,106 @@ namespace PCTL { class IParentalControlService final : public ServiceFramework { public: - IParentalControlService() : ServiceFramework("IParentalControlService") {} -}; + IParentalControlService() : ServiceFramework("IParentalControlService") { + static const FunctionInfo functions[] = { + {1, nullptr, "Initialize"}, + {1001, nullptr, "CheckFreeCommunicationPermission"}, + {1002, nullptr, "ConfirmLaunchApplicationPermission"}, + {1003, nullptr, "ConfirmResumeApplicationPermission"}, + {1004, nullptr, "ConfirmSnsPostPermission"}, + {1005, nullptr, "ConfirmSystemSettingsPermission"}, + {1006, nullptr, "IsRestrictionTemporaryUnlocked"}, + {1007, nullptr, "RevertRestrictionTemporaryUnlocked"}, + {1008, nullptr, "EnterRestrictedSystemSettings"}, + {1009, nullptr, "LeaveRestrictedSystemSettings"}, + {1010, nullptr, "IsRestrictedSystemSettingsEntered"}, + {1011, nullptr, "RevertRestrictedSystemSettingsEntered"}, + {1012, nullptr, "GetRestrictedFeatures"}, + {1013, nullptr, "ConfirmStereoVisionPermission"}, + {1014, nullptr, "ConfirmPlayableApplicationVideoOld"}, + {1015, nullptr, "ConfirmPlayableApplicationVideo"}, + {1031, nullptr, "IsRestrictionEnabled"}, + {1032, nullptr, "GetSafetyLevel"}, + {1033, nullptr, "SetSafetyLevel"}, + {1034, nullptr, "GetSafetyLevelSettings"}, + {1035, nullptr, "GetCurrentSettings"}, + {1036, nullptr, "SetCustomSafetyLevelSettings"}, + {1037, nullptr, "GetDefaultRatingOrganization"}, + {1038, nullptr, "SetDefaultRatingOrganization"}, + {1039, nullptr, "GetFreeCommunicationApplicationListCount"}, + {1042, nullptr, "AddToFreeCommunicationApplicationList"}, + {1043, nullptr, "DeleteSettings"}, + {1044, nullptr, "GetFreeCommunicationApplicationList"}, + {1045, nullptr, "UpdateFreeCommunicationApplicationList"}, + {1046, nullptr, "DisableFeaturesForReset"}, + {1047, nullptr, "NotifyApplicationDownloadStarted"}, + {1061, nullptr, "ConfirmStereoVisionRestrictionConfigurable"}, + {1062, nullptr, "GetStereoVisionRestriction"}, + {1063, nullptr, "SetStereoVisionRestriction"}, + {1064, nullptr, "ResetConfirmedStereoVisionPermission"}, + {1065, nullptr, "IsStereoVisionPermitted"}, + {1201, nullptr, "UnlockRestrictionTemporarily"}, + {1202, nullptr, "UnlockSystemSettingsRestriction"}, + {1203, nullptr, "SetPinCode"}, + {1204, nullptr, "GenerateInquiryCode"}, + {1205, nullptr, "CheckMasterKey"}, + {1206, nullptr, "GetPinCodeLength"}, + {1207, nullptr, "GetPinCodeChangedEvent"}, + {1208, nullptr, "GetPinCode"}, + {1403, nullptr, "IsPairingActive"}, + {1406, nullptr, "GetSettingsLastUpdated"}, + {1411, nullptr, "GetPairingAccountInfo"}, + {1421, nullptr, "GetAccountNickname"}, + {1424, nullptr, "GetAccountState"}, + {1432, nullptr, "GetSynchronizationEvent"}, + {1451, nullptr, "StartPlayTimer"}, + {1452, nullptr, "StopPlayTimer"}, + {1453, nullptr, "IsPlayTimerEnabled"}, + {1454, nullptr, "GetPlayTimerRemainingTime"}, + {1455, nullptr, "IsRestrictedByPlayTimer"}, + {1456, nullptr, "GetPlayTimerSettings"}, + {1457, nullptr, "GetPlayTimerEventToRequestSuspension"}, + {1458, nullptr, "IsPlayTimerAlarmDisabled"}, + {1471, nullptr, "NotifyWrongPinCodeInputManyTimes"}, + {1472, nullptr, "CancelNetworkRequest"}, + {1473, nullptr, "GetUnlinkedEvent"}, + {1474, nullptr, "ClearUnlinkedEvent"}, + {1601, nullptr, "DisableAllFeatures"}, + {1602, nullptr, "PostEnableAllFeatures"}, + {1603, nullptr, "IsAllFeaturesDisabled"}, + {1901, nullptr, "DeleteFromFreeCommunicationApplicationListForDebug"}, + {1902, nullptr, "ClearFreeCommunicationApplicationListForDebug"}, + {1903, nullptr, "GetExemptApplicationListCountForDebug"}, + {1904, nullptr, "GetExemptApplicationListForDebug"}, + {1905, nullptr, "UpdateExemptApplicationListForDebug"}, + {1906, nullptr, "AddToExemptApplicationListForDebug"}, + {1907, nullptr, "DeleteFromExemptApplicationListForDebug"}, + {1908, nullptr, "ClearExemptApplicationListForDebug"}, + {1941, nullptr, "DeletePairing"}, + {1951, nullptr, "SetPlayTimerSettingsForDebug"}, + {1952, nullptr, "GetPlayTimerSpentTimeForTest"}, + {1953, nullptr, "SetPlayTimerAlarmDisabledForDebug"}, + {2001, nullptr, "RequestPairingAsync"}, + {2002, nullptr, "FinishRequestPairing"}, + {2003, nullptr, "AuthorizePairingAsync"}, + {2004, nullptr, "FinishAuthorizePairing"}, + {2005, nullptr, "RetrievePairingInfoAsync"}, + {2006, nullptr, "FinishRetrievePairingInfo"}, + {2007, nullptr, "UnlinkPairingAsync"}, + {2008, nullptr, "FinishUnlinkPairing"}, + {2009, nullptr, "GetAccountMiiImageAsync"}, + {2010, nullptr, "FinishGetAccountMiiImage"}, + {2011, nullptr, "GetAccountMiiImageContentTypeAsync"}, + {2012, nullptr, "FinishGetAccountMiiImageContentType"}, + {2013, nullptr, "SynchronizeParentalControlSettingsAsync"}, + {2014, nullptr, "FinishSynchronizeParentalControlSettings"}, + {2015, nullptr, "FinishSynchronizeParentalControlSettingsWithLastUpdated"}, + {2016, nullptr, "RequestUpdateExemptionListAsync"}, + }; + RegisterHandlers(functions); +} -void PCTL_A::GetService(Kernel::HLERequestContext& ctx) { +void PCTL_A::CreateService(Kernel::HLERequestContext& ctx) { IPC::ResponseBuilder rb{ctx, 2, 0, 1}; rb.Push(RESULT_SUCCESS); rb.PushIpcInterface(); @@ -23,7 +119,8 @@ void PCTL_A::GetService(Kernel::HLERequestContext& ctx) { PCTL_A::PCTL_A() : ServiceFramework("pctl:a") { static const FunctionInfo functions[] = { - {0, &PCTL_A::GetService, "GetService"}, + {0, &PCTL_A::CreateService, "CreateService"}, + {1, nullptr, "CreateServiceWithoutInitialize"}, }; RegisterHandlers(functions); } From a155d3b7ff6214ba75ee381d3540e8bd9bc04834 Mon Sep 17 00:00:00 2001 From: Hexagon12 Date: Tue, 10 Apr 2018 21:21:00 +0300 Subject: [PATCH 20/22] Decimal change --- src/core/hle/service/audio/audin_u.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/hle/service/audio/audin_u.cpp b/src/core/hle/service/audio/audin_u.cpp index f312c57785..3c495b3a05 100644 --- a/src/core/hle/service/audio/audin_u.cpp +++ b/src/core/hle/service/audio/audin_u.cpp @@ -36,10 +36,10 @@ public: AudInU::AudInU() : ServiceFramework("audin:u") { static const FunctionInfo functions[] = { - {0x00000000, nullptr, "ListAudioIns"}, - {0x00000001, nullptr, "OpenAudioIn"}, - {0x00000003, nullptr, "OpenAudioInAuto"}, - {0x00000004, nullptr, "ListAudioInsAuto"}, + {0, nullptr, "ListAudioIns"}, + {1, nullptr, "OpenAudioIn"}, + {3, nullptr, "OpenAudioInAuto"}, + {4, nullptr, "ListAudioInsAuto"}, }; RegisterHandlers(functions); } From cc89b7bfcbe3448c8ca3e224b8d3fa628214748e Mon Sep 17 00:00:00 2001 From: Hexagon12 Date: Wed, 11 Apr 2018 14:48:56 +0300 Subject: [PATCH 21/22] Various fixes and clang --- src/core/hle/service/am/am.cpp | 2 +- src/core/hle/service/filesystem/fsp_srv.cpp | 17 +- src/core/hle/service/friend/friend.h | 2 +- src/core/hle/service/nvdrv/nvmemp.h | 4 +- src/core/hle/service/pctl/pctl_a.cpp | 196 ++++++++++---------- src/core/hle/service/pctl/pctl_a.h | 2 +- 6 files changed, 108 insertions(+), 115 deletions(-) diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index cda1f419a3..bfc431e885 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp @@ -109,7 +109,7 @@ ISelfController::ISelfController(std::shared_ptr nvflinger {61, nullptr, "SetMediaPlaybackState"}, {62, nullptr, "SetIdleTimeDetectionExtension"}, {63, nullptr, "GetIdleTimeDetectionExtension"}, - {64, nullptr, "SetInputDetectionSourceSet"} + {64, nullptr, "SetInputDetectionSourceSet"}, {65, nullptr, "ReportUserIsActive"}, {66, nullptr, "GetCurrentIlluminance"}, {67, nullptr, "IsIlluminanceAvailable"}, diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp index 92e48a7573..48c45b1b42 100644 --- a/src/core/hle/service/filesystem/fsp_srv.cpp +++ b/src/core/hle/service/filesystem/fsp_srv.cpp @@ -22,12 +22,8 @@ public: IStorage(std::unique_ptr&& backend) : ServiceFramework("IStorage"), backend(std::move(backend)) { static const FunctionInfo functions[] = { - {0, &IStorage::Read, "Read"}, - {1, nullptr, "Write"}, - {2, nullptr, "Flush"}, - {3, nullptr, "SetSize"}, - {4, nullptr, "GetSize"}, - {5, nullptr, "OperateRange"}, + {0, &IStorage::Read, "Read"}, {1, nullptr, "Write"}, {2, nullptr, "Flush"}, + {3, nullptr, "SetSize"}, {4, nullptr, "GetSize"}, {5, nullptr, "OperateRange"}, }; RegisterHandlers(functions); } @@ -76,12 +72,9 @@ public: explicit IFile(std::unique_ptr&& backend) : ServiceFramework("IFile"), backend(std::move(backend)) { static const FunctionInfo functions[] = { - {0, &IFile::Read, "Read"}, - {1, &IFile::Write, "Write"}, - {2, nullptr, "Flush"}, - {3, &IFile::SetSize, "SetSize"}, - {4, &IFile::GetSize, "GetSize"}, - {5, nullptr, "OperateRange"}, + {0, &IFile::Read, "Read"}, {1, &IFile::Write, "Write"}, + {2, nullptr, "Flush"}, {3, &IFile::SetSize, "SetSize"}, + {4, &IFile::GetSize, "GetSize"}, {5, nullptr, "OperateRange"}, }; RegisterHandlers(functions); } diff --git a/src/core/hle/service/friend/friend.h b/src/core/hle/service/friend/friend.h index ffa498397e..2b21b4e156 100644 --- a/src/core/hle/service/friend/friend.h +++ b/src/core/hle/service/friend/friend.h @@ -15,7 +15,7 @@ public: public: Interface(std::shared_ptr module, const char* name); - void Unknown(Kernel::HLERequestContext& ctx); + void CreateFriendService(Kernel::HLERequestContext& ctx); protected: std::shared_ptr module; diff --git a/src/core/hle/service/nvdrv/nvmemp.h b/src/core/hle/service/nvdrv/nvmemp.h index a6b5fbb827..fb16026b0d 100644 --- a/src/core/hle/service/nvdrv/nvmemp.h +++ b/src/core/hle/service/nvdrv/nvmemp.h @@ -15,8 +15,8 @@ public: ~NVMEMP() = default; private: - void Unknown0(Kernel::HLERequestContext& ctx); - void Unknown1(Kernel::HLERequestContext& ctx); + void Cmd0(Kernel::HLERequestContext& ctx); + void Cmd1(Kernel::HLERequestContext& ctx); }; } // namespace Nvidia diff --git a/src/core/hle/service/pctl/pctl_a.cpp b/src/core/hle/service/pctl/pctl_a.cpp index 3d04741057..4e644be648 100644 --- a/src/core/hle/service/pctl/pctl_a.cpp +++ b/src/core/hle/service/pctl/pctl_a.cpp @@ -12,104 +12,104 @@ namespace PCTL { class IParentalControlService final : public ServiceFramework { public: IParentalControlService() : ServiceFramework("IParentalControlService") { - static const FunctionInfo functions[] = { - {1, nullptr, "Initialize"}, - {1001, nullptr, "CheckFreeCommunicationPermission"}, - {1002, nullptr, "ConfirmLaunchApplicationPermission"}, - {1003, nullptr, "ConfirmResumeApplicationPermission"}, - {1004, nullptr, "ConfirmSnsPostPermission"}, - {1005, nullptr, "ConfirmSystemSettingsPermission"}, - {1006, nullptr, "IsRestrictionTemporaryUnlocked"}, - {1007, nullptr, "RevertRestrictionTemporaryUnlocked"}, - {1008, nullptr, "EnterRestrictedSystemSettings"}, - {1009, nullptr, "LeaveRestrictedSystemSettings"}, - {1010, nullptr, "IsRestrictedSystemSettingsEntered"}, - {1011, nullptr, "RevertRestrictedSystemSettingsEntered"}, - {1012, nullptr, "GetRestrictedFeatures"}, - {1013, nullptr, "ConfirmStereoVisionPermission"}, - {1014, nullptr, "ConfirmPlayableApplicationVideoOld"}, - {1015, nullptr, "ConfirmPlayableApplicationVideo"}, - {1031, nullptr, "IsRestrictionEnabled"}, - {1032, nullptr, "GetSafetyLevel"}, - {1033, nullptr, "SetSafetyLevel"}, - {1034, nullptr, "GetSafetyLevelSettings"}, - {1035, nullptr, "GetCurrentSettings"}, - {1036, nullptr, "SetCustomSafetyLevelSettings"}, - {1037, nullptr, "GetDefaultRatingOrganization"}, - {1038, nullptr, "SetDefaultRatingOrganization"}, - {1039, nullptr, "GetFreeCommunicationApplicationListCount"}, - {1042, nullptr, "AddToFreeCommunicationApplicationList"}, - {1043, nullptr, "DeleteSettings"}, - {1044, nullptr, "GetFreeCommunicationApplicationList"}, - {1045, nullptr, "UpdateFreeCommunicationApplicationList"}, - {1046, nullptr, "DisableFeaturesForReset"}, - {1047, nullptr, "NotifyApplicationDownloadStarted"}, - {1061, nullptr, "ConfirmStereoVisionRestrictionConfigurable"}, - {1062, nullptr, "GetStereoVisionRestriction"}, - {1063, nullptr, "SetStereoVisionRestriction"}, - {1064, nullptr, "ResetConfirmedStereoVisionPermission"}, - {1065, nullptr, "IsStereoVisionPermitted"}, - {1201, nullptr, "UnlockRestrictionTemporarily"}, - {1202, nullptr, "UnlockSystemSettingsRestriction"}, - {1203, nullptr, "SetPinCode"}, - {1204, nullptr, "GenerateInquiryCode"}, - {1205, nullptr, "CheckMasterKey"}, - {1206, nullptr, "GetPinCodeLength"}, - {1207, nullptr, "GetPinCodeChangedEvent"}, - {1208, nullptr, "GetPinCode"}, - {1403, nullptr, "IsPairingActive"}, - {1406, nullptr, "GetSettingsLastUpdated"}, - {1411, nullptr, "GetPairingAccountInfo"}, - {1421, nullptr, "GetAccountNickname"}, - {1424, nullptr, "GetAccountState"}, - {1432, nullptr, "GetSynchronizationEvent"}, - {1451, nullptr, "StartPlayTimer"}, - {1452, nullptr, "StopPlayTimer"}, - {1453, nullptr, "IsPlayTimerEnabled"}, - {1454, nullptr, "GetPlayTimerRemainingTime"}, - {1455, nullptr, "IsRestrictedByPlayTimer"}, - {1456, nullptr, "GetPlayTimerSettings"}, - {1457, nullptr, "GetPlayTimerEventToRequestSuspension"}, - {1458, nullptr, "IsPlayTimerAlarmDisabled"}, - {1471, nullptr, "NotifyWrongPinCodeInputManyTimes"}, - {1472, nullptr, "CancelNetworkRequest"}, - {1473, nullptr, "GetUnlinkedEvent"}, - {1474, nullptr, "ClearUnlinkedEvent"}, - {1601, nullptr, "DisableAllFeatures"}, - {1602, nullptr, "PostEnableAllFeatures"}, - {1603, nullptr, "IsAllFeaturesDisabled"}, - {1901, nullptr, "DeleteFromFreeCommunicationApplicationListForDebug"}, - {1902, nullptr, "ClearFreeCommunicationApplicationListForDebug"}, - {1903, nullptr, "GetExemptApplicationListCountForDebug"}, - {1904, nullptr, "GetExemptApplicationListForDebug"}, - {1905, nullptr, "UpdateExemptApplicationListForDebug"}, - {1906, nullptr, "AddToExemptApplicationListForDebug"}, - {1907, nullptr, "DeleteFromExemptApplicationListForDebug"}, - {1908, nullptr, "ClearExemptApplicationListForDebug"}, - {1941, nullptr, "DeletePairing"}, - {1951, nullptr, "SetPlayTimerSettingsForDebug"}, - {1952, nullptr, "GetPlayTimerSpentTimeForTest"}, - {1953, nullptr, "SetPlayTimerAlarmDisabledForDebug"}, - {2001, nullptr, "RequestPairingAsync"}, - {2002, nullptr, "FinishRequestPairing"}, - {2003, nullptr, "AuthorizePairingAsync"}, - {2004, nullptr, "FinishAuthorizePairing"}, - {2005, nullptr, "RetrievePairingInfoAsync"}, - {2006, nullptr, "FinishRetrievePairingInfo"}, - {2007, nullptr, "UnlinkPairingAsync"}, - {2008, nullptr, "FinishUnlinkPairing"}, - {2009, nullptr, "GetAccountMiiImageAsync"}, - {2010, nullptr, "FinishGetAccountMiiImage"}, - {2011, nullptr, "GetAccountMiiImageContentTypeAsync"}, - {2012, nullptr, "FinishGetAccountMiiImageContentType"}, - {2013, nullptr, "SynchronizeParentalControlSettingsAsync"}, - {2014, nullptr, "FinishSynchronizeParentalControlSettings"}, - {2015, nullptr, "FinishSynchronizeParentalControlSettingsWithLastUpdated"}, - {2016, nullptr, "RequestUpdateExemptionListAsync"}, - }; - RegisterHandlers(functions); -} - + static const FunctionInfo functions[] = { + {1, nullptr, "Initialize"}, + {1001, nullptr, "CheckFreeCommunicationPermission"}, + {1002, nullptr, "ConfirmLaunchApplicationPermission"}, + {1003, nullptr, "ConfirmResumeApplicationPermission"}, + {1004, nullptr, "ConfirmSnsPostPermission"}, + {1005, nullptr, "ConfirmSystemSettingsPermission"}, + {1006, nullptr, "IsRestrictionTemporaryUnlocked"}, + {1007, nullptr, "RevertRestrictionTemporaryUnlocked"}, + {1008, nullptr, "EnterRestrictedSystemSettings"}, + {1009, nullptr, "LeaveRestrictedSystemSettings"}, + {1010, nullptr, "IsRestrictedSystemSettingsEntered"}, + {1011, nullptr, "RevertRestrictedSystemSettingsEntered"}, + {1012, nullptr, "GetRestrictedFeatures"}, + {1013, nullptr, "ConfirmStereoVisionPermission"}, + {1014, nullptr, "ConfirmPlayableApplicationVideoOld"}, + {1015, nullptr, "ConfirmPlayableApplicationVideo"}, + {1031, nullptr, "IsRestrictionEnabled"}, + {1032, nullptr, "GetSafetyLevel"}, + {1033, nullptr, "SetSafetyLevel"}, + {1034, nullptr, "GetSafetyLevelSettings"}, + {1035, nullptr, "GetCurrentSettings"}, + {1036, nullptr, "SetCustomSafetyLevelSettings"}, + {1037, nullptr, "GetDefaultRatingOrganization"}, + {1038, nullptr, "SetDefaultRatingOrganization"}, + {1039, nullptr, "GetFreeCommunicationApplicationListCount"}, + {1042, nullptr, "AddToFreeCommunicationApplicationList"}, + {1043, nullptr, "DeleteSettings"}, + {1044, nullptr, "GetFreeCommunicationApplicationList"}, + {1045, nullptr, "UpdateFreeCommunicationApplicationList"}, + {1046, nullptr, "DisableFeaturesForReset"}, + {1047, nullptr, "NotifyApplicationDownloadStarted"}, + {1061, nullptr, "ConfirmStereoVisionRestrictionConfigurable"}, + {1062, nullptr, "GetStereoVisionRestriction"}, + {1063, nullptr, "SetStereoVisionRestriction"}, + {1064, nullptr, "ResetConfirmedStereoVisionPermission"}, + {1065, nullptr, "IsStereoVisionPermitted"}, + {1201, nullptr, "UnlockRestrictionTemporarily"}, + {1202, nullptr, "UnlockSystemSettingsRestriction"}, + {1203, nullptr, "SetPinCode"}, + {1204, nullptr, "GenerateInquiryCode"}, + {1205, nullptr, "CheckMasterKey"}, + {1206, nullptr, "GetPinCodeLength"}, + {1207, nullptr, "GetPinCodeChangedEvent"}, + {1208, nullptr, "GetPinCode"}, + {1403, nullptr, "IsPairingActive"}, + {1406, nullptr, "GetSettingsLastUpdated"}, + {1411, nullptr, "GetPairingAccountInfo"}, + {1421, nullptr, "GetAccountNickname"}, + {1424, nullptr, "GetAccountState"}, + {1432, nullptr, "GetSynchronizationEvent"}, + {1451, nullptr, "StartPlayTimer"}, + {1452, nullptr, "StopPlayTimer"}, + {1453, nullptr, "IsPlayTimerEnabled"}, + {1454, nullptr, "GetPlayTimerRemainingTime"}, + {1455, nullptr, "IsRestrictedByPlayTimer"}, + {1456, nullptr, "GetPlayTimerSettings"}, + {1457, nullptr, "GetPlayTimerEventToRequestSuspension"}, + {1458, nullptr, "IsPlayTimerAlarmDisabled"}, + {1471, nullptr, "NotifyWrongPinCodeInputManyTimes"}, + {1472, nullptr, "CancelNetworkRequest"}, + {1473, nullptr, "GetUnlinkedEvent"}, + {1474, nullptr, "ClearUnlinkedEvent"}, + {1601, nullptr, "DisableAllFeatures"}, + {1602, nullptr, "PostEnableAllFeatures"}, + {1603, nullptr, "IsAllFeaturesDisabled"}, + {1901, nullptr, "DeleteFromFreeCommunicationApplicationListForDebug"}, + {1902, nullptr, "ClearFreeCommunicationApplicationListForDebug"}, + {1903, nullptr, "GetExemptApplicationListCountForDebug"}, + {1904, nullptr, "GetExemptApplicationListForDebug"}, + {1905, nullptr, "UpdateExemptApplicationListForDebug"}, + {1906, nullptr, "AddToExemptApplicationListForDebug"}, + {1907, nullptr, "DeleteFromExemptApplicationListForDebug"}, + {1908, nullptr, "ClearExemptApplicationListForDebug"}, + {1941, nullptr, "DeletePairing"}, + {1951, nullptr, "SetPlayTimerSettingsForDebug"}, + {1952, nullptr, "GetPlayTimerSpentTimeForTest"}, + {1953, nullptr, "SetPlayTimerAlarmDisabledForDebug"}, + {2001, nullptr, "RequestPairingAsync"}, + {2002, nullptr, "FinishRequestPairing"}, + {2003, nullptr, "AuthorizePairingAsync"}, + {2004, nullptr, "FinishAuthorizePairing"}, + {2005, nullptr, "RetrievePairingInfoAsync"}, + {2006, nullptr, "FinishRetrievePairingInfo"}, + {2007, nullptr, "UnlinkPairingAsync"}, + {2008, nullptr, "FinishUnlinkPairing"}, + {2009, nullptr, "GetAccountMiiImageAsync"}, + {2010, nullptr, "FinishGetAccountMiiImage"}, + {2011, nullptr, "GetAccountMiiImageContentTypeAsync"}, + {2012, nullptr, "FinishGetAccountMiiImageContentType"}, + {2013, nullptr, "SynchronizeParentalControlSettingsAsync"}, + {2014, nullptr, "FinishSynchronizeParentalControlSettings"}, + {2015, nullptr, "FinishSynchronizeParentalControlSettingsWithLastUpdated"}, + {2016, nullptr, "RequestUpdateExemptionListAsync"}, + }; + RegisterHandlers(functions); + } +}; void PCTL_A::CreateService(Kernel::HLERequestContext& ctx) { IPC::ResponseBuilder rb{ctx, 2, 0, 1}; rb.Push(RESULT_SUCCESS); diff --git a/src/core/hle/service/pctl/pctl_a.h b/src/core/hle/service/pctl/pctl_a.h index a89c8d07df..3aa8873a9c 100644 --- a/src/core/hle/service/pctl/pctl_a.h +++ b/src/core/hle/service/pctl/pctl_a.h @@ -15,7 +15,7 @@ public: ~PCTL_A() = default; private: - void GetService(Kernel::HLERequestContext& ctx); + void CreateService(Kernel::HLERequestContext& ctx); }; } // namespace PCTL From 39f75350bbb43ddf999ce8c71cab7030488b5084 Mon Sep 17 00:00:00 2001 From: mailwl Date: Tue, 10 Apr 2018 21:40:53 +0300 Subject: [PATCH 22/22] Service/SSL: update service according switchbrew --- src/core/hle/service/ssl/ssl.cpp | 96 +++++++++++++++++++++++++++++++- src/core/hle/service/ssl/ssl.h | 3 + 2 files changed, 98 insertions(+), 1 deletion(-) diff --git a/src/core/hle/service/ssl/ssl.cpp b/src/core/hle/service/ssl/ssl.cpp index afa8d5d794..01a03ec839 100644 --- a/src/core/hle/service/ssl/ssl.cpp +++ b/src/core/hle/service/ssl/ssl.cpp @@ -2,12 +2,106 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#include "core/hle/ipc_helpers.h" #include "core/hle/service/ssl/ssl.h" namespace Service { namespace SSL { -SSL::SSL() : ServiceFramework("ssl") {} +class ISslConnection final : public ServiceFramework { +public: + ISslConnection() : ServiceFramework("ISslConnection") { + static const FunctionInfo functions[] = { + {0, nullptr, "SetSocketDescriptor"}, + {1, nullptr, "SetHostName"}, + {2, nullptr, "SetVerifyOption"}, + {3, nullptr, "SetIoMode"}, + {4, nullptr, "GetSocketDescriptor"}, + {5, nullptr, "GetHostName"}, + {6, nullptr, "GetVerifyOption"}, + {7, nullptr, "GetIoMode"}, + {8, nullptr, "DoHandshake"}, + {9, nullptr, "DoHandshakeGetServerCert"}, + {10, nullptr, "Read"}, + {11, nullptr, "Write"}, + {12, nullptr, "Pending"}, + {13, nullptr, "Peek"}, + {14, nullptr, "Poll"}, + {15, nullptr, "GetVerifyCertError"}, + {16, nullptr, "GetNeededServerCertBufferSize"}, + {17, nullptr, "SetSessionCacheMode"}, + {18, nullptr, "GetSessionCacheMode"}, + {19, nullptr, "FlushSessionCache"}, + {20, nullptr, "SetRenegotiationMode"}, + {21, nullptr, "GetRenegotiationMode"}, + {22, nullptr, "SetOption"}, + {23, nullptr, "GetOption"}, + {24, nullptr, "GetVerifyCertErrors"}, + {25, nullptr, "GetCipherInfo"}, + }; + RegisterHandlers(functions); + } +}; + +class ISslContext final : public ServiceFramework { +public: + ISslContext() : ServiceFramework("ISslContext") { + static const FunctionInfo functions[] = { + {0, &ISslContext::SetOption, "SetOption"}, + {1, nullptr, "GetOption"}, + {2, &ISslContext::CreateConnection, "CreateConnection"}, + {3, nullptr, "GetConnectionCount"}, + {4, nullptr, "ImportServerPki"}, + {5, nullptr, "ImportClientPki"}, + {6, nullptr, "RemoveServerPki"}, + {7, nullptr, "RemoveClientPki"}, + {8, nullptr, "RegisterInternalPki"}, + {9, nullptr, "AddPolicyOid"}, + {10, nullptr, "ImportCrl"}, + {11, nullptr, "RemoveCrl"}, + }; + RegisterHandlers(functions); + } + ~ISslContext() = default; + +private: + void SetOption(Kernel::HLERequestContext& ctx) { + LOG_WARNING(Service_SSL, "(STUBBED) called"); + IPC::RequestParser rp{ctx}; + + IPC::ResponseBuilder rb = rp.MakeBuilder(2, 0, 0); + rb.Push(RESULT_SUCCESS); + } + + void CreateConnection(Kernel::HLERequestContext& ctx) { + LOG_WARNING(Service_SSL, "(STUBBED) called"); + + IPC::ResponseBuilder rb{ctx, 2, 0, 1}; + rb.Push(RESULT_SUCCESS); + rb.PushIpcInterface(); + } +}; + +void SSL::CreateContext(Kernel::HLERequestContext& ctx) { + LOG_WARNING(Service_SSL, "(STUBBED) called"); + + IPC::ResponseBuilder rb{ctx, 2, 0, 1}; + rb.Push(RESULT_SUCCESS); + rb.PushIpcInterface(); +} + +SSL::SSL() : ServiceFramework("ssl") { + static const FunctionInfo functions[] = { + {0, &SSL::CreateContext, "CreateContext"}, + {1, nullptr, "GetContextCount"}, + {2, nullptr, "GetCertificates"}, + {3, nullptr, "GetCertificateBufSize"}, + {4, nullptr, "DebugIoctl"}, + {5, nullptr, "SetInterfaceVersion"}, + {6, nullptr, "FlushSessionCache"}, + }; + RegisterHandlers(functions); +} void InstallInterfaces(SM::ServiceManager& service_manager) { std::make_shared()->InstallAsService(service_manager); diff --git a/src/core/hle/service/ssl/ssl.h b/src/core/hle/service/ssl/ssl.h index 645dad0032..7fcff5ccdc 100644 --- a/src/core/hle/service/ssl/ssl.h +++ b/src/core/hle/service/ssl/ssl.h @@ -13,6 +13,9 @@ class SSL final : public ServiceFramework { public: explicit SSL(); ~SSL() = default; + +private: + void CreateContext(Kernel::HLERequestContext& ctx); }; /// Registers all SSL services with the specified service manager.