9 changed files with 141 additions and 69 deletions
-
6src/core/CMakeLists.txt
-
28src/core/hle/service/psc/pm_control.cpp
-
16src/core/hle/service/psc/pm_control.h
-
24src/core/hle/service/psc/pm_module.cpp
-
16src/core/hle/service/psc/pm_module.h
-
30src/core/hle/service/psc/pm_service.cpp
-
19src/core/hle/service/psc/pm_service.h
-
67src/core/hle/service/psc/psc.cpp
-
4src/core/hle/service/psc/psc.h
@ -0,0 +1,28 @@ |
|||
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
|
|||
// SPDX-License-Identifier: GPL-2.0-or-later
|
|||
|
|||
#include "core/hle/service/psc/pm_control.h"
|
|||
|
|||
namespace Service::PSC { |
|||
|
|||
IPmControl::IPmControl(Core::System& system_) : ServiceFramework{system_, "psc:c"} { |
|||
// clang-format off
|
|||
static const FunctionInfo functions[] = { |
|||
{0, nullptr, "Initialize"}, |
|||
{1, nullptr, "DispatchRequest"}, |
|||
{2, nullptr, "GetResult"}, |
|||
{3, nullptr, "GetState"}, |
|||
{4, nullptr, "Cancel"}, |
|||
{5, nullptr, "PrintModuleInformation"}, |
|||
{6, nullptr, "GetModuleInformation"}, |
|||
{10, nullptr, "AcquireStateLock"}, |
|||
{11, nullptr, "HasStateLock"}, |
|||
}; |
|||
// clang-format on
|
|||
|
|||
RegisterHandlers(functions); |
|||
} |
|||
|
|||
IPmControl::~IPmControl() = default; |
|||
|
|||
} // namespace Service::PSC
|
|||
@ -0,0 +1,16 @@ |
|||
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project |
|||
// SPDX-License-Identifier: GPL-2.0-or-later |
|||
|
|||
#pragma once |
|||
|
|||
#include "core/hle/service/service.h" |
|||
|
|||
namespace Service::PSC { |
|||
|
|||
class IPmControl final : public ServiceFramework<IPmControl> { |
|||
public: |
|||
explicit IPmControl(Core::System& system_); |
|||
~IPmControl() override; |
|||
}; |
|||
|
|||
} // namespace Service::PSC |
|||
@ -0,0 +1,24 @@ |
|||
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
|
|||
// SPDX-License-Identifier: GPL-2.0-or-later
|
|||
|
|||
#include "core/hle/service/psc/pm_module.h"
|
|||
|
|||
namespace Service::PSC { |
|||
|
|||
IPmModule::IPmModule(Core::System& system_) : ServiceFramework{system_, "IPmModule"} { |
|||
// clang-format off
|
|||
static const FunctionInfo functions[] = { |
|||
{0, nullptr, "Initialize"}, |
|||
{1, nullptr, "GetRequest"}, |
|||
{2, nullptr, "Acknowledge"}, |
|||
{3, nullptr, "Finalize"}, |
|||
{4, nullptr, "AcknowledgeEx"}, |
|||
}; |
|||
// clang-format on
|
|||
|
|||
RegisterHandlers(functions); |
|||
} |
|||
|
|||
IPmModule::~IPmModule() = default; |
|||
|
|||
} // namespace Service::PSC
|
|||
@ -0,0 +1,16 @@ |
|||
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project |
|||
// SPDX-License-Identifier: GPL-2.0-or-later |
|||
|
|||
#pragma once |
|||
|
|||
#include "core/hle/service/service.h" |
|||
|
|||
namespace Service::PSC { |
|||
|
|||
class IPmModule final : public ServiceFramework<IPmModule> { |
|||
public: |
|||
explicit IPmModule(Core::System& system_); |
|||
~IPmModule() override; |
|||
}; |
|||
|
|||
} // namespace Service::PSC |
|||
@ -0,0 +1,30 @@ |
|||
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
|
|||
// SPDX-License-Identifier: GPL-2.0-or-later
|
|||
|
|||
#include "core/hle/service/ipc_helpers.h"
|
|||
#include "core/hle/service/psc/pm_module.h"
|
|||
#include "core/hle/service/psc/pm_service.h"
|
|||
|
|||
namespace Service::PSC { |
|||
|
|||
IPmService::IPmService(Core::System& system_) : ServiceFramework{system_, "psc:m"} { |
|||
// clang-format off
|
|||
static const FunctionInfo functions[] = { |
|||
{0, &IPmService::GetPmModule, "GetPmModule"}, |
|||
}; |
|||
// clang-format on
|
|||
|
|||
RegisterHandlers(functions); |
|||
} |
|||
|
|||
IPmService::~IPmService() = default; |
|||
|
|||
void IPmService::GetPmModule(HLERequestContext& ctx) { |
|||
LOG_DEBUG(Service_PSC, "called"); |
|||
|
|||
IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
|||
rb.Push(ResultSuccess); |
|||
rb.PushIpcInterface<IPmModule>(system); |
|||
} |
|||
|
|||
} // namespace Service::PSC
|
|||
@ -0,0 +1,19 @@ |
|||
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project |
|||
// SPDX-License-Identifier: GPL-2.0-or-later |
|||
|
|||
#pragma once |
|||
|
|||
#include "core/hle/service/service.h" |
|||
|
|||
namespace Service::PSC { |
|||
|
|||
class IPmService final : public ServiceFramework<IPmService> { |
|||
public: |
|||
explicit IPmService(Core::System& system_); |
|||
~IPmService() override; |
|||
|
|||
private: |
|||
void GetPmModule(HLERequestContext& ctx); |
|||
}; |
|||
|
|||
} // namespace Service::PSC |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue