hle: Stub some service calls used by the home menu. (#6675)
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "core/core.h"
|
||||
#include "core/hle/ipc_helpers.h"
|
||||
#include "core/hle/service/act/act.h"
|
||||
#include "core/hle/service/act/act_a.h"
|
||||
#include "core/hle/service/act/act_u.h"
|
||||
@@ -14,6 +15,35 @@ Module::Interface::Interface(std::shared_ptr<Module> act, const char* name)
|
||||
|
||||
Module::Interface::~Interface() = default;
|
||||
|
||||
void Module::Interface::Initialize(Kernel::HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp(ctx, 0x1, 2, 4); // 0x10084
|
||||
const auto sdk_version = rp.Pop<u32>();
|
||||
const auto shared_memory_size = rp.Pop<u32>();
|
||||
const auto caller_pid = rp.PopPID();
|
||||
[[maybe_unused]] const auto shared_memory = rp.PopObject<Kernel::SharedMemory>();
|
||||
|
||||
LOG_DEBUG(Service_ACT,
|
||||
"(STUBBED) called sdk_version={:08X}, shared_memory_size={:08X}, caller_pid={}",
|
||||
sdk_version, shared_memory_size, caller_pid);
|
||||
|
||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||
rb.Push(RESULT_SUCCESS);
|
||||
}
|
||||
|
||||
void Module::Interface::GetAccountDataBlock(Kernel::HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp(ctx, 0x6, 3, 2); // 0x600C2
|
||||
const auto unknown = rp.Pop<u8>();
|
||||
const auto size = rp.Pop<u32>();
|
||||
const auto block_id = rp.Pop<u32>();
|
||||
[[maybe_unused]] auto output_buffer = rp.PopMappedBuffer();
|
||||
|
||||
LOG_DEBUG(Service_ACT, "(STUBBED) called unknown={:02X}, size={:08X}, block_id={:08X}", unknown,
|
||||
size, block_id);
|
||||
|
||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||
rb.Push(RESULT_SUCCESS);
|
||||
}
|
||||
|
||||
void InstallInterfaces(Core::System& system) {
|
||||
auto& service_manager = system.ServiceManager();
|
||||
auto act = std::make_shared<Module>();
|
||||
|
||||
@@ -22,6 +22,33 @@ public:
|
||||
|
||||
protected:
|
||||
std::shared_ptr<Module> act;
|
||||
|
||||
/**
|
||||
* ACT::Initialize service function.
|
||||
* Inputs:
|
||||
* 1 : SDK version
|
||||
* 2 : Shared Memory Size
|
||||
* 3 : PID Translation Header (0x20)
|
||||
* 4 : Caller PID
|
||||
* 5 : Handle Translation Header (0x0)
|
||||
* 6 : Shared Memory Handle
|
||||
* Outputs:
|
||||
* 1 : Result of function, 0 on success, otherwise error code
|
||||
*/
|
||||
void Initialize(Kernel::HLERequestContext& ctx);
|
||||
|
||||
/**
|
||||
* ACT::GetAccountDataBlock service function.
|
||||
* Inputs:
|
||||
* 1 : u8 Unknown
|
||||
* 2 : Size
|
||||
* 3 : Block ID
|
||||
* 4 : Output Buffer Mapping Translation Header ((Size << 4) | 0xC)
|
||||
* 5 : Output Buffer Pointer
|
||||
* Outputs:
|
||||
* 1 : Result of function, 0 on success, otherwise error code
|
||||
*/
|
||||
void GetAccountDataBlock(Kernel::HLERequestContext& ctx);
|
||||
};
|
||||
|
||||
private:
|
||||
|
||||
@@ -11,9 +11,9 @@ ACT_A::ACT_A(std::shared_ptr<Module> act) : Module::Interface(std::move(act), "a
|
||||
const FunctionInfo functions[] = {
|
||||
// act:u shared commands
|
||||
// clang-format off
|
||||
{IPC::MakeHeader(0x0001, 2, 4), nullptr, "Initialize"},
|
||||
{IPC::MakeHeader(0x0001, 2, 4), &ACT_A::Initialize, "Initialize"},
|
||||
{IPC::MakeHeader(0x0002, 1, 0), nullptr, "GetErrorCode"},
|
||||
{IPC::MakeHeader(0x0006, 3, 2), nullptr, "GetAccountDataBlock"},
|
||||
{IPC::MakeHeader(0x0006, 3, 2), &ACT_A::GetAccountDataBlock, "GetAccountDataBlock"},
|
||||
{IPC::MakeHeader(0x000B, 1, 2), nullptr, "AcquireEulaList"},
|
||||
{IPC::MakeHeader(0x000D, 1, 0), nullptr, "GenerateUuid"},
|
||||
// act:a
|
||||
|
||||
@@ -10,9 +10,9 @@ namespace Service::ACT {
|
||||
ACT_U::ACT_U(std::shared_ptr<Module> act) : Module::Interface(std::move(act), "act:u") {
|
||||
static const FunctionInfo functions[] = {
|
||||
// clang-format off
|
||||
{IPC::MakeHeader(0x0001, 2, 4), nullptr, "Initialize"},
|
||||
{IPC::MakeHeader(0x0001, 2, 4), &ACT_U::Initialize, "Initialize"},
|
||||
{IPC::MakeHeader(0x0002, 1, 0), nullptr, "GetErrorCode"},
|
||||
{IPC::MakeHeader(0x0006, 3, 2), nullptr, "GetAccountDataBlock"},
|
||||
{IPC::MakeHeader(0x0006, 3, 2), &ACT_U::GetAccountDataBlock, "GetAccountDataBlock"},
|
||||
{IPC::MakeHeader(0x000B, 1, 2), nullptr, "AcquireEulaList"},
|
||||
{IPC::MakeHeader(0x000D, 1, 0), nullptr, "GenerateUuid"},
|
||||
// clang-format on
|
||||
|
||||
Reference in New Issue
Block a user