diff --git a/src/core/hle/service/fs/fs_user.cpp b/src/core/hle/service/fs/fs_user.cpp index cf9a74a041..9da46b7b74 100644 --- a/src/core/hle/service/fs/fs_user.cpp +++ b/src/core/hle/service/fs/fs_user.cpp @@ -334,6 +334,24 @@ void FS_USER::OpenArchive(Kernel::HLERequestContext& ctx) { } } +void FS_USER::ControlArchive(Kernel::HLERequestContext& ctx) { + IPC::RequestParser rp(ctx); + const auto archive_handle = rp.PopRaw(); + const auto action = rp.Pop(); + const auto input_size = rp.Pop(); + const auto output_size = rp.Pop(); + [[maybe_unused]] const auto input = rp.PopMappedBuffer(); + [[maybe_unused]] const auto output = rp.PopMappedBuffer(); + + LOG_WARNING(Service_FS, + "(STUBBED) called, archive_handle={:016X}, action={:08X}, input_size={:08X}, " + "output_size={:08X}", + archive_handle, action, input_size, output_size); + + IPC::RequestBuilder rb = rp.MakeBuilder(1, 0); + rb.Push(RESULT_SUCCESS); +} + void FS_USER::CloseArchive(Kernel::HLERequestContext& ctx) { IPC::RequestParser rp(ctx); const auto archive_handle = rp.PopRaw(); @@ -1010,7 +1028,7 @@ FS_USER::FS_USER(Core::System& system) {0x080A, &FS_USER::RenameDirectory, "RenameDirectory"}, {0x080B, &FS_USER::OpenDirectory, "OpenDirectory"}, {0x080C, &FS_USER::OpenArchive, "OpenArchive"}, - {0x080D, nullptr, "ControlArchive"}, + {0x080D, &FS_USER::ControlArchive, "ControlArchive"}, {0x080E, &FS_USER::CloseArchive, "CloseArchive"}, {0x080F, &FS_USER::FormatThisUserSaveData, "FormatThisUserSaveData"}, {0x0810, &FS_USER::CreateLegacySystemSaveData, "CreateLegacySystemSaveData"}, diff --git a/src/core/hle/service/fs/fs_user.h b/src/core/hle/service/fs/fs_user.h index 52f3b9a3e4..f3cdd2b410 100644 --- a/src/core/hle/service/fs/fs_user.h +++ b/src/core/hle/service/fs/fs_user.h @@ -262,6 +262,22 @@ private: */ void OpenArchive(Kernel::HLERequestContext& ctx); + /** + * FS_User::ControlArchive service function + * Inputs: + * 1-2 : Archive Handle + * 3 : Action + * 4 : Input Size + * 5 : Output Size + * 6 : (Input Size << 4) | 0xA + * 7 : Input Pointer + * 8 : (Output Size << 4) | 0xC + * 9 : Output Pointer + * Outputs: + * 1 : Result of function, 0 on success, otherwise error code + */ + void ControlArchive(Kernel::HLERequestContext& ctx); + /** * FS_User::CloseArchive service function * Inputs: