citra-emu
/
citra
Archived
1
0
Fork 0

hle: Eliminate need to specify command headers for IPC. (#6678)

This commit is contained in:
Steveice10 2023-07-14 17:32:59 -07:00 committed by GitHub
parent 0bedb28bdc
commit e043caac27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
96 changed files with 2691 additions and 2707 deletions

View File

@ -210,14 +210,8 @@ inline void RequestBuilder::PushMappedBuffer(const Kernel::MappedBuffer& mapped_
class RequestParser : public RequestHelperBase {
public:
RequestParser(Kernel::HLERequestContext& context, Header desired_header)
: RequestHelperBase(context, desired_header) {}
RequestParser(Kernel::HLERequestContext& context, u16 command_id, unsigned normal_params_size,
unsigned translate_params_size)
: RequestParser(context,
Header{MakeHeader(command_id, normal_params_size, translate_params_size)}) {
}
RequestParser(Kernel::HLERequestContext& context)
: RequestHelperBase(context, context.CommandHeader()) {}
RequestBuilder MakeBuilder(u32 normal_params_size, u32 translate_params_size,
bool validateHeader = true) {

View File

@ -207,6 +207,11 @@ public:
return cmd_buf.data();
}
/// Returns the command header from the IPC command buffer.
IPC::Header CommandHeader() const {
return {cmd_buf[0]};
}
/**
* Returns the session through which this request was made. This can be used as a map key to
* access per-client data on services.

View File

@ -100,7 +100,7 @@ void Recorder::SetRequestInfo(const std::shared_ptr<Kernel::Thread>& client_thre
record.function_name = std::dynamic_pointer_cast<Service::ServiceFrameworkBase>(
client_session->parent->port->GetServerPort()->hle_handler)
->GetFunctionName(record.untranslated_request_cmdbuf[0]);
->GetFunctionName({record.untranslated_request_cmdbuf[0]});
}
client_session_map.erase(thread_id);

View File

@ -21,7 +21,7 @@
namespace Service::AC {
void Module::Interface::CreateDefaultConfig(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1, 0, 0);
IPC::RequestParser rp(ctx);
std::vector<u8> buffer(sizeof(ACConfig));
std::memcpy(buffer.data(), &ac->default_config, buffer.size());
@ -34,7 +34,7 @@ void Module::Interface::CreateDefaultConfig(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::ConnectAsync(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x4, 0, 6);
IPC::RequestParser rp(ctx);
rp.Skip(2, false); // ProcessId descriptor
ac->connect_event = rp.PopObject<Kernel::Event>();
@ -53,7 +53,7 @@ void Module::Interface::ConnectAsync(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetConnectResult(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x5, 0, 2);
IPC::RequestParser rp(ctx);
rp.Skip(2, false); // ProcessId descriptor
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
@ -61,7 +61,7 @@ void Module::Interface::GetConnectResult(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::CloseAsync(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x8, 0, 4);
IPC::RequestParser rp(ctx);
rp.Skip(2, false); // ProcessId descriptor
ac->close_event = rp.PopObject<Kernel::Event>();
@ -82,7 +82,7 @@ void Module::Interface::CloseAsync(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetCloseResult(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x9, 0, 2);
IPC::RequestParser rp(ctx);
rp.Skip(2, false); // ProcessId descriptor
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
@ -92,7 +92,7 @@ void Module::Interface::GetCloseResult(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetWifiStatus(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0xD, 0, 0);
IPC::RequestParser rp(ctx);
bool can_reach_internet = false;
std::shared_ptr<SOC::SOC_U> socu_module = SOC::GetService(Core::System::GetInstance());
@ -109,7 +109,7 @@ void Module::Interface::GetWifiStatus(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetInfraPriority(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x27, 0, 2);
IPC::RequestParser rp(ctx);
[[maybe_unused]] const std::vector<u8>& ac_config = rp.PopStaticBuffer();
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
@ -120,7 +120,7 @@ void Module::Interface::GetInfraPriority(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::SetRequestEulaVersion(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x2D, 2, 2);
IPC::RequestParser rp(ctx);
u32 major = rp.Pop<u8>();
u32 minor = rp.Pop<u8>();
@ -137,7 +137,7 @@ void Module::Interface::SetRequestEulaVersion(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::RegisterDisconnectEvent(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x30, 0, 4);
IPC::RequestParser rp(ctx);
rp.Skip(2, false); // ProcessId descriptor
ac->disconnect_event = rp.PopObject<Kernel::Event>();
@ -152,7 +152,7 @@ void Module::Interface::RegisterDisconnectEvent(Kernel::HLERequestContext& ctx)
}
void Module::Interface::IsConnected(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x3E, 1, 2);
IPC::RequestParser rp(ctx);
u32 unk = rp.Pop<u32>();
u32 unk_descriptor = rp.Pop<u32>();
u32 unk_param = rp.Pop<u32>();
@ -166,7 +166,7 @@ void Module::Interface::IsConnected(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::SetClientVersion(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x40, 1, 2);
IPC::RequestParser rp(ctx);
u32 version = rp.Pop<u32>();
rp.Skip(2, false); // ProcessId descriptor

View File

@ -10,26 +10,26 @@ namespace Service::AC {
AC_I::AC_I(std::shared_ptr<Module> ac) : Module::Interface(std::move(ac), "ac:i", 10) {
static const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0001, 0, 0), &AC_I::CreateDefaultConfig, "CreateDefaultConfig"},
{IPC::MakeHeader(0x0004, 0, 6), &AC_I::ConnectAsync, "ConnectAsync"},
{IPC::MakeHeader(0x0005, 0, 2), &AC_I::GetConnectResult, "GetConnectResult"},
{IPC::MakeHeader(0x0007, 0, 2), nullptr, "CancelConnectAsync"},
{IPC::MakeHeader(0x0008, 0, 4), &AC_I::CloseAsync, "CloseAsync"},
{IPC::MakeHeader(0x0009, 0, 2), &AC_I::GetCloseResult, "GetCloseResult"},
{IPC::MakeHeader(0x000A, 0, 0), nullptr, "GetLastErrorCode"},
{IPC::MakeHeader(0x000C, 0, 0), nullptr, "GetStatus"},
{IPC::MakeHeader(0x000D, 0, 0), &AC_I::GetWifiStatus, "GetWifiStatus"},
{IPC::MakeHeader(0x000E, 1, 2), nullptr, "GetCurrentAPInfo"},
{IPC::MakeHeader(0x0010, 1, 2), nullptr, "GetCurrentNZoneInfo"},
{IPC::MakeHeader(0x0011, 1, 2), nullptr, "GetNZoneApNumService"},
{IPC::MakeHeader(0x001D, 1, 2), nullptr, "ScanAPs"},
{IPC::MakeHeader(0x0024, 1, 2), nullptr, "AddDenyApType"},
{IPC::MakeHeader(0x0027, 0, 2), &AC_I::GetInfraPriority, "GetInfraPriority"},
{IPC::MakeHeader(0x002D, 2, 2), &AC_I::SetRequestEulaVersion, "SetRequestEulaVersion"},
{IPC::MakeHeader(0x0030, 0, 4), &AC_I::RegisterDisconnectEvent, "RegisterDisconnectEvent"},
{IPC::MakeHeader(0x003C, 1, 2), nullptr, "GetAPSSIDList"},
{IPC::MakeHeader(0x003E, 1, 2), &AC_I::IsConnected, "IsConnected"},
{IPC::MakeHeader(0x0040, 1, 2), &AC_I::SetClientVersion, "SetClientVersion"},
{0x0001, &AC_I::CreateDefaultConfig, "CreateDefaultConfig"},
{0x0004, &AC_I::ConnectAsync, "ConnectAsync"},
{0x0005, &AC_I::GetConnectResult, "GetConnectResult"},
{0x0007, nullptr, "CancelConnectAsync"},
{0x0008, &AC_I::CloseAsync, "CloseAsync"},
{0x0009, &AC_I::GetCloseResult, "GetCloseResult"},
{0x000A, nullptr, "GetLastErrorCode"},
{0x000C, nullptr, "GetStatus"},
{0x000D, &AC_I::GetWifiStatus, "GetWifiStatus"},
{0x000E, nullptr, "GetCurrentAPInfo"},
{0x0010, nullptr, "GetCurrentNZoneInfo"},
{0x0011, nullptr, "GetNZoneApNumService"},
{0x001D, nullptr, "ScanAPs"},
{0x0024, nullptr, "AddDenyApType"},
{0x0027, &AC_I::GetInfraPriority, "GetInfraPriority"},
{0x002D, &AC_I::SetRequestEulaVersion, "SetRequestEulaVersion"},
{0x0030, &AC_I::RegisterDisconnectEvent, "RegisterDisconnectEvent"},
{0x003C, nullptr, "GetAPSSIDList"},
{0x003E, &AC_I::IsConnected, "IsConnected"},
{0x0040, &AC_I::SetClientVersion, "SetClientVersion"},
// clang-format on
};
RegisterHandlers(functions);

View File

@ -10,26 +10,26 @@ namespace Service::AC {
AC_U::AC_U(std::shared_ptr<Module> ac) : Module::Interface(std::move(ac), "ac:u", 10) {
static const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0001, 0, 0), &AC_U::CreateDefaultConfig, "CreateDefaultConfig"},
{IPC::MakeHeader(0x0004, 0, 6), &AC_U::ConnectAsync, "ConnectAsync"},
{IPC::MakeHeader(0x0005, 0, 2), &AC_U::GetConnectResult, "GetConnectResult"},
{IPC::MakeHeader(0x0007, 0, 2), nullptr, "CancelConnectAsync"},
{IPC::MakeHeader(0x0008, 0, 4), &AC_U::CloseAsync, "CloseAsync"},
{IPC::MakeHeader(0x0009, 0, 2), &AC_U::GetCloseResult, "GetCloseResult"},
{IPC::MakeHeader(0x000A, 0, 0), nullptr, "GetLastErrorCode"},
{IPC::MakeHeader(0x000C, 0, 0), nullptr, "GetStatus"},
{IPC::MakeHeader(0x000D, 0, 0), &AC_U::GetWifiStatus, "GetWifiStatus"},
{IPC::MakeHeader(0x000E, 1, 2), nullptr, "GetCurrentAPInfo"},
{IPC::MakeHeader(0x0010, 1, 2), nullptr, "GetCurrentNZoneInfo"},
{IPC::MakeHeader(0x0011, 1, 2), nullptr, "GetNZoneApNumService"},
{IPC::MakeHeader(0x001D, 1, 2), nullptr, "ScanAPs"},
{IPC::MakeHeader(0x0024, 1, 2), nullptr, "AddDenyApType"},
{IPC::MakeHeader(0x0027, 0, 2), &AC_U::GetInfraPriority, "GetInfraPriority"},
{IPC::MakeHeader(0x002D, 2, 2), &AC_U::SetRequestEulaVersion, "SetRequestEulaVersion"},
{IPC::MakeHeader(0x0030, 0, 4), &AC_U::RegisterDisconnectEvent, "RegisterDisconnectEvent"},
{IPC::MakeHeader(0x003C, 1, 2), nullptr, "GetAPSSIDList"},
{IPC::MakeHeader(0x003E, 1, 2), &AC_U::IsConnected, "IsConnected"},
{IPC::MakeHeader(0x0040, 1, 2), &AC_U::SetClientVersion, "SetClientVersion"},
{0x0001, &AC_U::CreateDefaultConfig, "CreateDefaultConfig"},
{0x0004, &AC_U::ConnectAsync, "ConnectAsync"},
{0x0005, &AC_U::GetConnectResult, "GetConnectResult"},
{0x0007, nullptr, "CancelConnectAsync"},
{0x0008, &AC_U::CloseAsync, "CloseAsync"},
{0x0009, &AC_U::GetCloseResult, "GetCloseResult"},
{0x000A, nullptr, "GetLastErrorCode"},
{0x000C, nullptr, "GetStatus"},
{0x000D, &AC_U::GetWifiStatus, "GetWifiStatus"},
{0x000E, nullptr, "GetCurrentAPInfo"},
{0x0010, nullptr, "GetCurrentNZoneInfo"},
{0x0011, nullptr, "GetNZoneApNumService"},
{0x001D, nullptr, "ScanAPs"},
{0x0024, nullptr, "AddDenyApType"},
{0x0027, &AC_U::GetInfraPriority, "GetInfraPriority"},
{0x002D, &AC_U::SetRequestEulaVersion, "SetRequestEulaVersion"},
{0x0030, &AC_U::RegisterDisconnectEvent, "RegisterDisconnectEvent"},
{0x003C, nullptr, "GetAPSSIDList"},
{0x003E, &AC_U::IsConnected, "IsConnected"},
{0x0040, &AC_U::SetClientVersion, "SetClientVersion"},
// clang-format on
};
RegisterHandlers(functions);

View File

@ -16,7 +16,7 @@ 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
IPC::RequestParser rp(ctx);
const auto sdk_version = rp.Pop<u32>();
const auto shared_memory_size = rp.Pop<u32>();
const auto caller_pid = rp.PopPID();
@ -31,7 +31,7 @@ void Module::Interface::Initialize(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetAccountDataBlock(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x6, 3, 2); // 0x600C2
IPC::RequestParser rp(ctx);
const auto unknown = rp.Pop<u8>();
const auto size = rp.Pop<u32>();
const auto block_id = rp.Pop<u32>();

View File

@ -11,16 +11,16 @@ 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), &ACT_A::Initialize, "Initialize"},
{IPC::MakeHeader(0x0002, 1, 0), nullptr, "GetErrorCode"},
{IPC::MakeHeader(0x0006, 3, 2), &ACT_A::GetAccountDataBlock, "GetAccountDataBlock"},
{IPC::MakeHeader(0x000B, 1, 2), nullptr, "AcquireEulaList"},
{IPC::MakeHeader(0x000D, 1, 0), nullptr, "GenerateUuid"},
{0x0001, &ACT_A::Initialize, "Initialize"},
{0x0002, nullptr, "GetErrorCode"},
{0x0006, &ACT_A::GetAccountDataBlock, "GetAccountDataBlock"},
{0x000B, nullptr, "AcquireEulaList"},
{0x000D, nullptr, "GenerateUuid"},
// act:a
{IPC::MakeHeader(0x0413, 3, 2), nullptr, "UpdateMiiImage"},
{IPC::MakeHeader(0x041B, 5, 2), nullptr, "AgreeEula"},
{IPC::MakeHeader(0x0421, 1, 2), nullptr, "UploadMii"},
{IPC::MakeHeader(0x0423, 2, 2), nullptr, "ValidateMailAddress"},
{0x0413, nullptr, "UpdateMiiImage"},
{0x041B, nullptr, "AgreeEula"},
{0x0421, nullptr, "UploadMii"},
{0x0423, nullptr, "ValidateMailAddress"},
// clang-format on
};
RegisterHandlers(functions);

View File

@ -10,11 +10,11 @@ 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), &ACT_U::Initialize, "Initialize"},
{IPC::MakeHeader(0x0002, 1, 0), nullptr, "GetErrorCode"},
{IPC::MakeHeader(0x0006, 3, 2), &ACT_U::GetAccountDataBlock, "GetAccountDataBlock"},
{IPC::MakeHeader(0x000B, 1, 2), nullptr, "AcquireEulaList"},
{IPC::MakeHeader(0x000D, 1, 0), nullptr, "GenerateUuid"},
{0x0001, &ACT_U::Initialize, "Initialize"},
{0x0002, nullptr, "GetErrorCode"},
{0x0006, &ACT_U::GetAccountDataBlock, "GetAccountDataBlock"},
{0x000B, nullptr, "AcquireEulaList"},
{0x000D, nullptr, "GenerateUuid"},
// clang-format on
};
RegisterHandlers(functions);

View File

@ -684,7 +684,7 @@ Module::Interface::Interface(std::shared_ptr<Module> am, const char* name, u32 m
Module::Interface::~Interface() = default;
void Module::Interface::GetNumPrograms(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0001, 1, 0); // 0x00010040
IPC::RequestParser rp(ctx);
u32 media_type = rp.Pop<u8>();
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
@ -693,7 +693,7 @@ void Module::Interface::GetNumPrograms(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::FindDLCContentInfos(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1002, 4, 4); // 0x10020104
IPC::RequestParser rp(ctx);
auto media_type = static_cast<Service::FS::MediaType>(rp.Pop<u8>());
u64 title_id = rp.Pop<u64>();
@ -758,7 +758,7 @@ void Module::Interface::FindDLCContentInfos(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::ListDLCContentInfos(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1003, 5, 2); // 0x10030142
IPC::RequestParser rp(ctx);
u32 content_count = rp.Pop<u32>();
auto media_type = static_cast<Service::FS::MediaType>(rp.Pop<u8>());
@ -811,7 +811,7 @@ void Module::Interface::ListDLCContentInfos(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::DeleteContents(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1004, 4, 2); // 0x10040102
IPC::RequestParser rp(ctx);
u8 media_type = rp.Pop<u8>();
u64 title_id = rp.Pop<u64>();
u32 content_count = rp.Pop<u32>();
@ -825,7 +825,7 @@ void Module::Interface::DeleteContents(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetProgramList(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0002, 2, 2); // 0x00020082
IPC::RequestParser rp(ctx);
u32 count = rp.Pop<u32>();
u8 media_type = rp.Pop<u8>();
@ -879,7 +879,7 @@ ResultCode GetTitleInfoFromList(std::span<const u64> title_id_list,
}
void Module::Interface::GetProgramInfos(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0003, 2, 4); // 0x00030084
IPC::RequestParser rp(ctx);
auto media_type = static_cast<Service::FS::MediaType>(rp.Pop<u8>());
u32 title_count = rp.Pop<u32>();
@ -898,7 +898,7 @@ void Module::Interface::GetProgramInfos(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::DeleteUserProgram(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0004, 3, 0);
IPC::RequestParser rp(ctx);
auto media_type = rp.PopEnum<FS::MediaType>();
u64 title_id = rp.Pop<u64>();
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
@ -926,7 +926,7 @@ void Module::Interface::DeleteUserProgram(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetProductCode(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0005, 3, 0);
IPC::RequestParser rp(ctx);
FS::MediaType media_type = rp.PopEnum<FS::MediaType>();
u64 title_id = rp.Pop<u64>();
std::string path = GetTitleContentPath(media_type, title_id);
@ -952,7 +952,7 @@ void Module::Interface::GetProductCode(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetDLCTitleInfos(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1005, 2, 4); // 0x10050084
IPC::RequestParser rp(ctx);
auto media_type = static_cast<Service::FS::MediaType>(rp.Pop<u8>());
u32 title_count = rp.Pop<u32>();
@ -985,7 +985,7 @@ void Module::Interface::GetDLCTitleInfos(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetPatchTitleInfos(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x100D, 2, 4); // 0x100D0084
IPC::RequestParser rp(ctx);
auto media_type = static_cast<Service::FS::MediaType>(rp.Pop<u8>());
u32 title_count = rp.Pop<u32>();
@ -1018,7 +1018,7 @@ void Module::Interface::GetPatchTitleInfos(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::ListDataTitleTicketInfos(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1007, 4, 2); // 0x10070102
IPC::RequestParser rp(ctx);
u32 ticket_count = rp.Pop<u32>();
u64 title_id = rp.Pop<u64>();
u32 start_index = rp.Pop<u32>();
@ -1046,7 +1046,7 @@ void Module::Interface::ListDataTitleTicketInfos(Kernel::HLERequestContext& ctx)
}
void Module::Interface::GetDLCContentInfoCount(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1001, 3, 0); // 0x100100C0
IPC::RequestParser rp(ctx);
auto media_type = static_cast<Service::FS::MediaType>(rp.Pop<u8>());
u64 title_id = rp.Pop<u64>();
@ -1076,7 +1076,7 @@ void Module::Interface::GetDLCContentInfoCount(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::DeleteTicket(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0007, 2, 0); // 0x00070080
IPC::RequestParser rp(ctx);
u64 title_id = rp.Pop<u64>();
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
@ -1085,7 +1085,7 @@ void Module::Interface::DeleteTicket(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetNumTickets(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0008, 0, 0); // 0x00080000
IPC::RequestParser rp(ctx);
u32 ticket_count = 0;
for (const auto& title_list : am->am_title_list) {
@ -1099,7 +1099,7 @@ void Module::Interface::GetNumTickets(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetTicketList(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0009, 2, 2); // 0x00090082
IPC::RequestParser rp(ctx);
u32 ticket_list_count = rp.Pop<u32>();
u32 ticket_index = rp.Pop<u32>();
auto& ticket_tids_out = rp.PopMappedBuffer();
@ -1122,7 +1122,7 @@ void Module::Interface::GetTicketList(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::NeedsCleanup(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0013, 1, 0); // 0x00130040
IPC::RequestParser rp(ctx);
const auto media_type = rp.Pop<u8>();
LOG_DEBUG(Service_AM, "(STUBBED) media_type=0x{:02x}", media_type);
@ -1133,7 +1133,7 @@ void Module::Interface::NeedsCleanup(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::QueryAvailableTitleDatabase(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0019, 1, 0); // 0x190040
IPC::RequestParser rp(ctx);
u8 media_type = rp.Pop<u8>();
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
@ -1144,7 +1144,7 @@ void Module::Interface::QueryAvailableTitleDatabase(Kernel::HLERequestContext& c
}
void Module::Interface::CheckContentRights(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0025, 3, 0); // 0x2500C0
IPC::RequestParser rp(ctx);
u64 tid = rp.Pop<u64>();
u16 content_index = rp.Pop<u16>();
@ -1161,7 +1161,7 @@ void Module::Interface::CheckContentRights(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::CheckContentRightsIgnorePlatform(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x002D, 3, 0); // 0x2D00C0
IPC::RequestParser rp(ctx);
u64 tid = rp.Pop<u64>();
u16 content_index = rp.Pop<u16>();
@ -1177,7 +1177,7 @@ void Module::Interface::CheckContentRightsIgnorePlatform(Kernel::HLERequestConte
}
void Module::Interface::BeginImportProgram(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0402, 1, 0); // 0x04020040
IPC::RequestParser rp(ctx);
auto media_type = static_cast<Service::FS::MediaType>(rp.Pop<u8>());
if (am->cia_installing) {
@ -1203,7 +1203,7 @@ void Module::Interface::BeginImportProgram(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::BeginImportProgramTemporarily(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0403, 0, 0); // 0x04030000
IPC::RequestParser rp(ctx);
if (am->cia_installing) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
@ -1230,7 +1230,7 @@ void Module::Interface::BeginImportProgramTemporarily(Kernel::HLERequestContext&
}
void Module::Interface::EndImportProgram(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0405, 0, 2); // 0x04050002
IPC::RequestParser rp(ctx);
[[maybe_unused]] const auto cia = rp.PopObject<Kernel::ClientSession>();
am->ScanForAllTitles();
@ -1241,7 +1241,7 @@ void Module::Interface::EndImportProgram(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::EndImportProgramWithoutCommit(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0406, 0, 2); // 0x04060002
IPC::RequestParser rp(ctx);
[[maybe_unused]] const auto cia = rp.PopObject<Kernel::ClientSession>();
// Note: This function is basically a no-op for us since we don't use title.db or ticket.db
@ -1254,7 +1254,7 @@ void Module::Interface::EndImportProgramWithoutCommit(Kernel::HLERequestContext&
}
void Module::Interface::CommitImportPrograms(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0407, 3, 2); // 0x040700C2
IPC::RequestParser rp(ctx);
[[maybe_unused]] const auto media_type = static_cast<FS::MediaType>(rp.Pop<u8>());
[[maybe_unused]] const u32 title_count = rp.Pop<u32>();
[[maybe_unused]] const u8 database = rp.Pop<u8>();
@ -1341,7 +1341,7 @@ ResultVal<std::unique_ptr<AMFileWrapper>> GetFileFromSession(
}
void Module::Interface::GetProgramInfoFromCia(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0408, 1, 2); // 0x04080042
IPC::RequestParser rp(ctx);
[[maybe_unused]] const auto media_type = static_cast<FS::MediaType>(rp.Pop<u8>());
auto cia = rp.PopObject<Kernel::ClientSession>();
@ -1378,7 +1378,7 @@ void Module::Interface::GetProgramInfoFromCia(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetSystemMenuDataFromCia(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0409, 0, 4); // 0x04090004
IPC::RequestParser rp(ctx);
auto cia = rp.PopObject<Kernel::ClientSession>();
auto& output_buffer = rp.PopMappedBuffer();
@ -1422,7 +1422,7 @@ void Module::Interface::GetSystemMenuDataFromCia(Kernel::HLERequestContext& ctx)
}
void Module::Interface::GetDependencyListFromCia(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x040A, 0, 2); // 0x040A0002
IPC::RequestParser rp(ctx);
auto cia = rp.PopObject<Kernel::ClientSession>();
auto file_res = GetFileFromSession(cia);
@ -1449,7 +1449,7 @@ void Module::Interface::GetDependencyListFromCia(Kernel::HLERequestContext& ctx)
}
void Module::Interface::GetTransferSizeFromCia(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x040B, 0, 2); // 0x040B0002
IPC::RequestParser rp(ctx);
auto cia = rp.PopObject<Kernel::ClientSession>();
auto file_res = GetFileFromSession(cia);
@ -1473,7 +1473,7 @@ void Module::Interface::GetTransferSizeFromCia(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetCoreVersionFromCia(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x040C, 0, 2); // 0x040C0002
IPC::RequestParser rp(ctx);
auto cia = rp.PopObject<Kernel::ClientSession>();
auto file_res = GetFileFromSession(cia);
@ -1497,7 +1497,7 @@ void Module::Interface::GetCoreVersionFromCia(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetRequiredSizeFromCia(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x040D, 1, 2); // 0x040D0042
IPC::RequestParser rp(ctx);
[[maybe_unused]] const auto media_type = static_cast<FS::MediaType>(rp.Pop<u8>());
auto cia = rp.PopObject<Kernel::ClientSession>();
@ -1525,7 +1525,7 @@ void Module::Interface::GetRequiredSizeFromCia(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::DeleteProgram(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0410, 3, 0);
IPC::RequestParser rp(ctx);
auto media_type = rp.PopEnum<FS::MediaType>();
u64 title_id = rp.Pop<u64>();
LOG_INFO(Service_AM, "Deleting title 0x{:016x}", title_id);
@ -1545,7 +1545,7 @@ void Module::Interface::DeleteProgram(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetSystemUpdaterMutex(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x412, 0, 0); // 0x04120000
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 2);
rb.Push(RESULT_SUCCESS);
@ -1553,7 +1553,7 @@ void Module::Interface::GetSystemUpdaterMutex(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetMetaSizeFromCia(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0413, 0, 2); // 0x04130002
IPC::RequestParser rp(ctx);
auto cia = rp.PopObject<Kernel::ClientSession>();
auto file_res = GetFileFromSession(cia);
@ -1578,7 +1578,7 @@ void Module::Interface::GetMetaSizeFromCia(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetMetaDataFromCia(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0414, 1, 4); // 0x04140044
IPC::RequestParser rp(ctx);
u32 output_size = rp.Pop<u32>();
auto cia = rp.PopObject<Kernel::ClientSession>();

View File

@ -10,19 +10,19 @@ namespace Service::AM {
AM_APP::AM_APP(std::shared_ptr<Module> am) : Module::Interface(std::move(am), "am:app", 5) {
static const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x1001, 3, 0), &AM_APP::GetDLCContentInfoCount, "GetDLCContentInfoCount"},
{IPC::MakeHeader(0x1002, 4, 4), &AM_APP::FindDLCContentInfos, "FindDLCContentInfos"},
{IPC::MakeHeader(0x1003, 5, 2), &AM_APP::ListDLCContentInfos, "ListDLCContentInfos"},
{IPC::MakeHeader(0x1004, 4, 2), &AM_APP::DeleteContents, "DeleteContents"},
{IPC::MakeHeader(0x1005, 2, 4), &AM_APP::GetDLCTitleInfos, "GetDLCTitleInfos"},
{IPC::MakeHeader(0x1006, 2, 0), nullptr, "GetNumDataTitleTickets"},
{IPC::MakeHeader(0x1007, 4, 2), &AM_APP::ListDataTitleTicketInfos, "ListDataTitleTicketInfos"},
{IPC::MakeHeader(0x1008, 7, 2), nullptr, "GetItemRights"},
{IPC::MakeHeader(0x1009, 3, 0), nullptr, "IsDataTitleInUse"},
{IPC::MakeHeader(0x100A, 0, 0), nullptr, "IsExternalTitleDatabaseInitialized"},
{IPC::MakeHeader(0x100B, 3, 0), nullptr, "GetNumExistingContentInfos"},
{IPC::MakeHeader(0x100C, 5, 2), nullptr, "ListExistingContentInfos"},
{IPC::MakeHeader(0x100D, 2, 4), &AM_APP::GetPatchTitleInfos, "GetPatchTitleInfos"},
{0x1001, &AM_APP::GetDLCContentInfoCount, "GetDLCContentInfoCount"},
{0x1002, &AM_APP::FindDLCContentInfos, "FindDLCContentInfos"},
{0x1003, &AM_APP::ListDLCContentInfos, "ListDLCContentInfos"},
{0x1004, &AM_APP::DeleteContents, "DeleteContents"},
{0x1005, &AM_APP::GetDLCTitleInfos, "GetDLCTitleInfos"},
{0x1006, nullptr, "GetNumDataTitleTickets"},
{0x1007, &AM_APP::ListDataTitleTicketInfos, "ListDataTitleTicketInfos"},
{0x1008, nullptr, "GetItemRights"},
{0x1009, nullptr, "IsDataTitleInUse"},
{0x100A, nullptr, "IsExternalTitleDatabaseInitialized"},
{0x100B, nullptr, "GetNumExistingContentInfos"},
{0x100C, nullptr, "ListExistingContentInfos"},
{0x100D, &AM_APP::GetPatchTitleInfos, "GetPatchTitleInfos"},
// clang-format on
};
RegisterHandlers(functions);

View File

@ -10,116 +10,116 @@ namespace Service::AM {
AM_NET::AM_NET(std::shared_ptr<Module> am) : Module::Interface(std::move(am), "am:net", 5) {
static const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0001, 1, 0), &AM_NET::GetNumPrograms, "GetNumPrograms"},
{IPC::MakeHeader(0x0002, 2, 2), &AM_NET::GetProgramList, "GetProgramList"},
{IPC::MakeHeader(0x0003, 2, 4), &AM_NET::GetProgramInfos, "GetProgramInfos"},
{IPC::MakeHeader(0x0004, 3, 0), &AM_NET::DeleteUserProgram, "DeleteUserProgram"},
{IPC::MakeHeader(0x0005, 3, 0), &AM_NET::GetProductCode, "GetProductCode"},
{IPC::MakeHeader(0x0006, 3, 0), nullptr, "GetStorageId"},
{IPC::MakeHeader(0x0007, 2, 0), &AM_NET::DeleteTicket, "DeleteTicket"},
{IPC::MakeHeader(0x0008, 0, 0), &AM_NET::GetNumTickets, "GetNumTickets"},
{IPC::MakeHeader(0x0009, 2, 2), &AM_NET::GetTicketList, "GetTicketList"},
{IPC::MakeHeader(0x000A, 0, 0), nullptr, "GetDeviceID"},
{IPC::MakeHeader(0x000B, 1, 0), nullptr, "GetNumImportTitleContexts"},
{IPC::MakeHeader(0x000C, 2, 2), nullptr, "GetImportTitleContextList"},
{IPC::MakeHeader(0x000D, 2, 4), nullptr, "GetImportTitleContexts"},
{IPC::MakeHeader(0x000E, 3, 0), nullptr, "DeleteImportTitleContext"},
{IPC::MakeHeader(0x000F, 3, 0), nullptr, "GetNumImportContentContexts"},
{IPC::MakeHeader(0x0010, 4, 2), nullptr, "GetImportContentContextList"},
{IPC::MakeHeader(0x0011, 4, 4), nullptr, "GetImportContentContexts"},
{IPC::MakeHeader(0x0012, 4, 2), nullptr, "DeleteImportContentContexts"},
{IPC::MakeHeader(0x0013, 1, 0), &AM_NET::NeedsCleanup, "NeedsCleanup"},
{IPC::MakeHeader(0x0014, 1, 0), nullptr, "DoCleanup"},
{IPC::MakeHeader(0x0015, 1, 0), nullptr, "DeleteAllImportContexts"},
{IPC::MakeHeader(0x0016, 0, 0), nullptr, "DeleteAllTemporaryPrograms"},
{IPC::MakeHeader(0x0017, 1, 4), nullptr, "ImportTwlBackupLegacy"},
{IPC::MakeHeader(0x0018, 2, 0), nullptr, "InitializeTitleDatabase"},
{IPC::MakeHeader(0x0019, 1, 0), nullptr, "QueryAvailableTitleDatabase"},
{IPC::MakeHeader(0x001A, 3, 0), nullptr, "CalcTwlBackupSize"},
{IPC::MakeHeader(0x001B, 5, 4), nullptr, "ExportTwlBackup"},
{IPC::MakeHeader(0x001C, 2, 4), nullptr, "ImportTwlBackup"},
{IPC::MakeHeader(0x001D, 0, 0), nullptr, "DeleteAllTwlUserPrograms"},
{IPC::MakeHeader(0x001E, 3, 8), nullptr, "ReadTwlBackupInfo"},
{IPC::MakeHeader(0x001F, 1, 0), nullptr, "DeleteAllExpiredUserPrograms"},
{IPC::MakeHeader(0x0020, 0, 0), nullptr, "GetTwlArchiveResourceInfo"},
{IPC::MakeHeader(0x0021, 1, 2), nullptr, "GetPersonalizedTicketInfoList"},
{IPC::MakeHeader(0x0022, 2, 0), nullptr, "DeleteAllImportContextsFiltered"},
{IPC::MakeHeader(0x0023, 2, 0), nullptr, "GetNumImportTitleContextsFiltered"},
{IPC::MakeHeader(0x0024, 3, 2), nullptr, "GetImportTitleContextListFiltered"},
{IPC::MakeHeader(0x0025, 3, 0), nullptr, "CheckContentRights"},
{IPC::MakeHeader(0x0026, 1, 4), nullptr, "GetTicketLimitInfos"},
{IPC::MakeHeader(0x0027, 1, 4), nullptr, "GetDemoLaunchInfos"},
{IPC::MakeHeader(0x0028, 4, 8), nullptr, "ReadTwlBackupInfoEx"},
{IPC::MakeHeader(0x0029, 2, 2), nullptr, "DeleteUserProgramsAtomically"},
{IPC::MakeHeader(0x002A, 3, 0), nullptr, "GetNumExistingContentInfosSystem"},
{IPC::MakeHeader(0x002B, 5, 2), nullptr, "ListExistingContentInfosSystem"},
{IPC::MakeHeader(0x002C, 2, 4), nullptr, "GetProgramInfosIgnorePlatform"},
{IPC::MakeHeader(0x002D, 3, 0), nullptr, "CheckContentRightsIgnorePlatform"},
{IPC::MakeHeader(0x0401, 2, 0), nullptr, "UpdateFirmwareTo"},
{IPC::MakeHeader(0x0402, 1, 0), &AM_NET::BeginImportProgram, "BeginImportProgram"},
{IPC::MakeHeader(0x0403, 0, 0), nullptr, "BeginImportProgramTemporarily"},
{IPC::MakeHeader(0x0404, 0, 2), nullptr, "CancelImportProgram"},
{IPC::MakeHeader(0x0405, 0, 2), &AM_NET::EndImportProgram, "EndImportProgram"},
{IPC::MakeHeader(0x0406, 0, 2), nullptr, "EndImportProgramWithoutCommit"},
{IPC::MakeHeader(0x0407, 3, 2), nullptr, "CommitImportPrograms"},
{IPC::MakeHeader(0x0408, 1, 2), &AM_NET::GetProgramInfoFromCia, "GetProgramInfoFromCia"},
{IPC::MakeHeader(0x0409, 0, 4), &AM_NET::GetSystemMenuDataFromCia, "GetSystemMenuDataFromCia"},
{IPC::MakeHeader(0x040A, 0, 2), &AM_NET::GetDependencyListFromCia, "GetDependencyListFromCia"},
{IPC::MakeHeader(0x040B, 0, 2), &AM_NET::GetTransferSizeFromCia, "GetTransferSizeFromCia"},
{IPC::MakeHeader(0x040C, 0, 2), &AM_NET::GetCoreVersionFromCia, "GetCoreVersionFromCia"},
{IPC::MakeHeader(0x040D, 1, 2), &AM_NET::GetRequiredSizeFromCia, "GetRequiredSizeFromCia"},
{IPC::MakeHeader(0x040E, 3, 2), nullptr, "CommitImportProgramsAndUpdateFirmwareAuto"},
{IPC::MakeHeader(0x040F, 0, 0), nullptr, "UpdateFirmwareAuto"},
{IPC::MakeHeader(0x0410, 3, 0), &AM_NET::DeleteProgram, "DeleteProgram"},
{IPC::MakeHeader(0x0411, 1, 4), nullptr, "GetTwlProgramListForReboot"},
{IPC::MakeHeader(0x0412, 0, 0), nullptr, "GetSystemUpdaterMutex"},
{IPC::MakeHeader(0x0413, 0, 2), &AM_NET::GetMetaSizeFromCia, "GetMetaSizeFromCia"},
{IPC::MakeHeader(0x0414, 1, 4), &AM_NET::GetMetaDataFromCia, "GetMetaDataFromCia"},
{IPC::MakeHeader(0x0415, 2, 0), nullptr, "CheckDemoLaunchRights"},
{IPC::MakeHeader(0x0416, 3, 0), nullptr, "GetInternalTitleLocationInfo"},
{IPC::MakeHeader(0x0417, 3, 0), nullptr, "PerpetuateAgbSaveData"},
{IPC::MakeHeader(0x0418, 1, 0), nullptr, "BeginImportProgramForOverWrite"},
{IPC::MakeHeader(0x0419, 0, 0), nullptr, "BeginImportSystemProgram"},
{IPC::MakeHeader(0x0801, 0, 0), nullptr, "BeginImportTicket"},
{IPC::MakeHeader(0x0802, 0, 2), nullptr, "CancelImportTicket"},
{IPC::MakeHeader(0x0803, 0, 2), nullptr, "EndImportTicket"},
{IPC::MakeHeader(0x0804, 4, 0), nullptr, "BeginImportTitle"},
{IPC::MakeHeader(0x0805, 0, 0), nullptr, "StopImportTitle"},
{IPC::MakeHeader(0x0806, 3, 0), nullptr, "ResumeImportTitle"},
{IPC::MakeHeader(0x0807, 0, 0), nullptr, "CancelImportTitle"},
{IPC::MakeHeader(0x0808, 0, 0), nullptr, "EndImportTitle"},
{IPC::MakeHeader(0x0809, 3, 2), nullptr, "CommitImportTitles"},
{IPC::MakeHeader(0x080A, 0, 0), nullptr, "BeginImportTmd"},
{IPC::MakeHeader(0x080B, 0, 2), nullptr, "CancelImportTmd"},
{IPC::MakeHeader(0x080C, 1, 2), nullptr, "EndImportTmd"},
{IPC::MakeHeader(0x080D, 1, 2), nullptr, "CreateImportContentContexts"},
{IPC::MakeHeader(0x080E, 1, 0), nullptr, "BeginImportContent"},
{IPC::MakeHeader(0x080F, 0, 2), nullptr, "StopImportContent"},
{IPC::MakeHeader(0x0810, 1, 0), nullptr, "ResumeImportContent"},
{IPC::MakeHeader(0x0811, 0, 2), nullptr, "CancelImportContent"},
{IPC::MakeHeader(0x0812, 0, 2), nullptr, "EndImportContent"},
{IPC::MakeHeader(0x0813, 0, 0), nullptr, "GetNumCurrentImportContentContexts"},
{IPC::MakeHeader(0x0814, 1, 2), nullptr, "GetCurrentImportContentContextList"},
{IPC::MakeHeader(0x0815, 1, 4), nullptr, "GetCurrentImportContentContexts"},
{IPC::MakeHeader(0x0816, 5, 6), nullptr, "Sign"},
{IPC::MakeHeader(0x0817, 5, 6), nullptr, "Verify"},
{IPC::MakeHeader(0x0818, 1, 2), nullptr, "GetDeviceCert"},
{IPC::MakeHeader(0x0819, 4, 8), nullptr, "ImportCertificates"},
{IPC::MakeHeader(0x081A, 1, 2), nullptr, "ImportCertificate"},
{IPC::MakeHeader(0x081B, 3, 2), nullptr, "CommitImportTitlesAndUpdateFirmwareAuto"},
{IPC::MakeHeader(0x081C, 4, 0), nullptr, "DeleteTicketId"},
{IPC::MakeHeader(0x081D, 2, 0), nullptr, "GetNumTicketIds"},
{IPC::MakeHeader(0x081E, 4, 2), nullptr, "GetTicketIdList"},
{IPC::MakeHeader(0x081F, 2, 0), nullptr, "GetNumTicketsOfProgram"},
{IPC::MakeHeader(0x0820, 4, 2), nullptr, "ListTicketInfos"},
{IPC::MakeHeader(0x0821, 5, 2), nullptr, "GetRightsOnlyTicketData"},
{IPC::MakeHeader(0x0822, 0, 0), nullptr, "GetNumCurrentContentInfos"},
{IPC::MakeHeader(0x0823, 1, 4), nullptr, "FindCurrentContentInfos"},
{IPC::MakeHeader(0x0824, 2, 2), nullptr, "ListCurrentContentInfos"},
{IPC::MakeHeader(0x0825, 4, 2), nullptr, "CalculateContextRequiredSize"},
{IPC::MakeHeader(0x0826, 1, 2), nullptr, "UpdateImportContentContexts"},
{IPC::MakeHeader(0x0827, 0, 0), nullptr, "DeleteAllDemoLaunchInfos"},
{IPC::MakeHeader(0x0828, 3, 0), nullptr, "BeginImportTitleForOverWrite"},
{0x0001, &AM_NET::GetNumPrograms, "GetNumPrograms"},
{0x0002, &AM_NET::GetProgramList, "GetProgramList"},
{0x0003, &AM_NET::GetProgramInfos, "GetProgramInfos"},
{0x0004, &AM_NET::DeleteUserProgram, "DeleteUserProgram"},
{0x0005, &AM_NET::GetProductCode, "GetProductCode"},
{0x0006, nullptr, "GetStorageId"},
{0x0007, &AM_NET::DeleteTicket, "DeleteTicket"},
{0x0008, &AM_NET::GetNumTickets, "GetNumTickets"},
{0x0009, &AM_NET::GetTicketList, "GetTicketList"},
{0x000A, nullptr, "GetDeviceID"},
{0x000B, nullptr, "GetNumImportTitleContexts"},
{0x000C, nullptr, "GetImportTitleContextList"},
{0x000D, nullptr, "GetImportTitleContexts"},
{0x000E, nullptr, "DeleteImportTitleContext"},
{0x000F, nullptr, "GetNumImportContentContexts"},
{0x0010, nullptr, "GetImportContentContextList"},
{0x0011, nullptr, "GetImportContentContexts"},
{0x0012, nullptr, "DeleteImportContentContexts"},
{0x0013, &AM_NET::NeedsCleanup, "NeedsCleanup"},
{0x0014, nullptr, "DoCleanup"},
{0x0015, nullptr, "DeleteAllImportContexts"},
{0x0016, nullptr, "DeleteAllTemporaryPrograms"},
{0x0017, nullptr, "ImportTwlBackupLegacy"},
{0x0018, nullptr, "InitializeTitleDatabase"},
{0x0019, nullptr, "QueryAvailableTitleDatabase"},
{0x001A, nullptr, "CalcTwlBackupSize"},
{0x001B, nullptr, "ExportTwlBackup"},
{0x001C, nullptr, "ImportTwlBackup"},
{0x001D, nullptr, "DeleteAllTwlUserPrograms"},
{0x001E, nullptr, "ReadTwlBackupInfo"},
{0x001F, nullptr, "DeleteAllExpiredUserPrograms"},
{0x0020, nullptr, "GetTwlArchiveResourceInfo"},
{0x0021, nullptr, "GetPersonalizedTicketInfoList"},
{0x0022, nullptr, "DeleteAllImportContextsFiltered"},
{0x0023, nullptr, "GetNumImportTitleContextsFiltered"},
{0x0024, nullptr, "GetImportTitleContextListFiltered"},
{0x0025, nullptr, "CheckContentRights"},
{0x0026, nullptr, "GetTicketLimitInfos"},
{0x0027, nullptr, "GetDemoLaunchInfos"},
{0x0028, nullptr, "ReadTwlBackupInfoEx"},
{0x0029, nullptr, "DeleteUserProgramsAtomically"},
{0x002A, nullptr, "GetNumExistingContentInfosSystem"},
{0x002B, nullptr, "ListExistingContentInfosSystem"},
{0x002C, nullptr, "GetProgramInfosIgnorePlatform"},
{0x002D, nullptr, "CheckContentRightsIgnorePlatform"},
{0x0401, nullptr, "UpdateFirmwareTo"},
{0x0402, &AM_NET::BeginImportProgram, "BeginImportProgram"},
{0x0403, nullptr, "BeginImportProgramTemporarily"},
{0x0404, nullptr, "CancelImportProgram"},
{0x0405, &AM_NET::EndImportProgram, "EndImportProgram"},
{0x0406, nullptr, "EndImportProgramWithoutCommit"},
{0x0407, nullptr, "CommitImportPrograms"},
{0x0408, &AM_NET::GetProgramInfoFromCia, "GetProgramInfoFromCia"},
{0x0409, &AM_NET::GetSystemMenuDataFromCia, "GetSystemMenuDataFromCia"},
{0x040A, &AM_NET::GetDependencyListFromCia, "GetDependencyListFromCia"},
{0x040B, &AM_NET::GetTransferSizeFromCia, "GetTransferSizeFromCia"},
{0x040C, &AM_NET::GetCoreVersionFromCia, "GetCoreVersionFromCia"},
{0x040D, &AM_NET::GetRequiredSizeFromCia, "GetRequiredSizeFromCia"},
{0x040E, nullptr, "CommitImportProgramsAndUpdateFirmwareAuto"},
{0x040F, nullptr, "UpdateFirmwareAuto"},
{0x0410, &AM_NET::DeleteProgram, "DeleteProgram"},
{0x0411, nullptr, "GetTwlProgramListForReboot"},
{0x0412, nullptr, "GetSystemUpdaterMutex"},
{0x0413, &AM_NET::GetMetaSizeFromCia, "GetMetaSizeFromCia"},
{0x0414, &AM_NET::GetMetaDataFromCia, "GetMetaDataFromCia"},
{0x0415, nullptr, "CheckDemoLaunchRights"},
{0x0416, nullptr, "GetInternalTitleLocationInfo"},
{0x0417, nullptr, "PerpetuateAgbSaveData"},
{0x0418, nullptr, "BeginImportProgramForOverWrite"},
{0x0419, nullptr, "BeginImportSystemProgram"},
{0x0801, nullptr, "BeginImportTicket"},
{0x0802, nullptr, "CancelImportTicket"},
{0x0803, nullptr, "EndImportTicket"},
{0x0804, nullptr, "BeginImportTitle"},
{0x0805, nullptr, "StopImportTitle"},
{0x0806, nullptr, "ResumeImportTitle"},
{0x0807, nullptr, "CancelImportTitle"},
{0x0808, nullptr, "EndImportTitle"},
{0x0809, nullptr, "CommitImportTitles"},
{0x080A, nullptr, "BeginImportTmd"},
{0x080B, nullptr, "CancelImportTmd"},
{0x080C, nullptr, "EndImportTmd"},
{0x080D, nullptr, "CreateImportContentContexts"},
{0x080E, nullptr, "BeginImportContent"},
{0x080F, nullptr, "StopImportContent"},
{0x0810, nullptr, "ResumeImportContent"},
{0x0811, nullptr, "CancelImportContent"},
{0x0812, nullptr, "EndImportContent"},
{0x0813, nullptr, "GetNumCurrentImportContentContexts"},
{0x0814, nullptr, "GetCurrentImportContentContextList"},
{0x0815, nullptr, "GetCurrentImportContentContexts"},
{0x0816, nullptr, "Sign"},
{0x0817, nullptr, "Verify"},
{0x0818, nullptr, "GetDeviceCert"},
{0x0819, nullptr, "ImportCertificates"},
{0x081A, nullptr, "ImportCertificate"},
{0x081B, nullptr, "CommitImportTitlesAndUpdateFirmwareAuto"},
{0x081C, nullptr, "DeleteTicketId"},
{0x081D, nullptr, "GetNumTicketIds"},
{0x081E, nullptr, "GetTicketIdList"},
{0x081F, nullptr, "GetNumTicketsOfProgram"},
{0x0820, nullptr, "ListTicketInfos"},
{0x0821, nullptr, "GetRightsOnlyTicketData"},
{0x0822, nullptr, "GetNumCurrentContentInfos"},
{0x0823, nullptr, "FindCurrentContentInfos"},
{0x0824, nullptr, "ListCurrentContentInfos"},
{0x0825, nullptr, "CalculateContextRequiredSize"},
{0x0826, nullptr, "UpdateImportContentContexts"},
{0x0827, nullptr, "DeleteAllDemoLaunchInfos"},
{0x0828, nullptr, "BeginImportTitleForOverWrite"},
// clang-format on
};
RegisterHandlers(functions);

View File

@ -10,64 +10,64 @@ namespace Service::AM {
AM_SYS::AM_SYS(std::shared_ptr<Module> am) : Module::Interface(std::move(am), "am:sys", 5) {
static const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0001, 1, 0), &AM_SYS::GetNumPrograms, "GetNumPrograms"},
{IPC::MakeHeader(0x0002, 2, 2), &AM_SYS::GetProgramList, "GetProgramList"},
{IPC::MakeHeader(0x0003, 2, 4), &AM_SYS::GetProgramInfos, "GetProgramInfos"},
{IPC::MakeHeader(0x0004, 3, 0), &AM_SYS::DeleteUserProgram, "DeleteUserProgram"},
{IPC::MakeHeader(0x0005, 3, 0), &AM_SYS::GetProductCode, "GetProductCode"},
{IPC::MakeHeader(0x0006, 3, 0), nullptr, "GetStorageId"},
{IPC::MakeHeader(0x0007, 2, 0), &AM_SYS::DeleteTicket, "DeleteTicket"},
{IPC::MakeHeader(0x0008, 0, 0), &AM_SYS::GetNumTickets, "GetNumTickets"},
{IPC::MakeHeader(0x0009, 2, 2), &AM_SYS::GetTicketList, "GetTicketList"},
{IPC::MakeHeader(0x000A, 0, 0), nullptr, "GetDeviceID"},
{IPC::MakeHeader(0x000B, 1, 0), nullptr, "GetNumImportTitleContexts"},
{IPC::MakeHeader(0x000C, 2, 2), nullptr, "GetImportTitleContextList"},
{IPC::MakeHeader(0x000D, 2, 4), nullptr, "GetImportTitleContexts"},
{IPC::MakeHeader(0x000E, 3, 0), nullptr, "DeleteImportTitleContext"},
{IPC::MakeHeader(0x000F, 3, 0), nullptr, "GetNumImportContentContexts"},
{IPC::MakeHeader(0x0010, 4, 2), nullptr, "GetImportContentContextList"},
{IPC::MakeHeader(0x0011, 4, 4), nullptr, "GetImportContentContexts"},
{IPC::MakeHeader(0x0012, 4, 2), nullptr, "DeleteImportContentContexts"},
{IPC::MakeHeader(0x0013, 1, 0), &AM_SYS::NeedsCleanup, "NeedsCleanup"},
{IPC::MakeHeader(0x0014, 1, 0), nullptr, "DoCleanup"},
{IPC::MakeHeader(0x0015, 1, 0), nullptr, "DeleteAllImportContexts"},
{IPC::MakeHeader(0x0016, 0, 0), nullptr, "DeleteAllTemporaryPrograms"},
{IPC::MakeHeader(0x0017, 1, 4), nullptr, "ImportTwlBackupLegacy"},
{IPC::MakeHeader(0x0018, 2, 0), nullptr, "InitializeTitleDatabase"},
{IPC::MakeHeader(0x0019, 1, 0), &AM_SYS::QueryAvailableTitleDatabase, "QueryAvailableTitleDatabase"},
{IPC::MakeHeader(0x001A, 3, 0), nullptr, "CalcTwlBackupSize"},
{IPC::MakeHeader(0x001B, 5, 4), nullptr, "ExportTwlBackup"},
{IPC::MakeHeader(0x001C, 2, 4), nullptr, "ImportTwlBackup"},
{IPC::MakeHeader(0x001D, 0, 0), nullptr, "DeleteAllTwlUserPrograms"},
{IPC::MakeHeader(0x001E, 3, 8), nullptr, "ReadTwlBackupInfo"},
{IPC::MakeHeader(0x001F, 1, 0), nullptr, "DeleteAllExpiredUserPrograms"},
{IPC::MakeHeader(0x0020, 0, 0), nullptr, "GetTwlArchiveResourceInfo"},
{IPC::MakeHeader(0x0021, 1, 2), nullptr, "GetPersonalizedTicketInfoList"},
{IPC::MakeHeader(0x0022, 2, 0), nullptr, "DeleteAllImportContextsFiltered"},
{IPC::MakeHeader(0x0023, 2, 0), nullptr, "GetNumImportTitleContextsFiltered"},
{IPC::MakeHeader(0x0024, 3, 2), nullptr, "GetImportTitleContextListFiltered"},
{IPC::MakeHeader(0x0025, 3, 0), &AM_SYS::CheckContentRights, "CheckContentRights"},
{IPC::MakeHeader(0x0026, 1, 4), nullptr, "GetTicketLimitInfos"},
{IPC::MakeHeader(0x0027, 1, 4), nullptr, "GetDemoLaunchInfos"},
{IPC::MakeHeader(0x0028, 4, 8), nullptr, "ReadTwlBackupInfoEx"},
{IPC::MakeHeader(0x0029, 2, 2), nullptr, "DeleteUserProgramsAtomically"},
{IPC::MakeHeader(0x002A, 3, 0), nullptr, "GetNumExistingContentInfosSystem"},
{IPC::MakeHeader(0x002B, 5, 2), nullptr, "ListExistingContentInfosSystem"},
{IPC::MakeHeader(0x002C, 2, 4), nullptr, "GetProgramInfosIgnorePlatform"},
{IPC::MakeHeader(0x002D, 3, 0), &AM_SYS::CheckContentRightsIgnorePlatform, "CheckContentRightsIgnorePlatform"},
{IPC::MakeHeader(0x1001, 3, 0), &AM_SYS::GetDLCContentInfoCount, "GetDLCContentInfoCount"},
{IPC::MakeHeader(0x1002, 4, 4), &AM_SYS::FindDLCContentInfos, "FindDLCContentInfos"},
{IPC::MakeHeader(0x1003, 5, 2), &AM_SYS::ListDLCContentInfos, "ListDLCContentInfos"},
{IPC::MakeHeader(0x1004, 4, 2), &AM_SYS::DeleteContents, "DeleteContents"},
{IPC::MakeHeader(0x1005, 2, 4), &AM_SYS::GetDLCTitleInfos, "GetDLCTitleInfos"},
{IPC::MakeHeader(0x1006, 2, 0), nullptr, "GetNumDataTitleTickets"},
{IPC::MakeHeader(0x1007, 4, 2), &AM_SYS::ListDataTitleTicketInfos, "ListDataTitleTicketInfos"},
{IPC::MakeHeader(0x1008, 7, 2), nullptr, "GetItemRights"},
{IPC::MakeHeader(0x1009, 3, 0), nullptr, "IsDataTitleInUse"},
{IPC::MakeHeader(0x100A, 0, 0), nullptr, "IsExternalTitleDatabaseInitialized"},
{IPC::MakeHeader(0x100B, 3, 0), nullptr, "GetNumExistingContentInfos"},
{IPC::MakeHeader(0x100C, 5, 2), nullptr, "ListExistingContentInfos"},
{IPC::MakeHeader(0x100D, 2, 4), &AM_SYS::GetPatchTitleInfos, "GetPatchTitleInfos"},
{0x0001, &AM_SYS::GetNumPrograms, "GetNumPrograms"},
{0x0002, &AM_SYS::GetProgramList, "GetProgramList"},
{0x0003, &AM_SYS::GetProgramInfos, "GetProgramInfos"},
{0x0004, &AM_SYS::DeleteUserProgram, "DeleteUserProgram"},
{0x0005, &AM_SYS::GetProductCode, "GetProductCode"},
{0x0006, nullptr, "GetStorageId"},
{0x0007, &AM_SYS::DeleteTicket, "DeleteTicket"},
{0x0008, &AM_SYS::GetNumTickets, "GetNumTickets"},
{0x0009, &AM_SYS::GetTicketList, "GetTicketList"},
{0x000A, nullptr, "GetDeviceID"},
{0x000B, nullptr, "GetNumImportTitleContexts"},
{0x000C, nullptr, "GetImportTitleContextList"},
{0x000D, nullptr, "GetImportTitleContexts"},
{0x000E, nullptr, "DeleteImportTitleContext"},
{0x000F, nullptr, "GetNumImportContentContexts"},
{0x0010, nullptr, "GetImportContentContextList"},
{0x0011, nullptr, "GetImportContentContexts"},
{0x0012, nullptr, "DeleteImportContentContexts"},
{0x0013, &AM_SYS::NeedsCleanup, "NeedsCleanup"},
{0x0014, nullptr, "DoCleanup"},
{0x0015, nullptr, "DeleteAllImportContexts"},
{0x0016, nullptr, "DeleteAllTemporaryPrograms"},
{0x0017, nullptr, "ImportTwlBackupLegacy"},
{0x0018, nullptr, "InitializeTitleDatabase"},
{0x0019, &AM_SYS::QueryAvailableTitleDatabase, "QueryAvailableTitleDatabase"},
{0x001A, nullptr, "CalcTwlBackupSize"},
{0x001B, nullptr, "ExportTwlBackup"},
{0x001C, nullptr, "ImportTwlBackup"},
{0x001D, nullptr, "DeleteAllTwlUserPrograms"},
{0x001E, nullptr, "ReadTwlBackupInfo"},
{0x001F, nullptr, "DeleteAllExpiredUserPrograms"},
{0x0020, nullptr, "GetTwlArchiveResourceInfo"},
{0x0021, nullptr, "GetPersonalizedTicketInfoList"},
{0x0022, nullptr, "DeleteAllImportContextsFiltered"},
{0x0023, nullptr, "GetNumImportTitleContextsFiltered"},
{0x0024, nullptr, "GetImportTitleContextListFiltered"},
{0x0025, &AM_SYS::CheckContentRights, "CheckContentRights"},
{0x0026, nullptr, "GetTicketLimitInfos"},
{0x0027, nullptr, "GetDemoLaunchInfos"},
{0x0028, nullptr, "ReadTwlBackupInfoEx"},
{0x0029, nullptr, "DeleteUserProgramsAtomically"},
{0x002A, nullptr, "GetNumExistingContentInfosSystem"},
{0x002B, nullptr, "ListExistingContentInfosSystem"},
{0x002C, nullptr, "GetProgramInfosIgnorePlatform"},
{0x002D, &AM_SYS::CheckContentRightsIgnorePlatform, "CheckContentRightsIgnorePlatform"},
{0x1001, &AM_SYS::GetDLCContentInfoCount, "GetDLCContentInfoCount"},
{0x1002, &AM_SYS::FindDLCContentInfos, "FindDLCContentInfos"},
{0x1003, &AM_SYS::ListDLCContentInfos, "ListDLCContentInfos"},
{0x1004, &AM_SYS::DeleteContents, "DeleteContents"},
{0x1005, &AM_SYS::GetDLCTitleInfos, "GetDLCTitleInfos"},
{0x1006, nullptr, "GetNumDataTitleTickets"},
{0x1007, &AM_SYS::ListDataTitleTicketInfos, "ListDataTitleTicketInfos"},
{0x1008, nullptr, "GetItemRights"},
{0x1009, nullptr, "IsDataTitleInUse"},
{0x100A, nullptr, "IsExternalTitleDatabaseInitialized"},
{0x100B, nullptr, "GetNumExistingContentInfos"},
{0x100C, nullptr, "ListExistingContentInfos"},
{0x100D, &AM_SYS::GetPatchTitleInfos, "GetPatchTitleInfos"},
// clang-format on
};
RegisterHandlers(functions);

View File

@ -10,76 +10,76 @@ namespace Service::AM {
AM_U::AM_U(std::shared_ptr<Module> am) : Module::Interface(std::move(am), "am:u", 5) {
static const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0001, 1, 0), &AM_U::GetNumPrograms, "GetNumPrograms"},
{IPC::MakeHeader(0x0002, 2, 2), &AM_U::GetProgramList, "GetProgramList"},
{IPC::MakeHeader(0x0003, 2, 4), &AM_U::GetProgramInfos, "GetProgramInfos"},
{IPC::MakeHeader(0x0004, 3, 0), &AM_U::DeleteUserProgram, "DeleteUserProgram"},
{IPC::MakeHeader(0x0005, 3, 0), &AM_U::GetProductCode, "GetProductCode"},
{IPC::MakeHeader(0x0006, 3, 0), nullptr, "GetStorageId"},
{IPC::MakeHeader(0x0007, 2, 0), &AM_U::DeleteTicket, "DeleteTicket"},
{IPC::MakeHeader(0x0008, 0, 0), &AM_U::GetNumTickets, "GetNumTickets"},
{IPC::MakeHeader(0x0009, 2, 2), &AM_U::GetTicketList, "GetTicketList"},
{IPC::MakeHeader(0x000A, 0, 0), nullptr, "GetDeviceID"},
{IPC::MakeHeader(0x000B, 1, 0), nullptr, "GetNumImportTitleContexts"},
{IPC::MakeHeader(0x000C, 2, 2), nullptr, "GetImportTitleContextList"},
{IPC::MakeHeader(0x000D, 2, 4), nullptr, "GetImportTitleContexts"},
{IPC::MakeHeader(0x000E, 3, 0), nullptr, "DeleteImportTitleContext"},
{IPC::MakeHeader(0x000F, 3, 0), nullptr, "GetNumImportContentContexts"},
{IPC::MakeHeader(0x0010, 4, 2), nullptr, "GetImportContentContextList"},
{IPC::MakeHeader(0x0011, 4, 4), nullptr, "GetImportContentContexts"},
{IPC::MakeHeader(0x0012, 4, 2), nullptr, "DeleteImportContentContexts"},
{IPC::MakeHeader(0x0013, 1, 0), &AM_U::NeedsCleanup, "NeedsCleanup"},
{IPC::MakeHeader(0x0014, 1, 0), nullptr, "DoCleanup"},
{IPC::MakeHeader(0x0015, 1, 0), nullptr, "DeleteAllImportContexts"},
{IPC::MakeHeader(0x0016, 0, 0), nullptr, "DeleteAllTemporaryPrograms"},
{IPC::MakeHeader(0x0017, 1, 4), nullptr, "ImportTwlBackupLegacy"},
{IPC::MakeHeader(0x0018, 2, 0), nullptr, "InitializeTitleDatabase"},
{IPC::MakeHeader(0x0019, 1, 0), nullptr, "QueryAvailableTitleDatabase"},
{IPC::MakeHeader(0x001A, 3, 0), nullptr, "CalcTwlBackupSize"},
{IPC::MakeHeader(0x001B, 5, 4), nullptr, "ExportTwlBackup"},
{IPC::MakeHeader(0x001C, 2, 4), nullptr, "ImportTwlBackup"},
{IPC::MakeHeader(0x001D, 0, 0), nullptr, "DeleteAllTwlUserPrograms"},
{IPC::MakeHeader(0x001E, 3, 8), nullptr, "ReadTwlBackupInfo"},
{IPC::MakeHeader(0x001F, 1, 0), nullptr, "DeleteAllExpiredUserPrograms"},
{IPC::MakeHeader(0x0020, 0, 0), nullptr, "GetTwlArchiveResourceInfo"},
{IPC::MakeHeader(0x0021, 1, 2), nullptr, "GetPersonalizedTicketInfoList"},
{IPC::MakeHeader(0x0022, 2, 0), nullptr, "DeleteAllImportContextsFiltered"},
{IPC::MakeHeader(0x0023, 2, 0), nullptr, "GetNumImportTitleContextsFiltered"},
{IPC::MakeHeader(0x0024, 3, 2), nullptr, "GetImportTitleContextListFiltered"},
{IPC::MakeHeader(0x0025, 3, 0), nullptr, "CheckContentRights"},
{IPC::MakeHeader(0x0026, 1, 4), nullptr, "GetTicketLimitInfos"},
{IPC::MakeHeader(0x0027, 1, 4), nullptr, "GetDemoLaunchInfos"},
{IPC::MakeHeader(0x0028, 4, 8), nullptr, "ReadTwlBackupInfoEx"},
{IPC::MakeHeader(0x0029, 2, 2), nullptr, "DeleteUserProgramsAtomically"},
{IPC::MakeHeader(0x002A, 3, 0), nullptr, "GetNumExistingContentInfosSystem"},
{IPC::MakeHeader(0x002B, 5, 2), nullptr, "ListExistingContentInfosSystem"},
{IPC::MakeHeader(0x002C, 2, 4), nullptr, "GetProgramInfosIgnorePlatform"},
{IPC::MakeHeader(0x002D, 3, 0), nullptr, "CheckContentRightsIgnorePlatform"},
{IPC::MakeHeader(0x0401, 2, 0), nullptr, "UpdateFirmwareTo"},
{IPC::MakeHeader(0x0402, 1, 0), &AM_U::BeginImportProgram, "BeginImportProgram"},
{IPC::MakeHeader(0x0403, 0, 0), &AM_U::BeginImportProgramTemporarily, "BeginImportProgramTemporarily"},
{IPC::MakeHeader(0x0404, 0, 2), nullptr, "CancelImportProgram"},
{IPC::MakeHeader(0x0405, 0, 2), &AM_U::EndImportProgram, "EndImportProgram"},
{IPC::MakeHeader(0x0406, 0, 2), &AM_U::EndImportProgramWithoutCommit, "EndImportProgramWithoutCommit"},
{IPC::MakeHeader(0x0407, 3, 2), &AM_U::CommitImportPrograms, "CommitImportPrograms"},
{IPC::MakeHeader(0x0408, 1, 2), &AM_U::GetProgramInfoFromCia, "GetProgramInfoFromCia"},
{IPC::MakeHeader(0x0409, 0, 4), &AM_U::GetSystemMenuDataFromCia, "GetSystemMenuDataFromCia"},
{IPC::MakeHeader(0x040A, 0, 2), &AM_U::GetDependencyListFromCia, "GetDependencyListFromCia"},
{IPC::MakeHeader(0x040B, 0, 2), &AM_U::GetTransferSizeFromCia, "GetTransferSizeFromCia"},
{IPC::MakeHeader(0x040C, 0, 2), &AM_U::GetCoreVersionFromCia, "GetCoreVersionFromCia"},
{IPC::MakeHeader(0x040D, 1, 2), &AM_U::GetRequiredSizeFromCia, "GetRequiredSizeFromCia"},
{IPC::MakeHeader(0x040E, 3, 2), nullptr, "CommitImportProgramsAndUpdateFirmwareAuto"},
{IPC::MakeHeader(0x040F, 0, 0), nullptr, "UpdateFirmwareAuto"},
{IPC::MakeHeader(0x0410, 3, 0), &AM_U::DeleteProgram, "DeleteProgram"},
{IPC::MakeHeader(0x0411, 1, 4), nullptr, "GetTwlProgramListForReboot"},
{IPC::MakeHeader(0x0412, 0, 0), &AM_U::GetSystemUpdaterMutex, "GetSystemUpdaterMutex"},
{IPC::MakeHeader(0x0413, 0, 2), &AM_U::GetMetaSizeFromCia, "GetMetaSizeFromCia"},
{IPC::MakeHeader(0x0414, 1, 4), &AM_U::GetMetaDataFromCia, "GetMetaDataFromCia"},
{IPC::MakeHeader(0x0415, 2, 0), nullptr, "CheckDemoLaunchRights"},
{IPC::MakeHeader(0x0416, 3, 0), nullptr, "GetInternalTitleLocationInfo"},
{IPC::MakeHeader(0x0417, 3, 0), nullptr, "PerpetuateAgbSaveData"},
{IPC::MakeHeader(0x0418, 1, 0), nullptr, "BeginImportProgramForOverWrite"},
{IPC::MakeHeader(0x0419, 0, 0), nullptr, "BeginImportSystemProgram"},
{0x0001, &AM_U::GetNumPrograms, "GetNumPrograms"},
{0x0002, &AM_U::GetProgramList, "GetProgramList"},
{0x0003, &AM_U::GetProgramInfos, "GetProgramInfos"},
{0x0004, &AM_U::DeleteUserProgram, "DeleteUserProgram"},
{0x0005, &AM_U::GetProductCode, "GetProductCode"},
{0x0006, nullptr, "GetStorageId"},
{0x0007, &AM_U::DeleteTicket, "DeleteTicket"},
{0x0008, &AM_U::GetNumTickets, "GetNumTickets"},
{0x0009, &AM_U::GetTicketList, "GetTicketList"},
{0x000A, nullptr, "GetDeviceID"},
{0x000B, nullptr, "GetNumImportTitleContexts"},
{0x000C, nullptr, "GetImportTitleContextList"},
{0x000D, nullptr, "GetImportTitleContexts"},
{0x000E, nullptr, "DeleteImportTitleContext"},
{0x000F, nullptr, "GetNumImportContentContexts"},
{0x0010, nullptr, "GetImportContentContextList"},
{0x0011, nullptr, "GetImportContentContexts"},
{0x0012, nullptr, "DeleteImportContentContexts"},
{0x0013, &AM_U::NeedsCleanup, "NeedsCleanup"},
{0x0014, nullptr, "DoCleanup"},
{0x0015, nullptr, "DeleteAllImportContexts"},
{0x0016, nullptr, "DeleteAllTemporaryPrograms"},
{0x0017, nullptr, "ImportTwlBackupLegacy"},
{0x0018, nullptr, "InitializeTitleDatabase"},
{0x0019, nullptr, "QueryAvailableTitleDatabase"},
{0x001A, nullptr, "CalcTwlBackupSize"},
{0x001B, nullptr, "ExportTwlBackup"},
{0x001C, nullptr, "ImportTwlBackup"},
{0x001D, nullptr, "DeleteAllTwlUserPrograms"},
{0x001E, nullptr, "ReadTwlBackupInfo"},
{0x001F, nullptr, "DeleteAllExpiredUserPrograms"},
{0x0020, nullptr, "GetTwlArchiveResourceInfo"},
{0x0021, nullptr, "GetPersonalizedTicketInfoList"},
{0x0022, nullptr, "DeleteAllImportContextsFiltered"},
{0x0023, nullptr, "GetNumImportTitleContextsFiltered"},
{0x0024, nullptr, "GetImportTitleContextListFiltered"},
{0x0025, nullptr, "CheckContentRights"},
{0x0026, nullptr, "GetTicketLimitInfos"},
{0x0027, nullptr, "GetDemoLaunchInfos"},
{0x0028, nullptr, "ReadTwlBackupInfoEx"},
{0x0029, nullptr, "DeleteUserProgramsAtomically"},
{0x002A, nullptr, "GetNumExistingContentInfosSystem"},
{0x002B, nullptr, "ListExistingContentInfosSystem"},
{0x002C, nullptr, "GetProgramInfosIgnorePlatform"},
{0x002D, nullptr, "CheckContentRightsIgnorePlatform"},
{0x0401, nullptr, "UpdateFirmwareTo"},
{0x0402, &AM_U::BeginImportProgram, "BeginImportProgram"},
{0x0403, &AM_U::BeginImportProgramTemporarily, "BeginImportProgramTemporarily"},
{0x0404, nullptr, "CancelImportProgram"},
{0x0405, &AM_U::EndImportProgram, "EndImportProgram"},
{0x0406, &AM_U::EndImportProgramWithoutCommit, "EndImportProgramWithoutCommit"},
{0x0407, &AM_U::CommitImportPrograms, "CommitImportPrograms"},
{0x0408, &AM_U::GetProgramInfoFromCia, "GetProgramInfoFromCia"},
{0x0409, &AM_U::GetSystemMenuDataFromCia, "GetSystemMenuDataFromCia"},
{0x040A, &AM_U::GetDependencyListFromCia, "GetDependencyListFromCia"},
{0x040B, &AM_U::GetTransferSizeFromCia, "GetTransferSizeFromCia"},
{0x040C, &AM_U::GetCoreVersionFromCia, "GetCoreVersionFromCia"},
{0x040D, &AM_U::GetRequiredSizeFromCia, "GetRequiredSizeFromCia"},
{0x040E, nullptr, "CommitImportProgramsAndUpdateFirmwareAuto"},
{0x040F, nullptr, "UpdateFirmwareAuto"},
{0x0410, &AM_U::DeleteProgram, "DeleteProgram"},
{0x0411, nullptr, "GetTwlProgramListForReboot"},
{0x0412, &AM_U::GetSystemUpdaterMutex, "GetSystemUpdaterMutex"},
{0x0413, &AM_U::GetMetaSizeFromCia, "GetMetaSizeFromCia"},
{0x0414, &AM_U::GetMetaDataFromCia, "GetMetaDataFromCia"},
{0x0415, nullptr, "CheckDemoLaunchRights"},
{0x0416, nullptr, "GetInternalTitleLocationInfo"},
{0x0417, nullptr, "PerpetuateAgbSaveData"},
{0x0418, nullptr, "BeginImportProgramForOverWrite"},
{0x0419, nullptr, "BeginImportSystemProgram"},
// clang-format on
};
RegisterHandlers(functions);

View File

@ -61,7 +61,7 @@ std::shared_ptr<Module> Module::NSInterface::GetModule() const {
}
void Module::NSInterface::SetWirelessRebootInfo(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x06, 1, 2); // 0x00060042
IPC::RequestParser rp(ctx);
const auto size = rp.Pop<u32>();
const auto buffer = rp.PopStaticBuffer();
@ -74,7 +74,7 @@ void Module::NSInterface::SetWirelessRebootInfo(Kernel::HLERequestContext& ctx)
}
void Module::NSInterface::ShutdownAsync(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0xE, 0, 0); // 0xE0000
IPC::RequestParser rp(ctx);
LOG_INFO(Service_APT, "called");
@ -85,7 +85,7 @@ void Module::NSInterface::ShutdownAsync(Kernel::HLERequestContext& ctx) {
}
void Module::NSInterface::RebootSystem(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x10, 6, 0); // 0x100180
IPC::RequestParser rp(ctx);
const auto launch_title = rp.Pop<u8>() != 0;
const auto title_id = rp.Pop<u64>();
const auto media_type = static_cast<FS::MediaType>(rp.Pop<u8>());
@ -104,7 +104,7 @@ void Module::NSInterface::RebootSystem(Kernel::HLERequestContext& ctx) {
}
void Module::NSInterface::RebootSystemClean(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x16, 0, 0); // 0x160000
IPC::RequestParser rp(ctx);
LOG_INFO(Service_APT, "called");
@ -115,7 +115,7 @@ void Module::NSInterface::RebootSystemClean(Kernel::HLERequestContext& ctx) {
}
void Module::APTInterface::Initialize(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x2, 2, 0); // 0x20080
IPC::RequestParser rp(ctx);
const auto app_id = rp.PopEnum<AppletId>();
const auto attributes = rp.Pop<u32>();
@ -266,7 +266,7 @@ bool Module::LoadLegacySharedFont() {
}
void Module::APTInterface::GetSharedFont(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x44, 0, 0); // 0x00440000
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 2);
// Log in telemetry if the game uses the shared font
@ -318,7 +318,7 @@ void Module::APTInterface::GetSharedFont(Kernel::HLERequestContext& ctx) {
}
void Module::APTInterface::GetWirelessRebootInfo(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x45, 1, 0); // 0x00450040
IPC::RequestParser rp(ctx);
const auto size = rp.Pop<u32>();
LOG_WARNING(Service_APT, "called size={:08X}", size);
@ -329,7 +329,7 @@ void Module::APTInterface::GetWirelessRebootInfo(Kernel::HLERequestContext& ctx)
}
void Module::APTInterface::NotifyToWait(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x43, 1, 0); // 0x430040
IPC::RequestParser rp(ctx);
const auto app_id = rp.Pop<u32>();
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
@ -339,7 +339,7 @@ void Module::APTInterface::NotifyToWait(Kernel::HLERequestContext& ctx) {
}
void Module::APTInterface::GetLockHandle(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1, 1, 0); // 0x10040
IPC::RequestParser rp(ctx);
// Bits [0:2] are the applet type (System, Library, etc)
// Bit 5 tells the application that there's a pending APT parameter,
@ -362,7 +362,7 @@ void Module::APTInterface::GetLockHandle(Kernel::HLERequestContext& ctx) {
}
void Module::APTInterface::Enable(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x3, 1, 0); // 0x30040
IPC::RequestParser rp(ctx);
const auto attributes = rp.Pop<u32>();
LOG_DEBUG(Service_APT, "called attributes={:#010X}", attributes);
@ -372,7 +372,7 @@ void Module::APTInterface::Enable(Kernel::HLERequestContext& ctx) {
}
void Module::APTInterface::GetAppletManInfo(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x5, 1, 0); // 0x50040
IPC::RequestParser rp(ctx);
auto applet_pos = rp.PopEnum<AppletPos>();
LOG_DEBUG(Service_APT, "called, applet_pos={:08X}", applet_pos);
@ -392,7 +392,7 @@ void Module::APTInterface::GetAppletManInfo(Kernel::HLERequestContext& ctx) {
}
void Module::APTInterface::IsRegistered(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x9, 1, 0); // 0x90040
IPC::RequestParser rp(ctx);
const auto app_id = rp.PopEnum<AppletId>();
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
@ -403,7 +403,7 @@ void Module::APTInterface::IsRegistered(Kernel::HLERequestContext& ctx) {
}
void Module::APTInterface::InquireNotification(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0xB, 1, 0); // 0xB0040
IPC::RequestParser rp(ctx);
const auto app_id = rp.PopEnum<AppletId>();
LOG_DEBUG(Service_APT, "called app_id={:#010X}", app_id);
@ -420,7 +420,7 @@ void Module::APTInterface::InquireNotification(Kernel::HLERequestContext& ctx) {
}
void Module::APTInterface::SendParameter(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0xC, 4, 4); // 0xC0104
IPC::RequestParser rp(ctx);
const auto src_app_id = rp.PopEnum<AppletId>();
const auto dst_app_id = rp.PopEnum<AppletId>();
const auto signal_type = rp.PopEnum<SignalType>();
@ -444,7 +444,7 @@ void Module::APTInterface::SendParameter(Kernel::HLERequestContext& ctx) {
}
void Module::APTInterface::ReceiveParameter(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0xD, 2, 0); // 0xD0080
IPC::RequestParser rp(ctx);
const auto app_id = rp.PopEnum<AppletId>();
const auto buffer_size = rp.Pop<u32>();
@ -470,7 +470,7 @@ void Module::APTInterface::ReceiveParameter(Kernel::HLERequestContext& ctx) {
}
void Module::APTInterface::GlanceParameter(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0xE, 2, 0); // 0xE0080
IPC::RequestParser rp(ctx);
const auto app_id = rp.PopEnum<AppletId>();
const u32 buffer_size = rp.Pop<u32>();
@ -496,7 +496,7 @@ void Module::APTInterface::GlanceParameter(Kernel::HLERequestContext& ctx) {
}
void Module::APTInterface::CancelParameter(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0xF, 4, 0); // 0xF0100
IPC::RequestParser rp(ctx);
const auto check_sender = rp.Pop<bool>();
const auto sender_appid = rp.PopEnum<AppletId>();
const auto check_receiver = rp.Pop<bool>();
@ -514,7 +514,7 @@ void Module::APTInterface::CancelParameter(Kernel::HLERequestContext& ctx) {
}
void Module::APTInterface::PrepareToDoApplicationJump(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x31, 4, 0); // 0x00310100
IPC::RequestParser rp(ctx);
auto flags = rp.PopEnum<ApplicationJumpFlags>();
u64 title_id = rp.Pop<u64>();
u8 media_type = rp.Pop<u8>();
@ -530,7 +530,7 @@ void Module::APTInterface::PrepareToDoApplicationJump(Kernel::HLERequestContext&
}
void Module::APTInterface::DoApplicationJump(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x32, 2, 4); // 0x00320084
IPC::RequestParser rp(ctx);
const auto param_size = rp.Pop<u32>();
const auto hmac_size = rp.Pop<u32>();
const auto param = rp.PopStaticBuffer();
@ -543,7 +543,7 @@ void Module::APTInterface::DoApplicationJump(Kernel::HLERequestContext& ctx) {
}
void Module::APTInterface::GetProgramIdOnApplicationJump(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x33, 0, 0); // 0x00330000
IPC::RequestParser rp(ctx);
LOG_DEBUG(Service_APT, "called");
@ -558,7 +558,7 @@ void Module::APTInterface::GetProgramIdOnApplicationJump(Kernel::HLERequestConte
}
void Module::APTInterface::ReceiveDeliverArg(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x35, 2, 0); // 0x00350080
IPC::RequestParser rp(ctx);
const auto param_size = rp.Pop<u32>();
const auto hmac_size = rp.Pop<u32>();
@ -577,7 +577,7 @@ void Module::APTInterface::ReceiveDeliverArg(Kernel::HLERequestContext& ctx) {
}
void Module::APTInterface::PrepareToStartApplication(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x15, 5, 0); // 0x00150140
IPC::RequestParser rp(ctx);
const auto title_id = rp.Pop<u64>();
const auto media_type = static_cast<FS::MediaType>(rp.Pop<u8>());
rp.Skip(1, false); // Padding
@ -591,7 +591,7 @@ void Module::APTInterface::PrepareToStartApplication(Kernel::HLERequestContext&
}
void Module::APTInterface::StartApplication(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1B, 3, 4); // 0x001B00C4
IPC::RequestParser rp(ctx);
const auto parameter_size = rp.Pop<u32>();
const auto hmac_size = rp.Pop<u32>();
const auto paused = rp.Pop<bool>();
@ -606,7 +606,7 @@ void Module::APTInterface::StartApplication(Kernel::HLERequestContext& ctx) {
}
void Module::APTInterface::WakeupApplication(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1C, 0, 0); // 0x001C0000
IPC::RequestParser rp(ctx);
LOG_DEBUG(Service_APT, "called");
@ -615,7 +615,7 @@ void Module::APTInterface::WakeupApplication(Kernel::HLERequestContext& ctx) {
}
void Module::APTInterface::CancelApplication(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1D, 0, 0); // 0x001D0000
IPC::RequestParser rp(ctx);
LOG_DEBUG(Service_APT, "called");
@ -624,7 +624,7 @@ void Module::APTInterface::CancelApplication(Kernel::HLERequestContext& ctx) {
}
void Module::APTInterface::AppletUtility(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x4B, 3, 2); // 0x004B00C2
IPC::RequestParser rp(ctx);
// These are from 3dbrew - I'm not really sure what they're used for.
const auto utility_command = rp.Pop<u32>();
@ -651,7 +651,7 @@ void Module::APTInterface::AppletUtility(Kernel::HLERequestContext& ctx) {
}
void Module::APTInterface::SetAppCpuTimeLimit(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x4F, 2, 0); // 0x4F0080
IPC::RequestParser rp(ctx);
const auto must_be_one = rp.Pop<u32>();
const auto value = rp.Pop<u32>();
@ -667,7 +667,7 @@ void Module::APTInterface::SetAppCpuTimeLimit(Kernel::HLERequestContext& ctx) {
}
void Module::APTInterface::GetAppCpuTimeLimit(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x50, 1, 0); // 0x500040
IPC::RequestParser rp(ctx);
const auto must_be_one = rp.Pop<u32>();
LOG_WARNING(Service_APT, "(STUBBED) called, must_be_one={}", must_be_one);
@ -681,7 +681,7 @@ void Module::APTInterface::GetAppCpuTimeLimit(Kernel::HLERequestContext& ctx) {
}
void Module::APTInterface::PrepareToStartLibraryApplet(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x18, 1, 0); // 0x180040
IPC::RequestParser rp(ctx);
const auto applet_id = rp.PopEnum<AppletId>();
LOG_DEBUG(Service_APT, "called, applet_id={:08X}", applet_id);
@ -691,7 +691,7 @@ void Module::APTInterface::PrepareToStartLibraryApplet(Kernel::HLERequestContext
}
void Module::APTInterface::PrepareToStartSystemApplet(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x19, 1, 0); // 0x190040
IPC::RequestParser rp(ctx);
const auto applet_id = rp.PopEnum<AppletId>();
LOG_DEBUG(Service_APT, "called, applet_id={:08X}", applet_id);
@ -701,7 +701,7 @@ void Module::APTInterface::PrepareToStartSystemApplet(Kernel::HLERequestContext&
}
void Module::APTInterface::PrepareToStartNewestHomeMenu(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1A, 0, 0); // 0x1A0000
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
LOG_DEBUG(Service_APT, "called");
@ -715,7 +715,7 @@ void Module::APTInterface::PrepareToStartNewestHomeMenu(Kernel::HLERequestContex
}
void Module::APTInterface::PreloadLibraryApplet(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x16, 1, 0); // 0x160040
IPC::RequestParser rp(ctx);
const auto applet_id = rp.PopEnum<AppletId>();
LOG_DEBUG(Service_APT, "called, applet_id={:08X}", applet_id);
@ -725,7 +725,7 @@ void Module::APTInterface::PreloadLibraryApplet(Kernel::HLERequestContext& ctx)
}
void Module::APTInterface::FinishPreloadingLibraryApplet(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x17, 1, 0); // 0x00170040
IPC::RequestParser rp(ctx);
const auto applet_id = rp.PopEnum<AppletId>();
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
@ -735,7 +735,7 @@ void Module::APTInterface::FinishPreloadingLibraryApplet(Kernel::HLERequestConte
}
void Module::APTInterface::StartLibraryApplet(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1E, 2, 4); // 0x1E0084
IPC::RequestParser rp(ctx);
const auto applet_id = rp.PopEnum<AppletId>();
const auto buffer_size = rp.Pop<u32>();
const auto object = rp.PopGenericObject();
@ -748,7 +748,7 @@ void Module::APTInterface::StartLibraryApplet(Kernel::HLERequestContext& ctx) {
}
void Module::APTInterface::StartSystemApplet(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1F, 2, 4); // 0x1F0084
IPC::RequestParser rp(ctx);
const auto applet_id = rp.PopEnum<AppletId>();
const auto buffer_size = rp.Pop<u32>();
const auto object = rp.PopGenericObject();
@ -761,7 +761,7 @@ void Module::APTInterface::StartSystemApplet(Kernel::HLERequestContext& ctx) {
}
void Module::APTInterface::OrderToCloseApplication(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x21, 0, 0);
IPC::RequestParser rp(ctx);
LOG_DEBUG(Service_APT, "called");
@ -770,7 +770,7 @@ void Module::APTInterface::OrderToCloseApplication(Kernel::HLERequestContext& ct
}
void Module::APTInterface::PrepareToCloseApplication(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x22, 1, 0);
IPC::RequestParser rp(ctx);
const auto return_to_sys = rp.Pop<u8>() != 0;
LOG_DEBUG(Service_APT, "called return_to_sys={}", return_to_sys);
@ -780,7 +780,7 @@ void Module::APTInterface::PrepareToCloseApplication(Kernel::HLERequestContext&
}
void Module::APTInterface::CloseApplication(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x27, 1, 4);
IPC::RequestParser rp(ctx);
const auto parameter_size = rp.Pop<u32>();
const auto object = rp.PopGenericObject();
const auto buffer = rp.PopStaticBuffer();
@ -792,7 +792,7 @@ void Module::APTInterface::CloseApplication(Kernel::HLERequestContext& ctx) {
}
void Module::APTInterface::CancelLibraryApplet(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x3B, 1, 0); // 0x003B0040
IPC::RequestParser rp(ctx);
const auto app_exiting = rp.Pop<bool>();
LOG_DEBUG(Service_APT, "called app_exiting={}", app_exiting);
@ -802,7 +802,7 @@ void Module::APTInterface::CancelLibraryApplet(Kernel::HLERequestContext& ctx) {
}
void Module::APTInterface::PrepareToCloseLibraryApplet(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x25, 3, 0); // 0x002500C0
IPC::RequestParser rp(ctx);
const auto not_pause = rp.Pop<bool>();
const auto exiting = rp.Pop<bool>();
const auto jump_to_home = rp.Pop<bool>();
@ -815,7 +815,7 @@ void Module::APTInterface::PrepareToCloseLibraryApplet(Kernel::HLERequestContext
}
void Module::APTInterface::PrepareToCloseSystemApplet(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x26, 0, 0); // 0x260000
IPC::RequestParser rp(ctx);
LOG_DEBUG(Service_APT, "called");
@ -824,7 +824,7 @@ void Module::APTInterface::PrepareToCloseSystemApplet(Kernel::HLERequestContext&
}
void Module::APTInterface::CloseLibraryApplet(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x28, 1, 4); // 0x00280044
IPC::RequestParser rp(ctx);
const auto parameter_size = rp.Pop<u32>();
const auto object = rp.PopGenericObject();
const auto buffer = rp.PopStaticBuffer();
@ -836,7 +836,7 @@ void Module::APTInterface::CloseLibraryApplet(Kernel::HLERequestContext& ctx) {
}
void Module::APTInterface::CloseSystemApplet(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x29, 1, 4); // 0x00280044
IPC::RequestParser rp(ctx);
const auto parameter_size = rp.Pop<u32>();
const auto object = rp.PopGenericObject();
const auto buffer = rp.PopStaticBuffer();
@ -848,7 +848,7 @@ void Module::APTInterface::CloseSystemApplet(Kernel::HLERequestContext& ctx) {
}
void Module::APTInterface::OrderToCloseSystemApplet(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x2A, 0, 0); // 0x2A0000
IPC::RequestParser rp(ctx);
LOG_DEBUG(Service_APT, "called");
@ -857,7 +857,7 @@ void Module::APTInterface::OrderToCloseSystemApplet(Kernel::HLERequestContext& c
}
void Module::APTInterface::PrepareToJumpToHomeMenu(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x2B, 0, 0); // 0x2B0000
IPC::RequestParser rp(ctx);
LOG_DEBUG(Service_APT, "called");
@ -866,7 +866,7 @@ void Module::APTInterface::PrepareToJumpToHomeMenu(Kernel::HLERequestContext& ct
}
void Module::APTInterface::JumpToHomeMenu(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x2C, 1, 4); // 0x2C0044
IPC::RequestParser rp(ctx);
const auto parameter_size = rp.Pop<u32>();
const auto object = rp.PopGenericObject();
const auto buffer = rp.PopStaticBuffer();
@ -878,7 +878,7 @@ void Module::APTInterface::JumpToHomeMenu(Kernel::HLERequestContext& ctx) {
}
void Module::APTInterface::PrepareToLeaveHomeMenu(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x2D, 0, 0); // 0x2D0000
IPC::RequestParser rp(ctx);
LOG_DEBUG(Service_APT, "called");
@ -887,7 +887,7 @@ void Module::APTInterface::PrepareToLeaveHomeMenu(Kernel::HLERequestContext& ctx
}
void Module::APTInterface::LeaveHomeMenu(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x2E, 1, 4); // 0x2E0044
IPC::RequestParser rp(ctx);
const auto parameter_size = rp.Pop<u32>();
const auto object = rp.PopGenericObject();
const auto buffer = rp.PopStaticBuffer();
@ -899,7 +899,7 @@ void Module::APTInterface::LeaveHomeMenu(Kernel::HLERequestContext& ctx) {
}
void Module::APTInterface::LoadSysMenuArg(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x36, 1, 0); // 0x00360040
IPC::RequestParser rp(ctx);
const auto size = std::min(std::size_t{rp.Pop<u32>()}, SysMenuArgSize);
LOG_DEBUG(Service_APT, "called");
@ -914,7 +914,7 @@ void Module::APTInterface::LoadSysMenuArg(Kernel::HLERequestContext& ctx) {
}
void Module::APTInterface::StoreSysMenuArg(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x37, 1, 2); // 0x00370042
IPC::RequestParser rp(ctx);
const auto size = std::min(std::size_t{rp.Pop<u32>()}, SysMenuArgSize);
const auto& buffer = rp.PopStaticBuffer();
@ -928,7 +928,7 @@ void Module::APTInterface::StoreSysMenuArg(Kernel::HLERequestContext& ctx) {
}
void Module::APTInterface::SendCaptureBufferInfo(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x40, 1, 2); // 0x00400042
IPC::RequestParser rp(ctx);
[[maybe_unused]] const auto size = rp.Pop<u32>();
const auto buffer = rp.PopStaticBuffer();
@ -941,7 +941,7 @@ void Module::APTInterface::SendCaptureBufferInfo(Kernel::HLERequestContext& ctx)
}
void Module::APTInterface::ReceiveCaptureBufferInfo(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x41, 1, 0); // 0x00410040
IPC::RequestParser rp(ctx);
const auto size = rp.Pop<u32>();
LOG_DEBUG(Service_APT, "called");
@ -957,7 +957,7 @@ void Module::APTInterface::ReceiveCaptureBufferInfo(Kernel::HLERequestContext& c
}
void Module::APTInterface::GetCaptureInfo(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x4A, 1, 0); // 0x004A0040
IPC::RequestParser rp(ctx);
const auto size = rp.Pop<u32>();
LOG_DEBUG(Service_APT, "called");
@ -973,7 +973,7 @@ void Module::APTInterface::GetCaptureInfo(Kernel::HLERequestContext& ctx) {
}
void Module::APTInterface::SetScreenCapPostPermission(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x55, 1, 0); // 0x00550040
IPC::RequestParser rp(ctx);
LOG_DEBUG(Service_APT, "called, screen_capture_post_permission={}",
apt->screen_capture_post_permission);
@ -985,7 +985,7 @@ void Module::APTInterface::SetScreenCapPostPermission(Kernel::HLERequestContext&
}
void Module::APTInterface::GetScreenCapPostPermission(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x56, 0, 0); // 0x00560000
IPC::RequestParser rp(ctx);
LOG_DEBUG(Service_APT, "(STUBBED) called, screen_capture_post_permission={}",
apt->screen_capture_post_permission);
@ -996,7 +996,7 @@ void Module::APTInterface::GetScreenCapPostPermission(Kernel::HLERequestContext&
}
void Module::APTInterface::GetAppletInfo(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x6, 1, 0); // 0x60040
IPC::RequestParser rp(ctx);
const auto app_id = rp.PopEnum<AppletId>();
LOG_DEBUG(Service_APT, "called, app_id={:08X}", app_id);
@ -1017,7 +1017,7 @@ void Module::APTInterface::GetAppletInfo(Kernel::HLERequestContext& ctx) {
}
void Module::APTInterface::GetStartupArgument(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x51, 2, 0); // 0x00510080
IPC::RequestParser rp(ctx);
const auto parameter_size = rp.Pop<u32>();
const auto startup_argument_type = static_cast<StartupArgumentType>(rp.Pop<u8>());
@ -1058,7 +1058,7 @@ void Module::APTInterface::GetStartupArgument(Kernel::HLERequestContext& ctx) {
}
void Module::APTInterface::Wrap(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x46, 4, 4);
IPC::RequestParser rp(ctx);
const auto output_size = rp.Pop<u32>();
const auto input_size = rp.Pop<u32>();
const auto nonce_offset = rp.Pop<u32>();
@ -1103,7 +1103,7 @@ void Module::APTInterface::Wrap(Kernel::HLERequestContext& ctx) {
}
void Module::APTInterface::Unwrap(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x47, 4, 4);
IPC::RequestParser rp(ctx);
const auto output_size = rp.Pop<u32>();
const auto input_size = rp.Pop<u32>();
const auto nonce_offset = rp.Pop<u32>();
@ -1155,7 +1155,7 @@ void Module::APTInterface::Unwrap(Kernel::HLERequestContext& ctx) {
}
void Module::APTInterface::CheckNew3DSApp(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x101, 0, 0); // 0x01010000
IPC::RequestParser rp(ctx);
LOG_WARNING(Service_APT, "(STUBBED) called");
@ -1169,7 +1169,7 @@ void Module::APTInterface::CheckNew3DSApp(Kernel::HLERequestContext& ctx) {
}
void Module::APTInterface::CheckNew3DS(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x102, 0, 0); // 0x01020000
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
LOG_WARNING(Service_APT, "(STUBBED) called");
@ -1178,7 +1178,7 @@ void Module::APTInterface::CheckNew3DS(Kernel::HLERequestContext& ctx) {
}
void Module::APTInterface::Unknown0x0103(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x103, 0, 0); // 0x01030000
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
LOG_WARNING(Service_APT, "(STUBBED) called");
@ -1188,7 +1188,7 @@ void Module::APTInterface::Unknown0x0103(Kernel::HLERequestContext& ctx) {
}
void Module::APTInterface::IsTitleAllowed(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x105, 4, 0); // 0x01050100
IPC::RequestParser rp(ctx);
const auto program_id = rp.Pop<u64>();
const auto media_type = static_cast<FS::MediaType>(rp.Pop<u8>());
rp.Skip(1, false); // Padding

View File

@ -11,98 +11,98 @@ APT_A::APT_A(std::shared_ptr<Module> apt)
: Module::APTInterface(std::move(apt), "APT:A", MaxAPTSessions) {
static const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0001, 1, 0), &APT_A::GetLockHandle, "GetLockHandle"},
{IPC::MakeHeader(0x0002, 2, 0), &APT_A::Initialize, "Initialize"},
{IPC::MakeHeader(0x0003, 1, 0), &APT_A::Enable, "Enable"},
{IPC::MakeHeader(0x0004, 1, 0), nullptr, "Finalize"},
{IPC::MakeHeader(0x0005, 1, 0), &APT_A::GetAppletManInfo, "GetAppletManInfo"},
{IPC::MakeHeader(0x0006, 1, 0), &APT_A::GetAppletInfo, "GetAppletInfo"},
{IPC::MakeHeader(0x0007, 0, 0), nullptr, "GetLastSignaledAppletId"},
{IPC::MakeHeader(0x0008, 0, 0), nullptr, "CountRegisteredApplet"},
{IPC::MakeHeader(0x0009, 1, 0), &APT_A::IsRegistered, "IsRegistered"},
{IPC::MakeHeader(0x000A, 1, 0), nullptr, "GetAttribute"},
{IPC::MakeHeader(0x000B, 1, 0), &APT_A::InquireNotification, "InquireNotification"},
{IPC::MakeHeader(0x000C, 4, 4), &APT_A::SendParameter, "SendParameter"},
{IPC::MakeHeader(0x000D, 2, 0), &APT_A::ReceiveParameter, "ReceiveParameter"},
{IPC::MakeHeader(0x000E, 2, 0), &APT_A::GlanceParameter, "GlanceParameter"},
{IPC::MakeHeader(0x000F, 4, 0), &APT_A::CancelParameter, "CancelParameter"},
{IPC::MakeHeader(0x0010, 3, 2), nullptr, "DebugFunc"},
{IPC::MakeHeader(0x0011, 3, 0), nullptr, "MapProgramIdForDebug"},
{IPC::MakeHeader(0x0012, 1, 0), nullptr, "SetHomeMenuAppletIdForDebug"},
{IPC::MakeHeader(0x0013, 0, 0), nullptr, "GetPreparationState"},
{IPC::MakeHeader(0x0014, 1, 0), nullptr, "SetPreparationState"},
{IPC::MakeHeader(0x0015, 5, 0), &APT_A::PrepareToStartApplication, "PrepareToStartApplication"},
{IPC::MakeHeader(0x0016, 1, 0), &APT_A::PreloadLibraryApplet, "PreloadLibraryApplet"},
{IPC::MakeHeader(0x0017, 1, 0), &APT_A::FinishPreloadingLibraryApplet, "FinishPreloadingLibraryApplet"},
{IPC::MakeHeader(0x0018, 1, 0), &APT_A::PrepareToStartLibraryApplet, "PrepareToStartLibraryApplet"},
{IPC::MakeHeader(0x0019, 1, 0), &APT_A::PrepareToStartSystemApplet, "PrepareToStartSystemApplet"},
{IPC::MakeHeader(0x001A, 0, 0), &APT_A::PrepareToStartNewestHomeMenu, "PrepareToStartNewestHomeMenu"},
{IPC::MakeHeader(0x001B, 3, 4), &APT_A::StartApplication, "StartApplication"},
{IPC::MakeHeader(0x001C, 0, 0), &APT_A::WakeupApplication, "WakeupApplication"},
{IPC::MakeHeader(0x001D, 0, 0), nullptr, "CancelApplication"},
{IPC::MakeHeader(0x001E, 2, 4), &APT_A::StartLibraryApplet, "StartLibraryApplet"},
{IPC::MakeHeader(0x001F, 2, 4), &APT_A::StartSystemApplet, "StartSystemApplet"},
{IPC::MakeHeader(0x0020, 1, 4), nullptr, "StartNewestHomeMenu"},
{IPC::MakeHeader(0x0021, 0, 0), &APT_A::OrderToCloseApplication, "OrderToCloseApplication"},
{IPC::MakeHeader(0x0022, 1, 0), &APT_A::PrepareToCloseApplication, "PrepareToCloseApplication"},
{IPC::MakeHeader(0x0023, 1, 0), nullptr, "PrepareToJumpToApplication"},
{IPC::MakeHeader(0x0024, 1, 4), nullptr, "JumpToApplication"},
{IPC::MakeHeader(0x0025, 3, 0), &APT_A::PrepareToCloseLibraryApplet, "PrepareToCloseLibraryApplet"},
{IPC::MakeHeader(0x0026, 0, 0), &APT_A::PrepareToCloseSystemApplet, "PrepareToCloseSystemApplet"},
{IPC::MakeHeader(0x0027, 1, 4), &APT_A::CloseApplication, "CloseApplication"},
{IPC::MakeHeader(0x0028, 1, 4), &APT_A::CloseLibraryApplet, "CloseLibraryApplet"},
{IPC::MakeHeader(0x0029, 1, 4), &APT_A::CloseSystemApplet, "CloseSystemApplet"},
{IPC::MakeHeader(0x002A, 0, 0), &APT_A::OrderToCloseSystemApplet, "OrderToCloseSystemApplet"},
{IPC::MakeHeader(0x002B, 0, 0), &APT_A::PrepareToJumpToHomeMenu, "PrepareToJumpToHomeMenu"},
{IPC::MakeHeader(0x002C, 1, 4), &APT_A::JumpToHomeMenu, "JumpToHomeMenu"},
{IPC::MakeHeader(0x002D, 0, 0), &APT_A::PrepareToLeaveHomeMenu, "PrepareToLeaveHomeMenu"},
{IPC::MakeHeader(0x002E, 1, 4), &APT_A::LeaveHomeMenu, "LeaveHomeMenu"},
{IPC::MakeHeader(0x002F, 1, 0), nullptr, "PrepareToLeaveResidentApplet"},
{IPC::MakeHeader(0x0030, 1, 4), nullptr, "LeaveResidentApplet"},
{IPC::MakeHeader(0x0031, 4, 0), &APT_A::PrepareToDoApplicationJump, "PrepareToDoApplicationJump"},
{IPC::MakeHeader(0x0032, 2, 4), &APT_A::DoApplicationJump, "DoApplicationJump"},
{IPC::MakeHeader(0x0033, 0, 0), &APT_A::GetProgramIdOnApplicationJump, "GetProgramIdOnApplicationJump"},
{IPC::MakeHeader(0x0034, 2, 4), nullptr, "SendDeliverArg"},
{IPC::MakeHeader(0x0035, 2, 0), &APT_A::ReceiveDeliverArg, "ReceiveDeliverArg"},
{IPC::MakeHeader(0x0036, 1, 0), &APT_A::LoadSysMenuArg, "LoadSysMenuArg"},
{IPC::MakeHeader(0x0037, 1, 2), &APT_A::StoreSysMenuArg, "StoreSysMenuArg"},
{IPC::MakeHeader(0x0038, 1, 0), nullptr, "PreloadResidentApplet"},
{IPC::MakeHeader(0x0039, 1, 0), nullptr, "PrepareToStartResidentApplet"},
{IPC::MakeHeader(0x003A, 1, 4), nullptr, "StartResidentApplet"},
{IPC::MakeHeader(0x003B, 1, 0), &APT_A::CancelLibraryApplet, "CancelLibraryApplet"},
{IPC::MakeHeader(0x003C, 1, 2), nullptr, "SendDspSleep"},
{IPC::MakeHeader(0x003D, 1, 2), nullptr, "SendDspWakeUp"},
{IPC::MakeHeader(0x003E, 2, 0), nullptr, "ReplySleepQuery"},
{IPC::MakeHeader(0x003F, 1, 0), nullptr, "ReplySleepNotificationComplete"},
{IPC::MakeHeader(0x0040, 1, 2), &APT_A::SendCaptureBufferInfo, "SendCaptureBufferInfo"},
{IPC::MakeHeader(0x0041, 1, 0), &APT_A::ReceiveCaptureBufferInfo, "ReceiveCaptureBufferInfo"},
{IPC::MakeHeader(0x0042, 2, 0), nullptr, "SleepSystem"},
{IPC::MakeHeader(0x0043, 1, 0), &APT_A::NotifyToWait, "NotifyToWait"},
{IPC::MakeHeader(0x0044, 0, 0), &APT_A::GetSharedFont, "GetSharedFont"},
{IPC::MakeHeader(0x0045, 1, 0), &APT_A::GetWirelessRebootInfo, "GetWirelessRebootInfo"},
{IPC::MakeHeader(0x0046, 4, 4), &APT_A::Wrap, "Wrap"},
{IPC::MakeHeader(0x0047, 4, 4), &APT_A::Unwrap, "Unwrap"},
{IPC::MakeHeader(0x0048, 4, 0), nullptr, "GetProgramInfo"},
{IPC::MakeHeader(0x0049, 6, 0), nullptr, "Reboot"},
{IPC::MakeHeader(0x004A, 1, 0), &APT_A::GetCaptureInfo, "GetCaptureInfo"},
{IPC::MakeHeader(0x004B, 3, 2), &APT_A::AppletUtility, "AppletUtility"},
{IPC::MakeHeader(0x004C, 0, 0), nullptr, "SetFatalErrDispMode"},
{IPC::MakeHeader(0x004D, 2, 0), nullptr, "GetAppletProgramInfo"},
{IPC::MakeHeader(0x004E, 0, 0), nullptr, "HardwareResetAsync"},
{IPC::MakeHeader(0x004F, 2, 0), &APT_A::SetAppCpuTimeLimit, "SetAppCpuTimeLimit"},
{IPC::MakeHeader(0x0050, 1, 0), &APT_A::GetAppCpuTimeLimit, "GetAppCpuTimeLimit"},
{IPC::MakeHeader(0x0051, 2, 0), &APT_A::GetStartupArgument, "GetStartupArgument"},
{IPC::MakeHeader(0x0052, 4, 4), nullptr, "Wrap1"},
{IPC::MakeHeader(0x0053, 4, 4), nullptr, "Unwrap1"},
{IPC::MakeHeader(0x0055, 1, 0), &APT_A::SetScreenCapPostPermission, "SetScreenCapPostPermission"},
{IPC::MakeHeader(0x0056, 0, 0), &APT_A::GetScreenCapPostPermission, "GetScreenCapPostPermission"},
{IPC::MakeHeader(0x0057, 1, 4), nullptr, "WakeupApplication2"},
{IPC::MakeHeader(0x0058, 0, 2), nullptr, "GetProgramID"},
{IPC::MakeHeader(0x0101, 0, 0), &APT_A::CheckNew3DSApp, "CheckNew3DSApp"},
{IPC::MakeHeader(0x0102, 0, 0), &APT_A::CheckNew3DS, "CheckNew3DS"},
{IPC::MakeHeader(0x0103, 0, 0), &APT_A::Unknown0x0103, "Unknown0x0103"},
{IPC::MakeHeader(0x0104, 0, 0), nullptr, "IsStandardMemoryLayout"},
{IPC::MakeHeader(0x0105, 4, 0), &APT_A::IsTitleAllowed, "IsTitleAllowed"},
{0x0001, &APT_A::GetLockHandle, "GetLockHandle"},
{0x0002, &APT_A::Initialize, "Initialize"},
{0x0003, &APT_A::Enable, "Enable"},
{0x0004, nullptr, "Finalize"},
{0x0005, &APT_A::GetAppletManInfo, "GetAppletManInfo"},
{0x0006, &APT_A::GetAppletInfo, "GetAppletInfo"},
{0x0007, nullptr, "GetLastSignaledAppletId"},
{0x0008, nullptr, "CountRegisteredApplet"},
{0x0009, &APT_A::IsRegistered, "IsRegistered"},
{0x000A, nullptr, "GetAttribute"},
{0x000B, &APT_A::InquireNotification, "InquireNotification"},
{0x000C, &APT_A::SendParameter, "SendParameter"},
{0x000D, &APT_A::ReceiveParameter, "ReceiveParameter"},
{0x000E, &APT_A::GlanceParameter, "GlanceParameter"},
{0x000F, &APT_A::CancelParameter, "CancelParameter"},
{0x0010, nullptr, "DebugFunc"},
{0x0011, nullptr, "MapProgramIdForDebug"},
{0x0012, nullptr, "SetHomeMenuAppletIdForDebug"},
{0x0013, nullptr, "GetPreparationState"},
{0x0014, nullptr, "SetPreparationState"},
{0x0015, &APT_A::PrepareToStartApplication, "PrepareToStartApplication"},
{0x0016, &APT_A::PreloadLibraryApplet, "PreloadLibraryApplet"},
{0x0017, &APT_A::FinishPreloadingLibraryApplet, "FinishPreloadingLibraryApplet"},
{0x0018, &APT_A::PrepareToStartLibraryApplet, "PrepareToStartLibraryApplet"},
{0x0019, &APT_A::PrepareToStartSystemApplet, "PrepareToStartSystemApplet"},
{0x001A, &APT_A::PrepareToStartNewestHomeMenu, "PrepareToStartNewestHomeMenu"},
{0x001B, &APT_A::StartApplication, "StartApplication"},
{0x001C, &APT_A::WakeupApplication, "WakeupApplication"},
{0x001D, nullptr, "CancelApplication"},
{0x001E, &APT_A::StartLibraryApplet, "StartLibraryApplet"},
{0x001F, &APT_A::StartSystemApplet, "StartSystemApplet"},
{0x0020, nullptr, "StartNewestHomeMenu"},
{0x0021, &APT_A::OrderToCloseApplication, "OrderToCloseApplication"},
{0x0022, &APT_A::PrepareToCloseApplication, "PrepareToCloseApplication"},
{0x0023, nullptr, "PrepareToJumpToApplication"},
{0x0024, nullptr, "JumpToApplication"},
{0x0025, &APT_A::PrepareToCloseLibraryApplet, "PrepareToCloseLibraryApplet"},
{0x0026, &APT_A::PrepareToCloseSystemApplet, "PrepareToCloseSystemApplet"},
{0x0027, &APT_A::CloseApplication, "CloseApplication"},
{0x0028, &APT_A::CloseLibraryApplet, "CloseLibraryApplet"},
{0x0029, &APT_A::CloseSystemApplet, "CloseSystemApplet"},
{0x002A, &APT_A::OrderToCloseSystemApplet, "OrderToCloseSystemApplet"},
{0x002B, &APT_A::PrepareToJumpToHomeMenu, "PrepareToJumpToHomeMenu"},
{0x002C, &APT_A::JumpToHomeMenu, "JumpToHomeMenu"},
{0x002D, &APT_A::PrepareToLeaveHomeMenu, "PrepareToLeaveHomeMenu"},
{0x002E, &APT_A::LeaveHomeMenu, "LeaveHomeMenu"},
{0x002F, nullptr, "PrepareToLeaveResidentApplet"},
{0x0030, nullptr, "LeaveResidentApplet"},
{0x0031, &APT_A::PrepareToDoApplicationJump, "PrepareToDoApplicationJump"},
{0x0032, &APT_A::DoApplicationJump, "DoApplicationJump"},
{0x0033, &APT_A::GetProgramIdOnApplicationJump, "GetProgramIdOnApplicationJump"},
{0x0034, nullptr, "SendDeliverArg"},
{0x0035, &APT_A::ReceiveDeliverArg, "ReceiveDeliverArg"},
{0x0036, &APT_A::LoadSysMenuArg, "LoadSysMenuArg"},
{0x0037, &APT_A::StoreSysMenuArg, "StoreSysMenuArg"},
{0x0038, nullptr, "PreloadResidentApplet"},
{0x0039, nullptr, "PrepareToStartResidentApplet"},
{0x003A, nullptr, "StartResidentApplet"},
{0x003B, &APT_A::CancelLibraryApplet, "CancelLibraryApplet"},
{0x003C, nullptr, "SendDspSleep"},
{0x003D, nullptr, "SendDspWakeUp"},
{0x003E, nullptr, "ReplySleepQuery"},
{0x003F, nullptr, "ReplySleepNotificationComplete"},
{0x0040, &APT_A::SendCaptureBufferInfo, "SendCaptureBufferInfo"},
{0x0041, &APT_A::ReceiveCaptureBufferInfo, "ReceiveCaptureBufferInfo"},
{0x0042, nullptr, "SleepSystem"},
{0x0043, &APT_A::NotifyToWait, "NotifyToWait"},
{0x0044, &APT_A::GetSharedFont, "GetSharedFont"},
{0x0045, &APT_A::GetWirelessRebootInfo, "GetWirelessRebootInfo"},
{0x0046, &APT_A::Wrap, "Wrap"},
{0x0047, &APT_A::Unwrap, "Unwrap"},
{0x0048, nullptr, "GetProgramInfo"},
{0x0049, nullptr, "Reboot"},
{0x004A, &APT_A::GetCaptureInfo, "GetCaptureInfo"},
{0x004B, &APT_A::AppletUtility, "AppletUtility"},
{0x004C, nullptr, "SetFatalErrDispMode"},
{0x004D, nullptr, "GetAppletProgramInfo"},
{0x004E, nullptr, "HardwareResetAsync"},
{0x004F, &APT_A::SetAppCpuTimeLimit, "SetAppCpuTimeLimit"},
{0x0050, &APT_A::GetAppCpuTimeLimit, "GetAppCpuTimeLimit"},
{0x0051, &APT_A::GetStartupArgument, "GetStartupArgument"},
{0x0052, nullptr, "Wrap1"},
{0x0053, nullptr, "Unwrap1"},
{0x0055, &APT_A::SetScreenCapPostPermission, "SetScreenCapPostPermission"},
{0x0056, &APT_A::GetScreenCapPostPermission, "GetScreenCapPostPermission"},
{0x0057, nullptr, "WakeupApplication2"},
{0x0058, nullptr, "GetProgramID"},
{0x0101, &APT_A::CheckNew3DSApp, "CheckNew3DSApp"},
{0x0102, &APT_A::CheckNew3DS, "CheckNew3DS"},
{0x0103, &APT_A::Unknown0x0103, "Unknown0x0103"},
{0x0104, nullptr, "IsStandardMemoryLayout"},
{0x0105, &APT_A::IsTitleAllowed, "IsTitleAllowed"},
// clang-format on
};
RegisterHandlers(functions);

View File

@ -11,98 +11,98 @@ APT_S::APT_S(std::shared_ptr<Module> apt)
: Module::APTInterface(std::move(apt), "APT:S", MaxAPTSessions) {
static const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0001, 1, 0), &APT_S::GetLockHandle, "GetLockHandle"},
{IPC::MakeHeader(0x0002, 2, 0), &APT_S::Initialize, "Initialize"},
{IPC::MakeHeader(0x0003, 1, 0), &APT_S::Enable, "Enable"},
{IPC::MakeHeader(0x0004, 1, 0), nullptr, "Finalize"},
{IPC::MakeHeader(0x0005, 1, 0), &APT_S::GetAppletManInfo, "GetAppletManInfo"},
{IPC::MakeHeader(0x0006, 1, 0), &APT_S::GetAppletInfo, "GetAppletInfo"},
{IPC::MakeHeader(0x0007, 0, 0), nullptr, "GetLastSignaledAppletId"},
{IPC::MakeHeader(0x0008, 0, 0), nullptr, "CountRegisteredApplet"},
{IPC::MakeHeader(0x0009, 1, 0), &APT_S::IsRegistered, "IsRegistered"},
{IPC::MakeHeader(0x000A, 1, 0), nullptr, "GetAttribute"},
{IPC::MakeHeader(0x000B, 1, 0), &APT_S::InquireNotification, "InquireNotification"},
{IPC::MakeHeader(0x000C, 4, 4), &APT_S::SendParameter, "SendParameter"},
{IPC::MakeHeader(0x000D, 2, 0), &APT_S::ReceiveParameter, "ReceiveParameter"},
{IPC::MakeHeader(0x000E, 2, 0), &APT_S::GlanceParameter, "GlanceParameter"},
{IPC::MakeHeader(0x000F, 4, 0), &APT_S::CancelParameter, "CancelParameter"},
{IPC::MakeHeader(0x0010, 3, 2), nullptr, "DebugFunc"},
{IPC::MakeHeader(0x0011, 3, 0), nullptr, "MapProgramIdForDebug"},
{IPC::MakeHeader(0x0012, 1, 0), nullptr, "SetHomeMenuAppletIdForDebug"},
{IPC::MakeHeader(0x0013, 0, 0), nullptr, "GetPreparationState"},
{IPC::MakeHeader(0x0014, 1, 0), nullptr, "SetPreparationState"},
{IPC::MakeHeader(0x0015, 5, 0), &APT_S::PrepareToStartApplication, "PrepareToStartApplication"},
{IPC::MakeHeader(0x0016, 1, 0), &APT_S::PreloadLibraryApplet, "PreloadLibraryApplet"},
{IPC::MakeHeader(0x0017, 1, 0), &APT_S::FinishPreloadingLibraryApplet, "FinishPreloadingLibraryApplet"},
{IPC::MakeHeader(0x0018, 1, 0), &APT_S::PrepareToStartLibraryApplet, "PrepareToStartLibraryApplet"},
{IPC::MakeHeader(0x0019, 1, 0), &APT_S::PrepareToStartSystemApplet, "PrepareToStartSystemApplet"},
{IPC::MakeHeader(0x001A, 0, 0), &APT_S::PrepareToStartNewestHomeMenu, "PrepareToStartNewestHomeMenu"},
{IPC::MakeHeader(0x001B, 3, 4), &APT_S::StartApplication, "StartApplication"},
{IPC::MakeHeader(0x001C, 0, 0), &APT_S::WakeupApplication, "WakeupApplication"},
{IPC::MakeHeader(0x001D, 0, 0), nullptr, "CancelApplication"},
{IPC::MakeHeader(0x001E, 2, 4), &APT_S::StartLibraryApplet, "StartLibraryApplet"},
{IPC::MakeHeader(0x001F, 2, 4), &APT_S::StartSystemApplet, "StartSystemApplet"},
{IPC::MakeHeader(0x0020, 1, 4), nullptr, "StartNewestHomeMenu"},
{IPC::MakeHeader(0x0021, 0, 0), &APT_S::OrderToCloseApplication, "OrderToCloseApplication"},
{IPC::MakeHeader(0x0022, 1, 0), &APT_S::PrepareToCloseApplication, "PrepareToCloseApplication"},
{IPC::MakeHeader(0x0023, 1, 0), nullptr, "PrepareToJumpToApplication"},
{IPC::MakeHeader(0x0024, 1, 4), nullptr, "JumpToApplication"},
{IPC::MakeHeader(0x0025, 3, 0), &APT_S::PrepareToCloseLibraryApplet, "PrepareToCloseLibraryApplet"},
{IPC::MakeHeader(0x0026, 0, 0), &APT_S::PrepareToCloseSystemApplet, "PrepareToCloseSystemApplet"},
{IPC::MakeHeader(0x0027, 1, 4), &APT_S::CloseApplication, "CloseApplication"},
{IPC::MakeHeader(0x0028, 1, 4), &APT_S::CloseLibraryApplet, "CloseLibraryApplet"},
{IPC::MakeHeader(0x0029, 1, 4), &APT_S::CloseSystemApplet, "CloseSystemApplet"},
{IPC::MakeHeader(0x002A, 0, 0), &APT_S::OrderToCloseSystemApplet, "OrderToCloseSystemApplet"},
{IPC::MakeHeader(0x002B, 0, 0), &APT_S::PrepareToJumpToHomeMenu, "PrepareToJumpToHomeMenu"},
{IPC::MakeHeader(0x002C, 1, 4), &APT_S::JumpToHomeMenu, "JumpToHomeMenu"},
{IPC::MakeHeader(0x002D, 0, 0), &APT_S::PrepareToLeaveHomeMenu, "PrepareToLeaveHomeMenu"},
{IPC::MakeHeader(0x002E, 1, 4), &APT_S::LeaveHomeMenu, "LeaveHomeMenu"},
{IPC::MakeHeader(0x002F, 1, 0), nullptr, "PrepareToLeaveResidentApplet"},
{IPC::MakeHeader(0x0030, 1, 4), nullptr, "LeaveResidentApplet"},
{IPC::MakeHeader(0x0031, 4, 0), &APT_S::PrepareToDoApplicationJump, "PrepareToDoApplicationJump"},
{IPC::MakeHeader(0x0032, 2, 4), &APT_S::DoApplicationJump, "DoApplicationJump"},
{IPC::MakeHeader(0x0033, 0, 0), &APT_S::GetProgramIdOnApplicationJump, "GetProgramIdOnApplicationJump"},
{IPC::MakeHeader(0x0034, 2, 4), nullptr, "SendDeliverArg"},
{IPC::MakeHeader(0x0035, 2, 0), &APT_S::ReceiveDeliverArg, "ReceiveDeliverArg"},
{IPC::MakeHeader(0x0036, 1, 0), &APT_S::LoadSysMenuArg, "LoadSysMenuArg"},
{IPC::MakeHeader(0x0037, 1, 2), &APT_S::StoreSysMenuArg, "StoreSysMenuArg"},
{IPC::MakeHeader(0x0038, 1, 0), nullptr, "PreloadResidentApplet"},
{IPC::MakeHeader(0x0039, 1, 0), nullptr, "PrepareToStartResidentApplet"},
{IPC::MakeHeader(0x003A, 1, 4), nullptr, "StartResidentApplet"},
{IPC::MakeHeader(0x003B, 1, 0), &APT_S::CancelLibraryApplet, "CancelLibraryApplet"},
{IPC::MakeHeader(0x003C, 1, 2), nullptr, "SendDspSleep"},
{IPC::MakeHeader(0x003D, 1, 2), nullptr, "SendDspWakeUp"},
{IPC::MakeHeader(0x003E, 2, 0), nullptr, "ReplySleepQuery"},
{IPC::MakeHeader(0x003F, 1, 0), nullptr, "ReplySleepNotificationComplete"},
{IPC::MakeHeader(0x0040, 1, 2), &APT_S::SendCaptureBufferInfo, "SendCaptureBufferInfo"},
{IPC::MakeHeader(0x0041, 1, 0), &APT_S::ReceiveCaptureBufferInfo, "ReceiveCaptureBufferInfo"},
{IPC::MakeHeader(0x0042, 2, 0), nullptr, "SleepSystem"},
{IPC::MakeHeader(0x0043, 1, 0), &APT_S::NotifyToWait, "NotifyToWait"},
{IPC::MakeHeader(0x0044, 0, 0), &APT_S::GetSharedFont, "GetSharedFont"},
{IPC::MakeHeader(0x0045, 1, 0), &APT_S::GetWirelessRebootInfo, "GetWirelessRebootInfo"},
{IPC::MakeHeader(0x0046, 4, 4), &APT_S::Wrap, "Wrap"},
{IPC::MakeHeader(0x0047, 4, 4), &APT_S::Unwrap, "Unwrap"},
{IPC::MakeHeader(0x0048, 4, 0), nullptr, "GetProgramInfo"},
{IPC::MakeHeader(0x0049, 6, 0), nullptr, "Reboot"},
{IPC::MakeHeader(0x004A, 1, 0), &APT_S::GetCaptureInfo, "GetCaptureInfo"},
{IPC::MakeHeader(0x004B, 3, 2), &APT_S::AppletUtility, "AppletUtility"},
{IPC::MakeHeader(0x004C, 0, 0), nullptr, "SetFatalErrDispMode"},
{IPC::MakeHeader(0x004D, 2, 0), nullptr, "GetAppletProgramInfo"},
{IPC::MakeHeader(0x004E, 0, 0), nullptr, "HardwareResetAsync"},
{IPC::MakeHeader(0x004F, 2, 0), &APT_S::SetAppCpuTimeLimit, "SetAppCpuTimeLimit"},
{IPC::MakeHeader(0x0050, 1, 0), &APT_S::GetAppCpuTimeLimit, "GetAppCpuTimeLimit"},
{IPC::MakeHeader(0x0051, 2, 0), &APT_S::GetStartupArgument, "GetStartupArgument"},
{IPC::MakeHeader(0x0052, 4, 4), nullptr, "Wrap1"},
{IPC::MakeHeader(0x0053, 4, 4), nullptr, "Unwrap1"},
{IPC::MakeHeader(0x0055, 1, 0), &APT_S::SetScreenCapPostPermission, "SetScreenCapPostPermission"},
{IPC::MakeHeader(0x0056, 0, 0), &APT_S::GetScreenCapPostPermission, "GetScreenCapPostPermission"},
{IPC::MakeHeader(0x0057, 1, 4), nullptr, "WakeupApplication2"},
{IPC::MakeHeader(0x0058, 0, 2), nullptr, "GetProgramID"},
{IPC::MakeHeader(0x0101, 0, 0), &APT_S::CheckNew3DSApp, "CheckNew3DSApp"},
{IPC::MakeHeader(0x0102, 0, 0), &APT_S::CheckNew3DS, "CheckNew3DS"},
{IPC::MakeHeader(0x0103, 0, 0), &APT_S::Unknown0x0103, "Unknown0x0103"},
{IPC::MakeHeader(0x0104, 0, 0), nullptr, "IsStandardMemoryLayout"},
{IPC::MakeHeader(0x0105, 4, 0), &APT_S::IsTitleAllowed, "IsTitleAllowed"},
{0x0001, &APT_S::GetLockHandle, "GetLockHandle"},
{0x0002, &APT_S::Initialize, "Initialize"},
{0x0003, &APT_S::Enable, "Enable"},
{0x0004, nullptr, "Finalize"},
{0x0005, &APT_S::GetAppletManInfo, "GetAppletManInfo"},
{0x0006, &APT_S::GetAppletInfo, "GetAppletInfo"},
{0x0007, nullptr, "GetLastSignaledAppletId"},
{0x0008, nullptr, "CountRegisteredApplet"},
{0x0009, &APT_S::IsRegistered, "IsRegistered"},
{0x000A, nullptr, "GetAttribute"},
{0x000B, &APT_S::InquireNotification, "InquireNotification"},
{0x000C, &APT_S::SendParameter, "SendParameter"},
{0x000D, &APT_S::ReceiveParameter, "ReceiveParameter"},
{0x000E, &APT_S::GlanceParameter, "GlanceParameter"},
{0x000F, &APT_S::CancelParameter, "CancelParameter"},
{0x0010, nullptr, "DebugFunc"},
{0x0011, nullptr, "MapProgramIdForDebug"},
{0x0012, nullptr, "SetHomeMenuAppletIdForDebug"},
{0x0013, nullptr, "GetPreparationState"},
{0x0014, nullptr, "SetPreparationState"},
{0x0015, &APT_S::PrepareToStartApplication, "PrepareToStartApplication"},
{0x0016, &APT_S::PreloadLibraryApplet, "PreloadLibraryApplet"},
{0x0017, &APT_S::FinishPreloadingLibraryApplet, "FinishPreloadingLibraryApplet"},
{0x0018, &APT_S::PrepareToStartLibraryApplet, "PrepareToStartLibraryApplet"},
{0x0019, &APT_S::PrepareToStartSystemApplet, "PrepareToStartSystemApplet"},
{0x001A, &APT_S::PrepareToStartNewestHomeMenu, "PrepareToStartNewestHomeMenu"},
{0x001B, &APT_S::StartApplication, "StartApplication"},
{0x001C, &APT_S::WakeupApplication, "WakeupApplication"},
{0x001D, nullptr, "CancelApplication"},
{0x001E, &APT_S::StartLibraryApplet, "StartLibraryApplet"},
{0x001F, &APT_S::StartSystemApplet, "StartSystemApplet"},
{0x0020, nullptr, "StartNewestHomeMenu"},
{0x0021, &APT_S::OrderToCloseApplication, "OrderToCloseApplication"},
{0x0022, &APT_S::PrepareToCloseApplication, "PrepareToCloseApplication"},
{0x0023, nullptr, "PrepareToJumpToApplication"},
{0x0024, nullptr, "JumpToApplication"},
{0x0025, &APT_S::PrepareToCloseLibraryApplet, "PrepareToCloseLibraryApplet"},
{0x0026, &APT_S::PrepareToCloseSystemApplet, "PrepareToCloseSystemApplet"},
{0x0027, &APT_S::CloseApplication, "CloseApplication"},
{0x0028, &APT_S::CloseLibraryApplet, "CloseLibraryApplet"},
{0x0029, &APT_S::CloseSystemApplet, "CloseSystemApplet"},
{0x002A, &APT_S::OrderToCloseSystemApplet, "OrderToCloseSystemApplet"},
{0x002B, &APT_S::PrepareToJumpToHomeMenu, "PrepareToJumpToHomeMenu"},
{0x002C, &APT_S::JumpToHomeMenu, "JumpToHomeMenu"},
{0x002D, &APT_S::PrepareToLeaveHomeMenu, "PrepareToLeaveHomeMenu"},
{0x002E, &APT_S::LeaveHomeMenu, "LeaveHomeMenu"},
{0x002F, nullptr, "PrepareToLeaveResidentApplet"},
{0x0030, nullptr, "LeaveResidentApplet"},
{0x0031, &APT_S::PrepareToDoApplicationJump, "PrepareToDoApplicationJump"},
{0x0032, &APT_S::DoApplicationJump, "DoApplicationJump"},
{0x0033, &APT_S::GetProgramIdOnApplicationJump, "GetProgramIdOnApplicationJump"},
{0x0034, nullptr, "SendDeliverArg"},
{0x0035, &APT_S::ReceiveDeliverArg, "ReceiveDeliverArg"},
{0x0036, &APT_S::LoadSysMenuArg, "LoadSysMenuArg"},
{0x0037, &APT_S::StoreSysMenuArg, "StoreSysMenuArg"},
{0x0038, nullptr, "PreloadResidentApplet"},
{0x0039, nullptr, "PrepareToStartResidentApplet"},
{0x003A, nullptr, "StartResidentApplet"},
{0x003B, &APT_S::CancelLibraryApplet, "CancelLibraryApplet"},
{0x003C, nullptr, "SendDspSleep"},
{0x003D, nullptr, "SendDspWakeUp"},
{0x003E, nullptr, "ReplySleepQuery"},
{0x003F, nullptr, "ReplySleepNotificationComplete"},
{0x0040, &APT_S::SendCaptureBufferInfo, "SendCaptureBufferInfo"},
{0x0041, &APT_S::ReceiveCaptureBufferInfo, "ReceiveCaptureBufferInfo"},
{0x0042, nullptr, "SleepSystem"},
{0x0043, &APT_S::NotifyToWait, "NotifyToWait"},
{0x0044, &APT_S::GetSharedFont, "GetSharedFont"},
{0x0045, &APT_S::GetWirelessRebootInfo, "GetWirelessRebootInfo"},
{0x0046, &APT_S::Wrap, "Wrap"},
{0x0047, &APT_S::Unwrap, "Unwrap"},
{0x0048, nullptr, "GetProgramInfo"},
{0x0049, nullptr, "Reboot"},
{0x004A, &APT_S::GetCaptureInfo, "GetCaptureInfo"},
{0x004B, &APT_S::AppletUtility, "AppletUtility"},
{0x004C, nullptr, "SetFatalErrDispMode"},
{0x004D, nullptr, "GetAppletProgramInfo"},
{0x004E, nullptr, "HardwareResetAsync"},
{0x004F, &APT_S::SetAppCpuTimeLimit, "SetAppCpuTimeLimit"},
{0x0050, &APT_S::GetAppCpuTimeLimit, "GetAppCpuTimeLimit"},
{0x0051, &APT_S::GetStartupArgument, "GetStartupArgument"},
{0x0052, nullptr, "Wrap1"},
{0x0053, nullptr, "Unwrap1"},
{0x0055, &APT_S::SetScreenCapPostPermission, "SetScreenCapPostPermission"},
{0x0056, &APT_S::GetScreenCapPostPermission, "GetScreenCapPostPermission"},
{0x0057, nullptr, "WakeupApplication2"},
{0x0058, nullptr, "GetProgramID"},
{0x0101, &APT_S::CheckNew3DSApp, "CheckNew3DSApp"},
{0x0102, &APT_S::CheckNew3DS, "CheckNew3DS"},
{0x0103, &APT_S::Unknown0x0103, "Unknown0x0103"},
{0x0104, nullptr, "IsStandardMemoryLayout"},
{0x0105, &APT_S::IsTitleAllowed, "IsTitleAllowed"},
// clang-format on
};
RegisterHandlers(functions);

View File

@ -11,98 +11,98 @@ APT_U::APT_U(std::shared_ptr<Module> apt)
: Module::APTInterface(std::move(apt), "APT:U", MaxAPTSessions) {
static const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0001, 1, 0), &APT_U::GetLockHandle, "GetLockHandle"},
{IPC::MakeHeader(0x0002, 2, 0), &APT_U::Initialize, "Initialize"},
{IPC::MakeHeader(0x0003, 1, 0), &APT_U::Enable, "Enable"},
{IPC::MakeHeader(0x0004, 1, 0), nullptr, "Finalize"},
{IPC::MakeHeader(0x0005, 1, 0), &APT_U::GetAppletManInfo, "GetAppletManInfo"},
{IPC::MakeHeader(0x0006, 1, 0), &APT_U::GetAppletInfo, "GetAppletInfo"},
{IPC::MakeHeader(0x0007, 0, 0), nullptr, "GetLastSignaledAppletId"},
{IPC::MakeHeader(0x0008, 0, 0), nullptr, "CountRegisteredApplet"},
{IPC::MakeHeader(0x0009, 1, 0), &APT_U::IsRegistered, "IsRegistered"},
{IPC::MakeHeader(0x000A, 1, 0), nullptr, "GetAttribute"},
{IPC::MakeHeader(0x000B, 1, 0), &APT_U::InquireNotification, "InquireNotification"},
{IPC::MakeHeader(0x000C, 4, 4), &APT_U::SendParameter, "SendParameter"},
{IPC::MakeHeader(0x000D, 2, 0), &APT_U::ReceiveParameter, "ReceiveParameter"},
{IPC::MakeHeader(0x000E, 2, 0), &APT_U::GlanceParameter, "GlanceParameter"},
{IPC::MakeHeader(0x000F, 4, 0), &APT_U::CancelParameter, "CancelParameter"},
{IPC::MakeHeader(0x0010, 3, 2), nullptr, "DebugFunc"},
{IPC::MakeHeader(0x0011, 3, 0), nullptr, "MapProgramIdForDebug"},
{IPC::MakeHeader(0x0012, 1, 0), nullptr, "SetHomeMenuAppletIdForDebug"},
{IPC::MakeHeader(0x0013, 0, 0), nullptr, "GetPreparationState"},
{IPC::MakeHeader(0x0014, 1, 0), nullptr, "SetPreparationState"},
{IPC::MakeHeader(0x0015, 5, 0), &APT_U::PrepareToStartApplication, "PrepareToStartApplication"},
{IPC::MakeHeader(0x0016, 1, 0), &APT_U::PreloadLibraryApplet, "PreloadLibraryApplet"},
{IPC::MakeHeader(0x0017, 1, 0), &APT_U::FinishPreloadingLibraryApplet, "FinishPreloadingLibraryApplet"},
{IPC::MakeHeader(0x0018, 1, 0), &APT_U::PrepareToStartLibraryApplet, "PrepareToStartLibraryApplet"},
{IPC::MakeHeader(0x0019, 1, 0), &APT_U::PrepareToStartSystemApplet, "PrepareToStartSystemApplet"},
{IPC::MakeHeader(0x001A, 0, 0), &APT_U::PrepareToStartNewestHomeMenu, "PrepareToStartNewestHomeMenu"},
{IPC::MakeHeader(0x001B, 3, 4), &APT_U::StartApplication, "StartApplication"},
{IPC::MakeHeader(0x001C, 0, 0), &APT_U::WakeupApplication, "WakeupApplication"},
{IPC::MakeHeader(0x001D, 0, 0), nullptr, "CancelApplication"},
{IPC::MakeHeader(0x001E, 2, 4), &APT_U::StartLibraryApplet, "StartLibraryApplet"},
{IPC::MakeHeader(0x001F, 2, 4), &APT_U::StartSystemApplet, "StartSystemApplet"},
{IPC::MakeHeader(0x0020, 1, 4), nullptr, "StartNewestHomeMenu"},
{IPC::MakeHeader(0x0021, 0, 0), &APT_U::OrderToCloseApplication, "OrderToCloseApplication"},
{IPC::MakeHeader(0x0022, 1, 0), &APT_U::PrepareToCloseApplication, "PrepareToCloseApplication"},
{IPC::MakeHeader(0x0023, 1, 0), nullptr, "PrepareToJumpToApplication"},
{IPC::MakeHeader(0x0024, 1, 4), nullptr, "JumpToApplication"},
{IPC::MakeHeader(0x0025, 3, 0), &APT_U::PrepareToCloseLibraryApplet, "PrepareToCloseLibraryApplet"},
{IPC::MakeHeader(0x0026, 0, 0), &APT_U::PrepareToCloseSystemApplet, "PrepareToCloseSystemApplet"},
{IPC::MakeHeader(0x0027, 1, 4), &APT_U::CloseApplication, "CloseApplication"},
{IPC::MakeHeader(0x0028, 1, 4), &APT_U::CloseLibraryApplet, "CloseLibraryApplet"},
{IPC::MakeHeader(0x0029, 1, 4), &APT_U::CloseSystemApplet, "CloseSystemApplet"},
{IPC::MakeHeader(0x002A, 0, 0), &APT_U::OrderToCloseSystemApplet, "OrderToCloseSystemApplet"},
{IPC::MakeHeader(0x002B, 0, 0), &APT_U::PrepareToJumpToHomeMenu, "PrepareToJumpToHomeMenu"},
{IPC::MakeHeader(0x002C, 1, 4), &APT_U::JumpToHomeMenu, "JumpToHomeMenu"},
{IPC::MakeHeader(0x002D, 0, 0), &APT_U::PrepareToLeaveHomeMenu, "PrepareToLeaveHomeMenu"},
{IPC::MakeHeader(0x002E, 1, 4), &APT_U::LeaveHomeMenu, "LeaveHomeMenu"},
{IPC::MakeHeader(0x002F, 1, 0), nullptr, "PrepareToLeaveResidentApplet"},
{IPC::MakeHeader(0x0030, 1, 4), nullptr, "LeaveResidentApplet"},
{IPC::MakeHeader(0x0031, 4, 0), &APT_U::PrepareToDoApplicationJump, "PrepareToDoApplicationJump"},
{IPC::MakeHeader(0x0032, 2, 4), &APT_U::DoApplicationJump, "DoApplicationJump"},
{IPC::MakeHeader(0x0033, 0, 0), &APT_U::GetProgramIdOnApplicationJump, "GetProgramIdOnApplicationJump"},
{IPC::MakeHeader(0x0034, 2, 4), nullptr, "SendDeliverArg"},
{IPC::MakeHeader(0x0035, 2, 0), &APT_U::ReceiveDeliverArg, "ReceiveDeliverArg"},
{IPC::MakeHeader(0x0036, 1, 0), &APT_U::LoadSysMenuArg, "LoadSysMenuArg"},
{IPC::MakeHeader(0x0037, 1, 2), &APT_U::StoreSysMenuArg, "StoreSysMenuArg"},
{IPC::MakeHeader(0x0038, 1, 0), nullptr, "PreloadResidentApplet"},
{IPC::MakeHeader(0x0039, 1, 0), nullptr, "PrepareToStartResidentApplet"},
{IPC::MakeHeader(0x003A, 1, 4), nullptr, "StartResidentApplet"},
{IPC::MakeHeader(0x003B, 1, 0), &APT_U::CancelLibraryApplet, "CancelLibraryApplet"},
{IPC::MakeHeader(0x003C, 1, 2), nullptr, "SendDspSleep"},
{IPC::MakeHeader(0x003D, 1, 2), nullptr, "SendDspWakeUp"},
{IPC::MakeHeader(0x003E, 2, 0), nullptr, "ReplySleepQuery"},
{IPC::MakeHeader(0x003F, 1, 0), nullptr, "ReplySleepNotificationComplete"},
{IPC::MakeHeader(0x0040, 1, 2), &APT_U::SendCaptureBufferInfo, "SendCaptureBufferInfo"},
{IPC::MakeHeader(0x0041, 1, 0), &APT_U::ReceiveCaptureBufferInfo, "ReceiveCaptureBufferInfo"},
{IPC::MakeHeader(0x0042, 2, 0), nullptr, "SleepSystem"},
{IPC::MakeHeader(0x0043, 1, 0), &APT_U::NotifyToWait, "NotifyToWait"},
{IPC::MakeHeader(0x0044, 0, 0), &APT_U::GetSharedFont, "GetSharedFont"},
{IPC::MakeHeader(0x0045, 1, 0), &APT_U::GetWirelessRebootInfo, "GetWirelessRebootInfo"},
{IPC::MakeHeader(0x0046, 4, 4), &APT_U::Wrap, "Wrap"},
{IPC::MakeHeader(0x0047, 4, 4), &APT_U::Unwrap, "Unwrap"},
{IPC::MakeHeader(0x0048, 4, 0), nullptr, "GetProgramInfo"},
{IPC::MakeHeader(0x0049, 6, 0), nullptr, "Reboot"},
{IPC::MakeHeader(0x004A, 1, 0), &APT_U::GetCaptureInfo, "GetCaptureInfo"},
{IPC::MakeHeader(0x004B, 3, 2), &APT_U::AppletUtility, "AppletUtility"},
{IPC::MakeHeader(0x004C, 0, 0), nullptr, "SetFatalErrDispMode"},
{IPC::MakeHeader(0x004D, 2, 0), nullptr, "GetAppletProgramInfo"},
{IPC::MakeHeader(0x004E, 0, 0), nullptr, "HardwareResetAsync"},
{IPC::MakeHeader(0x004F, 2, 0), &APT_U::SetAppCpuTimeLimit, "SetAppCpuTimeLimit"},
{IPC::MakeHeader(0x0050, 1, 0), &APT_U::GetAppCpuTimeLimit, "GetAppCpuTimeLimit"},
{IPC::MakeHeader(0x0051, 2, 0), &APT_U::GetStartupArgument, "GetStartupArgument"},
{IPC::MakeHeader(0x0052, 4, 4), nullptr, "Wrap1"},
{IPC::MakeHeader(0x0053, 4, 4), nullptr, "Unwrap1"},
{IPC::MakeHeader(0x0055, 1, 0), &APT_U::SetScreenCapPostPermission, "SetScreenCapPostPermission"},
{IPC::MakeHeader(0x0056, 0, 0), &APT_U::GetScreenCapPostPermission, "GetScreenCapPostPermission"},
{IPC::MakeHeader(0x0057, 1, 4), nullptr, "WakeupApplication2"},
{IPC::MakeHeader(0x0058, 0, 2), nullptr, "GetProgramID"},
{IPC::MakeHeader(0x0101, 0, 0), &APT_U::CheckNew3DSApp, "CheckNew3DSApp"},
{IPC::MakeHeader(0x0102, 0, 0), &APT_U::CheckNew3DS, "CheckNew3DS"},
{IPC::MakeHeader(0x0103, 0, 0), &APT_U::Unknown0x0103, "Unknown0x0103"},
{IPC::MakeHeader(0x0104, 0, 0), nullptr, "IsStandardMemoryLayout"},
{IPC::MakeHeader(0x0105, 4, 0), &APT_U::IsTitleAllowed, "IsTitleAllowed"},
{0x0001, &APT_U::GetLockHandle, "GetLockHandle"},
{0x0002, &APT_U::Initialize, "Initialize"},
{0x0003, &APT_U::Enable, "Enable"},
{0x0004, nullptr, "Finalize"},
{0x0005, &APT_U::GetAppletManInfo, "GetAppletManInfo"},
{0x0006, &APT_U::GetAppletInfo, "GetAppletInfo"},
{0x0007, nullptr, "GetLastSignaledAppletId"},
{0x0008, nullptr, "CountRegisteredApplet"},
{0x0009, &APT_U::IsRegistered, "IsRegistered"},
{0x000A, nullptr, "GetAttribute"},
{0x000B, &APT_U::InquireNotification, "InquireNotification"},
{0x000C, &APT_U::SendParameter, "SendParameter"},
{0x000D, &APT_U::ReceiveParameter, "ReceiveParameter"},
{0x000E, &APT_U::GlanceParameter, "GlanceParameter"},
{0x000F, &APT_U::CancelParameter, "CancelParameter"},
{0x0010, nullptr, "DebugFunc"},
{0x0011, nullptr, "MapProgramIdForDebug"},
{0x0012, nullptr, "SetHomeMenuAppletIdForDebug"},
{0x0013, nullptr, "GetPreparationState"},
{0x0014, nullptr, "SetPreparationState"},
{0x0015, &APT_U::PrepareToStartApplication, "PrepareToStartApplication"},
{0x0016, &APT_U::PreloadLibraryApplet, "PreloadLibraryApplet"},
{0x0017, &APT_U::FinishPreloadingLibraryApplet, "FinishPreloadingLibraryApplet"},
{0x0018, &APT_U::PrepareToStartLibraryApplet, "PrepareToStartLibraryApplet"},
{0x0019, &APT_U::PrepareToStartSystemApplet, "PrepareToStartSystemApplet"},
{0x001A, &APT_U::PrepareToStartNewestHomeMenu, "PrepareToStartNewestHomeMenu"},
{0x001B, &APT_U::StartApplication, "StartApplication"},
{0x001C, &APT_U::WakeupApplication, "WakeupApplication"},
{0x001D, nullptr, "CancelApplication"},
{0x001E, &APT_U::StartLibraryApplet, "StartLibraryApplet"},
{0x001F, &APT_U::StartSystemApplet, "StartSystemApplet"},
{0x0020, nullptr, "StartNewestHomeMenu"},
{0x0021, &APT_U::OrderToCloseApplication, "OrderToCloseApplication"},
{0x0022, &APT_U::PrepareToCloseApplication, "PrepareToCloseApplication"},
{0x0023, nullptr, "PrepareToJumpToApplication"},
{0x0024, nullptr, "JumpToApplication"},
{0x0025, &APT_U::PrepareToCloseLibraryApplet, "PrepareToCloseLibraryApplet"},
{0x0026, &APT_U::PrepareToCloseSystemApplet, "PrepareToCloseSystemApplet"},
{0x0027, &APT_U::CloseApplication, "CloseApplication"},
{0x0028, &APT_U::CloseLibraryApplet, "CloseLibraryApplet"},
{0x0029, &APT_U::CloseSystemApplet, "CloseSystemApplet"},
{0x002A, &APT_U::OrderToCloseSystemApplet, "OrderToCloseSystemApplet"},
{0x002B, &APT_U::PrepareToJumpToHomeMenu, "PrepareToJumpToHomeMenu"},
{0x002C, &APT_U::JumpToHomeMenu, "JumpToHomeMenu"},
{0x002D, &APT_U::PrepareToLeaveHomeMenu, "PrepareToLeaveHomeMenu"},
{0x002E, &APT_U::LeaveHomeMenu, "LeaveHomeMenu"},
{0x002F, nullptr, "PrepareToLeaveResidentApplet"},
{0x0030, nullptr, "LeaveResidentApplet"},
{0x0031, &APT_U::PrepareToDoApplicationJump, "PrepareToDoApplicationJump"},
{0x0032, &APT_U::DoApplicationJump, "DoApplicationJump"},
{0x0033, &APT_U::GetProgramIdOnApplicationJump, "GetProgramIdOnApplicationJump"},
{0x0034, nullptr, "SendDeliverArg"},
{0x0035, &APT_U::ReceiveDeliverArg, "ReceiveDeliverArg"},
{0x0036, &APT_U::LoadSysMenuArg, "LoadSysMenuArg"},
{0x0037, &APT_U::StoreSysMenuArg, "StoreSysMenuArg"},
{0x0038, nullptr, "PreloadResidentApplet"},
{0x0039, nullptr, "PrepareToStartResidentApplet"},
{0x003A, nullptr, "StartResidentApplet"},
{0x003B, &APT_U::CancelLibraryApplet, "CancelLibraryApplet"},
{0x003C, nullptr, "SendDspSleep"},
{0x003D, nullptr, "SendDspWakeUp"},
{0x003E, nullptr, "ReplySleepQuery"},
{0x003F, nullptr, "ReplySleepNotificationComplete"},
{0x0040, &APT_U::SendCaptureBufferInfo, "SendCaptureBufferInfo"},
{0x0041, &APT_U::ReceiveCaptureBufferInfo, "ReceiveCaptureBufferInfo"},
{0x0042, nullptr, "SleepSystem"},
{0x0043, &APT_U::NotifyToWait, "NotifyToWait"},
{0x0044, &APT_U::GetSharedFont, "GetSharedFont"},
{0x0045, &APT_U::GetWirelessRebootInfo, "GetWirelessRebootInfo"},
{0x0046, &APT_U::Wrap, "Wrap"},
{0x0047, &APT_U::Unwrap, "Unwrap"},
{0x0048, nullptr, "GetProgramInfo"},
{0x0049, nullptr, "Reboot"},
{0x004A, &APT_U::GetCaptureInfo, "GetCaptureInfo"},
{0x004B, &APT_U::AppletUtility, "AppletUtility"},
{0x004C, nullptr, "SetFatalErrDispMode"},
{0x004D, nullptr, "GetAppletProgramInfo"},
{0x004E, nullptr, "HardwareResetAsync"},
{0x004F, &APT_U::SetAppCpuTimeLimit, "SetAppCpuTimeLimit"},
{0x0050, &APT_U::GetAppCpuTimeLimit, "GetAppCpuTimeLimit"},
{0x0051, &APT_U::GetStartupArgument, "GetStartupArgument"},
{0x0052, nullptr, "Wrap1"},
{0x0053, nullptr, "Unwrap1"},
{0x0055, &APT_U::SetScreenCapPostPermission, "SetScreenCapPostPermission"},
{0x0056, &APT_U::GetScreenCapPostPermission, "GetScreenCapPostPermission"},
{0x0057, nullptr, "WakeupApplication2"},
{0x0058, nullptr, "GetProgramID"},
{0x0101, &APT_U::CheckNew3DSApp, "CheckNew3DSApp"},
{0x0102, &APT_U::CheckNew3DS, "CheckNew3DS"},
{0x0103, &APT_U::Unknown0x0103, "Unknown0x0103"},
{0x0104, nullptr, "IsStandardMemoryLayout"},
{0x0105, &APT_U::IsTitleAllowed, "IsTitleAllowed"},
// clang-format on
};
RegisterHandlers(functions);

View File

@ -11,8 +11,8 @@ NS_C::NS_C(std::shared_ptr<Service::APT::Module> apt)
: Service::APT::Module::NSInterface(std::move(apt), "ns:c", 1) {
static const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0001, 4, 0), nullptr, "LockSpecialContent"},
{IPC::MakeHeader(0x0002, 4, 0), nullptr, "UnlockSpecialContent"},
{0x0001, nullptr, "LockSpecialContent"},
{0x0002, nullptr, "UnlockSpecialContent"},
// clang-format on
};
RegisterHandlers(functions);

View File

@ -11,21 +11,21 @@ NS_S::NS_S(std::shared_ptr<Service::APT::Module> apt)
: Service::APT::Module::NSInterface(std::move(apt), "ns:s", 3) {
static const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0001, 3, 0), nullptr, "LaunchFIRM"},
{IPC::MakeHeader(0x0002, 3, 0), nullptr, "LaunchTitle"},
{IPC::MakeHeader(0x0003, 0, 0), nullptr, "TerminateApplication"},
{IPC::MakeHeader(0x0004, 1, 0), nullptr, "TerminateProcess"},
{IPC::MakeHeader(0x0005, 3, 0), nullptr, "LaunchApplicationFIRM"},
{IPC::MakeHeader(0x0006, 1, 2), &NS_S::SetWirelessRebootInfo, "SetWirelessRebootInfo"},
{IPC::MakeHeader(0x0007, 1, 2), nullptr, "CardUpdateInitialize"},
{IPC::MakeHeader(0x0008, 0, 0), nullptr, "CardUpdateShutdown"},
{IPC::MakeHeader(0x000D, 5, 0), nullptr, "SetTWLBannerHMAC"},
{IPC::MakeHeader(0x000E, 0, 0), &NS_S::ShutdownAsync, "ShutdownAsync"},
{IPC::MakeHeader(0x0010, 6, 0), &NS_S::RebootSystem, "RebootSystem"},
{IPC::MakeHeader(0x0011, 4, 0), nullptr, "TerminateTitle"},
{IPC::MakeHeader(0x0012, 3, 0), nullptr, "SetApplicationCpuTimeLimit"},
{IPC::MakeHeader(0x0015, 5, 0), nullptr, "LaunchApplication"},
{IPC::MakeHeader(0x0016, 0, 0), &NS_S::RebootSystemClean, "RebootSystemClean"},
{0x0001, nullptr, "LaunchFIRM"},
{0x0002, nullptr, "LaunchTitle"},
{0x0003, nullptr, "TerminateApplication"},
{0x0004, nullptr, "TerminateProcess"},
{0x0005, nullptr, "LaunchApplicationFIRM"},
{0x0006, &NS_S::SetWirelessRebootInfo, "SetWirelessRebootInfo"},
{0x0007, nullptr, "CardUpdateInitialize"},
{0x0008, nullptr, "CardUpdateShutdown"},
{0x000D, nullptr, "SetTWLBannerHMAC"},
{0x000E, &NS_S::ShutdownAsync, "ShutdownAsync"},
{0x0010, &NS_S::RebootSystem, "RebootSystem"},
{0x0011, nullptr, "TerminateTitle"},
{0x0012, nullptr, "SetApplicationCpuTimeLimit"},
{0x0015, nullptr, "LaunchApplication"},
{0x0016, &NS_S::RebootSystemClean, "RebootSystemClean"},
// clang-format on
};
RegisterHandlers(functions);

View File

@ -13,7 +13,7 @@
namespace Service::BOSS {
void Module::Interface::InitializeSession(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x01, 2, 2);
IPC::RequestParser rp(ctx);
const u64 programID = rp.Pop<u64>();
rp.PopPID();
@ -24,7 +24,7 @@ void Module::Interface::InitializeSession(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::SetStorageInfo(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x02, 4, 0);
IPC::RequestParser rp(ctx);
const u64 extdata_id = rp.Pop<u64>();
const u32 boss_size = rp.Pop<u32>();
const u8 extdata_type = rp.Pop<u8>(); /// 0 = NAND, 1 = SD
@ -38,7 +38,7 @@ void Module::Interface::SetStorageInfo(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::UnregisterStorage(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x03, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
@ -47,7 +47,7 @@ void Module::Interface::UnregisterStorage(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetStorageInfo(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x04, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
@ -57,7 +57,7 @@ void Module::Interface::GetStorageInfo(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::RegisterPrivateRootCa(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x05, 1, 2);
IPC::RequestParser rp(ctx);
[[maybe_unused]] const u32 size = rp.Pop<u32>();
auto& buffer = rp.PopMappedBuffer();
@ -69,7 +69,7 @@ void Module::Interface::RegisterPrivateRootCa(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::RegisterPrivateClientCert(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x06, 2, 4);
IPC::RequestParser rp(ctx);
const u32 buffer1_size = rp.Pop<u32>();
const u32 buffer2_size = rp.Pop<u32>();
auto& buffer1 = rp.PopMappedBuffer();
@ -85,7 +85,7 @@ void Module::Interface::RegisterPrivateClientCert(Kernel::HLERequestContext& ctx
}
void Module::Interface::GetNewArrivalFlag(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x07, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
@ -95,7 +95,7 @@ void Module::Interface::GetNewArrivalFlag(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::RegisterNewArrivalEvent(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x08, 0, 2);
IPC::RequestParser rp(ctx);
[[maybe_unused]] const auto event = rp.PopObject<Kernel::Event>();
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
@ -105,7 +105,7 @@ void Module::Interface::RegisterNewArrivalEvent(Kernel::HLERequestContext& ctx)
}
void Module::Interface::SetOptoutFlag(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x09, 1, 0);
IPC::RequestParser rp(ctx);
output_flag = rp.Pop<u8>();
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
@ -115,7 +115,7 @@ void Module::Interface::SetOptoutFlag(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetOptoutFlag(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0A, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
@ -125,7 +125,7 @@ void Module::Interface::GetOptoutFlag(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::RegisterTask(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0B, 3, 2);
IPC::RequestParser rp(ctx);
const u32 size = rp.Pop<u32>();
const u8 unk_param2 = rp.Pop<u8>();
const u8 unk_param3 = rp.Pop<u8>();
@ -140,7 +140,7 @@ void Module::Interface::RegisterTask(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::UnregisterTask(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0C, 2, 2);
IPC::RequestParser rp(ctx);
const u32 size = rp.Pop<u32>();
const u8 unk_param2 = rp.Pop<u8>();
auto& buffer = rp.PopMappedBuffer();
@ -153,7 +153,7 @@ void Module::Interface::UnregisterTask(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::ReconfigureTask(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0D, 2, 2);
IPC::RequestParser rp(ctx);
const u32 size = rp.Pop<u32>();
const u8 unk_param2 = rp.Pop<u8>();
auto& buffer = rp.PopMappedBuffer();
@ -166,7 +166,7 @@ void Module::Interface::ReconfigureTask(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetTaskIdList(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0E, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
@ -175,7 +175,7 @@ void Module::Interface::GetTaskIdList(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetStepIdList(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0F, 1, 2);
IPC::RequestParser rp(ctx);
const u32 size = rp.Pop<u32>();
auto& buffer = rp.PopMappedBuffer();
@ -187,7 +187,7 @@ void Module::Interface::GetStepIdList(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetNsDataIdList(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x10, 4, 2);
IPC::RequestParser rp(ctx);
const u32 filter = rp.Pop<u32>();
const u32 max_entries = rp.Pop<u32>(); /// buffer size in words
const u16 word_index_start = rp.Pop<u16>();
@ -207,7 +207,7 @@ void Module::Interface::GetNsDataIdList(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetNsDataIdList1(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x11, 4, 2);
IPC::RequestParser rp(ctx);
const u32 filter = rp.Pop<u32>();
const u32 max_entries = rp.Pop<u32>(); /// buffer size in words
const u16 word_index_start = rp.Pop<u16>();
@ -227,7 +227,7 @@ void Module::Interface::GetNsDataIdList1(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetNsDataIdList2(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x12, 4, 2);
IPC::RequestParser rp(ctx);
const u32 filter = rp.Pop<u32>();
const u32 max_entries = rp.Pop<u32>(); /// buffer size in words
const u16 word_index_start = rp.Pop<u16>();
@ -247,7 +247,7 @@ void Module::Interface::GetNsDataIdList2(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetNsDataIdList3(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x13, 4, 2);
IPC::RequestParser rp(ctx);
const u32 filter = rp.Pop<u32>();
const u32 max_entries = rp.Pop<u32>(); /// buffer size in words
const u16 word_index_start = rp.Pop<u16>();
@ -267,7 +267,7 @@ void Module::Interface::GetNsDataIdList3(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::SendProperty(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x14, 2, 2);
IPC::RequestParser rp(ctx);
const u16 property_id = rp.Pop<u16>();
const u32 size = rp.Pop<u32>();
auto& buffer = rp.PopMappedBuffer();
@ -280,7 +280,7 @@ void Module::Interface::SendProperty(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::SendPropertyHandle(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x15, 1, 2);
IPC::RequestParser rp(ctx);
const u16 property_id = rp.Pop<u16>();
[[maybe_unused]] const std::shared_ptr<Kernel::Object> object = rp.PopGenericObject();
@ -291,7 +291,7 @@ void Module::Interface::SendPropertyHandle(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::ReceiveProperty(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x16, 2, 2);
IPC::RequestParser rp(ctx);
const u16 property_id = rp.Pop<u16>();
const u32 size = rp.Pop<u32>();
auto& buffer = rp.PopMappedBuffer();
@ -305,7 +305,7 @@ void Module::Interface::ReceiveProperty(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::UpdateTaskInterval(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x17, 2, 2);
IPC::RequestParser rp(ctx);
const u32 size = rp.Pop<u32>();
const u16 unk_param2 = rp.Pop<u16>();
auto& buffer = rp.PopMappedBuffer();
@ -318,7 +318,7 @@ void Module::Interface::UpdateTaskInterval(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::UpdateTaskCount(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x18, 2, 2);
IPC::RequestParser rp(ctx);
const u32 size = rp.Pop<u32>();
const u32 unk_param2 = rp.Pop<u32>();
auto& buffer = rp.PopMappedBuffer();
@ -331,7 +331,7 @@ void Module::Interface::UpdateTaskCount(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetTaskInterval(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x19, 1, 2);
IPC::RequestParser rp(ctx);
const u32 size = rp.Pop<u32>();
auto& buffer = rp.PopMappedBuffer();
@ -344,7 +344,7 @@ void Module::Interface::GetTaskInterval(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetTaskCount(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1A, 1, 2);
IPC::RequestParser rp(ctx);
const u32 size = rp.Pop<u32>();
auto& buffer = rp.PopMappedBuffer();
@ -357,7 +357,7 @@ void Module::Interface::GetTaskCount(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetTaskServiceStatus(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1B, 1, 2);
IPC::RequestParser rp(ctx);
const u32 size = rp.Pop<u32>();
auto& buffer = rp.PopMappedBuffer();
@ -370,7 +370,7 @@ void Module::Interface::GetTaskServiceStatus(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::StartTask(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1C, 1, 2);
IPC::RequestParser rp(ctx);
const u32 size = rp.Pop<u32>();
auto& buffer = rp.PopMappedBuffer();
@ -382,7 +382,7 @@ void Module::Interface::StartTask(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::StartTaskImmediate(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1D, 1, 2);
IPC::RequestParser rp(ctx);
const u32 size = rp.Pop<u32>();
auto& buffer = rp.PopMappedBuffer();
@ -394,7 +394,7 @@ void Module::Interface::StartTaskImmediate(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::CancelTask(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1E, 1, 2);
IPC::RequestParser rp(ctx);
const u32 size = rp.Pop<u32>();
auto& buffer = rp.PopMappedBuffer();
@ -406,7 +406,7 @@ void Module::Interface::CancelTask(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetTaskFinishHandle(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1F, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 2);
rb.Push(RESULT_SUCCESS);
@ -416,7 +416,7 @@ void Module::Interface::GetTaskFinishHandle(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetTaskState(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x20, 2, 2);
IPC::RequestParser rp(ctx);
const u32 size = rp.Pop<u32>();
const u8 state = rp.Pop<u8>();
auto& buffer = rp.PopMappedBuffer();
@ -432,7 +432,7 @@ void Module::Interface::GetTaskState(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetTaskResult(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x21, 1, 2);
IPC::RequestParser rp(ctx);
const u32 size = rp.Pop<u32>();
auto& buffer = rp.PopMappedBuffer();
@ -447,7 +447,7 @@ void Module::Interface::GetTaskResult(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetTaskCommErrorCode(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x22, 1, 2);
IPC::RequestParser rp(ctx);
const u32 size = rp.Pop<u32>();
auto& buffer = rp.PopMappedBuffer();
@ -462,7 +462,7 @@ void Module::Interface::GetTaskCommErrorCode(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetTaskStatus(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x23, 3, 2);
IPC::RequestParser rp(ctx);
const u32 size = rp.Pop<u32>();
const u8 unk_param2 = rp.Pop<u8>();
const u8 unk_param3 = rp.Pop<u8>();
@ -478,7 +478,7 @@ void Module::Interface::GetTaskStatus(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetTaskError(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x24, 2, 2);
IPC::RequestParser rp(ctx);
const u32 size = rp.Pop<u32>();
const u8 unk_param2 = rp.Pop<u8>();
auto& buffer = rp.PopMappedBuffer();
@ -492,7 +492,7 @@ void Module::Interface::GetTaskError(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetTaskInfo(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x25, 2, 2);
IPC::RequestParser rp(ctx);
const u32 size = rp.Pop<u32>();
const u8 unk_param2 = rp.Pop<u8>();
auto& buffer = rp.PopMappedBuffer();
@ -505,7 +505,7 @@ void Module::Interface::GetTaskInfo(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::DeleteNsData(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x26, 1, 0);
IPC::RequestParser rp(ctx);
const u32 ns_data_id = rp.Pop<u32>();
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
@ -515,7 +515,7 @@ void Module::Interface::DeleteNsData(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetNsDataHeaderInfo(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x27, 3, 2);
IPC::RequestParser rp(ctx);
const u32 ns_data_id = rp.Pop<u32>();
const u8 type = rp.Pop<u8>();
const u32 size = rp.Pop<u32>();
@ -530,7 +530,7 @@ void Module::Interface::GetNsDataHeaderInfo(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::ReadNsData(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x28, 4, 2);
IPC::RequestParser rp(ctx);
const u32 ns_data_id = rp.Pop<u32>();
const u64 offset = rp.Pop<u64>();
const u32 size = rp.Pop<u32>();
@ -547,7 +547,7 @@ void Module::Interface::ReadNsData(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::SetNsDataAdditionalInfo(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x29, 2, 0);
IPC::RequestParser rp(ctx);
const u32 unk_param1 = rp.Pop<u32>();
const u32 unk_param2 = rp.Pop<u32>();
@ -559,7 +559,7 @@ void Module::Interface::SetNsDataAdditionalInfo(Kernel::HLERequestContext& ctx)
}
void Module::Interface::GetNsDataAdditionalInfo(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x2A, 1, 0);
IPC::RequestParser rp(ctx);
const u32 unk_param1 = rp.Pop<u32>();
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
@ -570,7 +570,7 @@ void Module::Interface::GetNsDataAdditionalInfo(Kernel::HLERequestContext& ctx)
}
void Module::Interface::SetNsDataNewFlag(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x2B, 2, 0);
IPC::RequestParser rp(ctx);
const u32 unk_param1 = rp.Pop<u32>();
ns_data_new_flag = rp.Pop<u8>();
@ -582,7 +582,7 @@ void Module::Interface::SetNsDataNewFlag(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetNsDataNewFlag(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x2C, 1, 0);
IPC::RequestParser rp(ctx);
const u32 unk_param1 = rp.Pop<u32>();
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
@ -594,7 +594,7 @@ void Module::Interface::GetNsDataNewFlag(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetNsDataLastUpdate(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x2D, 1, 0);
IPC::RequestParser rp(ctx);
const u32 unk_param1 = rp.Pop<u32>();
IPC::RequestBuilder rb = rp.MakeBuilder(3, 0);
@ -606,7 +606,7 @@ void Module::Interface::GetNsDataLastUpdate(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetErrorCode(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x2E, 1, 0);
IPC::RequestParser rp(ctx);
const u8 input = rp.Pop<u8>();
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
@ -617,7 +617,7 @@ void Module::Interface::GetErrorCode(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::RegisterStorageEntry(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x2F, 5, 0);
IPC::RequestParser rp(ctx);
const u32 unk_param1 = rp.Pop<u32>();
const u32 unk_param2 = rp.Pop<u32>();
const u32 unk_param3 = rp.Pop<u32>();
@ -634,7 +634,7 @@ void Module::Interface::RegisterStorageEntry(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetStorageEntryInfo(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x30, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(3, 0);
rb.Push(RESULT_SUCCESS);
@ -645,7 +645,7 @@ void Module::Interface::GetStorageEntryInfo(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::SetStorageOption(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x31, 4, 0);
IPC::RequestParser rp(ctx);
const u8 unk_param1 = rp.Pop<u8>();
const u32 unk_param2 = rp.Pop<u32>();
const u16 unk_param3 = rp.Pop<u16>();
@ -661,7 +661,7 @@ void Module::Interface::SetStorageOption(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetStorageOption(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x32, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(5, 0);
rb.Push(RESULT_SUCCESS);
@ -674,7 +674,7 @@ void Module::Interface::GetStorageOption(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::StartBgImmediate(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x33, 1, 2);
IPC::RequestParser rp(ctx);
const u32 size = rp.Pop<u32>();
auto& buffer = rp.PopMappedBuffer();
@ -686,7 +686,7 @@ void Module::Interface::StartBgImmediate(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetTaskProperty0(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x34, 1, 2);
IPC::RequestParser rp(ctx);
const u32 size = rp.Pop<u32>();
auto& buffer = rp.PopMappedBuffer();
@ -699,7 +699,7 @@ void Module::Interface::GetTaskProperty0(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::RegisterImmediateTask(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x35, 3, 2);
IPC::RequestParser rp(ctx);
const u32 size = rp.Pop<u32>();
const u8 unk_param2 = rp.Pop<u8>();
const u8 unk_param3 = rp.Pop<u8>();
@ -714,7 +714,7 @@ void Module::Interface::RegisterImmediateTask(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::SetTaskQuery(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x36, 2, 4);
IPC::RequestParser rp(ctx);
const u32 buffer1_size = rp.Pop<u32>();
const u32 buffer2_size = rp.Pop<u32>();
auto& buffer1 = rp.PopMappedBuffer();
@ -730,7 +730,7 @@ void Module::Interface::SetTaskQuery(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetTaskQuery(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x37, 2, 4);
IPC::RequestParser rp(ctx);
const u32 buffer1_size = rp.Pop<u32>();
const u32 buffer2_size = rp.Pop<u32>();
auto& buffer1 = rp.PopMappedBuffer();
@ -746,7 +746,7 @@ void Module::Interface::GetTaskQuery(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::InitializeSessionPrivileged(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x401, 2, 2);
IPC::RequestParser rp(ctx);
const u64 programID = rp.Pop<u64>();
rp.PopPID();
@ -757,7 +757,7 @@ void Module::Interface::InitializeSessionPrivileged(Kernel::HLERequestContext& c
}
void Module::Interface::GetAppNewFlag(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x404, 2, 0);
IPC::RequestParser rp(ctx);
const u64 programID = rp.Pop<u64>();
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
@ -768,7 +768,7 @@ void Module::Interface::GetAppNewFlag(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetNsDataIdListPrivileged(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x40D, 6, 2);
IPC::RequestParser rp(ctx);
const u64 programID = rp.Pop<u64>();
const u32 filter = rp.Pop<u32>();
const u32 max_entries = rp.Pop<u32>(); /// buffer size in words
@ -789,7 +789,7 @@ void Module::Interface::GetNsDataIdListPrivileged(Kernel::HLERequestContext& ctx
}
void Module::Interface::GetNsDataIdListPrivileged1(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x40E, 6, 2);
IPC::RequestParser rp(ctx);
const u64 programID = rp.Pop<u64>();
const u32 filter = rp.Pop<u32>();
const u32 max_entries = rp.Pop<u32>(); /// buffer size in words
@ -810,7 +810,7 @@ void Module::Interface::GetNsDataIdListPrivileged1(Kernel::HLERequestContext& ct
}
void Module::Interface::SendPropertyPrivileged(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x413, 2, 2);
IPC::RequestParser rp(ctx);
const u16 property_id = rp.Pop<u16>();
const u32 size = rp.Pop<u32>();
auto& buffer = rp.PopMappedBuffer();
@ -823,7 +823,7 @@ void Module::Interface::SendPropertyPrivileged(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::DeleteNsDataPrivileged(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x415, 3, 0);
IPC::RequestParser rp(ctx);
const u64 programID = rp.Pop<u64>();
const u32 ns_data_id = rp.Pop<u32>();
@ -835,7 +835,7 @@ void Module::Interface::DeleteNsDataPrivileged(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetNsDataHeaderInfoPrivileged(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x416, 5, 2);
IPC::RequestParser rp(ctx);
const u64 programID = rp.Pop<u64>();
const u32 ns_data_id = rp.Pop<u32>();
const u8 type = rp.Pop<u8>();
@ -852,7 +852,7 @@ void Module::Interface::GetNsDataHeaderInfoPrivileged(Kernel::HLERequestContext&
}
void Module::Interface::ReadNsDataPrivileged(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x417, 6, 2);
IPC::RequestParser rp(ctx);
const u64 programID = rp.Pop<u64>();
const u32 ns_data_id = rp.Pop<u32>();
const u64 offset = rp.Pop<u64>();
@ -871,7 +871,7 @@ void Module::Interface::ReadNsDataPrivileged(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::SetNsDataNewFlagPrivileged(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x41A, 4, 0);
IPC::RequestParser rp(ctx);
const u64 programID = rp.Pop<u64>();
const u32 unk_param1 = rp.Pop<u32>();
ns_data_new_flag_privileged = rp.Pop<u8>();
@ -886,7 +886,7 @@ void Module::Interface::SetNsDataNewFlagPrivileged(Kernel::HLERequestContext& ct
}
void Module::Interface::GetNsDataNewFlagPrivileged(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x41B, 3, 0);
IPC::RequestParser rp(ctx);
const u64 programID = rp.Pop<u64>();
const u32 unk_param1 = rp.Pop<u32>();

View File

@ -12,72 +12,72 @@ BOSS_P::BOSS_P(std::shared_ptr<Module> boss)
static const FunctionInfo functions[] = {
// boss:u shared commands
// clang-format off
{IPC::MakeHeader(0x0001, 2, 2), &BOSS_P::InitializeSession, "InitializeSession"},
{IPC::MakeHeader(0x0002, 4, 0), &BOSS_P::SetStorageInfo, "RegisterStorage"},
{IPC::MakeHeader(0x0003, 0, 0), &BOSS_P::UnregisterStorage, "UnregisterStorage"},
{IPC::MakeHeader(0x0004, 0, 0), &BOSS_P::GetStorageInfo, "GetStorageInfo"},
{IPC::MakeHeader(0x0005, 1, 2), &BOSS_P::RegisterPrivateRootCa, "RegisterPrivateRootCa"},
{IPC::MakeHeader(0x0006, 2, 4), &BOSS_P::RegisterPrivateClientCert, "RegisterPrivateClientCert"},
{IPC::MakeHeader(0x0007, 0, 0), &BOSS_P::GetNewArrivalFlag, "GetNewArrivalFlag"},
{IPC::MakeHeader(0x0008, 0, 2), &BOSS_P::RegisterNewArrivalEvent, "RegisterNewArrivalEvent"},
{IPC::MakeHeader(0x0009, 1, 0), &BOSS_P::SetOptoutFlag, "SetOptoutFlag"},
{IPC::MakeHeader(0x000A, 0, 0), &BOSS_P::GetOptoutFlag, "GetOptoutFlag"},
{IPC::MakeHeader(0x000B, 3, 2), &BOSS_P::RegisterTask, "RegisterTask"},
{IPC::MakeHeader(0x000C, 2, 2), &BOSS_P::UnregisterTask, "UnregisterTask"},
{IPC::MakeHeader(0x000D, 2, 2), &BOSS_P::ReconfigureTask, "ReconfigureTask"},
{IPC::MakeHeader(0x000E, 0, 0), &BOSS_P::GetTaskIdList, "GetTaskIdList"},
{IPC::MakeHeader(0x000F, 1, 2), &BOSS_P::GetStepIdList, "GetStepIdList"},
{IPC::MakeHeader(0x0010, 4, 2), &BOSS_P::GetNsDataIdList, "GetNsDataIdList"},
{IPC::MakeHeader(0x0011, 4, 2), &BOSS_P::GetNsDataIdList1, "GetNsDataIdList1"},
{IPC::MakeHeader(0x0012, 4, 2), &BOSS_P::GetNsDataIdList2, "GetNsDataIdList2"},
{IPC::MakeHeader(0x0013, 4, 2), &BOSS_P::GetNsDataIdList3, "GetNsDataIdList3"},
{IPC::MakeHeader(0x0014, 2, 2), &BOSS_P::SendProperty, "SendProperty"},
{IPC::MakeHeader(0x0015, 1, 2), &BOSS_P::SendPropertyHandle, "SendPropertyHandle"},
{IPC::MakeHeader(0x0016, 2, 2), &BOSS_P::ReceiveProperty, "ReceiveProperty"},
{IPC::MakeHeader(0x0017, 2, 2), &BOSS_P::UpdateTaskInterval, "UpdateTaskInterval"},
{IPC::MakeHeader(0x0018, 2, 2), &BOSS_P::UpdateTaskCount, "UpdateTaskCount"},
{IPC::MakeHeader(0x0019, 1, 2), &BOSS_P::GetTaskInterval, "GetTaskInterval"},
{IPC::MakeHeader(0x001A, 1, 2), &BOSS_P::GetTaskCount, "GetTaskCount"},
{IPC::MakeHeader(0x001B, 1, 2), &BOSS_P::GetTaskServiceStatus, "GetTaskServiceStatus"},
{IPC::MakeHeader(0x001C, 1, 2), &BOSS_P::StartTask, "StartTask"},
{IPC::MakeHeader(0x001D, 1, 2), &BOSS_P::StartTaskImmediate, "StartTaskImmediate"},
{IPC::MakeHeader(0x001E, 1, 2), &BOSS_P::CancelTask, "CancelTask"},
{IPC::MakeHeader(0x001F, 0, 0), &BOSS_P::GetTaskFinishHandle, "GetTaskFinishHandle"},
{IPC::MakeHeader(0x0020, 2, 2), &BOSS_P::GetTaskState, "GetTaskState"},
{IPC::MakeHeader(0x0021, 1, 2), &BOSS_P::GetTaskResult, "GetTaskResult"},
{IPC::MakeHeader(0x0022, 1, 2), &BOSS_P::GetTaskCommErrorCode, "GetTaskCommErrorCode"},
{IPC::MakeHeader(0x0023, 3, 2), &BOSS_P::GetTaskStatus, "GetTaskStatus"},
{IPC::MakeHeader(0x0024, 2, 2), &BOSS_P::GetTaskError, "GetTaskError"},
{IPC::MakeHeader(0x0025, 2, 2), &BOSS_P::GetTaskInfo, "GetTaskInfo"},
{IPC::MakeHeader(0x0026, 1, 0), &BOSS_P::DeleteNsData, "DeleteNsData"},
{IPC::MakeHeader(0x0027, 3, 2), &BOSS_P::GetNsDataHeaderInfo, "GetNsDataHeaderInfo"},
{IPC::MakeHeader(0x0028, 4, 2), &BOSS_P::ReadNsData, "ReadNsData"},
{IPC::MakeHeader(0x0029, 2, 0), &BOSS_P::SetNsDataAdditionalInfo, "SetNsDataAdditionalInfo"},
{IPC::MakeHeader(0x002A, 1, 0), &BOSS_P::GetNsDataAdditionalInfo, "GetNsDataAdditionalInfo"},
{IPC::MakeHeader(0x002B, 2, 0), &BOSS_P::SetNsDataNewFlag, "SetNsDataNewFlag"},
{IPC::MakeHeader(0x002C, 1, 0), &BOSS_P::GetNsDataNewFlag, "GetNsDataNewFlag"},
{IPC::MakeHeader(0x002D, 1, 0), &BOSS_P::GetNsDataLastUpdate, "GetNsDataLastUpdate"},
{IPC::MakeHeader(0x002E, 1, 0), &BOSS_P::GetErrorCode, "GetErrorCode"},
{IPC::MakeHeader(0x002F, 5, 0), &BOSS_P::RegisterStorageEntry, "RegisterStorageEntry"},
{IPC::MakeHeader(0x0030, 0, 0), &BOSS_P::GetStorageEntryInfo, "GetStorageEntryInfo"},
{IPC::MakeHeader(0x0031, 4, 0), &BOSS_P::SetStorageOption, "SetStorageOption"},
{IPC::MakeHeader(0x0032, 0, 0), &BOSS_P::GetStorageOption, "GetStorageOption"},
{IPC::MakeHeader(0x0033, 1, 2), &BOSS_P::StartBgImmediate, "StartBgImmediate"},
{IPC::MakeHeader(0x0034, 1, 2), &BOSS_P::GetTaskProperty0, "GetTaskProperty0"},
{IPC::MakeHeader(0x0035, 3, 2), &BOSS_P::RegisterImmediateTask, "RegisterImmediateTask"},
{IPC::MakeHeader(0x0036, 2, 4), &BOSS_P::SetTaskQuery, "SetTaskQuery"},
{IPC::MakeHeader(0x0037, 2, 4), &BOSS_P::GetTaskQuery, "GetTaskQuery"},
{0x0001, &BOSS_P::InitializeSession, "InitializeSession"},
{0x0002, &BOSS_P::SetStorageInfo, "RegisterStorage"},
{0x0003, &BOSS_P::UnregisterStorage, "UnregisterStorage"},
{0x0004, &BOSS_P::GetStorageInfo, "GetStorageInfo"},
{0x0005, &BOSS_P::RegisterPrivateRootCa, "RegisterPrivateRootCa"},
{0x0006, &BOSS_P::RegisterPrivateClientCert, "RegisterPrivateClientCert"},
{0x0007, &BOSS_P::GetNewArrivalFlag, "GetNewArrivalFlag"},
{0x0008, &BOSS_P::RegisterNewArrivalEvent, "RegisterNewArrivalEvent"},
{0x0009, &BOSS_P::SetOptoutFlag, "SetOptoutFlag"},
{0x000A, &BOSS_P::GetOptoutFlag, "GetOptoutFlag"},
{0x000B, &BOSS_P::RegisterTask, "RegisterTask"},
{0x000C, &BOSS_P::UnregisterTask, "UnregisterTask"},
{0x000D, &BOSS_P::ReconfigureTask, "ReconfigureTask"},
{0x000E, &BOSS_P::GetTaskIdList, "GetTaskIdList"},
{0x000F, &BOSS_P::GetStepIdList, "GetStepIdList"},
{0x0010, &BOSS_P::GetNsDataIdList, "GetNsDataIdList"},
{0x0011, &BOSS_P::GetNsDataIdList1, "GetNsDataIdList1"},
{0x0012, &BOSS_P::GetNsDataIdList2, "GetNsDataIdList2"},
{0x0013, &BOSS_P::GetNsDataIdList3, "GetNsDataIdList3"},
{0x0014, &BOSS_P::SendProperty, "SendProperty"},
{0x0015, &BOSS_P::SendPropertyHandle, "SendPropertyHandle"},
{0x0016, &BOSS_P::ReceiveProperty, "ReceiveProperty"},
{0x0017, &BOSS_P::UpdateTaskInterval, "UpdateTaskInterval"},
{0x0018, &BOSS_P::UpdateTaskCount, "UpdateTaskCount"},
{0x0019, &BOSS_P::GetTaskInterval, "GetTaskInterval"},
{0x001A, &BOSS_P::GetTaskCount, "GetTaskCount"},
{0x001B, &BOSS_P::GetTaskServiceStatus, "GetTaskServiceStatus"},
{0x001C, &BOSS_P::StartTask, "StartTask"},
{0x001D, &BOSS_P::StartTaskImmediate, "StartTaskImmediate"},
{0x001E, &BOSS_P::CancelTask, "CancelTask"},
{0x001F, &BOSS_P::GetTaskFinishHandle, "GetTaskFinishHandle"},
{0x0020, &BOSS_P::GetTaskState, "GetTaskState"},
{0x0021, &BOSS_P::GetTaskResult, "GetTaskResult"},
{0x0022, &BOSS_P::GetTaskCommErrorCode, "GetTaskCommErrorCode"},
{0x0023, &BOSS_P::GetTaskStatus, "GetTaskStatus"},
{0x0024, &BOSS_P::GetTaskError, "GetTaskError"},
{0x0025, &BOSS_P::GetTaskInfo, "GetTaskInfo"},
{0x0026, &BOSS_P::DeleteNsData, "DeleteNsData"},
{0x0027, &BOSS_P::GetNsDataHeaderInfo, "GetNsDataHeaderInfo"},
{0x0028, &BOSS_P::ReadNsData, "ReadNsData"},
{0x0029, &BOSS_P::SetNsDataAdditionalInfo, "SetNsDataAdditionalInfo"},
{0x002A, &BOSS_P::GetNsDataAdditionalInfo, "GetNsDataAdditionalInfo"},
{0x002B, &BOSS_P::SetNsDataNewFlag, "SetNsDataNewFlag"},
{0x002C, &BOSS_P::GetNsDataNewFlag, "GetNsDataNewFlag"},
{0x002D, &BOSS_P::GetNsDataLastUpdate, "GetNsDataLastUpdate"},
{0x002E, &BOSS_P::GetErrorCode, "GetErrorCode"},
{0x002F, &BOSS_P::RegisterStorageEntry, "RegisterStorageEntry"},
{0x0030, &BOSS_P::GetStorageEntryInfo, "GetStorageEntryInfo"},
{0x0031, &BOSS_P::SetStorageOption, "SetStorageOption"},
{0x0032, &BOSS_P::GetStorageOption, "GetStorageOption"},
{0x0033, &BOSS_P::StartBgImmediate, "StartBgImmediate"},
{0x0034, &BOSS_P::GetTaskProperty0, "GetTaskProperty0"},
{0x0035, &BOSS_P::RegisterImmediateTask, "RegisterImmediateTask"},
{0x0036, &BOSS_P::SetTaskQuery, "SetTaskQuery"},
{0x0037, &BOSS_P::GetTaskQuery, "GetTaskQuery"},
// boss:p
{IPC::MakeHeader(0x0401, 2, 2), &BOSS_P::InitializeSessionPrivileged, "InitializeSessionPrivileged"},
{IPC::MakeHeader(0x0404, 2, 0), &BOSS_P::GetAppNewFlag, "GetAppNewFlag"},
{IPC::MakeHeader(0x040D, 6, 2), &BOSS_P::GetNsDataIdListPrivileged, "GetNsDataIdListPrivileged"},
{IPC::MakeHeader(0x040E, 6, 2), &BOSS_P::GetNsDataIdListPrivileged1, "GetNsDataIdListPrivileged1"},
{IPC::MakeHeader(0x0413, 2, 2), &BOSS_P::SendPropertyPrivileged, "SendPropertyPrivileged"},
{IPC::MakeHeader(0x0415, 3, 0), &BOSS_P::DeleteNsDataPrivileged, "DeleteNsDataPrivileged"},
{IPC::MakeHeader(0x0416, 5, 2), &BOSS_P::GetNsDataHeaderInfoPrivileged, "GetNsDataHeaderInfoPrivileged"},
{IPC::MakeHeader(0x0417, 6, 2), &BOSS_P::ReadNsDataPrivileged, "ReadNsDataPrivileged"},
{IPC::MakeHeader(0x041A, 4, 0), &BOSS_P::SetNsDataNewFlagPrivileged, "SetNsDataNewFlagPrivileged"},
{IPC::MakeHeader(0x041B, 3, 0), &BOSS_P::GetNsDataNewFlagPrivileged, "GetNsDataNewFlagPrivileged"},
{0x0401, &BOSS_P::InitializeSessionPrivileged, "InitializeSessionPrivileged"},
{0x0404, &BOSS_P::GetAppNewFlag, "GetAppNewFlag"},
{0x040D, &BOSS_P::GetNsDataIdListPrivileged, "GetNsDataIdListPrivileged"},
{0x040E, &BOSS_P::GetNsDataIdListPrivileged1, "GetNsDataIdListPrivileged1"},
{0x0413, &BOSS_P::SendPropertyPrivileged, "SendPropertyPrivileged"},
{0x0415, &BOSS_P::DeleteNsDataPrivileged, "DeleteNsDataPrivileged"},
{0x0416, &BOSS_P::GetNsDataHeaderInfoPrivileged, "GetNsDataHeaderInfoPrivileged"},
{0x0417, &BOSS_P::ReadNsDataPrivileged, "ReadNsDataPrivileged"},
{0x041A, &BOSS_P::SetNsDataNewFlagPrivileged, "SetNsDataNewFlagPrivileged"},
{0x041B, &BOSS_P::GetNsDataNewFlagPrivileged, "GetNsDataNewFlagPrivileged"},
// clang-format on
};

View File

@ -11,61 +11,61 @@ BOSS_U::BOSS_U(std::shared_ptr<Module> boss)
: Module::Interface(std::move(boss), "boss:U", DefaultMaxSessions) {
static const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0001, 2, 2), &BOSS_U::InitializeSession, "InitializeSession"},
{IPC::MakeHeader(0x0002, 4, 0), &BOSS_U::SetStorageInfo, "SetStorageInfo"},
{IPC::MakeHeader(0x0003, 0, 0), &BOSS_U::UnregisterStorage, "UnregisterStorage"},
{IPC::MakeHeader(0x0004, 0, 0), &BOSS_U::GetStorageInfo, "GetStorageInfo"},
{IPC::MakeHeader(0x0005, 1, 2), &BOSS_U::RegisterPrivateRootCa, "RegisterPrivateRootCa"},
{IPC::MakeHeader(0x0006, 2, 4), &BOSS_U::RegisterPrivateClientCert, "RegisterPrivateClientCert"},
{IPC::MakeHeader(0x0007, 0, 0), &BOSS_U::GetNewArrivalFlag, "GetNewArrivalFlag"},
{IPC::MakeHeader(0x0008, 0, 2), &BOSS_U::RegisterNewArrivalEvent, "RegisterNewArrivalEvent"},
{IPC::MakeHeader(0x0009, 1, 0), &BOSS_U::SetOptoutFlag, "SetOptoutFlag"},
{IPC::MakeHeader(0x000A, 0, 0), &BOSS_U::GetOptoutFlag, "GetOptoutFlag"},
{IPC::MakeHeader(0x000B, 3, 2), &BOSS_U::RegisterTask, "RegisterTask"},
{IPC::MakeHeader(0x000C, 2, 2), &BOSS_U::UnregisterTask, "UnregisterTask"},
{IPC::MakeHeader(0x000D, 2, 2), &BOSS_U::ReconfigureTask, "ReconfigureTask"},
{IPC::MakeHeader(0x000E, 0, 0), &BOSS_U::GetTaskIdList, "GetTaskIdList"},
{IPC::MakeHeader(0x000F, 1, 2), &BOSS_U::GetStepIdList, "GetStepIdList"},
{IPC::MakeHeader(0x0010, 4, 2), &BOSS_U::GetNsDataIdList, "GetNsDataIdList"},
{IPC::MakeHeader(0x0011, 4, 2), &BOSS_U::GetNsDataIdList1, "GetNsDataIdList1"},
{IPC::MakeHeader(0x0012, 4, 2), &BOSS_U::GetNsDataIdList2, "GetNsDataIdList2"},
{IPC::MakeHeader(0x0013, 4, 2), &BOSS_U::GetNsDataIdList3, "GetNsDataIdList3"},
{IPC::MakeHeader(0x0014, 2, 2), &BOSS_U::SendProperty, "SendProperty"},
{IPC::MakeHeader(0x0015, 1, 2), &BOSS_U::SendPropertyHandle, "SendPropertyHandle"},
{IPC::MakeHeader(0x0016, 2, 2), &BOSS_U::ReceiveProperty, "ReceiveProperty"},
{IPC::MakeHeader(0x0017, 2, 2), &BOSS_U::UpdateTaskInterval, "UpdateTaskInterval"},
{IPC::MakeHeader(0x0018, 2, 2), &BOSS_U::UpdateTaskCount, "UpdateTaskCount"},
{IPC::MakeHeader(0x0019, 1, 2), &BOSS_U::GetTaskInterval, "GetTaskInterval"},
{IPC::MakeHeader(0x001A, 1, 2), &BOSS_U::GetTaskCount, "GetTaskCount"},
{IPC::MakeHeader(0x001B, 1, 2), &BOSS_U::GetTaskServiceStatus, "GetTaskServiceStatus"},
{IPC::MakeHeader(0x001C, 1, 2), &BOSS_U::StartTask, "StartTask"},
{IPC::MakeHeader(0x001D, 1, 2), &BOSS_U::StartTaskImmediate, "StartTaskImmediate"},
{IPC::MakeHeader(0x001E, 1, 2), &BOSS_U::CancelTask, "CancelTask"},
{IPC::MakeHeader(0x001F, 0, 0), &BOSS_U::GetTaskFinishHandle, "GetTaskFinishHandle"},
{IPC::MakeHeader(0x0020, 2, 2), &BOSS_U::GetTaskState, "GetTaskState"},
{IPC::MakeHeader(0x0021, 1, 2), &BOSS_U::GetTaskResult, "GetTaskResult"},
{IPC::MakeHeader(0x0022, 1, 2), &BOSS_U::GetTaskCommErrorCode, "GetTaskCommErrorCode"},
{IPC::MakeHeader(0x0023, 3, 2), &BOSS_U::GetTaskStatus, "GetTaskStatus"},
{IPC::MakeHeader(0x0024, 2, 2), &BOSS_U::GetTaskError, "GetTaskError"},
{IPC::MakeHeader(0x0025, 2, 2), &BOSS_U::GetTaskInfo, "GetTaskInfo"},
{IPC::MakeHeader(0x0026, 1, 0), &BOSS_U::DeleteNsData, "DeleteNsData"},
{IPC::MakeHeader(0x0027, 3, 2), &BOSS_U::GetNsDataHeaderInfo, "GetNsDataHeaderInfo"},
{IPC::MakeHeader(0x0028, 4, 2), &BOSS_U::ReadNsData, "ReadNsData"},
{IPC::MakeHeader(0x0029, 2, 0), &BOSS_U::SetNsDataAdditionalInfo, "SetNsDataAdditionalInfo"},
{IPC::MakeHeader(0x002A, 1, 0), &BOSS_U::GetNsDataAdditionalInfo, "GetNsDataAdditionalInfo"},
{IPC::MakeHeader(0x002B, 2, 0), &BOSS_U::SetNsDataNewFlag, "SetNsDataNewFlag"},
{IPC::MakeHeader(0x002C, 1, 0), &BOSS_U::GetNsDataNewFlag, "GetNsDataNewFlag"},
{IPC::MakeHeader(0x002D, 1, 0), &BOSS_U::GetNsDataLastUpdate, "GetNsDataLastUpdate"},
{IPC::MakeHeader(0x002E, 1, 0), &BOSS_U::GetErrorCode, "GetErrorCode"},
{IPC::MakeHeader(0x002F, 5, 0), &BOSS_U::RegisterStorageEntry, "RegisterStorageEntry"},
{IPC::MakeHeader(0x0030, 0, 0), &BOSS_U::GetStorageEntryInfo, "GetStorageEntryInfo"},
{IPC::MakeHeader(0x0031, 4, 0), &BOSS_U::SetStorageOption, "SetStorageOption"},
{IPC::MakeHeader(0x0032, 0, 0), &BOSS_U::GetStorageOption, "GetStorageOption"},
{IPC::MakeHeader(0x0033, 1, 2), &BOSS_U::StartBgImmediate, "StartBgImmediate"},
{IPC::MakeHeader(0x0034, 1, 2), &BOSS_U::GetTaskProperty0, "GetTaskProperty0"},
{IPC::MakeHeader(0x0035, 3, 2), &BOSS_U::RegisterImmediateTask, "RegisterImmediateTask"},
{IPC::MakeHeader(0x0036, 2, 4), &BOSS_U::SetTaskQuery, "SetTaskQuery"},
{IPC::MakeHeader(0x0037, 2, 4), &BOSS_U::GetTaskQuery, "GetTaskQuery"},
{0x0001, &BOSS_U::InitializeSession, "InitializeSession"},
{0x0002, &BOSS_U::SetStorageInfo, "SetStorageInfo"},
{0x0003, &BOSS_U::UnregisterStorage, "UnregisterStorage"},
{0x0004, &BOSS_U::GetStorageInfo, "GetStorageInfo"},
{0x0005, &BOSS_U::RegisterPrivateRootCa, "RegisterPrivateRootCa"},
{0x0006, &BOSS_U::RegisterPrivateClientCert, "RegisterPrivateClientCert"},
{0x0007, &BOSS_U::GetNewArrivalFlag, "GetNewArrivalFlag"},
{0x0008, &BOSS_U::RegisterNewArrivalEvent, "RegisterNewArrivalEvent"},
{0x0009, &BOSS_U::SetOptoutFlag, "SetOptoutFlag"},
{0x000A, &BOSS_U::GetOptoutFlag, "GetOptoutFlag"},
{0x000B, &BOSS_U::RegisterTask, "RegisterTask"},
{0x000C, &BOSS_U::UnregisterTask, "UnregisterTask"},
{0x000D, &BOSS_U::ReconfigureTask, "ReconfigureTask"},
{0x000E, &BOSS_U::GetTaskIdList, "GetTaskIdList"},
{0x000F, &BOSS_U::GetStepIdList, "GetStepIdList"},
{0x0010, &BOSS_U::GetNsDataIdList, "GetNsDataIdList"},
{0x0011, &BOSS_U::GetNsDataIdList1, "GetNsDataIdList1"},
{0x0012, &BOSS_U::GetNsDataIdList2, "GetNsDataIdList2"},
{0x0013, &BOSS_U::GetNsDataIdList3, "GetNsDataIdList3"},
{0x0014, &BOSS_U::SendProperty, "SendProperty"},
{0x0015, &BOSS_U::SendPropertyHandle, "SendPropertyHandle"},
{0x0016, &BOSS_U::ReceiveProperty, "ReceiveProperty"},
{0x0017, &BOSS_U::UpdateTaskInterval, "UpdateTaskInterval"},
{0x0018, &BOSS_U::UpdateTaskCount, "UpdateTaskCount"},
{0x0019, &BOSS_U::GetTaskInterval, "GetTaskInterval"},
{0x001A, &BOSS_U::GetTaskCount, "GetTaskCount"},
{0x001B, &BOSS_U::GetTaskServiceStatus, "GetTaskServiceStatus"},
{0x001C, &BOSS_U::StartTask, "StartTask"},
{0x001D, &BOSS_U::StartTaskImmediate, "StartTaskImmediate"},
{0x001E, &BOSS_U::CancelTask, "CancelTask"},
{0x001F, &BOSS_U::GetTaskFinishHandle, "GetTaskFinishHandle"},
{0x0020, &BOSS_U::GetTaskState, "GetTaskState"},
{0x0021, &BOSS_U::GetTaskResult, "GetTaskResult"},
{0x0022, &BOSS_U::GetTaskCommErrorCode, "GetTaskCommErrorCode"},
{0x0023, &BOSS_U::GetTaskStatus, "GetTaskStatus"},
{0x0024, &BOSS_U::GetTaskError, "GetTaskError"},
{0x0025, &BOSS_U::GetTaskInfo, "GetTaskInfo"},
{0x0026, &BOSS_U::DeleteNsData, "DeleteNsData"},
{0x0027, &BOSS_U::GetNsDataHeaderInfo, "GetNsDataHeaderInfo"},
{0x0028, &BOSS_U::ReadNsData, "ReadNsData"},
{0x0029, &BOSS_U::SetNsDataAdditionalInfo, "SetNsDataAdditionalInfo"},
{0x002A, &BOSS_U::GetNsDataAdditionalInfo, "GetNsDataAdditionalInfo"},
{0x002B, &BOSS_U::SetNsDataNewFlag, "SetNsDataNewFlag"},
{0x002C, &BOSS_U::GetNsDataNewFlag, "GetNsDataNewFlag"},
{0x002D, &BOSS_U::GetNsDataLastUpdate, "GetNsDataLastUpdate"},
{0x002E, &BOSS_U::GetErrorCode, "GetErrorCode"},
{0x002F, &BOSS_U::RegisterStorageEntry, "RegisterStorageEntry"},
{0x0030, &BOSS_U::GetStorageEntryInfo, "GetStorageEntryInfo"},
{0x0031, &BOSS_U::SetStorageOption, "SetStorageOption"},
{0x0032, &BOSS_U::GetStorageOption, "GetStorageOption"},
{0x0033, &BOSS_U::StartBgImmediate, "StartBgImmediate"},
{0x0034, &BOSS_U::GetTaskProperty0, "GetTaskProperty0"},
{0x0035, &BOSS_U::RegisterImmediateTask, "RegisterImmediateTask"},
{0x0036, &BOSS_U::SetTaskQuery, "SetTaskQuery"},
{0x0037, &BOSS_U::GetTaskQuery, "GetTaskQuery"},
// clang-format on
};

View File

@ -258,7 +258,7 @@ std::shared_ptr<Module> Module::Interface::GetModule() const {
}
void Module::Interface::StartCapture(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x01, 1, 0);
IPC::RequestParser rp(ctx);
const PortSet port_select(rp.Pop<u8>());
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
@ -292,7 +292,7 @@ void Module::Interface::StartCapture(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::StopCapture(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x02, 1, 0);
IPC::RequestParser rp(ctx);
const PortSet port_select(rp.Pop<u8>());
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
@ -317,7 +317,7 @@ void Module::Interface::StopCapture(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::IsBusy(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x03, 1, 0);
IPC::RequestParser rp(ctx);
const PortSet port_select(rp.Pop<u8>());
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
@ -340,7 +340,7 @@ void Module::Interface::IsBusy(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::ClearBuffer(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x04, 1, 0);
IPC::RequestParser rp(ctx);
const PortSet port_select(rp.Pop<u8>());
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
@ -350,7 +350,7 @@ void Module::Interface::ClearBuffer(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetVsyncInterruptEvent(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x05, 1, 0);
IPC::RequestParser rp(ctx);
const PortSet port_select(rp.Pop<u8>());
IPC::RequestBuilder rb = rp.MakeBuilder(1, 2);
@ -368,7 +368,7 @@ void Module::Interface::GetVsyncInterruptEvent(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetBufferErrorInterruptEvent(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x06, 1, 0);
IPC::RequestParser rp(ctx);
const PortSet port_select(rp.Pop<u8>());
IPC::RequestBuilder rb = rp.MakeBuilder(1, 2);
@ -386,7 +386,7 @@ void Module::Interface::GetBufferErrorInterruptEvent(Kernel::HLERequestContext&
}
void Module::Interface::SetReceiving(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x07, 4, 2);
IPC::RequestParser rp(ctx);
const VAddr dest = rp.Pop<u32>();
const PortSet port_select(rp.Pop<u8>());
const u32 image_size = rp.Pop<u32>();
@ -422,7 +422,7 @@ void Module::Interface::SetReceiving(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::IsFinishedReceiving(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x08, 1, 0);
IPC::RequestParser rp(ctx);
const PortSet port_select(rp.Pop<u8>());
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
@ -441,7 +441,7 @@ void Module::Interface::IsFinishedReceiving(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::SetTransferLines(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x09, 4, 0);
IPC::RequestParser rp(ctx);
const PortSet port_select(rp.Pop<u8>());
const u16 transfer_lines = rp.Pop<u16>();
const u16 width = rp.Pop<u16>();
@ -463,7 +463,7 @@ void Module::Interface::SetTransferLines(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetMaxLines(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0A, 2, 0);
IPC::RequestParser rp(ctx);
const u16 width = rp.Pop<u16>();
const u16 height = rp.Pop<u16>();
@ -496,7 +496,7 @@ void Module::Interface::GetMaxLines(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::SetTransferBytes(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0B, 4, 0);
IPC::RequestParser rp(ctx);
const PortSet port_select(rp.Pop<u8>());
const u16 transfer_bytes = rp.Pop<u16>();
const u16 width = rp.Pop<u16>();
@ -518,7 +518,7 @@ void Module::Interface::SetTransferBytes(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetTransferBytes(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0C, 1, 0);
IPC::RequestParser rp(ctx);
const PortSet port_select(rp.Pop<u8>());
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
@ -536,7 +536,7 @@ void Module::Interface::GetTransferBytes(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetMaxBytes(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0D, 2, 0);
IPC::RequestParser rp(ctx);
const u16 width = rp.Pop<u16>();
const u16 height = rp.Pop<u16>();
@ -563,7 +563,7 @@ void Module::Interface::GetMaxBytes(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::SetTrimming(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0E, 2, 0);
IPC::RequestParser rp(ctx);
const PortSet port_select(rp.Pop<u8>());
const bool trim = rp.Pop<bool>();
@ -582,7 +582,7 @@ void Module::Interface::SetTrimming(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::IsTrimming(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0F, 1, 0);
IPC::RequestParser rp(ctx);
const PortSet port_select(rp.Pop<u8>());
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
@ -600,7 +600,7 @@ void Module::Interface::IsTrimming(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::SetTrimmingParams(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x10, 5, 0);
IPC::RequestParser rp(ctx);
const PortSet port_select(rp.Pop<u8>());
const u16 x0 = rp.Pop<u16>();
const u16 y0 = rp.Pop<u16>();
@ -626,7 +626,7 @@ void Module::Interface::SetTrimmingParams(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetTrimmingParams(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x11, 1, 0);
IPC::RequestParser rp(ctx);
const PortSet port_select(rp.Pop<u8>());
IPC::RequestBuilder rb = rp.MakeBuilder(5, 0);
@ -647,7 +647,7 @@ void Module::Interface::GetTrimmingParams(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::SetTrimmingParamsCenter(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x12, 5, 0);
IPC::RequestParser rp(ctx);
const PortSet port_select(rp.Pop<u8>());
const u16 trim_w = rp.Pop<u16>();
const u16 trim_h = rp.Pop<u16>();
@ -673,7 +673,7 @@ void Module::Interface::SetTrimmingParamsCenter(Kernel::HLERequestContext& ctx)
}
void Module::Interface::Activate(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x13, 1, 0);
IPC::RequestParser rp(ctx);
const CameraSet camera_select(rp.Pop<u8>());
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
@ -713,7 +713,7 @@ void Module::Interface::Activate(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::SwitchContext(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x14, 2, 0);
IPC::RequestParser rp(ctx);
const CameraSet camera_select(rp.Pop<u8>());
const ContextSet context_select(rp.Pop<u8>());
@ -740,7 +740,7 @@ void Module::Interface::SwitchContext(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::FlipImage(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1D, 3, 0);
IPC::RequestParser rp(ctx);
const CameraSet camera_select(rp.Pop<u8>());
const Flip flip = static_cast<Flip>(rp.Pop<u8>());
const ContextSet context_select(rp.Pop<u8>());
@ -767,7 +767,7 @@ void Module::Interface::FlipImage(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::SetDetailSize(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1E, 8, 0);
IPC::RequestParser rp(ctx);
const CameraSet camera_select(rp.Pop<u8>());
Resolution resolution;
resolution.width = rp.Pop<u16>();
@ -803,7 +803,7 @@ void Module::Interface::SetDetailSize(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::SetSize(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1F, 3, 0);
IPC::RequestParser rp(ctx);
const CameraSet camera_select(rp.Pop<u8>());
const u8 size = rp.Pop<u8>();
const ContextSet context_select(rp.Pop<u8>());
@ -830,7 +830,7 @@ void Module::Interface::SetSize(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::SetFrameRate(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x20, 2, 0);
IPC::RequestParser rp(ctx);
const CameraSet camera_select(rp.Pop<u8>());
const FrameRate frame_rate = static_cast<FrameRate>(rp.Pop<u8>());
@ -851,7 +851,7 @@ void Module::Interface::SetFrameRate(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::SetEffect(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x22, 3, 0);
IPC::RequestParser rp(ctx);
const CameraSet camera_select(rp.Pop<u8>());
const Effect effect = static_cast<Effect>(rp.Pop<u8>());
const ContextSet context_select(rp.Pop<u8>());
@ -878,7 +878,7 @@ void Module::Interface::SetEffect(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::SetOutputFormat(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x25, 3, 0);
IPC::RequestParser rp(ctx);
const CameraSet camera_select(rp.Pop<u8>());
const OutputFormat format = static_cast<OutputFormat>(rp.Pop<u8>());
const ContextSet context_select(rp.Pop<u8>());
@ -905,7 +905,7 @@ void Module::Interface::SetOutputFormat(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::SynchronizeVsyncTiming(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x29, 2, 0);
IPC::RequestParser rp(ctx);
const u8 camera_select1 = rp.Pop<u8>();
const u8 camera_select2 = rp.Pop<u8>();
@ -917,7 +917,7 @@ void Module::Interface::SynchronizeVsyncTiming(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetLatestVsyncTiming(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x2A, 2, 0);
IPC::RequestParser rp(ctx);
const PortSet port_select(rp.Pop<u8>());
const u32 count = rp.Pop<u32>();
@ -945,7 +945,8 @@ void Module::Interface::GetLatestVsyncTiming(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetStereoCameraCalibrationData(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb = IPC::RequestParser(ctx, 0x2B, 0, 0).MakeBuilder(17, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(17, 0);
// Default values taken from yuriks' 3DS. Valid data is required here or games using the
// calibration get stuck in an infinite CPU loop.
@ -971,7 +972,7 @@ void Module::Interface::GetStereoCameraCalibrationData(Kernel::HLERequestContext
}
void Module::Interface::SetPackageParameterWithoutContext(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x33, 11, 0);
IPC::RequestParser rp(ctx);
PackageParameterWithoutContext package;
rp.PopRaw(package);
@ -1015,7 +1016,7 @@ Resolution PackageParameterWithContext::GetResolution() const {
}
void Module::Interface::SetPackageParameterWithContext(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x34, 5, 0);
IPC::RequestParser rp(ctx);
PackageParameterWithContext package;
rp.PopRaw(package);
@ -1028,7 +1029,7 @@ void Module::Interface::SetPackageParameterWithContext(Kernel::HLERequestContext
}
void Module::Interface::SetPackageParameterWithContextDetail(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x35, 7, 0);
IPC::RequestParser rp(ctx);
PackageParameterWithContextDetail package;
rp.PopRaw(package);
@ -1041,7 +1042,7 @@ void Module::Interface::SetPackageParameterWithContextDetail(Kernel::HLERequestC
}
void Module::Interface::GetSuitableY2rStandardCoefficient(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x36, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
rb.Push<u32>(0);
@ -1050,7 +1051,7 @@ void Module::Interface::GetSuitableY2rStandardCoefficient(Kernel::HLERequestCont
}
void Module::Interface::PlayShutterSound(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x38, 1, 0);
IPC::RequestParser rp(ctx);
u8 sound_id = rp.Pop<u8>();
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
@ -1060,7 +1061,7 @@ void Module::Interface::PlayShutterSound(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::DriverInitialize(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x39, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
for (int camera_id = 0; camera_id < NumCameras; ++camera_id) {
@ -1090,7 +1091,7 @@ void Module::Interface::DriverInitialize(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::DriverFinalize(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x3A, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
cam->CancelReceiving(0);

View File

@ -11,68 +11,68 @@ namespace Service::CAM {
CAM_C::CAM_C(std::shared_ptr<Module> cam) : Module::Interface(std::move(cam), "cam:c", 1) {
static const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0001, 1, 0), &CAM_C::StartCapture, "StartCapture"},
{IPC::MakeHeader(0x0002, 1, 0), &CAM_C::StopCapture, "StopCapture"},
{IPC::MakeHeader(0x0003, 1, 0), &CAM_C::IsBusy, "IsBusy"},
{IPC::MakeHeader(0x0004, 1, 0), &CAM_C::ClearBuffer, "ClearBuffer"},
{IPC::MakeHeader(0x0005, 1, 0), &CAM_C::GetVsyncInterruptEvent, "GetVsyncInterruptEvent"},
{IPC::MakeHeader(0x0006, 1, 0), &CAM_C::GetBufferErrorInterruptEvent, "GetBufferErrorInterruptEvent"},
{IPC::MakeHeader(0x0007, 4, 2), &CAM_C::SetReceiving, "SetReceiving"},
{IPC::MakeHeader(0x0008, 1, 0), &CAM_C::IsFinishedReceiving, "IsFinishedReceiving"},
{IPC::MakeHeader(0x0009, 4, 0), &CAM_C::SetTransferLines, "SetTransferLines"},
{IPC::MakeHeader(0x000A, 2, 0), &CAM_C::GetMaxLines, "GetMaxLines"},
{IPC::MakeHeader(0x000B, 4, 0), &CAM_C::SetTransferBytes, "SetTransferBytes"},
{IPC::MakeHeader(0x000C, 1, 0), &CAM_C::GetTransferBytes, "GetTransferBytes"},
{IPC::MakeHeader(0x000D, 2, 0), &CAM_C::GetMaxBytes, "GetMaxBytes"},
{IPC::MakeHeader(0x000E, 2, 0), &CAM_C::SetTrimming, "SetTrimming"},
{IPC::MakeHeader(0x000F, 1, 0), &CAM_C::IsTrimming, "IsTrimming"},
{IPC::MakeHeader(0x0010, 5, 0), &CAM_C::SetTrimmingParams, "SetTrimmingParams"},
{IPC::MakeHeader(0x0011, 1, 0), &CAM_C::GetTrimmingParams, "GetTrimmingParams"},
{IPC::MakeHeader(0x0012, 5, 0), &CAM_C::SetTrimmingParamsCenter, "SetTrimmingParamsCenter"},
{IPC::MakeHeader(0x0013, 1, 0), &CAM_C::Activate, "Activate"},
{IPC::MakeHeader(0x0014, 2, 0), &CAM_C::SwitchContext, "SwitchContext"},
{IPC::MakeHeader(0x0015, 2, 0), nullptr, "SetExposure"},
{IPC::MakeHeader(0x0016, 2, 0), nullptr, "SetWhiteBalance"},
{IPC::MakeHeader(0x0017, 2, 0), nullptr, "SetWhiteBalanceWithoutBaseUp"},
{IPC::MakeHeader(0x0018, 2, 0), nullptr, "SetSharpness"},
{IPC::MakeHeader(0x0019, 2, 0), nullptr, "SetAutoExposure"},
{IPC::MakeHeader(0x001A, 1, 0), nullptr, "IsAutoExposure"},
{IPC::MakeHeader(0x001B, 2, 0), nullptr, "SetAutoWhiteBalance"},
{IPC::MakeHeader(0x001C, 1, 0), nullptr, "IsAutoWhiteBalance"},
{IPC::MakeHeader(0x001D, 3, 0), &CAM_C::FlipImage, "FlipImage"},
{IPC::MakeHeader(0x001E, 8, 0), &CAM_C::SetDetailSize, "SetDetailSize"},
{IPC::MakeHeader(0x001F, 3, 0), &CAM_C::SetSize, "SetSize"},
{IPC::MakeHeader(0x0020, 2, 0), &CAM_C::SetFrameRate, "SetFrameRate"},
{IPC::MakeHeader(0x0021, 2, 0), nullptr, "SetPhotoMode"},
{IPC::MakeHeader(0x0022, 3, 0), &CAM_C::SetEffect, "SetEffect"},
{IPC::MakeHeader(0x0023, 2, 0), nullptr, "SetContrast"},
{IPC::MakeHeader(0x0024, 2, 0), nullptr, "SetLensCorrection"},
{IPC::MakeHeader(0x0025, 3, 0), &CAM_C::SetOutputFormat, "SetOutputFormat"},
{IPC::MakeHeader(0x0026, 5, 0), nullptr, "SetAutoExposureWindow"},
{IPC::MakeHeader(0x0027, 5, 0), nullptr, "SetAutoWhiteBalanceWindow"},
{IPC::MakeHeader(0x0028, 2, 0), nullptr, "SetNoiseFilter"},
{IPC::MakeHeader(0x0029, 2, 0), &CAM_C::SynchronizeVsyncTiming, "SynchronizeVsyncTiming"},
{IPC::MakeHeader(0x002A, 2, 0), &CAM_C::GetLatestVsyncTiming, "GetLatestVsyncTiming"},
{IPC::MakeHeader(0x002B, 0, 0), &CAM_C::GetStereoCameraCalibrationData, "GetStereoCameraCalibrationData"},
{IPC::MakeHeader(0x002C, 16, 0), nullptr, "SetStereoCameraCalibrationData"},
{IPC::MakeHeader(0x002D, 3, 0), nullptr, "WriteRegisterI2c"},
{IPC::MakeHeader(0x002E, 3, 0), nullptr, "WriteMcuVariableI2c"},
{IPC::MakeHeader(0x002F, 2, 0), nullptr, "ReadRegisterI2cExclusive"},
{IPC::MakeHeader(0x0030, 2, 0), nullptr, "ReadMcuVariableI2cExclusive"},
{IPC::MakeHeader(0x0031, 6, 0), nullptr, "SetImageQualityCalibrationData"},
{IPC::MakeHeader(0x0032, 0, 0), nullptr, "GetImageQualityCalibrationData"},
{IPC::MakeHeader(0x0033, 11, 0), &CAM_C::SetPackageParameterWithoutContext, "SetPackageParameterWithoutContext"},
{IPC::MakeHeader(0x0034, 5, 0), &CAM_C::SetPackageParameterWithContext, "SetPackageParameterWithContext"},
{IPC::MakeHeader(0x0035, 7, 0), &CAM_C::SetPackageParameterWithContextDetail, "SetPackageParameterWithContextDetail"},
{IPC::MakeHeader(0x0036, 0, 0), &CAM_C::GetSuitableY2rStandardCoefficient, "GetSuitableY2rStandardCoefficient"},
{IPC::MakeHeader(0x0037, 8, 2), nullptr, "PlayShutterSoundWithWave"},
{IPC::MakeHeader(0x0038, 1, 0), &CAM_C::PlayShutterSound, "PlayShutterSound"},
{IPC::MakeHeader(0x0039, 0, 0), &CAM_C::DriverInitialize, "DriverInitialize"},
{IPC::MakeHeader(0x003A, 0, 0), &CAM_C::DriverFinalize, "DriverFinalize"},
{IPC::MakeHeader(0x003B, 0, 0), nullptr, "GetActivatedCamera"},
{IPC::MakeHeader(0x003C, 0, 0), nullptr, "GetSleepCamera"},
{IPC::MakeHeader(0x003D, 1, 0), nullptr, "SetSleepCamera"},
{IPC::MakeHeader(0x003E, 1, 0), nullptr, "SetBrightnessSynchronization"},
{0x0001, &CAM_C::StartCapture, "StartCapture"},
{0x0002, &CAM_C::StopCapture, "StopCapture"},
{0x0003, &CAM_C::IsBusy, "IsBusy"},
{0x0004, &CAM_C::ClearBuffer, "ClearBuffer"},
{0x0005, &CAM_C::GetVsyncInterruptEvent, "GetVsyncInterruptEvent"},
{0x0006, &CAM_C::GetBufferErrorInterruptEvent, "GetBufferErrorInterruptEvent"},
{0x0007, &CAM_C::SetReceiving, "SetReceiving"},
{0x0008, &CAM_C::IsFinishedReceiving, "IsFinishedReceiving"},
{0x0009, &CAM_C::SetTransferLines, "SetTransferLines"},
{0x000A, &CAM_C::GetMaxLines, "GetMaxLines"},
{0x000B, &CAM_C::SetTransferBytes, "SetTransferBytes"},
{0x000C, &CAM_C::GetTransferBytes, "GetTransferBytes"},
{0x000D, &CAM_C::GetMaxBytes, "GetMaxBytes"},
{0x000E, &CAM_C::SetTrimming, "SetTrimming"},
{0x000F, &CAM_C::IsTrimming, "IsTrimming"},
{0x0010, &CAM_C::SetTrimmingParams, "SetTrimmingParams"},
{0x0011, &CAM_C::GetTrimmingParams, "GetTrimmingParams"},
{0x0012, &CAM_C::SetTrimmingParamsCenter, "SetTrimmingParamsCenter"},
{0x0013, &CAM_C::Activate, "Activate"},
{0x0014, &CAM_C::SwitchContext, "SwitchContext"},
{0x0015, nullptr, "SetExposure"},
{0x0016, nullptr, "SetWhiteBalance"},
{0x0017, nullptr, "SetWhiteBalanceWithoutBaseUp"},
{0x0018, nullptr, "SetSharpness"},
{0x0019, nullptr, "SetAutoExposure"},
{0x001A, nullptr, "IsAutoExposure"},
{0x001B, nullptr, "SetAutoWhiteBalance"},
{0x001C, nullptr, "IsAutoWhiteBalance"},
{0x001D, &CAM_C::FlipImage, "FlipImage"},
{0x001E, &CAM_C::SetDetailSize, "SetDetailSize"},
{0x001F, &CAM_C::SetSize, "SetSize"},
{0x0020, &CAM_C::SetFrameRate, "SetFrameRate"},
{0x0021, nullptr, "SetPhotoMode"},
{0x0022, &CAM_C::SetEffect, "SetEffect"},
{0x0023, nullptr, "SetContrast"},
{0x0024, nullptr, "SetLensCorrection"},
{0x0025, &CAM_C::SetOutputFormat, "SetOutputFormat"},
{0x0026, nullptr, "SetAutoExposureWindow"},
{0x0027, nullptr, "SetAutoWhiteBalanceWindow"},
{0x0028, nullptr, "SetNoiseFilter"},
{0x0029, &CAM_C::SynchronizeVsyncTiming, "SynchronizeVsyncTiming"},
{0x002A, &CAM_C::GetLatestVsyncTiming, "GetLatestVsyncTiming"},
{0x002B, &CAM_C::GetStereoCameraCalibrationData, "GetStereoCameraCalibrationData"},
{0x002C, nullptr, "SetStereoCameraCalibrationData"},
{0x002D, nullptr, "WriteRegisterI2c"},
{0x002E, nullptr, "WriteMcuVariableI2c"},
{0x002F, nullptr, "ReadRegisterI2cExclusive"},
{0x0030, nullptr, "ReadMcuVariableI2cExclusive"},
{0x0031, nullptr, "SetImageQualityCalibrationData"},
{0x0032, nullptr, "GetImageQualityCalibrationData"},
{0x0033, &CAM_C::SetPackageParameterWithoutContext, "SetPackageParameterWithoutContext"},
{0x0034, &CAM_C::SetPackageParameterWithContext, "SetPackageParameterWithContext"},
{0x0035, &CAM_C::SetPackageParameterWithContextDetail, "SetPackageParameterWithContextDetail"},
{0x0036, &CAM_C::GetSuitableY2rStandardCoefficient, "GetSuitableY2rStandardCoefficient"},
{0x0037, nullptr, "PlayShutterSoundWithWave"},
{0x0038, &CAM_C::PlayShutterSound, "PlayShutterSound"},
{0x0039, &CAM_C::DriverInitialize, "DriverInitialize"},
{0x003A, &CAM_C::DriverFinalize, "DriverFinalize"},
{0x003B, nullptr, "GetActivatedCamera"},
{0x003C, nullptr, "GetSleepCamera"},
{0x003D, nullptr, "SetSleepCamera"},
{0x003E, nullptr, "SetBrightnessSynchronization"},
// clang-format on
};
RegisterHandlers(functions);

View File

@ -11,68 +11,68 @@ namespace Service::CAM {
CAM_S::CAM_S(std::shared_ptr<Module> cam) : Module::Interface(std::move(cam), "cam:s", 1) {
static const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0001, 1, 0), &CAM_S::StartCapture, "StartCapture"},
{IPC::MakeHeader(0x0002, 1, 0), &CAM_S::StopCapture, "StopCapture"},
{IPC::MakeHeader(0x0003, 1, 0), &CAM_S::IsBusy, "IsBusy"},
{IPC::MakeHeader(0x0004, 1, 0), &CAM_S::ClearBuffer, "ClearBuffer"},
{IPC::MakeHeader(0x0005, 1, 0), &CAM_S::GetVsyncInterruptEvent, "GetVsyncInterruptEvent"},
{IPC::MakeHeader(0x0006, 1, 0), &CAM_S::GetBufferErrorInterruptEvent, "GetBufferErrorInterruptEvent"},
{IPC::MakeHeader(0x0007, 4, 2), &CAM_S::SetReceiving, "SetReceiving"},
{IPC::MakeHeader(0x0008, 1, 0), &CAM_S::IsFinishedReceiving, "IsFinishedReceiving"},
{IPC::MakeHeader(0x0009, 4, 0), &CAM_S::SetTransferLines, "SetTransferLines"},
{IPC::MakeHeader(0x000A, 2, 0), &CAM_S::GetMaxLines, "GetMaxLines"},
{IPC::MakeHeader(0x000B, 4, 0), &CAM_S::SetTransferBytes, "SetTransferBytes"},
{IPC::MakeHeader(0x000C, 1, 0), &CAM_S::GetTransferBytes, "GetTransferBytes"},
{IPC::MakeHeader(0x000D, 2, 0), &CAM_S::GetMaxBytes, "GetMaxBytes"},
{IPC::MakeHeader(0x000E, 2, 0), &CAM_S::SetTrimming, "SetTrimming"},
{IPC::MakeHeader(0x000F, 1, 0), &CAM_S::IsTrimming, "IsTrimming"},
{IPC::MakeHeader(0x0010, 5, 0), &CAM_S::SetTrimmingParams, "SetTrimmingParams"},
{IPC::MakeHeader(0x0011, 1, 0), &CAM_S::GetTrimmingParams, "GetTrimmingParams"},
{IPC::MakeHeader(0x0012, 5, 0), &CAM_S::SetTrimmingParamsCenter, "SetTrimmingParamsCenter"},
{IPC::MakeHeader(0x0013, 1, 0), &CAM_S::Activate, "Activate"},
{IPC::MakeHeader(0x0014, 2, 0), &CAM_S::SwitchContext, "SwitchContext"},
{IPC::MakeHeader(0x0015, 2, 0), nullptr, "SetExposure"},
{IPC::MakeHeader(0x0016, 2, 0), nullptr, "SetWhiteBalance"},
{IPC::MakeHeader(0x0017, 2, 0), nullptr, "SetWhiteBalanceWithoutBaseUp"},
{IPC::MakeHeader(0x0018, 2, 0), nullptr, "SetSharpness"},
{IPC::MakeHeader(0x0019, 2, 0), nullptr, "SetAutoExposure"},
{IPC::MakeHeader(0x001A, 1, 0), nullptr, "IsAutoExposure"},
{IPC::MakeHeader(0x001B, 2, 0), nullptr, "SetAutoWhiteBalance"},
{IPC::MakeHeader(0x001C, 1, 0), nullptr, "IsAutoWhiteBalance"},
{IPC::MakeHeader(0x001D, 3, 0), &CAM_S::FlipImage, "FlipImage"},
{IPC::MakeHeader(0x001E, 8, 0), &CAM_S::SetDetailSize, "SetDetailSize"},
{IPC::MakeHeader(0x001F, 3, 0), &CAM_S::SetSize, "SetSize"},
{IPC::MakeHeader(0x0020, 2, 0), &CAM_S::SetFrameRate, "SetFrameRate"},
{IPC::MakeHeader(0x0021, 2, 0), nullptr, "SetPhotoMode"},
{IPC::MakeHeader(0x0022, 3, 0), &CAM_S::SetEffect, "SetEffect"},
{IPC::MakeHeader(0x0023, 2, 0), nullptr, "SetContrast"},
{IPC::MakeHeader(0x0024, 2, 0), nullptr, "SetLensCorrection"},
{IPC::MakeHeader(0x0025, 3, 0), &CAM_S::SetOutputFormat, "SetOutputFormat"},
{IPC::MakeHeader(0x0026, 5, 0), nullptr, "SetAutoExposureWindow"},
{IPC::MakeHeader(0x0027, 5, 0), nullptr, "SetAutoWhiteBalanceWindow"},
{IPC::MakeHeader(0x0028, 2, 0), nullptr, "SetNoiseFilter"},
{IPC::MakeHeader(0x0029, 2, 0), &CAM_S::SynchronizeVsyncTiming, "SynchronizeVsyncTiming"},
{IPC::MakeHeader(0x002A, 2, 0), &CAM_S::GetLatestVsyncTiming, "GetLatestVsyncTiming"},
{IPC::MakeHeader(0x002B, 0, 0), &CAM_S::GetStereoCameraCalibrationData, "GetStereoCameraCalibrationData"},
{IPC::MakeHeader(0x002C, 16, 0), nullptr, "SetStereoCameraCalibrationData"},
{IPC::MakeHeader(0x002D, 3, 0), nullptr, "WriteRegisterI2c"},
{IPC::MakeHeader(0x002E, 3, 0), nullptr, "WriteMcuVariableI2c"},
{IPC::MakeHeader(0x002F, 2, 0), nullptr, "ReadRegisterI2cExclusive"},
{IPC::MakeHeader(0x0030, 2, 0), nullptr, "ReadMcuVariableI2cExclusive"},
{IPC::MakeHeader(0x0031, 6, 0), nullptr, "SetImageQualityCalibrationData"},
{IPC::MakeHeader(0x0032, 0, 0), nullptr, "GetImageQualityCalibrationData"},
{IPC::MakeHeader(0x0033, 11, 0), &CAM_S::SetPackageParameterWithoutContext, "SetPackageParameterWithoutContext"},
{IPC::MakeHeader(0x0034, 5, 0), &CAM_S::SetPackageParameterWithContext, "SetPackageParameterWithContext"},
{IPC::MakeHeader(0x0035, 7, 0), &CAM_S::SetPackageParameterWithContextDetail, "SetPackageParameterWithContextDetail"},
{IPC::MakeHeader(0x0036, 0, 0), &CAM_S::GetSuitableY2rStandardCoefficient, "GetSuitableY2rStandardCoefficient"},
{IPC::MakeHeader(0x0037, 8, 2), nullptr, "PlayShutterSoundWithWave"},
{IPC::MakeHeader(0x0038, 1, 0), &CAM_S::PlayShutterSound, "PlayShutterSound"},
{IPC::MakeHeader(0x0039, 0, 0), &CAM_S::DriverInitialize, "DriverInitialize"},
{IPC::MakeHeader(0x003A, 0, 0), &CAM_S::DriverFinalize, "DriverFinalize"},
{IPC::MakeHeader(0x003B, 0, 0), nullptr, "GetActivatedCamera"},
{IPC::MakeHeader(0x003C, 0, 0), nullptr, "GetSleepCamera"},
{IPC::MakeHeader(0x003D, 1, 0), nullptr, "SetSleepCamera"},
{IPC::MakeHeader(0x003E, 1, 0), nullptr, "SetBrightnessSynchronization"},
{0x0001, &CAM_S::StartCapture, "StartCapture"},
{0x0002, &CAM_S::StopCapture, "StopCapture"},
{0x0003, &CAM_S::IsBusy, "IsBusy"},
{0x0004, &CAM_S::ClearBuffer, "ClearBuffer"},
{0x0005, &CAM_S::GetVsyncInterruptEvent, "GetVsyncInterruptEvent"},
{0x0006, &CAM_S::GetBufferErrorInterruptEvent, "GetBufferErrorInterruptEvent"},
{0x0007, &CAM_S::SetReceiving, "SetReceiving"},
{0x0008, &CAM_S::IsFinishedReceiving, "IsFinishedReceiving"},
{0x0009, &CAM_S::SetTransferLines, "SetTransferLines"},
{0x000A, &CAM_S::GetMaxLines, "GetMaxLines"},
{0x000B, &CAM_S::SetTransferBytes, "SetTransferBytes"},
{0x000C, &CAM_S::GetTransferBytes, "GetTransferBytes"},
{0x000D, &CAM_S::GetMaxBytes, "GetMaxBytes"},
{0x000E, &CAM_S::SetTrimming, "SetTrimming"},
{0x000F, &CAM_S::IsTrimming, "IsTrimming"},
{0x0010, &CAM_S::SetTrimmingParams, "SetTrimmingParams"},
{0x0011, &CAM_S::GetTrimmingParams, "GetTrimmingParams"},
{0x0012, &CAM_S::SetTrimmingParamsCenter, "SetTrimmingParamsCenter"},
{0x0013, &CAM_S::Activate, "Activate"},
{0x0014, &CAM_S::SwitchContext, "SwitchContext"},
{0x0015, nullptr, "SetExposure"},
{0x0016, nullptr, "SetWhiteBalance"},
{0x0017, nullptr, "SetWhiteBalanceWithoutBaseUp"},
{0x0018, nullptr, "SetSharpness"},
{0x0019, nullptr, "SetAutoExposure"},
{0x001A, nullptr, "IsAutoExposure"},
{0x001B, nullptr, "SetAutoWhiteBalance"},
{0x001C, nullptr, "IsAutoWhiteBalance"},
{0x001D, &CAM_S::FlipImage, "FlipImage"},
{0x001E, &CAM_S::SetDetailSize, "SetDetailSize"},
{0x001F, &CAM_S::SetSize, "SetSize"},
{0x0020, &CAM_S::SetFrameRate, "SetFrameRate"},
{0x0021, nullptr, "SetPhotoMode"},
{0x0022, &CAM_S::SetEffect, "SetEffect"},
{0x0023, nullptr, "SetContrast"},
{0x0024, nullptr, "SetLensCorrection"},
{0x0025, &CAM_S::SetOutputFormat, "SetOutputFormat"},
{0x0026, nullptr, "SetAutoExposureWindow"},
{0x0027, nullptr, "SetAutoWhiteBalanceWindow"},
{0x0028, nullptr, "SetNoiseFilter"},
{0x0029, &CAM_S::SynchronizeVsyncTiming, "SynchronizeVsyncTiming"},
{0x002A, &CAM_S::GetLatestVsyncTiming, "GetLatestVsyncTiming"},
{0x002B, &CAM_S::GetStereoCameraCalibrationData, "GetStereoCameraCalibrationData"},
{0x002C, nullptr, "SetStereoCameraCalibrationData"},
{0x002D, nullptr, "WriteRegisterI2c"},
{0x002E, nullptr, "WriteMcuVariableI2c"},
{0x002F, nullptr, "ReadRegisterI2cExclusive"},
{0x0030, nullptr, "ReadMcuVariableI2cExclusive"},
{0x0031, nullptr, "SetImageQualityCalibrationData"},
{0x0032, nullptr, "GetImageQualityCalibrationData"},
{0x0033, &CAM_S::SetPackageParameterWithoutContext, "SetPackageParameterWithoutContext"},
{0x0034, &CAM_S::SetPackageParameterWithContext, "SetPackageParameterWithContext"},
{0x0035, &CAM_S::SetPackageParameterWithContextDetail, "SetPackageParameterWithContextDetail"},
{0x0036, &CAM_S::GetSuitableY2rStandardCoefficient, "GetSuitableY2rStandardCoefficient"},
{0x0037, nullptr, "PlayShutterSoundWithWave"},
{0x0038, &CAM_S::PlayShutterSound, "PlayShutterSound"},
{0x0039, &CAM_S::DriverInitialize, "DriverInitialize"},
{0x003A, &CAM_S::DriverFinalize, "DriverFinalize"},
{0x003B, nullptr, "GetActivatedCamera"},
{0x003C, nullptr, "GetSleepCamera"},
{0x003D, nullptr, "SetSleepCamera"},
{0x003E, nullptr, "SetBrightnessSynchronization"},
// clang-format on
};
RegisterHandlers(functions);

View File

@ -11,68 +11,68 @@ namespace Service::CAM {
CAM_U::CAM_U(std::shared_ptr<Module> cam) : Module::Interface(std::move(cam), "cam:u", 1) {
static const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0001, 1, 0), &CAM_U::StartCapture, "StartCapture"},
{IPC::MakeHeader(0x0002, 1, 0), &CAM_U::StopCapture, "StopCapture"},
{IPC::MakeHeader(0x0003, 1, 0), &CAM_U::IsBusy, "IsBusy"},
{IPC::MakeHeader(0x0004, 1, 0), &CAM_U::ClearBuffer, "ClearBuffer"},
{IPC::MakeHeader(0x0005, 1, 0), &CAM_U::GetVsyncInterruptEvent, "GetVsyncInterruptEvent"},
{IPC::MakeHeader(0x0006, 1, 0), &CAM_U::GetBufferErrorInterruptEvent, "GetBufferErrorInterruptEvent"},
{IPC::MakeHeader(0x0007, 4, 2), &CAM_U::SetReceiving, "SetReceiving"},
{IPC::MakeHeader(0x0008, 1, 0), &CAM_U::IsFinishedReceiving, "IsFinishedReceiving"},
{IPC::MakeHeader(0x0009, 4, 0), &CAM_U::SetTransferLines, "SetTransferLines"},
{IPC::MakeHeader(0x000A, 2, 0), &CAM_U::GetMaxLines, "GetMaxLines"},
{IPC::MakeHeader(0x000B, 4, 0), &CAM_U::SetTransferBytes, "SetTransferBytes"},
{IPC::MakeHeader(0x000C, 1, 0), &CAM_U::GetTransferBytes, "GetTransferBytes"},
{IPC::MakeHeader(0x000D, 2, 0), &CAM_U::GetMaxBytes, "GetMaxBytes"},
{IPC::MakeHeader(0x000E, 2, 0), &CAM_U::SetTrimming, "SetTrimming"},
{IPC::MakeHeader(0x000F, 1, 0), &CAM_U::IsTrimming, "IsTrimming"},
{IPC::MakeHeader(0x0010, 5, 0), &CAM_U::SetTrimmingParams, "SetTrimmingParams"},
{IPC::MakeHeader(0x0011, 1, 0), &CAM_U::GetTrimmingParams, "GetTrimmingParams"},
{IPC::MakeHeader(0x0012, 5, 0), &CAM_U::SetTrimmingParamsCenter, "SetTrimmingParamsCenter"},
{IPC::MakeHeader(0x0013, 1, 0), &CAM_U::Activate, "Activate"},
{IPC::MakeHeader(0x0014, 2, 0), &CAM_U::SwitchContext, "SwitchContext"},
{IPC::MakeHeader(0x0015, 2, 0), nullptr, "SetExposure"},
{IPC::MakeHeader(0x0016, 2, 0), nullptr, "SetWhiteBalance"},
{IPC::MakeHeader(0x0017, 2, 0), nullptr, "SetWhiteBalanceWithoutBaseUp"},
{IPC::MakeHeader(0x0018, 2, 0), nullptr, "SetSharpness"},
{IPC::MakeHeader(0x0019, 2, 0), nullptr, "SetAutoExposure"},
{IPC::MakeHeader(0x001A, 1, 0), nullptr, "IsAutoExposure"},
{IPC::MakeHeader(0x001B, 2, 0), nullptr, "SetAutoWhiteBalance"},
{IPC::MakeHeader(0x001C, 1, 0), nullptr, "IsAutoWhiteBalance"},
{IPC::MakeHeader(0x001D, 3, 0), &CAM_U::FlipImage, "FlipImage"},
{IPC::MakeHeader(0x001E, 8, 0), &CAM_U::SetDetailSize, "SetDetailSize"},
{IPC::MakeHeader(0x001F, 3, 0), &CAM_U::SetSize, "SetSize"},
{IPC::MakeHeader(0x0020, 2, 0), &CAM_U::SetFrameRate, "SetFrameRate"},
{IPC::MakeHeader(0x0021, 2, 0), nullptr, "SetPhotoMode"},
{IPC::MakeHeader(0x0022, 3, 0), &CAM_U::SetEffect, "SetEffect"},
{IPC::MakeHeader(0x0023, 2, 0), nullptr, "SetContrast"},
{IPC::MakeHeader(0x0024, 2, 0), nullptr, "SetLensCorrection"},
{IPC::MakeHeader(0x0025, 3, 0), &CAM_U::SetOutputFormat, "SetOutputFormat"},
{IPC::MakeHeader(0x0026, 5, 0), nullptr, "SetAutoExposureWindow"},
{IPC::MakeHeader(0x0027, 5, 0), nullptr, "SetAutoWhiteBalanceWindow"},
{IPC::MakeHeader(0x0028, 2, 0), nullptr, "SetNoiseFilter"},
{IPC::MakeHeader(0x0029, 2, 0), &CAM_U::SynchronizeVsyncTiming, "SynchronizeVsyncTiming"},
{IPC::MakeHeader(0x002A, 2, 0), &CAM_U::GetLatestVsyncTiming, "GetLatestVsyncTiming"},
{IPC::MakeHeader(0x002B, 0, 0), &CAM_U::GetStereoCameraCalibrationData, "GetStereoCameraCalibrationData"},
{IPC::MakeHeader(0x002C, 16, 0), nullptr, "SetStereoCameraCalibrationData"},
{IPC::MakeHeader(0x002D, 3, 0), nullptr, "WriteRegisterI2c"},
{IPC::MakeHeader(0x002E, 3, 0), nullptr, "WriteMcuVariableI2c"},
{IPC::MakeHeader(0x002F, 2, 0), nullptr, "ReadRegisterI2cExclusive"},
{IPC::MakeHeader(0x0030, 2, 0), nullptr, "ReadMcuVariableI2cExclusive"},
{IPC::MakeHeader(0x0031, 6, 0), nullptr, "SetImageQualityCalibrationData"},
{IPC::MakeHeader(0x0032, 0, 0), nullptr, "GetImageQualityCalibrationData"},
{IPC::MakeHeader(0x0033, 11, 0), &CAM_U::SetPackageParameterWithoutContext, "SetPackageParameterWithoutContext"},
{IPC::MakeHeader(0x0034, 5, 0), &CAM_U::SetPackageParameterWithContext, "SetPackageParameterWithContext"},
{IPC::MakeHeader(0x0035, 7, 0), &CAM_U::SetPackageParameterWithContextDetail, "SetPackageParameterWithContextDetail"},
{IPC::MakeHeader(0x0036, 0, 0), &CAM_U::GetSuitableY2rStandardCoefficient, "GetSuitableY2rStandardCoefficient"},
{IPC::MakeHeader(0x0037, 8, 2), nullptr, "PlayShutterSoundWithWave"},
{IPC::MakeHeader(0x0038, 1, 0), &CAM_U::PlayShutterSound, "PlayShutterSound"},
{IPC::MakeHeader(0x0039, 0, 0), &CAM_U::DriverInitialize, "DriverInitialize"},
{IPC::MakeHeader(0x003A, 0, 0), &CAM_U::DriverFinalize, "DriverFinalize"},
{IPC::MakeHeader(0x003B, 0, 0), nullptr, "GetActivatedCamera"},
{IPC::MakeHeader(0x003C, 0, 0), nullptr, "GetSleepCamera"},
{IPC::MakeHeader(0x003D, 1, 0), nullptr, "SetSleepCamera"},
{IPC::MakeHeader(0x003E, 1, 0), nullptr, "SetBrightnessSynchronization"},
{0x0001, &CAM_U::StartCapture, "StartCapture"},
{0x0002, &CAM_U::StopCapture, "StopCapture"},
{0x0003, &CAM_U::IsBusy, "IsBusy"},
{0x0004, &CAM_U::ClearBuffer, "ClearBuffer"},
{0x0005, &CAM_U::GetVsyncInterruptEvent, "GetVsyncInterruptEvent"},
{0x0006, &CAM_U::GetBufferErrorInterruptEvent, "GetBufferErrorInterruptEvent"},
{0x0007, &CAM_U::SetReceiving, "SetReceiving"},
{0x0008, &CAM_U::IsFinishedReceiving, "IsFinishedReceiving"},
{0x0009, &CAM_U::SetTransferLines, "SetTransferLines"},
{0x000A, &CAM_U::GetMaxLines, "GetMaxLines"},
{0x000B, &CAM_U::SetTransferBytes, "SetTransferBytes"},
{0x000C, &CAM_U::GetTransferBytes, "GetTransferBytes"},
{0x000D, &CAM_U::GetMaxBytes, "GetMaxBytes"},
{0x000E, &CAM_U::SetTrimming, "SetTrimming"},
{0x000F, &CAM_U::IsTrimming, "IsTrimming"},
{0x0010, &CAM_U::SetTrimmingParams, "SetTrimmingParams"},
{0x0011, &CAM_U::GetTrimmingParams, "GetTrimmingParams"},
{0x0012, &CAM_U::SetTrimmingParamsCenter, "SetTrimmingParamsCenter"},
{0x0013, &CAM_U::Activate, "Activate"},
{0x0014, &CAM_U::SwitchContext, "SwitchContext"},
{0x0015, nullptr, "SetExposure"},
{0x0016, nullptr, "SetWhiteBalance"},
{0x0017, nullptr, "SetWhiteBalanceWithoutBaseUp"},
{0x0018, nullptr, "SetSharpness"},
{0x0019, nullptr, "SetAutoExposure"},
{0x001A, nullptr, "IsAutoExposure"},
{0x001B, nullptr, "SetAutoWhiteBalance"},
{0x001C, nullptr, "IsAutoWhiteBalance"},
{0x001D, &CAM_U::FlipImage, "FlipImage"},
{0x001E, &CAM_U::SetDetailSize, "SetDetailSize"},
{0x001F, &CAM_U::SetSize, "SetSize"},
{0x0020, &CAM_U::SetFrameRate, "SetFrameRate"},
{0x0021, nullptr, "SetPhotoMode"},
{0x0022, &CAM_U::SetEffect, "SetEffect"},
{0x0023, nullptr, "SetContrast"},
{0x0024, nullptr, "SetLensCorrection"},
{0x0025, &CAM_U::SetOutputFormat, "SetOutputFormat"},
{0x0026, nullptr, "SetAutoExposureWindow"},
{0x0027, nullptr, "SetAutoWhiteBalanceWindow"},
{0x0028, nullptr, "SetNoiseFilter"},
{0x0029, &CAM_U::SynchronizeVsyncTiming, "SynchronizeVsyncTiming"},
{0x002A, &CAM_U::GetLatestVsyncTiming, "GetLatestVsyncTiming"},
{0x002B, &CAM_U::GetStereoCameraCalibrationData, "GetStereoCameraCalibrationData"},
{0x002C, nullptr, "SetStereoCameraCalibrationData"},
{0x002D, nullptr, "WriteRegisterI2c"},
{0x002E, nullptr, "WriteMcuVariableI2c"},
{0x002F, nullptr, "ReadRegisterI2cExclusive"},
{0x0030, nullptr, "ReadMcuVariableI2cExclusive"},
{0x0031, nullptr, "SetImageQualityCalibrationData"},
{0x0032, nullptr, "GetImageQualityCalibrationData"},
{0x0033, &CAM_U::SetPackageParameterWithoutContext, "SetPackageParameterWithoutContext"},
{0x0034, &CAM_U::SetPackageParameterWithContext, "SetPackageParameterWithContext"},
{0x0035, &CAM_U::SetPackageParameterWithContextDetail, "SetPackageParameterWithContextDetail"},
{0x0036, &CAM_U::GetSuitableY2rStandardCoefficient, "GetSuitableY2rStandardCoefficient"},
{0x0037, nullptr, "PlayShutterSoundWithWave"},
{0x0038, &CAM_U::PlayShutterSound, "PlayShutterSound"},
{0x0039, &CAM_U::DriverInitialize, "DriverInitialize"},
{0x003A, &CAM_U::DriverFinalize, "DriverFinalize"},
{0x003B, nullptr, "GetActivatedCamera"},
{0x003C, nullptr, "GetSleepCamera"},
{0x003D, nullptr, "SetSleepCamera"},
{0x003E, nullptr, "SetBrightnessSynchronization"},
// clang-format on
};
RegisterHandlers(functions);

View File

@ -46,7 +46,7 @@ using CecOpenMode = Module::CecOpenMode;
using CecSystemInfoType = Module::CecSystemInfoType;
void Module::Interface::Open(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x01, 3, 2);
IPC::RequestParser rp(ctx);
const u32 ncch_program_id = rp.Pop<u32>();
const CecDataPathType path_type = rp.PopEnum<CecDataPathType>();
CecOpenMode open_mode;
@ -129,7 +129,7 @@ void Module::Interface::Open(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::Read(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x02, 1, 2);
IPC::RequestParser rp(ctx);
const u32 write_buffer_size = rp.Pop<u32>();
auto& write_buffer = rp.PopMappedBuffer();
@ -171,7 +171,7 @@ void Module::Interface::Read(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::ReadMessage(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x03, 4, 4);
IPC::RequestParser rp(ctx);
const u32 ncch_program_id = rp.Pop<u32>();
const bool is_outbox = rp.Pop<bool>();
const u32 message_id_size = rp.Pop<u32>();
@ -240,7 +240,7 @@ void Module::Interface::ReadMessage(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::ReadMessageWithHMAC(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x04, 4, 6);
IPC::RequestParser rp(ctx);
const u32 ncch_program_id = rp.Pop<u32>();
const bool is_outbox = rp.Pop<bool>();
const u32 message_id_size = rp.Pop<u32>();
@ -334,7 +334,7 @@ void Module::Interface::ReadMessageWithHMAC(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::Write(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x05, 1, 2);
IPC::RequestParser rp(ctx);
const u32 read_buffer_size = rp.Pop<u32>();
auto& read_buffer = rp.PopMappedBuffer();
@ -382,7 +382,7 @@ void Module::Interface::Write(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::WriteMessage(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x06, 4, 4);
IPC::RequestParser rp(ctx);
const u32 ncch_program_id = rp.Pop<u32>();
const bool is_outbox = rp.Pop<bool>();
const u32 message_id_size = rp.Pop<u32>();
@ -452,7 +452,7 @@ void Module::Interface::WriteMessage(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::WriteMessageWithHMAC(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x07, 4, 6);
IPC::RequestParser rp(ctx);
const u32 ncch_program_id = rp.Pop<u32>();
const bool is_outbox = rp.Pop<bool>();
const u32 message_id_size = rp.Pop<u32>();
@ -540,7 +540,7 @@ void Module::Interface::WriteMessageWithHMAC(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::Delete(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x08, 4, 2);
IPC::RequestParser rp(ctx);
const u32 ncch_program_id = rp.Pop<u32>();
const CecDataPathType path_type = rp.PopEnum<CecDataPathType>();
const bool is_outbox = rp.Pop<bool>();
@ -584,7 +584,7 @@ void Module::Interface::Delete(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::SetData(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x09, 3, 2);
IPC::RequestParser rp(ctx);
const u32 ncch_program_id = rp.Pop<u32>();
const u32 buffer_size = rp.Pop<u32>();
const u32 option = rp.Pop<u32>();
@ -619,7 +619,7 @@ void Module::Interface::SetData(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::ReadData(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0A, 3, 4);
IPC::RequestParser rp(ctx);
const u32 dest_buffer_size = rp.Pop<u32>();
const CecSystemInfoType info_type = rp.PopEnum<CecSystemInfoType>();
const u32 param_buffer_size = rp.Pop<u32>();
@ -658,7 +658,7 @@ void Module::Interface::ReadData(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::Start(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0B, 1, 0);
IPC::RequestParser rp(ctx);
const CecCommand command = rp.PopEnum<CecCommand>();
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
@ -668,7 +668,7 @@ void Module::Interface::Start(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::Stop(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0C, 1, 0);
IPC::RequestParser rp(ctx);
const CecCommand command = rp.PopEnum<CecCommand>();
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
@ -678,7 +678,7 @@ void Module::Interface::Stop(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetCecInfoBuffer(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0D, 2, 2);
IPC::RequestParser rp(ctx);
const u32 buffer_size = rp.Pop<u32>();
const u32 possible_info_type = rp.Pop<u32>();
auto& buffer = rp.PopMappedBuffer();
@ -692,7 +692,7 @@ void Module::Interface::GetCecInfoBuffer(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetCecdState(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0E, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
@ -702,7 +702,7 @@ void Module::Interface::GetCecdState(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetCecInfoEventHandle(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0F, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 2);
rb.Push(RESULT_SUCCESS);
@ -712,7 +712,7 @@ void Module::Interface::GetCecInfoEventHandle(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetChangeStateEventHandle(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x10, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 2);
rb.Push(RESULT_SUCCESS);
@ -722,7 +722,7 @@ void Module::Interface::GetChangeStateEventHandle(Kernel::HLERequestContext& ctx
}
void Module::Interface::OpenAndWrite(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x11, 4, 4);
IPC::RequestParser rp(ctx);
const u32 buffer_size = rp.Pop<u32>();
const u32 ncch_program_id = rp.Pop<u32>();
const CecDataPathType path_type = rp.PopEnum<CecDataPathType>();
@ -782,7 +782,7 @@ void Module::Interface::OpenAndWrite(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::OpenAndRead(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x12, 4, 4);
IPC::RequestParser rp(ctx);
const u32 buffer_size = rp.Pop<u32>();
const u32 ncch_program_id = rp.Pop<u32>();
const CecDataPathType path_type = rp.PopEnum<CecDataPathType>();

View File

@ -13,10 +13,10 @@ CECD_NDM::CECD_NDM(std::shared_ptr<Module> cecd)
: Module::Interface(std::move(cecd), "cecd:ndm", DefaultMaxSessions) {
static const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0001, 0, 0), nullptr, "Initialize"},
{IPC::MakeHeader(0x0002, 0, 0), nullptr, "Deinitialize"},
{IPC::MakeHeader(0x0003, 0, 0), nullptr, "ResumeDaemon"},
{IPC::MakeHeader(0x0004, 1, 0), nullptr, "SuspendDaemon"},
{0x0001, nullptr, "Initialize"},
{0x0002, nullptr, "Deinitialize"},
{0x0003, nullptr, "ResumeDaemon"},
{0x0004, nullptr, "SuspendDaemon"},
// clang-format on
};

View File

@ -14,28 +14,28 @@ CECD_S::CECD_S(std::shared_ptr<Module> cecd)
static const FunctionInfo functions[] = {
// cecd:u shared commands
// clang-format off
{IPC::MakeHeader(0x0001, 3, 2), &CECD_S::Open, "Open"},
{IPC::MakeHeader(0x0002, 1, 2), &CECD_S::Read, "Read"},
{IPC::MakeHeader(0x0003, 4, 4), &CECD_S::ReadMessage, "ReadMessage"},
{IPC::MakeHeader(0x0004, 4, 6), &CECD_S::ReadMessageWithHMAC, "ReadMessageWithHMAC"},
{IPC::MakeHeader(0x0005, 1, 2), &CECD_S::Write, "Write"},
{IPC::MakeHeader(0x0006, 4, 4), &CECD_S::WriteMessage, "WriteMessage"},
{IPC::MakeHeader(0x0007, 4, 6), &CECD_S::WriteMessageWithHMAC, "WriteMessageWithHMAC"},
{IPC::MakeHeader(0x0008, 4, 2), &CECD_S::Delete, "Delete"},
{IPC::MakeHeader(0x0009, 3, 2), &CECD_S::SetData, "SetData"},
{IPC::MakeHeader(0x000A, 3, 4), &CECD_S::ReadData, "ReadData"},
{IPC::MakeHeader(0x000B, 1, 0), &CECD_S::Start, "Start"},
{IPC::MakeHeader(0x000C, 1, 0), &CECD_S::Stop, "Stop"},
{IPC::MakeHeader(0x000D, 2, 2), &CECD_S::GetCecInfoBuffer, "GetCecInfoBuffer"},
{IPC::MakeHeader(0x000E, 0, 0), &CECD_S::GetCecdState, "GetCecdState"},
{IPC::MakeHeader(0x000F, 0, 0), &CECD_S::GetCecInfoEventHandle, "GetCecInfoEventHandle"},
{IPC::MakeHeader(0x0010, 0, 0), &CECD_S::GetChangeStateEventHandle, "GetChangeStateEventHandle"},
{IPC::MakeHeader(0x0011, 4, 4), &CECD_S::OpenAndWrite, "OpenAndWrite"},
{IPC::MakeHeader(0x0012, 4, 4), &CECD_S::OpenAndRead, "OpenAndRead"},
{IPC::MakeHeader(0x001E, 2, 2), nullptr, "GetEventLog"},
{IPC::MakeHeader(0x001F, 0, 0), nullptr, "GetEventLogStart"},
{0x0001, &CECD_S::Open, "Open"},
{0x0002, &CECD_S::Read, "Read"},
{0x0003, &CECD_S::ReadMessage, "ReadMessage"},
{0x0004, &CECD_S::ReadMessageWithHMAC, "ReadMessageWithHMAC"},
{0x0005, &CECD_S::Write, "Write"},
{0x0006, &CECD_S::WriteMessage, "WriteMessage"},
{0x0007, &CECD_S::WriteMessageWithHMAC, "WriteMessageWithHMAC"},
{0x0008, &CECD_S::Delete, "Delete"},
{0x0009, &CECD_S::SetData, "SetData"},
{0x000A, &CECD_S::ReadData, "ReadData"},
{0x000B, &CECD_S::Start, "Start"},
{0x000C, &CECD_S::Stop, "Stop"},
{0x000D, &CECD_S::GetCecInfoBuffer, "GetCecInfoBuffer"},
{0x000E, &CECD_S::GetCecdState, "GetCecdState"},
{0x000F, &CECD_S::GetCecInfoEventHandle, "GetCecInfoEventHandle"},
{0x0010, &CECD_S::GetChangeStateEventHandle, "GetChangeStateEventHandle"},
{0x0011, &CECD_S::OpenAndWrite, "OpenAndWrite"},
{0x0012, &CECD_S::OpenAndRead, "OpenAndRead"},
{0x001E, nullptr, "GetEventLog"},
{0x001F, nullptr, "GetEventLogStart"},
// cecd:s commands
{IPC::MakeHeader(0x0402, 0, 2), nullptr, "GetCecInfoEventHandleSys"},
{0x0402, nullptr, "GetCecInfoEventHandleSys"},
// clang-format on
};

View File

@ -14,26 +14,26 @@ CECD_U::CECD_U(std::shared_ptr<Module> cecd)
static const FunctionInfo functions[] = {
// cecd:u shared commands
// clang-format off
{IPC::MakeHeader(0x0001, 3, 2), &CECD_U::Open, "Open"},
{IPC::MakeHeader(0x0002, 1, 2), &CECD_U::Read, "Read"},
{IPC::MakeHeader(0x0003, 4, 4), &CECD_U::ReadMessage, "ReadMessage"},
{IPC::MakeHeader(0x0004, 4, 6), &CECD_U::ReadMessageWithHMAC, "ReadMessageWithHMAC"},
{IPC::MakeHeader(0x0005, 1, 2), &CECD_U::Write, "Write"},
{IPC::MakeHeader(0x0006, 4, 4), &CECD_U::WriteMessage, "WriteMessage"},
{IPC::MakeHeader(0x0007, 4, 6), &CECD_U::WriteMessageWithHMAC, "WriteMessageWithHMAC"},
{IPC::MakeHeader(0x0008, 4, 2), &CECD_U::Delete, "Delete"},
{IPC::MakeHeader(0x0009, 3, 2), &CECD_U::SetData, "SetData"},
{IPC::MakeHeader(0x000A, 3, 4), &CECD_U::ReadData, "ReadData"},
{IPC::MakeHeader(0x000B, 1, 0), &CECD_U::Start, "Start"},
{IPC::MakeHeader(0x000C, 1, 0), &CECD_U::Stop, "Stop"},
{IPC::MakeHeader(0x000D, 2, 2), &CECD_U::GetCecInfoBuffer, "GetCecInfoBuffer"},
{IPC::MakeHeader(0x000E, 0, 0), &CECD_U::GetCecdState, "GetCecdState"},
{IPC::MakeHeader(0x000F, 0, 0), &CECD_U::GetCecInfoEventHandle, "GetCecInfoEventHandle"},
{IPC::MakeHeader(0x0010, 0, 0), &CECD_U::GetChangeStateEventHandle, "GetChangeStateEventHandle"},
{IPC::MakeHeader(0x0011, 4, 4), &CECD_U::OpenAndWrite, "OpenAndWrite"},
{IPC::MakeHeader(0x0012, 4, 4), &CECD_U::OpenAndRead, "OpenAndRead"},
{IPC::MakeHeader(0x001E, 2, 2), nullptr, "GetEventLog"},
{IPC::MakeHeader(0x001F, 0, 0), nullptr, "GetEventLogStart"},
{0x0001, &CECD_U::Open, "Open"},
{0x0002, &CECD_U::Read, "Read"},
{0x0003, &CECD_U::ReadMessage, "ReadMessage"},
{0x0004, &CECD_U::ReadMessageWithHMAC, "ReadMessageWithHMAC"},
{0x0005, &CECD_U::Write, "Write"},
{0x0006, &CECD_U::WriteMessage, "WriteMessage"},
{0x0007, &CECD_U::WriteMessageWithHMAC, "WriteMessageWithHMAC"},
{0x0008, &CECD_U::Delete, "Delete"},
{0x0009, &CECD_U::SetData, "SetData"},
{0x000A, &CECD_U::ReadData, "ReadData"},
{0x000B, &CECD_U::Start, "Start"},
{0x000C, &CECD_U::Stop, "Stop"},
{0x000D, &CECD_U::GetCecInfoBuffer, "GetCecInfoBuffer"},
{0x000E, &CECD_U::GetCecdState, "GetCecdState"},
{0x000F, &CECD_U::GetCecInfoEventHandle, "GetCecInfoEventHandle"},
{0x0010, &CECD_U::GetChangeStateEventHandle, "GetChangeStateEventHandle"},
{0x0011, &CECD_U::OpenAndWrite, "OpenAndWrite"},
{0x0012, &CECD_U::OpenAndRead, "OpenAndRead"},
{0x001E, nullptr, "GetEventLog"},
{0x001F, nullptr, "GetEventLogStart"},
// clang-format on
};

View File

@ -206,7 +206,7 @@ Module::Interface::Interface(std::shared_ptr<Module> cfg, const char* name, u32
Module::Interface::~Interface() = default;
void Module::Interface::GetCountryCodeString(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x09, 1, 0);
IPC::RequestParser rp(ctx);
u16 country_code_id = rp.Pop<u16>();
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
@ -228,7 +228,7 @@ std::shared_ptr<Module> Module::Interface::Interface::GetModule() const {
}
void Module::Interface::GetCountryCodeID(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0A, 1, 0);
IPC::RequestParser rp(ctx);
u16 country_code = rp.Pop<u16>();
u16 country_code_id = 0;
@ -263,16 +263,16 @@ u32 Module::GetRegionValue() {
return Settings::values.region_value.GetValue();
}
void Module::Interface::SecureInfoGetRegion(Kernel::HLERequestContext& ctx, u16 id) {
IPC::RequestParser rp(ctx, id, 0, 0);
void Module::Interface::SecureInfoGetRegion(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
rb.Push<u8>(static_cast<u8>(cfg->GetRegionValue()));
}
void Module::Interface::SecureInfoGetByte101(Kernel::HLERequestContext& ctx, u16 id) {
IPC::RequestParser rp(ctx, id, 0, 0);
void Module::Interface::SecureInfoGetByte101(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx);
LOG_DEBUG(Service_CFG, "(STUBBED) called");
@ -283,7 +283,7 @@ void Module::Interface::SecureInfoGetByte101(Kernel::HLERequestContext& ctx, u16
}
void Module::Interface::GenHashConsoleUnique(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x03, 1, 0);
IPC::RequestParser rp(ctx);
const u32 app_id_salt = rp.Pop<u32>() & 0x000FFFFF;
IPC::RequestBuilder rb = rp.MakeBuilder(3, 0);
@ -309,7 +309,7 @@ void Module::Interface::GenHashConsoleUnique(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetRegionCanadaUSA(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x04, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
@ -323,7 +323,7 @@ void Module::Interface::GetRegionCanadaUSA(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetSystemModel(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x05, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
u32 data{};
@ -345,7 +345,7 @@ void Module::Interface::GetSystemModel(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetModelNintendo2DS(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x06, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
u32 data{};
@ -356,7 +356,7 @@ void Module::Interface::GetModelNintendo2DS(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetConfigInfoBlk2(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x01, 2, 2);
IPC::RequestParser rp(ctx);
u32 size = rp.Pop<u32>();
u32 block_id = rp.Pop<u32>();
auto& buffer = rp.PopMappedBuffer();
@ -368,8 +368,8 @@ void Module::Interface::GetConfigInfoBlk2(Kernel::HLERequestContext& ctx) {
rb.PushMappedBuffer(buffer);
}
void Module::Interface::GetConfigInfoBlk8(Kernel::HLERequestContext& ctx, u16 id) {
IPC::RequestParser rp(ctx, id, 2, 2);
void Module::Interface::GetConfigInfoBlk8(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx);
u32 size = rp.Pop<u32>();
u32 block_id = rp.Pop<u32>();
auto& buffer = rp.PopMappedBuffer();
@ -381,8 +381,8 @@ void Module::Interface::GetConfigInfoBlk8(Kernel::HLERequestContext& ctx, u16 id
rb.PushMappedBuffer(buffer);
}
void Module::Interface::SetConfigInfoBlk4(Kernel::HLERequestContext& ctx, u16 id) {
IPC::RequestParser rp(ctx, id, 2, 2);
void Module::Interface::SetConfigInfoBlk4(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx);
u32 block_id = rp.Pop<u32>();
u32 size = rp.Pop<u32>();
auto& buffer = rp.PopMappedBuffer();
@ -395,14 +395,14 @@ void Module::Interface::SetConfigInfoBlk4(Kernel::HLERequestContext& ctx, u16 id
rb.PushMappedBuffer(buffer);
}
void Module::Interface::UpdateConfigNANDSavegame(Kernel::HLERequestContext& ctx, u16 id) {
IPC::RequestParser rp(ctx, id, 0, 0);
void Module::Interface::UpdateConfigNANDSavegame(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(cfg->UpdateConfigNANDSavegame());
}
void Module::Interface::FormatConfig(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0806, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(cfg->FormatConfig());
}

View File

@ -163,7 +163,7 @@ public:
* 1 : Result of function, 0 on success, otherwise error code
* 2 : Region value loaded from SecureInfo offset 0x100
*/
void SecureInfoGetRegion(Kernel::HLERequestContext& ctx, u16 id);
void SecureInfoGetRegion(Kernel::HLERequestContext& ctx);
/**
* CFG::SecureInfoGetByte101 service function
@ -174,7 +174,7 @@ public:
* 1 : Result of function, 0 on success, otherwise error code
* 2 : Value loaded from SecureInfo offset 0x101
*/
void SecureInfoGetByte101(Kernel::HLERequestContext& ctx, u16 id);
void SecureInfoGetByte101(Kernel::HLERequestContext& ctx);
/**
* CFG::GenHashConsoleUnique service function
@ -243,7 +243,7 @@ public:
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
*/
void GetConfigInfoBlk8(Kernel::HLERequestContext& ctx, u16 id);
void GetConfigInfoBlk8(Kernel::HLERequestContext& ctx);
/**
* CFG::SetConfigInfoBlk4 service function
@ -259,7 +259,7 @@ public:
* The parameters order is different from GetConfigInfoBlk2/8's,
* where Block ID and Size are switched.
*/
void SetConfigInfoBlk4(Kernel::HLERequestContext& ctx, u16 id);
void SetConfigInfoBlk4(Kernel::HLERequestContext& ctx);
/**
* CFG::UpdateConfigNANDSavegame service function
@ -268,7 +268,7 @@ public:
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
*/
void UpdateConfigNANDSavegame(Kernel::HLERequestContext& ctx, u16 id);
void UpdateConfigNANDSavegame(Kernel::HLERequestContext& ctx);
/**
* CFG::FormatConfig service function
@ -279,12 +279,6 @@ public:
*/
void FormatConfig(Kernel::HLERequestContext& ctx);
/// A helper function for dispatching service functions that have multiple IDs
template <void (Interface::*function)(Kernel::HLERequestContext& ctx, u16 id), u16 id>
void D(Kernel::HLERequestContext& ctx) {
(this->*function)(ctx, id);
}
protected:
std::shared_ptr<Module> cfg;
};

View File

@ -13,50 +13,50 @@ CFG_I::CFG_I(std::shared_ptr<Module> cfg) : Module::Interface(std::move(cfg), "c
static const FunctionInfo functions[] = {
// cfg common
// clang-format off
{IPC::MakeHeader(0x0001, 2, 2), &CFG_I::GetConfigInfoBlk2, "GetConfigInfoBlk2"},
{IPC::MakeHeader(0x0002, 0, 0), &CFG_I::D<&CFG_I::SecureInfoGetRegion, 0x0002>, "SecureInfoGetRegion"},
{IPC::MakeHeader(0x0003, 1, 0), &CFG_I::GenHashConsoleUnique, "GenHashConsoleUnique"},
{IPC::MakeHeader(0x0004, 0, 0), &CFG_I::GetRegionCanadaUSA, "GetRegionCanadaUSA"},
{IPC::MakeHeader(0x0005, 0, 0), &CFG_I::GetSystemModel, "GetSystemModel"},
{IPC::MakeHeader(0x0006, 0, 0), &CFG_I::GetModelNintendo2DS, "GetModelNintendo2DS"},
{IPC::MakeHeader(0x0007, 1, 0), nullptr, "WriteToFirstByteCfgSavegame"},
{IPC::MakeHeader(0x0008, 2, 0), nullptr, "GoThroughTable"},
{IPC::MakeHeader(0x0009, 1, 0), &CFG_I::GetCountryCodeString, "GetCountryCodeString"},
{IPC::MakeHeader(0x000A, 1, 0), &CFG_I::GetCountryCodeID, "GetCountryCodeID"},
{IPC::MakeHeader(0x000B, 0, 0), nullptr, "IsFangateSupported"},
{0x0001, &CFG_I::GetConfigInfoBlk2, "GetConfigInfoBlk2"},
{0x0002, &CFG_I::SecureInfoGetRegion, "SecureInfoGetRegion"},
{0x0003, &CFG_I::GenHashConsoleUnique, "GenHashConsoleUnique"},
{0x0004, &CFG_I::GetRegionCanadaUSA, "GetRegionCanadaUSA"},
{0x0005, &CFG_I::GetSystemModel, "GetSystemModel"},
{0x0006, &CFG_I::GetModelNintendo2DS, "GetModelNintendo2DS"},
{0x0007, nullptr, "WriteToFirstByteCfgSavegame"},
{0x0008, nullptr, "GoThroughTable"},
{0x0009, &CFG_I::GetCountryCodeString, "GetCountryCodeString"},
{0x000A, &CFG_I::GetCountryCodeID, "GetCountryCodeID"},
{0x000B, nullptr, "IsFangateSupported"},
// cfg:i
{IPC::MakeHeader(0x0401, 2, 2), &CFG_I::D<&CFG_I::GetConfigInfoBlk8, 0x0401>, "GetConfigInfoBlk8"},
{IPC::MakeHeader(0x0402, 2, 2), &CFG_I::D<&CFG_I::SetConfigInfoBlk4, 0x0402>, "SetConfigInfoBlk4"},
{IPC::MakeHeader(0x0403, 0, 0), &CFG_I::D<&CFG_I::UpdateConfigNANDSavegame, 0x0403>, "UpdateConfigNANDSavegame"},
{IPC::MakeHeader(0x0404, 1, 2), nullptr, "GetLocalFriendCodeSeedData"},
{IPC::MakeHeader(0x0405, 0, 0), nullptr, "GetLocalFriendCodeSeed"},
{IPC::MakeHeader(0x0406, 0, 0), &CFG_I::D<&CFG_I::SecureInfoGetRegion, 0x0406>, "SecureInfoGetRegion"},
{IPC::MakeHeader(0x0407, 0, 0), &CFG_I::D<&CFG_I::SecureInfoGetByte101, 0x0407>, "SecureInfoGetByte101"},
{IPC::MakeHeader(0x0408, 1, 2), nullptr, "SecureInfoGetSerialNo"},
{IPC::MakeHeader(0x0409, 0, 0), nullptr, "UpdateConfigBlk00040003"},
{IPC::MakeHeader(0x0801, 2, 2), &CFG_I::D<&CFG_I::GetConfigInfoBlk8, 0x0801>, "GetConfigInfoBlk8"},
{IPC::MakeHeader(0x0802, 2, 2), &CFG_I::D<&CFG_I::SetConfigInfoBlk4, 0x0802>, "SetConfigInfoBlk4"},
{IPC::MakeHeader(0x0803, 0, 0), &CFG_I::D<&CFG_I::UpdateConfigNANDSavegame, 0x0803>, "UpdateConfigNANDSavegame"},
{IPC::MakeHeader(0x0804, 3, 2), nullptr, "CreateConfigInfoBlk"},
{IPC::MakeHeader(0x0805, 0, 0), nullptr, "DeleteConfigNANDSavefile"},
{IPC::MakeHeader(0x0806, 0, 0), &CFG_I::FormatConfig, "FormatConfig"},
{IPC::MakeHeader(0x0808, 0, 0), nullptr, "UpdateConfigBlk1"},
{IPC::MakeHeader(0x0809, 0, 0), nullptr, "UpdateConfigBlk2"},
{IPC::MakeHeader(0x080A, 0, 0), nullptr, "UpdateConfigBlk3"},
{IPC::MakeHeader(0x080B, 2, 2), nullptr, "SetGetLocalFriendCodeSeedData"},
{IPC::MakeHeader(0x080C, 1, 2), nullptr, "SetLocalFriendCodeSeedSignature"},
{IPC::MakeHeader(0x080D, 0, 0), nullptr, "DeleteCreateNANDLocalFriendCodeSeed"},
{IPC::MakeHeader(0x080E, 0, 0), nullptr, "VerifySigLocalFriendCodeSeed"},
{IPC::MakeHeader(0x080F, 1, 2), nullptr, "GetLocalFriendCodeSeedData"},
{IPC::MakeHeader(0x0810, 0, 0), nullptr, "GetLocalFriendCodeSeed"},
{IPC::MakeHeader(0x0811, 2, 4), nullptr, "SetSecureInfo"},
{IPC::MakeHeader(0x0812, 0, 0), nullptr, "DeleteCreateNANDSecureInfo"},
{IPC::MakeHeader(0x0813, 0, 0), nullptr, "VerifySigSecureInfo"},
{IPC::MakeHeader(0x0814, 1, 2), nullptr, "SecureInfoGetData"},
{IPC::MakeHeader(0x0815, 1, 2), nullptr, "SecureInfoGetSignature"},
{IPC::MakeHeader(0x0816, 0, 0), &CFG_I::D<&CFG_I::SecureInfoGetRegion, 0x0816>, "SecureInfoGetRegion"},
{IPC::MakeHeader(0x0817, 0, 0), &CFG_I::D<&CFG_I::SecureInfoGetByte101, 0x0817>, "SecureInfoGetByte101"},
{IPC::MakeHeader(0x0818, 1, 2), nullptr, "SecureInfoGetSerialNo"},
{0x0401, &CFG_I::GetConfigInfoBlk8, "GetConfigInfoBlk8"},
{0x0402, &CFG_I::SetConfigInfoBlk4, "SetConfigInfoBlk4"},
{0x0403, &CFG_I::UpdateConfigNANDSavegame, "UpdateConfigNANDSavegame"},
{0x0404, nullptr, "GetLocalFriendCodeSeedData"},
{0x0405, nullptr, "GetLocalFriendCodeSeed"},
{0x0406, &CFG_I::SecureInfoGetRegion, "SecureInfoGetRegion"},
{0x0407, &CFG_I::SecureInfoGetByte101, "SecureInfoGetByte101"},
{0x0408, nullptr, "SecureInfoGetSerialNo"},
{0x0409, nullptr, "UpdateConfigBlk00040003"},
{0x0801, &CFG_I::GetConfigInfoBlk8, "GetConfigInfoBlk8"},
{0x0802, &CFG_I::SetConfigInfoBlk4, "SetConfigInfoBlk4"},
{0x0803, &CFG_I::UpdateConfigNANDSavegame, "UpdateConfigNANDSavegame"},
{0x0804, nullptr, "CreateConfigInfoBlk"},
{0x0805, nullptr, "DeleteConfigNANDSavefile"},
{0x0806, &CFG_I::FormatConfig, "FormatConfig"},
{0x0808, nullptr, "UpdateConfigBlk1"},
{0x0809, nullptr, "UpdateConfigBlk2"},
{0x080A, nullptr, "UpdateConfigBlk3"},
{0x080B, nullptr, "SetGetLocalFriendCodeSeedData"},
{0x080C, nullptr, "SetLocalFriendCodeSeedSignature"},
{0x080D, nullptr, "DeleteCreateNANDLocalFriendCodeSeed"},
{0x080E, nullptr, "VerifySigLocalFriendCodeSeed"},
{0x080F, nullptr, "GetLocalFriendCodeSeedData"},
{0x0810, nullptr, "GetLocalFriendCodeSeed"},
{0x0811, nullptr, "SetSecureInfo"},
{0x0812, nullptr, "DeleteCreateNANDSecureInfo"},
{0x0813, nullptr, "VerifySigSecureInfo"},
{0x0814, nullptr, "SecureInfoGetData"},
{0x0815, nullptr, "SecureInfoGetSignature"},
{0x0816, &CFG_I::SecureInfoGetRegion, "SecureInfoGetRegion"},
{0x0817, &CFG_I::SecureInfoGetByte101, "SecureInfoGetByte101"},
{0x0818, nullptr, "SecureInfoGetSerialNo"},
// clang-format on
};
RegisterHandlers(functions);

View File

@ -12,10 +12,10 @@ namespace Service::CFG {
CFG_NOR::CFG_NOR() : ServiceFramework("cfg:nor", 23) {
static const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0001, 1, 0), nullptr, "Initialize"},
{IPC::MakeHeader(0x0002, 0, 0), nullptr, "Shutdown"},
{IPC::MakeHeader(0x0005, 2, 2), nullptr, "ReadData"},
{IPC::MakeHeader(0x0006, 2, 2), nullptr, "WriteData"},
{0x0001, nullptr, "Initialize"},
{0x0002, nullptr, "Shutdown"},
{0x0005, nullptr, "ReadData"},
{0x0006, nullptr, "WriteData"},
// clang-format on
};
RegisterHandlers(functions);

View File

@ -13,27 +13,27 @@ CFG_S::CFG_S(std::shared_ptr<Module> cfg) : Module::Interface(std::move(cfg), "c
static const FunctionInfo functions[] = {
// cfg common
// clang-format off
{IPC::MakeHeader(0x0001, 2, 2), &CFG_S::GetConfigInfoBlk2, "GetConfigInfoBlk2"},
{IPC::MakeHeader(0x0002, 0, 0), &CFG_S::D<&CFG_S::SecureInfoGetRegion, 0x0002>, "SecureInfoGetRegion"},
{IPC::MakeHeader(0x0003, 1, 0), &CFG_S::GenHashConsoleUnique, "GenHashConsoleUnique"},
{IPC::MakeHeader(0x0004, 0, 0), &CFG_S::GetRegionCanadaUSA, "GetRegionCanadaUSA"},
{IPC::MakeHeader(0x0005, 0, 0), &CFG_S::GetSystemModel, "GetSystemModel"},
{IPC::MakeHeader(0x0006, 0, 0), &CFG_S::GetModelNintendo2DS, "GetModelNintendo2DS"},
{IPC::MakeHeader(0x0007, 1, 0), nullptr, "WriteToFirstByteCfgSavegame"},
{IPC::MakeHeader(0x0008, 2, 0), nullptr, "GoThroughTable"},
{IPC::MakeHeader(0x0009, 1, 0), &CFG_S::GetCountryCodeString, "GetCountryCodeString"},
{IPC::MakeHeader(0x000A, 1, 0), &CFG_S::GetCountryCodeID, "GetCountryCodeID"},
{IPC::MakeHeader(0x000B, 0, 0), nullptr, "IsFangateSupported"},
{0x0001, &CFG_S::GetConfigInfoBlk2, "GetConfigInfoBlk2"},
{0x0002, &CFG_S::SecureInfoGetRegion, "SecureInfoGetRegion"},
{0x0003, &CFG_S::GenHashConsoleUnique, "GenHashConsoleUnique"},
{0x0004, &CFG_S::GetRegionCanadaUSA, "GetRegionCanadaUSA"},
{0x0005, &CFG_S::GetSystemModel, "GetSystemModel"},
{0x0006, &CFG_S::GetModelNintendo2DS, "GetModelNintendo2DS"},
{0x0007, nullptr, "WriteToFirstByteCfgSavegame"},
{0x0008, nullptr, "GoThroughTable"},
{0x0009, &CFG_S::GetCountryCodeString, "GetCountryCodeString"},
{0x000A, &CFG_S::GetCountryCodeID, "GetCountryCodeID"},
{0x000B, nullptr, "IsFangateSupported"},
// cfg:s
{IPC::MakeHeader(0x0401, 2, 2), &CFG_S::D<&CFG_S::GetConfigInfoBlk8, 0x0401>, "GetConfigInfoBlk8"},
{IPC::MakeHeader(0x0402, 2, 2), &CFG_S::D<&CFG_S::SetConfigInfoBlk4, 0x0402>, "SetConfigInfoBlk4"},
{IPC::MakeHeader(0x0403, 0, 0), &CFG_S::D<&CFG_S::UpdateConfigNANDSavegame, 0x0403>, "UpdateConfigNANDSavegame"},
{IPC::MakeHeader(0x0404, 1, 2), nullptr, "GetLocalFriendCodeSeedData"},
{IPC::MakeHeader(0x0405, 0, 0), nullptr, "GetLocalFriendCodeSeed"},
{IPC::MakeHeader(0x0406, 0, 0), &CFG_S::D<&CFG_S::SecureInfoGetRegion, 0x0406>, "SecureInfoGetRegion"},
{IPC::MakeHeader(0x0407, 0, 0), &CFG_S::D<&CFG_S::SecureInfoGetByte101, 0x0407>, "SecureInfoGetByte101"},
{IPC::MakeHeader(0x0408, 1, 2), nullptr, "SecureInfoGetSerialNo"},
{IPC::MakeHeader(0x0409, 0, 0), nullptr, "UpdateConfigBlk00040003"},
{0x0401, &CFG_S::GetConfigInfoBlk8, "GetConfigInfoBlk8"},
{0x0402, &CFG_S::SetConfigInfoBlk4, "SetConfigInfoBlk4"},
{0x0403, &CFG_S::UpdateConfigNANDSavegame, "UpdateConfigNANDSavegame"},
{0x0404, nullptr, "GetLocalFriendCodeSeedData"},
{0x0405, nullptr, "GetLocalFriendCodeSeed"},
{0x0406, &CFG_S::SecureInfoGetRegion, "SecureInfoGetRegion"},
{0x0407, &CFG_S::SecureInfoGetByte101, "SecureInfoGetByte101"},
{0x0408, nullptr, "SecureInfoGetSerialNo"},
{0x0409, nullptr, "UpdateConfigBlk00040003"},
// clang-format on
};
RegisterHandlers(functions);

View File

@ -13,17 +13,17 @@ CFG_U::CFG_U(std::shared_ptr<Module> cfg) : Module::Interface(std::move(cfg), "c
static const FunctionInfo functions[] = {
// cfg common
// clang-format off
{IPC::MakeHeader(0x0001, 2, 2), &CFG_U::GetConfigInfoBlk2, "GetConfigInfoBlk2"},
{IPC::MakeHeader(0x0002, 0, 0), &CFG_U::D<&CFG_U::SecureInfoGetRegion, 0x0002>, "SecureInfoGetRegion"},
{IPC::MakeHeader(0x0003, 1, 0), &CFG_U::GenHashConsoleUnique, "GenHashConsoleUnique"},
{IPC::MakeHeader(0x0004, 0, 0), &CFG_U::GetRegionCanadaUSA, "GetRegionCanadaUSA"},
{IPC::MakeHeader(0x0005, 0, 0), &CFG_U::GetSystemModel, "GetSystemModel"},
{IPC::MakeHeader(0x0006, 0, 0), &CFG_U::GetModelNintendo2DS, "GetModelNintendo2DS"},
{IPC::MakeHeader(0x0007, 1, 0), nullptr, "WriteToFirstByteCfgSavegame"},
{IPC::MakeHeader(0x0008, 2, 0), nullptr, "GoThroughTable"},
{IPC::MakeHeader(0x0009, 1, 0), &CFG_U::GetCountryCodeString, "GetCountryCodeString"},
{IPC::MakeHeader(0x000A, 1, 0), &CFG_U::GetCountryCodeID, "GetCountryCodeID"},
{IPC::MakeHeader(0x000B, 0, 0), nullptr, "IsFangateSupported"},
{0x0001, &CFG_U::GetConfigInfoBlk2, "GetConfigInfoBlk2"},
{0x0002, &CFG_U::SecureInfoGetRegion, "SecureInfoGetRegion"},
{0x0003, &CFG_U::GenHashConsoleUnique, "GenHashConsoleUnique"},
{0x0004, &CFG_U::GetRegionCanadaUSA, "GetRegionCanadaUSA"},
{0x0005, &CFG_U::GetSystemModel, "GetSystemModel"},
{0x0006, &CFG_U::GetModelNintendo2DS, "GetModelNintendo2DS"},
{0x0007, nullptr, "WriteToFirstByteCfgSavegame"},
{0x0008, nullptr, "GoThroughTable"},
{0x0009, &CFG_U::GetCountryCodeString, "GetCountryCodeString"},
{0x000A, &CFG_U::GetCountryCodeID, "GetCountryCodeID"},
{0x000B, nullptr, "IsFangateSupported"},
// clang-format on
};
RegisterHandlers(functions);

View File

@ -191,7 +191,7 @@ struct CaptureState {
static_assert(sizeof(CaptureState) == 0x8, "CaptureState structure size is wrong");
void CSND_SND::Initialize(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x01, 5, 0);
IPC::RequestParser rp(ctx);
const u32 size = Common::AlignUp(rp.Pop<u32>(), Memory::CITRA_PAGE_SIZE);
master_state_offset = rp.Pop<u32>();
channel_state_offset = rp.Pop<u32>();
@ -219,7 +219,7 @@ void CSND_SND::Initialize(Kernel::HLERequestContext& ctx) {
}
void CSND_SND::Shutdown(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x02, 0, 0);
IPC::RequestParser rp(ctx);
if (mutex)
mutex = nullptr;
@ -233,7 +233,7 @@ void CSND_SND::Shutdown(Kernel::HLERequestContext& ctx) {
}
void CSND_SND::ExecuteCommands(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x03, 1, 0);
IPC::RequestParser rp(ctx);
const u32 addr = rp.Pop<u32>();
LOG_WARNING(Service_CSND, "(STUBBED) called, addr=0x{:08X}", addr);
@ -397,7 +397,7 @@ void CSND_SND::ExecuteCommands(Kernel::HLERequestContext& ctx) {
}
void CSND_SND::AcquireSoundChannels(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x05, 0, 0);
IPC::RequestParser rp(ctx);
// This is "almost" hardcoded, as in CSND initializes this with some code during sysmodule
// startup, but it always compute to the same value.
@ -411,7 +411,7 @@ void CSND_SND::AcquireSoundChannels(Kernel::HLERequestContext& ctx) {
}
void CSND_SND::ReleaseSoundChannels(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x06, 0, 0);
IPC::RequestParser rp(ctx);
acquired_channel_mask = 0;
@ -422,7 +422,7 @@ void CSND_SND::ReleaseSoundChannels(Kernel::HLERequestContext& ctx) {
}
void CSND_SND::AcquireCapUnit(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x7, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
if (capture_units[0] && capture_units[1]) {
@ -446,7 +446,7 @@ void CSND_SND::AcquireCapUnit(Kernel::HLERequestContext& ctx) {
}
void CSND_SND::ReleaseCapUnit(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x8, 1, 0);
IPC::RequestParser rp(ctx);
const u32 index = rp.Pop<u32>();
capture_units[index] = false;
@ -458,7 +458,7 @@ void CSND_SND::ReleaseCapUnit(Kernel::HLERequestContext& ctx) {
}
void CSND_SND::FlushDataCache(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x9, 2, 2);
IPC::RequestParser rp(ctx);
[[maybe_unused]] const VAddr address = rp.Pop<u32>();
[[maybe_unused]] const u32 size = rp.Pop<u32>();
const auto process = rp.PopObject<Kernel::Process>();
@ -471,7 +471,7 @@ void CSND_SND::FlushDataCache(Kernel::HLERequestContext& ctx) {
}
void CSND_SND::StoreDataCache(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0xA, 2, 2);
IPC::RequestParser rp(ctx);
[[maybe_unused]] const VAddr address = rp.Pop<u32>();
[[maybe_unused]] const u32 size = rp.Pop<u32>();
const auto process = rp.PopObject<Kernel::Process>();
@ -484,7 +484,7 @@ void CSND_SND::StoreDataCache(Kernel::HLERequestContext& ctx) {
}
void CSND_SND::InvalidateDataCache(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0xB, 2, 2);
IPC::RequestParser rp(ctx);
[[maybe_unused]] const VAddr address = rp.Pop<u32>();
[[maybe_unused]] const u32 size = rp.Pop<u32>();
const auto process = rp.PopObject<Kernel::Process>();
@ -497,7 +497,7 @@ void CSND_SND::InvalidateDataCache(Kernel::HLERequestContext& ctx) {
}
void CSND_SND::Reset(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0xC, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
@ -508,18 +508,18 @@ void CSND_SND::Reset(Kernel::HLERequestContext& ctx) {
CSND_SND::CSND_SND(Core::System& system) : ServiceFramework("csnd:SND", 4), system(system) {
static const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0001, 5, 0), &CSND_SND::Initialize, "Initialize"},
{IPC::MakeHeader(0x0002, 0, 0), &CSND_SND::Shutdown, "Shutdown"},
{IPC::MakeHeader(0x0003, 1, 0), &CSND_SND::ExecuteCommands, "ExecuteCommands"},
{IPC::MakeHeader(0x0004, 2, 0), nullptr, "ExecuteType1Commands"},
{IPC::MakeHeader(0x0005, 0, 0), &CSND_SND::AcquireSoundChannels, "AcquireSoundChannels"},
{IPC::MakeHeader(0x0006, 0, 0), &CSND_SND::ReleaseSoundChannels, "ReleaseSoundChannels"},
{IPC::MakeHeader(0x0007, 0, 0), &CSND_SND::AcquireCapUnit, "AcquireCapUnit"},
{IPC::MakeHeader(0x0008, 1, 0), &CSND_SND::ReleaseCapUnit, "ReleaseCapUnit"},
{IPC::MakeHeader(0x0009, 2, 2), &CSND_SND::FlushDataCache, "FlushDataCache"},
{IPC::MakeHeader(0x000A, 2, 2), &CSND_SND::StoreDataCache, "StoreDataCache"},
{IPC::MakeHeader(0x000B, 2, 2), &CSND_SND::InvalidateDataCache, "InvalidateDataCache"},
{IPC::MakeHeader(0x000C, 0, 0), &CSND_SND::Reset, "Reset"},
{0x0001, &CSND_SND::Initialize, "Initialize"},
{0x0002, &CSND_SND::Shutdown, "Shutdown"},
{0x0003, &CSND_SND::ExecuteCommands, "ExecuteCommands"},
{0x0004, nullptr, "ExecuteType1Commands"},
{0x0005, &CSND_SND::AcquireSoundChannels, "AcquireSoundChannels"},
{0x0006, &CSND_SND::ReleaseSoundChannels, "ReleaseSoundChannels"},
{0x0007, &CSND_SND::AcquireCapUnit, "AcquireCapUnit"},
{0x0008, &CSND_SND::ReleaseCapUnit, "ReleaseCapUnit"},
{0x0009, &CSND_SND::FlushDataCache, "FlushDataCache"},
{0x000A, &CSND_SND::StoreDataCache, "StoreDataCache"},
{0x000B, &CSND_SND::InvalidateDataCache, "InvalidateDataCache"},
{0x000C, &CSND_SND::Reset, "Reset"},
// clang-format on
};

View File

@ -13,26 +13,26 @@ namespace Service::DLP {
DLP_CLNT::DLP_CLNT() : ServiceFramework("dlp:CLNT", 1) {
static const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0001, 3, 3), nullptr, "Initialize"},
{IPC::MakeHeader(0x0002, 0, 0), nullptr, "Finalize"},
{IPC::MakeHeader(0x0003, 0, 0), nullptr, "GetEventDesc"},
{IPC::MakeHeader(0x0004, 0, 0), nullptr, "GetChannel"},
{IPC::MakeHeader(0x0005, 6, 0), nullptr, "StartScan"},
{IPC::MakeHeader(0x0006, 0, 0), nullptr, "StopScan"},
{IPC::MakeHeader(0x0007, 2, 0), nullptr, "GetServerInfo"},
{IPC::MakeHeader(0x0008, 4, 0), nullptr, "GetTitleInfo"},
{IPC::MakeHeader(0x0009, 1, 0), nullptr, "GetTitleInfoInOrder"},
{IPC::MakeHeader(0x000A, 2, 0), nullptr, "DeleteScanInfo"},
{IPC::MakeHeader(0x000B, 4, 0), nullptr, "PrepareForSystemDownload"},
{IPC::MakeHeader(0x000C, 0, 0), nullptr, "StartSystemDownload"},
{IPC::MakeHeader(0x000D, 4, 0), nullptr, "StartTitleDownload"},
{IPC::MakeHeader(0x000E, 0, 0), nullptr, "GetMyStatus"},
{IPC::MakeHeader(0x000F, 1, 0), nullptr, "GetConnectingNodes"},
{IPC::MakeHeader(0x0010, 1, 0), nullptr, "GetNodeInfo"},
{IPC::MakeHeader(0x0011, 0, 0), nullptr, "GetWirelessRebootPassphrase"},
{IPC::MakeHeader(0x0012, 0, 0), nullptr, "StopSession"},
{IPC::MakeHeader(0x0013, 4, 0), nullptr, "GetCupVersion"},
{IPC::MakeHeader(0x0014, 4, 0), nullptr, "GetDupAvailability"},
{0x0001, nullptr, "Initialize"},
{0x0002, nullptr, "Finalize"},
{0x0003, nullptr, "GetEventDesc"},
{0x0004, nullptr, "GetChannel"},
{0x0005, nullptr, "StartScan"},
{0x0006, nullptr, "StopScan"},
{0x0007, nullptr, "GetServerInfo"},
{0x0008, nullptr, "GetTitleInfo"},
{0x0009, nullptr, "GetTitleInfoInOrder"},
{0x000A, nullptr, "DeleteScanInfo"},
{0x000B, nullptr, "PrepareForSystemDownload"},
{0x000C, nullptr, "StartSystemDownload"},
{0x000D, nullptr, "StartTitleDownload"},
{0x000E, nullptr, "GetMyStatus"},
{0x000F, nullptr, "GetConnectingNodes"},
{0x0010, nullptr, "GetNodeInfo"},
{0x0011, nullptr, "GetWirelessRebootPassphrase"},
{0x0012, nullptr, "StopSession"},
{0x0013, nullptr, "GetCupVersion"},
{0x0014, nullptr, "GetDupAvailability"},
// clang-format on
};

View File

@ -13,23 +13,23 @@ namespace Service::DLP {
DLP_FKCL::DLP_FKCL() : ServiceFramework("dlp:FKCL", 1) {
static const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0001, 2, 3), nullptr, "Initialize"},
{IPC::MakeHeader(0x0002, 0, 0), nullptr, "Finalize"},
{IPC::MakeHeader(0x0003, 0, 0), nullptr, "GetEventDesc"},
{IPC::MakeHeader(0x0004, 0, 0), nullptr, "GetChannels"},
{IPC::MakeHeader(0x0005, 6, 0), nullptr, "StartScan"},
{IPC::MakeHeader(0x0006, 0, 0), nullptr, "StopScan"},
{IPC::MakeHeader(0x0007, 2, 0), nullptr, "GetServerInfo"},
{IPC::MakeHeader(0x0008, 4, 0), nullptr, "GetTitleInfo"},
{IPC::MakeHeader(0x0009, 1, 0), nullptr, "GetTitleInfoInOrder"},
{IPC::MakeHeader(0x000A, 2, 0), nullptr, "DeleteScanInfo"},
{IPC::MakeHeader(0x000B, 4, 0), nullptr, "StartFakeSession"},
{IPC::MakeHeader(0x000C, 0, 0), nullptr, "GetMyStatus"},
{IPC::MakeHeader(0x000D, 1, 0), nullptr, "GetConnectingNodes"},
{IPC::MakeHeader(0x000E, 1, 0), nullptr, "GetNodeInfo"},
{IPC::MakeHeader(0x000F, 0, 0), nullptr, "GetWirelessRebootPassphrase"},
{IPC::MakeHeader(0x0010, 0, 0), nullptr, "StopSession"},
{IPC::MakeHeader(0x0011, 8, 3), nullptr, "Initialize2"},
{0x0001, nullptr, "Initialize"},
{0x0002, nullptr, "Finalize"},
{0x0003, nullptr, "GetEventDesc"},
{0x0004, nullptr, "GetChannels"},
{0x0005, nullptr, "StartScan"},
{0x0006, nullptr, "StopScan"},
{0x0007, nullptr, "GetServerInfo"},
{0x0008, nullptr, "GetTitleInfo"},
{0x0009, nullptr, "GetTitleInfoInOrder"},
{0x000A, nullptr, "DeleteScanInfo"},
{0x000B, nullptr, "StartFakeSession"},
{0x000C, nullptr, "GetMyStatus"},
{0x000D, nullptr, "GetConnectingNodes"},
{0x000E, nullptr, "GetNodeInfo"},
{0x000F, nullptr, "GetWirelessRebootPassphrase"},
{0x0010, nullptr, "StopSession"},
{0x0011, nullptr, "Initialize2"},
// clang-format on
};

View File

@ -14,7 +14,7 @@ SERIALIZE_EXPORT_IMPL(Service::DLP::DLP_SRVR)
namespace Service::DLP {
void DLP_SRVR::IsChild(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0E, 1, 0);
IPC::RequestParser rp(ctx);
rp.Skip(1, false);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
@ -27,22 +27,22 @@ void DLP_SRVR::IsChild(Kernel::HLERequestContext& ctx) {
DLP_SRVR::DLP_SRVR() : ServiceFramework("dlp:SRVR", 1) {
static const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0001, 6, 3), nullptr, "Initialize"},
{IPC::MakeHeader(0x0002, 0, 0), nullptr, "Finalize"},
{IPC::MakeHeader(0x0003, 0, 0), nullptr, "GetServerState"},
{IPC::MakeHeader(0x0004, 0, 0), nullptr, "GetEventDescription"},
{IPC::MakeHeader(0x0005, 2, 0), nullptr, "StartAccepting"},
{IPC::MakeHeader(0x0006, 0, 0), nullptr, "EndAccepting"},
{IPC::MakeHeader(0x0007, 0, 0), nullptr, "StartDistribution"},
{IPC::MakeHeader(0x0008, 3, 0), nullptr, "SendWirelessRebootPassphrase"},
{IPC::MakeHeader(0x0009, 1, 0), nullptr, "AcceptClient"},
{IPC::MakeHeader(0x000A, 1, 0), nullptr, "DisconnectClient"},
{IPC::MakeHeader(0x000B, 1, 2), nullptr, "GetConnectingClients"},
{IPC::MakeHeader(0x000C, 1, 0), nullptr, "GetClientInfo"},
{IPC::MakeHeader(0x000D, 1, 0), nullptr, "GetClientState"},
{IPC::MakeHeader(0x000E, 1, 0), &DLP_SRVR::IsChild, "IsChild"},
{IPC::MakeHeader(0x000F, 12, 3), nullptr, "InitializeWithName"},
{IPC::MakeHeader(0x0010, 0, 0), nullptr, "GetDupNoticeNeed"},
{0x0001, nullptr, "Initialize"},
{0x0002, nullptr, "Finalize"},
{0x0003, nullptr, "GetServerState"},
{0x0004, nullptr, "GetEventDescription"},
{0x0005, nullptr, "StartAccepting"},
{0x0006, nullptr, "EndAccepting"},
{0x0007, nullptr, "StartDistribution"},
{0x0008, nullptr, "SendWirelessRebootPassphrase"},
{0x0009, nullptr, "AcceptClient"},
{0x000A, nullptr, "DisconnectClient"},
{0x000B, nullptr, "GetConnectingClients"},
{0x000C, nullptr, "GetClientInfo"},
{0x000D, nullptr, "GetClientState"},
{0x000E, &DLP_SRVR::IsChild, "IsChild"},
{0x000F, nullptr, "InitializeWithName"},
{0x0010, nullptr, "GetDupNoticeNeed"},
// clang-format on
};

View File

@ -24,7 +24,7 @@ enum class DspPipe;
namespace Service::DSP {
void DSP_DSP::RecvData(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x01, 1, 0);
IPC::RequestParser rp(ctx);
const u32 register_number = rp.Pop<u32>();
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
@ -35,7 +35,7 @@ void DSP_DSP::RecvData(Kernel::HLERequestContext& ctx) {
}
void DSP_DSP::RecvDataIsReady(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x02, 1, 0);
IPC::RequestParser rp(ctx);
const u32 register_number = rp.Pop<u32>();
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
@ -46,7 +46,7 @@ void DSP_DSP::RecvDataIsReady(Kernel::HLERequestContext& ctx) {
}
void DSP_DSP::SetSemaphore(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x07, 1, 0);
IPC::RequestParser rp(ctx);
const u16 semaphore_value = rp.Pop<u16>();
system.DSP().SetSemaphore(semaphore_value);
@ -58,7 +58,7 @@ void DSP_DSP::SetSemaphore(Kernel::HLERequestContext& ctx) {
}
void DSP_DSP::ConvertProcessAddressFromDspDram(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0C, 1, 0);
IPC::RequestParser rp(ctx);
const u32 address = rp.Pop<u32>();
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
@ -72,7 +72,7 @@ void DSP_DSP::ConvertProcessAddressFromDspDram(Kernel::HLERequestContext& ctx) {
}
void DSP_DSP::WriteProcessPipe(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0D, 2, 2);
IPC::RequestParser rp(ctx);
const u32 channel = rp.Pop<u32>();
const u32 size = rp.Pop<u32>();
auto buffer = rp.PopStaticBuffer();
@ -110,7 +110,7 @@ void DSP_DSP::WriteProcessPipe(Kernel::HLERequestContext& ctx) {
}
void DSP_DSP::ReadPipe(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0E, 3, 0);
IPC::RequestParser rp(ctx);
const u32 channel = rp.Pop<u32>();
const u32 peer = rp.Pop<u32>();
const u16 size = rp.Pop<u16>();
@ -133,7 +133,7 @@ void DSP_DSP::ReadPipe(Kernel::HLERequestContext& ctx) {
}
void DSP_DSP::GetPipeReadableSize(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0F, 2, 0);
IPC::RequestParser rp(ctx);
const u32 channel = rp.Pop<u32>();
const u32 peer = rp.Pop<u32>();
@ -149,7 +149,7 @@ void DSP_DSP::GetPipeReadableSize(Kernel::HLERequestContext& ctx) {
}
void DSP_DSP::ReadPipeIfPossible(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x10, 3, 0);
IPC::RequestParser rp(ctx);
const u32 channel = rp.Pop<u32>();
const u32 peer = rp.Pop<u32>();
const u16 size = rp.Pop<u16>();
@ -172,7 +172,7 @@ void DSP_DSP::ReadPipeIfPossible(Kernel::HLERequestContext& ctx) {
}
void DSP_DSP::LoadComponent(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x11, 3, 2);
IPC::RequestParser rp(ctx);
const u32 size = rp.Pop<u32>();
const u32 prog_mask = rp.Pop<u32>();
const u32 data_mask = rp.Pop<u32>();
@ -193,7 +193,7 @@ void DSP_DSP::LoadComponent(Kernel::HLERequestContext& ctx) {
}
void DSP_DSP::UnloadComponent(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x12, 0, 0);
IPC::RequestParser rp(ctx);
system.DSP().UnloadComponent();
@ -204,7 +204,7 @@ void DSP_DSP::UnloadComponent(Kernel::HLERequestContext& ctx) {
}
void DSP_DSP::FlushDataCache(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x13, 2, 2);
IPC::RequestParser rp(ctx);
[[maybe_unused]] const VAddr address = rp.Pop<u32>();
[[maybe_unused]] const u32 size = rp.Pop<u32>();
const auto process = rp.PopObject<Kernel::Process>();
@ -217,7 +217,7 @@ void DSP_DSP::FlushDataCache(Kernel::HLERequestContext& ctx) {
}
void DSP_DSP::InvalidateDataCache(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x14, 2, 2);
IPC::RequestParser rp(ctx);
[[maybe_unused]] const VAddr address = rp.Pop<u32>();
[[maybe_unused]] const u32 size = rp.Pop<u32>();
const auto process = rp.PopObject<Kernel::Process>();
@ -230,7 +230,7 @@ void DSP_DSP::InvalidateDataCache(Kernel::HLERequestContext& ctx) {
}
void DSP_DSP::RegisterInterruptEvents(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x15, 2, 2);
IPC::RequestParser rp(ctx);
const u32 interrupt = rp.Pop<u32>();
const u32 channel = rp.Pop<u32>();
auto event = rp.PopObject<Kernel::Event>();
@ -265,7 +265,7 @@ void DSP_DSP::RegisterInterruptEvents(Kernel::HLERequestContext& ctx) {
}
void DSP_DSP::GetSemaphoreEventHandle(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x16, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 2);
rb.Push(RESULT_SUCCESS);
@ -275,7 +275,7 @@ void DSP_DSP::GetSemaphoreEventHandle(Kernel::HLERequestContext& ctx) {
}
void DSP_DSP::SetSemaphoreMask(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x17, 1, 0);
IPC::RequestParser rp(ctx);
preset_semaphore = rp.Pop<u16>();
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
@ -285,7 +285,7 @@ void DSP_DSP::SetSemaphoreMask(Kernel::HLERequestContext& ctx) {
}
void DSP_DSP::GetHeadphoneStatus(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1F, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
@ -295,7 +295,7 @@ void DSP_DSP::GetHeadphoneStatus(Kernel::HLERequestContext& ctx) {
}
void DSP_DSP::ForceHeadphoneOut(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x20, 1, 0);
IPC::RequestParser rp(ctx);
const u8 force = rp.Pop<u8>();
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
@ -347,39 +347,39 @@ DSP_DSP::DSP_DSP(Core::System& system)
: ServiceFramework("dsp::DSP", DefaultMaxSessions), system(system) {
static const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0001, 1, 0), &DSP_DSP::RecvData, "RecvData"},
{IPC::MakeHeader(0x0002, 1, 0), &DSP_DSP::RecvDataIsReady, "RecvDataIsReady"},
{IPC::MakeHeader(0x0003, 2, 0), nullptr, "SendData"},
{IPC::MakeHeader(0x0004, 1, 0), nullptr, "SendDataIsEmpty"},
{IPC::MakeHeader(0x0005, 3, 2), nullptr, "SendFifoEx"},
{IPC::MakeHeader(0x0006, 3, 0), nullptr, "RecvFifoEx"},
{IPC::MakeHeader(0x0007, 1, 0), &DSP_DSP::SetSemaphore, "SetSemaphore"},
{IPC::MakeHeader(0x0008, 0, 0), nullptr, "GetSemaphore"},
{IPC::MakeHeader(0x0009, 1, 0), nullptr, "ClearSemaphore"},
{IPC::MakeHeader(0x000A, 1, 0), nullptr, "MaskSemaphore"},
{IPC::MakeHeader(0x000B, 0, 0), nullptr, "CheckSemaphoreRequest"},
{IPC::MakeHeader(0x000C, 1, 0), &DSP_DSP::ConvertProcessAddressFromDspDram, "ConvertProcessAddressFromDspDram"},
{IPC::MakeHeader(0x000D, 2, 2), &DSP_DSP::WriteProcessPipe, "WriteProcessPipe"},
{IPC::MakeHeader(0x000E, 3, 0), &DSP_DSP::ReadPipe, "ReadPipe"},
{IPC::MakeHeader(0x000F, 2, 0), &DSP_DSP::GetPipeReadableSize, "GetPipeReadableSize"},
{IPC::MakeHeader(0x0010, 3, 0), &DSP_DSP::ReadPipeIfPossible, "ReadPipeIfPossible"},
{IPC::MakeHeader(0x0011, 3, 2), &DSP_DSP::LoadComponent, "LoadComponent"},
{IPC::MakeHeader(0x0012, 0, 0), &DSP_DSP::UnloadComponent, "UnloadComponent"},
{IPC::MakeHeader(0x0013, 2, 2), &DSP_DSP::FlushDataCache, "FlushDataCache"},
{IPC::MakeHeader(0x0014, 2, 2), &DSP_DSP::InvalidateDataCache, "InvalidateDCache"},
{IPC::MakeHeader(0x0015, 2, 2), &DSP_DSP::RegisterInterruptEvents, "RegisterInterruptEvents"},
{IPC::MakeHeader(0x0016, 0, 0), &DSP_DSP::GetSemaphoreEventHandle, "GetSemaphoreEventHandle"},
{IPC::MakeHeader(0x0017, 1, 0), &DSP_DSP::SetSemaphoreMask, "SetSemaphoreMask"},
{IPC::MakeHeader(0x0018, 1, 0), nullptr, "GetPhysicalAddress"},
{IPC::MakeHeader(0x0019, 1, 0), nullptr, "GetVirtualAddress"},
{IPC::MakeHeader(0x001A, 1, 2), nullptr, "SetIirFilterI2S1_cmd1"},
{IPC::MakeHeader(0x001B, 1, 2), nullptr, "SetIirFilterI2S1_cmd2"},
{IPC::MakeHeader(0x001C, 2, 2), nullptr, "SetIirFilterEQ"},
{IPC::MakeHeader(0x001D, 3, 0), nullptr, "ReadMultiEx_SPI2"},
{IPC::MakeHeader(0x001E, 3, 2), nullptr, "WriteMultiEx_SPI2"},
{IPC::MakeHeader(0x001F, 0, 0), &DSP_DSP::GetHeadphoneStatus, "GetHeadphoneStatus"},
{IPC::MakeHeader(0x0020, 1, 0), &DSP_DSP::ForceHeadphoneOut, "ForceHeadphoneOut"},
{IPC::MakeHeader(0x0021, 0, 0), nullptr, "GetIsDspOccupied"},
{0x0001, &DSP_DSP::RecvData, "RecvData"},
{0x0002, &DSP_DSP::RecvDataIsReady, "RecvDataIsReady"},
{0x0003, nullptr, "SendData"},
{0x0004, nullptr, "SendDataIsEmpty"},
{0x0005, nullptr, "SendFifoEx"},
{0x0006, nullptr, "RecvFifoEx"},
{0x0007, &DSP_DSP::SetSemaphore, "SetSemaphore"},
{0x0008, nullptr, "GetSemaphore"},
{0x0009, nullptr, "ClearSemaphore"},
{0x000A, nullptr, "MaskSemaphore"},
{0x000B, nullptr, "CheckSemaphoreRequest"},
{0x000C, &DSP_DSP::ConvertProcessAddressFromDspDram, "ConvertProcessAddressFromDspDram"},
{0x000D, &DSP_DSP::WriteProcessPipe, "WriteProcessPipe"},
{0x000E, &DSP_DSP::ReadPipe, "ReadPipe"},
{0x000F, &DSP_DSP::GetPipeReadableSize, "GetPipeReadableSize"},
{0x0010, &DSP_DSP::ReadPipeIfPossible, "ReadPipeIfPossible"},
{0x0011, &DSP_DSP::LoadComponent, "LoadComponent"},
{0x0012, &DSP_DSP::UnloadComponent, "UnloadComponent"},
{0x0013, &DSP_DSP::FlushDataCache, "FlushDataCache"},
{0x0014, &DSP_DSP::InvalidateDataCache, "InvalidateDCache"},
{0x0015, &DSP_DSP::RegisterInterruptEvents, "RegisterInterruptEvents"},
{0x0016, &DSP_DSP::GetSemaphoreEventHandle, "GetSemaphoreEventHandle"},
{0x0017, &DSP_DSP::SetSemaphoreMask, "SetSemaphoreMask"},
{0x0018, nullptr, "GetPhysicalAddress"},
{0x0019, nullptr, "GetVirtualAddress"},
{0x001A, nullptr, "SetIirFilterI2S1_cmd1"},
{0x001B, nullptr, "SetIirFilterI2S1_cmd2"},
{0x001C, nullptr, "SetIirFilterEQ"},
{0x001D, nullptr, "ReadMultiEx_SPI2"},
{0x001E, nullptr, "WriteMultiEx_SPI2"},
{0x001F, &DSP_DSP::GetHeadphoneStatus, "GetHeadphoneStatus"},
{0x0020, &DSP_DSP::ForceHeadphoneOut, "ForceHeadphoneOut"},
{0x0021, nullptr, "GetIsDspOccupied"},
// clang-format on
};

View File

@ -164,7 +164,7 @@ static void LogGenericInfo(const ErrInfo::ErrInfoCommon& errinfo_common) {
}
void ERR_F::ThrowFatalError(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 1, 32, 0);
IPC::RequestParser rp(ctx);
LOG_CRITICAL(Service_ERR, "Fatal error");
const ErrInfo errinfo = rp.PopRaw<ErrInfo>();
@ -250,8 +250,8 @@ void ERR_F::ThrowFatalError(Kernel::HLERequestContext& ctx) {
ERR_F::ERR_F(Core::System& system) : ServiceFramework("err:f", 1), system(system) {
static const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0001, 32, 0), &ERR_F::ThrowFatalError, "ThrowFatalError"},
{IPC::MakeHeader(0x0002, 1, 2), nullptr, "SetUserString"},
{0x0001, &ERR_F::ThrowFatalError, "ThrowFatalError"},
{0x0002, nullptr, "SetUserString"},
// clang-format on
};
RegisterHandlers(functions);

View File

@ -26,7 +26,7 @@ Module::Interface::Interface(std::shared_ptr<Module> frd, const char* name, u32
Module::Interface::~Interface() = default;
void Module::Interface::GetMyPresence(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x08, 0, 0);
IPC::RequestParser rp(ctx);
std::vector<u8> buffer(sizeof(MyPresence));
std::memcpy(buffer.data(), &frd->my_presence, buffer.size());
@ -39,7 +39,7 @@ void Module::Interface::GetMyPresence(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetFriendKeyList(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x11, 2, 0);
IPC::RequestParser rp(ctx);
const u32 unknown = rp.Pop<u32>();
const u32 frd_count = rp.Pop<u32>();
@ -54,7 +54,7 @@ void Module::Interface::GetFriendKeyList(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetFriendProfile(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x15, 1, 2);
IPC::RequestParser rp(ctx);
const u32 count = rp.Pop<u32>();
const std::vector<u8> frd_keys = rp.PopStaticBuffer();
ASSERT(frd_keys.size() == count * sizeof(FriendKey));
@ -69,7 +69,7 @@ void Module::Interface::GetFriendProfile(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetFriendAttributeFlags(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x17, 1, 2);
IPC::RequestParser rp(ctx);
const u32 count = rp.Pop<u32>();
const std::vector<u8> frd_keys = rp.PopStaticBuffer();
ASSERT(frd_keys.size() == count * sizeof(FriendKey));
@ -84,7 +84,7 @@ void Module::Interface::GetFriendAttributeFlags(Kernel::HLERequestContext& ctx)
}
void Module::Interface::GetMyFriendKey(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x5, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(5, 0);
rb.Push(RESULT_SUCCESS);
rb.PushRaw(frd->my_friend_key);
@ -93,7 +93,7 @@ void Module::Interface::GetMyFriendKey(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetMyScreenName(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x9, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(7, 0);
struct ScreenName {
@ -119,7 +119,7 @@ void Module::Interface::UnscrambleLocalFriendCode(Kernel::HLERequestContext& ctx
const std::size_t scrambled_friend_code_size = 12;
const std::size_t friend_code_size = 8;
IPC::RequestParser rp(ctx, 0x1C, 1, 2);
IPC::RequestParser rp(ctx);
const u32 friend_code_count = rp.Pop<u32>();
const std::vector<u8> scrambled_friend_codes = rp.PopStaticBuffer();
ASSERT_MSG(scrambled_friend_codes.size() == (friend_code_count * scrambled_friend_code_size),
@ -147,7 +147,7 @@ void Module::Interface::UnscrambleLocalFriendCode(Kernel::HLERequestContext& ctx
}
void Module::Interface::SetClientSdkVersion(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x32, 1, 2);
IPC::RequestParser rp(ctx);
u32 version = rp.Pop<u32>();
rp.PopPID();

View File

@ -11,59 +11,59 @@ namespace Service::FRD {
FRD_A::FRD_A(std::shared_ptr<Module> frd) : Module::Interface(std::move(frd), "frd:a", 8) {
static const FunctionInfo functions[] = {
{0x00010000, nullptr, "HasLoggedIn"},
{0x00020000, nullptr, "IsOnline"},
{0x00030000, nullptr, "Login"},
{0x00040000, nullptr, "Logout"},
{0x00050000, &FRD_A::GetMyFriendKey, "GetMyFriendKey"},
{0x00060000, nullptr, "GetMyPreference"},
{0x00070000, nullptr, "GetMyProfile"},
{0x00080000, &FRD_A::GetMyPresence, "GetMyPresence"},
{0x00090000, &FRD_A::GetMyScreenName, "GetMyScreenName"},
{0x000A0000, nullptr, "GetMyMii"},
{0x000B0000, nullptr, "GetMyLocalAccountId"},
{0x000C0000, nullptr, "GetMyPlayingGame"},
{0x000D0000, nullptr, "GetMyFavoriteGame"},
{0x000E0000, nullptr, "GetMyNcPrincipalId"},
{0x000F0000, nullptr, "GetMyComment"},
{0x00100040, nullptr, "GetMyPassword"},
{0x00110080, &FRD_A::GetFriendKeyList, "GetFriendKeyList"},
{0x00120042, nullptr, "GetFriendPresence"},
{0x00130142, nullptr, "GetFriendScreenName"},
{0x00140044, nullptr, "GetFriendMii"},
{0x00150042, &FRD_A::GetFriendProfile, "GetFriendProfile"},
{0x00160042, nullptr, "GetFriendRelationship"},
{0x00170042, &FRD_A::GetFriendAttributeFlags, "GetFriendAttributeFlags"},
{0x00180044, nullptr, "GetFriendPlayingGame"},
{0x00190042, nullptr, "GetFriendFavoriteGame"},
{0x001A00C4, nullptr, "GetFriendInfo"},
{0x001B0080, nullptr, "IsIncludedInFriendList"},
{0x001C0042, &FRD_A::UnscrambleLocalFriendCode, "UnscrambleLocalFriendCode"},
{0x001D0002, nullptr, "UpdateGameModeDescription"},
{0x001E02C2, nullptr, "UpdateGameMode"},
{0x001F0042, nullptr, "SendInvitation"},
{0x00200002, nullptr, "AttachToEventNotification"},
{0x00210040, nullptr, "SetNotificationMask"},
{0x00220040, nullptr, "GetEventNotification"},
{0x00230000, nullptr, "GetLastResponseResult"},
{0x00240040, nullptr, "PrincipalIdToFriendCode"},
{0x00250080, nullptr, "FriendCodeToPrincipalId"},
{0x00260080, nullptr, "IsValidFriendCode"},
{0x00270040, nullptr, "ResultToErrorCode"},
{0x00280244, nullptr, "RequestGameAuthentication"},
{0x00290000, nullptr, "GetGameAuthenticationData"},
{0x002A0204, nullptr, "RequestServiceLocator"},
{0x002B0000, nullptr, "GetServiceLocatorData"},
{0x002C0002, nullptr, "DetectNatProperties"},
{0x002D0000, nullptr, "GetNatProperties"},
{0x002E0000, nullptr, "GetServerTimeInterval"},
{0x002F0040, nullptr, "AllowHalfAwake"},
{0x00300000, nullptr, "GetServerTypes"},
{0x00310082, nullptr, "GetFriendComment"},
{0x00320042, &FRD_A::SetClientSdkVersion, "SetClientSdkVersion"},
{0x00330000, nullptr, "GetMyApproachContext"},
{0x00340046, nullptr, "AddFriendWithApproach"},
{0x00350082, nullptr, "DecryptApproachContext"},
{0x0001, nullptr, "HasLoggedIn"},
{0x0002, nullptr, "IsOnline"},
{0x0003, nullptr, "Login"},
{0x0004, nullptr, "Logout"},
{0x0005, &FRD_A::GetMyFriendKey, "GetMyFriendKey"},
{0x0006, nullptr, "GetMyPreference"},
{0x0007, nullptr, "GetMyProfile"},
{0x0008, &FRD_A::GetMyPresence, "GetMyPresence"},
{0x0009, &FRD_A::GetMyScreenName, "GetMyScreenName"},
{0x000A, nullptr, "GetMyMii"},
{0x000B, nullptr, "GetMyLocalAccountId"},
{0x000C, nullptr, "GetMyPlayingGame"},
{0x000D, nullptr, "GetMyFavoriteGame"},
{0x000E, nullptr, "GetMyNcPrincipalId"},
{0x000F, nullptr, "GetMyComment"},
{0x0010, nullptr, "GetMyPassword"},
{0x0011, &FRD_A::GetFriendKeyList, "GetFriendKeyList"},
{0x0012, nullptr, "GetFriendPresence"},
{0x0013, nullptr, "GetFriendScreenName"},
{0x0014, nullptr, "GetFriendMii"},
{0x0015, &FRD_A::GetFriendProfile, "GetFriendProfile"},
{0x0016, nullptr, "GetFriendRelationship"},
{0x0017, &FRD_A::GetFriendAttributeFlags, "GetFriendAttributeFlags"},
{0x0018, nullptr, "GetFriendPlayingGame"},
{0x0019, nullptr, "GetFriendFavoriteGame"},
{0x001A, nullptr, "GetFriendInfo"},
{0x001B, nullptr, "IsIncludedInFriendList"},
{0x001C, &FRD_A::UnscrambleLocalFriendCode, "UnscrambleLocalFriendCode"},
{0x001D, nullptr, "UpdateGameModeDescription"},
{0x001E, nullptr, "UpdateGameMode"},
{0x001F, nullptr, "SendInvitation"},
{0x0020, nullptr, "AttachToEventNotification"},
{0x0021, nullptr, "SetNotificationMask"},
{0x0022, nullptr, "GetEventNotification"},
{0x0023, nullptr, "GetLastResponseResult"},
{0x0024, nullptr, "PrincipalIdToFriendCode"},
{0x0025, nullptr, "FriendCodeToPrincipalId"},
{0x0026, nullptr, "IsValidFriendCode"},
{0x0027, nullptr, "ResultToErrorCode"},
{0x0028, nullptr, "RequestGameAuthentication"},
{0x0029, nullptr, "GetGameAuthenticationData"},
{0x002A, nullptr, "RequestServiceLocator"},
{0x002B, nullptr, "GetServiceLocatorData"},
{0x002C, nullptr, "DetectNatProperties"},
{0x002D, nullptr, "GetNatProperties"},
{0x002E, nullptr, "GetServerTimeInterval"},
{0x002F, nullptr, "AllowHalfAwake"},
{0x0030, nullptr, "GetServerTypes"},
{0x0031, nullptr, "GetFriendComment"},
{0x0032, &FRD_A::SetClientSdkVersion, "SetClientSdkVersion"},
{0x0033, nullptr, "GetMyApproachContext"},
{0x0034, nullptr, "AddFriendWithApproach"},
{0x0035, nullptr, "DecryptApproachContext"},
};
RegisterHandlers(functions);
}

View File

@ -11,59 +11,59 @@ namespace Service::FRD {
FRD_U::FRD_U(std::shared_ptr<Module> frd) : Module::Interface(std::move(frd), "frd:u", 8) {
static const FunctionInfo functions[] = {
{0x00010000, nullptr, "HasLoggedIn"},
{0x00020000, nullptr, "IsOnline"},
{0x00030000, nullptr, "Login"},
{0x00040000, nullptr, "Logout"},
{0x00050000, &FRD_U::GetMyFriendKey, "GetMyFriendKey"},
{0x00060000, nullptr, "GetMyPreference"},
{0x00070000, nullptr, "GetMyProfile"},
{0x00080000, &FRD_U::GetMyPresence, "GetMyPresence"},
{0x00090000, &FRD_U::GetMyScreenName, "GetMyScreenName"},
{0x000A0000, nullptr, "GetMyMii"},
{0x000B0000, nullptr, "GetMyLocalAccountId"},
{0x000C0000, nullptr, "GetMyPlayingGame"},
{0x000D0000, nullptr, "GetMyFavoriteGame"},
{0x000E0000, nullptr, "GetMyNcPrincipalId"},
{0x000F0000, nullptr, "GetMyComment"},
{0x00100040, nullptr, "GetMyPassword"},
{0x00110080, &FRD_U::GetFriendKeyList, "GetFriendKeyList"},
{0x00120042, nullptr, "GetFriendPresence"},
{0x00130142, nullptr, "GetFriendScreenName"},
{0x00140044, nullptr, "GetFriendMii"},
{0x00150042, &FRD_U::GetFriendProfile, "GetFriendProfile"},
{0x00160042, nullptr, "GetFriendRelationship"},
{0x00170042, &FRD_U::GetFriendAttributeFlags, "GetFriendAttributeFlags"},
{0x00180044, nullptr, "GetFriendPlayingGame"},
{0x00190042, nullptr, "GetFriendFavoriteGame"},
{0x001A00C4, nullptr, "GetFriendInfo"},
{0x001B0080, nullptr, "IsIncludedInFriendList"},
{0x001C0042, &FRD_U::UnscrambleLocalFriendCode, "UnscrambleLocalFriendCode"},
{0x001D0002, nullptr, "UpdateGameModeDescription"},
{0x001E02C2, nullptr, "UpdateGameMode"},
{0x001F0042, nullptr, "SendInvitation"},
{0x00200002, nullptr, "AttachToEventNotification"},
{0x00210040, nullptr, "SetNotificationMask"},
{0x00220040, nullptr, "GetEventNotification"},
{0x00230000, nullptr, "GetLastResponseResult"},
{0x00240040, nullptr, "PrincipalIdToFriendCode"},
{0x00250080, nullptr, "FriendCodeToPrincipalId"},
{0x00260080, nullptr, "IsValidFriendCode"},
{0x00270040, nullptr, "ResultToErrorCode"},
{0x00280244, nullptr, "RequestGameAuthentication"},
{0x00290000, nullptr, "GetGameAuthenticationData"},
{0x002A0204, nullptr, "RequestServiceLocator"},
{0x002B0000, nullptr, "GetServiceLocatorData"},
{0x002C0002, nullptr, "DetectNatProperties"},
{0x002D0000, nullptr, "GetNatProperties"},
{0x002E0000, nullptr, "GetServerTimeInterval"},
{0x002F0040, nullptr, "AllowHalfAwake"},
{0x00300000, nullptr, "GetServerTypes"},
{0x00310082, nullptr, "GetFriendComment"},
{0x00320042, &FRD_U::SetClientSdkVersion, "SetClientSdkVersion"},
{0x00330000, nullptr, "GetMyApproachContext"},
{0x00340046, nullptr, "AddFriendWithApproach"},
{0x00350082, nullptr, "DecryptApproachContext"},
{0x0001, nullptr, "HasLoggedIn"},
{0x0002, nullptr, "IsOnline"},
{0x0003, nullptr, "Login"},
{0x0004, nullptr, "Logout"},
{0x0005, &FRD_U::GetMyFriendKey, "GetMyFriendKey"},
{0x0006, nullptr, "GetMyPreference"},
{0x0007, nullptr, "GetMyProfile"},
{0x0008, &FRD_U::GetMyPresence, "GetMyPresence"},
{0x0009, &FRD_U::GetMyScreenName, "GetMyScreenName"},
{0x000A, nullptr, "GetMyMii"},
{0x000B, nullptr, "GetMyLocalAccountId"},
{0x000C, nullptr, "GetMyPlayingGame"},
{0x000D, nullptr, "GetMyFavoriteGame"},
{0x000E, nullptr, "GetMyNcPrincipalId"},
{0x000F, nullptr, "GetMyComment"},
{0x0010, nullptr, "GetMyPassword"},
{0x0011, &FRD_U::GetFriendKeyList, "GetFriendKeyList"},
{0x0012, nullptr, "GetFriendPresence"},
{0x0013, nullptr, "GetFriendScreenName"},
{0x0014, nullptr, "GetFriendMii"},
{0x0015, &FRD_U::GetFriendProfile, "GetFriendProfile"},
{0x0016, nullptr, "GetFriendRelationship"},
{0x0017, &FRD_U::GetFriendAttributeFlags, "GetFriendAttributeFlags"},
{0x0018, nullptr, "GetFriendPlayingGame"},
{0x0019, nullptr, "GetFriendFavoriteGame"},
{0x001A, nullptr, "GetFriendInfo"},
{0x001B, nullptr, "IsIncludedInFriendList"},
{0x001C, &FRD_U::UnscrambleLocalFriendCode, "UnscrambleLocalFriendCode"},
{0x001D, nullptr, "UpdateGameModeDescription"},
{0x001E, nullptr, "UpdateGameMode"},
{0x001F, nullptr, "SendInvitation"},
{0x0020, nullptr, "AttachToEventNotification"},
{0x0021, nullptr, "SetNotificationMask"},
{0x0022, nullptr, "GetEventNotification"},
{0x0023, nullptr, "GetLastResponseResult"},
{0x0024, nullptr, "PrincipalIdToFriendCode"},
{0x0025, nullptr, "FriendCodeToPrincipalId"},
{0x0026, nullptr, "IsValidFriendCode"},
{0x0027, nullptr, "ResultToErrorCode"},
{0x0028, nullptr, "RequestGameAuthentication"},
{0x0029, nullptr, "GetGameAuthenticationData"},
{0x002A, nullptr, "RequestServiceLocator"},
{0x002B, nullptr, "GetServiceLocatorData"},
{0x002C, nullptr, "DetectNatProperties"},
{0x002D, nullptr, "GetNatProperties"},
{0x002E, nullptr, "GetServerTimeInterval"},
{0x002F, nullptr, "AllowHalfAwake"},
{0x0030, nullptr, "GetServerTypes"},
{0x0031, nullptr, "GetFriendComment"},
{0x0032, &FRD_U::SetClientSdkVersion, "SetClientSdkVersion"},
{0x0033, nullptr, "GetMyApproachContext"},
{0x0034, nullptr, "AddFriendWithApproach"},
{0x0035, nullptr, "DecryptApproachContext"},
};
RegisterHandlers(functions);
}

View File

@ -31,8 +31,8 @@ Directory::Directory(std::unique_ptr<FileSys::DirectoryBackend>&& backend,
Directory::Directory() : ServiceFramework("", 1), path(""), backend(nullptr) {
static const FunctionInfo functions[] = {
// clang-format off
{0x08010042, &Directory::Read, "Read"},
{0x08020000, &Directory::Close, "Close"},
{0x0801, &Directory::Read, "Read"},
{0x0802, &Directory::Close, "Close"},
// clang-format on
};
RegisterHandlers(functions);
@ -41,7 +41,7 @@ Directory::Directory() : ServiceFramework("", 1), path(""), backend(nullptr) {
Directory::~Directory() {}
void Directory::Read(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0801, 1, 2);
IPC::RequestParser rp(ctx);
u32 count = rp.Pop<u32>();
auto& buffer = rp.PopMappedBuffer();
std::vector<FileSys::Entry> entries(count);
@ -57,7 +57,7 @@ void Directory::Read(Kernel::HLERequestContext& ctx) {
}
void Directory::Close(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0802, 0, 0);
IPC::RequestParser rp(ctx);
LOG_TRACE(Service_FS, "Close {}", GetName());
backend->Close();

View File

@ -39,22 +39,22 @@ File::File(Kernel::KernelSystem& kernel, std::unique_ptr<FileSys::FileBackend>&&
File::File(Kernel::KernelSystem& kernel)
: ServiceFramework("", 1), path(""), backend(nullptr), kernel(kernel) {
static const FunctionInfo functions[] = {
{0x08010100, &File::OpenSubFile, "OpenSubFile"},
{0x080200C2, &File::Read, "Read"},
{0x08030102, &File::Write, "Write"},
{0x08040000, &File::GetSize, "GetSize"},
{0x08050080, &File::SetSize, "SetSize"},
{0x08080000, &File::Close, "Close"},
{0x08090000, &File::Flush, "Flush"},
{0x080A0040, &File::SetPriority, "SetPriority"},
{0x080B0000, &File::GetPriority, "GetPriority"},
{0x080C0000, &File::OpenLinkFile, "OpenLinkFile"},
{0x0801, &File::OpenSubFile, "OpenSubFile"},
{0x0802, &File::Read, "Read"},
{0x0803, &File::Write, "Write"},
{0x0804, &File::GetSize, "GetSize"},
{0x0805, &File::SetSize, "SetSize"},
{0x0808, &File::Close, "Close"},
{0x0809, &File::Flush, "Flush"},
{0x080A, &File::SetPriority, "SetPriority"},
{0x080B, &File::GetPriority, "GetPriority"},
{0x080C, &File::OpenLinkFile, "OpenLinkFile"},
};
RegisterHandlers(functions);
}
void File::Read(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0802, 3, 2);
IPC::RequestParser rp(ctx);
u64 offset = rp.Pop<u64>();
u32 length = rp.Pop<u32>();
auto& buffer = rp.PopMappedBuffer();
@ -95,7 +95,7 @@ void File::Read(Kernel::HLERequestContext& ctx) {
}
void File::Write(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0803, 4, 2);
IPC::RequestParser rp(ctx);
u64 offset = rp.Pop<u64>();
u32 length = rp.Pop<u32>();
u32 flush = rp.Pop<u32>();
@ -133,7 +133,7 @@ void File::Write(Kernel::HLERequestContext& ctx) {
}
void File::GetSize(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0804, 0, 0);
IPC::RequestParser rp(ctx);
const FileSessionSlot* file = GetSessionData(ctx.Session());
@ -143,7 +143,7 @@ void File::GetSize(Kernel::HLERequestContext& ctx) {
}
void File::SetSize(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0805, 2, 0);
IPC::RequestParser rp(ctx);
u64 size = rp.Pop<u64>();
FileSessionSlot* file = GetSessionData(ctx.Session());
@ -162,7 +162,7 @@ void File::SetSize(Kernel::HLERequestContext& ctx) {
}
void File::Close(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0808, 0, 0);
IPC::RequestParser rp(ctx);
// TODO(Subv): Only close the backend if this client is the only one left.
if (connected_sessions.size() > 1)
@ -175,7 +175,7 @@ void File::Close(Kernel::HLERequestContext& ctx) {
}
void File::Flush(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0809, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
@ -192,7 +192,7 @@ void File::Flush(Kernel::HLERequestContext& ctx) {
}
void File::SetPriority(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x080A, 1, 0);
IPC::RequestParser rp(ctx);
FileSessionSlot* file = GetSessionData(ctx.Session());
file->priority = rp.Pop<u32>();
@ -202,7 +202,7 @@ void File::SetPriority(Kernel::HLERequestContext& ctx) {
}
void File::GetPriority(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x080B, 0, 0);
IPC::RequestParser rp(ctx);
const FileSessionSlot* file = GetSessionData(ctx.Session());
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
@ -214,7 +214,7 @@ void File::OpenLinkFile(Kernel::HLERequestContext& ctx) {
LOG_WARNING(Service_FS, "(STUBBED) File command OpenLinkFile {}", GetName());
using Kernel::ClientSession;
using Kernel::ServerSession;
IPC::RequestParser rp(ctx, 0x080C, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 2);
auto [server, client] = kernel.CreateSessionPair(GetName());
ClientConnected(server);
@ -232,7 +232,7 @@ void File::OpenLinkFile(Kernel::HLERequestContext& ctx) {
}
void File::OpenSubFile(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0801, 4, 0);
IPC::RequestParser rp(ctx);
s64 offset = rp.PopRaw<s64>();
s64 size = rp.PopRaw<s64>();

View File

@ -36,7 +36,7 @@ using Kernel::ServerSession;
namespace Service::FS {
void FS_USER::Initialize(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0801, 0, 2);
IPC::RequestParser rp(ctx);
u32 pid = rp.PopPID();
ClientSlot* slot = GetSessionData(ctx.Session());
@ -47,7 +47,7 @@ void FS_USER::Initialize(Kernel::HLERequestContext& ctx) {
}
void FS_USER::OpenFile(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0802, 7, 2);
IPC::RequestParser rp(ctx);
rp.Skip(1, false); // Transaction.
const auto archive_handle = rp.PopRaw<ArchiveHandle>();
@ -77,7 +77,7 @@ void FS_USER::OpenFile(Kernel::HLERequestContext& ctx) {
}
void FS_USER::OpenFileDirectly(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x803, 8, 4);
IPC::RequestParser rp(ctx);
rp.Skip(1, false); // Transaction
const auto archive_id = rp.PopEnum<ArchiveIdCode>();
@ -129,7 +129,7 @@ void FS_USER::OpenFileDirectly(Kernel::HLERequestContext& ctx) {
}
void FS_USER::DeleteFile(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x804, 5, 2);
IPC::RequestParser rp(ctx);
rp.Skip(1, false); // TransactionId
const auto archive_handle = rp.PopRaw<ArchiveHandle>();
const auto filename_type = rp.PopEnum<FileSys::LowPathType>();
@ -147,7 +147,7 @@ void FS_USER::DeleteFile(Kernel::HLERequestContext& ctx) {
}
void FS_USER::RenameFile(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x805, 9, 4);
IPC::RequestParser rp(ctx);
rp.Skip(1, false); // TransactionId
const auto src_archive_handle = rp.PopRaw<ArchiveHandle>();
@ -175,7 +175,7 @@ void FS_USER::RenameFile(Kernel::HLERequestContext& ctx) {
}
void FS_USER::DeleteDirectory(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x806, 5, 2);
IPC::RequestParser rp(ctx);
rp.Skip(1, false); // TransactionId
const auto archive_handle = rp.PopRaw<ArchiveHandle>();
@ -194,7 +194,7 @@ void FS_USER::DeleteDirectory(Kernel::HLERequestContext& ctx) {
}
void FS_USER::DeleteDirectoryRecursively(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x807, 5, 2);
IPC::RequestParser rp(ctx);
rp.Skip(1, false); // TransactionId
const auto archive_handle = rp.PopRaw<ArchiveHandle>();
@ -213,7 +213,7 @@ void FS_USER::DeleteDirectoryRecursively(Kernel::HLERequestContext& ctx) {
}
void FS_USER::CreateFile(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x808, 8, 2);
IPC::RequestParser rp(ctx);
rp.Skip(1, false); // TransactionId
const auto archive_handle = rp.PopRaw<ArchiveHandle>();
@ -234,7 +234,7 @@ void FS_USER::CreateFile(Kernel::HLERequestContext& ctx) {
}
void FS_USER::CreateDirectory(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x809, 6, 2);
IPC::RequestParser rp(ctx);
rp.Skip(1, false); // TransactionId
const auto archive_handle = rp.PopRaw<ArchiveHandle>();
const auto dirname_type = rp.PopEnum<FileSys::LowPathType>();
@ -252,7 +252,7 @@ void FS_USER::CreateDirectory(Kernel::HLERequestContext& ctx) {
}
void FS_USER::RenameDirectory(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x80A, 9, 4);
IPC::RequestParser rp(ctx);
rp.Skip(1, false); // TransactionId
const auto src_archive_handle = rp.PopRaw<ArchiveHandle>();
const auto src_dirname_type = rp.PopEnum<FileSys::LowPathType>();
@ -279,7 +279,7 @@ void FS_USER::RenameDirectory(Kernel::HLERequestContext& ctx) {
}
void FS_USER::OpenDirectory(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x80B, 4, 2);
IPC::RequestParser rp(ctx);
const auto archive_handle = rp.PopRaw<ArchiveHandle>();
const auto dirname_type = rp.PopEnum<FileSys::LowPathType>();
const auto dirname_size = rp.Pop<u32>();
@ -308,7 +308,7 @@ void FS_USER::OpenDirectory(Kernel::HLERequestContext& ctx) {
}
void FS_USER::OpenArchive(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x80C, 3, 2);
IPC::RequestParser rp(ctx);
const auto archive_id = rp.PopEnum<FS::ArchiveIdCode>();
const auto archivename_type = rp.PopEnum<FileSys::LowPathType>();
const auto archivename_size = rp.Pop<u32>();
@ -335,7 +335,7 @@ void FS_USER::OpenArchive(Kernel::HLERequestContext& ctx) {
}
void FS_USER::CloseArchive(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x80E, 2, 0);
IPC::RequestParser rp(ctx);
const auto archive_handle = rp.PopRaw<ArchiveHandle>();
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
@ -343,14 +343,14 @@ void FS_USER::CloseArchive(Kernel::HLERequestContext& ctx) {
}
void FS_USER::IsSdmcDetected(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x817, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
rb.Push(Settings::values.use_virtual_sd.GetValue());
}
void FS_USER::IsSdmcWriteable(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x818, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
// If the SD isn't enabled, it can't be writeable...else, stubbed true
@ -361,7 +361,7 @@ void FS_USER::IsSdmcWriteable(Kernel::HLERequestContext& ctx) {
void FS_USER::FormatSaveData(Kernel::HLERequestContext& ctx) {
LOG_WARNING(Service_FS, "(STUBBED)");
IPC::RequestParser rp(ctx, 0x84C, 9, 2);
IPC::RequestParser rp(ctx);
const auto archive_id = rp.PopEnum<ArchiveIdCode>();
const auto archivename_type = rp.PopEnum<FileSys::LowPathType>();
const auto archivename_size = rp.Pop<u32>();
@ -403,7 +403,7 @@ void FS_USER::FormatSaveData(Kernel::HLERequestContext& ctx) {
}
void FS_USER::FormatThisUserSaveData(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x80F, 6, 0);
IPC::RequestParser rp(ctx);
const auto block_size = rp.Pop<u32>();
const auto number_directories = rp.Pop<u32>();
const auto number_files = rp.Pop<u32>();
@ -426,7 +426,7 @@ void FS_USER::FormatThisUserSaveData(Kernel::HLERequestContext& ctx) {
}
void FS_USER::GetFreeBytes(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x812, 2, 0);
IPC::RequestParser rp(ctx);
const auto archive_handle = rp.PopRaw<ArchiveHandle>();
ResultVal<u64> bytes_res = archives.GetFreeBytesInArchive(archive_handle);
@ -440,7 +440,7 @@ void FS_USER::GetFreeBytes(Kernel::HLERequestContext& ctx) {
}
void FS_USER::GetSdmcArchiveResource(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x814, 0, 0);
IPC::RequestParser rp(ctx);
LOG_WARNING(Service_FS, "(STUBBED) called");
@ -458,7 +458,7 @@ void FS_USER::GetSdmcArchiveResource(Kernel::HLERequestContext& ctx) {
}
void FS_USER::GetNandArchiveResource(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x815, 0, 0);
IPC::RequestParser rp(ctx);
LOG_WARNING(Service_FS, "(STUBBED) called");
@ -476,7 +476,7 @@ void FS_USER::GetNandArchiveResource(Kernel::HLERequestContext& ctx) {
void FS_USER::CreateExtSaveData(Kernel::HLERequestContext& ctx) {
// TODO(Subv): Figure out the other parameters.
IPC::RequestParser rp(ctx, 0x0851, 9, 2);
IPC::RequestParser rp(ctx);
MediaType media_type = static_cast<MediaType>(rp.Pop<u32>()); // the other bytes are unknown
u32 save_low = rp.Pop<u32>();
u32 save_high = rp.Pop<u32>();
@ -509,7 +509,7 @@ void FS_USER::CreateExtSaveData(Kernel::HLERequestContext& ctx) {
}
void FS_USER::DeleteExtSaveData(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x852, 4, 0);
IPC::RequestParser rp(ctx);
MediaType media_type = static_cast<MediaType>(rp.Pop<u32>()); // the other bytes are unknown
u32 save_low = rp.Pop<u32>();
u32 save_high = rp.Pop<u32>();
@ -524,7 +524,7 @@ void FS_USER::DeleteExtSaveData(Kernel::HLERequestContext& ctx) {
}
void FS_USER::CardSlotIsInserted(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x821, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
rb.Push(false);
@ -532,7 +532,7 @@ void FS_USER::CardSlotIsInserted(Kernel::HLERequestContext& ctx) {
}
void FS_USER::DeleteSystemSaveData(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x857, 2, 0);
IPC::RequestParser rp(ctx);
u32 savedata_high = rp.Pop<u32>();
u32 savedata_low = rp.Pop<u32>();
@ -541,7 +541,7 @@ void FS_USER::DeleteSystemSaveData(Kernel::HLERequestContext& ctx) {
}
void FS_USER::CreateSystemSaveData(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x856, 9, 0);
IPC::RequestParser rp(ctx);
u32 savedata_high = rp.Pop<u32>();
u32 savedata_low = rp.Pop<u32>();
u32 total_size = rp.Pop<u32>();
@ -564,7 +564,7 @@ void FS_USER::CreateSystemSaveData(Kernel::HLERequestContext& ctx) {
}
void FS_USER::CreateLegacySystemSaveData(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x810, 8, 0);
IPC::RequestParser rp(ctx);
u32 savedata_id = rp.Pop<u32>();
u32 total_size = rp.Pop<u32>();
u32 block_size = rp.Pop<u32>();
@ -586,7 +586,7 @@ void FS_USER::CreateLegacySystemSaveData(Kernel::HLERequestContext& ctx) {
}
void FS_USER::InitializeWithSdkVersion(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x861, 1, 2);
IPC::RequestParser rp(ctx);
const u32 version = rp.Pop<u32>();
u32 pid = rp.PopPID();
@ -600,7 +600,7 @@ void FS_USER::InitializeWithSdkVersion(Kernel::HLERequestContext& ctx) {
}
void FS_USER::SetPriority(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x862, 1, 0);
IPC::RequestParser rp(ctx);
priority = rp.Pop<u32>();
@ -611,7 +611,7 @@ void FS_USER::SetPriority(Kernel::HLERequestContext& ctx) {
}
void FS_USER::GetPriority(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x863, 0, 0);
IPC::RequestParser rp(ctx);
if (priority == UINT32_MAX) {
LOG_INFO(Service_FS, "priority was not set, priority=0x{:X}", priority);
@ -625,7 +625,7 @@ void FS_USER::GetPriority(Kernel::HLERequestContext& ctx) {
}
void FS_USER::GetArchiveResource(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x849, 1, 0);
IPC::RequestParser rp(ctx);
auto media_type = rp.PopEnum<MediaType>();
LOG_WARNING(Service_FS, "(STUBBED) called Media type=0x{:08X}", media_type);
@ -643,7 +643,7 @@ void FS_USER::GetArchiveResource(Kernel::HLERequestContext& ctx) {
}
void FS_USER::GetFormatInfo(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x845, 3, 2);
IPC::RequestParser rp(ctx);
const auto archive_id = rp.PopEnum<FS::ArchiveIdCode>();
const auto archivename_type = rp.PopEnum<FileSys::LowPathType>();
const auto archivename_size = rp.Pop<u32>();
@ -671,7 +671,7 @@ void FS_USER::GetFormatInfo(Kernel::HLERequestContext& ctx) {
}
void FS_USER::GetProgramLaunchInfo(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x82F, 1, 0);
IPC::RequestParser rp(ctx);
u32 process_id = rp.Pop<u32>();
@ -699,7 +699,7 @@ void FS_USER::GetProgramLaunchInfo(Kernel::HLERequestContext& ctx) {
}
void FS_USER::ObsoletedCreateExtSaveData(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x830, 6, 2);
IPC::RequestParser rp(ctx);
MediaType media_type = static_cast<MediaType>(rp.Pop<u8>());
u32 save_low = rp.Pop<u32>();
u32 save_high = rp.Pop<u32>();
@ -730,7 +730,7 @@ void FS_USER::ObsoletedCreateExtSaveData(Kernel::HLERequestContext& ctx) {
}
void FS_USER::ObsoletedDeleteExtSaveData(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x835, 2, 0);
IPC::RequestParser rp(ctx);
MediaType media_type = static_cast<MediaType>(rp.Pop<u8>());
u32 save_low = rp.Pop<u32>();
@ -741,7 +741,7 @@ void FS_USER::ObsoletedDeleteExtSaveData(Kernel::HLERequestContext& ctx) {
}
void FS_USER::GetSpecialContentIndex(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x83A, 4, 0);
IPC::RequestParser rp(ctx);
const MediaType media_type = static_cast<MediaType>(rp.Pop<u8>());
const u64 title_id = rp.Pop<u64>();
const auto type = rp.PopEnum<SpecialContentType>();
@ -767,13 +767,14 @@ void FS_USER::GetSpecialContentIndex(Kernel::HLERequestContext& ctx) {
}
void FS_USER::GetNumSeeds(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb{ctx, 0x87D, 2, 0};
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
rb.Push<u32>(FileSys::GetSeedCount());
}
void FS_USER::AddSeed(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp{ctx, 0x87A, 6, 0};
IPC::RequestParser rp(ctx);
u64 title_id{rp.Pop<u64>()};
FileSys::Seed::Data seed{rp.PopRaw<FileSys::Seed::Data>()};
FileSys::AddSeed({title_id, seed, {}});
@ -782,7 +783,7 @@ void FS_USER::AddSeed(Kernel::HLERequestContext& ctx) {
}
void FS_USER::SetSaveDataSecureValue(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x865, 5, 0);
IPC::RequestParser rp(ctx);
u64 value = rp.Pop<u64>();
u32 secure_value_slot = rp.Pop<u32>();
u32 unique_id = rp.Pop<u32>();
@ -801,7 +802,7 @@ void FS_USER::SetSaveDataSecureValue(Kernel::HLERequestContext& ctx) {
}
void FS_USER::GetSaveDataSecureValue(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x866, 3, 0);
IPC::RequestParser rp(ctx);
u32 secure_value_slot = rp.Pop<u32>();
u32 unique_id = rp.Pop<u32>();
@ -888,117 +889,117 @@ FS_USER::FS_USER(Core::System& system)
: ServiceFramework("fs:USER", 30), system(system), archives(system.ArchiveManager()) {
static const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0001, 3, 6), nullptr, "Dummy1"},
{IPC::MakeHeader(0x0401, 3, 4), nullptr, "Control"},
{IPC::MakeHeader(0x0801, 0, 2), &FS_USER::Initialize, "Initialize"},
{IPC::MakeHeader(0x0802, 7, 2), &FS_USER::OpenFile, "OpenFile"},
{IPC::MakeHeader(0x0803, 8, 4), &FS_USER::OpenFileDirectly, "OpenFileDirectly"},
{IPC::MakeHeader(0x0804, 5, 2), &FS_USER::DeleteFile, "DeleteFile"},
{IPC::MakeHeader(0x0805, 9, 4), &FS_USER::RenameFile, "RenameFile"},
{IPC::MakeHeader(0x0806, 5, 2), &FS_USER::DeleteDirectory, "DeleteDirectory"},
{IPC::MakeHeader(0x0807, 5, 2), &FS_USER::DeleteDirectoryRecursively, "DeleteDirectoryRecursively"},
{IPC::MakeHeader(0x0808, 8, 2), &FS_USER::CreateFile, "CreateFile"},
{IPC::MakeHeader(0x0809, 6, 2), &FS_USER::CreateDirectory, "CreateDirectory"},
{IPC::MakeHeader(0x080A, 9, 4), &FS_USER::RenameDirectory, "RenameDirectory"},
{IPC::MakeHeader(0x080B, 4, 2), &FS_USER::OpenDirectory, "OpenDirectory"},
{IPC::MakeHeader(0x080C, 3, 2), &FS_USER::OpenArchive, "OpenArchive"},
{IPC::MakeHeader(0x080D, 5, 4), nullptr, "ControlArchive"},
{IPC::MakeHeader(0x080E, 2, 0), &FS_USER::CloseArchive, "CloseArchive"},
{IPC::MakeHeader(0x080F, 6, 0), &FS_USER::FormatThisUserSaveData, "FormatThisUserSaveData"},
{IPC::MakeHeader(0x0810, 8, 0), &FS_USER::CreateLegacySystemSaveData, "CreateLegacySystemSaveData"},
{IPC::MakeHeader(0x0811, 1, 0), nullptr, "DeleteSystemSaveData"},
{IPC::MakeHeader(0x0812, 2, 0), &FS_USER::GetFreeBytes, "GetFreeBytes"},
{IPC::MakeHeader(0x0813, 0, 0), nullptr, "GetCardType"},
{IPC::MakeHeader(0x0814, 0, 0), &FS_USER::GetSdmcArchiveResource, "GetSdmcArchiveResource"},
{IPC::MakeHeader(0x0815, 0, 0), &FS_USER::GetNandArchiveResource, "GetNandArchiveResource"},
{IPC::MakeHeader(0x0816, 0, 0), nullptr, "GetSdmcFatfsError"},
{IPC::MakeHeader(0x0817, 0, 0), &FS_USER::IsSdmcDetected, "IsSdmcDetected"},
{IPC::MakeHeader(0x0818, 0, 0), &FS_USER::IsSdmcWriteable, "IsSdmcWritable"},
{IPC::MakeHeader(0x0819, 1, 2), nullptr, "GetSdmcCid"},
{IPC::MakeHeader(0x081A, 1, 2), nullptr, "GetNandCid"},
{IPC::MakeHeader(0x081B, 0, 0), nullptr, "GetSdmcSpeedInfo"},
{IPC::MakeHeader(0x081C, 0, 0), nullptr, "GetNandSpeedInfo"},
{IPC::MakeHeader(0x081D, 1, 2), nullptr, "GetSdmcLog"},
{IPC::MakeHeader(0x081E, 1, 2), nullptr, "GetNandLog"},
{IPC::MakeHeader(0x081F, 0, 0), nullptr, "ClearSdmcLog"},
{IPC::MakeHeader(0x0820, 0, 0), nullptr, "ClearNandLog"},
{IPC::MakeHeader(0x0821, 0, 0), &FS_USER::CardSlotIsInserted, "CardSlotIsInserted"},
{IPC::MakeHeader(0x0822, 0, 0), nullptr, "CardSlotPowerOn"},
{IPC::MakeHeader(0x0823, 0, 0), nullptr, "CardSlotPowerOff"},
{IPC::MakeHeader(0x0824, 0, 0), nullptr, "CardSlotGetCardIFPowerStatus"},
{IPC::MakeHeader(0x0825, 1, 0), nullptr, "CardNorDirectCommand"},
{IPC::MakeHeader(0x0826, 2, 0), nullptr, "CardNorDirectCommandWithAddress"},
{IPC::MakeHeader(0x0827, 2, 2), nullptr, "CardNorDirectRead"},
{IPC::MakeHeader(0x0828, 3, 2), nullptr, "CardNorDirectReadWithAddress"},
{IPC::MakeHeader(0x0829, 2, 2), nullptr, "CardNorDirectWrite"},
{IPC::MakeHeader(0x082A, 3, 2), nullptr, "CardNorDirectWriteWithAddress"},
{IPC::MakeHeader(0x082B, 3, 2), nullptr, "CardNorDirectRead_4xIO"},
{IPC::MakeHeader(0x082C, 2, 2), nullptr, "CardNorDirectCpuWriteWithoutVerify"},
{IPC::MakeHeader(0x082D, 1, 0), nullptr, "CardNorDirectSectorEraseWithoutVerify"},
{IPC::MakeHeader(0x082E, 1, 0), nullptr, "GetProductInfo"},
{IPC::MakeHeader(0x082F, 1, 0), &FS_USER::GetProgramLaunchInfo, "GetProgramLaunchInfo"},
{IPC::MakeHeader(0x0830, 6, 2), &FS_USER::ObsoletedCreateExtSaveData, "Obsoleted_3_0_CreateExtSaveData"},
{IPC::MakeHeader(0x0831, 6, 0), nullptr, "CreateSharedExtSaveData"},
{IPC::MakeHeader(0x0832, 4, 2), nullptr, "ReadExtSaveDataIcon"},
{IPC::MakeHeader(0x0833, 2, 2), nullptr, "EnumerateExtSaveData"},
{IPC::MakeHeader(0x0834, 2, 2), nullptr, "EnumerateSharedExtSaveData"},
{IPC::MakeHeader(0x0835, 2, 0), &FS_USER::ObsoletedDeleteExtSaveData, "Obsoleted_3_0_DeleteExtSaveData"},
{IPC::MakeHeader(0x0836, 2, 0), nullptr, "DeleteSharedExtSaveData"},
{IPC::MakeHeader(0x0837, 1, 0), nullptr, "SetCardSpiBaudRate"},
{IPC::MakeHeader(0x0838, 1, 0), nullptr, "SetCardSpiBusMode"},
{IPC::MakeHeader(0x0839, 0, 0), nullptr, "SendInitializeInfoTo9"},
{IPC::MakeHeader(0x083A, 4, 0), &FS_USER::GetSpecialContentIndex, "GetSpecialContentIndex"},
{IPC::MakeHeader(0x083B, 3, 2), nullptr, "GetLegacyRomHeader"},
{IPC::MakeHeader(0x083C, 3, 2), nullptr, "GetLegacyBannerData"},
{IPC::MakeHeader(0x083D, 4, 0), nullptr, "CheckAuthorityToAccessExtSaveData"},
{IPC::MakeHeader(0x083E, 3, 2), nullptr, "QueryTotalQuotaSize"},
{IPC::MakeHeader(0x083F, 3, 0), nullptr, "GetExtDataBlockSize"},
{IPC::MakeHeader(0x0840, 1, 0), nullptr, "AbnegateAccessRight"},
{IPC::MakeHeader(0x0841, 0, 0), nullptr, "DeleteSdmcRoot"},
{IPC::MakeHeader(0x0842, 1, 0), nullptr, "DeleteAllExtSaveDataOnNand"},
{IPC::MakeHeader(0x0843, 0, 0), nullptr, "InitializeCtrFileSystem"},
{IPC::MakeHeader(0x0844, 0, 0), nullptr, "CreateSeed"},
{IPC::MakeHeader(0x0845, 3, 2), &FS_USER::GetFormatInfo, "GetFormatInfo"},
{IPC::MakeHeader(0x0846, 4, 2), nullptr, "GetLegacyRomHeader2"},
{IPC::MakeHeader(0x0847, 6, 0), nullptr, "FormatCtrCardUserSaveData"},
{IPC::MakeHeader(0x0848, 1, 2), nullptr, "GetSdmcCtrRootPath"},
{IPC::MakeHeader(0x0849, 1, 0), &FS_USER::GetArchiveResource, "GetArchiveResource"},
{IPC::MakeHeader(0x084A, 0, 2), nullptr, "ExportIntegrityVerificationSeed"},
{IPC::MakeHeader(0x084B, 0, 2), nullptr, "ImportIntegrityVerificationSeed"},
{IPC::MakeHeader(0x084C, 9, 2), &FS_USER::FormatSaveData, "FormatSaveData"},
{IPC::MakeHeader(0x084D, 4, 2), nullptr, "GetLegacySubBannerData"},
{IPC::MakeHeader(0x084E, 13, 2), nullptr, "UpdateSha256Context"},
{IPC::MakeHeader(0x084F, 4, 2), nullptr, "ReadSpecialFile"},
{IPC::MakeHeader(0x0850, 1, 0), nullptr, "GetSpecialFileSize"},
{IPC::MakeHeader(0x0851, 9, 2), &FS_USER::CreateExtSaveData, "CreateExtSaveData"},
{IPC::MakeHeader(0x0852, 4, 0), &FS_USER::DeleteExtSaveData, "DeleteExtSaveData"},
{IPC::MakeHeader(0x0853, 5, 2), nullptr, "ReadExtSaveDataIcon"},
{IPC::MakeHeader(0x0854, 3, 0), nullptr, "GetExtDataBlockSize"},
{IPC::MakeHeader(0x0855, 4, 2), nullptr, "EnumerateExtSaveData"},
{IPC::MakeHeader(0x0856, 9, 0), &FS_USER::CreateSystemSaveData, "CreateSystemSaveData"},
{IPC::MakeHeader(0x0857, 2, 0), &FS_USER::DeleteSystemSaveData, "DeleteSystemSaveData"},
{IPC::MakeHeader(0x0858, 0, 0), nullptr, "StartDeviceMoveAsSource"},
{IPC::MakeHeader(0x0859, 8, 0), nullptr, "StartDeviceMoveAsDestination"},
{IPC::MakeHeader(0x085A, 3, 0), nullptr, "SetArchivePriority"},
{IPC::MakeHeader(0x085B, 2, 0), nullptr, "GetArchivePriority"},
{IPC::MakeHeader(0x085C, 3, 0), nullptr, "SetCtrCardLatencyParameter"},
{IPC::MakeHeader(0x085D, 7, 0), nullptr, "SetFsCompatibilityInfo"},
{IPC::MakeHeader(0x085E, 1, 0), nullptr, "ResetCardCompatibilityParameter"},
{IPC::MakeHeader(0x085F, 1, 0), nullptr, "SwitchCleanupInvalidSaveData"},
{IPC::MakeHeader(0x0860, 1, 2), nullptr, "EnumerateSystemSaveData"},
{IPC::MakeHeader(0x0861, 1, 2), &FS_USER::InitializeWithSdkVersion, "InitializeWithSdkVersion"},
{IPC::MakeHeader(0x0862, 1, 0), &FS_USER::SetPriority, "SetPriority"},
{IPC::MakeHeader(0x0863, 0, 0), &FS_USER::GetPriority, "GetPriority"},
{IPC::MakeHeader(0x0864, 0, 0), nullptr, "GetNandInfo"},
{IPC::MakeHeader(0x0865, 5, 0), &FS_USER::SetSaveDataSecureValue, "SetSaveDataSecureValue"},
{IPC::MakeHeader(0x0866, 3, 0), &FS_USER::GetSaveDataSecureValue, "GetSaveDataSecureValue"},
{IPC::MakeHeader(0x0867, 3, 4), nullptr, "ControlSecureSave"},
{IPC::MakeHeader(0x0868, 0, 0), nullptr, "GetMediaType"},
{IPC::MakeHeader(0x0869, 0, 0), nullptr, "GetNandEraseCount"},
{IPC::MakeHeader(0x086A, 2, 2), nullptr, "ReadNandReport"},
{IPC::MakeHeader(0x087A, 6, 0), &FS_USER::AddSeed, "AddSeed"},
{IPC::MakeHeader(0x087D, 0, 0), &FS_USER::GetNumSeeds, "GetNumSeeds"},
{IPC::MakeHeader(0x0886, 3, 0), nullptr, "CheckUpdatedDat"},
{0x0001, nullptr, "Dummy1"},
{0x0401, nullptr, "Control"},
{0x0801, &FS_USER::Initialize, "Initialize"},
{0x0802, &FS_USER::OpenFile, "OpenFile"},
{0x0803, &FS_USER::OpenFileDirectly, "OpenFileDirectly"},
{0x0804, &FS_USER::DeleteFile, "DeleteFile"},
{0x0805, &FS_USER::RenameFile, "RenameFile"},
{0x0806, &FS_USER::DeleteDirectory, "DeleteDirectory"},
{0x0807, &FS_USER::DeleteDirectoryRecursively, "DeleteDirectoryRecursively"},
{0x0808, &FS_USER::CreateFile, "CreateFile"},
{0x0809, &FS_USER::CreateDirectory, "CreateDirectory"},
{0x080A, &FS_USER::RenameDirectory, "RenameDirectory"},
{0x080B, &FS_USER::OpenDirectory, "OpenDirectory"},
{0x080C, &FS_USER::OpenArchive, "OpenArchive"},
{0x080D, nullptr, "ControlArchive"},
{0x080E, &FS_USER::CloseArchive, "CloseArchive"},
{0x080F, &FS_USER::FormatThisUserSaveData, "FormatThisUserSaveData"},
{0x0810, &FS_USER::CreateLegacySystemSaveData, "CreateLegacySystemSaveData"},
{0x0811, nullptr, "DeleteSystemSaveData"},
{0x0812, &FS_USER::GetFreeBytes, "GetFreeBytes"},
{0x0813, nullptr, "GetCardType"},
{0x0814, &FS_USER::GetSdmcArchiveResource, "GetSdmcArchiveResource"},
{0x0815, &FS_USER::GetNandArchiveResource, "GetNandArchiveResource"},
{0x0816, nullptr, "GetSdmcFatfsError"},
{0x0817, &FS_USER::IsSdmcDetected, "IsSdmcDetected"},
{0x0818, &FS_USER::IsSdmcWriteable, "IsSdmcWritable"},
{0x0819, nullptr, "GetSdmcCid"},
{0x081A, nullptr, "GetNandCid"},
{0x081B, nullptr, "GetSdmcSpeedInfo"},
{0x081C, nullptr, "GetNandSpeedInfo"},
{0x081D, nullptr, "GetSdmcLog"},
{0x081E, nullptr, "GetNandLog"},
{0x081F, nullptr, "ClearSdmcLog"},
{0x0820, nullptr, "ClearNandLog"},
{0x0821, &FS_USER::CardSlotIsInserted, "CardSlotIsInserted"},
{0x0822, nullptr, "CardSlotPowerOn"},
{0x0823, nullptr, "CardSlotPowerOff"},
{0x0824, nullptr, "CardSlotGetCardIFPowerStatus"},
{0x0825, nullptr, "CardNorDirectCommand"},
{0x0826, nullptr, "CardNorDirectCommandWithAddress"},
{0x0827, nullptr, "CardNorDirectRead"},
{0x0828, nullptr, "CardNorDirectReadWithAddress"},
{0x0829, nullptr, "CardNorDirectWrite"},
{0x082A, nullptr, "CardNorDirectWriteWithAddress"},
{0x082B, nullptr, "CardNorDirectRead_4xIO"},
{0x082C, nullptr, "CardNorDirectCpuWriteWithoutVerify"},
{0x082D, nullptr, "CardNorDirectSectorEraseWithoutVerify"},
{0x082E, nullptr, "GetProductInfo"},
{0x082F, &FS_USER::GetProgramLaunchInfo, "GetProgramLaunchInfo"},
{0x0830, &FS_USER::ObsoletedCreateExtSaveData, "Obsoleted_3_0_CreateExtSaveData"},
{0x0831, nullptr, "CreateSharedExtSaveData"},
{0x0832, nullptr, "ReadExtSaveDataIcon"},
{0x0833, nullptr, "EnumerateExtSaveData"},
{0x0834, nullptr, "EnumerateSharedExtSaveData"},
{0x0835, &FS_USER::ObsoletedDeleteExtSaveData, "Obsoleted_3_0_DeleteExtSaveData"},
{0x0836, nullptr, "DeleteSharedExtSaveData"},
{0x0837, nullptr, "SetCardSpiBaudRate"},
{0x0838, nullptr, "SetCardSpiBusMode"},
{0x0839, nullptr, "SendInitializeInfoTo9"},
{0x083A, &FS_USER::GetSpecialContentIndex, "GetSpecialContentIndex"},
{0x083B, nullptr, "GetLegacyRomHeader"},
{0x083C, nullptr, "GetLegacyBannerData"},
{0x083D, nullptr, "CheckAuthorityToAccessExtSaveData"},
{0x083E, nullptr, "QueryTotalQuotaSize"},
{0x083F, nullptr, "GetExtDataBlockSize"},
{0x0840, nullptr, "AbnegateAccessRight"},
{0x0841, nullptr, "DeleteSdmcRoot"},
{0x0842, nullptr, "DeleteAllExtSaveDataOnNand"},
{0x0843, nullptr, "InitializeCtrFileSystem"},
{0x0844, nullptr, "CreateSeed"},
{0x0845, &FS_USER::GetFormatInfo, "GetFormatInfo"},
{0x0846, nullptr, "GetLegacyRomHeader2"},
{0x0847, nullptr, "FormatCtrCardUserSaveData"},
{0x0848, nullptr, "GetSdmcCtrRootPath"},
{0x0849, &FS_USER::GetArchiveResource, "GetArchiveResource"},
{0x084A, nullptr, "ExportIntegrityVerificationSeed"},
{0x084B, nullptr, "ImportIntegrityVerificationSeed"},
{0x084C, &FS_USER::FormatSaveData, "FormatSaveData"},
{0x084D, nullptr, "GetLegacySubBannerData"},
{0x084E, nullptr, "UpdateSha256Context"},
{0x084F, nullptr, "ReadSpecialFile"},
{0x0850, nullptr, "GetSpecialFileSize"},
{0x0851, &FS_USER::CreateExtSaveData, "CreateExtSaveData"},
{0x0852, &FS_USER::DeleteExtSaveData, "DeleteExtSaveData"},
{0x0853, nullptr, "ReadExtSaveDataIcon"},
{0x0854, nullptr, "GetExtDataBlockSize"},
{0x0855, nullptr, "EnumerateExtSaveData"},
{0x0856, &FS_USER::CreateSystemSaveData, "CreateSystemSaveData"},
{0x0857, &FS_USER::DeleteSystemSaveData, "DeleteSystemSaveData"},
{0x0858, nullptr, "StartDeviceMoveAsSource"},
{0x0859, nullptr, "StartDeviceMoveAsDestination"},
{0x085A, nullptr, "SetArchivePriority"},
{0x085B, nullptr, "GetArchivePriority"},
{0x085C, nullptr, "SetCtrCardLatencyParameter"},
{0x085D, nullptr, "SetFsCompatibilityInfo"},
{0x085E, nullptr, "ResetCardCompatibilityParameter"},
{0x085F, nullptr, "SwitchCleanupInvalidSaveData"},
{0x0860, nullptr, "EnumerateSystemSaveData"},
{0x0861, &FS_USER::InitializeWithSdkVersion, "InitializeWithSdkVersion"},
{0x0862, &FS_USER::SetPriority, "SetPriority"},
{0x0863, &FS_USER::GetPriority, "GetPriority"},
{0x0864, nullptr, "GetNandInfo"},
{0x0865, &FS_USER::SetSaveDataSecureValue, "SetSaveDataSecureValue"},
{0x0866, &FS_USER::GetSaveDataSecureValue, "GetSaveDataSecureValue"},
{0x0867, nullptr, "ControlSecureSave"},
{0x0868, nullptr, "GetMediaType"},
{0x0869, nullptr, "GetNandEraseCount"},
{0x086A, nullptr, "ReadNandReport"},
{0x087A, &FS_USER::AddSeed, "AddSeed"},
{0x087D, &FS_USER::GetNumSeeds, "GetNumSeeds"},
{0x0886, nullptr, "CheckUpdatedDat"},
// clang-format on
};
RegisterHandlers(functions);

View File

@ -231,7 +231,7 @@ static ResultCode WriteHWRegsWithMask(u32 base_address, u32 size_in_bytes, std::
}
void GSP_GPU::WriteHWRegs(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1, 2, 2);
IPC::RequestParser rp(ctx);
u32 reg_addr = rp.Pop<u32>();
u32 size = rp.Pop<u32>();
std::vector<u8> src_data = rp.PopStaticBuffer();
@ -241,7 +241,7 @@ void GSP_GPU::WriteHWRegs(Kernel::HLERequestContext& ctx) {
}
void GSP_GPU::WriteHWRegsWithMask(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x2, 2, 4);
IPC::RequestParser rp(ctx);
u32 reg_addr = rp.Pop<u32>();
u32 size = rp.Pop<u32>();
@ -253,7 +253,7 @@ void GSP_GPU::WriteHWRegsWithMask(Kernel::HLERequestContext& ctx) {
}
void GSP_GPU::ReadHWRegs(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x4, 2, 0);
IPC::RequestParser rp(ctx);
u32 reg_addr = rp.Pop<u32>();
u32 input_size = rp.Pop<u32>();
@ -326,7 +326,7 @@ ResultCode SetBufferSwap(u32 screen_id, const FrameBufferInfo& info) {
}
void GSP_GPU::SetBufferSwap(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x5, 8, 0);
IPC::RequestParser rp(ctx);
u32 screen_id = rp.Pop<u32>();
auto fb_info = rp.PopRaw<FrameBufferInfo>();
@ -335,7 +335,7 @@ void GSP_GPU::SetBufferSwap(Kernel::HLERequestContext& ctx) {
}
void GSP_GPU::FlushDataCache(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x8, 2, 2);
IPC::RequestParser rp(ctx);
u32 address = rp.Pop<u32>();
u32 size = rp.Pop<u32>();
auto process = rp.PopObject<Kernel::Process>();
@ -350,7 +350,7 @@ void GSP_GPU::FlushDataCache(Kernel::HLERequestContext& ctx) {
}
void GSP_GPU::InvalidateDataCache(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x9, 2, 2);
IPC::RequestParser rp(ctx);
u32 address = rp.Pop<u32>();
u32 size = rp.Pop<u32>();
auto process = rp.PopObject<Kernel::Process>();
@ -365,7 +365,7 @@ void GSP_GPU::InvalidateDataCache(Kernel::HLERequestContext& ctx) {
}
void GSP_GPU::SetAxiConfigQoSMode(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x10, 1, 0);
IPC::RequestParser rp(ctx);
u32 mode = rp.Pop<u32>();
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
@ -375,7 +375,7 @@ void GSP_GPU::SetAxiConfigQoSMode(Kernel::HLERequestContext& ctx) {
}
void GSP_GPU::RegisterInterruptRelayQueue(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x13, 1, 2);
IPC::RequestParser rp(ctx);
u32 flags = rp.Pop<u32>();
auto interrupt_event = rp.PopObject<Kernel::Event>();
@ -405,7 +405,7 @@ void GSP_GPU::RegisterInterruptRelayQueue(Kernel::HLERequestContext& ctx) {
}
void GSP_GPU::UnregisterInterruptRelayQueue(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x14, 0, 0);
IPC::RequestParser rp(ctx);
SessionData* session_data = GetSessionData(ctx.Session());
session_data->interrupt_event = nullptr;
@ -622,7 +622,7 @@ static void ExecuteCommand(const Command& command, u32 thread_id) {
}
void GSP_GPU::SetLcdForceBlack(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0xB, 1, 0);
IPC::RequestParser rp(ctx);
bool enable_black = rp.Pop<bool>();
LCD::Regs::ColorFill data = {0};
@ -639,7 +639,7 @@ void GSP_GPU::SetLcdForceBlack(Kernel::HLERequestContext& ctx) {
}
void GSP_GPU::TriggerCmdReqQueue(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0xC, 0, 0);
IPC::RequestParser rp(ctx);
// Iterate through each thread's command queue...
for (unsigned thread_id = 0; thread_id < 0x4; ++thread_id) {
@ -662,7 +662,7 @@ void GSP_GPU::TriggerCmdReqQueue(Kernel::HLERequestContext& ctx) {
}
void GSP_GPU::ImportDisplayCaptureInfo(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x18, 0, 0);
IPC::RequestParser rp(ctx);
if (active_thread_id == UINT32_MAX) {
LOG_WARNING(Service_GSP, "Called without an active thread.");
@ -705,7 +705,7 @@ void GSP_GPU::ImportDisplayCaptureInfo(Kernel::HLERequestContext& ctx) {
}
void GSP_GPU::SaveVramSysArea(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x19, 0, 0);
IPC::RequestParser rp(ctx);
LOG_INFO(Service_GSP, "called");
@ -721,7 +721,7 @@ void GSP_GPU::SaveVramSysArea(Kernel::HLERequestContext& ctx) {
}
void GSP_GPU::RestoreVramSysArea(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1A, 0, 0);
IPC::RequestParser rp(ctx);
LOG_INFO(Service_GSP, "called");
@ -738,7 +738,7 @@ void GSP_GPU::RestoreVramSysArea(Kernel::HLERequestContext& ctx) {
}
void GSP_GPU::AcquireRight(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x16, 1, 2);
IPC::RequestParser rp(ctx);
u32 flag = rp.Pop<u32>();
auto process = rp.PopObject<Kernel::Process>();
@ -771,7 +771,7 @@ void GSP_GPU::ReleaseRight(const SessionData* session_data) {
}
void GSP_GPU::ReleaseRight(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x17, 0, 0);
IPC::RequestParser rp(ctx);
const SessionData* session_data = GetSessionData(ctx.Session());
ReleaseRight(session_data);
@ -783,7 +783,7 @@ void GSP_GPU::ReleaseRight(Kernel::HLERequestContext& ctx) {
}
void GSP_GPU::StoreDataCache(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1F, 2, 2);
IPC::RequestParser rp(ctx);
u32 address = rp.Pop<u32>();
u32 size = rp.Pop<u32>();
@ -797,7 +797,7 @@ void GSP_GPU::StoreDataCache(Kernel::HLERequestContext& ctx) {
}
void GSP_GPU::SetLedForceOff(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1C, 1, 0);
IPC::RequestParser rp(ctx);
u8 state = rp.Pop<u8>();
@ -822,37 +822,37 @@ SessionData* GSP_GPU::FindRegisteredThreadData(u32 thread_id) {
GSP_GPU::GSP_GPU(Core::System& system) : ServiceFramework("gsp::Gpu", 2), system(system) {
static const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0001, 2, 2), &GSP_GPU::WriteHWRegs, "WriteHWRegs"},
{IPC::MakeHeader(0x0002, 2, 4), &GSP_GPU::WriteHWRegsWithMask, "WriteHWRegsWithMask"},
{IPC::MakeHeader(0x0003, 2, 2), nullptr, "WriteHWRegRepeat"},
{IPC::MakeHeader(0x0004, 2, 0), &GSP_GPU::ReadHWRegs, "ReadHWRegs"},
{IPC::MakeHeader(0x0005, 8, 0), &GSP_GPU::SetBufferSwap, "SetBufferSwap"},
{IPC::MakeHeader(0x0006, 2, 2), nullptr, "SetCommandList"},
{IPC::MakeHeader(0x0007, 3, 2), nullptr, "RequestDma"},
{IPC::MakeHeader(0x0008, 2, 2), &GSP_GPU::FlushDataCache, "FlushDataCache"},
{IPC::MakeHeader(0x0009, 2, 2), &GSP_GPU::InvalidateDataCache, "InvalidateDataCache"},
{IPC::MakeHeader(0x000A, 1, 4), nullptr, "RegisterInterruptEvents"},
{IPC::MakeHeader(0x000B, 1, 0), &GSP_GPU::SetLcdForceBlack, "SetLcdForceBlack"},
{IPC::MakeHeader(0x000C, 0, 0), &GSP_GPU::TriggerCmdReqQueue, "TriggerCmdReqQueue"},
{IPC::MakeHeader(0x000D, 5, 0), nullptr, "SetDisplayTransfer"},
{IPC::MakeHeader(0x000E, 6, 0), nullptr, "SetTextureCopy"},
{IPC::MakeHeader(0x000F, 8, 0), nullptr, "SetMemoryFill"},
{IPC::MakeHeader(0x0010, 1, 0), &GSP_GPU::SetAxiConfigQoSMode, "SetAxiConfigQoSMode"},
{IPC::MakeHeader(0x0011, 1, 0), nullptr, "SetPerfLogMode"},
{IPC::MakeHeader(0x0012, 0, 0), nullptr, "GetPerfLog"},
{IPC::MakeHeader(0x0013, 1, 2), &GSP_GPU::RegisterInterruptRelayQueue, "RegisterInterruptRelayQueue"},
{IPC::MakeHeader(0x0014, 0, 0), &GSP_GPU::UnregisterInterruptRelayQueue, "UnregisterInterruptRelayQueue"},
{IPC::MakeHeader(0x0015, 0, 2), nullptr, "TryAcquireRight"},
{IPC::MakeHeader(0x0016, 1, 2), &GSP_GPU::AcquireRight, "AcquireRight"},
{IPC::MakeHeader(0x0017, 0, 0), &GSP_GPU::ReleaseRight, "ReleaseRight"},
{IPC::MakeHeader(0x0018, 0, 0), &GSP_GPU::ImportDisplayCaptureInfo, "ImportDisplayCaptureInfo"},
{IPC::MakeHeader(0x0019, 0, 0), &GSP_GPU::SaveVramSysArea, "SaveVramSysArea"},
{IPC::MakeHeader(0x001A, 0, 0), &GSP_GPU::RestoreVramSysArea, "RestoreVramSysArea"},
{IPC::MakeHeader(0x001B, 0, 0), nullptr, "ResetGpuCore"},
{IPC::MakeHeader(0x001C, 1, 0), &GSP_GPU::SetLedForceOff, "SetLedForceOff"},
{IPC::MakeHeader(0x001D, 1, 0), nullptr, "SetTestCommand"},
{IPC::MakeHeader(0x001E, 2, 0), nullptr, "SetInternalPriorities"},
{IPC::MakeHeader(0x001F, 2, 2), &GSP_GPU::StoreDataCache, "StoreDataCache"},
{0x0001, &GSP_GPU::WriteHWRegs, "WriteHWRegs"},
{0x0002, &GSP_GPU::WriteHWRegsWithMask, "WriteHWRegsWithMask"},
{0x0003, nullptr, "WriteHWRegRepeat"},
{0x0004, &GSP_GPU::ReadHWRegs, "ReadHWRegs"},
{0x0005, &GSP_GPU::SetBufferSwap, "SetBufferSwap"},
{0x0006, nullptr, "SetCommandList"},
{0x0007, nullptr, "RequestDma"},
{0x0008, &GSP_GPU::FlushDataCache, "FlushDataCache"},
{0x0009, &GSP_GPU::InvalidateDataCache, "InvalidateDataCache"},
{0x000A, nullptr, "RegisterInterruptEvents"},
{0x000B, &GSP_GPU::SetLcdForceBlack, "SetLcdForceBlack"},
{0x000C, &GSP_GPU::TriggerCmdReqQueue, "TriggerCmdReqQueue"},
{0x000D, nullptr, "SetDisplayTransfer"},
{0x000E, nullptr, "SetTextureCopy"},
{0x000F, nullptr, "SetMemoryFill"},
{0x0010, &GSP_GPU::SetAxiConfigQoSMode, "SetAxiConfigQoSMode"},
{0x0011, nullptr, "SetPerfLogMode"},
{0x0012, nullptr, "GetPerfLog"},
{0x0013, &GSP_GPU::RegisterInterruptRelayQueue, "RegisterInterruptRelayQueue"},
{0x0014, &GSP_GPU::UnregisterInterruptRelayQueue, "UnregisterInterruptRelayQueue"},
{0x0015, nullptr, "TryAcquireRight"},
{0x0016, &GSP_GPU::AcquireRight, "AcquireRight"},
{0x0017, &GSP_GPU::ReleaseRight, "ReleaseRight"},
{0x0018, &GSP_GPU::ImportDisplayCaptureInfo, "ImportDisplayCaptureInfo"},
{0x0019, &GSP_GPU::SaveVramSysArea, "SaveVramSysArea"},
{0x001A, &GSP_GPU::RestoreVramSysArea, "RestoreVramSysArea"},
{0x001B, nullptr, "ResetGpuCore"},
{0x001C, &GSP_GPU::SetLedForceOff, "SetLedForceOff"},
{0x001D, nullptr, "SetTestCommand"},
{0x001E, nullptr, "SetInternalPriorities"},
{0x001F, &GSP_GPU::StoreDataCache, "StoreDataCache"},
// clang-format on
};
RegisterHandlers(functions);

View File

@ -13,15 +13,15 @@ namespace Service::GSP {
GSP_LCD::GSP_LCD() : ServiceFramework("gsp::Lcd") {
static const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x000A, 2, 0), nullptr, "SetBrightnessRaw"},
{IPC::MakeHeader(0x000B, 2, 0), nullptr, "SetBrightness"},
{IPC::MakeHeader(0x000F, 0, 0), nullptr, "PowerOnAllBacklights"},
{IPC::MakeHeader(0x0010, 0, 0), nullptr, "PowerOffAllBacklights"},
{IPC::MakeHeader(0x0011, 1, 0), nullptr, "PowerOnBacklight"},
{IPC::MakeHeader(0x0012, 1, 0), nullptr, "PowerOffBacklight"},
{IPC::MakeHeader(0x0013, 1, 0), nullptr, "SetLedForceOff"},
{IPC::MakeHeader(0x0014, 0, 0), nullptr, "GetVendor"},
{IPC::MakeHeader(0x0015, 1, 0), nullptr, "GetBrightness"},
{0x000A, nullptr, "SetBrightnessRaw"},
{0x000B, nullptr, "SetBrightness"},
{0x000F, nullptr, "PowerOnAllBacklights"},
{0x0010, nullptr, "PowerOffAllBacklights"},
{0x0011, nullptr, "PowerOnBacklight"},
{0x0012, nullptr, "PowerOffBacklight"},
{0x0013, nullptr, "SetLedForceOff"},
{0x0014, nullptr, "GetVendor"},
{0x0015, nullptr, "GetBrightness"},
// clang-format on
};
RegisterHandlers(functions);

View File

@ -307,7 +307,7 @@ void Module::UpdateGyroscopeCallback(std::uintptr_t user_data, s64 cycles_late)
}
void Module::Interface::GetIPCHandles(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp{ctx, 0xA, 0, 0};
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 7);
rb.Push(RESULT_SUCCESS);
rb.PushCopyObjects(hid->shared_mem, hid->event_pad_or_touch_1, hid->event_pad_or_touch_2,
@ -315,7 +315,7 @@ void Module::Interface::GetIPCHandles(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::EnableAccelerometer(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp{ctx, 0x11, 0, 0};
IPC::RequestParser rp(ctx);
++hid->enable_accelerometer_count;
@ -332,7 +332,7 @@ void Module::Interface::EnableAccelerometer(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::DisableAccelerometer(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp{ctx, 0x12, 0, 0};
IPC::RequestParser rp(ctx);
--hid->enable_accelerometer_count;
@ -348,7 +348,7 @@ void Module::Interface::DisableAccelerometer(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::EnableGyroscopeLow(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp{ctx, 0x13, 0, 0};
IPC::RequestParser rp(ctx);
++hid->enable_gyroscope_count;
@ -364,7 +364,7 @@ void Module::Interface::EnableGyroscopeLow(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::DisableGyroscopeLow(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp{ctx, 0x14, 0, 0};
IPC::RequestParser rp(ctx);
--hid->enable_gyroscope_count;
@ -380,7 +380,7 @@ void Module::Interface::DisableGyroscopeLow(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetGyroscopeLowRawToDpsCoefficient(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp{ctx, 0x15, 0, 0};
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
@ -388,7 +388,7 @@ void Module::Interface::GetGyroscopeLowRawToDpsCoefficient(Kernel::HLERequestCon
}
void Module::Interface::GetGyroscopeLowCalibrateParam(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp{ctx, 0x16, 0, 0};
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(6, 0);
rb.Push(RESULT_SUCCESS);
@ -405,7 +405,7 @@ void Module::Interface::GetGyroscopeLowCalibrateParam(Kernel::HLERequestContext&
}
void Module::Interface::GetSoundVolume(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp{ctx, 0x17, 0, 0};
IPC::RequestParser rp(ctx);
const u8 volume = static_cast<u8>(0x3F * Settings::values.volume.GetValue());

View File

@ -12,18 +12,18 @@ namespace Service::HID {
Spvr::Spvr(std::shared_ptr<Module> hid) : Module::Interface(std::move(hid), "hid:SPVR", 6) {
static const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0001, 8, 0), nullptr, "CalibrateTouchScreen"},
{IPC::MakeHeader(0x0002, 0, 0), nullptr, "UpdateTouchConfig"},
{IPC::MakeHeader(0x000A, 0, 0), &Spvr::GetIPCHandles, "GetIPCHandles"},
{IPC::MakeHeader(0x000B, 0, 0), nullptr, "StartAnalogStickCalibration"},
{IPC::MakeHeader(0x000E, 0, 0), nullptr, "GetAnalogStickCalibrateParam"},
{IPC::MakeHeader(0x0011, 0, 0), &Spvr::EnableAccelerometer, "EnableAccelerometer"},
{IPC::MakeHeader(0x0012, 0, 0), &Spvr::DisableAccelerometer, "DisableAccelerometer"},
{IPC::MakeHeader(0x0013, 0, 0), &Spvr::EnableGyroscopeLow, "EnableGyroscopeLow"},
{IPC::MakeHeader(0x0014, 0, 0), &Spvr::DisableGyroscopeLow, "DisableGyroscopeLow"},
{IPC::MakeHeader(0x0015, 0, 0), &Spvr::GetGyroscopeLowRawToDpsCoefficient, "GetGyroscopeLowRawToDpsCoefficient"},
{IPC::MakeHeader(0x0016, 0, 0), &Spvr::GetGyroscopeLowCalibrateParam, "GetGyroscopeLowCalibrateParam"},
{IPC::MakeHeader(0x0017, 0, 0), &Spvr::GetSoundVolume, "GetSoundVolume"},
{0x0001, nullptr, "CalibrateTouchScreen"},
{0x0002, nullptr, "UpdateTouchConfig"},
{0x000A, &Spvr::GetIPCHandles, "GetIPCHandles"},
{0x000B, nullptr, "StartAnalogStickCalibration"},
{0x000E, nullptr, "GetAnalogStickCalibrateParam"},
{0x0011, &Spvr::EnableAccelerometer, "EnableAccelerometer"},
{0x0012, &Spvr::DisableAccelerometer, "DisableAccelerometer"},
{0x0013, &Spvr::EnableGyroscopeLow, "EnableGyroscopeLow"},
{0x0014, &Spvr::DisableGyroscopeLow, "DisableGyroscopeLow"},
{0x0015, &Spvr::GetGyroscopeLowRawToDpsCoefficient, "GetGyroscopeLowRawToDpsCoefficient"},
{0x0016, &Spvr::GetGyroscopeLowCalibrateParam, "GetGyroscopeLowCalibrateParam"},
{0x0017, &Spvr::GetSoundVolume, "GetSoundVolume"},
// clang-format on
};
RegisterHandlers(functions);

View File

@ -12,18 +12,18 @@ namespace Service::HID {
User::User(std::shared_ptr<Module> hid) : Module::Interface(std::move(hid), "hid:USER", 6) {
static const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0001, 8, 0), nullptr, "CalibrateTouchScreen"},
{IPC::MakeHeader(0x0002, 0, 0), nullptr, "UpdateTouchConfig"},
{IPC::MakeHeader(0x000A, 0, 0), &User::GetIPCHandles, "GetIPCHandles"},
{IPC::MakeHeader(0x000B, 0, 0), nullptr, "StartAnalogStickCalibration"},
{IPC::MakeHeader(0x000E, 0, 0), nullptr, "GetAnalogStickCalibrateParam"},
{IPC::MakeHeader(0x0011, 0, 0), &User::EnableAccelerometer, "EnableAccelerometer"},
{IPC::MakeHeader(0x0012, 0, 0), &User::DisableAccelerometer, "DisableAccelerometer"},
{IPC::MakeHeader(0x0013, 0, 0), &User::EnableGyroscopeLow, "EnableGyroscopeLow"},
{IPC::MakeHeader(0x0014, 0, 0), &User::DisableGyroscopeLow, "DisableGyroscopeLow"},
{IPC::MakeHeader(0x0015, 0, 0), &User::GetGyroscopeLowRawToDpsCoefficient, "GetGyroscopeLowRawToDpsCoefficient"},
{IPC::MakeHeader(0x0016, 0, 0), &User::GetGyroscopeLowCalibrateParam, "GetGyroscopeLowCalibrateParam"},
{IPC::MakeHeader(0x0017, 0, 0), &User::GetSoundVolume, "GetSoundVolume"},
{0x0001, nullptr, "CalibrateTouchScreen"},
{0x0002, nullptr, "UpdateTouchConfig"},
{0x000A, &User::GetIPCHandles, "GetIPCHandles"},
{0x000B, nullptr, "StartAnalogStickCalibration"},
{0x000E, nullptr, "GetAnalogStickCalibrateParam"},
{0x0011, &User::EnableAccelerometer, "EnableAccelerometer"},
{0x0012, &User::DisableAccelerometer, "DisableAccelerometer"},
{0x0013, &User::EnableGyroscopeLow, "EnableGyroscopeLow"},
{0x0014, &User::DisableGyroscopeLow, "DisableGyroscopeLow"},
{0x0015, &User::GetGyroscopeLowRawToDpsCoefficient, "GetGyroscopeLowRawToDpsCoefficient"},
{0x0016, &User::GetGyroscopeLowCalibrateParam, "GetGyroscopeLowCalibrateParam"},
{0x0017, &User::GetSoundVolume, "GetSoundVolume"},
// clang-format on
};
RegisterHandlers(functions);

View File

@ -115,7 +115,7 @@ void Context::MakeRequest() {
}
void HTTP_C::Initialize(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1, 1, 4);
IPC::RequestParser rp(ctx);
const u32 shmem_size = rp.Pop<u32>();
u32 pid = rp.PopPID();
shared_memory = rp.PopObject<Kernel::SharedMemory>();
@ -145,7 +145,7 @@ void HTTP_C::Initialize(Kernel::HLERequestContext& ctx) {
}
void HTTP_C::InitializeConnectionSession(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x8, 1, 2);
IPC::RequestParser rp(ctx);
const Context::Handle context_handle = rp.Pop<u32>();
u32 pid = rp.PopPID();
@ -180,7 +180,7 @@ void HTTP_C::InitializeConnectionSession(Kernel::HLERequestContext& ctx) {
}
void HTTP_C::BeginRequest(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x9, 1, 0);
IPC::RequestParser rp(ctx);
const Context::Handle context_handle = rp.Pop<u32>();
LOG_WARNING(Service_HTTP, "(STUBBED) called, context_id={}", context_handle);
@ -233,7 +233,7 @@ void HTTP_C::BeginRequest(Kernel::HLERequestContext& ctx) {
}
void HTTP_C::BeginRequestAsync(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0xA, 1, 0);
IPC::RequestParser rp(ctx);
const Context::Handle context_handle = rp.Pop<u32>();
LOG_WARNING(Service_HTTP, "(STUBBED) called, context_id={}", context_handle);
@ -286,7 +286,7 @@ void HTTP_C::BeginRequestAsync(Kernel::HLERequestContext& ctx) {
}
void HTTP_C::CreateContext(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x2, 2, 2);
IPC::RequestParser rp(ctx);
const u32 url_size = rp.Pop<u32>();
RequestMethod method = rp.PopEnum<RequestMethod>();
Kernel::MappedBuffer& buffer = rp.PopMappedBuffer();
@ -359,7 +359,7 @@ void HTTP_C::CreateContext(Kernel::HLERequestContext& ctx) {
}
void HTTP_C::CloseContext(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x3, 1, 0);
IPC::RequestParser rp(ctx);
u32 context_handle = rp.Pop<u32>();
@ -399,7 +399,7 @@ void HTTP_C::CloseContext(Kernel::HLERequestContext& ctx) {
}
void HTTP_C::AddRequestHeader(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x11, 3, 4);
IPC::RequestParser rp(ctx);
const u32 context_handle = rp.Pop<u32>();
[[maybe_unused]] const u32 name_size = rp.Pop<u32>();
const u32 value_size = rp.Pop<u32>();
@ -475,7 +475,7 @@ void HTTP_C::AddRequestHeader(Kernel::HLERequestContext& ctx) {
}
void HTTP_C::AddPostDataAscii(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x12, 3, 4);
IPC::RequestParser rp(ctx);
const u32 context_handle = rp.Pop<u32>();
[[maybe_unused]] const u32 name_size = rp.Pop<u32>();
const u32 value_size = rp.Pop<u32>();
@ -550,7 +550,7 @@ void HTTP_C::AddPostDataAscii(Kernel::HLERequestContext& ctx) {
}
void HTTP_C::SetClientCertContext(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x29, 2, 0);
IPC::RequestParser rp(ctx);
const u32 context_handle = rp.Pop<u32>();
const u32 client_cert_handle = rp.Pop<u32>();
@ -620,7 +620,7 @@ void HTTP_C::SetClientCertContext(Kernel::HLERequestContext& ctx) {
}
void HTTP_C::GetSSLError(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x2a, 2, 0);
IPC::RequestParser rp(ctx);
const u32 context_handle = rp.Pop<u32>();
const u32 unk = rp.Pop<u32>();
@ -637,7 +637,7 @@ void HTTP_C::GetSSLError(Kernel::HLERequestContext& ctx) {
}
void HTTP_C::OpenClientCertContext(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x32, 2, 4);
IPC::RequestParser rp(ctx);
u32 cert_size = rp.Pop<u32>();
u32 key_size = rp.Pop<u32>();
Kernel::MappedBuffer& cert_buffer = rp.PopMappedBuffer();
@ -678,7 +678,7 @@ void HTTP_C::OpenClientCertContext(Kernel::HLERequestContext& ctx) {
}
void HTTP_C::OpenDefaultClientCertContext(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x33, 1, 0);
IPC::RequestParser rp(ctx);
u8 cert_id = rp.Pop<u8>();
LOG_DEBUG(Service_HTTP, "called, cert_id={} cert_handle={}", cert_id, client_certs_counter);
@ -750,7 +750,7 @@ void HTTP_C::OpenDefaultClientCertContext(Kernel::HLERequestContext& ctx) {
}
void HTTP_C::CloseClientCertContext(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x34, 1, 0);
IPC::RequestParser rp(ctx);
ClientCertContext::Handle cert_handle = rp.Pop<u32>();
LOG_DEBUG(Service_HTTP, "called, cert_handle={}", cert_handle);
@ -782,7 +782,7 @@ void HTTP_C::CloseClientCertContext(Kernel::HLERequestContext& ctx) {
}
void HTTP_C::Finalize(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x39, 0, 0);
IPC::RequestParser rp(ctx);
shared_memory = nullptr;
@ -870,62 +870,62 @@ void HTTP_C::DecryptClCertA() {
HTTP_C::HTTP_C() : ServiceFramework("http:C", 32) {
static const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0001, 1, 4), &HTTP_C::Initialize, "Initialize"},
{IPC::MakeHeader(0x0002, 2, 2), &HTTP_C::CreateContext, "CreateContext"},
{IPC::MakeHeader(0x0003, 1, 0), &HTTP_C::CloseContext, "CloseContext"},
{IPC::MakeHeader(0x0004, 1, 0), nullptr, "CancelConnection"},
{IPC::MakeHeader(0x0005, 1, 0), nullptr, "GetRequestState"},
{IPC::MakeHeader(0x0006, 1, 0), nullptr, "GetDownloadSizeState"},
{IPC::MakeHeader(0x0007, 1, 0), nullptr, "GetRequestError"},
{IPC::MakeHeader(0x0008, 1, 2), &HTTP_C::InitializeConnectionSession, "InitializeConnectionSession"},
{IPC::MakeHeader(0x0009, 1, 0), &HTTP_C::BeginRequest, "BeginRequest"},
{IPC::MakeHeader(0x000A, 1, 0), &HTTP_C::BeginRequestAsync, "BeginRequestAsync"},
{IPC::MakeHeader(0x000B, 2, 2), nullptr, "ReceiveData"},
{IPC::MakeHeader(0x000C, 4, 2), nullptr, "ReceiveDataTimeout"},
{IPC::MakeHeader(0x000D, 5, 6), nullptr, "SetProxy"},
{IPC::MakeHeader(0x000E, 1, 0), nullptr, "SetProxyDefault"},
{IPC::MakeHeader(0x000F, 3, 4), nullptr, "SetBasicAuthorization"},
{IPC::MakeHeader(0x0010, 2, 0), nullptr, "SetSocketBufferSize"},
{IPC::MakeHeader(0x0011, 3, 4), &HTTP_C::AddRequestHeader, "AddRequestHeader"},
{IPC::MakeHeader(0x0012, 3, 4), &HTTP_C::AddPostDataAscii, "AddPostDataAscii"},
{IPC::MakeHeader(0x0013, 3, 4), nullptr, "AddPostDataBinary"},
{IPC::MakeHeader(0x0014, 2, 2), nullptr, "AddPostDataRaw"},
{IPC::MakeHeader(0x0015, 2, 0), nullptr, "SetPostDataType"},
{IPC::MakeHeader(0x0016, 3, 4), nullptr, "SendPostDataAscii"},
{IPC::MakeHeader(0x0017, 5, 4), nullptr, "SendPostDataAsciiTimeout"},
{IPC::MakeHeader(0x0018, 3, 4), nullptr, "SendPostDataBinary"},
{IPC::MakeHeader(0x0019, 5, 4), nullptr, "SendPostDataBinaryTimeout"},
{IPC::MakeHeader(0x001A, 2, 2), nullptr, "SendPostDataRaw"},
{IPC::MakeHeader(0x001B, 4, 2), nullptr, "SendPOSTDataRawTimeout"},
{IPC::MakeHeader(0x001C, 2, 0), nullptr, "SetPostDataEncoding"},
{IPC::MakeHeader(0x001D, 1, 0), nullptr, "NotifyFinishSendPostData"},
{IPC::MakeHeader(0x001E, 3, 4), nullptr, "GetResponseHeader"},
{IPC::MakeHeader(0x001F, 5, 4), nullptr, "GetResponseHeaderTimeout"},
{IPC::MakeHeader(0x0020, 2, 2), nullptr, "GetResponseData"},
{IPC::MakeHeader(0x0021, 4, 2), nullptr, "GetResponseDataTimeout"},
{IPC::MakeHeader(0x0022, 1, 0), nullptr, "GetResponseStatusCode"},
{IPC::MakeHeader(0x0023, 3, 0), nullptr, "GetResponseStatusCodeTimeout"},
{IPC::MakeHeader(0x0024, 2, 2), nullptr, "AddTrustedRootCA"},
{IPC::MakeHeader(0x0025, 2, 0), nullptr, "AddDefaultCert"},
{IPC::MakeHeader(0x0026, 2, 0), nullptr, "SelectRootCertChain"},
{IPC::MakeHeader(0x0027, 3, 4), nullptr, "SetClientCert"},
{IPC::MakeHeader(0x0029, 2, 0), &HTTP_C::SetClientCertContext, "SetClientCertContext"},
{IPC::MakeHeader(0x002A, 1, 0), &HTTP_C::GetSSLError, "GetSSLError"},
{IPC::MakeHeader(0x002B, 2, 0), nullptr, "SetSSLOpt"},
{IPC::MakeHeader(0x002C, 2, 0), nullptr, "SetSSLClearOpt"},
{IPC::MakeHeader(0x002D, 0, 0), nullptr, "CreateRootCertChain"},
{IPC::MakeHeader(0x002E, 1, 0), nullptr, "DestroyRootCertChain"},
{IPC::MakeHeader(0x002F, 2, 2), nullptr, "RootCertChainAddCert"},
{IPC::MakeHeader(0x0030, 2, 0), nullptr, "RootCertChainAddDefaultCert"},
{IPC::MakeHeader(0x0031, 2, 0), nullptr, "RootCertChainRemoveCert"},
{IPC::MakeHeader(0x0032, 2, 4), &HTTP_C::OpenClientCertContext, "OpenClientCertContext"},
{IPC::MakeHeader(0x0033, 1, 0), &HTTP_C::OpenDefaultClientCertContext, "OpenDefaultClientCertContext"},
{IPC::MakeHeader(0x0034, 1, 0), &HTTP_C::CloseClientCertContext, "CloseClientCertContext"},
{IPC::MakeHeader(0x0035, 6, 6), nullptr, "SetDefaultProxy"},
{IPC::MakeHeader(0x0036, 0, 0), nullptr, "ClearDNSCache"},
{IPC::MakeHeader(0x0037, 2, 0), nullptr, "SetKeepAlive"},
{IPC::MakeHeader(0x0038, 3, 0), nullptr, "SetPostDataTypeSize"},
{IPC::MakeHeader(0x0039, 0, 0), &HTTP_C::Finalize, "Finalize"},
{0x0001, &HTTP_C::Initialize, "Initialize"},
{0x0002, &HTTP_C::CreateContext, "CreateContext"},
{0x0003, &HTTP_C::CloseContext, "CloseContext"},
{0x0004, nullptr, "CancelConnection"},
{0x0005, nullptr, "GetRequestState"},
{0x0006, nullptr, "GetDownloadSizeState"},
{0x0007, nullptr, "GetRequestError"},
{0x0008, &HTTP_C::InitializeConnectionSession, "InitializeConnectionSession"},
{0x0009, &HTTP_C::BeginRequest, "BeginRequest"},
{0x000A, &HTTP_C::BeginRequestAsync, "BeginRequestAsync"},
{0x000B, nullptr, "ReceiveData"},
{0x000C, nullptr, "ReceiveDataTimeout"},
{0x000D, nullptr, "SetProxy"},
{0x000E, nullptr, "SetProxyDefault"},
{0x000F, nullptr, "SetBasicAuthorization"},
{0x0010, nullptr, "SetSocketBufferSize"},
{0x0011, &HTTP_C::AddRequestHeader, "AddRequestHeader"},
{0x0012, &HTTP_C::AddPostDataAscii, "AddPostDataAscii"},
{0x0013, nullptr, "AddPostDataBinary"},
{0x0014, nullptr, "AddPostDataRaw"},
{0x0015, nullptr, "SetPostDataType"},
{0x0016, nullptr, "SendPostDataAscii"},
{0x0017, nullptr, "SendPostDataAsciiTimeout"},
{0x0018, nullptr, "SendPostDataBinary"},
{0x0019, nullptr, "SendPostDataBinaryTimeout"},
{0x001A, nullptr, "SendPostDataRaw"},
{0x001B, nullptr, "SendPOSTDataRawTimeout"},
{0x001C, nullptr, "SetPostDataEncoding"},
{0x001D, nullptr, "NotifyFinishSendPostData"},
{0x001E, nullptr, "GetResponseHeader"},
{0x001F, nullptr, "GetResponseHeaderTimeout"},
{0x0020, nullptr, "GetResponseData"},
{0x0021, nullptr, "GetResponseDataTimeout"},
{0x0022, nullptr, "GetResponseStatusCode"},
{0x0023, nullptr, "GetResponseStatusCodeTimeout"},
{0x0024, nullptr, "AddTrustedRootCA"},
{0x0025, nullptr, "AddDefaultCert"},
{0x0026, nullptr, "SelectRootCertChain"},
{0x0027, nullptr, "SetClientCert"},
{0x0029, &HTTP_C::SetClientCertContext, "SetClientCertContext"},
{0x002A, &HTTP_C::GetSSLError, "GetSSLError"},
{0x002B, nullptr, "SetSSLOpt"},
{0x002C, nullptr, "SetSSLClearOpt"},
{0x002D, nullptr, "CreateRootCertChain"},
{0x002E, nullptr, "DestroyRootCertChain"},
{0x002F, nullptr, "RootCertChainAddCert"},
{0x0030, nullptr, "RootCertChainAddDefaultCert"},
{0x0031, nullptr, "RootCertChainRemoveCert"},
{0x0032, &HTTP_C::OpenClientCertContext, "OpenClientCertContext"},
{0x0033, &HTTP_C::OpenDefaultClientCertContext, "OpenDefaultClientCertContext"},
{0x0034, &HTTP_C::CloseClientCertContext, "CloseClientCertContext"},
{0x0035, nullptr, "SetDefaultProxy"},
{0x0036, nullptr, "ClearDNSCache"},
{0x0037, nullptr, "SetKeepAlive"},
{0x0038, nullptr, "SetPostDataTypeSize"},
{0x0039, &HTTP_C::Finalize, "Finalize"},
// clang-format on
};
RegisterHandlers(functions);

View File

@ -128,14 +128,14 @@ void IR_RST::UpdateCallback(std::uintptr_t user_data, s64 cycles_late) {
}
void IR_RST::GetHandles(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x01, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 3);
rb.Push(RESULT_SUCCESS);
rb.PushMoveObjects(shared_memory, update_event);
}
void IR_RST::Initialize(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x02, 2, 0);
IPC::RequestParser rp(ctx);
update_period = static_cast<int>(rp.Pop<u32>());
raw_c_stick = rp.Pop<bool>();
@ -153,7 +153,7 @@ void IR_RST::Initialize(Kernel::HLERequestContext& ctx) {
}
void IR_RST::Shutdown(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x03, 0, 0);
IPC::RequestParser rp(ctx);
system.CoreTiming().UnscheduleEvent(update_callback_id, 0);
UnloadInputDevices();
@ -181,10 +181,10 @@ IR_RST::IR_RST(Core::System& system) : ServiceFramework("ir:rst", 1), system(sys
static const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0001, 0, 0), &IR_RST::GetHandles, "GetHandles"},
{IPC::MakeHeader(0x0002, 2, 0), &IR_RST::Initialize, "Initialize"},
{IPC::MakeHeader(0x0003, 0, 0), &IR_RST::Shutdown, "Shutdown"},
{IPC::MakeHeader(0x0009, 0, 0), nullptr, "WriteToTwoFields"},
{0x0001, &IR_RST::GetHandles, "GetHandles"},
{0x0002, &IR_RST::Initialize, "Initialize"},
{0x0003, &IR_RST::Shutdown, "Shutdown"},
{0x0009, nullptr, "WriteToTwoFields"},
// clang-format on
};
RegisterHandlers(functions);

View File

@ -12,24 +12,24 @@ namespace Service::IR {
IR_U::IR_U() : ServiceFramework("ir:u", 1) {
static const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0001, 0, 0), nullptr, "Initialize"},
{IPC::MakeHeader(0x0002, 0, 0), nullptr, "Shutdown"},
{IPC::MakeHeader(0x0003, 1, 2), nullptr, "StartSendTransfer"},
{IPC::MakeHeader(0x0004, 0, 0), nullptr, "WaitSendTransfer"},
{IPC::MakeHeader(0x0005, 3, 2), nullptr, "StartRecvTransfer"},
{IPC::MakeHeader(0x0006, 0, 0), nullptr, "WaitRecvTransfer"},
{IPC::MakeHeader(0x0007, 2, 0), nullptr, "GetRecvTransferCount"},
{IPC::MakeHeader(0x0008, 0, 0), nullptr, "GetSendState"},
{IPC::MakeHeader(0x0009, 1, 0), nullptr, "SetBitRate"},
{IPC::MakeHeader(0x000A, 0, 0), nullptr, "GetBitRate"},
{IPC::MakeHeader(0x000B, 1, 0), nullptr, "SetIRLEDState"},
{IPC::MakeHeader(0x000C, 0, 0), nullptr, "GetIRLEDRecvState"},
{IPC::MakeHeader(0x000D, 0, 0), nullptr, "GetSendFinishedEvent"},
{IPC::MakeHeader(0x000E, 0, 0), nullptr, "GetRecvFinishedEvent"},
{IPC::MakeHeader(0x000F, 0, 0), nullptr, "GetTransferState"},
{IPC::MakeHeader(0x0010, 0, 0), nullptr, "GetErrorStatus"},
{IPC::MakeHeader(0x0011, 1, 0), nullptr, "SetSleepModeActive"},
{IPC::MakeHeader(0x0012, 1, 0), nullptr, "SetSleepModeState"},
{0x0001, nullptr, "Initialize"},
{0x0002, nullptr, "Shutdown"},
{0x0003, nullptr, "StartSendTransfer"},
{0x0004, nullptr, "WaitSendTransfer"},
{0x0005, nullptr, "StartRecvTransfer"},
{0x0006, nullptr, "WaitRecvTransfer"},
{0x0007, nullptr, "GetRecvTransferCount"},
{0x0008, nullptr, "GetSendState"},
{0x0009, nullptr, "SetBitRate"},
{0x000A, nullptr, "GetBitRate"},
{0x000B, nullptr, "SetIRLEDState"},
{0x000C, nullptr, "GetIRLEDRecvState"},
{0x000D, nullptr, "GetSendFinishedEvent"},
{0x000E, nullptr, "GetRecvFinishedEvent"},
{0x000F, nullptr, "GetTransferState"},
{0x0010, nullptr, "GetErrorStatus"},
{0x0011, nullptr, "SetSleepModeActive"},
{0x0012, nullptr, "SetSleepModeState"},
// clang-format on
};
RegisterHandlers(functions);

View File

@ -274,7 +274,7 @@ void IR_USER::PutToReceive(std::span<const u8> payload) {
}
void IR_USER::InitializeIrNopShared(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x18, 6, 2);
IPC::RequestParser rp(ctx);
const u32 shared_buff_size = rp.Pop<u32>();
const u32 recv_buff_size = rp.Pop<u32>();
const u32 recv_buff_packet_count = rp.Pop<u32>();
@ -304,7 +304,7 @@ void IR_USER::InitializeIrNopShared(Kernel::HLERequestContext& ctx) {
}
void IR_USER::RequireConnection(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x06, 1, 0);
IPC::RequestParser rp(ctx);
const u8 device_id = rp.Pop<u8>();
u8* shared_memory_ptr = shared_memory->GetPointer();
@ -390,7 +390,7 @@ void IR_USER::FinalizeIrNop(Kernel::HLERequestContext& ctx) {
}
void IR_USER::SendIrNop(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0D, 1, 2);
IPC::RequestParser rp(ctx);
const u32 size = rp.Pop<u32>();
std::vector<u8> buffer = rp.PopStaticBuffer();
ASSERT(size == buffer.size());
@ -410,7 +410,7 @@ void IR_USER::SendIrNop(Kernel::HLERequestContext& ctx) {
}
void IR_USER::ReleaseReceivedData(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x19, 1, 0);
IPC::RequestParser rp(ctx);
u32 count = rp.Pop<u32>();
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
@ -429,32 +429,32 @@ void IR_USER::ReleaseReceivedData(Kernel::HLERequestContext& ctx) {
IR_USER::IR_USER(Core::System& system) : ServiceFramework("ir:USER", 1) {
const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0001, 6, 2), nullptr, "InitializeIrNop"},
{IPC::MakeHeader(0x0002, 0, 0), &IR_USER::FinalizeIrNop, "FinalizeIrNop"},
{IPC::MakeHeader(0x0003, 0, 0), nullptr, "ClearReceiveBuffer"},
{IPC::MakeHeader(0x0004, 0, 0), nullptr, "ClearSendBuffer"},
{IPC::MakeHeader(0x0005, 3, 0), nullptr, "WaitConnection"},
{IPC::MakeHeader(0x0006, 1, 0), &IR_USER::RequireConnection, "RequireConnection"},
{IPC::MakeHeader(0x0007, 11, 0), nullptr, "AutoConnection"},
{IPC::MakeHeader(0x0008, 0, 0), nullptr, "AnyConnection"},
{IPC::MakeHeader(0x0009, 0, 0), &IR_USER::Disconnect, "Disconnect"},
{IPC::MakeHeader(0x000A, 0, 0), &IR_USER::GetReceiveEvent, "GetReceiveEvent"},
{IPC::MakeHeader(0x000B, 0, 0), &IR_USER::GetSendEvent, "GetSendEvent"},
{IPC::MakeHeader(0x000C, 0, 0), &IR_USER::GetConnectionStatusEvent, "GetConnectionStatusEvent"},
{IPC::MakeHeader(0x000D, 1, 2), &IR_USER::SendIrNop, "SendIrNop"},
{IPC::MakeHeader(0x000E, 1, 2), nullptr, "SendIrNopLarge"},
{IPC::MakeHeader(0x000F, 1, 0), nullptr, "ReceiveIrnop"},
{IPC::MakeHeader(0x0010, 1, 2), nullptr, "ReceiveIrnopLarge"},
{IPC::MakeHeader(0x0011, 1, 0), nullptr, "GetLatestReceiveErrorResult"},
{IPC::MakeHeader(0x0012, 1, 0), nullptr, "GetLatestSendErrorResult"},
{IPC::MakeHeader(0x0013, 0, 0), nullptr, "GetConnectionStatus"},
{IPC::MakeHeader(0x0014, 0, 0), nullptr, "GetTryingToConnectStatus"},
{IPC::MakeHeader(0x0015, 0, 0), nullptr, "GetReceiveSizeFreeAndUsed"},
{IPC::MakeHeader(0x0016, 0, 0), nullptr, "GetSendSizeFreeAndUsed"},
{IPC::MakeHeader(0x0017, 0, 0), nullptr, "GetConnectionRole"},
{IPC::MakeHeader(0x0018, 6, 2), &IR_USER::InitializeIrNopShared, "InitializeIrNopShared"},
{IPC::MakeHeader(0x0019, 1, 0), &IR_USER::ReleaseReceivedData, "ReleaseReceivedData"},
{IPC::MakeHeader(0x001A, 1, 0), nullptr, "SetOwnMachineId"},
{0x0001, nullptr, "InitializeIrNop"},
{0x0002, &IR_USER::FinalizeIrNop, "FinalizeIrNop"},
{0x0003, nullptr, "ClearReceiveBuffer"},
{0x0004, nullptr, "ClearSendBuffer"},
{0x0005, nullptr, "WaitConnection"},
{0x0006, &IR_USER::RequireConnection, "RequireConnection"},
{0x0007, nullptr, "AutoConnection"},
{0x0008, nullptr, "AnyConnection"},
{0x0009, &IR_USER::Disconnect, "Disconnect"},
{0x000A, &IR_USER::GetReceiveEvent, "GetReceiveEvent"},
{0x000B, &IR_USER::GetSendEvent, "GetSendEvent"},
{0x000C, &IR_USER::GetConnectionStatusEvent, "GetConnectionStatusEvent"},
{0x000D, &IR_USER::SendIrNop, "SendIrNop"},
{0x000E, nullptr, "SendIrNopLarge"},
{0x000F, nullptr, "ReceiveIrnop"},
{0x0010, nullptr, "ReceiveIrnopLarge"},
{0x0011, nullptr, "GetLatestReceiveErrorResult"},
{0x0012, nullptr, "GetLatestSendErrorResult"},
{0x0013, nullptr, "GetConnectionStatus"},
{0x0014, nullptr, "GetTryingToConnectStatus"},
{0x0015, nullptr, "GetReceiveSizeFreeAndUsed"},
{0x0016, nullptr, "GetSendSizeFreeAndUsed"},
{0x0017, nullptr, "GetConnectionRole"},
{0x0018, &IR_USER::InitializeIrNopShared, "InitializeIrNopShared"},
{0x0019, &IR_USER::ReleaseReceivedData, "ReleaseReceivedData"},
{0x001A, nullptr, "SetOwnMachineId"},
// clang-format on
};
RegisterHandlers(functions);

View File

@ -60,7 +60,7 @@ static bool VerifyBufferState(Kernel::Process& process, VAddr buffer_ptr, u32 si
}
void RO::Initialize(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x01, 3, 2);
IPC::RequestParser rp(ctx);
VAddr crs_buffer_ptr = rp.Pop<u32>();
u32 crs_size = rp.Pop<u32>();
VAddr crs_address = rp.Pop<u32>();
@ -143,7 +143,7 @@ void RO::Initialize(Kernel::HLERequestContext& ctx) {
}
void RO::LoadCRR(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x02, 2, 2);
IPC::RequestParser rp(ctx);
VAddr crr_buffer_ptr = rp.Pop<u32>();
u32 crr_size = rp.Pop<u32>();
auto process = rp.PopObject<Kernel::Process>();
@ -156,7 +156,7 @@ void RO::LoadCRR(Kernel::HLERequestContext& ctx) {
}
void RO::UnloadCRR(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x03, 1, 2);
IPC::RequestParser rp(ctx);
u32 crr_buffer_ptr = rp.Pop<u32>();
auto process = rp.PopObject<Kernel::Process>();
@ -167,7 +167,7 @@ void RO::UnloadCRR(Kernel::HLERequestContext& ctx) {
}
void RO::LoadCRO(Kernel::HLERequestContext& ctx, bool link_on_load_bug_fix) {
IPC::RequestParser rp(ctx, link_on_load_bug_fix ? 0x09 : 0x04, 11, 2);
IPC::RequestParser rp(ctx);
VAddr cro_buffer_ptr = rp.Pop<u32>();
VAddr cro_address = rp.Pop<u32>();
u32 cro_size = rp.Pop<u32>();
@ -334,7 +334,7 @@ void RO::LoadCRO(Kernel::HLERequestContext& ctx, bool link_on_load_bug_fix) {
}
void RO::UnloadCRO(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x05, 3, 2);
IPC::RequestParser rp(ctx);
VAddr cro_address = rp.Pop<u32>();
u32 zero = rp.Pop<u32>();
VAddr cro_buffer_ptr = rp.Pop<u32>();
@ -404,7 +404,7 @@ void RO::UnloadCRO(Kernel::HLERequestContext& ctx) {
}
void RO::LinkCRO(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x06, 1, 2);
IPC::RequestParser rp(ctx);
VAddr cro_address = rp.Pop<u32>();
auto process = rp.PopObject<Kernel::Process>();
@ -444,7 +444,7 @@ void RO::LinkCRO(Kernel::HLERequestContext& ctx) {
}
void RO::UnlinkCRO(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x07, 1, 2);
IPC::RequestParser rp(ctx);
VAddr cro_address = rp.Pop<u32>();
auto process = rp.PopObject<Kernel::Process>();
@ -484,7 +484,7 @@ void RO::UnlinkCRO(Kernel::HLERequestContext& ctx) {
}
void RO::Shutdown(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x08, 1, 2);
IPC::RequestParser rp(ctx);
VAddr crs_buffer_ptr = rp.Pop<u32>();
auto process = rp.PopObject<Kernel::Process>();
@ -517,15 +517,15 @@ void RO::Shutdown(Kernel::HLERequestContext& ctx) {
RO::RO(Core::System& system) : ServiceFramework("ldr:ro", 2), system(system) {
static const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0001, 3, 2), &RO::Initialize, "Initialize"},
{IPC::MakeHeader(0x0002, 2, 2), &RO::LoadCRR, "LoadCRR"},
{IPC::MakeHeader(0x0003, 1, 2), &RO::UnloadCRR, "UnloadCRR"},
{IPC::MakeHeader(0x0004, 11, 2), &RO::LoadCRO<false>, "LoadCRO"},
{IPC::MakeHeader(0x0005, 3, 2), &RO::UnloadCRO, "UnloadCRO"},
{IPC::MakeHeader(0x0006, 1, 2), &RO::LinkCRO, "LinkCRO"},
{IPC::MakeHeader(0x0007, 1, 2), &RO::UnlinkCRO, "UnlinkCRO"},
{IPC::MakeHeader(0x0008, 1, 2), &RO::Shutdown, "Shutdown"},
{IPC::MakeHeader(0x0009, 11, 2), &RO::LoadCRO<true>, "LoadCRO_New"},
{0x0001, &RO::Initialize, "Initialize"},
{0x0002, &RO::LoadCRR, "LoadCRR"},
{0x0003, &RO::UnloadCRR, "UnloadCRR"},
{0x0004, &RO::LoadCRO<false>, "LoadCRO"},
{0x0005, &RO::UnloadCRO, "UnloadCRO"},
{0x0006, &RO::LinkCRO, "LinkCRO"},
{0x0007, &RO::UnlinkCRO, "UnlinkCRO"},
{0x0008, &RO::Shutdown, "Shutdown"},
{0x0009, &RO::LoadCRO<true>, "LoadCRO_New"},
// clang-format on
};
RegisterHandlers(functions);

View File

@ -141,7 +141,7 @@ struct MIC_U::Impl {
}
void MapSharedMem(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp{ctx, 0x01, 1, 2};
IPC::RequestParser rp(ctx);
const u32 size = rp.Pop<u32>();
shared_memory = rp.PopObject<Kernel::SharedMemory>();
@ -159,7 +159,7 @@ struct MIC_U::Impl {
}
void UnmapSharedMem(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp{ctx, 0x02, 0, 0};
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
shared_memory = nullptr;
rb.Push(RESULT_SUCCESS);
@ -196,7 +196,7 @@ struct MIC_U::Impl {
}
void StartSampling(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp{ctx, 0x03, 5, 0};
IPC::RequestParser rp(ctx);
encoding = rp.PopEnum<Encoding>();
SampleRate sample_rate = rp.PopEnum<SampleRate>();
@ -231,7 +231,7 @@ struct MIC_U::Impl {
}
void AdjustSampling(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp{ctx, 0x04, 1, 0};
IPC::RequestParser rp(ctx);
SampleRate sample_rate = rp.PopEnum<SampleRate>();
mic->AdjustSampleRate(GetSampleRateInHz(sample_rate));
@ -241,7 +241,7 @@ struct MIC_U::Impl {
}
void StopSampling(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp{ctx, 0x05, 0, 0};
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
@ -251,7 +251,7 @@ struct MIC_U::Impl {
}
void IsSampling(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp{ctx, 0x06, 0, 0};
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
@ -261,7 +261,7 @@ struct MIC_U::Impl {
}
void GetBufferFullEvent(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp{ctx, 0x07, 0, 0};
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 2);
rb.Push(RESULT_SUCCESS);
@ -270,7 +270,7 @@ struct MIC_U::Impl {
}
void SetGain(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp{ctx, 0x08, 1, 0};
IPC::RequestParser rp(ctx);
u8 gain = rp.Pop<u8>();
mic->SetGain(gain);
@ -280,7 +280,7 @@ struct MIC_U::Impl {
}
void GetGain(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp{ctx, 0x09, 0, 0};
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
@ -290,7 +290,7 @@ struct MIC_U::Impl {
}
void SetPower(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp{ctx, 0x0A, 1, 0};
IPC::RequestParser rp(ctx);
bool power = rp.Pop<bool>();
mic->SetPower(power);
@ -300,7 +300,7 @@ struct MIC_U::Impl {
}
void GetPower(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp{ctx, 0x0B, 0, 0};
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
@ -310,7 +310,7 @@ struct MIC_U::Impl {
}
void SetIirFilterMic(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp{ctx, 0x0C, 1, 2};
IPC::RequestParser rp(ctx);
const u32 size = rp.Pop<u32>();
const Kernel::MappedBuffer& buffer = rp.PopMappedBuffer();
@ -322,7 +322,7 @@ struct MIC_U::Impl {
}
void SetClamp(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp{ctx, 0x0D, 1, 0};
IPC::RequestParser rp(ctx);
clamp = rp.Pop<bool>();
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
@ -331,7 +331,7 @@ struct MIC_U::Impl {
}
void GetClamp(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp{ctx, 0x0E, 0, 0};
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
@ -340,7 +340,7 @@ struct MIC_U::Impl {
}
void SetAllowShellClosed(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp{ctx, 0x0F, 1, 0};
IPC::RequestParser rp(ctx);
allow_shell_closed = rp.Pop<bool>();
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
@ -349,7 +349,7 @@ struct MIC_U::Impl {
}
void SetClientVersion(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp{ctx, 0x10, 1, 0};
IPC::RequestParser rp(ctx);
const u32 version = rp.Pop<u32>();
LOG_WARNING(Service_MIC, "(STUBBED) called, version: 0x{:08X}", version);
@ -486,22 +486,22 @@ MIC_U::MIC_U(Core::System& system)
: ServiceFramework{"mic:u", 1}, impl{std::make_unique<Impl>(system)} {
static const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0001, 1, 2), &MIC_U::MapSharedMem, "MapSharedMem"},
{IPC::MakeHeader(0x0002, 0, 0), &MIC_U::UnmapSharedMem, "UnmapSharedMem"},
{IPC::MakeHeader(0x0003, 5, 0), &MIC_U::StartSampling, "StartSampling"},
{IPC::MakeHeader(0x0004, 1, 0), &MIC_U::AdjustSampling, "AdjustSampling"},
{IPC::MakeHeader(0x0005, 0, 0), &MIC_U::StopSampling, "StopSampling"},
{IPC::MakeHeader(0x0006, 0, 0), &MIC_U::IsSampling, "IsSampling"},
{IPC::MakeHeader(0x0007, 0, 0), &MIC_U::GetBufferFullEvent, "GetBufferFullEvent"},
{IPC::MakeHeader(0x0008, 1, 0), &MIC_U::SetGain, "SetGain"},
{IPC::MakeHeader(0x0009, 0, 0), &MIC_U::GetGain, "GetGain"},
{IPC::MakeHeader(0x000A, 1, 0), &MIC_U::SetPower, "SetPower"},
{IPC::MakeHeader(0x000B, 0, 0), &MIC_U::GetPower, "GetPower"},
{IPC::MakeHeader(0x000C, 1, 2), &MIC_U::SetIirFilterMic, "SetIirFilterMic"},
{IPC::MakeHeader(0x000D, 1, 0), &MIC_U::SetClamp, "SetClamp"},
{IPC::MakeHeader(0x000E, 0, 0), &MIC_U::GetClamp, "GetClamp"},
{IPC::MakeHeader(0x000F, 1, 0), &MIC_U::SetAllowShellClosed, "SetAllowShellClosed"},
{IPC::MakeHeader(0x0010, 1, 0), &MIC_U::SetClientVersion, "SetClientVersion"},
{0x0001, &MIC_U::MapSharedMem, "MapSharedMem"},
{0x0002, &MIC_U::UnmapSharedMem, "UnmapSharedMem"},
{0x0003, &MIC_U::StartSampling, "StartSampling"},
{0x0004, &MIC_U::AdjustSampling, "AdjustSampling"},
{0x0005, &MIC_U::StopSampling, "StopSampling"},
{0x0006, &MIC_U::IsSampling, "IsSampling"},
{0x0007, &MIC_U::GetBufferFullEvent, "GetBufferFullEvent"},
{0x0008, &MIC_U::SetGain, "SetGain"},
{0x0009, &MIC_U::GetGain, "GetGain"},
{0x000A, &MIC_U::SetPower, "SetPower"},
{0x000B, &MIC_U::GetPower, "GetPower"},
{0x000C, &MIC_U::SetIirFilterMic, "SetIirFilterMic"},
{0x000D, &MIC_U::SetClamp, "SetClamp"},
{0x000E, &MIC_U::GetClamp, "GetClamp"},
{0x000F, &MIC_U::SetAllowShellClosed, "SetAllowShellClosed"},
{0x0010, &MIC_U::SetClientVersion, "SetClientVersion"},
// clang-format on
};

View File

@ -13,18 +13,18 @@ namespace Service::MVD {
MVD_STD::MVD_STD() : ServiceFramework("mvd:std", 1) {
static const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0001, 2, 2), nullptr, "Initialize"},
{IPC::MakeHeader(0x0002, 0, 0), nullptr, "Shutdown"},
{IPC::MakeHeader(0x0003, 12, 0), nullptr, "CalculateWorkBufSize"},
{IPC::MakeHeader(0x0004, 3, 0), nullptr, "CalculateImageSize"},
{IPC::MakeHeader(0x0008, 5, 2), nullptr, "ProcessNALUnit"},
{IPC::MakeHeader(0x0009, 1, 2), nullptr, "ControlFrameRendering"},
{IPC::MakeHeader(0x000A, 0, 0), nullptr, "GetStatus"},
{IPC::MakeHeader(0x000B, 0, 0), nullptr, "GetStatusOther"},
{IPC::MakeHeader(0x001D, 1, 2), nullptr, "GetConfig"},
{IPC::MakeHeader(0x001E, 1, 4), nullptr, "SetConfig"},
{IPC::MakeHeader(0x001F, 36, 2), nullptr, "SetOutputBuffer"},
{IPC::MakeHeader(0x0021, 4, 0), nullptr, "OverrideOutputBuffers"}
{0x0001, nullptr, "Initialize"},
{0x0002, nullptr, "Shutdown"},
{0x0003, nullptr, "CalculateWorkBufSize"},
{0x0004, nullptr, "CalculateImageSize"},
{0x0008, nullptr, "ProcessNALUnit"},
{0x0009, nullptr, "ControlFrameRendering"},
{0x000A, nullptr, "GetStatus"},
{0x000B, nullptr, "GetStatusOther"},
{0x001D, nullptr, "GetConfig"},
{0x001E, nullptr, "SetConfig"},
{0x001F, nullptr, "SetOutputBuffer"},
{0x0021, nullptr, "OverrideOutputBuffers"}
// clang-format on
};

View File

@ -12,7 +12,7 @@ SERIALIZE_EXPORT_IMPL(Service::NDM::NDM_U)
namespace Service::NDM {
void NDM_U::EnterExclusiveState(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x01, 1, 2);
IPC::RequestParser rp(ctx);
exclusive_state = rp.PopEnum<ExclusiveState>();
rp.PopPID();
@ -22,7 +22,7 @@ void NDM_U::EnterExclusiveState(Kernel::HLERequestContext& ctx) {
}
void NDM_U::LeaveExclusiveState(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x02, 0, 2);
IPC::RequestParser rp(ctx);
rp.PopPID();
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
@ -31,7 +31,7 @@ void NDM_U::LeaveExclusiveState(Kernel::HLERequestContext& ctx) {
}
void NDM_U::QueryExclusiveMode(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x03, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
rb.PushEnum(exclusive_state);
@ -39,7 +39,7 @@ void NDM_U::QueryExclusiveMode(Kernel::HLERequestContext& ctx) {
}
void NDM_U::LockState(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x04, 0, 2);
IPC::RequestParser rp(ctx);
rp.PopPID();
daemon_lock_enabled = true;
@ -49,7 +49,7 @@ void NDM_U::LockState(Kernel::HLERequestContext& ctx) {
}
void NDM_U::UnlockState(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x05, 0, 2);
IPC::RequestParser rp(ctx);
rp.PopPID();
daemon_lock_enabled = false;
@ -59,7 +59,7 @@ void NDM_U::UnlockState(Kernel::HLERequestContext& ctx) {
}
void NDM_U::SuspendDaemons(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x06, 1, 0);
IPC::RequestParser rp(ctx);
u32 bit_mask = rp.Pop<u32>() & 0xF;
daemon_bit_mask =
static_cast<DaemonMask>(static_cast<u32>(default_daemon_bit_mask) & ~bit_mask);
@ -75,7 +75,7 @@ void NDM_U::SuspendDaemons(Kernel::HLERequestContext& ctx) {
}
void NDM_U::ResumeDaemons(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x07, 1, 0);
IPC::RequestParser rp(ctx);
u32 bit_mask = rp.Pop<u32>() & 0xF;
daemon_bit_mask = static_cast<DaemonMask>(static_cast<u32>(daemon_bit_mask) & ~bit_mask);
for (std::size_t index = 0; index < daemon_status.size(); ++index) {
@ -90,7 +90,7 @@ void NDM_U::ResumeDaemons(Kernel::HLERequestContext& ctx) {
}
void NDM_U::SuspendScheduler(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x08, 1, 0);
IPC::RequestParser rp(ctx);
bool perform_in_background = rp.Pop<bool>();
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
@ -99,14 +99,14 @@ void NDM_U::SuspendScheduler(Kernel::HLERequestContext& ctx) {
}
void NDM_U::ResumeScheduler(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x09, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
LOG_WARNING(Service_NDM, "(STUBBED)");
}
void NDM_U::QueryStatus(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0D, 1, 0);
IPC::RequestParser rp(ctx);
u8 daemon = rp.Pop<u8>();
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
@ -116,7 +116,7 @@ void NDM_U::QueryStatus(Kernel::HLERequestContext& ctx) {
}
void NDM_U::GetDaemonDisableCount(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0E, 1, 0);
IPC::RequestParser rp(ctx);
u8 daemon = rp.Pop<u8>();
IPC::RequestBuilder rb = rp.MakeBuilder(3, 0);
@ -127,7 +127,7 @@ void NDM_U::GetDaemonDisableCount(Kernel::HLERequestContext& ctx) {
}
void NDM_U::GetSchedulerDisableCount(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0F, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(3, 0);
rb.Push(RESULT_SUCCESS);
@ -137,7 +137,7 @@ void NDM_U::GetSchedulerDisableCount(Kernel::HLERequestContext& ctx) {
}
void NDM_U::SetScanInterval(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x10, 1, 0);
IPC::RequestParser rp(ctx);
scan_interval = rp.Pop<u32>();
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
@ -146,7 +146,7 @@ void NDM_U::SetScanInterval(Kernel::HLERequestContext& ctx) {
}
void NDM_U::GetScanInterval(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x11, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
rb.Push(scan_interval);
@ -154,7 +154,7 @@ void NDM_U::GetScanInterval(Kernel::HLERequestContext& ctx) {
}
void NDM_U::SetRetryInterval(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x12, 1, 0);
IPC::RequestParser rp(ctx);
retry_interval = rp.Pop<u32>();
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
@ -163,7 +163,7 @@ void NDM_U::SetRetryInterval(Kernel::HLERequestContext& ctx) {
}
void NDM_U::GetRetryInterval(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x13, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
rb.Push(retry_interval);
@ -171,7 +171,7 @@ void NDM_U::GetRetryInterval(Kernel::HLERequestContext& ctx) {
}
void NDM_U::OverrideDefaultDaemons(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x14, 1, 0);
IPC::RequestParser rp(ctx);
u32 bit_mask = rp.Pop<u32>() & 0xF;
default_daemon_bit_mask = static_cast<DaemonMask>(bit_mask);
daemon_bit_mask = default_daemon_bit_mask;
@ -187,7 +187,7 @@ void NDM_U::OverrideDefaultDaemons(Kernel::HLERequestContext& ctx) {
}
void NDM_U::ResetDefaultDaemons(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x15, 0, 0);
IPC::RequestParser rp(ctx);
default_daemon_bit_mask = DaemonMask::Default;
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
@ -196,7 +196,7 @@ void NDM_U::ResetDefaultDaemons(Kernel::HLERequestContext& ctx) {
}
void NDM_U::GetDefaultDaemons(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x16, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
rb.PushEnum(default_daemon_bit_mask);
@ -204,7 +204,7 @@ void NDM_U::GetDefaultDaemons(Kernel::HLERequestContext& ctx) {
}
void NDM_U::ClearHalfAwakeMacFilter(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x17, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
LOG_WARNING(Service_NDM, "(STUBBED)");
@ -213,29 +213,29 @@ void NDM_U::ClearHalfAwakeMacFilter(Kernel::HLERequestContext& ctx) {
NDM_U::NDM_U() : ServiceFramework("ndm:u", 6) {
static const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0001, 1, 2), &NDM_U::EnterExclusiveState, "EnterExclusiveState"},
{IPC::MakeHeader(0x0002, 0, 2), &NDM_U::LeaveExclusiveState, "LeaveExclusiveState"},
{IPC::MakeHeader(0x0003, 0, 0), &NDM_U::QueryExclusiveMode, "QueryExclusiveMode"},
{IPC::MakeHeader(0x0004, 0, 2), &NDM_U::LockState, "LockState"},
{IPC::MakeHeader(0x0005, 0, 2), &NDM_U::UnlockState, "UnlockState"},
{IPC::MakeHeader(0x0006, 1, 0), &NDM_U::SuspendDaemons, "SuspendDaemons"},
{IPC::MakeHeader(0x0007, 1, 0), &NDM_U::ResumeDaemons, "ResumeDaemons"},
{IPC::MakeHeader(0x0008, 1, 0), &NDM_U::SuspendScheduler, "SuspendScheduler"},
{IPC::MakeHeader(0x0009, 0, 0), &NDM_U::ResumeScheduler, "ResumeScheduler"},
{IPC::MakeHeader(0x000A, 0, 0), nullptr, "GetCurrentState"},
{IPC::MakeHeader(0x000B, 0, 0), nullptr, "GetTargetState"},
{IPC::MakeHeader(0x000C, 0, 0), nullptr, "<Stubbed>"},
{IPC::MakeHeader(0x000D, 1, 0), &NDM_U::QueryStatus, "QueryStatus"},
{IPC::MakeHeader(0x000E, 1, 0), &NDM_U::GetDaemonDisableCount, "GetDaemonDisableCount"},
{IPC::MakeHeader(0x000F, 0, 0), &NDM_U::GetSchedulerDisableCount, "GetSchedulerDisableCount"},
{IPC::MakeHeader(0x0010, 1, 0), &NDM_U::SetScanInterval, "SetScanInterval"},
{IPC::MakeHeader(0x0011, 0, 0), &NDM_U::GetScanInterval, "GetScanInterval"},
{IPC::MakeHeader(0x0012, 1, 0), &NDM_U::SetRetryInterval, "SetRetryInterval"},
{IPC::MakeHeader(0x0013, 0, 0), &NDM_U::GetRetryInterval, "GetRetryInterval"},
{IPC::MakeHeader(0x0014, 1, 0), &NDM_U::OverrideDefaultDaemons, "OverrideDefaultDaemons"},
{IPC::MakeHeader(0x0015, 0, 0), &NDM_U::ResetDefaultDaemons, "ResetDefaultDaemons"},
{IPC::MakeHeader(0x0016, 0, 0), &NDM_U::GetDefaultDaemons, "GetDefaultDaemons"},
{IPC::MakeHeader(0x0017, 0, 0), &NDM_U::ClearHalfAwakeMacFilter, "ClearHalfAwakeMacFilter"},
{0x0001, &NDM_U::EnterExclusiveState, "EnterExclusiveState"},
{0x0002, &NDM_U::LeaveExclusiveState, "LeaveExclusiveState"},
{0x0003, &NDM_U::QueryExclusiveMode, "QueryExclusiveMode"},
{0x0004, &NDM_U::LockState, "LockState"},
{0x0005, &NDM_U::UnlockState, "UnlockState"},
{0x0006, &NDM_U::SuspendDaemons, "SuspendDaemons"},
{0x0007, &NDM_U::ResumeDaemons, "ResumeDaemons"},
{0x0008, &NDM_U::SuspendScheduler, "SuspendScheduler"},
{0x0009, &NDM_U::ResumeScheduler, "ResumeScheduler"},
{0x000A, nullptr, "GetCurrentState"},
{0x000B, nullptr, "GetTargetState"},
{0x000C, nullptr, "<Stubbed>"},
{0x000D, &NDM_U::QueryStatus, "QueryStatus"},
{0x000E, &NDM_U::GetDaemonDisableCount, "GetDaemonDisableCount"},
{0x000F, &NDM_U::GetSchedulerDisableCount, "GetSchedulerDisableCount"},
{0x0010, &NDM_U::SetScanInterval, "SetScanInterval"},
{0x0011, &NDM_U::GetScanInterval, "GetScanInterval"},
{0x0012, &NDM_U::SetRetryInterval, "SetRetryInterval"},
{0x0013, &NDM_U::GetRetryInterval, "GetRetryInterval"},
{0x0014, &NDM_U::OverrideDefaultDaemons, "OverrideDefaultDaemons"},
{0x0015, &NDM_U::ResetDefaultDaemons, "ResetDefaultDaemons"},
{0x0016, &NDM_U::GetDefaultDaemons, "GetDefaultDaemons"},
{0x0017, &NDM_U::ClearHalfAwakeMacFilter, "ClearHalfAwakeMacFilter"},
// clang-format on
};
RegisterHandlers(functions);

View File

@ -18,7 +18,7 @@ struct NewsDbHeader {
static_assert(sizeof(NewsDbHeader) == 0x10, "News DB Header structure size is wrong");
void NEWS_S::GetTotalNotifications(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x5, 0, 0);
IPC::RequestParser rp(ctx);
LOG_WARNING(Service, "(STUBBED) called");
@ -29,7 +29,7 @@ void NEWS_S::GetTotalNotifications(Kernel::HLERequestContext& ctx) {
}
void NEWS_S::GetNewsDBHeader(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0xA, 1, 2);
IPC::RequestParser rp(ctx);
const auto size = rp.Pop<u32>();
auto output_buffer = rp.PopMappedBuffer();
@ -47,19 +47,19 @@ void NEWS_S::GetNewsDBHeader(Kernel::HLERequestContext& ctx) {
NEWS_S::NEWS_S() : ServiceFramework("news:s", 2) {
const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0001, 3, 6), nullptr, "AddNotification"},
{IPC::MakeHeader(0x0005, 0, 0), &NEWS_S::GetTotalNotifications, "GetTotalNotifications"},
{IPC::MakeHeader(0x0006, 1, 2), nullptr, "SetNewsDBHeader"},
{IPC::MakeHeader(0x0007, 2, 2), nullptr, "SetNotificationHeader"},
{IPC::MakeHeader(0x0008, 2, 2), nullptr, "SetNotificationMessage"},
{IPC::MakeHeader(0x0009, 2, 2), nullptr, "SetNotificationImage"},
{IPC::MakeHeader(0x000A, 1, 2), &NEWS_S::GetNewsDBHeader, "GetNewsDBHeader"},
{IPC::MakeHeader(0x000B, 2, 2), nullptr, "GetNotificationHeader"},
{IPC::MakeHeader(0x000C, 2, 2), nullptr, "GetNotificationMessage"},
{IPC::MakeHeader(0x000D, 2, 2), nullptr, "GetNotificationImage"},
{IPC::MakeHeader(0x000E, 1, 0), nullptr, "SetInfoLEDPattern"},
{IPC::MakeHeader(0x0012, 2, 2), nullptr, "GetNotificationHeaderOther"},
{IPC::MakeHeader(0x0013, 0, 0), nullptr, "WriteNewsDBSavedata"},
{0x0001, nullptr, "AddNotification"},
{0x0005, &NEWS_S::GetTotalNotifications, "GetTotalNotifications"},
{0x0006, nullptr, "SetNewsDBHeader"},
{0x0007, nullptr, "SetNotificationHeader"},
{0x0008, nullptr, "SetNotificationMessage"},
{0x0009, nullptr, "SetNotificationImage"},
{0x000A, &NEWS_S::GetNewsDBHeader, "GetNewsDBHeader"},
{0x000B, nullptr, "GetNotificationHeader"},
{0x000C, nullptr, "GetNotificationMessage"},
{0x000D, nullptr, "GetNotificationImage"},
{0x000E, nullptr, "SetInfoLEDPattern"},
{0x0012, nullptr, "GetNotificationHeaderOther"},
{0x0013, nullptr, "WriteNewsDBSavedata"},
// clang-format on
};
RegisterHandlers(functions);

View File

@ -12,7 +12,7 @@ namespace Service::NEWS {
NEWS_U::NEWS_U() : ServiceFramework("news:u", 1) {
const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0001, 3, 8), nullptr, "AddNotification"},
{0x0001, nullptr, "AddNotification"},
// clang-format on
};
RegisterHandlers(functions);

View File

@ -24,7 +24,7 @@ void Module::serialize(Archive& ar, const unsigned int) {
SERIALIZE_IMPL(Module)
void Module::Interface::Initialize(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x01, 1, 0);
IPC::RequestParser rp(ctx);
const auto communication_mode = rp.PopEnum<CommunicationMode>();
LOG_INFO(Service_NFC, "called, communication_mode={}", communication_mode);
@ -58,7 +58,7 @@ void Module::Interface::Initialize(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::Finalize(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x02, 1, 0);
IPC::RequestParser rp(ctx);
const auto communication_mode = rp.PopEnum<CommunicationMode>();
LOG_INFO(Service_NFC, "called, communication_mode={}", communication_mode);
@ -92,7 +92,7 @@ void Module::Interface::Finalize(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::Connect(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x03, 0, 0);
IPC::RequestParser rp(ctx);
LOG_WARNING(Service_NFC, "(STUBBED) called");
@ -109,7 +109,7 @@ void Module::Interface::Connect(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::Disconnect(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x04, 0, 0);
IPC::RequestParser rp(ctx);
LOG_WARNING(Service_NFC, "(STUBBED) called");
@ -126,7 +126,7 @@ void Module::Interface::Disconnect(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::StartDetection(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x05, 1, 0);
IPC::RequestParser rp(ctx);
u16 in_val = rp.Pop<u16>();
LOG_INFO(Service_NFC, "called, in_val={:04x}", in_val);
@ -148,7 +148,7 @@ void Module::Interface::StartDetection(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::StopDetection(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x06, 0, 0);
IPC::RequestParser rp(ctx);
LOG_INFO(Service_NFC, "called");
@ -171,7 +171,7 @@ void Module::Interface::StopDetection(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::Mount(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x07, 0, 0);
IPC::RequestParser rp(ctx);
LOG_INFO(Service_NFC, "called");
@ -195,7 +195,7 @@ void Module::Interface::Mount(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::Unmount(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x08, 0, 0);
IPC::RequestParser rp(ctx);
LOG_INFO(Service_NFC, "called");
@ -215,7 +215,7 @@ void Module::Interface::Unmount(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::Flush(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x09, 0, 0);
IPC::RequestParser rp(ctx);
LOG_INFO(Service_NFC, "called");
@ -237,7 +237,7 @@ void Module::Interface::Flush(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetActivateEvent(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0B, 0, 0);
IPC::RequestParser rp(ctx);
LOG_INFO(Service_NFC, "called");
@ -254,7 +254,7 @@ void Module::Interface::GetActivateEvent(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetDeactivateEvent(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0C, 0, 0);
IPC::RequestParser rp(ctx);
LOG_INFO(Service_NFC, "called");
@ -271,7 +271,7 @@ void Module::Interface::GetDeactivateEvent(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetStatus(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0D, 0, 0);
IPC::RequestParser rp(ctx);
DeviceState state = DeviceState::NotInitialized;
LOG_DEBUG(Service_NFC, "called");
@ -288,7 +288,7 @@ void Module::Interface::GetStatus(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetTargetConnectionStatus(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0F, 0, 0);
IPC::RequestParser rp(ctx);
LOG_DEBUG(Service_NFC, "called");
@ -308,7 +308,7 @@ void Module::Interface::GetTargetConnectionStatus(Kernel::HLERequestContext& ctx
}
void Module::Interface::GetTagInfo2(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x10, 0, 0);
IPC::RequestParser rp(ctx);
LOG_INFO(Service_NFC, "called");
@ -330,7 +330,7 @@ void Module::Interface::GetTagInfo2(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetTagInfo(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x11, 0, 0);
IPC::RequestParser rp(ctx);
LOG_INFO(Service_NFC, "called");
@ -352,7 +352,7 @@ void Module::Interface::GetTagInfo(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetConnectResult(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x12, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
@ -361,7 +361,7 @@ void Module::Interface::GetConnectResult(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::OpenApplicationArea(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x13, 1, 0);
IPC::RequestParser rp(ctx);
u32 access_id = rp.Pop<u32>();
LOG_INFO(Service_NFC, "called, access_id={}", access_id);
@ -381,7 +381,7 @@ void Module::Interface::OpenApplicationArea(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::CreateApplicationArea(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x14, 18, 2);
IPC::RequestParser rp(ctx);
u32 access_id = rp.Pop<u32>();
[[maybe_unused]] u32 size = rp.Pop<u32>();
std::vector<u8> buffer = rp.PopStaticBuffer();
@ -401,7 +401,7 @@ void Module::Interface::CreateApplicationArea(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::ReadApplicationArea(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x15, 0, 0);
IPC::RequestParser rp(ctx);
LOG_INFO(Service_NFC, "called");
@ -422,7 +422,7 @@ void Module::Interface::ReadApplicationArea(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::WriteApplicationArea(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x16, 12, 2);
IPC::RequestParser rp(ctx);
[[maybe_unused]] u32 size = rp.Pop<u32>();
std::vector<u8> tag_uuid_info = rp.PopStaticBuffer();
std::vector<u8> buffer = rp.PopStaticBuffer();
@ -442,7 +442,7 @@ void Module::Interface::WriteApplicationArea(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetNfpRegisterInfo(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x17, 0, 0);
IPC::RequestParser rp(ctx);
LOG_INFO(Service_NFC, "called");
@ -463,7 +463,7 @@ void Module::Interface::GetNfpRegisterInfo(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetNfpCommonInfo(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x18, 0, 0);
IPC::RequestParser rp(ctx);
LOG_INFO(Service_NFC, "called");
@ -484,7 +484,7 @@ void Module::Interface::GetNfpCommonInfo(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::InitializeCreateInfo(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x19, 0, 0);
IPC::RequestParser rp(ctx);
LOG_INFO(Service_NFC, "called");
@ -503,7 +503,7 @@ void Module::Interface::InitializeCreateInfo(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::MountRom(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1A, 0, 0);
IPC::RequestParser rp(ctx);
LOG_INFO(Service_NFC, "called");
@ -525,7 +525,7 @@ void Module::Interface::MountRom(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetIdentificationBlock(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1B, 0, 0);
IPC::RequestParser rp(ctx);
LOG_INFO(Service_NFC, "called");
@ -546,7 +546,7 @@ void Module::Interface::GetIdentificationBlock(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::Format(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x401, 3, 2);
IPC::RequestParser rp(ctx);
[[maybe_unused]] u32 unknown1 = rp.Pop<u32>();
[[maybe_unused]] u32 unknown2 = rp.Pop<u32>();
[[maybe_unused]] u32 unknown3 = rp.Pop<u32>();
@ -560,7 +560,7 @@ void Module::Interface::Format(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetAdminInfo(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x402, 0, 0);
IPC::RequestParser rp(ctx);
LOG_INFO(Service_NFC, "called");
@ -581,7 +581,7 @@ void Module::Interface::GetAdminInfo(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetEmptyRegisterInfo(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x403, 0, 0);
IPC::RequestParser rp(ctx);
LOG_INFO(Service_NFC, "called");
@ -597,7 +597,7 @@ void Module::Interface::GetEmptyRegisterInfo(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::SetRegisterInfo(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x404, 41, 0);
IPC::RequestParser rp(ctx);
const auto register_info = rp.PopRaw<RegisterInfoPrivate>();
LOG_INFO(Service_NFC, "called");
@ -615,7 +615,7 @@ void Module::Interface::SetRegisterInfo(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::DeleteRegisterInfo(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x405, 0, 0);
IPC::RequestParser rp(ctx);
LOG_INFO(Service_NFC, "called");
@ -632,7 +632,7 @@ void Module::Interface::DeleteRegisterInfo(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::DeleteApplicationArea(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x406, 0, 0);
IPC::RequestParser rp(ctx);
LOG_INFO(Service_NFC, "called");
@ -649,7 +649,7 @@ void Module::Interface::DeleteApplicationArea(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::ExistsApplicationArea(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x407, 0, 0);
IPC::RequestParser rp(ctx);
if (nfc->nfc_mode != CommunicationMode::Amiibo) {
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);

View File

@ -13,41 +13,41 @@ NFC_M::NFC_M(std::shared_ptr<Module> nfc) : Module::Interface(std::move(nfc), "n
static const FunctionInfo functions[] = {
// nfc:u shared commands
// clang-format off
{IPC::MakeHeader(0x0001, 1, 0), &NFC_M::Initialize, "Initialize"},
{IPC::MakeHeader(0x0002, 1, 0), &NFC_M::Finalize, "Finalize"},
{IPC::MakeHeader(0x0003, 0, 0), &NFC_M::Connect, "Connect"},
{IPC::MakeHeader(0x0004, 0, 0), &NFC_M::Disconnect, "Disconnect"},
{IPC::MakeHeader(0x0005, 1, 0), &NFC_M::StartDetection, "StartDetection"},
{IPC::MakeHeader(0x0006, 0, 0), &NFC_M::StopDetection, "StopDetection"},
{IPC::MakeHeader(0x0007, 0, 0), &NFC_M::Mount, "Mount"},
{IPC::MakeHeader(0x0008, 0, 0), &NFC_M::Unmount, "Unmount"},
{IPC::MakeHeader(0x0009, 0, 2), &NFC_M::Flush, "Flush"},
{IPC::MakeHeader(0x000A, 0, 0), nullptr, "Restore"},
{IPC::MakeHeader(0x000B, 0, 0), &NFC_M::GetActivateEvent, "GetActivateEvent"},
{IPC::MakeHeader(0x000C, 0, 0), &NFC_M::GetDeactivateEvent, "GetDeactivateEvent"},
{IPC::MakeHeader(0x000D, 0, 0), &NFC_M::GetStatus, "GetStatus"},
{IPC::MakeHeader(0x000E, 0, 0), nullptr, "Unknown0x0E"},
{IPC::MakeHeader(0x000F, 0, 0), &NFC_M::GetTargetConnectionStatus, "GetTargetConnectionStatus"},
{IPC::MakeHeader(0x0010, 0, 0), &NFC_M::GetTagInfo2, "GetTagInfo2"},
{IPC::MakeHeader(0x0011, 0, 0), &NFC_M::GetTagInfo, "GetTagInfo"},
{IPC::MakeHeader(0x0012, 0, 0), &NFC_M::GetConnectResult, "GetConnectResult"},
{IPC::MakeHeader(0x0013, 1, 0), &NFC_M::OpenApplicationArea, "OpenApplicationArea"},
{IPC::MakeHeader(0x0014, 14, 4), &NFC_M::CreateApplicationArea, "CreateApplicationArea"},
{IPC::MakeHeader(0x0015, 1, 0), &NFC_M::ReadApplicationArea, "ReadApplicationArea"},
{IPC::MakeHeader(0x0016, 9, 2), &NFC_M::WriteApplicationArea, "WriteApplicationArea"},
{IPC::MakeHeader(0x0017, 0, 0), &NFC_M::GetNfpRegisterInfo, "GetNfpRegisterInfo"},
{IPC::MakeHeader(0x0018, 0, 0), &NFC_M::GetNfpCommonInfo, "GetNfpCommonInfo"},
{IPC::MakeHeader(0x0019, 0, 0), &NFC_M::InitializeCreateInfo, "InitializeCreateInfo"},
{IPC::MakeHeader(0x001A, 0, 0), &NFC_M::MountRom, "MountRom"},
{IPC::MakeHeader(0x001B, 0, 0), &NFC_M::GetIdentificationBlock, "GetIdentificationBlock"},
{0x0001, &NFC_M::Initialize, "Initialize"},
{0x0002, &NFC_M::Finalize, "Finalize"},
{0x0003, &NFC_M::Connect, "Connect"},
{0x0004, &NFC_M::Disconnect, "Disconnect"},
{0x0005, &NFC_M::StartDetection, "StartDetection"},
{0x0006, &NFC_M::StopDetection, "StopDetection"},
{0x0007, &NFC_M::Mount, "Mount"},
{0x0008, &NFC_M::Unmount, "Unmount"},
{0x0009, &NFC_M::Flush, "Flush"},
{0x000A, nullptr, "Restore"},
{0x000B, &NFC_M::GetActivateEvent, "GetActivateEvent"},
{0x000C, &NFC_M::GetDeactivateEvent, "GetDeactivateEvent"},
{0x000D, &NFC_M::GetStatus, "GetStatus"},
{0x000E, nullptr, "Unknown0x0E"},
{0x000F, &NFC_M::GetTargetConnectionStatus, "GetTargetConnectionStatus"},
{0x0010, &NFC_M::GetTagInfo2, "GetTagInfo2"},
{0x0011, &NFC_M::GetTagInfo, "GetTagInfo"},
{0x0012, &NFC_M::GetConnectResult, "GetConnectResult"},
{0x0013, &NFC_M::OpenApplicationArea, "OpenApplicationArea"},
{0x0014, &NFC_M::CreateApplicationArea, "CreateApplicationArea"},
{0x0015, &NFC_M::ReadApplicationArea, "ReadApplicationArea"},
{0x0016, &NFC_M::WriteApplicationArea, "WriteApplicationArea"},
{0x0017, &NFC_M::GetNfpRegisterInfo, "GetNfpRegisterInfo"},
{0x0018, &NFC_M::GetNfpCommonInfo, "GetNfpCommonInfo"},
{0x0019, &NFC_M::InitializeCreateInfo, "InitializeCreateInfo"},
{0x001A, &NFC_M::MountRom, "MountRom"},
{0x001B, &NFC_M::GetIdentificationBlock, "GetIdentificationBlock"},
// nfc:m
{IPC::MakeHeader(0x0401, 3, 2), &NFC_M::Format, "Format"},
{IPC::MakeHeader(0x0402, 0, 0), &NFC_M::GetAdminInfo, "GetAdminInfo"},
{IPC::MakeHeader(0x0403, 0, 0), &NFC_M::GetEmptyRegisterInfo, "GetEmptyRegisterInfo"},
{IPC::MakeHeader(0x0404, 41, 0), &NFC_M::SetRegisterInfo, "SetRegisterInfo"},
{IPC::MakeHeader(0x0405, 0, 0), &NFC_M::DeleteRegisterInfo, "DeleteRegisterInfo"},
{IPC::MakeHeader(0x0406, 0, 0), &NFC_M::DeleteApplicationArea, "DeleteApplicationArea"},
{IPC::MakeHeader(0x0407, 0, 0), &NFC_M::ExistsApplicationArea, "ExistsApplicationArea"}
{0x0401, &NFC_M::Format, "Format"},
{0x0402, &NFC_M::GetAdminInfo, "GetAdminInfo"},
{0x0403, &NFC_M::GetEmptyRegisterInfo, "GetEmptyRegisterInfo"},
{0x0404, &NFC_M::SetRegisterInfo, "SetRegisterInfo"},
{0x0405, &NFC_M::DeleteRegisterInfo, "DeleteRegisterInfo"},
{0x0406, &NFC_M::DeleteApplicationArea, "DeleteApplicationArea"},
{0x0407, &NFC_M::ExistsApplicationArea, "ExistsApplicationArea"}
// clang-format on
};
RegisterHandlers(functions);

View File

@ -12,40 +12,40 @@ namespace Service::NFC {
NFC_U::NFC_U(std::shared_ptr<Module> nfc) : Module::Interface(std::move(nfc), "nfc:u", 1) {
static const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0001, 1, 0), &NFC_U::Initialize, "Initialize"},
{IPC::MakeHeader(0x0002, 1, 0), &NFC_U::Finalize, "Finalize"},
{IPC::MakeHeader(0x0003, 0, 0), &NFC_U::Connect, "Connect"},
{IPC::MakeHeader(0x0004, 0, 0), &NFC_U::Disconnect, "Disconnect"},
{IPC::MakeHeader(0x0005, 1, 0), &NFC_U::StartDetection, "StartDetection"},
{IPC::MakeHeader(0x0006, 0, 0), &NFC_U::StopDetection, "StopDetection"},
{IPC::MakeHeader(0x0007, 0, 0), &NFC_U::Mount, "Mount"},
{IPC::MakeHeader(0x0008, 0, 0), &NFC_U::Unmount, "Unmount"},
{IPC::MakeHeader(0x0009, 0, 2), &NFC_U::Flush, "Flush"},
{IPC::MakeHeader(0x000A, 0, 0), nullptr, "Restore"},
{IPC::MakeHeader(0x000B, 0, 0), &NFC_U::GetActivateEvent, "GetActivateEvent"},
{IPC::MakeHeader(0x000C, 0, 0), &NFC_U::GetDeactivateEvent, "GetDeactivateEvent"},
{IPC::MakeHeader(0x000D, 0, 0), &NFC_U::GetStatus, "GetStatus"},
{IPC::MakeHeader(0x000E, 0, 0), nullptr, "Unknown0x0E"},
{IPC::MakeHeader(0x000F, 0, 0), &NFC_U::GetTargetConnectionStatus, "GetTargetConnectionStatus"},
{IPC::MakeHeader(0x0010, 0, 0), &NFC_U::GetTagInfo2, "GetTagInfo2"},
{IPC::MakeHeader(0x0011, 0, 0), &NFC_U::GetTagInfo, "GetTagInfo"},
{IPC::MakeHeader(0x0012, 0, 0), &NFC_U::GetConnectResult, "GetConnectResult"},
{IPC::MakeHeader(0x0013, 1, 0), &NFC_U::OpenApplicationArea, "OpenApplicationArea"},
{IPC::MakeHeader(0x0014, 14, 4), &NFC_U::CreateApplicationArea, "CreateApplicationArea"},
{IPC::MakeHeader(0x0015, 1, 0), &NFC_U::ReadApplicationArea, "ReadApplicationArea"},
{IPC::MakeHeader(0x0016, 9, 2), &NFC_U::WriteApplicationArea, "WriteApplicationArea"},
{IPC::MakeHeader(0x0017, 0, 0), &NFC_U::GetNfpRegisterInfo, "GetNfpRegisterInfo"},
{IPC::MakeHeader(0x0018, 0, 0), &NFC_U::GetNfpCommonInfo, "GetNfpCommonInfo"},
{IPC::MakeHeader(0x0019, 0, 0), &NFC_U::InitializeCreateInfo, "InitializeCreateInfo"},
{IPC::MakeHeader(0x001A, 0, 0), &NFC_U::MountRom, "MountRom"},
{IPC::MakeHeader(0x001B, 0, 0), &NFC_U::GetIdentificationBlock, "GetIdentificationBlock"},
{IPC::MakeHeader(0x001C, 0, 0), nullptr, "Unknown0x1C"},
{IPC::MakeHeader(0x001D, 0, 0), nullptr, "Unknown0x1D"},
{IPC::MakeHeader(0x001E, 0, 0), nullptr, "Unknown0x1E"},
{IPC::MakeHeader(0x001F, 0, 0), nullptr, "Unknown0x1F"},
{IPC::MakeHeader(0x0020, 0, 0), nullptr, "Unknown0x20"},
{IPC::MakeHeader(0x0021, 0, 0), nullptr, "Unknown0x21"},
{IPC::MakeHeader(0x0022, 0, 0), nullptr, "Unknown0x22"},
{0x0001, &NFC_U::Initialize, "Initialize"},
{0x0002, &NFC_U::Finalize, "Finalize"},
{0x0003, &NFC_U::Connect, "Connect"},
{0x0004, &NFC_U::Disconnect, "Disconnect"},
{0x0005, &NFC_U::StartDetection, "StartDetection"},
{0x0006, &NFC_U::StopDetection, "StopDetection"},
{0x0007, &NFC_U::Mount, "Mount"},
{0x0008, &NFC_U::Unmount, "Unmount"},
{0x0009, &NFC_U::Flush, "Flush"},
{0x000A, nullptr, "Restore"},
{0x000B, &NFC_U::GetActivateEvent, "GetActivateEvent"},
{0x000C, &NFC_U::GetDeactivateEvent, "GetDeactivateEvent"},
{0x000D, &NFC_U::GetStatus, "GetStatus"},
{0x000E, nullptr, "Unknown0x0E"},
{0x000F, &NFC_U::GetTargetConnectionStatus, "GetTargetConnectionStatus"},
{0x0010, &NFC_U::GetTagInfo2, "GetTagInfo2"},
{0x0011, &NFC_U::GetTagInfo, "GetTagInfo"},
{0x0012, &NFC_U::GetConnectResult, "GetConnectResult"},
{0x0013, &NFC_U::OpenApplicationArea, "OpenApplicationArea"},
{0x0014, &NFC_U::CreateApplicationArea, "CreateApplicationArea"},
{0x0015, &NFC_U::ReadApplicationArea, "ReadApplicationArea"},
{0x0016, &NFC_U::WriteApplicationArea, "WriteApplicationArea"},
{0x0017, &NFC_U::GetNfpRegisterInfo, "GetNfpRegisterInfo"},
{0x0018, &NFC_U::GetNfpCommonInfo, "GetNfpCommonInfo"},
{0x0019, &NFC_U::InitializeCreateInfo, "InitializeCreateInfo"},
{0x001A, &NFC_U::MountRom, "MountRom"},
{0x001B, &NFC_U::GetIdentificationBlock, "GetIdentificationBlock"},
{0x001C, nullptr, "Unknown0x1C"},
{0x001D, nullptr, "Unknown0x1D"},
{0x001E, nullptr, "Unknown0x1E"},
{0x001F, nullptr, "Unknown0x1F"},
{0x0020, nullptr, "Unknown0x20"},
{0x0021, nullptr, "Unknown0x21"},
{0x0022, nullptr, "Unknown0x22"},
// clang-format on
};
RegisterHandlers(functions);

View File

@ -12,14 +12,14 @@ namespace Service::NIM {
NIM_AOC::NIM_AOC() : ServiceFramework("nim:aoc", 2) {
const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0003, 1, 2), nullptr, "SetApplicationId"},
{IPC::MakeHeader(0x0004, 1, 2), nullptr, "SetTin"},
{IPC::MakeHeader(0x0009, 11, 16), nullptr, "ListContentSetsEx"},
{IPC::MakeHeader(0x0018, 0, 0), nullptr, "GetBalance"},
{IPC::MakeHeader(0x001D, 0, 0), nullptr, "GetCustomerSupportCode"},
{IPC::MakeHeader(0x0021, 0, 0), nullptr, "Initialize"},
{IPC::MakeHeader(0x0024, 10, 2), nullptr, "CalculateContentsRequiredSize"},
{IPC::MakeHeader(0x0025, 0, 0), nullptr, "RefreshServerTime"},
{0x0003, nullptr, "SetApplicationId"},
{0x0004, nullptr, "SetTin"},
{0x0009, nullptr, "ListContentSetsEx"},
{0x0018, nullptr, "GetBalance"},
{0x001D, nullptr, "GetCustomerSupportCode"},
{0x0021, nullptr, "Initialize"},
{0x0024, nullptr, "CalculateContentsRequiredSize"},
{0x0025, nullptr, "RefreshServerTime"},
// clang-format on
};
RegisterHandlers(functions);

View File

@ -12,11 +12,11 @@ namespace Service::NIM {
NIM_S::NIM_S() : ServiceFramework("nim:s", 1) {
const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x000A, 0, 0), nullptr, "CheckSysupdateAvailableSOAP"},
{IPC::MakeHeader(0x0016, 8, 10), nullptr, "ListTitles"},
{IPC::MakeHeader(0x0029, 0, 0), nullptr, "AccountCheckBalanceSOAP"},
{IPC::MakeHeader(0x002D, 1, 2), nullptr, "DownloadTickets"},
{IPC::MakeHeader(0x0042, 9, 0), nullptr, "StartDownload"},
{0x000A, nullptr, "CheckSysupdateAvailableSOAP"},
{0x0016, nullptr, "ListTitles"},
{0x0029, nullptr, "AccountCheckBalanceSOAP"},
{0x002D, nullptr, "DownloadTickets"},
{0x0042, nullptr, "StartDownload"},
// clang-format on
};
RegisterHandlers(functions);

View File

@ -126,52 +126,52 @@ static_assert(sizeof(AutoDbgDat) == 0x108, "AutoDbgDat structure size is wrong")
NIM_U::NIM_U(Core::System& system) : ServiceFramework("nim:u", 2) {
const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0001, 0, 0), &NIM_U::StartNetworkUpdate, "StartNetworkUpdate"},
{IPC::MakeHeader(0x0002, 0, 0), &NIM_U::GetProgress, "GetProgress"},
{IPC::MakeHeader(0x0003, 0, 0), &NIM_U::Cancel, "Cancel"},
{IPC::MakeHeader(0x0004, 0, 0), &NIM_U::CommitSystemTitles, "CommitSystemTitles"},
{IPC::MakeHeader(0x0005, 0, 0), &NIM_U::GetBackgroundEventForMenu, "GetBackgroundEventForMenu"},
{IPC::MakeHeader(0x0006, 0, 0), &NIM_U::GetBackgroundEventForNews, "GetBackgroundEventForNews"},
{IPC::MakeHeader(0x0007, 0, 0), &NIM_U::FormatSaveData, "FormatSaveData"},
{IPC::MakeHeader(0x0008, 0, 0), &NIM_U::GetCustomerSupportCode, "GetCustomerSupportCode"},
{IPC::MakeHeader(0x0009, 0, 0), &NIM_U::IsCommittableAllSystemTitles, "IsCommittableAllSystemTitles"},
{IPC::MakeHeader(0x000A, 0, 0), &NIM_U::GetBackgroundProgress, "GetBackgroundProgress"},
{IPC::MakeHeader(0x000B, 0, 0), &NIM_U::GetSavedHash, "GetSavedHash"},
{IPC::MakeHeader(0x000C, 2, 2), &NIM_U::UnregisterTask, "UnregisterTask"},
{IPC::MakeHeader(0x000D, 2, 0), &NIM_U::IsRegistered, "IsRegistered"},
{IPC::MakeHeader(0x000E, 2, 0), &NIM_U::FindTaskInfo, "FindTaskInfo"},
{IPC::MakeHeader(0x000F, 1, 2), &NIM_U::GetTaskInfos, "GetTaskInfos"},
{IPC::MakeHeader(0x0010, 0, 0), &NIM_U::DeleteUnmanagedContexts, "DeleteUnmanagedContexts"},
{IPC::MakeHeader(0x0011, 0, 0), &NIM_U::UpdateAutoTitleDownloadTasksAsync, "UpdateAutoTitleDownloadTasksAsync"},
{IPC::MakeHeader(0x0012, 0, 0), &NIM_U::StartPendingAutoTitleDownloadTasksAsync, "StartPendingAutoTitleDownloadTasksAsync"},
{IPC::MakeHeader(0x0013, 0, 0), &NIM_U::GetAsyncResult, "GetAsyncResult"},
{IPC::MakeHeader(0x0014, 0, 0), &NIM_U::CancelAsyncCall, "CancelAsyncCall"},
{IPC::MakeHeader(0x0015, 0, 0), &NIM_U::IsPendingAutoTitleDownloadTasks, "IsPendingAutoTitleDownloadTasks"},
{IPC::MakeHeader(0x0016, 0, 0), &NIM_U::GetNumAutoTitleDownloadTasks, "GetNumAutoTitleDownloadTasks"},
{IPC::MakeHeader(0x0017, 1, 2), &NIM_U::GetAutoTitleDownloadTaskInfos, "GetAutoTitleDownloadTaskInfos"},
{IPC::MakeHeader(0x0018, 2, 0), &NIM_U::CancelAutoTitleDownloadTask, "CancelAutoTitleDownloadTask"},
{IPC::MakeHeader(0x0019, 0, 2), &NIM_U::SetAutoDbgDat, "SetAutoDbgDat"},
{IPC::MakeHeader(0x001A, 0, 2), &NIM_U::GetAutoDbgDat, "GetAutoDbgDat"},
{IPC::MakeHeader(0x001B, 1, 2), &NIM_U::SetDbgTasks, "SetDbgTasks"},
{IPC::MakeHeader(0x001C, 1, 2), &NIM_U::GetDbgTasks, "GetDbgTasks"},
{IPC::MakeHeader(0x001D, 0, 0), &NIM_U::DeleteDbgData, "DeleteDbgData"},
{IPC::MakeHeader(0x001E, 1, 2), &NIM_U::SetTslXml, "SetTslXml"},
{IPC::MakeHeader(0x001F, 0, 0), &NIM_U::GetTslXmlSize, "GetTslXmlSize"},
{IPC::MakeHeader(0x0020, 1, 2), &NIM_U::GetTslXml, "GetTslXml"},
{IPC::MakeHeader(0x0021, 0, 0), &NIM_U::DeleteTslXml, "DeleteTslXml"},
{IPC::MakeHeader(0x0022, 1, 2), &NIM_U::SetDtlXml, "SetDtlXml"},
{IPC::MakeHeader(0x0023, 0, 0), &NIM_U::GetDtlXmlSize, "GetDtlXmlSize"},
{IPC::MakeHeader(0x0024, 1, 2), &NIM_U::GetDtlXml, "GetDtlXml"},
{IPC::MakeHeader(0x0025, 0, 0), &NIM_U::UpdateAccountStatus, "UpdateAccountStatus"},
{IPC::MakeHeader(0x0026, 6, 0), &NIM_U::StartTitleDownload, "StartTitleDownload"},
{IPC::MakeHeader(0x0027, 0, 0), &NIM_U::StopTitleDownload, "StopTitleDownload"},
{IPC::MakeHeader(0x0028, 0, 0), &NIM_U::GetTitleDownloadProgress, "GetTitleDownloadProgress"},
{IPC::MakeHeader(0x0029, 9, 6), &NIM_U::RegisterTask, "RegisterTask"},
{IPC::MakeHeader(0x002A, 0, 0), &NIM_U::IsSystemUpdateAvailable, "IsSystemUpdateAvailable"},
{IPC::MakeHeader(0x002B, 0, 0), &NIM_U::Unknown2B, "Unknown2B"},
{IPC::MakeHeader(0x002C, 0, 0), &NIM_U::UpdateTickets, "UpdateTickets"},
{IPC::MakeHeader(0x002D, 3, 0), &NIM_U::DownloadTitleSeedAsync, "DownloadTitleSeedAsync"},
{IPC::MakeHeader(0x002E, 0, 0), &NIM_U::DownloadMissingTitleSeedsAsync, "DownloadMissingTitleSeedsAsync"},
{0x0001, &NIM_U::StartNetworkUpdate, "StartNetworkUpdate"},
{0x0002, &NIM_U::GetProgress, "GetProgress"},
{0x0003, &NIM_U::Cancel, "Cancel"},
{0x0004, &NIM_U::CommitSystemTitles, "CommitSystemTitles"},
{0x0005, &NIM_U::GetBackgroundEventForMenu, "GetBackgroundEventForMenu"},
{0x0006, &NIM_U::GetBackgroundEventForNews, "GetBackgroundEventForNews"},
{0x0007, &NIM_U::FormatSaveData, "FormatSaveData"},
{0x0008, &NIM_U::GetCustomerSupportCode, "GetCustomerSupportCode"},
{0x0009, &NIM_U::IsCommittableAllSystemTitles, "IsCommittableAllSystemTitles"},
{0x000A, &NIM_U::GetBackgroundProgress, "GetBackgroundProgress"},
{0x000B, &NIM_U::GetSavedHash, "GetSavedHash"},
{0x000C, &NIM_U::UnregisterTask, "UnregisterTask"},
{0x000D, &NIM_U::IsRegistered, "IsRegistered"},
{0x000E, &NIM_U::FindTaskInfo, "FindTaskInfo"},
{0x000F, &NIM_U::GetTaskInfos, "GetTaskInfos"},
{0x0010, &NIM_U::DeleteUnmanagedContexts, "DeleteUnmanagedContexts"},
{0x0011, &NIM_U::UpdateAutoTitleDownloadTasksAsync, "UpdateAutoTitleDownloadTasksAsync"},
{0x0012, &NIM_U::StartPendingAutoTitleDownloadTasksAsync, "StartPendingAutoTitleDownloadTasksAsync"},
{0x0013, &NIM_U::GetAsyncResult, "GetAsyncResult"},
{0x0014, &NIM_U::CancelAsyncCall, "CancelAsyncCall"},
{0x0015, &NIM_U::IsPendingAutoTitleDownloadTasks, "IsPendingAutoTitleDownloadTasks"},
{0x0016, &NIM_U::GetNumAutoTitleDownloadTasks, "GetNumAutoTitleDownloadTasks"},
{0x0017, &NIM_U::GetAutoTitleDownloadTaskInfos, "GetAutoTitleDownloadTaskInfos"},
{0x0018, &NIM_U::CancelAutoTitleDownloadTask, "CancelAutoTitleDownloadTask"},
{0x0019, &NIM_U::SetAutoDbgDat, "SetAutoDbgDat"},
{0x001A, &NIM_U::GetAutoDbgDat, "GetAutoDbgDat"},
{0x001B, &NIM_U::SetDbgTasks, "SetDbgTasks"},
{0x001C, &NIM_U::GetDbgTasks, "GetDbgTasks"},
{0x001D, &NIM_U::DeleteDbgData, "DeleteDbgData"},
{0x001E, &NIM_U::SetTslXml, "SetTslXml"},
{0x001F, &NIM_U::GetTslXmlSize, "GetTslXmlSize"},
{0x0020, &NIM_U::GetTslXml, "GetTslXml"},
{0x0021, &NIM_U::DeleteTslXml, "DeleteTslXml"},
{0x0022, &NIM_U::SetDtlXml, "SetDtlXml"},
{0x0023, &NIM_U::GetDtlXmlSize, "GetDtlXmlSize"},
{0x0024, &NIM_U::GetDtlXml, "GetDtlXml"},
{0x0025, &NIM_U::UpdateAccountStatus, "UpdateAccountStatus"},
{0x0026, &NIM_U::StartTitleDownload, "StartTitleDownload"},
{0x0027, &NIM_U::StopTitleDownload, "StopTitleDownload"},
{0x0028, &NIM_U::GetTitleDownloadProgress, "GetTitleDownloadProgress"},
{0x0029, &NIM_U::RegisterTask, "RegisterTask"},
{0x002A, &NIM_U::IsSystemUpdateAvailable, "IsSystemUpdateAvailable"},
{0x002B, &NIM_U::Unknown2B, "Unknown2B"},
{0x002C, &NIM_U::UpdateTickets, "UpdateTickets"},
{0x002D, &NIM_U::DownloadTitleSeedAsync, "DownloadTitleSeedAsync"},
{0x002E, &NIM_U::DownloadMissingTitleSeedsAsync, "DownloadMissingTitleSeedsAsync"},
// clang-format on
};
RegisterHandlers(functions);
@ -186,7 +186,7 @@ NIM_U::NIM_U(Core::System& system) : ServiceFramework("nim:u", 2) {
NIM_U::~NIM_U() = default;
void NIM_U::StartNetworkUpdate(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1, 0, 0); // 0x10000
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
@ -195,7 +195,7 @@ void NIM_U::StartNetworkUpdate(Kernel::HLERequestContext& ctx) {
}
void NIM_U::GetProgress(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x2, 0, 0); // 0x20000
IPC::RequestParser rp(ctx);
SystemUpdateProgress progress{};
std::memset(&progress, 0, sizeof(progress));
@ -210,7 +210,7 @@ void NIM_U::GetProgress(Kernel::HLERequestContext& ctx) {
}
void NIM_U::Cancel(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x3, 0, 0); // 0x30000
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
@ -219,7 +219,7 @@ void NIM_U::Cancel(Kernel::HLERequestContext& ctx) {
}
void NIM_U::CommitSystemTitles(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x4, 0, 0); // 0x40000
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
@ -228,7 +228,7 @@ void NIM_U::CommitSystemTitles(Kernel::HLERequestContext& ctx) {
}
void NIM_U::GetBackgroundEventForMenu(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x5, 0, 0); // 0x50000
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 2);
rb.Push(RESULT_SUCCESS);
@ -238,7 +238,7 @@ void NIM_U::GetBackgroundEventForMenu(Kernel::HLERequestContext& ctx) {
}
void NIM_U::GetBackgroundEventForNews(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x6, 0, 0); // 0x60000
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 2);
rb.Push(RESULT_SUCCESS);
@ -248,7 +248,7 @@ void NIM_U::GetBackgroundEventForNews(Kernel::HLERequestContext& ctx) {
}
void NIM_U::FormatSaveData(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x7, 0, 0); // 0x70000
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
@ -257,7 +257,7 @@ void NIM_U::FormatSaveData(Kernel::HLERequestContext& ctx) {
}
void NIM_U::GetCustomerSupportCode(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x8, 0, 0); // 0x80000
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
@ -267,7 +267,7 @@ void NIM_U::GetCustomerSupportCode(Kernel::HLERequestContext& ctx) {
}
void NIM_U::IsCommittableAllSystemTitles(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x9, 0, 0); // 0x90000
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
@ -277,7 +277,7 @@ void NIM_U::IsCommittableAllSystemTitles(Kernel::HLERequestContext& ctx) {
}
void NIM_U::GetBackgroundProgress(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0xA, 0, 0); // 0xA0000
IPC::RequestParser rp(ctx);
SystemUpdateProgress progress{};
std::memset(&progress, 0, sizeof(progress));
@ -292,7 +292,7 @@ void NIM_U::GetBackgroundProgress(Kernel::HLERequestContext& ctx) {
}
void NIM_U::GetSavedHash(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0xB, 0, 0); // 0xB0000
IPC::RequestParser rp(ctx);
std::array<char, 0x24> hash{};
std::memset(&hash, 0, sizeof(hash));
@ -305,7 +305,7 @@ void NIM_U::GetSavedHash(Kernel::HLERequestContext& ctx) {
}
void NIM_U::UnregisterTask(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0xC, 2, 2); // 0xC0082
IPC::RequestParser rp(ctx);
const u64 title_id = rp.Pop<u64>();
const u32 process_id = rp.PopPID();
@ -319,7 +319,7 @@ void NIM_U::UnregisterTask(Kernel::HLERequestContext& ctx) {
}
void NIM_U::IsRegistered(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0xD, 2, 0); // 0xD0080
IPC::RequestParser rp(ctx);
const u64 title_id = rp.Pop<u64>();
@ -331,7 +331,7 @@ void NIM_U::IsRegistered(Kernel::HLERequestContext& ctx) {
}
void NIM_U::FindTaskInfo(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0xE, 2, 0); // 0xE0080
IPC::RequestParser rp(ctx);
const u64 title_id = rp.Pop<u64>();
@ -346,7 +346,7 @@ void NIM_U::FindTaskInfo(Kernel::HLERequestContext& ctx) {
}
void NIM_U::GetTaskInfos(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0xF, 1, 2); // 0xF0042
IPC::RequestParser rp(ctx);
const u64 max_task_infos = rp.Pop<u32>();
auto& task_infos_buffer = rp.PopMappedBuffer();
@ -361,7 +361,7 @@ void NIM_U::GetTaskInfos(Kernel::HLERequestContext& ctx) {
}
void NIM_U::DeleteUnmanagedContexts(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x10, 0, 0); // 0x100000
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
@ -370,7 +370,7 @@ void NIM_U::DeleteUnmanagedContexts(Kernel::HLERequestContext& ctx) {
}
void NIM_U::UpdateAutoTitleDownloadTasksAsync(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x11, 0, 0); // 0x110000
IPC::RequestParser rp(ctx);
// Since this is a stub, signal the completion event so the caller won't get stuck waiting.
nim_async_completion_event->Signal();
@ -383,7 +383,7 @@ void NIM_U::UpdateAutoTitleDownloadTasksAsync(Kernel::HLERequestContext& ctx) {
}
void NIM_U::StartPendingAutoTitleDownloadTasksAsync(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x11, 0, 0); // 0x120000
IPC::RequestParser rp(ctx);
// Since this is a stub, signal the completion event so the caller won't get stuck waiting.
nim_async_completion_event->Signal();
@ -396,7 +396,7 @@ void NIM_U::StartPendingAutoTitleDownloadTasksAsync(Kernel::HLERequestContext& c
}
void NIM_U::GetAsyncResult(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x13, 0, 0); // 0x130000
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(3, 0);
rb.Push(RESULT_SUCCESS);
@ -407,7 +407,7 @@ void NIM_U::GetAsyncResult(Kernel::HLERequestContext& ctx) {
}
void NIM_U::CancelAsyncCall(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x14, 0, 0); // 0x140000
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
@ -416,7 +416,7 @@ void NIM_U::CancelAsyncCall(Kernel::HLERequestContext& ctx) {
}
void NIM_U::IsPendingAutoTitleDownloadTasks(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x15, 0, 0); // 0x150000
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
@ -426,7 +426,7 @@ void NIM_U::IsPendingAutoTitleDownloadTasks(Kernel::HLERequestContext& ctx) {
}
void NIM_U::GetNumAutoTitleDownloadTasks(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x16, 0, 0); // 0x160000
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
@ -436,7 +436,7 @@ void NIM_U::GetNumAutoTitleDownloadTasks(Kernel::HLERequestContext& ctx) {
}
void NIM_U::GetAutoTitleDownloadTaskInfos(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x17, 1, 2); // 0x170042
IPC::RequestParser rp(ctx);
const u64 max_task_infos = rp.Pop<u32>();
auto& task_infos_buffer = rp.PopMappedBuffer();
@ -451,7 +451,7 @@ void NIM_U::GetAutoTitleDownloadTaskInfos(Kernel::HLERequestContext& ctx) {
}
void NIM_U::CancelAutoTitleDownloadTask(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x18, 2, 0); // 0x180080
IPC::RequestParser rp(ctx);
const u64 task_id = rp.Pop<u64>();
@ -462,7 +462,7 @@ void NIM_U::CancelAutoTitleDownloadTask(Kernel::HLERequestContext& ctx) {
}
void NIM_U::SetAutoDbgDat(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x19, 0, 2); // 0x190002
IPC::RequestParser rp(ctx);
auto& auto_dbg_dat_buffer = rp.PopMappedBuffer();
@ -475,7 +475,7 @@ void NIM_U::SetAutoDbgDat(Kernel::HLERequestContext& ctx) {
}
void NIM_U::GetAutoDbgDat(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1A, 0, 2); // 0x1A0002
IPC::RequestParser rp(ctx);
auto& auto_dbg_dat_buffer = rp.PopMappedBuffer();
@ -488,7 +488,7 @@ void NIM_U::GetAutoDbgDat(Kernel::HLERequestContext& ctx) {
}
void NIM_U::SetDbgTasks(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1B, 1, 2); // 0x1B0042
IPC::RequestParser rp(ctx);
const u64 max_task_infos = rp.Pop<u32>();
auto& task_infos_buffer = rp.PopMappedBuffer();
@ -502,7 +502,7 @@ void NIM_U::SetDbgTasks(Kernel::HLERequestContext& ctx) {
}
void NIM_U::GetDbgTasks(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1C, 1, 2); // 0x1C0042
IPC::RequestParser rp(ctx);
const u64 max_task_infos = rp.Pop<u32>();
auto& task_infos_buffer = rp.PopMappedBuffer();
@ -517,7 +517,7 @@ void NIM_U::GetDbgTasks(Kernel::HLERequestContext& ctx) {
}
void NIM_U::DeleteDbgData(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1D, 0, 0); // 0x1D0000
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
@ -526,7 +526,7 @@ void NIM_U::DeleteDbgData(Kernel::HLERequestContext& ctx) {
}
void NIM_U::SetTslXml(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1E, 1, 2); // 0x1E0042
IPC::RequestParser rp(ctx);
const u32 buffer_size = rp.Pop<u32>();
auto& xml_buffer = rp.PopMappedBuffer();
@ -540,7 +540,7 @@ void NIM_U::SetTslXml(Kernel::HLERequestContext& ctx) {
}
void NIM_U::GetTslXmlSize(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1F, 0, 0); // 0x1F0000
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(3, 0);
rb.Push(RESULT_SUCCESS);
@ -550,7 +550,7 @@ void NIM_U::GetTslXmlSize(Kernel::HLERequestContext& ctx) {
}
void NIM_U::GetTslXml(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x20, 1, 2); // 0x200042
IPC::RequestParser rp(ctx);
const u32 buffer_capacity = rp.Pop<u32>();
auto& xml_buffer = rp.PopMappedBuffer();
@ -564,7 +564,7 @@ void NIM_U::GetTslXml(Kernel::HLERequestContext& ctx) {
}
void NIM_U::DeleteTslXml(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x21, 0, 0); // 0x210000
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
@ -573,7 +573,7 @@ void NIM_U::DeleteTslXml(Kernel::HLERequestContext& ctx) {
}
void NIM_U::SetDtlXml(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x22, 1, 2); // 0x220042
IPC::RequestParser rp(ctx);
const u32 buffer_size = rp.Pop<u32>();
auto& xml_buffer = rp.PopMappedBuffer();
@ -587,7 +587,7 @@ void NIM_U::SetDtlXml(Kernel::HLERequestContext& ctx) {
}
void NIM_U::GetDtlXmlSize(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x23, 0, 0); // 0x230000
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(3, 0);
rb.Push(RESULT_SUCCESS);
@ -597,7 +597,7 @@ void NIM_U::GetDtlXmlSize(Kernel::HLERequestContext& ctx) {
}
void NIM_U::GetDtlXml(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x24, 1, 2); // 0x240042
IPC::RequestParser rp(ctx);
const u32 buffer_capacity = rp.Pop<u32>();
auto& xml_buffer = rp.PopMappedBuffer();
@ -611,7 +611,7 @@ void NIM_U::GetDtlXml(Kernel::HLERequestContext& ctx) {
}
void NIM_U::UpdateAccountStatus(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x25, 0, 0); // 0x250000
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(3, 0);
rb.Push(RESULT_SUCCESS);
@ -622,7 +622,7 @@ void NIM_U::UpdateAccountStatus(Kernel::HLERequestContext& ctx) {
}
void NIM_U::StartTitleDownload(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x26, 6, 0); // 0x260180
IPC::RequestParser rp(ctx);
const auto& download_config = rp.PopRaw<TitleDownloadConfig>();
@ -633,7 +633,7 @@ void NIM_U::StartTitleDownload(Kernel::HLERequestContext& ctx) {
}
void NIM_U::StopTitleDownload(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x27, 0, 0); // 0x270000
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
@ -642,7 +642,7 @@ void NIM_U::StopTitleDownload(Kernel::HLERequestContext& ctx) {
}
void NIM_U::GetTitleDownloadProgress(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x28, 0, 0); // 0x280000
IPC::RequestParser rp(ctx);
TitleDownloadProgress progress{};
std::memset(&progress, 0, sizeof(progress));
@ -657,7 +657,7 @@ void NIM_U::GetTitleDownloadProgress(Kernel::HLERequestContext& ctx) {
}
void NIM_U::RegisterTask(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x29, 9, 6); // 0x290246
IPC::RequestParser rp(ctx);
const auto& download_config = rp.PopRaw<TitleDownloadConfig>();
const u32 unknown_1 = rp.Pop<u32>();
@ -686,7 +686,7 @@ void NIM_U::RegisterTask(Kernel::HLERequestContext& ctx) {
}
void NIM_U::IsSystemUpdateAvailable(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x2A, 0, 0); // 0x2A0000
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(4, 0);
rb.Push(RESULT_SUCCESS);
@ -698,7 +698,7 @@ void NIM_U::IsSystemUpdateAvailable(Kernel::HLERequestContext& ctx) {
}
void NIM_U::Unknown2B(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x2B, 0, 0); // 0x2B0000
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
@ -707,7 +707,7 @@ void NIM_U::Unknown2B(Kernel::HLERequestContext& ctx) {
}
void NIM_U::UpdateTickets(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x2C, 0, 0); // 0x2C0000
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(3, 0);
rb.Push(RESULT_SUCCESS);
@ -718,7 +718,7 @@ void NIM_U::UpdateTickets(Kernel::HLERequestContext& ctx) {
}
void NIM_U::DownloadTitleSeedAsync(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x2D, 3, 0); // 0x2D00C0
IPC::RequestParser rp(ctx);
const u64 title_id = rp.Pop<u64>();
const u16 country_code = rp.Pop<u16>();
@ -735,7 +735,7 @@ void NIM_U::DownloadTitleSeedAsync(Kernel::HLERequestContext& ctx) {
}
void NIM_U::DownloadMissingTitleSeedsAsync(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x2E, 0, 0); // 0x2E0000
IPC::RequestParser rp(ctx);
// Since this is a stub, signal the completion event so the caller won't get stuck waiting.
nim_async_completion_event->Signal();

View File

@ -12,7 +12,7 @@ namespace Service::NWM {
NWM_CEC::NWM_CEC() : ServiceFramework("nwm::CEC") {
static const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x000D, 2, 2), nullptr, "SendProbeRequest"},
{0x000D, nullptr, "SendProbeRequest"},
// clang-format on
};
RegisterHandlers(functions);

View File

@ -12,7 +12,7 @@ namespace Service::NWM {
NWM_EXT::NWM_EXT() : ServiceFramework("nwm::EXT") {
static const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0008, 1, 0), nullptr, "ControlWirelessEnabled"},
{0x0008, nullptr, "ControlWirelessEnabled"},
// clang-format on
};
RegisterHandlers(functions);

View File

@ -12,9 +12,9 @@ namespace Service::NWM {
NWM_INF::NWM_INF() : ServiceFramework("nwm::INF") {
static const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0006, 15, 4), nullptr, "RecvBeaconBroadcastData"},
{IPC::MakeHeader(0x0007, 29, 2), nullptr, "ConnectToEncryptedAP"},
{IPC::MakeHeader(0x0008, 12, 2), nullptr, "ConnectToAP"},
{0x0006, nullptr, "RecvBeaconBroadcastData"},
{0x0007, nullptr, "ConnectToEncryptedAP"},
{0x0008, nullptr, "ConnectToAP"},
// clang-format on
};
RegisterHandlers(functions);

View File

@ -569,7 +569,7 @@ boost::optional<Network::MacAddress> NWM_UDS::GetNodeMacAddress(u16 dest_node_id
}
void NWM_UDS::Shutdown(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x03, 0, 0);
IPC::RequestParser rp(ctx);
initialized = false;
@ -587,7 +587,7 @@ void NWM_UDS::Shutdown(Kernel::HLERequestContext& ctx) {
}
void NWM_UDS::RecvBeaconBroadcastData(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0F, 16, 4);
IPC::RequestParser rp(ctx);
u32 out_buffer_size = rp.Pop<u32>();
u32 unk1 = rp.Pop<u32>();
@ -677,7 +677,7 @@ ResultVal<std::shared_ptr<Kernel::Event>> NWM_UDS::Initialize(
}
void NWM_UDS::InitializeWithVersion(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1B, 12, 2);
IPC::RequestParser rp(ctx);
u32 sharedmem_size = rp.Pop<u32>();
auto node = rp.PopRaw<NodeInfo>();
u16 version = rp.Pop<u16>();
@ -694,7 +694,7 @@ void NWM_UDS::InitializeWithVersion(Kernel::HLERequestContext& ctx) {
}
void NWM_UDS::InitializeDeprecated(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x01, 11, 2);
IPC::RequestParser rp(ctx);
u32 sharedmem_size = rp.Pop<u32>();
auto node = rp.PopRaw<NodeInfo>();
auto sharedmem = rp.PopObject<Kernel::SharedMemory>();
@ -710,7 +710,7 @@ void NWM_UDS::InitializeDeprecated(Kernel::HLERequestContext& ctx) {
}
void NWM_UDS::GetConnectionStatus(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0xB, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(13, 0);
rb.Push(RESULT_SUCCESS);
@ -729,7 +729,7 @@ void NWM_UDS::GetConnectionStatus(Kernel::HLERequestContext& ctx) {
}
void NWM_UDS::GetNodeInformation(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0xD, 1, 0);
IPC::RequestParser rp(ctx);
u16 network_node_id = rp.Pop<u16>();
if (!initialized) {
@ -760,7 +760,7 @@ void NWM_UDS::GetNodeInformation(Kernel::HLERequestContext& ctx) {
}
void NWM_UDS::Bind(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x12, 4, 0);
IPC::RequestParser rp(ctx);
u32 bind_node_id = rp.Pop<u32>();
u32 recv_buffer_size = rp.Pop<u32>();
@ -811,7 +811,7 @@ void NWM_UDS::Bind(Kernel::HLERequestContext& ctx) {
}
void NWM_UDS::Unbind(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x12, 1, 0);
IPC::RequestParser rp(ctx);
u32 bind_node_id = rp.Pop<u32>();
if (bind_node_id == 0) {
@ -911,7 +911,7 @@ ResultCode NWM_UDS::BeginHostingNetwork(std::span<const u8> network_info_buffer,
}
void NWM_UDS::BeginHostingNetwork(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1D, 1, 4);
IPC::RequestParser rp(ctx);
const u32 passphrase_size = rp.Pop<u32>();
@ -929,7 +929,7 @@ void NWM_UDS::BeginHostingNetwork(Kernel::HLERequestContext& ctx) {
}
void NWM_UDS::BeginHostingNetworkDeprecated(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x04, 0x10, 2);
IPC::RequestParser rp(ctx);
// Real NWM module reads 0x108 bytes from the command buffer into the network info, where the
// last 0xCC bytes (application_data and size) are undefined values. Here we just read the first
// 0x3C defined bytes and zero application_data in BeginHostingNetwork.
@ -947,7 +947,7 @@ void NWM_UDS::BeginHostingNetworkDeprecated(Kernel::HLERequestContext& ctx) {
}
void NWM_UDS::EjectClient(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x05, 1, 0);
IPC::RequestParser rp(ctx);
const u16 network_node_id = rp.Pop<u16>();
LOG_WARNING(Service_NWM, "(stubbed) called");
@ -998,7 +998,7 @@ void NWM_UDS::EjectClient(Kernel::HLERequestContext& ctx) {
}
void NWM_UDS::UpdateNetworkAttribute(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x07, 2, 0);
IPC::RequestParser rp(ctx);
rp.Skip(2, false);
LOG_WARNING(Service_NWM, "stubbed");
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
@ -1006,7 +1006,7 @@ void NWM_UDS::UpdateNetworkAttribute(Kernel::HLERequestContext& ctx) {
}
void NWM_UDS::DestroyNetwork(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x08, 0, 0);
IPC::RequestParser rp(ctx);
// Unschedule the beacon broadcast event.
system.CoreTiming().UnscheduleEvent(beacon_broadcast_event, 0);
@ -1044,7 +1044,7 @@ void NWM_UDS::DestroyNetwork(Kernel::HLERequestContext& ctx) {
}
void NWM_UDS::DisconnectNetwork(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0xA, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
using Network::WifiPacket;
@ -1089,7 +1089,7 @@ void NWM_UDS::DisconnectNetwork(Kernel::HLERequestContext& ctx) {
}
void NWM_UDS::SendTo(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x17, 6, 2);
IPC::RequestParser rp(ctx);
rp.Skip(1, false);
u16 dest_node_id = rp.Pop<u16>();
@ -1167,7 +1167,7 @@ void NWM_UDS::SendTo(Kernel::HLERequestContext& ctx) {
}
void NWM_UDS::PullPacket(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x14, 3, 0);
IPC::RequestParser rp(ctx);
u32 bind_node_id = rp.Pop<u32>();
u32 max_out_buff_size_aligned = rp.Pop<u32>();
@ -1236,7 +1236,7 @@ void NWM_UDS::PullPacket(Kernel::HLERequestContext& ctx) {
}
void NWM_UDS::GetChannel(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1A, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
std::lock_guard lock(connection_status_mutex);
@ -1292,7 +1292,7 @@ void NWM_UDS::ConnectToNetwork(Kernel::HLERequestContext& ctx, u16 command_id,
}
void NWM_UDS::ConnectToNetwork(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1E, 2, 4);
IPC::RequestParser rp(ctx);
const auto connection_type = rp.Pop<u8>();
[[maybe_unused]] const auto passphrase_size = rp.Pop<u32>();
@ -1308,7 +1308,7 @@ void NWM_UDS::ConnectToNetwork(Kernel::HLERequestContext& ctx) {
}
void NWM_UDS::ConnectToNetworkDeprecated(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x09, 0x11, 2);
IPC::RequestParser rp(ctx);
// Similar to BeginHostingNetworkDeprecated, we only read the first 0x3C bytes into the network
// info
@ -1325,7 +1325,7 @@ void NWM_UDS::ConnectToNetworkDeprecated(Kernel::HLERequestContext& ctx) {
}
void NWM_UDS::SetApplicationData(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x10, 1, 2);
IPC::RequestParser rp(ctx);
u32 size = rp.Pop<u32>();
@ -1349,7 +1349,7 @@ void NWM_UDS::SetApplicationData(Kernel::HLERequestContext& ctx) {
}
void NWM_UDS::GetApplicationData(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x11, 1, 0);
IPC::RequestParser rp(ctx);
u32 input_size = rp.Pop<u32>();
u8 appdata_size = network_info.application_data_size;
@ -1367,8 +1367,8 @@ void NWM_UDS::GetApplicationData(Kernel::HLERequestContext& ctx) {
rb.PushStaticBuffer(std::move(appdata), 0);
}
void NWM_UDS::DecryptBeaconData(Kernel::HLERequestContext& ctx, u16 command_id) {
IPC::RequestParser rp(ctx, command_id, 0, 6);
void NWM_UDS::DecryptBeaconData(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx);
const std::vector<u8> network_struct_buffer = rp.PopStaticBuffer();
ASSERT(network_struct_buffer.size() == sizeof(NetworkInfo));
@ -1433,11 +1433,6 @@ void NWM_UDS::DecryptBeaconData(Kernel::HLERequestContext& ctx, u16 command_id)
rb.PushStaticBuffer(std::move(output_buffer), 0);
}
template <u16 command_id>
void NWM_UDS::DecryptBeaconData(Kernel::HLERequestContext& ctx) {
DecryptBeaconData(ctx, command_id);
}
// Sends a 802.11 beacon frame with information about the current network.
void NWM_UDS::BeaconBroadcastCallback(std::uintptr_t user_data, s64 cycles_late) {
// Don't do anything if we're not actually hosting a network
@ -1464,35 +1459,35 @@ void NWM_UDS::BeaconBroadcastCallback(std::uintptr_t user_data, s64 cycles_late)
NWM_UDS::NWM_UDS(Core::System& system) : ServiceFramework("nwm::UDS"), system(system) {
static const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0001, 11, 2), &NWM_UDS::InitializeDeprecated, "Initialize (deprecated)"},
{IPC::MakeHeader(0x0002, 0, 0), nullptr, "Scrap"},
{IPC::MakeHeader(0x0003, 0, 0), &NWM_UDS::Shutdown, "Shutdown"},
{IPC::MakeHeader(0x0004, 16, 2), &NWM_UDS::BeginHostingNetworkDeprecated, "BeginHostingNetwork (deprecated)"},
{IPC::MakeHeader(0x0005, 1, 0), &NWM_UDS::EjectClient, "EjectClient"},
{IPC::MakeHeader(0x0006, 0, 0), nullptr, "EjectSpectator"},
{IPC::MakeHeader(0x0007, 2, 0), &NWM_UDS::UpdateNetworkAttribute, "UpdateNetworkAttribute"},
{IPC::MakeHeader(0x0008, 0, 0), &NWM_UDS::DestroyNetwork, "DestroyNetwork"},
{IPC::MakeHeader(0x0009, 17, 2), &NWM_UDS::ConnectToNetworkDeprecated, "ConnectToNetwork (deprecated)"},
{IPC::MakeHeader(0x000A, 0, 0), &NWM_UDS::DisconnectNetwork, "DisconnectNetwork"},
{IPC::MakeHeader(0x000B, 0, 0), &NWM_UDS::GetConnectionStatus, "GetConnectionStatus"},
{IPC::MakeHeader(0x000D, 1, 0), &NWM_UDS::GetNodeInformation, "GetNodeInformation"},
{IPC::MakeHeader(0x000E, 0, 6), &NWM_UDS::DecryptBeaconData<0x0E>, "DecryptBeaconData (deprecated)"},
{IPC::MakeHeader(0x000F, 16, 4), &NWM_UDS::RecvBeaconBroadcastData, "RecvBeaconBroadcastData"},
{IPC::MakeHeader(0x0010, 1, 2), &NWM_UDS::SetApplicationData, "SetApplicationData"},
{IPC::MakeHeader(0x0011, 1, 0), &NWM_UDS::GetApplicationData, "GetApplicationData"},
{IPC::MakeHeader(0x0012, 4, 0), &NWM_UDS::Bind, "Bind"},
{IPC::MakeHeader(0x0013, 1, 0), &NWM_UDS::Unbind, "Unbind"},
{IPC::MakeHeader(0x0014, 3, 0), &NWM_UDS::PullPacket, "PullPacket"},
{IPC::MakeHeader(0x0015, 2, 0), nullptr, "SetMaxSendDelay"},
{IPC::MakeHeader(0x0017, 6, 2), &NWM_UDS::SendTo, "SendTo"},
{IPC::MakeHeader(0x001A, 0, 0), &NWM_UDS::GetChannel, "GetChannel"},
{IPC::MakeHeader(0x001B, 12, 2), &NWM_UDS::InitializeWithVersion, "InitializeWithVersion"},
{IPC::MakeHeader(0x001D, 1, 4), &NWM_UDS::BeginHostingNetwork, "BeginHostingNetwork"},
{IPC::MakeHeader(0x001E, 2, 4), &NWM_UDS::ConnectToNetwork, "ConnectToNetwork"},
{IPC::MakeHeader(0x001F, 0, 6), &NWM_UDS::DecryptBeaconData<0x1F>, "DecryptBeaconData"},
{IPC::MakeHeader(0x0020, 1, 0), nullptr, "Flush"},
{IPC::MakeHeader(0x0021, 2, 0), nullptr, "SetProbeResponseParam"},
{IPC::MakeHeader(0x0022, 16, 2), nullptr, "ScanOnConnection"},
{0x0001, &NWM_UDS::InitializeDeprecated, "Initialize (deprecated)"},
{0x0002, nullptr, "Scrap"},
{0x0003, &NWM_UDS::Shutdown, "Shutdown"},
{0x0004, &NWM_UDS::BeginHostingNetworkDeprecated, "BeginHostingNetwork (deprecated)"},
{0x0005, &NWM_UDS::EjectClient, "EjectClient"},
{0x0006, nullptr, "EjectSpectator"},
{0x0007, &NWM_UDS::UpdateNetworkAttribute, "UpdateNetworkAttribute"},
{0x0008, &NWM_UDS::DestroyNetwork, "DestroyNetwork"},
{0x0009, &NWM_UDS::ConnectToNetworkDeprecated, "ConnectToNetwork (deprecated)"},
{0x000A, &NWM_UDS::DisconnectNetwork, "DisconnectNetwork"},
{0x000B, &NWM_UDS::GetConnectionStatus, "GetConnectionStatus"},
{0x000D, &NWM_UDS::GetNodeInformation, "GetNodeInformation"},
{0x000E, &NWM_UDS::DecryptBeaconData, "DecryptBeaconData (deprecated)"},
{0x000F, &NWM_UDS::RecvBeaconBroadcastData, "RecvBeaconBroadcastData"},
{0x0010, &NWM_UDS::SetApplicationData, "SetApplicationData"},
{0x0011, &NWM_UDS::GetApplicationData, "GetApplicationData"},
{0x0012, &NWM_UDS::Bind, "Bind"},
{0x0013, &NWM_UDS::Unbind, "Unbind"},
{0x0014, &NWM_UDS::PullPacket, "PullPacket"},
{0x0015, nullptr, "SetMaxSendDelay"},
{0x0017, &NWM_UDS::SendTo, "SendTo"},
{0x001A, &NWM_UDS::GetChannel, "GetChannel"},
{0x001B, &NWM_UDS::InitializeWithVersion, "InitializeWithVersion"},
{0x001D, &NWM_UDS::BeginHostingNetwork, "BeginHostingNetwork"},
{0x001E, &NWM_UDS::ConnectToNetwork, "ConnectToNetwork"},
{0x001F, &NWM_UDS::DecryptBeaconData, "DecryptBeaconData"},
{0x0020, nullptr, "Flush"},
{0x0021, nullptr, "SetProbeResponseParam"},
{0x0022, nullptr, "ScanOnConnection"},
// clang-format on
};
connection_status_event =

View File

@ -443,9 +443,6 @@ private:
* 1 : Result of function, 0 on success, otherwise error code
* 2, 3: output buffer return descriptor & ptr
*/
void DecryptBeaconData(Kernel::HLERequestContext& ctx, u16 command_id);
template <u16 command_id>
void DecryptBeaconData(Kernel::HLERequestContext& ctx);
ResultVal<std::shared_ptr<Kernel::Event>> Initialize(

View File

@ -47,19 +47,19 @@ PAddr PLG_LDR::plugin_fb_addr = 0;
PLG_LDR::PLG_LDR() : ServiceFramework{"plg:ldr", 1} {
static const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0001, 0, 2), nullptr, "LoadPlugin"},
{IPC::MakeHeader(0x0002, 0, 0), &PLG_LDR::IsEnabled, "IsEnabled"},
{IPC::MakeHeader(0x0003, 1, 0), &PLG_LDR::SetEnabled, "SetEnabled"},
{IPC::MakeHeader(0x0004, 2, 4), &PLG_LDR::SetLoadSettings, "SetLoadSettings"},
{IPC::MakeHeader(0x0005, 1, 8), nullptr, "DisplayMenu"},
{IPC::MakeHeader(0x0006, 0, 4), nullptr, "DisplayMessage"},
{IPC::MakeHeader(0x0007, 1, 4), &PLG_LDR::DisplayErrorMessage, "DisplayErrorMessage"},
{IPC::MakeHeader(0x0008, 0, 0), &PLG_LDR::GetPLGLDRVersion, "GetPLGLDRVersion"},
{IPC::MakeHeader(0x0009, 0, 0), &PLG_LDR::GetArbiter, "GetArbiter"},
{IPC::MakeHeader(0x000A, 0, 2), &PLG_LDR::GetPluginPath, "GetPluginPath"},
{IPC::MakeHeader(0x000B, 1, 0), nullptr, "SetRosalinaMenuBlock"},
{IPC::MakeHeader(0x000C, 2, 4), nullptr, "SetSwapParam"},
{IPC::MakeHeader(0x000D, 1, 2), nullptr, "SetLoadExeParam"},
{0x0001, nullptr, "LoadPlugin"},
{0x0002, &PLG_LDR::IsEnabled, "IsEnabled"},
{0x0003, &PLG_LDR::SetEnabled, "SetEnabled"},
{0x0004, &PLG_LDR::SetLoadSettings, "SetLoadSettings"},
{0x0005, nullptr, "DisplayMenu"},
{0x0006, nullptr, "DisplayMessage"},
{0x0007, &PLG_LDR::DisplayErrorMessage, "DisplayErrorMessage"},
{0x0008, &PLG_LDR::GetPLGLDRVersion, "GetPLGLDRVersion"},
{0x0009, &PLG_LDR::GetArbiter, "GetArbiter"},
{0x000A, &PLG_LDR::GetPluginPath, "GetPluginPath"},
{0x000B, nullptr, "SetRosalinaMenuBlock"},
{0x000C, nullptr, "SetSwapParam"},
{0x000D, nullptr, "SetLoadExeParam"},
// clang-format on
};
RegisterHandlers(functions);
@ -156,7 +156,7 @@ void PLG_LDR::OnMemoryChanged(Kernel::Process& process, Kernel::KernelSystem& ke
}
void PLG_LDR::IsEnabled(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 2, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
@ -164,7 +164,7 @@ void PLG_LDR::IsEnabled(Kernel::HLERequestContext& ctx) {
}
void PLG_LDR::SetEnabled(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 3, 1, 0);
IPC::RequestParser rp(ctx);
bool enabled = rp.Pop<u32>() == 1;
bool can_change = enabled == plgldr_context.is_enabled || allow_game_change;
@ -177,7 +177,7 @@ void PLG_LDR::SetEnabled(Kernel::HLERequestContext& ctx) {
}
void PLG_LDR::SetLoadSettings(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 4, 2, 4);
IPC::RequestParser rp(ctx);
plgldr_context.use_user_load_parameters = true;
plgldr_context.user_load_parameters.no_flash = rp.Pop<u32>() == 1;
@ -201,7 +201,7 @@ void PLG_LDR::SetLoadSettings(Kernel::HLERequestContext& ctx) {
}
void PLG_LDR::DisplayErrorMessage(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 7, 1, 4);
IPC::RequestParser rp(ctx);
u32 error_code = rp.Pop<u32>();
auto title = rp.PopMappedBuffer();
auto desc = rp.PopMappedBuffer();
@ -223,7 +223,7 @@ void PLG_LDR::DisplayErrorMessage(Kernel::HLERequestContext& ctx) {
}
void PLG_LDR::GetPLGLDRVersion(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 8, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
@ -231,7 +231,7 @@ void PLG_LDR::GetPLGLDRVersion(Kernel::HLERequestContext& ctx) {
}
void PLG_LDR::GetArbiter(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 9, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
// NOTE: It doesn't make sense to send an arbiter in HLE, as it's used to
@ -242,7 +242,7 @@ void PLG_LDR::GetArbiter(Kernel::HLERequestContext& ctx) {
}
void PLG_LDR::GetPluginPath(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 10, 0, 2);
IPC::RequestParser rp(ctx);
auto path = rp.PopMappedBuffer();
// Same behaviour as strncpy

View File

@ -13,19 +13,19 @@ namespace Service::PM {
PM_APP::PM_APP() : ServiceFramework("pm:app", 3) {
static const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0001, 5, 0), nullptr, "LaunchTitle"},
{IPC::MakeHeader(0x0002, 2, 2), nullptr, "LaunchFIRM"},
{IPC::MakeHeader(0x0003, 2, 0), nullptr, "TerminateApplication"},
{IPC::MakeHeader(0x0004, 4, 0), nullptr, "TerminateTitle"},
{IPC::MakeHeader(0x0005, 3, 0), nullptr, "TerminateProcess"},
{IPC::MakeHeader(0x0006, 2, 2), nullptr, "PrepareForReboot"},
{IPC::MakeHeader(0x0007, 1, 2), nullptr, "GetFIRMLaunchParams"},
{IPC::MakeHeader(0x0008, 4, 0), nullptr, "GetTitleExheaderFlags"},
{IPC::MakeHeader(0x0009, 1, 2), nullptr, "SetFIRMLaunchParams"},
{IPC::MakeHeader(0x000A, 5, 0), nullptr, "SetAppResourceLimit"},
{IPC::MakeHeader(0x000B, 5, 0), nullptr, "GetAppResourceLimit"},
{IPC::MakeHeader(0x000C, 2, 0), nullptr, "UnregisterProcess"},
{IPC::MakeHeader(0x000D, 9, 0), nullptr, "LaunchTitleUpdate"},
{0x0001, nullptr, "LaunchTitle"},
{0x0002, nullptr, "LaunchFIRM"},
{0x0003, nullptr, "TerminateApplication"},
{0x0004, nullptr, "TerminateTitle"},
{0x0005, nullptr, "TerminateProcess"},
{0x0006, nullptr, "PrepareForReboot"},
{0x0007, nullptr, "GetFIRMLaunchParams"},
{0x0008, nullptr, "GetTitleExheaderFlags"},
{0x0009, nullptr, "SetFIRMLaunchParams"},
{0x000A, nullptr, "SetAppResourceLimit"},
{0x000B, nullptr, "GetAppResourceLimit"},
{0x000C, nullptr, "UnregisterProcess"},
{0x000D, nullptr, "LaunchTitleUpdate"},
// clang-format on
};

View File

@ -13,9 +13,9 @@ namespace Service::PM {
PM_DBG::PM_DBG() : ServiceFramework("pm:dbg", 3) {
static const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0001, 5, 0), nullptr, "LaunchAppDebug"},
{IPC::MakeHeader(0x0002, 5, 0), nullptr, "LaunchApp"},
{IPC::MakeHeader(0x0003, 0, 0), nullptr, "RunQueuedProcess"},
{0x0001, nullptr, "LaunchAppDebug"},
{0x0002, nullptr, "LaunchApp"},
{0x0003, nullptr, "RunQueuedProcess"},
// clang-format on
};

View File

@ -40,7 +40,7 @@ constexpr std::array<u8, 10> KeyTypes{{
}};
void PS_PS::EncryptDecryptAes(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x4, 8, 4);
IPC::RequestParser rp(ctx);
auto src_size = rp.Pop<u32>();
[[maybe_unused]] const auto dest_size = rp.Pop<u32>();
@ -149,22 +149,22 @@ void PS_PS::EncryptDecryptAes(Kernel::HLERequestContext& ctx) {
PS_PS::PS_PS() : ServiceFramework("ps:ps", DefaultMaxSessions) {
static const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0001, 9, 4), nullptr, "SignRsaSha256"},
{IPC::MakeHeader(0x0002, 9, 4), nullptr, "VerifyRsaSha256"},
{IPC::MakeHeader(0x0004, 8, 4), &PS_PS::EncryptDecryptAes, "EncryptDecryptAes"},
{IPC::MakeHeader(0x0005, 10, 4), nullptr, "EncryptSignDecryptVerifyAesCcm"},
{IPC::MakeHeader(0x0006, 1, 0), nullptr, "GetRomId"},
{IPC::MakeHeader(0x0007, 1, 0), nullptr, "GetRomId2"},
{IPC::MakeHeader(0x0008, 1, 0), nullptr, "GetRomMakerCode"},
{IPC::MakeHeader(0x0009, 0, 0), nullptr, "GetCTRCardAutoStartupBit"},
{IPC::MakeHeader(0x000A, 0, 0), nullptr, "GetLocalFriendCodeSeed"},
{IPC::MakeHeader(0x000B, 0, 0), nullptr, "GetDeviceId"},
{IPC::MakeHeader(0x000C, 0, 0), nullptr, "SeedRNG"},
{IPC::MakeHeader(0x000D, 1, 2), nullptr, "GenerateRandomBytes"},
{IPC::MakeHeader(0x000E, 2, 2), nullptr, "InterfaceForPXI_0x04010084"},
{IPC::MakeHeader(0x000F, 2, 2), nullptr, "InterfaceForPXI_0x04020082"},
{IPC::MakeHeader(0x0010, 1, 2), nullptr, "InterfaceForPXI_0x04030044"},
{IPC::MakeHeader(0x0011, 1, 2), nullptr, "InterfaceForPXI_0x04040044"},
{0x0001, nullptr, "SignRsaSha256"},
{0x0002, nullptr, "VerifyRsaSha256"},
{0x0004, &PS_PS::EncryptDecryptAes, "EncryptDecryptAes"},
{0x0005, nullptr, "EncryptSignDecryptVerifyAesCcm"},
{0x0006, nullptr, "GetRomId"},
{0x0007, nullptr, "GetRomId2"},
{0x0008, nullptr, "GetRomMakerCode"},
{0x0009, nullptr, "GetCTRCardAutoStartupBit"},
{0x000A, nullptr, "GetLocalFriendCodeSeed"},
{0x000B, nullptr, "GetDeviceId"},
{0x000C, nullptr, "SeedRNG"},
{0x000D, nullptr, "GenerateRandomBytes"},
{0x000E, nullptr, "InterfaceForPXI_0x04010084"},
{0x000F, nullptr, "InterfaceForPXI_0x04020082"},
{0x0010, nullptr, "InterfaceForPXI_0x04030044"},
{0x0011, nullptr, "InterfaceForPXI_0x04040044"},
// clang-format on
};

View File

@ -27,7 +27,7 @@ namespace Service::PTM {
static const GameCoin default_game_coin = {0x4F00, 42, 0, 0, 0, 2014, 12, 29};
void Module::Interface::GetAdapterState(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x5, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
@ -37,7 +37,7 @@ void Module::Interface::GetAdapterState(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetShellState(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x6, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
@ -45,7 +45,7 @@ void Module::Interface::GetShellState(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetBatteryLevel(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x7, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
@ -55,7 +55,7 @@ void Module::Interface::GetBatteryLevel(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetBatteryChargeState(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x8, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
@ -65,7 +65,7 @@ void Module::Interface::GetBatteryChargeState(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetPedometerState(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x9, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
@ -75,7 +75,7 @@ void Module::Interface::GetPedometerState(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetStepHistory(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0xB, 3, 2);
IPC::RequestParser rp(ctx);
u32 hours = rp.Pop<u32>();
u64 start_time = rp.Pop<u64>();
@ -98,7 +98,7 @@ void Module::Interface::GetStepHistory(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetTotalStepCount(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0xC, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
@ -108,7 +108,7 @@ void Module::Interface::GetTotalStepCount(Kernel::HLERequestContext& ctx) {
}
void Module::Interface::GetSoftwareClosedFlag(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x80F, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
@ -127,14 +127,14 @@ void CheckNew3DS(IPC::RequestBuilder& rb) {
}
void Module::Interface::CheckNew3DS(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x40A, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
Service::PTM::CheckNew3DS(rb);
}
void Module::Interface::GetSystemTime(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x401, 0, 0);
IPC::RequestParser rp(ctx);
auto& share_page = Core::System::GetInstance().Kernel().GetSharedPageHandler();
const u64 console_time = share_page.GetSystemTimeSince2000();

View File

@ -14,23 +14,23 @@ PTM_Gets::PTM_Gets(std::shared_ptr<Module> ptm)
static const FunctionInfo functions[] = {
// ptm:u common commands
// clang-format off
{IPC::MakeHeader(0x0001, 0, 2), nullptr, "RegisterAlarmClient"},
{IPC::MakeHeader(0x0002, 2, 0), nullptr, "SetRtcAlarm"},
{IPC::MakeHeader(0x0003, 0, 0), nullptr, "GetRtcAlarm"},
{IPC::MakeHeader(0x0004, 0, 0), nullptr, "CancelRtcAlarm"},
{IPC::MakeHeader(0x0005, 0, 0), &PTM_Gets::GetAdapterState, "GetAdapterState"},
{IPC::MakeHeader(0x0006, 0, 0), &PTM_Gets::GetShellState, "GetShellState"},
{IPC::MakeHeader(0x0007, 0, 0), &PTM_Gets::GetBatteryLevel, "GetBatteryLevel"},
{IPC::MakeHeader(0x0008, 0, 0), &PTM_Gets::GetBatteryChargeState, "GetBatteryChargeState"},
{IPC::MakeHeader(0x0009, 0, 0), nullptr, "GetPedometerState"},
{IPC::MakeHeader(0x000A, 1, 2), nullptr, "GetStepHistoryEntry"},
{IPC::MakeHeader(0x000B, 3, 2), &PTM_Gets::GetStepHistory, "GetStepHistory"},
{IPC::MakeHeader(0x000C, 0, 0), &PTM_Gets::GetTotalStepCount, "GetTotalStepCount"},
{IPC::MakeHeader(0x000D, 1, 0), nullptr, "SetPedometerRecordingMode"},
{IPC::MakeHeader(0x000E, 0, 0), nullptr, "GetPedometerRecordingMode"},
{IPC::MakeHeader(0x000F, 2, 4), nullptr, "GetStepHistoryAll"},
{0x0001, nullptr, "RegisterAlarmClient"},
{0x0002, nullptr, "SetRtcAlarm"},
{0x0003, nullptr, "GetRtcAlarm"},
{0x0004, nullptr, "CancelRtcAlarm"},
{0x0005, &PTM_Gets::GetAdapterState, "GetAdapterState"},
{0x0006, &PTM_Gets::GetShellState, "GetShellState"},
{0x0007, &PTM_Gets::GetBatteryLevel, "GetBatteryLevel"},
{0x0008, &PTM_Gets::GetBatteryChargeState, "GetBatteryChargeState"},
{0x0009, nullptr, "GetPedometerState"},
{0x000A, nullptr, "GetStepHistoryEntry"},
{0x000B, &PTM_Gets::GetStepHistory, "GetStepHistory"},
{0x000C, &PTM_Gets::GetTotalStepCount, "GetTotalStepCount"},
{0x000D, nullptr, "SetPedometerRecordingMode"},
{0x000E, nullptr, "GetPedometerRecordingMode"},
{0x000F, nullptr, "GetStepHistoryAll"},
// ptm:gets
{IPC::MakeHeader(0x0401, 0, 0), &PTM_Gets::GetSystemTime, "GetSystemTime"},
{0x0401, &PTM_Gets::GetSystemTime, "GetSystemTime"},
// clang-format on
};
RegisterHandlers(functions);

View File

@ -14,26 +14,26 @@ PTM_Play::PTM_Play(std::shared_ptr<Module> ptm)
static const FunctionInfo functions[] = {
// ptm:u common commands
// clang-format off
{IPC::MakeHeader(0x0001, 0, 2), nullptr, "RegisterAlarmClient"},
{IPC::MakeHeader(0x0002, 2, 0), nullptr, "SetRtcAlarm"},
{IPC::MakeHeader(0x0003, 0, 0), nullptr, "GetRtcAlarm"},
{IPC::MakeHeader(0x0004, 0, 0), nullptr, "CancelRtcAlarm"},
{IPC::MakeHeader(0x0005, 0, 0), &PTM_Play::GetAdapterState, "GetAdapterState"},
{IPC::MakeHeader(0x0006, 0, 0), &PTM_Play::GetShellState, "GetShellState"},
{IPC::MakeHeader(0x0007, 0, 0), &PTM_Play::GetBatteryLevel, "GetBatteryLevel"},
{IPC::MakeHeader(0x0008, 0, 0), &PTM_Play::GetBatteryChargeState, "GetBatteryChargeState"},
{IPC::MakeHeader(0x0009, 0, 0), nullptr, "GetPedometerState"},
{IPC::MakeHeader(0x000A, 1, 2), nullptr, "GetStepHistoryEntry"},
{IPC::MakeHeader(0x000B, 3, 2), &PTM_Play::GetStepHistory, "GetStepHistory"},
{IPC::MakeHeader(0x000C, 0, 0), &PTM_Play::GetTotalStepCount, "GetTotalStepCount"},
{IPC::MakeHeader(0x000D, 1, 0), nullptr, "SetPedometerRecordingMode"},
{IPC::MakeHeader(0x000E, 0, 0), nullptr, "GetPedometerRecordingMode"},
{IPC::MakeHeader(0x000F, 2, 4), nullptr, "GetStepHistoryAll"},
{0x0001, nullptr, "RegisterAlarmClient"},
{0x0002, nullptr, "SetRtcAlarm"},
{0x0003, nullptr, "GetRtcAlarm"},
{0x0004, nullptr, "CancelRtcAlarm"},
{0x0005, &PTM_Play::GetAdapterState, "GetAdapterState"},
{0x0006, &PTM_Play::GetShellState, "GetShellState"},
{0x0007, &PTM_Play::GetBatteryLevel, "GetBatteryLevel"},
{0x0008, &PTM_Play::GetBatteryChargeState, "GetBatteryChargeState"},
{0x0009, nullptr, "GetPedometerState"},
{0x000A, nullptr, "GetStepHistoryEntry"},
{0x000B, &PTM_Play::GetStepHistory, "GetStepHistory"},
{0x000C, &PTM_Play::GetTotalStepCount, "GetTotalStepCount"},
{0x000D, nullptr, "SetPedometerRecordingMode"},
{0x000E, nullptr, "GetPedometerRecordingMode"},
{0x000F, nullptr, "GetStepHistoryAll"},
// ptm:play
{IPC::MakeHeader(0x0807, 2, 2), nullptr, "GetPlayHistory"},
{IPC::MakeHeader(0x0808, 0, 0), nullptr, "GetPlayHistoryStart"},
{IPC::MakeHeader(0x0809, 0, 0), nullptr, "GetPlayHistoryLength"},
{IPC::MakeHeader(0x080B, 2, 0), nullptr, "CalcPlayHistoryStart"},
{0x0807, nullptr, "GetPlayHistory"},
{0x0808, nullptr, "GetPlayHistoryStart"},
{0x0809, nullptr, "GetPlayHistoryLength"},
{0x080B, nullptr, "CalcPlayHistoryStart"},
// clang-format on
};
RegisterHandlers(functions);

View File

@ -13,7 +13,7 @@ PTM_Sets::PTM_Sets(std::shared_ptr<Module> ptm) : Module::Interface(std::move(pt
static const FunctionInfo functions[] = {
// Note that this service does not have access to ptm:u's common commands
// clang-format off
{IPC::MakeHeader(0x0001, 2, 0), nullptr, "SetSystemTime"},
{0x0001, nullptr, "SetSystemTime"},
// clang-format on
};
RegisterHandlers(functions);

View File

@ -15,53 +15,53 @@ PTM_S_Common::PTM_S_Common(std::shared_ptr<Module> ptm, const char* name)
static const FunctionInfo functions[] = {
// ptm:u common commands
// clang-format off
{IPC::MakeHeader(0x0001, 0, 2), nullptr, "RegisterAlarmClient"},
{IPC::MakeHeader(0x0002, 2, 0), nullptr, "SetRtcAlarm"},
{IPC::MakeHeader(0x0003, 0, 0), nullptr, "GetRtcAlarm"},
{IPC::MakeHeader(0x0004, 0, 0), nullptr, "CancelRtcAlarm"},
{IPC::MakeHeader(0x0005, 0, 0), &PTM_S_Common::GetAdapterState, "GetAdapterState"},
{IPC::MakeHeader(0x0006, 0, 0), &PTM_S_Common::GetShellState, "GetShellState"},
{IPC::MakeHeader(0x0007, 0, 0), &PTM_S_Common::GetBatteryLevel, "GetBatteryLevel"},
{IPC::MakeHeader(0x0008, 0, 0), &PTM_S_Common::GetBatteryChargeState, "GetBatteryChargeState"},
{IPC::MakeHeader(0x0009, 0, 0), nullptr, "GetPedometerState"},
{IPC::MakeHeader(0x000A, 1, 2), nullptr, "GetStepHistoryEntry"},
{IPC::MakeHeader(0x000B, 3, 2), &PTM_S_Common::GetStepHistory, "GetStepHistory"},
{IPC::MakeHeader(0x000C, 0, 0), &PTM_S_Common::GetTotalStepCount, "GetTotalStepCount"},
{IPC::MakeHeader(0x000D, 1, 0), nullptr, "SetPedometerRecordingMode"},
{IPC::MakeHeader(0x000E, 0, 0), nullptr, "GetPedometerRecordingMode"},
{IPC::MakeHeader(0x000F, 2, 4), nullptr, "GetStepHistoryAll"},
{0x0001, nullptr, "RegisterAlarmClient"},
{0x0002, nullptr, "SetRtcAlarm"},
{0x0003, nullptr, "GetRtcAlarm"},
{0x0004, nullptr, "CancelRtcAlarm"},
{0x0005, &PTM_S_Common::GetAdapterState, "GetAdapterState"},
{0x0006, &PTM_S_Common::GetShellState, "GetShellState"},
{0x0007, &PTM_S_Common::GetBatteryLevel, "GetBatteryLevel"},
{0x0008, &PTM_S_Common::GetBatteryChargeState, "GetBatteryChargeState"},
{0x0009, nullptr, "GetPedometerState"},
{0x000A, nullptr, "GetStepHistoryEntry"},
{0x000B, &PTM_S_Common::GetStepHistory, "GetStepHistory"},
{0x000C, &PTM_S_Common::GetTotalStepCount, "GetTotalStepCount"},
{0x000D, nullptr, "SetPedometerRecordingMode"},
{0x000E, nullptr, "GetPedometerRecordingMode"},
{0x000F, nullptr, "GetStepHistoryAll"},
// ptm:sysm & ptm:s
{IPC::MakeHeader(0x0401, 3, 0), nullptr, "SetRtcAlarmEx"},
{IPC::MakeHeader(0x0402, 1, 2), nullptr, "ReplySleepQuery"},
{IPC::MakeHeader(0x0403, 1, 2), nullptr, "NotifySleepPreparationComplete"},
{IPC::MakeHeader(0x0404, 4, 2), nullptr, "SetWakeupTrigger"},
{IPC::MakeHeader(0x0405, 0, 0), nullptr, "GetAwakeReason"},
{IPC::MakeHeader(0x0406, 0, 0), nullptr, "RequestSleep"},
{IPC::MakeHeader(0x0407, 3, 0), nullptr, "ShutdownAsync"},
{IPC::MakeHeader(0x0408, 0, 0), nullptr, "Awake"},
{IPC::MakeHeader(0x0409, 2, 0), nullptr, "RebootAsync"},
{IPC::MakeHeader(0x040A, 0, 0), &PTM_S_Common::CheckNew3DS, "CheckNew3DS"},
{IPC::MakeHeader(0x0801, 25, 0), nullptr, "SetInfoLEDPattern"},
{IPC::MakeHeader(0x0802, 1, 0), nullptr, "SetInfoLEDPatternHeader"},
{IPC::MakeHeader(0x0803, 0, 0), nullptr, "GetInfoLEDStatus"},
{IPC::MakeHeader(0x0804, 1, 0), nullptr, "SetBatteryEmptyLEDPattern"},
{IPC::MakeHeader(0x0805, 0, 0), nullptr, "ClearStepHistory"},
{IPC::MakeHeader(0x0806, 3, 2), nullptr, "SetStepHistory"},
{IPC::MakeHeader(0x0807, 2, 2), nullptr, "GetPlayHistory"},
{IPC::MakeHeader(0x0808, 0, 0), nullptr, "GetPlayHistoryStart"},
{IPC::MakeHeader(0x0809, 0, 0), nullptr, "GetPlayHistoryLength"},
{IPC::MakeHeader(0x080A, 0, 0), nullptr, "ClearPlayHistory"},
{IPC::MakeHeader(0x080B, 2, 0), nullptr, "CalcPlayHistoryStart"},
{IPC::MakeHeader(0x080C, 2, 0), nullptr, "SetUserTime"},
{IPC::MakeHeader(0x080D, 0, 0), nullptr, "InvalidateSystemTime"},
{IPC::MakeHeader(0x080E, 5, 0), nullptr, "NotifyPlayEvent"},
{IPC::MakeHeader(0x080F, 0, 0), &PTM_S_Common::GetSoftwareClosedFlag, "GetSoftwareClosedFlag"},
{IPC::MakeHeader(0x0810, 0, 0), nullptr, "ClearSoftwareClosedFlag"},
{IPC::MakeHeader(0x0811, 0, 0), &PTM_S_Common::GetShellState, "GetShellState"},
{IPC::MakeHeader(0x0812, 0, 0), nullptr, "IsShutdownByBatteryEmpty"},
{IPC::MakeHeader(0x0813, 0, 0), nullptr, "FormatSavedata"},
{IPC::MakeHeader(0x0814, 0, 0), nullptr, "GetLegacyJumpProhibitedFlag"},
{IPC::MakeHeader(0x0818, 1, 0), nullptr, "ConfigureNew3DSCPU"},
{0x0401, nullptr, "SetRtcAlarmEx"},
{0x0402, nullptr, "ReplySleepQuery"},
{0x0403, nullptr, "NotifySleepPreparationComplete"},
{0x0404, nullptr, "SetWakeupTrigger"},
{0x0405, nullptr, "GetAwakeReason"},
{0x0406, nullptr, "RequestSleep"},
{0x0407, nullptr, "ShutdownAsync"},
{0x0408, nullptr, "Awake"},
{0x0409, nullptr, "RebootAsync"},
{0x040A, &PTM_S_Common::CheckNew3DS, "CheckNew3DS"},
{0x0801, nullptr, "SetInfoLEDPattern"},
{0x0802, nullptr, "SetInfoLEDPatternHeader"},
{0x0803, nullptr, "GetInfoLEDStatus"},
{0x0804, nullptr, "SetBatteryEmptyLEDPattern"},
{0x0805, nullptr, "ClearStepHistory"},
{0x0806, nullptr, "SetStepHistory"},
{0x0807, nullptr, "GetPlayHistory"},
{0x0808, nullptr, "GetPlayHistoryStart"},
{0x0809, nullptr, "GetPlayHistoryLength"},
{0x080A, nullptr, "ClearPlayHistory"},
{0x080B, nullptr, "CalcPlayHistoryStart"},
{0x080C, nullptr, "SetUserTime"},
{0x080D, nullptr, "InvalidateSystemTime"},
{0x080E, nullptr, "NotifyPlayEvent"},
{0x080F, &PTM_S_Common::GetSoftwareClosedFlag, "GetSoftwareClosedFlag"},
{0x0810, nullptr, "ClearSoftwareClosedFlag"},
{0x0811, &PTM_S_Common::GetShellState, "GetShellState"},
{0x0812, nullptr, "IsShutdownByBatteryEmpty"},
{0x0813, nullptr, "FormatSavedata"},
{0x0814, nullptr, "GetLegacyJumpProhibitedFlag"},
{0x0818, nullptr, "ConfigureNew3DSCPU"},
// clang-format on
};
RegisterHandlers(functions);

View File

@ -12,21 +12,21 @@ namespace Service::PTM {
PTM_U::PTM_U(std::shared_ptr<Module> ptm) : Module::Interface(std::move(ptm), "ptm:u", 26) {
static const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0001, 0, 2), nullptr, "RegisterAlarmClient"},
{IPC::MakeHeader(0x0002, 2, 0), nullptr, "SetRtcAlarm"},
{IPC::MakeHeader(0x0003, 0, 0), nullptr, "GetRtcAlarm"},
{IPC::MakeHeader(0x0004, 0, 0), nullptr, "CancelRtcAlarm"},
{IPC::MakeHeader(0x0005, 0, 0), &PTM_U::GetAdapterState, "GetAdapterState"},
{IPC::MakeHeader(0x0006, 0, 0), &PTM_U::GetShellState, "GetShellState"},
{IPC::MakeHeader(0x0007, 0, 0), &PTM_U::GetBatteryLevel, "GetBatteryLevel"},
{IPC::MakeHeader(0x0008, 0, 0), &PTM_U::GetBatteryChargeState, "GetBatteryChargeState"},
{IPC::MakeHeader(0x0009, 0, 0), &PTM_U::GetPedometerState, "GetPedometerState"},
{IPC::MakeHeader(0x000A, 1, 2), nullptr, "GetStepHistoryEntry"},
{IPC::MakeHeader(0x000B, 3, 2), &PTM_U::GetStepHistory, "GetStepHistory"},
{IPC::MakeHeader(0x000C, 0, 0), &PTM_U::GetTotalStepCount, "GetTotalStepCount"},
{IPC::MakeHeader(0x000D, 1, 0), nullptr, "SetPedometerRecordingMode"},
{IPC::MakeHeader(0x000E, 0, 0), nullptr, "GetPedometerRecordingMode"},
{IPC::MakeHeader(0x000F, 2, 4), nullptr, "GetStepHistoryAll"},
{0x0001, nullptr, "RegisterAlarmClient"},
{0x0002, nullptr, "SetRtcAlarm"},
{0x0003, nullptr, "GetRtcAlarm"},
{0x0004, nullptr, "CancelRtcAlarm"},
{0x0005, &PTM_U::GetAdapterState, "GetAdapterState"},
{0x0006, &PTM_U::GetShellState, "GetShellState"},
{0x0007, &PTM_U::GetBatteryLevel, "GetBatteryLevel"},
{0x0008, &PTM_U::GetBatteryChargeState, "GetBatteryChargeState"},
{0x0009, &PTM_U::GetPedometerState, "GetPedometerState"},
{0x000A, nullptr, "GetStepHistoryEntry"},
{0x000B, &PTM_U::GetStepHistory, "GetStepHistory"},
{0x000C, &PTM_U::GetTotalStepCount, "GetTotalStepCount"},
{0x000D, nullptr, "SetPedometerRecordingMode"},
{0x000E, nullptr, "GetPedometerRecordingMode"},
{0x000F, nullptr, "GetStepHistoryAll"},
// clang-format on
};
RegisterHandlers(functions);

View File

@ -13,21 +13,21 @@ DEV::DEV() : ServiceFramework("pxi:dev", 1) {
// clang-format off
static const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0001, 7, 2), nullptr, "ReadHostIO"},
{IPC::MakeHeader(0x0002, 7, 2), nullptr, "WriteHostIO"},
{IPC::MakeHeader(0x0003, 4, 2), nullptr, "ReadHostEx"},
{IPC::MakeHeader(0x0004, 4, 2), nullptr, "WriteHostEx"},
{IPC::MakeHeader(0x0005, 4, 2), nullptr, "WriteHostExStart"},
{IPC::MakeHeader(0x0006, 4, 2), nullptr, "WriteHostExChunk"},
{IPC::MakeHeader(0x0007, 0, 0), nullptr, "WriteHostExEnd"},
{IPC::MakeHeader(0x0008, 0, 0), nullptr, "InitializeMIDI"},
{IPC::MakeHeader(0x0009, 0, 0), nullptr, "FinalizeMIDI"},
{IPC::MakeHeader(0x000A, 0, 0), nullptr, "GetMIDIInfo"},
{IPC::MakeHeader(0x000B, 0, 0), nullptr, "GetMIDIBufferSize"},
{IPC::MakeHeader(0x000C, 1, 2), nullptr, "ReadMIDI"},
{IPC::MakeHeader(0x000D, 26, 8), nullptr, "SPIMultiWriteRead"},
{IPC::MakeHeader(0x000E, 10, 4), nullptr, "SPIWriteRead"},
{IPC::MakeHeader(0x000F, 0, 0), nullptr, "GetCardDevice"},
{0x0001, nullptr, "ReadHostIO"},
{0x0002, nullptr, "WriteHostIO"},
{0x0003, nullptr, "ReadHostEx"},
{0x0004, nullptr, "WriteHostEx"},
{0x0005, nullptr, "WriteHostExStart"},
{0x0006, nullptr, "WriteHostExChunk"},
{0x0007, nullptr, "WriteHostExEnd"},
{0x0008, nullptr, "InitializeMIDI"},
{0x0009, nullptr, "FinalizeMIDI"},
{0x000A, nullptr, "GetMIDIInfo"},
{0x000B, nullptr, "GetMIDIBufferSize"},
{0x000C, nullptr, "ReadMIDI"},
{0x000D, nullptr, "SPIMultiWriteRead"},
{0x000E, nullptr, "SPIWriteRead"},
{0x000F, nullptr, "GetCardDevice"},
// clang-format on
};
// clang-format on

View File

@ -14,8 +14,8 @@ QTM_C::QTM_C() : ServiceFramework("qtm:c", 2) {
static const FunctionInfo functions[] = {
// qtm calibration commands
// clang-format off
{IPC::MakeHeader(0x0001, 0, 0), nullptr, "InitializeHardwareCheck"},
{IPC::MakeHeader(0x0005, 1, 0), nullptr, "SetIrLedCheck"},
{0x0001, nullptr, "InitializeHardwareCheck"},
{0x0005, nullptr, "SetIrLedCheck"},
// clang-format on
};

View File

@ -14,8 +14,8 @@ QTM_S::QTM_S() : ServiceFramework("qtm:s", 2) {
static const FunctionInfo functions[] = {
// qtm common commands
// clang-format off
{IPC::MakeHeader(0x0001, 2, 0), nullptr, "GetHeadtrackingInfoRaw"},
{IPC::MakeHeader(0x0002, 2, 0), nullptr, "GetHeadtrackingInfo"},
{0x0001, nullptr, "GetHeadtrackingInfoRaw"},
{0x0002, nullptr, "GetHeadtrackingInfo"},
// clang-format on
};

View File

@ -14,8 +14,8 @@ QTM_SP::QTM_SP() : ServiceFramework("qtm:sp", 2) {
static const FunctionInfo functions[] = {
// qtm common commands
// clang-format off
{IPC::MakeHeader(0x0001, 2, 0), nullptr, "GetHeadtrackingInfoRaw"},
{IPC::MakeHeader(0x0002, 2, 0), nullptr, "GetHeadtrackingInfo"},
{0x0001, nullptr, "GetHeadtrackingInfoRaw"},
{0x0002, nullptr, "GetHeadtrackingInfo"},
// clang-format on
};

View File

@ -14,8 +14,8 @@ QTM_U::QTM_U() : ServiceFramework("qtm:u", 2) {
static const FunctionInfo functions[] = {
// qtm common commands
// clang-format off
{IPC::MakeHeader(0x0001, 2, 0), nullptr, "GetHeadtrackingInfoRaw"},
{IPC::MakeHeader(0x0002, 2, 0), nullptr, "GetHeadtrackingInfo"},
{0x0001, nullptr, "GetHeadtrackingInfoRaw"},
{0x0002, nullptr, "GetHeadtrackingInfo"},
// clang-format on
};

View File

@ -143,7 +143,7 @@ void ServiceFrameworkBase::RegisterHandlersBase(const FunctionInfoBase* function
handlers.reserve(handlers.size() + n);
for (std::size_t i = 0; i < n; ++i) {
// Usually this array is sorted by id already, so hint to insert at the end
handlers.emplace_hint(handlers.cend(), functions[i].expected_header, functions[i]);
handlers.emplace_hint(handlers.cend(), functions[i].command_id, functions[i]);
}
}
@ -171,8 +171,7 @@ void ServiceFrameworkBase::ReportUnimplementedFunction(u32* cmd_buf, const Funct
}
void ServiceFrameworkBase::HandleSyncRequest(Kernel::HLERequestContext& context) {
u32 header_code = context.CommandBuffer()[0];
auto itr = handlers.find(header_code);
auto itr = handlers.find(context.CommandHeader().command_id.Value());
const FunctionInfoBase* info = itr == handlers.end() ? nullptr : &itr->second;
if (info == nullptr || info->handler_callback == nullptr) {
context.ReportUnimplemented();
@ -184,12 +183,13 @@ void ServiceFrameworkBase::HandleSyncRequest(Kernel::HLERequestContext& context)
handler_invoker(this, info->handler_callback, context);
}
std::string ServiceFrameworkBase::GetFunctionName(u32 header) const {
if (!handlers.count(header)) {
std::string ServiceFrameworkBase::GetFunctionName(IPC::Header header) const {
auto itr = handlers.find(header.command_id.Value());
if (itr == handlers.end()) {
return "";
}
return handlers.at(header).name;
return itr->second.name;
}
static bool AttemptLLE(const ServiceModuleInfo& service_module) {

View File

@ -68,7 +68,7 @@ public:
void HandleSyncRequest(Kernel::HLERequestContext& context) override;
/// Retrieves name of a function based on the header code. For IPC Recorder.
std::string GetFunctionName(u32 header) const;
std::string GetFunctionName(IPC::Header header) const;
protected:
/// Member-function pointer type of SyncRequest handlers.
@ -80,7 +80,7 @@ private:
friend class ServiceFramework;
struct FunctionInfoBase {
u32 expected_header;
u32 command_id;
HandlerFnP<ServiceFrameworkBase> handler_callback;
const char* name;
};
@ -122,21 +122,18 @@ class ServiceFramework : public ServiceFrameworkBase {
protected:
/// Contains information about a request type which is handled by the service.
struct FunctionInfo : FunctionInfoBase {
// TODO(yuriks): This function could be constexpr, but clang is the only compiler that
// doesn't emit an ICE or a wrong diagnostic because of the static_cast.
/**
* Constructs a FunctionInfo for a function.
*
* @param expected_header request header in the command buffer which will trigger dispatch
* @param command_id command ID in the command buffer which will trigger dispatch
* to this handler
* @param handler_callback member function in this service which will be called to handle
* the request
* @param name human-friendly name for the request. Used mostly for logging purposes.
*/
FunctionInfo(u32 expected_header, HandlerFnP<Self> handler_callback, const char* name)
constexpr FunctionInfo(u32 command_id, HandlerFnP<Self> handler_callback, const char* name)
: FunctionInfoBase{
expected_header,
command_id,
// Type-erase member function pointer by casting it down to the base class.
static_cast<HandlerFnP<ServiceFrameworkBase>>(handler_callback), name} {}
};

View File

@ -48,7 +48,7 @@ constexpr int MAX_PENDING_NOTIFICATIONS = 16;
* 1: ResultCode
*/
void SRV::RegisterClient(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1, 0, 2);
IPC::RequestParser rp(ctx);
const auto pid_descriptor = rp.Pop<u32>();
if (pid_descriptor != IPC::CallingPidDesc()) {
@ -74,7 +74,7 @@ void SRV::RegisterClient(Kernel::HLERequestContext& ctx) {
* 3: Handle to semaphore signaled on process notification
*/
void SRV::EnableNotification(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x2, 0, 0);
IPC::RequestParser rp(ctx);
notification_semaphore =
system.Kernel().CreateSemaphore(0, MAX_PENDING_NOTIFICATIONS, "SRV:Notification").Unwrap();
@ -139,7 +139,7 @@ private:
* 3: Service handle
*/
void SRV::GetServiceHandle(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x5, 4, 0);
IPC::RequestParser rp(ctx);
auto name_buf = rp.PopRaw<std::array<char, 8>>();
std::size_t name_len = rp.Pop<u32>();
u32 flags = rp.Pop<u32>();
@ -202,7 +202,7 @@ void SRV::GetServiceHandle(Kernel::HLERequestContext& ctx) {
* 1: ResultCode
*/
void SRV::Subscribe(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x9, 1, 0);
IPC::RequestParser rp(ctx);
u32 notification_id = rp.Pop<u32>();
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
@ -220,7 +220,7 @@ void SRV::Subscribe(Kernel::HLERequestContext& ctx) {
* 1: ResultCode
*/
void SRV::Unsubscribe(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0xA, 1, 0);
IPC::RequestParser rp(ctx);
u32 notification_id = rp.Pop<u32>();
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
@ -239,7 +239,7 @@ void SRV::Unsubscribe(Kernel::HLERequestContext& ctx) {
* 1: ResultCode
*/
void SRV::PublishToSubscriber(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0xC, 2, 0);
IPC::RequestParser rp(ctx);
u32 notification_id = rp.Pop<u32>();
u8 flags = rp.Pop<u8>();
@ -258,7 +258,7 @@ void SRV::PublishToSubscriber(Kernel::HLERequestContext& ctx) {
}
void SRV::RegisterService(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x3, 4, 0);
IPC::RequestParser rp(ctx);
auto name_buf = rp.PopRaw<std::array<char, 8>>();
std::size_t name_len = rp.Pop<u32>();
@ -289,20 +289,20 @@ void SRV::RegisterService(Kernel::HLERequestContext& ctx) {
SRV::SRV(Core::System& system) : ServiceFramework("srv:", 4), system(system) {
static const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0001, 0, 2), &SRV::RegisterClient, "RegisterClient"},
{IPC::MakeHeader(0x0002, 0, 0), &SRV::EnableNotification, "EnableNotification"},
{IPC::MakeHeader(0x0003, 4, 0), &SRV::RegisterService, "RegisterService"},
{IPC::MakeHeader(0x0004, 3, 0), nullptr, "UnregisterService"},
{IPC::MakeHeader(0x0005, 4, 0), &SRV::GetServiceHandle, "GetServiceHandle"},
{IPC::MakeHeader(0x0006, 3, 2), nullptr, "RegisterPort"},
{IPC::MakeHeader(0x0007, 3, 0), nullptr, "UnregisterPort"},
{IPC::MakeHeader(0x0008, 4, 0), nullptr, "GetPort"},
{IPC::MakeHeader(0x0009, 1, 0), &SRV::Subscribe, "Subscribe"},
{IPC::MakeHeader(0x000A, 1, 0), &SRV::Unsubscribe, "Unsubscribe"},
{IPC::MakeHeader(0x000B, 0, 0), nullptr, "ReceiveNotification"},
{IPC::MakeHeader(0x000C, 2, 0), &SRV::PublishToSubscriber, "PublishToSubscriber"},
{IPC::MakeHeader(0x000D, 1, 0), nullptr, "PublishAndGetSubscriber"},
{IPC::MakeHeader(0x000E, 3, 0), nullptr, "IsServiceRegistered"},
{0x0001, &SRV::RegisterClient, "RegisterClient"},
{0x0002, &SRV::EnableNotification, "EnableNotification"},
{0x0003, &SRV::RegisterService, "RegisterService"},
{0x0004, nullptr, "UnregisterService"},
{0x0005, &SRV::GetServiceHandle, "GetServiceHandle"},
{0x0006, nullptr, "RegisterPort"},
{0x0007, nullptr, "UnregisterPort"},
{0x0008, nullptr, "GetPort"},
{0x0009, &SRV::Subscribe, "Subscribe"},
{0x000A, &SRV::Unsubscribe, "Unsubscribe"},
{0x000B, nullptr, "ReceiveNotification"},
{0x000C, &SRV::PublishToSubscriber, "PublishToSubscriber"},
{0x000D, nullptr, "PublishAndGetSubscriber"},
{0x000E, nullptr, "IsServiceRegistered"},
// clang-format on
};
RegisterHandlers(functions);

View File

@ -722,7 +722,7 @@ void SOC_U::CleanupSockets() {
}
void SOC_U::Socket(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x02, 3, 2);
IPC::RequestParser rp(ctx);
u32 domain = SocketDomainToPlatform(rp.Pop<u32>()); // Address family
u32 type = SocketTypeToPlatform(rp.Pop<u32>());
u32 protocol = SocketProtocolToPlatform(rp.Pop<u32>());
@ -771,7 +771,7 @@ void SOC_U::Socket(Kernel::HLERequestContext& ctx) {
}
void SOC_U::Bind(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x05, 2, 4);
IPC::RequestParser rp(ctx);
u32 socket_handle = rp.Pop<u32>();
auto fd_info = open_sockets.find(socket_handle);
if (fd_info == open_sockets.end()) {
@ -800,7 +800,7 @@ void SOC_U::Bind(Kernel::HLERequestContext& ctx) {
}
void SOC_U::Fcntl(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x13, 3, 2);
IPC::RequestParser rp(ctx);
u32 socket_handle = rp.Pop<u32>();
auto fd_info = open_sockets.find(socket_handle);
if (fd_info == open_sockets.end()) {
@ -834,7 +834,7 @@ void SOC_U::Fcntl(Kernel::HLERequestContext& ctx) {
}
void SOC_U::Listen(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x03, 2, 2);
IPC::RequestParser rp(ctx);
u32 socket_handle = rp.Pop<u32>();
auto fd_info = open_sockets.find(socket_handle);
if (fd_info == open_sockets.end()) {
@ -859,7 +859,7 @@ void SOC_U::Accept(Kernel::HLERequestContext& ctx) {
// TODO(Subv): Calling this function on a blocking socket will block the emu thread,
// preventing graceful shutdown when closing the emulator, this can be fixed by always
// performing nonblocking operations and spinlock until the data is available
IPC::RequestParser rp(ctx, 0x04, 2, 2);
IPC::RequestParser rp(ctx);
const auto socket_handle = rp.Pop<u32>();
auto fd_info = open_sockets.find(socket_handle);
if (fd_info == open_sockets.end()) {
@ -896,7 +896,7 @@ void SOC_U::Accept(Kernel::HLERequestContext& ctx) {
}
void SOC_U::GetHostId(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x16, 0, 0);
IPC::RequestParser rp(ctx);
u32 host_id = 0;
auto info = GetDefaultInterfaceInfo();
@ -910,7 +910,7 @@ void SOC_U::GetHostId(Kernel::HLERequestContext& ctx) {
}
void SOC_U::Close(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0B, 1, 2);
IPC::RequestParser rp(ctx);
u32 socket_handle = rp.Pop<u32>();
auto fd_info = open_sockets.find(socket_handle);
if (fd_info == open_sockets.end()) {
@ -936,7 +936,7 @@ void SOC_U::Close(Kernel::HLERequestContext& ctx) {
}
void SOC_U::SendToOther(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x09, 4, 6);
IPC::RequestParser rp(ctx);
const u32 socket_handle = rp.Pop<u32>();
const auto fd_info = open_sockets.find(socket_handle);
if (fd_info == open_sockets.end()) {
@ -998,7 +998,7 @@ void SOC_U::SendToOther(Kernel::HLERequestContext& ctx) {
}
void SOC_U::SendTo(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0A, 4, 6);
IPC::RequestParser rp(ctx);
u32 socket_handle = rp.Pop<u32>();
auto fd_info = open_sockets.find(socket_handle);
if (fd_info == open_sockets.end()) {
@ -1055,7 +1055,7 @@ void SOC_U::SendTo(Kernel::HLERequestContext& ctx) {
}
void SOC_U::RecvFromOther(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x7, 4, 4);
IPC::RequestParser rp(ctx);
u32 socket_handle = rp.Pop<u32>();
auto fd_info = open_sockets.find(socket_handle);
if (fd_info == open_sockets.end()) {
@ -1131,7 +1131,7 @@ void SOC_U::RecvFrom(Kernel::HLERequestContext& ctx) {
// TODO(Subv): Calling this function on a blocking socket will block the emu thread,
// preventing graceful shutdown when closing the emulator, this can be fixed by always
// performing nonblocking operations and spinlock until the data is available
IPC::RequestParser rp(ctx, 0x08, 4, 2);
IPC::RequestParser rp(ctx);
u32 socket_handle = rp.Pop<u32>();
auto fd_info = open_sockets.find(socket_handle);
if (fd_info == open_sockets.end()) {
@ -1207,7 +1207,7 @@ void SOC_U::RecvFrom(Kernel::HLERequestContext& ctx) {
}
void SOC_U::Poll(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x14, 2, 4);
IPC::RequestParser rp(ctx);
u32 nfds = rp.Pop<u32>();
s32 timeout = rp.Pop<s32>();
rp.PopPID();
@ -1255,7 +1255,7 @@ void SOC_U::Poll(Kernel::HLERequestContext& ctx) {
}
void SOC_U::GetSockName(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x17, 2, 2);
IPC::RequestParser rp(ctx);
const auto socket_handle = rp.Pop<u32>();
auto fd_info = open_sockets.find(socket_handle);
if (fd_info == open_sockets.end()) {
@ -1285,7 +1285,7 @@ void SOC_U::GetSockName(Kernel::HLERequestContext& ctx) {
}
void SOC_U::Shutdown(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0C, 2, 2);
IPC::RequestParser rp(ctx);
u32 socket_handle = rp.Pop<u32>();
auto fd_info = open_sockets.find(socket_handle);
if (fd_info == open_sockets.end()) {
@ -1306,7 +1306,7 @@ void SOC_U::Shutdown(Kernel::HLERequestContext& ctx) {
}
void SOC_U::GetHostByName(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0D, 2, 2);
IPC::RequestParser rp(ctx);
[[maybe_unused]] u32 name_len = rp.Pop<u32>();
[[maybe_unused]] u32 out_buf_len = rp.Pop<u32>();
auto host_name = rp.PopStaticBuffer();
@ -1349,7 +1349,7 @@ void SOC_U::GetHostByName(Kernel::HLERequestContext& ctx) {
}
void SOC_U::GetPeerName(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x18, 2, 2);
IPC::RequestParser rp(ctx);
const auto socket_handle = rp.Pop<u32>();
auto fd_info = open_sockets.find(socket_handle);
if (fd_info == open_sockets.end()) {
@ -1384,7 +1384,7 @@ void SOC_U::Connect(Kernel::HLERequestContext& ctx) {
// TODO(Subv): Calling this function on a blocking socket will block the emu thread,
// preventing graceful shutdown when closing the emulator, this can be fixed by always
// performing nonblocking operations and spinlock until the data is available
IPC::RequestParser rp(ctx, 0x06, 2, 4);
IPC::RequestParser rp(ctx);
const auto socket_handle = rp.Pop<u32>();
auto fd_info = open_sockets.find(socket_handle);
if (fd_info == open_sockets.end()) {
@ -1418,7 +1418,7 @@ void SOC_U::Connect(Kernel::HLERequestContext& ctx) {
void SOC_U::InitializeSockets(Kernel::HLERequestContext& ctx) {
// TODO(Subv): Implement
IPC::RequestParser rp(ctx, 0x01, 1, 4);
IPC::RequestParser rp(ctx);
[[maybe_unused]] const auto memory_block_size = rp.Pop<u32>();
rp.PopPID();
rp.PopObject<Kernel::SharedMemory>();
@ -1429,7 +1429,7 @@ void SOC_U::InitializeSockets(Kernel::HLERequestContext& ctx) {
void SOC_U::ShutdownSockets(Kernel::HLERequestContext& ctx) {
// TODO(Subv): Implement
IPC::RequestParser rp(ctx, 0x19, 0, 0);
IPC::RequestParser rp(ctx);
CleanupSockets();
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
@ -1437,7 +1437,7 @@ void SOC_U::ShutdownSockets(Kernel::HLERequestContext& ctx) {
}
void SOC_U::GetSockOpt(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x11, 4, 2);
IPC::RequestParser rp(ctx);
u32 socket_handle = rp.Pop<u32>();
auto fd_info = open_sockets.find(socket_handle);
if (fd_info == open_sockets.end()) {
@ -1485,7 +1485,7 @@ void SOC_U::GetSockOpt(Kernel::HLERequestContext& ctx) {
}
void SOC_U::SetSockOpt(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x12, 4, 4);
IPC::RequestParser rp(ctx);
const auto socket_handle = rp.Pop<u32>();
auto fd_info = open_sockets.find(socket_handle);
if (fd_info == open_sockets.end()) {
@ -1528,7 +1528,7 @@ void SOC_U::SetSockOpt(Kernel::HLERequestContext& ctx) {
}
void SOC_U::GetNetworkOpt(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1A, 3, 0);
IPC::RequestParser rp(ctx);
u32 level = rp.Pop<u32>();
u32 opt_name = rp.Pop<u32>();
u32 opt_len = rp.Pop<u32>();
@ -1583,7 +1583,7 @@ void SOC_U::GetNetworkOpt(Kernel::HLERequestContext& ctx) {
}
void SOC_U::GetAddrInfoImpl(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0F, 4, 6);
IPC::RequestParser rp(ctx);
u32 node_length = rp.Pop<u32>();
u32 service_length = rp.Pop<u32>();
u32 hints_size = rp.Pop<u32>();
@ -1646,7 +1646,7 @@ void SOC_U::GetAddrInfoImpl(Kernel::HLERequestContext& ctx) {
}
void SOC_U::GetNameInfoImpl(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x10, 4, 2);
IPC::RequestParser rp(ctx);
u32 socklen = rp.Pop<u32>();
u32 hostlen = rp.Pop<u32>();
u32 servlen = rp.Pop<u32>();
@ -1677,39 +1677,39 @@ void SOC_U::GetNameInfoImpl(Kernel::HLERequestContext& ctx) {
SOC_U::SOC_U() : ServiceFramework("soc:U") {
static const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0001, 1, 4), &SOC_U::InitializeSockets, "InitializeSockets"},
{IPC::MakeHeader(0x0002, 3, 2), &SOC_U::Socket, "Socket"},
{IPC::MakeHeader(0x0003, 2, 2), &SOC_U::Listen, "Listen"},
{IPC::MakeHeader(0x0004, 2, 2), &SOC_U::Accept, "Accept"},
{IPC::MakeHeader(0x0005, 2, 4), &SOC_U::Bind, "Bind"},
{IPC::MakeHeader(0x0006, 2, 4), &SOC_U::Connect, "Connect"},
{IPC::MakeHeader(0x0007, 4, 4), &SOC_U::RecvFromOther, "recvfrom_other"},
{IPC::MakeHeader(0x0008, 4, 2), &SOC_U::RecvFrom, "RecvFrom"},
{IPC::MakeHeader(0x0009, 4, 6), &SOC_U::SendToOther, "SendToOther"},
{IPC::MakeHeader(0x000A, 4, 6), &SOC_U::SendTo, "SendTo"},
{IPC::MakeHeader(0x000B, 1, 2), &SOC_U::Close, "Close"},
{IPC::MakeHeader(0x000C, 2, 2), &SOC_U::Shutdown, "Shutdown"},
{IPC::MakeHeader(0x000D, 2, 2), &SOC_U::GetHostByName, "GetHostByName"},
{IPC::MakeHeader(0x000E, 3, 2), nullptr, "GetHostByAddr"},
{IPC::MakeHeader(0x000F, 4, 6), &SOC_U::GetAddrInfoImpl, "GetAddrInfo"},
{IPC::MakeHeader(0x0010, 4, 2), &SOC_U::GetNameInfoImpl, "GetNameInfo"},
{IPC::MakeHeader(0x0011, 4, 2), &SOC_U::GetSockOpt, "GetSockOpt"},
{IPC::MakeHeader(0x0012, 4, 4), &SOC_U::SetSockOpt, "SetSockOpt"},
{IPC::MakeHeader(0x0013, 3, 2), &SOC_U::Fcntl, "Fcntl"},
{IPC::MakeHeader(0x0014, 2, 4), &SOC_U::Poll, "Poll"},
{IPC::MakeHeader(0x0015, 1, 2), nullptr, "SockAtMark"},
{IPC::MakeHeader(0x0016, 0, 0), &SOC_U::GetHostId, "GetHostId"},
{IPC::MakeHeader(0x0017, 2, 2), &SOC_U::GetSockName, "GetSockName"},
{IPC::MakeHeader(0x0018, 2, 2), &SOC_U::GetPeerName, "GetPeerName"},
{IPC::MakeHeader(0x0019, 0, 0), &SOC_U::ShutdownSockets, "ShutdownSockets"},
{IPC::MakeHeader(0x001A, 3, 0), &SOC_U::GetNetworkOpt, "GetNetworkOpt"},
{IPC::MakeHeader(0x001B, 1, 0), nullptr, "ICMPSocket"},
{IPC::MakeHeader(0x001C, 4, 4), nullptr, "ICMPPing"},
{IPC::MakeHeader(0x001D, 1, 0), nullptr, "ICMPCancel"},
{IPC::MakeHeader(0x001E, 1, 0), nullptr, "ICMPClose"},
{IPC::MakeHeader(0x001F, 1, 0), nullptr, "GetResolverInfo"},
{IPC::MakeHeader(0x0021, 0, 2), nullptr, "CloseSockets"},
{IPC::MakeHeader(0x0023, 1, 0), nullptr, "AddGlobalSocket"},
{0x0001, &SOC_U::InitializeSockets, "InitializeSockets"},
{0x0002, &SOC_U::Socket, "Socket"},
{0x0003, &SOC_U::Listen, "Listen"},
{0x0004, &SOC_U::Accept, "Accept"},
{0x0005, &SOC_U::Bind, "Bind"},
{0x0006, &SOC_U::Connect, "Connect"},
{0x0007, &SOC_U::RecvFromOther, "recvfrom_other"},
{0x0008, &SOC_U::RecvFrom, "RecvFrom"},
{0x0009, &SOC_U::SendToOther, "SendToOther"},
{0x000A, &SOC_U::SendTo, "SendTo"},
{0x000B, &SOC_U::Close, "Close"},
{0x000C, &SOC_U::Shutdown, "Shutdown"},
{0x000D, &SOC_U::GetHostByName, "GetHostByName"},
{0x000E, nullptr, "GetHostByAddr"},
{0x000F, &SOC_U::GetAddrInfoImpl, "GetAddrInfo"},
{0x0010, &SOC_U::GetNameInfoImpl, "GetNameInfo"},
{0x0011, &SOC_U::GetSockOpt, "GetSockOpt"},
{0x0012, &SOC_U::SetSockOpt, "SetSockOpt"},
{0x0013, &SOC_U::Fcntl, "Fcntl"},
{0x0014, &SOC_U::Poll, "Poll"},
{0x0015, nullptr, "SockAtMark"},
{0x0016, &SOC_U::GetHostId, "GetHostId"},
{0x0017, &SOC_U::GetSockName, "GetSockName"},
{0x0018, &SOC_U::GetPeerName, "GetPeerName"},
{0x0019, &SOC_U::ShutdownSockets, "ShutdownSockets"},
{0x001A, &SOC_U::GetNetworkOpt, "GetNetworkOpt"},
{0x001B, nullptr, "ICMPSocket"},
{0x001C, nullptr, "ICMPPing"},
{0x001D, nullptr, "ICMPCancel"},
{0x001E, nullptr, "ICMPClose"},
{0x001F, nullptr, "GetResolverInfo"},
{0x0021, nullptr, "CloseSockets"},
{0x0023, nullptr, "AddGlobalSocket"},
// clang-format on
};

View File

@ -13,7 +13,7 @@ SERIALIZE_EXPORT_IMPL(Service::SSL::SSL_C)
namespace Service::SSL {
void SSL_C::Initialize(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x01, 0, 2);
IPC::RequestParser rp(ctx);
rp.PopPID();
// Seed random number generator when the SSL service is initialized
@ -26,7 +26,7 @@ void SSL_C::Initialize(Kernel::HLERequestContext& ctx) {
}
void SSL_C::GenerateRandomData(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x11, 1, 2);
IPC::RequestParser rp(ctx);
u32 size = rp.Pop<u32>();
auto buffer = rp.PopMappedBuffer();
@ -62,29 +62,29 @@ void SSL_C::GenerateRandomData(Kernel::HLERequestContext& ctx) {
SSL_C::SSL_C() : ServiceFramework("ssl:C") {
static const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0001, 0, 2), &SSL_C::Initialize, "Initialize"},
{IPC::MakeHeader(0x0002, 3, 2), nullptr, "CreateContext"},
{IPC::MakeHeader(0x0003, 0, 0), nullptr, "CreateRootCertChain"},
{IPC::MakeHeader(0x0004, 1, 0), nullptr, "DestroyRootCertChain"},
{IPC::MakeHeader(0x0005, 2, 2), nullptr, "AddTrustedRootCA"},
{IPC::MakeHeader(0x0006, 2, 0), nullptr, "RootCertChainAddDefaultCert"},
{IPC::MakeHeader(0x0007, 2, 0), nullptr, "RootCertChainRemoveCert"},
{IPC::MakeHeader(0x000D, 2, 4), nullptr, "OpenClientCertContext"},
{IPC::MakeHeader(0x000E, 1, 0), nullptr, "OpenDefaultClientCertContext"},
{IPC::MakeHeader(0x000F, 1, 0), nullptr, "CloseClientCertContext"},
{IPC::MakeHeader(0x0011, 1, 2), &SSL_C::GenerateRandomData, "GenerateRandomData"},
{IPC::MakeHeader(0x0012, 1, 2), nullptr, "InitializeConnectionSession"},
{IPC::MakeHeader(0x0013, 1, 0), nullptr, "StartConnection"},
{IPC::MakeHeader(0x0014, 1, 0), nullptr, "StartConnectionGetOut"},
{IPC::MakeHeader(0x0015, 2, 2), nullptr, "Read"},
{IPC::MakeHeader(0x0016, 2, 2), nullptr, "ReadPeek"},
{IPC::MakeHeader(0x0017, 2, 2), nullptr, "Write"},
{IPC::MakeHeader(0x0018, 2, 0), nullptr, "ContextSetRootCertChain"},
{IPC::MakeHeader(0x0019, 2, 0), nullptr, "ContextSetClientCert"},
{IPC::MakeHeader(0x001B, 2, 0), nullptr, "ContextClearOpt"},
{IPC::MakeHeader(0x001C, 3, 4), nullptr, "ContextGetProtocolCipher"},
{IPC::MakeHeader(0x001E, 1, 0), nullptr, "DestroyContext"},
{IPC::MakeHeader(0x001F, 2, 2), nullptr, "ContextInitSharedmem"},
{0x0001, &SSL_C::Initialize, "Initialize"},
{0x0002, nullptr, "CreateContext"},
{0x0003, nullptr, "CreateRootCertChain"},
{0x0004, nullptr, "DestroyRootCertChain"},
{0x0005, nullptr, "AddTrustedRootCA"},
{0x0006, nullptr, "RootCertChainAddDefaultCert"},
{0x0007, nullptr, "RootCertChainRemoveCert"},
{0x000D, nullptr, "OpenClientCertContext"},
{0x000E, nullptr, "OpenDefaultClientCertContext"},
{0x000F, nullptr, "CloseClientCertContext"},
{0x0011, &SSL_C::GenerateRandomData, "GenerateRandomData"},
{0x0012, nullptr, "InitializeConnectionSession"},
{0x0013, nullptr, "StartConnection"},
{0x0014, nullptr, "StartConnectionGetOut"},
{0x0015, nullptr, "Read"},
{0x0016, nullptr, "ReadPeek"},
{0x0017, nullptr, "Write"},
{0x0018, nullptr, "ContextSetRootCertChain"},
{0x0019, nullptr, "ContextSetClientCert"},
{0x001B, nullptr, "ContextClearOpt"},
{0x001C, nullptr, "ContextGetProtocolCipher"},
{0x001E, nullptr, "DestroyContext"},
{0x001F, nullptr, "ContextInitSharedmem"},
// clang-format on
};

View File

@ -78,7 +78,7 @@ ResultCode ConversionConfiguration::SetStandardCoefficient(
}
void Y2R_U::SetInputFormat(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1, 1, 0);
IPC::RequestParser rp(ctx);
conversion.input_format = rp.PopEnum<InputFormat>();
@ -89,7 +89,7 @@ void Y2R_U::SetInputFormat(Kernel::HLERequestContext& ctx) {
}
void Y2R_U::GetInputFormat(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x2, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
@ -99,7 +99,7 @@ void Y2R_U::GetInputFormat(Kernel::HLERequestContext& ctx) {
}
void Y2R_U::SetOutputFormat(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x3, 1, 0);
IPC::RequestParser rp(ctx);
conversion.output_format = rp.PopEnum<OutputFormat>();
@ -110,7 +110,7 @@ void Y2R_U::SetOutputFormat(Kernel::HLERequestContext& ctx) {
}
void Y2R_U::GetOutputFormat(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x4, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
@ -120,7 +120,7 @@ void Y2R_U::GetOutputFormat(Kernel::HLERequestContext& ctx) {
}
void Y2R_U::SetRotation(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x5, 1, 0);
IPC::RequestParser rp(ctx);
conversion.rotation = rp.PopEnum<Rotation>();
@ -131,7 +131,7 @@ void Y2R_U::SetRotation(Kernel::HLERequestContext& ctx) {
}
void Y2R_U::GetRotation(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x6, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
@ -141,7 +141,7 @@ void Y2R_U::GetRotation(Kernel::HLERequestContext& ctx) {
}
void Y2R_U::SetBlockAlignment(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x7, 1, 0);
IPC::RequestParser rp(ctx);
conversion.block_alignment = rp.PopEnum<BlockAlignment>();
@ -152,7 +152,7 @@ void Y2R_U::SetBlockAlignment(Kernel::HLERequestContext& ctx) {
}
void Y2R_U::GetBlockAlignment(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x8, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
@ -162,7 +162,7 @@ void Y2R_U::GetBlockAlignment(Kernel::HLERequestContext& ctx) {
}
void Y2R_U::SetSpacialDithering(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x9, 1, 0);
IPC::RequestParser rp(ctx);
spacial_dithering_enabled = rp.Pop<bool>();
@ -173,7 +173,7 @@ void Y2R_U::SetSpacialDithering(Kernel::HLERequestContext& ctx) {
}
void Y2R_U::GetSpacialDithering(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0xA, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
@ -183,7 +183,7 @@ void Y2R_U::GetSpacialDithering(Kernel::HLERequestContext& ctx) {
}
void Y2R_U::SetTemporalDithering(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0xB, 1, 0);
IPC::RequestParser rp(ctx);
temporal_dithering_enabled = rp.Pop<bool>();
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
@ -193,7 +193,7 @@ void Y2R_U::SetTemporalDithering(Kernel::HLERequestContext& ctx) {
}
void Y2R_U::GetTemporalDithering(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0xC, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
@ -203,7 +203,7 @@ void Y2R_U::GetTemporalDithering(Kernel::HLERequestContext& ctx) {
}
void Y2R_U::SetTransferEndInterrupt(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0xD, 1, 0);
IPC::RequestParser rp(ctx);
transfer_end_interrupt_enabled = rp.Pop<bool>();
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
@ -213,7 +213,7 @@ void Y2R_U::SetTransferEndInterrupt(Kernel::HLERequestContext& ctx) {
}
void Y2R_U::GetTransferEndInterrupt(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0xE, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
@ -223,7 +223,7 @@ void Y2R_U::GetTransferEndInterrupt(Kernel::HLERequestContext& ctx) {
}
void Y2R_U::GetTransferEndEvent(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0xF, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 2);
rb.Push(RESULT_SUCCESS);
@ -233,7 +233,7 @@ void Y2R_U::GetTransferEndEvent(Kernel::HLERequestContext& ctx) {
}
void Y2R_U::SetSendingY(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x10, 4, 2);
IPC::RequestParser rp(ctx);
conversion.src_Y.address = rp.Pop<u32>();
conversion.src_Y.image_size = rp.Pop<u32>();
conversion.src_Y.transfer_unit = rp.Pop<u32>();
@ -252,7 +252,7 @@ void Y2R_U::SetSendingY(Kernel::HLERequestContext& ctx) {
}
void Y2R_U::SetSendingU(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x11, 4, 2);
IPC::RequestParser rp(ctx);
conversion.src_U.address = rp.Pop<u32>();
conversion.src_U.image_size = rp.Pop<u32>();
conversion.src_U.transfer_unit = rp.Pop<u32>();
@ -271,7 +271,7 @@ void Y2R_U::SetSendingU(Kernel::HLERequestContext& ctx) {
}
void Y2R_U::SetSendingV(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x12, 4, 2);
IPC::RequestParser rp(ctx);
conversion.src_V.address = rp.Pop<u32>();
conversion.src_V.image_size = rp.Pop<u32>();
@ -291,7 +291,7 @@ void Y2R_U::SetSendingV(Kernel::HLERequestContext& ctx) {
}
void Y2R_U::SetSendingYUYV(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x13, 4, 2);
IPC::RequestParser rp(ctx);
conversion.src_YUYV.address = rp.Pop<u32>();
conversion.src_YUYV.image_size = rp.Pop<u32>();
@ -311,7 +311,7 @@ void Y2R_U::SetSendingYUYV(Kernel::HLERequestContext& ctx) {
}
void Y2R_U::IsFinishedSendingYuv(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x14, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
@ -321,7 +321,7 @@ void Y2R_U::IsFinishedSendingYuv(Kernel::HLERequestContext& ctx) {
}
void Y2R_U::IsFinishedSendingY(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x15, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
@ -331,7 +331,7 @@ void Y2R_U::IsFinishedSendingY(Kernel::HLERequestContext& ctx) {
}
void Y2R_U::IsFinishedSendingU(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x16, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
@ -341,7 +341,7 @@ void Y2R_U::IsFinishedSendingU(Kernel::HLERequestContext& ctx) {
}
void Y2R_U::IsFinishedSendingV(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x17, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
@ -351,7 +351,7 @@ void Y2R_U::IsFinishedSendingV(Kernel::HLERequestContext& ctx) {
}
void Y2R_U::SetReceiving(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x18, 4, 2);
IPC::RequestParser rp(ctx);
conversion.dst.address = rp.Pop<u32>();
conversion.dst.image_size = rp.Pop<u32>();
@ -371,7 +371,7 @@ void Y2R_U::SetReceiving(Kernel::HLERequestContext& ctx) {
}
void Y2R_U::IsFinishedReceiving(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x19, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
@ -381,7 +381,7 @@ void Y2R_U::IsFinishedReceiving(Kernel::HLERequestContext& ctx) {
}
void Y2R_U::SetInputLineWidth(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1A, 1, 0);
IPC::RequestParser rp(ctx);
u32 input_line_width = rp.Pop<u32>();
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
@ -391,7 +391,7 @@ void Y2R_U::SetInputLineWidth(Kernel::HLERequestContext& ctx) {
}
void Y2R_U::GetInputLineWidth(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1B, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
@ -401,7 +401,7 @@ void Y2R_U::GetInputLineWidth(Kernel::HLERequestContext& ctx) {
}
void Y2R_U::SetInputLines(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1C, 1, 0);
IPC::RequestParser rp(ctx);
u32 input_lines = rp.Pop<u32>();
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
@ -411,7 +411,7 @@ void Y2R_U::SetInputLines(Kernel::HLERequestContext& ctx) {
}
void Y2R_U::GetInputLines(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1D, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
@ -421,7 +421,7 @@ void Y2R_U::GetInputLines(Kernel::HLERequestContext& ctx) {
}
void Y2R_U::SetCoefficient(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1E, 4, 0);
IPC::RequestParser rp(ctx);
rp.PopRaw<CoefficientSet>(conversion.coefficients);
@ -435,7 +435,7 @@ void Y2R_U::SetCoefficient(Kernel::HLERequestContext& ctx) {
}
void Y2R_U::GetCoefficient(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1F, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(5, 0);
rb.Push(RESULT_SUCCESS);
@ -445,7 +445,7 @@ void Y2R_U::GetCoefficient(Kernel::HLERequestContext& ctx) {
}
void Y2R_U::SetStandardCoefficient(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x20, 1, 0);
IPC::RequestParser rp(ctx);
u32 index = rp.Pop<u32>();
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
@ -455,7 +455,7 @@ void Y2R_U::SetStandardCoefficient(Kernel::HLERequestContext& ctx) {
}
void Y2R_U::GetStandardCoefficient(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x21, 1, 0);
IPC::RequestParser rp(ctx);
const u32 index = rp.Pop<u32>();
if (index < standard_coefficients.size()) {
@ -474,7 +474,7 @@ void Y2R_U::GetStandardCoefficient(Kernel::HLERequestContext& ctx) {
}
void Y2R_U::SetAlpha(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x22, 1, 0);
IPC::RequestParser rp(ctx);
conversion.alpha = rp.Pop<u32>();
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
@ -484,7 +484,7 @@ void Y2R_U::SetAlpha(Kernel::HLERequestContext& ctx) {
}
void Y2R_U::GetAlpha(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x23, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
@ -494,7 +494,7 @@ void Y2R_U::GetAlpha(Kernel::HLERequestContext& ctx) {
}
void Y2R_U::SetDitheringWeightParams(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x24, 8, 0); // 0x240200
IPC::RequestParser rp(ctx);
rp.PopRaw(dithering_weight_params);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
@ -503,7 +503,7 @@ void Y2R_U::SetDitheringWeightParams(Kernel::HLERequestContext& ctx) {
}
void Y2R_U::GetDitheringWeightParams(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x25, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(9, 0);
rb.Push(RESULT_SUCCESS);
@ -513,7 +513,7 @@ void Y2R_U::GetDitheringWeightParams(Kernel::HLERequestContext& ctx) {
}
void Y2R_U::StartConversion(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x26, 0, 0);
IPC::RequestParser rp(ctx);
// dst_image_size would seem to be perfect for this, but it doesn't include the gap :(
u32 total_output_size =
@ -532,7 +532,7 @@ void Y2R_U::StartConversion(Kernel::HLERequestContext& ctx) {
}
void Y2R_U::StopConversion(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x27, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
@ -541,7 +541,7 @@ void Y2R_U::StopConversion(Kernel::HLERequestContext& ctx) {
}
void Y2R_U::IsBusyConversion(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x28, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
@ -551,7 +551,7 @@ void Y2R_U::IsBusyConversion(Kernel::HLERequestContext& ctx) {
}
void Y2R_U::SetPackageParameter(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x29, 7, 0);
IPC::RequestParser rp(ctx);
auto params = rp.PopRaw<ConversionParameters>();
conversion.input_format = params.input_format;
@ -590,7 +590,7 @@ cleanup:
}
void Y2R_U::PingProcess(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x2A, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
@ -600,7 +600,7 @@ void Y2R_U::PingProcess(Kernel::HLERequestContext& ctx) {
}
void Y2R_U::DriverInitialize(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x2B, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
@ -627,7 +627,7 @@ void Y2R_U::DriverInitialize(Kernel::HLERequestContext& ctx) {
}
void Y2R_U::DriverFinalize(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x2C, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
@ -636,7 +636,7 @@ void Y2R_U::DriverFinalize(Kernel::HLERequestContext& ctx) {
}
void Y2R_U::GetPackageParameter(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x2D, 0, 0);
IPC::RequestParser rp(ctx);
IPC::RequestBuilder rb = rp.MakeBuilder(4, 0);
rb.Push(RESULT_SUCCESS);
@ -648,51 +648,51 @@ void Y2R_U::GetPackageParameter(Kernel::HLERequestContext& ctx) {
Y2R_U::Y2R_U(Core::System& system) : ServiceFramework("y2r:u", 1), system(system) {
static const FunctionInfo functions[] = {
// clang-format off
{IPC::MakeHeader(0x0001, 1, 0), &Y2R_U::SetInputFormat, "SetInputFormat"},
{IPC::MakeHeader(0x0002, 0, 0), &Y2R_U::GetInputFormat, "GetInputFormat"},
{IPC::MakeHeader(0x0003, 1, 0), &Y2R_U::SetOutputFormat, "SetOutputFormat"},
{IPC::MakeHeader(0x0004, 0, 0), &Y2R_U::GetOutputFormat, "GetOutputFormat"},
{IPC::MakeHeader(0x0005, 1, 0), &Y2R_U::SetRotation, "SetRotation"},
{IPC::MakeHeader(0x0006, 0, 0), &Y2R_U::GetRotation, "GetRotation"},
{IPC::MakeHeader(0x0007, 1, 0), &Y2R_U::SetBlockAlignment, "SetBlockAlignment"},
{IPC::MakeHeader(0x0008, 0, 0), &Y2R_U::GetBlockAlignment, "GetBlockAlignment"},
{IPC::MakeHeader(0x0009, 1, 0), &Y2R_U::SetSpacialDithering, "SetSpacialDithering"},
{IPC::MakeHeader(0x000A, 0, 0), &Y2R_U::GetSpacialDithering, "GetSpacialDithering"},
{IPC::MakeHeader(0x000B, 1, 0), &Y2R_U::SetTemporalDithering, "SetTemporalDithering"},
{IPC::MakeHeader(0x000C, 0, 0), &Y2R_U::GetTemporalDithering, "GetTemporalDithering"},
{IPC::MakeHeader(0x000D, 1, 0), &Y2R_U::SetTransferEndInterrupt, "SetTransferEndInterrupt"},
{IPC::MakeHeader(0x000E, 0, 0), &Y2R_U::GetTransferEndInterrupt, "GetTransferEndInterrupt"},
{IPC::MakeHeader(0x000F, 0, 0), &Y2R_U::GetTransferEndEvent, "GetTransferEndEvent"},
{IPC::MakeHeader(0x0010, 4, 2), &Y2R_U::SetSendingY, "SetSendingY"},
{IPC::MakeHeader(0x0011, 4, 2), &Y2R_U::SetSendingU, "SetSendingU"},
{IPC::MakeHeader(0x0012, 4, 2), &Y2R_U::SetSendingV, "SetSendingV"},
{IPC::MakeHeader(0x0013, 4, 2), &Y2R_U::SetSendingYUYV, "SetSendingYUYV"},
{IPC::MakeHeader(0x0014, 0, 0), &Y2R_U::IsFinishedSendingYuv, "IsFinishedSendingYuv"},
{IPC::MakeHeader(0x0015, 0, 0), &Y2R_U::IsFinishedSendingY, "IsFinishedSendingY"},
{IPC::MakeHeader(0x0016, 0, 0), &Y2R_U::IsFinishedSendingU, "IsFinishedSendingU"},
{IPC::MakeHeader(0x0017, 0, 0), &Y2R_U::IsFinishedSendingV, "IsFinishedSendingV"},
{IPC::MakeHeader(0x0018, 4, 2), &Y2R_U::SetReceiving, "SetReceiving"},
{IPC::MakeHeader(0x0019, 0, 0), &Y2R_U::IsFinishedReceiving, "IsFinishedReceiving"},
{IPC::MakeHeader(0x001A, 1, 0), &Y2R_U::SetInputLineWidth, "SetInputLineWidth"},
{IPC::MakeHeader(0x001B, 0, 0), &Y2R_U::GetInputLineWidth, "GetInputLineWidth"},
{IPC::MakeHeader(0x001C, 1, 0), &Y2R_U::SetInputLines, "SetInputLines"},
{IPC::MakeHeader(0x001D, 0, 0), &Y2R_U::GetInputLines, "GetInputLines"},
{IPC::MakeHeader(0x001E, 4, 0), &Y2R_U::SetCoefficient, "SetCoefficient"},
{IPC::MakeHeader(0x001F, 0, 0), &Y2R_U::GetCoefficient, "GetCoefficient"},
{IPC::MakeHeader(0x0020, 1, 0), &Y2R_U::SetStandardCoefficient, "SetStandardCoefficient"},
{IPC::MakeHeader(0x0021, 1, 0), &Y2R_U::GetStandardCoefficient, "GetStandardCoefficient"},
{IPC::MakeHeader(0x0022, 1, 0), &Y2R_U::SetAlpha, "SetAlpha"},
{IPC::MakeHeader(0x0023, 0, 0), &Y2R_U::GetAlpha, "GetAlpha"},
{IPC::MakeHeader(0x0024, 8, 0), &Y2R_U::SetDitheringWeightParams, "SetDitheringWeightParams"},
{IPC::MakeHeader(0x0025, 0, 0), &Y2R_U::GetDitheringWeightParams, "GetDitheringWeightParams"},
{IPC::MakeHeader(0x0026, 0, 0), &Y2R_U::StartConversion, "StartConversion"},
{IPC::MakeHeader(0x0027, 0, 0), &Y2R_U::StopConversion, "StopConversion"},
{IPC::MakeHeader(0x0028, 0, 0), &Y2R_U::IsBusyConversion, "IsBusyConversion"},
{IPC::MakeHeader(0x0029, 7, 0), &Y2R_U::SetPackageParameter, "SetPackageParameter"},
{IPC::MakeHeader(0x002A, 0, 0), &Y2R_U::PingProcess, "PingProcess"},
{IPC::MakeHeader(0x002B, 0, 0), &Y2R_U::DriverInitialize, "DriverInitialize"},
{IPC::MakeHeader(0x002C, 0, 0), &Y2R_U::DriverFinalize, "DriverFinalize"},
{IPC::MakeHeader(0x002D, 0, 0), &Y2R_U::GetPackageParameter, "GetPackageParameter"},
{0x0001, &Y2R_U::SetInputFormat, "SetInputFormat"},
{0x0002, &Y2R_U::GetInputFormat, "GetInputFormat"},
{0x0003, &Y2R_U::SetOutputFormat, "SetOutputFormat"},
{0x0004, &Y2R_U::GetOutputFormat, "GetOutputFormat"},
{0x0005, &Y2R_U::SetRotation, "SetRotation"},
{0x0006, &Y2R_U::GetRotation, "GetRotation"},
{0x0007, &Y2R_U::SetBlockAlignment, "SetBlockAlignment"},
{0x0008, &Y2R_U::GetBlockAlignment, "GetBlockAlignment"},
{0x0009, &Y2R_U::SetSpacialDithering, "SetSpacialDithering"},
{0x000A, &Y2R_U::GetSpacialDithering, "GetSpacialDithering"},
{0x000B, &Y2R_U::SetTemporalDithering, "SetTemporalDithering"},
{0x000C, &Y2R_U::GetTemporalDithering, "GetTemporalDithering"},
{0x000D, &Y2R_U::SetTransferEndInterrupt, "SetTransferEndInterrupt"},
{0x000E, &Y2R_U::GetTransferEndInterrupt, "GetTransferEndInterrupt"},
{0x000F, &Y2R_U::GetTransferEndEvent, "GetTransferEndEvent"},
{0x0010, &Y2R_U::SetSendingY, "SetSendingY"},
{0x0011, &Y2R_U::SetSendingU, "SetSendingU"},
{0x0012, &Y2R_U::SetSendingV, "SetSendingV"},
{0x0013, &Y2R_U::SetSendingYUYV, "SetSendingYUYV"},
{0x0014, &Y2R_U::IsFinishedSendingYuv, "IsFinishedSendingYuv"},
{0x0015, &Y2R_U::IsFinishedSendingY, "IsFinishedSendingY"},
{0x0016, &Y2R_U::IsFinishedSendingU, "IsFinishedSendingU"},
{0x0017, &Y2R_U::IsFinishedSendingV, "IsFinishedSendingV"},
{0x0018, &Y2R_U::SetReceiving, "SetReceiving"},
{0x0019, &Y2R_U::IsFinishedReceiving, "IsFinishedReceiving"},
{0x001A, &Y2R_U::SetInputLineWidth, "SetInputLineWidth"},
{0x001B, &Y2R_U::GetInputLineWidth, "GetInputLineWidth"},
{0x001C, &Y2R_U::SetInputLines, "SetInputLines"},
{0x001D, &Y2R_U::GetInputLines, "GetInputLines"},
{0x001E, &Y2R_U::SetCoefficient, "SetCoefficient"},
{0x001F, &Y2R_U::GetCoefficient, "GetCoefficient"},
{0x0020, &Y2R_U::SetStandardCoefficient, "SetStandardCoefficient"},
{0x0021, &Y2R_U::GetStandardCoefficient, "GetStandardCoefficient"},
{0x0022, &Y2R_U::SetAlpha, "SetAlpha"},
{0x0023, &Y2R_U::GetAlpha, "GetAlpha"},
{0x0024, &Y2R_U::SetDitheringWeightParams, "SetDitheringWeightParams"},
{0x0025, &Y2R_U::GetDitheringWeightParams, "GetDitheringWeightParams"},
{0x0026, &Y2R_U::StartConversion, "StartConversion"},
{0x0027, &Y2R_U::StopConversion, "StopConversion"},
{0x0028, &Y2R_U::IsBusyConversion, "IsBusyConversion"},
{0x0029, &Y2R_U::SetPackageParameter, "SetPackageParameter"},
{0x002A, &Y2R_U::PingProcess, "PingProcess"},
{0x002B, &Y2R_U::DriverInitialize, "DriverInitialize"},
{0x002C, &Y2R_U::DriverFinalize, "DriverFinalize"},
{0x002D, &Y2R_U::GetPackageParameter, "GetPackageParameter"},
// clang-format on
};
RegisterHandlers(functions);