From 07581a2161c942355692b238bc8429d3b18270fa Mon Sep 17 00:00:00 2001 From: JPikachu Date: Thu, 21 Aug 2025 23:57:15 +0100 Subject: [PATCH 1/2] =?UTF-8?q?[service,=20ns,=20acc]=20Stub=20IsQualifica?= =?UTF-8?q?tionTransitionSupportedByProcessId=20and=20SaveDataThumbnail=20?= =?UTF-8?q?commands=20-=20ns:=20Stubbed=20IsQualificationTransitionSupport?= =?UTF-8?q?edByProcessId=20(2520)=20to=20always=20return=20true.=20-=20acc?= =?UTF-8?q?:=20added=20the=20missing=20SaveDataThumbnail=20commands:=20=20?= =?UTF-8?q?=20*=20ClearSaveDataThumbnail=20(111)=20=E2=86=92=20stubbed,=20?= =?UTF-8?q?returns=20success.=20=20=20*=20LoadSaveDataThumbnail=20(112)=20?= =?UTF-8?q?=E2=86=92=20stubbed,=20returns=20success=20with=20size=3D0.=20?= =?UTF-8?q?=20=20*=20GetSaveDataThumbnailExistence=20(113)=20=E2=86=92=20s?= =?UTF-8?q?tubbed,=20returns=20false.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This allows titles like Borderlands GOTY to progress past save-related errors. --- src/core/hle/service/acc/acc.cpp | 30 +++++++++++++++++++ src/core/hle/service/acc/acc.h | 3 ++ src/core/hle/service/acc/acc_su.cpp | 6 ++-- src/core/hle/service/acc/acc_u0.cpp | 5 +++- src/core/hle/service/acc/acc_u1.cpp | 9 ++++-- .../ns/application_manager_interface.cpp | 9 +++++- .../ns/application_manager_interface.h | 1 + 7 files changed, 55 insertions(+), 8 deletions(-) diff --git a/src/core/hle/service/acc/acc.cpp b/src/core/hle/service/acc/acc.cpp index 51a542e5e6..0e78ff0071 100644 --- a/src/core/hle/service/acc/acc.cpp +++ b/src/core/hle/service/acc/acc.cpp @@ -1108,6 +1108,36 @@ void Module::Interface::StoreSaveDataThumbnail(HLERequestContext& ctx, const Com rb.Push(ResultSuccess); } +void Module::Interface::ClearSaveDataThumbnail(HLERequestContext& ctx) { + LOG_WARNING(Service_ACC, "(STUBBED) called"); + + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(ResultSuccess); +} + +void Module::Interface::LoadSaveDataThumbnail(HLERequestContext& ctx) { + const auto out_size = ctx.GetWriteBufferSize(); + + LOG_WARNING(Service_ACC, "(STUBBED) called. out_size={}", out_size); + + if (out_size > 0) { + std::vector dummy(out_size, 0); + ctx.WriteBuffer(dummy.data(), dummy.size()); + } + + IPC::ResponseBuilder rb{ctx, 3}; + rb.Push(ResultSuccess); + rb.Push(0); +} + +void Module::Interface::GetSaveDataThumbnailExistence(HLERequestContext& ctx) { + LOG_WARNING(Service_ACC, "(STUBBED) called. Returning false."); + + IPC::ResponseBuilder rb{ctx, 3}; + rb.Push(ResultSuccess); + rb.Push(false); +} + void Module::Interface::TrySelectUserWithoutInteractionDeprecated(HLERequestContext& ctx) { LOG_DEBUG(Service_ACC, "called"); // A u8 is passed into this function which we can safely ignore. It's to determine if we have diff --git a/src/core/hle/service/acc/acc.h b/src/core/hle/service/acc/acc.h index e64a67674f..9b22f0933b 100644 --- a/src/core/hle/service/acc/acc.h +++ b/src/core/hle/service/acc/acc.h @@ -47,6 +47,9 @@ public: void StoreSaveDataThumbnailApplication(HLERequestContext& ctx); void GetBaasAccountManagerForSystemService(HLERequestContext& ctx); void StoreSaveDataThumbnailSystem(HLERequestContext& ctx); + void ClearSaveDataThumbnail(HLERequestContext& ctx); + void LoadSaveDataThumbnail(HLERequestContext& ctx); + void GetSaveDataThumbnailExistence(HLERequestContext& ctx); private: Result InitializeApplicationInfoBase(); diff --git a/src/core/hle/service/acc/acc_su.cpp b/src/core/hle/service/acc/acc_su.cpp index 7d07ea0343..fe2aa71ae3 100644 --- a/src/core/hle/service/acc/acc_su.cpp +++ b/src/core/hle/service/acc/acc_su.cpp @@ -33,9 +33,9 @@ ACC_SU::ACC_SU(std::shared_ptr module_, std::shared_ptr {105, nullptr, "CheckNetworkServiceAvailabilityAsync"}, {106, nullptr, "GetProfileSyncNotifier"}, {110, &ACC_SU::StoreSaveDataThumbnailSystem, "StoreSaveDataThumbnail"}, - {111, nullptr, "ClearSaveDataThumbnail"}, - {112, nullptr, "LoadSaveDataThumbnail"}, - {113, nullptr, "GetSaveDataThumbnailExistence"}, + {111, &ACC_SU::ClearSaveDataThumbnail, "ClearSaveDataThumbnail"}, + {112, &ACC_SU::LoadSaveDataThumbnail, "LoadSaveDataThumbnail"}, + {113, &ACC_SU::GetSaveDataThumbnailExistence, "GetSaveDataThumbnailExistence"}, {120, nullptr, "ListOpenUsersInApplication"}, {130, nullptr, "ActivateOpenContextRetention"}, {140, &ACC_SU::ListQualifiedUsers, "ListQualifiedUsers"}, diff --git a/src/core/hle/service/acc/acc_u0.cpp b/src/core/hle/service/acc/acc_u0.cpp index 54844bfe7d..e90bb35d77 100644 --- a/src/core/hle/service/acc/acc_u0.cpp +++ b/src/core/hle/service/acc/acc_u0.cpp @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later @@ -26,7 +29,7 @@ ACC_U0::ACC_U0(std::shared_ptr module_, std::shared_ptr {102, nullptr, "AuthenticateApplicationAsync"}, {103, nullptr, "CheckNetworkServiceAvailabilityAsync"}, // 4.0.0+ {110, &ACC_U0::StoreSaveDataThumbnailApplication, "StoreSaveDataThumbnail"}, - {111, nullptr, "ClearSaveDataThumbnail"}, + {111, &ACC_U0::ClearSaveDataThumbnail, "ClearSaveDataThumbnail"}, {120, nullptr, "CreateGuestLoginRequest"}, {130, nullptr, "LoadOpenContext"}, // 5.0.0+ {131, &ACC_U0::ListOpenContextStoredUsers, "ListOpenContextStoredUsers"}, // 6.0.0+ diff --git a/src/core/hle/service/acc/acc_u1.cpp b/src/core/hle/service/acc/acc_u1.cpp index 3832f5216d..360a920c9c 100644 --- a/src/core/hle/service/acc/acc_u1.cpp +++ b/src/core/hle/service/acc/acc_u1.cpp @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later @@ -29,9 +32,9 @@ ACC_U1::ACC_U1(std::shared_ptr module_, std::shared_ptr {105, nullptr, "CheckNetworkServiceAvailabilityAsync"}, {106, nullptr, "GetProfileSyncNotifier"}, {110, &ACC_U1::StoreSaveDataThumbnailApplication, "StoreSaveDataThumbnail"}, - {111, nullptr, "ClearSaveDataThumbnail"}, - {112, nullptr, "LoadSaveDataThumbnail"}, - {113, nullptr, "GetSaveDataThumbnailExistence"}, + {111, &ACC_U1::ClearSaveDataThumbnail, "ClearSaveDataThumbnail"}, + {112, &ACC_U1::LoadSaveDataThumbnail, "LoadSaveDataThumbnail"}, + {113, &ACC_U1::GetSaveDataThumbnailExistence, "GetSaveDataThumbnailExistence"}, {120, nullptr, "ListOpenUsersInApplication"}, {130, nullptr, "ActivateOpenContextRetention"}, {140, &ACC_U1::ListQualifiedUsers, "ListQualifiedUsers"}, diff --git a/src/core/hle/service/ns/application_manager_interface.cpp b/src/core/hle/service/ns/application_manager_interface.cpp index f1ddba8231..afe3d889f2 100644 --- a/src/core/hle/service/ns/application_manager_interface.cpp +++ b/src/core/hle/service/ns/application_manager_interface.cpp @@ -286,7 +286,7 @@ IApplicationManagerInterface::IApplicationManagerInterface(Core::System& system_ {2517, nullptr, "CreateApplicationInstance"}, {2518, nullptr, "UpdateQualificationForDebug"}, {2519, nullptr, "IsQualificationTransitionSupported"}, - {2520, nullptr, "IsQualificationTransitionSupportedByProcessId"}, + {2520, D<&IApplicationManagerInterface::IsQualificationTransitionSupportedByProcessId>,"IsQualificationTransitionSupportedByProcessId"}, {2521, nullptr, "GetRightsUserChangedEvent"}, {2522, nullptr, "IsRomRedirectionAvailable"}, {2800, nullptr, "GetApplicationIdOfPreomia"}, @@ -523,4 +523,11 @@ Result IApplicationManagerInterface::GetApplicationTerminateResult(Out o R_SUCCEED(); } +Result IApplicationManagerInterface::IsQualificationTransitionSupportedByProcessId( + Out out_is_supported, u64 process_id) { + LOG_WARNING(Service_NS, "(STUBBED) called. process_id={:016X}", process_id); + *out_is_supported = true; + R_SUCCEED(); +} + } // namespace Service::NS diff --git a/src/core/hle/service/ns/application_manager_interface.h b/src/core/hle/service/ns/application_manager_interface.h index 2def50bd5c..b5cbd9c54b 100644 --- a/src/core/hle/service/ns/application_manager_interface.h +++ b/src/core/hle/service/ns/application_manager_interface.h @@ -53,6 +53,7 @@ public: u64 application_id); Result CheckApplicationLaunchVersion(u64 application_id); Result GetApplicationTerminateResult(Out out_result, u64 application_id); + Result IsQualificationTransitionSupportedByProcessId(Out out_is_supported, u64 process_id); private: KernelHelpers::ServiceContext service_context; From 3b18de150e6d795d074726b357ef47cc9afdeb01 Mon Sep 17 00:00:00 2001 From: JPikachu Date: Thu, 21 Aug 2025 23:57:15 +0100 Subject: [PATCH 2/2] =?UTF-8?q?[service,=20ns,=20acc]=20Stub=20IsQualifica?= =?UTF-8?q?tionTransitionSupportedByProcessId=20and=20SaveDataThumbnail=20?= =?UTF-8?q?commands=20-=20ns:=20Stubbed=20IsQualificationTransitionSupport?= =?UTF-8?q?edByProcessId=20(2520)=20to=20always=20return=20true.=20-=20acc?= =?UTF-8?q?:=20added=20the=20missing=20SaveDataThumbnail=20commands:=20=20?= =?UTF-8?q?=20*=20ClearSaveDataThumbnail=20(111)=20=E2=86=92=20stubbed,=20?= =?UTF-8?q?returns=20success.=20=20=20*=20LoadSaveDataThumbnail=20(112)=20?= =?UTF-8?q?=E2=86=92=20stubbed,=20returns=20success=20with=20size=3D0.=20?= =?UTF-8?q?=20=20*=20GetSaveDataThumbnailExistence=20(113)=20=E2=86=92=20s?= =?UTF-8?q?tubbed,=20returns=20false.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This allows titles like Borderlands GOTY to progress past save-related errors. --- src/core/hle/service/acc/acc.cpp | 29 +++++++++++++++++++ src/core/hle/service/acc/acc.h | 3 ++ src/core/hle/service/acc/acc_su.cpp | 6 ++-- src/core/hle/service/acc/acc_u0.cpp | 5 +++- src/core/hle/service/acc/acc_u1.cpp | 9 ++++-- .../ns/application_manager_interface.cpp | 9 +++++- .../ns/application_manager_interface.h | 1 + 7 files changed, 54 insertions(+), 8 deletions(-) diff --git a/src/core/hle/service/acc/acc.cpp b/src/core/hle/service/acc/acc.cpp index 51a542e5e6..0722df379d 100644 --- a/src/core/hle/service/acc/acc.cpp +++ b/src/core/hle/service/acc/acc.cpp @@ -1108,6 +1108,35 @@ void Module::Interface::StoreSaveDataThumbnail(HLERequestContext& ctx, const Com rb.Push(ResultSuccess); } +void Module::Interface::ClearSaveDataThumbnail(HLERequestContext& ctx) { + LOG_WARNING(Service_ACC, "(STUBBED) called"); + + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(ResultSuccess); +} + +void Module::Interface::LoadSaveDataThumbnail(HLERequestContext& ctx) { + // TODO: Grab thumbnail from Nand so this can be unstubbed + // For now, pretend a thumbnail exists and return dummy data + std::vector dummy_thumbnail(THUMBNAIL_SIZE, 0); + ctx.WriteBuffer(dummy_thumbnail); + + LOG_WARNING(Service_ACC, "(STUBBED) called. returning dummy thumbnail"); + + IPC::ResponseBuilder rb{ctx, 3}; + rb.Push(ResultSuccess); + rb.Push(THUMBNAIL_SIZE); +} + +void Module::Interface::GetSaveDataThumbnailExistence(HLERequestContext& ctx) { + // TODO: Get actual thumbnail image + LOG_WARNING(Service_ACC, "(STUBBED) called. Returning true (dummy thumbnail)"); + + IPC::ResponseBuilder rb{ctx, 3}; + rb.Push(ResultSuccess); + rb.Push(true); +} + void Module::Interface::TrySelectUserWithoutInteractionDeprecated(HLERequestContext& ctx) { LOG_DEBUG(Service_ACC, "called"); // A u8 is passed into this function which we can safely ignore. It's to determine if we have diff --git a/src/core/hle/service/acc/acc.h b/src/core/hle/service/acc/acc.h index e64a67674f..9b22f0933b 100644 --- a/src/core/hle/service/acc/acc.h +++ b/src/core/hle/service/acc/acc.h @@ -47,6 +47,9 @@ public: void StoreSaveDataThumbnailApplication(HLERequestContext& ctx); void GetBaasAccountManagerForSystemService(HLERequestContext& ctx); void StoreSaveDataThumbnailSystem(HLERequestContext& ctx); + void ClearSaveDataThumbnail(HLERequestContext& ctx); + void LoadSaveDataThumbnail(HLERequestContext& ctx); + void GetSaveDataThumbnailExistence(HLERequestContext& ctx); private: Result InitializeApplicationInfoBase(); diff --git a/src/core/hle/service/acc/acc_su.cpp b/src/core/hle/service/acc/acc_su.cpp index 7d07ea0343..fe2aa71ae3 100644 --- a/src/core/hle/service/acc/acc_su.cpp +++ b/src/core/hle/service/acc/acc_su.cpp @@ -33,9 +33,9 @@ ACC_SU::ACC_SU(std::shared_ptr module_, std::shared_ptr {105, nullptr, "CheckNetworkServiceAvailabilityAsync"}, {106, nullptr, "GetProfileSyncNotifier"}, {110, &ACC_SU::StoreSaveDataThumbnailSystem, "StoreSaveDataThumbnail"}, - {111, nullptr, "ClearSaveDataThumbnail"}, - {112, nullptr, "LoadSaveDataThumbnail"}, - {113, nullptr, "GetSaveDataThumbnailExistence"}, + {111, &ACC_SU::ClearSaveDataThumbnail, "ClearSaveDataThumbnail"}, + {112, &ACC_SU::LoadSaveDataThumbnail, "LoadSaveDataThumbnail"}, + {113, &ACC_SU::GetSaveDataThumbnailExistence, "GetSaveDataThumbnailExistence"}, {120, nullptr, "ListOpenUsersInApplication"}, {130, nullptr, "ActivateOpenContextRetention"}, {140, &ACC_SU::ListQualifiedUsers, "ListQualifiedUsers"}, diff --git a/src/core/hle/service/acc/acc_u0.cpp b/src/core/hle/service/acc/acc_u0.cpp index 54844bfe7d..e90bb35d77 100644 --- a/src/core/hle/service/acc/acc_u0.cpp +++ b/src/core/hle/service/acc/acc_u0.cpp @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later @@ -26,7 +29,7 @@ ACC_U0::ACC_U0(std::shared_ptr module_, std::shared_ptr {102, nullptr, "AuthenticateApplicationAsync"}, {103, nullptr, "CheckNetworkServiceAvailabilityAsync"}, // 4.0.0+ {110, &ACC_U0::StoreSaveDataThumbnailApplication, "StoreSaveDataThumbnail"}, - {111, nullptr, "ClearSaveDataThumbnail"}, + {111, &ACC_U0::ClearSaveDataThumbnail, "ClearSaveDataThumbnail"}, {120, nullptr, "CreateGuestLoginRequest"}, {130, nullptr, "LoadOpenContext"}, // 5.0.0+ {131, &ACC_U0::ListOpenContextStoredUsers, "ListOpenContextStoredUsers"}, // 6.0.0+ diff --git a/src/core/hle/service/acc/acc_u1.cpp b/src/core/hle/service/acc/acc_u1.cpp index 3832f5216d..360a920c9c 100644 --- a/src/core/hle/service/acc/acc_u1.cpp +++ b/src/core/hle/service/acc/acc_u1.cpp @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later @@ -29,9 +32,9 @@ ACC_U1::ACC_U1(std::shared_ptr module_, std::shared_ptr {105, nullptr, "CheckNetworkServiceAvailabilityAsync"}, {106, nullptr, "GetProfileSyncNotifier"}, {110, &ACC_U1::StoreSaveDataThumbnailApplication, "StoreSaveDataThumbnail"}, - {111, nullptr, "ClearSaveDataThumbnail"}, - {112, nullptr, "LoadSaveDataThumbnail"}, - {113, nullptr, "GetSaveDataThumbnailExistence"}, + {111, &ACC_U1::ClearSaveDataThumbnail, "ClearSaveDataThumbnail"}, + {112, &ACC_U1::LoadSaveDataThumbnail, "LoadSaveDataThumbnail"}, + {113, &ACC_U1::GetSaveDataThumbnailExistence, "GetSaveDataThumbnailExistence"}, {120, nullptr, "ListOpenUsersInApplication"}, {130, nullptr, "ActivateOpenContextRetention"}, {140, &ACC_U1::ListQualifiedUsers, "ListQualifiedUsers"}, diff --git a/src/core/hle/service/ns/application_manager_interface.cpp b/src/core/hle/service/ns/application_manager_interface.cpp index f1ddba8231..afe3d889f2 100644 --- a/src/core/hle/service/ns/application_manager_interface.cpp +++ b/src/core/hle/service/ns/application_manager_interface.cpp @@ -286,7 +286,7 @@ IApplicationManagerInterface::IApplicationManagerInterface(Core::System& system_ {2517, nullptr, "CreateApplicationInstance"}, {2518, nullptr, "UpdateQualificationForDebug"}, {2519, nullptr, "IsQualificationTransitionSupported"}, - {2520, nullptr, "IsQualificationTransitionSupportedByProcessId"}, + {2520, D<&IApplicationManagerInterface::IsQualificationTransitionSupportedByProcessId>,"IsQualificationTransitionSupportedByProcessId"}, {2521, nullptr, "GetRightsUserChangedEvent"}, {2522, nullptr, "IsRomRedirectionAvailable"}, {2800, nullptr, "GetApplicationIdOfPreomia"}, @@ -523,4 +523,11 @@ Result IApplicationManagerInterface::GetApplicationTerminateResult(Out o R_SUCCEED(); } +Result IApplicationManagerInterface::IsQualificationTransitionSupportedByProcessId( + Out out_is_supported, u64 process_id) { + LOG_WARNING(Service_NS, "(STUBBED) called. process_id={:016X}", process_id); + *out_is_supported = true; + R_SUCCEED(); +} + } // namespace Service::NS diff --git a/src/core/hle/service/ns/application_manager_interface.h b/src/core/hle/service/ns/application_manager_interface.h index 2def50bd5c..b5cbd9c54b 100644 --- a/src/core/hle/service/ns/application_manager_interface.h +++ b/src/core/hle/service/ns/application_manager_interface.h @@ -53,6 +53,7 @@ public: u64 application_id); Result CheckApplicationLaunchVersion(u64 application_id); Result GetApplicationTerminateResult(Out out_result, u64 application_id); + Result IsQualificationTransitionSupportedByProcessId(Out out_is_supported, u64 process_id); private: KernelHelpers::ServiceContext service_context;