mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-08-15 13:16:43 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f76174bd2a | |||
| 26c761736b | |||
| 66a45785ab | |||
| 1c54b78734 |
+1
@@ -30,6 +30,7 @@ enum class BooleanSetting(override val key: String) : AbstractBooleanSetting {
|
|||||||
RENDERER_REACTIVE_FLUSHING("use_reactive_flushing"),
|
RENDERER_REACTIVE_FLUSHING("use_reactive_flushing"),
|
||||||
ENABLE_BUFFER_HISTORY("enable_buffer_history"),
|
ENABLE_BUFFER_HISTORY("enable_buffer_history"),
|
||||||
USE_OPTIMIZED_VERTEX_BUFFERS("use_optimized_vertex_buffers"),
|
USE_OPTIMIZED_VERTEX_BUFFERS("use_optimized_vertex_buffers"),
|
||||||
|
ENABLE_GPU_BUFFER_READBACK("enable_gpu_buffer_readback"),
|
||||||
SYNC_MEMORY_OPERATIONS("sync_memory_operations"),
|
SYNC_MEMORY_OPERATIONS("sync_memory_operations"),
|
||||||
BUFFER_REORDER_DISABLE("disable_buffer_reorder"),
|
BUFFER_REORDER_DISABLE("disable_buffer_reorder"),
|
||||||
RENDERER_DEBUG("debug"),
|
RENDERER_DEBUG("debug"),
|
||||||
|
|||||||
+7
@@ -808,6 +808,13 @@ abstract class SettingsItem(
|
|||||||
descriptionId = R.string.enable_buffer_history_description
|
descriptionId = R.string.enable_buffer_history_description
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
put(
|
||||||
|
SwitchSetting(
|
||||||
|
BooleanSetting.ENABLE_GPU_BUFFER_READBACK,
|
||||||
|
titleId = R.string.enable_gpu_buffer_readback,
|
||||||
|
descriptionId = R.string.enable_gpu_buffer_readback_description
|
||||||
|
)
|
||||||
|
)
|
||||||
put(
|
put(
|
||||||
SwitchSetting(
|
SwitchSetting(
|
||||||
BooleanSetting.USE_OPTIMIZED_VERTEX_BUFFERS,
|
BooleanSetting.USE_OPTIMIZED_VERTEX_BUFFERS,
|
||||||
|
|||||||
+1
@@ -294,6 +294,7 @@ class SettingsFragmentPresenter(
|
|||||||
add(BooleanSetting.RENDERER_FORCE_MAX_CLOCK.key)
|
add(BooleanSetting.RENDERER_FORCE_MAX_CLOCK.key)
|
||||||
add(BooleanSetting.RENDERER_REACTIVE_FLUSHING.key)
|
add(BooleanSetting.RENDERER_REACTIVE_FLUSHING.key)
|
||||||
add(BooleanSetting.ENABLE_BUFFER_HISTORY.key)
|
add(BooleanSetting.ENABLE_BUFFER_HISTORY.key)
|
||||||
|
add(BooleanSetting.ENABLE_GPU_BUFFER_READBACK.key)
|
||||||
add(BooleanSetting.USE_OPTIMIZED_VERTEX_BUFFERS.key)
|
add(BooleanSetting.USE_OPTIMIZED_VERTEX_BUFFERS.key)
|
||||||
|
|
||||||
add(HeaderSetting(R.string.hacks))
|
add(HeaderSetting(R.string.hacks))
|
||||||
|
|||||||
@@ -499,6 +499,8 @@
|
|||||||
<string name="renderer_reactive_flushing_description">يحسن دقة العرض في بعض الألعاب على حساب الأداء.</string>
|
<string name="renderer_reactive_flushing_description">يحسن دقة العرض في بعض الألعاب على حساب الأداء.</string>
|
||||||
<string name="enable_buffer_history">تمكين سجل التخزين المؤقت</string>
|
<string name="enable_buffer_history">تمكين سجل التخزين المؤقت</string>
|
||||||
<string name="enable_buffer_history_description">يُتيح هذا الخيار الوصول إلى حالات التخزين المؤقت السابقة. وقد يُحسّن جودة العرض وثبات الأداء في بعض الألعاب.</string>
|
<string name="enable_buffer_history_description">يُتيح هذا الخيار الوصول إلى حالات التخزين المؤقت السابقة. وقد يُحسّن جودة العرض وثبات الأداء في بعض الألعاب.</string>
|
||||||
|
<string name="enable_gpu_buffer_readback">تفعيل قراءة مخزن وحدة معالجة الرسومات</string>
|
||||||
|
<string name="enable_gpu_buffer_readback_description">يحافظ هذا النظام على بيانات المخزن المؤقت المُعدّلة بواسطة وحدة معالجة الرسومات عن طريق قراءتها مرة أخرى قبل التحميل. تتطلب بعض الألعاب ذلك لعرض بعض التأثيرات بشكل صحيح. قد يُسبب ذلك مشاكل إذا لم يتمكن الجهاز من التعامل مع عبء العمل الإضافي.</string>
|
||||||
<string name="use_optimized_vertex_buffers">مخازن الرؤوس المُحسّنة</string>
|
<string name="use_optimized_vertex_buffers">مخازن الرؤوس المُحسّنة</string>
|
||||||
<string name="use_optimized_vertex_buffers_description">يُتيح ربطًا مُحسَّنًا لمخازن الرؤوس لتحسين الأداء. يتطلب برامج تشغيل Mesa 26.0+ Turnip/ برامج تشغيل QCOM. قد يتعطل على برامج تشغيل Turnip القديمة (25.3 وما دون).</string>
|
<string name="use_optimized_vertex_buffers_description">يُتيح ربطًا مُحسَّنًا لمخازن الرؤوس لتحسين الأداء. يتطلب برامج تشغيل Mesa 26.0+ Turnip/ برامج تشغيل QCOM. قد يتعطل على برامج تشغيل Turnip القديمة (25.3 وما دون).</string>
|
||||||
|
|
||||||
|
|||||||
@@ -491,6 +491,8 @@
|
|||||||
<string name="renderer_reactive_flushing_description">Mejora la precisión de renderizado en algunos juegos, pero reduce el rendimiento.</string>
|
<string name="renderer_reactive_flushing_description">Mejora la precisión de renderizado en algunos juegos, pero reduce el rendimiento.</string>
|
||||||
<string name="enable_buffer_history">Activar el historial del búfer</string>
|
<string name="enable_buffer_history">Activar el historial del búfer</string>
|
||||||
<string name="enable_buffer_history_description">Permite el acceso al estado del búfer anterior. Esta opción puede mejorar la calidad de renderizado y la consistencia en el rendimiento de algunos juegos.</string>
|
<string name="enable_buffer_history_description">Permite el acceso al estado del búfer anterior. Esta opción puede mejorar la calidad de renderizado y la consistencia en el rendimiento de algunos juegos.</string>
|
||||||
|
<string name="enable_gpu_buffer_readback">Activar la lectura del buffer de la GPU</string>
|
||||||
|
<string name="enable_gpu_buffer_readback_description">Conserva los datos del búfer modificados por la GPU leyéndolos antes de subirlos.\nAlgunos juegos requieren esto para renderizar correctamente ciertos efectos.\nPuede causar problemas si el hardware no puede soportar la carga de trabajo adicional.</string>
|
||||||
<string name="use_optimized_vertex_buffers">Búferes de vértices optimizados</string>
|
<string name="use_optimized_vertex_buffers">Búferes de vértices optimizados</string>
|
||||||
<string name="use_optimized_vertex_buffers_description">Permite la optimización del enlace del búfer de vértices para un mejor rendimiento. Requiere controladores Mesa 26.0+ Turnip/ controladores QCOM. Fallará con controladores Turnip más antiguos (versión 25.3 o inferior).</string>
|
<string name="use_optimized_vertex_buffers_description">Permite la optimización del enlace del búfer de vértices para un mejor rendimiento. Requiere controladores Mesa 26.0+ Turnip/ controladores QCOM. Fallará con controladores Turnip más antiguos (versión 25.3 o inferior).</string>
|
||||||
|
|
||||||
|
|||||||
@@ -489,6 +489,8 @@
|
|||||||
<string name="renderer_reactive_flushing_description">通过牺牲性能来提升某些游戏的渲染精度。</string>
|
<string name="renderer_reactive_flushing_description">通过牺牲性能来提升某些游戏的渲染精度。</string>
|
||||||
<string name="enable_buffer_history">启用缓冲区历史</string>
|
<string name="enable_buffer_history">启用缓冲区历史</string>
|
||||||
<string name="enable_buffer_history_description">启用对先前缓冲区状态的访问。此选项可在某些游戏中提升渲染质量并保持性能的一致性。</string>
|
<string name="enable_buffer_history_description">启用对先前缓冲区状态的访问。此选项可在某些游戏中提升渲染质量并保持性能的一致性。</string>
|
||||||
|
<string name="enable_gpu_buffer_readback">启用 GPU 缓冲区回读</string>
|
||||||
|
<string name="enable_gpu_buffer_readback_description">在上传前回读经由 GPU 修改过的缓冲区数据,以将其保留。一些游戏会用到这项设定以正确渲染某些效果。如果硬件无法处理额外的工作负载,则可能会导致问题。</string>
|
||||||
<string name="use_optimized_vertex_buffers">优化顶点缓冲区</string>
|
<string name="use_optimized_vertex_buffers">优化顶点缓冲区</string>
|
||||||
<string name="use_optimized_vertex_buffers_description">启用经过优化的顶点缓冲区绑定以提升性能。需要 Mesa 26.0 及以上版本的 Turnip 或 QCOM 驱动程序。若使用较旧版本的 Turnip 驱动 (25.3 及以下版本) 则会导致崩溃。</string>
|
<string name="use_optimized_vertex_buffers_description">启用经过优化的顶点缓冲区绑定以提升性能。需要 Mesa 26.0 及以上版本的 Turnip 或 QCOM 驱动程序。若使用较旧版本的 Turnip 驱动 (25.3 及以下版本) 则会导致崩溃。</string>
|
||||||
|
|
||||||
|
|||||||
@@ -505,6 +505,8 @@
|
|||||||
<string name="renderer_reactive_flushing_description">Improves rendering accuracy in some games at the cost of performance.</string>
|
<string name="renderer_reactive_flushing_description">Improves rendering accuracy in some games at the cost of performance.</string>
|
||||||
<string name="enable_buffer_history">Enable buffer history</string>
|
<string name="enable_buffer_history">Enable buffer history</string>
|
||||||
<string name="enable_buffer_history_description">Enables access to previous buffer states. This option may improve rendering quality and performance consistency in some games.</string>
|
<string name="enable_buffer_history_description">Enables access to previous buffer states. This option may improve rendering quality and performance consistency in some games.</string>
|
||||||
|
<string name="enable_gpu_buffer_readback">Enable GPU Buffer Readback</string>
|
||||||
|
<string name="enable_gpu_buffer_readback_description">Preserves GPU-modified buffer data by reading it back before uploads. Some games require this to render certain effects properly. May cause issues if the hardware cannot handle the additional workload.</string>
|
||||||
<string name="use_optimized_vertex_buffers">Optimized Vertex Buffers</string>
|
<string name="use_optimized_vertex_buffers">Optimized Vertex Buffers</string>
|
||||||
<string name="use_optimized_vertex_buffers_description">Enables optimized vertex buffer binding for improved performance. Requires Mesa 26.0+ Turnip drivers/ QCOM drivers. Will crash on older Turnip drivers (25.3 and below).</string>
|
<string name="use_optimized_vertex_buffers_description">Enables optimized vertex buffer binding for improved performance. Requires Mesa 26.0+ Turnip drivers/ QCOM drivers. Will crash on older Turnip drivers (25.3 and below).</string>
|
||||||
|
|
||||||
|
|||||||
@@ -576,6 +576,13 @@ struct Values {
|
|||||||
false,
|
false,
|
||||||
#endif
|
#endif
|
||||||
"rescale_hack", Category::RendererHacks};
|
"rescale_hack", Category::RendererHacks};
|
||||||
|
SwitchableSetting<bool> enable_gpu_buffer_readback{linkage,
|
||||||
|
false,
|
||||||
|
"enable_gpu_buffer_readback",
|
||||||
|
Category::RendererAdvanced,
|
||||||
|
Specialization::Default,
|
||||||
|
true,
|
||||||
|
true};
|
||||||
|
|
||||||
SwitchableSetting<bool> use_asynchronous_shaders{linkage, false, "use_asynchronous_shaders",
|
SwitchableSetting<bool> use_asynchronous_shaders{linkage, false, "use_asynchronous_shaders",
|
||||||
Category::RendererHacks};
|
Category::RendererHacks};
|
||||||
|
|||||||
+2
-10
@@ -388,14 +388,6 @@ add_library(core STATIC
|
|||||||
hle/result.h
|
hle/result.h
|
||||||
hle/service/acc/acc.cpp
|
hle/service/acc/acc.cpp
|
||||||
hle/service/acc/acc.h
|
hle/service/acc/acc.h
|
||||||
hle/service/acc/acc_aa.cpp
|
|
||||||
hle/service/acc/acc_aa.h
|
|
||||||
hle/service/acc/acc_su.cpp
|
|
||||||
hle/service/acc/acc_su.h
|
|
||||||
hle/service/acc/acc_u0.cpp
|
|
||||||
hle/service/acc/acc_u0.h
|
|
||||||
hle/service/acc/acc_u1.cpp
|
|
||||||
hle/service/acc/acc_u1.h
|
|
||||||
hle/service/acc/async_context.cpp
|
hle/service/acc/async_context.cpp
|
||||||
hle/service/acc/async_context.h
|
hle/service/acc/async_context.h
|
||||||
hle/service/acc/errors.h
|
hle/service/acc/errors.h
|
||||||
@@ -768,8 +760,8 @@ add_library(core STATIC
|
|||||||
hle/service/mii/types/ver3_store_data.h
|
hle/service/mii/types/ver3_store_data.h
|
||||||
hle/service/mm/mm_u.cpp
|
hle/service/mm/mm_u.cpp
|
||||||
hle/service/mm/mm_u.h
|
hle/service/mm/mm_u.h
|
||||||
hle/service/mnpp/mnpp_app.cpp
|
hle/service/mnpp/mnpp.cpp
|
||||||
hle/service/mnpp/mnpp_app.h
|
hle/service/mnpp/mnpp.h
|
||||||
hle/service/ncm/ncm.cpp
|
hle/service/ncm/ncm.cpp
|
||||||
hle/service/ncm/ncm.h
|
hle/service/ncm/ncm.h
|
||||||
hle/service/nfc/common/amiibo_crypto.cpp
|
hle/service/nfc/common/amiibo_crypto.cpp
|
||||||
|
|||||||
@@ -21,10 +21,6 @@
|
|||||||
#include "core/file_sys/control_metadata.h"
|
#include "core/file_sys/control_metadata.h"
|
||||||
#include "core/file_sys/patch_manager.h"
|
#include "core/file_sys/patch_manager.h"
|
||||||
#include "core/hle/service/acc/acc.h"
|
#include "core/hle/service/acc/acc.h"
|
||||||
#include "core/hle/service/acc/acc_aa.h"
|
|
||||||
#include "core/hle/service/acc/acc_su.h"
|
|
||||||
#include "core/hle/service/acc/acc_u0.h"
|
|
||||||
#include "core/hle/service/acc/acc_u1.h"
|
|
||||||
#include "core/hle/service/acc/async_context.h"
|
#include "core/hle/service/acc/async_context.h"
|
||||||
#include "core/hle/service/acc/errors.h"
|
#include "core/hle/service/acc/errors.h"
|
||||||
#include "core/hle/service/acc/profile_manager.h"
|
#include "core/hle/service/acc/profile_manager.h"
|
||||||
@@ -1244,19 +1240,416 @@ Module::Interface::Interface(std::shared_ptr<Module> module_,
|
|||||||
|
|
||||||
Module::Interface::~Interface() = default;
|
Module::Interface::~Interface() = default;
|
||||||
|
|
||||||
|
class ACC_AA final : public Module::Interface {
|
||||||
|
public:
|
||||||
|
explicit ACC_AA(std::shared_ptr<Module> module_, std::shared_ptr<ProfileManager> profile_manager_, Core::System& system_)
|
||||||
|
: Interface(std::move(module_), std::move(profile_manager_), system_, "acc:aa") {
|
||||||
|
// clang-format off
|
||||||
|
static const FunctionInfo functions[] = {
|
||||||
|
{0, nullptr, "EnsureCacheAsync"},
|
||||||
|
{1, nullptr, "LoadCache"},
|
||||||
|
{2, nullptr, "GetDeviceAccountId"},
|
||||||
|
{50, nullptr, "RegisterNotificationTokenAsync"}, // 1.0.0 - 6.2.0
|
||||||
|
{51, nullptr, "UnregisterNotificationTokenAsync"}, // 1.0.0 - 6.2.0
|
||||||
|
};
|
||||||
|
// clang-format on
|
||||||
|
RegisterHandlers(functions);
|
||||||
|
}
|
||||||
|
~ACC_AA() override = default;
|
||||||
|
};
|
||||||
|
|
||||||
|
class ACC_SU final : public Module::Interface {
|
||||||
|
public:
|
||||||
|
explicit ACC_SU(std::shared_ptr<Module> module_, std::shared_ptr<ProfileManager> profile_manager_, Core::System& system_)
|
||||||
|
: Interface(std::move(module_), std::move(profile_manager_), system_, "acc:su") {
|
||||||
|
// clang-format off
|
||||||
|
static const FunctionInfo functions[] = {
|
||||||
|
{0, &ACC_SU::GetUserCount, "GetUserCount"},
|
||||||
|
{1, &ACC_SU::GetUserExistence, "GetUserExistence"},
|
||||||
|
{2, &ACC_SU::ListAllUsers, "ListAllUsers"},
|
||||||
|
{3, &ACC_SU::ListOpenUsers, "ListOpenUsers"},
|
||||||
|
{4, &ACC_SU::GetLastOpenedUser, "GetLastOpenedUser"},
|
||||||
|
{5, &ACC_SU::GetProfile, "GetProfile"},
|
||||||
|
{6, nullptr, "GetProfileDigest"},
|
||||||
|
{50, &ACC_SU::IsUserRegistrationRequestPermitted, "IsUserRegistrationRequestPermitted"},
|
||||||
|
{51, &ACC_SU::TrySelectUserWithoutInteractionDeprecated, "TrySelectUserWithoutInteractionDeprecated"},
|
||||||
|
{52, &ACC_SU::TrySelectUserWithoutInteraction, "TrySelectUserWithoutInteraction"}, // 19.0.0+
|
||||||
|
{60, &ACC_SU::ListOpenContextStoredUsers, "ListOpenContextStoredUsers"},
|
||||||
|
{99, nullptr, "DebugActivateOpenContextRetention"},
|
||||||
|
{100, nullptr, "GetUserRegistrationNotifier"},
|
||||||
|
{101, nullptr, "GetUserStateChangeNotifier"},
|
||||||
|
{102, &ACC_SU::GetBaasAccountManagerForSystemService, "GetBaasAccountManagerForSystemService"},
|
||||||
|
{103, nullptr, "GetBaasUserAvailabilityChangeNotifier"},
|
||||||
|
{104, nullptr, "GetProfileUpdateNotifier"},
|
||||||
|
{105, nullptr, "CheckNetworkServiceAvailabilityAsync"},
|
||||||
|
{106, nullptr, "GetProfileSyncNotifier"},
|
||||||
|
{110, &ACC_SU::StoreSaveDataThumbnailSystem, "StoreSaveDataThumbnail"},
|
||||||
|
{111, nullptr, "ClearSaveDataThumbnail"},
|
||||||
|
{112, nullptr, "LoadSaveDataThumbnail"},
|
||||||
|
{113, nullptr, "GetSaveDataThumbnailExistence"},
|
||||||
|
{120, nullptr, "ListOpenUsersInApplication"},
|
||||||
|
{130, nullptr, "ActivateOpenContextRetention"},
|
||||||
|
{140, &ACC_SU::ListQualifiedUsers, "ListQualifiedUsers"},
|
||||||
|
{150, nullptr, "AuthenticateApplicationAsync"},
|
||||||
|
{151, nullptr, "EnsureSignedDeviceIdentifierCacheForNintendoAccountAsync"},
|
||||||
|
{152, nullptr, "LoadSignedDeviceIdentifierCacheForNintendoAccount"},
|
||||||
|
{190, nullptr, "GetUserLastOpenedApplication"},
|
||||||
|
{191, nullptr, "ActivateOpenContextHolder"},
|
||||||
|
{200, &ACC_SU::BeginUserRegistration, "BeginUserRegistration"},
|
||||||
|
{201, &ACC_SU::CompleteUserRegistration, "CompleteUserRegistration"},
|
||||||
|
{202, nullptr, "CancelUserRegistration"},
|
||||||
|
{203, &ACC_SU::DeleteUser, "DeleteUser"},
|
||||||
|
{204, &ACC_SU::SetUserPosition, "SetUserPosition"},
|
||||||
|
{205, &ACC_SU::GetProfileEditor, "GetProfileEditor"},
|
||||||
|
{206, nullptr, "CompleteUserRegistrationForcibly"},
|
||||||
|
{210, nullptr, "CreateFloatingRegistrationRequest"},
|
||||||
|
{211, nullptr, "CreateProcedureToRegisterUserWithNintendoAccount"},
|
||||||
|
{212, nullptr, "ResumeProcedureToRegisterUserWithNintendoAccount"},
|
||||||
|
{230, nullptr, "AuthenticateServiceAsync"},
|
||||||
|
{250, &ACC_SU::GetBaasAccountAdministrator, "GetBaasAccountAdministrator"},
|
||||||
|
{290, nullptr, "ProxyProcedureForGuestLoginWithNintendoAccount"},
|
||||||
|
{291, nullptr, "ProxyProcedureForFloatingRegistrationWithNintendoAccount"},
|
||||||
|
{299, nullptr, "SuspendBackgroundDaemon"},
|
||||||
|
{400, nullptr, "SetPinCode"}, // 18.0.0+
|
||||||
|
{401, &ACC_SU::GetPinCodeLength, "GetPinCodeLength"}, // 18.0.0+
|
||||||
|
{402, nullptr, "GetPinCode"}, // 18.0.0+
|
||||||
|
{403, nullptr, "GetPinCodeParity"},
|
||||||
|
{404, nullptr, "VerifyPinCode"},
|
||||||
|
{405, nullptr, "IsPinCodeVerificationForbidden"},
|
||||||
|
{410, nullptr, "GetPinCodeErrorCount"}, // 18.0.0+
|
||||||
|
{411, nullptr, "ResetPinCodeErrorCount"}, // 18.0.0+
|
||||||
|
{412, nullptr, "IncrementPinCodeErrorCount"}, // 18.0.0+
|
||||||
|
{900, nullptr, "SetUserUnqualifiedForDebug"},
|
||||||
|
{901, nullptr, "UnsetUserUnqualifiedForDebug"},
|
||||||
|
{902, nullptr, "ListUsersUnqualifiedForDebug"},
|
||||||
|
{910, nullptr, "RefreshFirmwareSettingsForDebug"},
|
||||||
|
{997, nullptr, "DebugInvalidateTokenCacheForUser"},
|
||||||
|
{998, nullptr, "DebugSetUserStateClose"},
|
||||||
|
{999, nullptr, "DebugSetUserStateOpen"},
|
||||||
|
};
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
|
RegisterHandlers(functions);
|
||||||
|
}
|
||||||
|
~ACC_SU() override = default;
|
||||||
|
};
|
||||||
|
|
||||||
|
class ACC_U0 final : public Module::Interface {
|
||||||
|
public:
|
||||||
|
ACC_U0(std::shared_ptr<Module> module_, std::shared_ptr<ProfileManager> profile_manager_, Core::System& system_)
|
||||||
|
: Interface(std::move(module_), std::move(profile_manager_), system_, "acc:u0") {
|
||||||
|
// clang-format off
|
||||||
|
static const FunctionInfo functions[] = {
|
||||||
|
{0, &ACC_U0::GetUserCount, "GetUserCount"},
|
||||||
|
{1, &ACC_U0::GetUserExistence, "GetUserExistence"},
|
||||||
|
{2, &ACC_U0::ListAllUsers, "ListAllUsers"},
|
||||||
|
{3, &ACC_U0::ListOpenUsers, "ListOpenUsers"},
|
||||||
|
{4, &ACC_U0::GetLastOpenedUser, "GetLastOpenedUser"},
|
||||||
|
{5, &ACC_U0::GetProfile, "GetProfile"},
|
||||||
|
{6, nullptr, "GetProfileDigest"}, // 3.0.0+
|
||||||
|
{50, &ACC_U0::IsUserRegistrationRequestPermitted, "IsUserRegistrationRequestPermitted"},
|
||||||
|
{51, &ACC_U0::TrySelectUserWithoutInteractionDeprecated, "TrySelectUserWithoutInteractionDeprecated"},
|
||||||
|
{52, &ACC_U0::TrySelectUserWithoutInteraction, "TrySelectUserWithoutInteraction"},
|
||||||
|
{60, &ACC_U0::ListOpenContextStoredUsers, "ListOpenContextStoredUsers"}, // 5.0.0 - 5.1.0
|
||||||
|
{99, nullptr, "DebugActivateOpenContextRetention"}, // 6.0.0+
|
||||||
|
{100, &ACC_U0::InitializeApplicationInfo, "InitializeApplicationInfo"},
|
||||||
|
{101, &ACC_U0::GetBaasAccountManagerForApplication, "GetBaasAccountManagerForApplication"},
|
||||||
|
{102, nullptr, "AuthenticateApplicationAsync"},
|
||||||
|
{103, nullptr, "CheckNetworkServiceAvailabilityAsync"}, // 4.0.0+
|
||||||
|
{110, &ACC_U0::StoreSaveDataThumbnailApplication, "StoreSaveDataThumbnail"},
|
||||||
|
{111, nullptr, "ClearSaveDataThumbnail"},
|
||||||
|
{120, nullptr, "CreateGuestLoginRequest"},
|
||||||
|
{130, nullptr, "LoadOpenContext"}, // 5.0.0+
|
||||||
|
{131, &ACC_U0::ListOpenContextStoredUsers, "ListOpenContextStoredUsers"}, // 6.0.0+
|
||||||
|
{140, &ACC_U0::InitializeApplicationInfoRestricted, "InitializeApplicationInfoRestricted"}, // 6.0.0+
|
||||||
|
{141, &ACC_U0::ListQualifiedUsers, "ListQualifiedUsers"}, // 6.0.0+
|
||||||
|
{150, &ACC_U0::IsUserAccountSwitchLocked, "IsUserAccountSwitchLocked"}, // 6.0.0+
|
||||||
|
{160, &ACC_U0::InitializeApplicationInfoV2, "InitializeApplicationInfoV2"},
|
||||||
|
};
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
|
RegisterHandlers(functions);
|
||||||
|
}
|
||||||
|
~ACC_U0() override = default;
|
||||||
|
};
|
||||||
|
|
||||||
|
class ACC_U1 final : public Module::Interface {
|
||||||
|
public:
|
||||||
|
ACC_U1(std::shared_ptr<Module> module_, std::shared_ptr<ProfileManager> profile_manager_, Core::System& system_)
|
||||||
|
: Interface(std::move(module_), std::move(profile_manager_), system_, "acc:u1") {
|
||||||
|
// clang-format off
|
||||||
|
static const FunctionInfo functions[] = {
|
||||||
|
{0, &ACC_U1::GetUserCount, "GetUserCount"},
|
||||||
|
{1, &ACC_U1::GetUserExistence, "GetUserExistence"},
|
||||||
|
{2, &ACC_U1::ListAllUsers, "ListAllUsers"},
|
||||||
|
{3, &ACC_U1::ListOpenUsers, "ListOpenUsers"},
|
||||||
|
{4, &ACC_U1::GetLastOpenedUser, "GetLastOpenedUser"},
|
||||||
|
{5, &ACC_U1::GetProfile, "GetProfile"},
|
||||||
|
{6, nullptr, "GetProfileDigest"},
|
||||||
|
{50, &ACC_U1::IsUserRegistrationRequestPermitted, "IsUserRegistrationRequestPermitted"},
|
||||||
|
{51, &ACC_U1::TrySelectUserWithoutInteraction, "TrySelectUserWithoutInteraction"},
|
||||||
|
{60, &ACC_U1::ListOpenContextStoredUsers, "ListOpenContextStoredUsers"},
|
||||||
|
{99, nullptr, "DebugActivateOpenContextRetention"},
|
||||||
|
{100, nullptr, "GetUserRegistrationNotifier"},
|
||||||
|
{101, nullptr, "GetUserStateChangeNotifier"},
|
||||||
|
{102, &ACC_U1::GetBaasAccountManagerForSystemService, "GetBaasAccountManagerForSystemService"},
|
||||||
|
{103, nullptr, "GetBaasUserAvailabilityChangeNotifier"},
|
||||||
|
{104, nullptr, "GetProfileUpdateNotifier"},
|
||||||
|
{105, nullptr, "CheckNetworkServiceAvailabilityAsync"},
|
||||||
|
{106, nullptr, "GetProfileSyncNotifier"},
|
||||||
|
{110, &ACC_U1::StoreSaveDataThumbnailApplication, "StoreSaveDataThumbnail"},
|
||||||
|
{111, nullptr, "ClearSaveDataThumbnail"},
|
||||||
|
{112, nullptr, "LoadSaveDataThumbnail"},
|
||||||
|
{113, nullptr, "GetSaveDataThumbnailExistence"},
|
||||||
|
{120, nullptr, "ListOpenUsersInApplication"},
|
||||||
|
{130, nullptr, "ActivateOpenContextRetention"},
|
||||||
|
{140, &ACC_U1::ListQualifiedUsers, "ListQualifiedUsers"},
|
||||||
|
{150, nullptr, "AuthenticateApplicationAsync"},
|
||||||
|
{151, nullptr, "EnsureSignedDeviceIdentifierCacheForNintendoAccountAsync"},
|
||||||
|
{152, nullptr, "LoadSignedDeviceIdentifierCacheForNintendoAccount"},
|
||||||
|
{190, nullptr, "GetUserLastOpenedApplication"},
|
||||||
|
{191, nullptr, "ActivateOpenContextHolder"},
|
||||||
|
{401, &ACC_U1::GetPinCodeLength, "GetPinCodeLength"}, // 18.0.0+
|
||||||
|
{402, nullptr, "GetPinCode"}, // 18.0.0+
|
||||||
|
{997, nullptr, "DebugInvalidateTokenCacheForUser"},
|
||||||
|
{998, nullptr, "DebugSetUserStateClose"},
|
||||||
|
{999, nullptr, "DebugSetUserStateOpen"},
|
||||||
|
};
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
|
RegisterHandlers(functions);
|
||||||
|
}
|
||||||
|
~ACC_U1() override = default;
|
||||||
|
};
|
||||||
|
|
||||||
|
class DAUTH_0 final : public ServiceFramework<DAUTH_0> {
|
||||||
|
public:
|
||||||
|
explicit DAUTH_0(Core::System& system_) : ServiceFramework{system_, "dauth:0"} {
|
||||||
|
// clang-format off
|
||||||
|
static const FunctionInfo functions[] = {
|
||||||
|
{0, nullptr, "EnsureAuthenticationTokenCacheAsync"},
|
||||||
|
{1, nullptr, "LoadAuthenticationTokenCache"},
|
||||||
|
{2, nullptr, "InvalidateAuthenticationTokenCache"},
|
||||||
|
{3, nullptr, "IsDeviceAuthenticationTokenCacheAvailable"},
|
||||||
|
{10, nullptr, "EnsureEdgeTokenCacheAsync"},
|
||||||
|
{11, nullptr, "LoadEdgeTokenCache"},
|
||||||
|
{12, nullptr, "InvalidateEdgeTokenCache"},
|
||||||
|
{13, nullptr, "IsEdgeTokenCacheAvailable"},
|
||||||
|
{20, nullptr, "EnsureApplicationAuthenticationCacheAsync"},
|
||||||
|
{21, nullptr, "LoadApplicationAuthenticationTokenCache"},
|
||||||
|
{22, nullptr, "LoadApplicationNetworkServiceClientConfigCache"},
|
||||||
|
{23, nullptr, "IsApplicationAuthenticationCacheAvailable"},
|
||||||
|
{24, nullptr, "InvalidateApplicationAuthenticationCache"},
|
||||||
|
{30, nullptr, "EnsureGameCardAuthenticationCacheAsync"},
|
||||||
|
{31, nullptr, "LoadGameCardAuthenticationTokenCache"},
|
||||||
|
{32, nullptr, "IsGameCardAuthenticationCacheAvailable"},
|
||||||
|
{33, nullptr, "InvalidateGameCardAuthenticationCache"},
|
||||||
|
{1000, nullptr, "GetInactiveElicenseUsedEvent"},
|
||||||
|
{9000, nullptr, "ImportVirtualClientCertificate"},
|
||||||
|
{9010, nullptr, "DeleteVirtualClientCertificate"},
|
||||||
|
};
|
||||||
|
// clang-format on
|
||||||
|
RegisterHandlers(functions);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
class ACC_E final : public Module::Interface {
|
||||||
|
public:
|
||||||
|
explicit ACC_E(std::shared_ptr<Module> module_, std::shared_ptr<ProfileManager> profile_manager_, Core::System& system_)
|
||||||
|
: Interface(std::move(module_), std::move(profile_manager_), system_, "acc:e") {
|
||||||
|
// clang-format off
|
||||||
|
static const FunctionInfo functions[] = {
|
||||||
|
{ 0, nullptr, "GetUserCount"},
|
||||||
|
{ 1, nullptr, "GetUserExistence"},
|
||||||
|
{ 2, nullptr, "ListAllUsers"},
|
||||||
|
{ 3, nullptr, "ListOpenUsers"},
|
||||||
|
{ 4, nullptr, "GetLastOpenedUser"},
|
||||||
|
{ 5, nullptr, "GetProfile"},
|
||||||
|
{ 6, nullptr, "GetProfileDigest"},
|
||||||
|
{ 50, nullptr, "IsUserRegistrationRequestPermitted"},
|
||||||
|
{ 51, nullptr, "TrySelectUserWithoutInteractionDeprecated"},
|
||||||
|
{ 52, nullptr, "TrySelectUserWithoutInteraction"},
|
||||||
|
{ 99, nullptr, "DebugActivateOpenContextRetention"},
|
||||||
|
{ 100, nullptr, "GetUserRegistrationNotifier"},
|
||||||
|
{ 101, nullptr, "GetUserStateChangeNotifier"},
|
||||||
|
{ 102, nullptr, "GetBaasAccountManagerForSystemService"},
|
||||||
|
{ 103, nullptr, "GetBaasUserAvailabilityChangeNotifier"},
|
||||||
|
{ 104, nullptr, "GetProfileUpdateNotifier"},
|
||||||
|
{ 105, nullptr, "CheckNetworkServiceAvailabilityAsync"},
|
||||||
|
{ 106, nullptr, "GetProfileSyncNotifier"},
|
||||||
|
{ 110, nullptr, "StoreSaveDataThumbnail"},
|
||||||
|
{ 111, nullptr, "ClearSaveDataThumbnail"},
|
||||||
|
{ 112, nullptr, "LoadSaveDataThumbnail"},
|
||||||
|
{ 113, nullptr, "GetSaveDataThumbnailExistence"},
|
||||||
|
{ 120, nullptr, "ListOpenUsersInApplication"},
|
||||||
|
{ 130, nullptr, "ActivateOpenContextRetention"},
|
||||||
|
{ 140, nullptr, "ListQualifiedUsers"},
|
||||||
|
{ 151, nullptr, "EnsureSignedDeviceIdentifierCacheForNintendoAccountAsync"},
|
||||||
|
{ 152, nullptr, "LoadSignedDeviceIdentifierCacheForNintendoAccount"},
|
||||||
|
{ 170, nullptr, "GetNasOp2MembershipStateChangeNotifier"},
|
||||||
|
{ 191, nullptr, "UpdateNotificationReceiverInfo"},
|
||||||
|
{ 200, nullptr, "BeginUserRegistration"},
|
||||||
|
{ 201, nullptr, "CompleteUserRegistration"},
|
||||||
|
{ 202, nullptr, "CancelUserRegistration"},
|
||||||
|
{ 203, nullptr, "DeleteUser"},
|
||||||
|
{ 204, nullptr, "SetUserPosition"},
|
||||||
|
{ 205, nullptr, "GetProfileEditor"},
|
||||||
|
{ 206, nullptr, "CompleteUserRegistrationForcibly"},
|
||||||
|
{ 210, nullptr, "CreateFloatingRegistrationRequest"},
|
||||||
|
{ 211, nullptr, "CreateProcedureToRegisterUserWithNintendoAccount"},
|
||||||
|
{ 212, nullptr, "ResumeProcedureToRegisterUserWithNintendoAccount"},
|
||||||
|
{ 213, nullptr, "CreateProcedureToCreateUserWithNintendoAccount"},
|
||||||
|
{ 214, nullptr, "ResumeProcedureToCreateUserWithNintendoAccount"},
|
||||||
|
{ 215, nullptr, "ResumeProcedureToCreateUserWithNintendoAccountAfterApplyResponse"},
|
||||||
|
{ 230, nullptr, "AuthenticateServiceAsync"},
|
||||||
|
{ 250, nullptr, "GetBaasAccountAdministrator"},
|
||||||
|
{ 251, nullptr, "SynchronizeNetworkServiceAccountsSnapshotAsync"},
|
||||||
|
{ 290, nullptr, "ProxyProcedureForGuestLoginWithNintendoAccount"},
|
||||||
|
{ 291, nullptr, "ProxyProcedureForFloatingRegistrationWithNintendoAccount"},
|
||||||
|
{ 292, nullptr, "ProxyProcedureForDeviceMigrationAuthenticatingOperatingUser"},
|
||||||
|
{ 293, nullptr, "ProxyProcedureForDeviceMigrationDownload"},
|
||||||
|
{ 299, nullptr, "SuspendBackgroundDaemon"},
|
||||||
|
{ 350, nullptr, "CreateDeviceMigrationUserExportRequest"},
|
||||||
|
{ 351, nullptr, "UploadNasCredential"},
|
||||||
|
{ 352, nullptr, "CreateDeviceMigrationUserImportRequest"},
|
||||||
|
{ 353, nullptr, "DeleteUserMigrationSaveData"},
|
||||||
|
{ 400, nullptr, "SetPinCode"},
|
||||||
|
{ 401, nullptr, "GetPinCodeLength"},
|
||||||
|
{ 402, nullptr, "GetPinCode"},
|
||||||
|
{ 403, nullptr, "GetPinCodeParity"},
|
||||||
|
{ 404, nullptr, "VerifyPinCode"},
|
||||||
|
{ 405, nullptr, "IsPinCodeVerificationForbidden"},
|
||||||
|
{ 410, nullptr, "GetPinCodeErrorCount"},
|
||||||
|
{ 411, nullptr, "ResetPinCodeErrorCount"},
|
||||||
|
{ 412, nullptr, "IncrementPinCodeErrorCount"},
|
||||||
|
{ 413, nullptr, "SetPinCodeErrorCount"},
|
||||||
|
{ 420, nullptr, "SetStartPenaltyTime"},
|
||||||
|
{ 421, nullptr, "GetStartPenaltyTime"},
|
||||||
|
{ 900, nullptr, "SetUserUnqualifiedForDebug"},
|
||||||
|
{ 901, nullptr, "UnsetUserUnqualifiedForDebug"},
|
||||||
|
{ 902, nullptr, "ListUsersUnqualifiedForDebug"},
|
||||||
|
{ 910, nullptr, "RefreshFirmwareSettingsForDebug"},
|
||||||
|
{ 997, nullptr, "DebugInvalidateTokenCacheForUser"},
|
||||||
|
{ 998, nullptr, "DebugSetUserStateClose"},
|
||||||
|
{ 999, nullptr, "DebugSetUserStateOpen"},
|
||||||
|
{ 1000, nullptr, "CreateIAccountEntityServiceForApplication"},
|
||||||
|
{ 1100, nullptr, "CreateIUserStateManager"},
|
||||||
|
{ 10050, nullptr, "IsUserRegistrationRequestPermittedForAccountPolicy"},
|
||||||
|
{ 10105, nullptr, "CheckNetworkServiceAvailabilityAsyncForAccountPolicy"},
|
||||||
|
};
|
||||||
|
// clang-format on
|
||||||
|
RegisterHandlers(functions);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
class ACC_E_U1 final : public Module::Interface {
|
||||||
|
public:
|
||||||
|
explicit ACC_E_U1(std::shared_ptr<Module> module_, std::shared_ptr<ProfileManager> profile_manager_, Core::System& system_)
|
||||||
|
: Interface(std::move(module_), std::move(profile_manager_), system_, "acc:e:u1") {
|
||||||
|
// clang-format off
|
||||||
|
static const FunctionInfo functions[] = {
|
||||||
|
{0, nullptr, "GetUserCount"},
|
||||||
|
{1, nullptr, "GetUserExistence"},
|
||||||
|
{2, nullptr, "ListAllUsers"},
|
||||||
|
{3, nullptr, "ListOpenUsers"},
|
||||||
|
{4, nullptr, "GetLastOpenedUser"},
|
||||||
|
{5, nullptr, "GetProfile"},
|
||||||
|
{6, nullptr, "GetProfileDigest"},
|
||||||
|
{50, nullptr, "IsUserRegistrationRequestPermitted"},
|
||||||
|
{51, nullptr, "TrySelectUserWithoutInteractionDeprecated"},
|
||||||
|
{99, nullptr, "DebugActivateOpenContextRetention"},
|
||||||
|
{100, nullptr, "GetUserRegistrationNotifier"},
|
||||||
|
{101, nullptr, "GetUserStateChangeNotifier"},
|
||||||
|
{102, nullptr, "GetBaasAccountManagerForSystemService"},
|
||||||
|
{103, nullptr, "GetBaasUserAvailabilityChangeNotifier"},
|
||||||
|
{104, nullptr, "GetProfileUpdateNotifier"},
|
||||||
|
{105, nullptr, "CheckNetworkServiceAvailabilityAsync"},
|
||||||
|
{106, nullptr, "GetProfileSyncNotifier"},
|
||||||
|
{110, nullptr, "StoreSaveDataThumbnail"},
|
||||||
|
{111, nullptr, "ClearSaveDataThumbnail"},
|
||||||
|
{112, nullptr, "LoadSaveDataThumbnail"},
|
||||||
|
{113, nullptr, "GetSaveDataThumbnailExistence"},
|
||||||
|
{120, nullptr, "ListOpenUsersInApplication"},
|
||||||
|
{130, nullptr, "ActivateOpenContextRetention"},
|
||||||
|
{140, nullptr, "ListQualifiedUsers"},
|
||||||
|
{151, nullptr, "EnsureSignedDeviceIdentifierCacheForNintendoAccountAsync"},
|
||||||
|
{152, nullptr, "LoadSignedDeviceIdentifierCacheForNintendoAccount"},
|
||||||
|
{170, nullptr, "GetNasOp2MembershipStateChangeNotifier"},
|
||||||
|
{191, nullptr, "UpdateNotificationReceiverInfo"},
|
||||||
|
{997, nullptr, "DebugInvalidateTokenCacheForUser"},
|
||||||
|
{998, nullptr, "DebugSetUserStateClose"},
|
||||||
|
{999, nullptr, "DebugSetUserStateOpen"},
|
||||||
|
};
|
||||||
|
// clang-format on
|
||||||
|
RegisterHandlers(functions);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
class ACC_E_U2 final : public Module::Interface {
|
||||||
|
public:
|
||||||
|
explicit ACC_E_U2(std::shared_ptr<Module> module_, std::shared_ptr<ProfileManager> profile_manager_, Core::System& system_)
|
||||||
|
: Interface(std::move(module_), std::move(profile_manager_), system_, "acc:e:u2") {
|
||||||
|
// clang-format off
|
||||||
|
static const FunctionInfo functions[] = {
|
||||||
|
{0, nullptr, "GetUserCount"},
|
||||||
|
{1, nullptr, "GetUserExistence"},
|
||||||
|
{2, nullptr, "ListAllUsers"},
|
||||||
|
{3, nullptr, "ListOpenUsers"},
|
||||||
|
{4, nullptr, "GetLastOpenedUser"},
|
||||||
|
{5, nullptr, "GetProfile"},
|
||||||
|
{6, nullptr, "GetProfileDigest"},
|
||||||
|
{50, nullptr, "#IsUserRegistrationRequestPermitted"},
|
||||||
|
{51, nullptr, "TrySelectUserWithoutInteractionDeprecated"},
|
||||||
|
{52, nullptr, "TrySelectUserWithoutInteraction"},
|
||||||
|
{99, nullptr, "DebugActivateOpenContextRetention"},
|
||||||
|
{100, nullptr, "GetUserRegistrationNotifier"},
|
||||||
|
{101, nullptr, "GetUserStateChangeNotifier"},
|
||||||
|
{102, nullptr, "GetBaasAccountManagerForSystemService"},
|
||||||
|
{103, nullptr, "GetBaasUserAvailabilityChangeNotifier"},
|
||||||
|
{104, nullptr, "GetProfileUpdateNotifier"},
|
||||||
|
{105, nullptr, "CheckNetworkServiceAvailabilityAsync"},
|
||||||
|
{106, nullptr, "GetProfileSyncNotifier"},
|
||||||
|
{110, nullptr, "StoreSaveDataThumbnail"},
|
||||||
|
{111, nullptr, "ClearSaveDataThumbnail"},
|
||||||
|
{112, nullptr, "LoadSaveDataThumbnail"},
|
||||||
|
{113, nullptr, "GetSaveDataThumbnailExistence"},
|
||||||
|
{120, nullptr, "ListOpenUsersInApplication"},
|
||||||
|
{130, nullptr, "ActivateOpenContextRetention"},
|
||||||
|
{140, nullptr, "ListQualifiedUsers"},
|
||||||
|
{151, nullptr, "EnsureSignedDeviceIdentifierCacheForNintendoAccountAsync"},
|
||||||
|
{152, nullptr, "LoadSignedDeviceIdentifierCacheForNintendoAccount"},
|
||||||
|
{170, nullptr, "GetNasOp2MembershipStateChangeNotifier"},
|
||||||
|
{191, nullptr, "UpdateNotificationReceiverInfo"},
|
||||||
|
{205, nullptr, "GetProfileEditor"},
|
||||||
|
{401, nullptr, "GetPinCodeLength"},
|
||||||
|
{402, nullptr, "GetPinCode"},
|
||||||
|
{403, nullptr, "GetPinCodeParity"},
|
||||||
|
{404, nullptr, "VerifyPinCode"},
|
||||||
|
{405, nullptr, "IsPinCodeVerificationForbidden"},
|
||||||
|
{997, nullptr, "DebugInvalidateTokenCacheForUser"},
|
||||||
|
{998, nullptr, "DebugSetUserStateClose"},
|
||||||
|
{999, nullptr, "DebugSetUserStateOpen"},
|
||||||
|
};
|
||||||
|
// clang-format on
|
||||||
|
RegisterHandlers(functions);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
void LoopProcess(Core::System& system) {
|
void LoopProcess(Core::System& system) {
|
||||||
auto module = std::make_shared<Module>();
|
auto module = std::make_shared<Module>();
|
||||||
auto profile_manager = std::make_shared<ProfileManager>();
|
auto profile_manager = std::make_shared<ProfileManager>();
|
||||||
auto server_manager = std::make_unique<ServerManager>(system);
|
auto server_manager = std::make_unique<ServerManager>(system);
|
||||||
|
|
||||||
server_manager->RegisterNamedService("acc:aa",
|
server_manager->RegisterNamedService("acc:aa", std::make_shared<ACC_AA>(module, profile_manager, system));
|
||||||
std::make_shared<ACC_AA>(module, profile_manager, system));
|
server_manager->RegisterNamedService("acc:su", std::make_shared<ACC_SU>(module, profile_manager, system));
|
||||||
server_manager->RegisterNamedService("acc:su",
|
server_manager->RegisterNamedService("acc:u0", std::make_shared<ACC_U0>(module, profile_manager, system));
|
||||||
std::make_shared<ACC_SU>(module, profile_manager, system));
|
server_manager->RegisterNamedService("acc:u1", std::make_shared<ACC_U1>(module, profile_manager, system));
|
||||||
server_manager->RegisterNamedService("acc:u0",
|
|
||||||
std::make_shared<ACC_U0>(module, profile_manager, system));
|
server_manager->RegisterNamedService("acc:e", std::make_shared<ACC_E>(module, profile_manager, system));
|
||||||
server_manager->RegisterNamedService("acc:u1",
|
server_manager->RegisterNamedService("acc:e:u1", std::make_shared<ACC_E_U1>(module, profile_manager, system));
|
||||||
std::make_shared<ACC_U1>(module, profile_manager, system));
|
server_manager->RegisterNamedService("acc:e:u2", std::make_shared<ACC_E_U2>(module, profile_manager, system));
|
||||||
|
|
||||||
|
server_manager->RegisterNamedService("dauth:0", std::make_shared<DAUTH_0>(system));
|
||||||
ServerManager::RunServer(std::move(server_manager));
|
ServerManager::RunServer(std::move(server_manager));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
|
|
||||||
#include "core/hle/service/acc/acc_aa.h"
|
|
||||||
|
|
||||||
namespace Service::Account {
|
|
||||||
|
|
||||||
ACC_AA::ACC_AA(std::shared_ptr<Module> module_, std::shared_ptr<ProfileManager> profile_manager_,
|
|
||||||
Core::System& system_)
|
|
||||||
: Interface(std::move(module_), std::move(profile_manager_), system_, "acc:aa") {
|
|
||||||
// clang-format off
|
|
||||||
static const FunctionInfo functions[] = {
|
|
||||||
{0, nullptr, "EnsureCacheAsync"},
|
|
||||||
{1, nullptr, "LoadCache"},
|
|
||||||
{2, nullptr, "GetDeviceAccountId"},
|
|
||||||
{50, nullptr, "RegisterNotificationTokenAsync"}, // 1.0.0 - 6.2.0
|
|
||||||
{51, nullptr, "UnregisterNotificationTokenAsync"}, // 1.0.0 - 6.2.0
|
|
||||||
};
|
|
||||||
// clang-format on
|
|
||||||
RegisterHandlers(functions);
|
|
||||||
}
|
|
||||||
|
|
||||||
ACC_AA::~ACC_AA() = default;
|
|
||||||
|
|
||||||
} // namespace Service::Account
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "core/hle/service/acc/acc.h"
|
|
||||||
|
|
||||||
namespace Service::Account {
|
|
||||||
|
|
||||||
class ACC_AA final : public Module::Interface {
|
|
||||||
public:
|
|
||||||
explicit ACC_AA(std::shared_ptr<Module> module_,
|
|
||||||
std::shared_ptr<ProfileManager> profile_manager_, Core::System& system_);
|
|
||||||
~ACC_AA() override;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace Service::Account
|
|
||||||
@@ -1,83 +0,0 @@
|
|||||||
// SPDX-FileCopyrightText: Copyright 2026 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
|
|
||||||
|
|
||||||
#include "core/hle/service/acc/acc_su.h"
|
|
||||||
|
|
||||||
namespace Service::Account {
|
|
||||||
|
|
||||||
ACC_SU::ACC_SU(std::shared_ptr<Module> module_, std::shared_ptr<ProfileManager> profile_manager_,
|
|
||||||
Core::System& system_)
|
|
||||||
: Interface(std::move(module_), std::move(profile_manager_), system_, "acc:su") {
|
|
||||||
// clang-format off
|
|
||||||
static const FunctionInfo functions[] = {
|
|
||||||
{0, &ACC_SU::GetUserCount, "GetUserCount"},
|
|
||||||
{1, &ACC_SU::GetUserExistence, "GetUserExistence"},
|
|
||||||
{2, &ACC_SU::ListAllUsers, "ListAllUsers"},
|
|
||||||
{3, &ACC_SU::ListOpenUsers, "ListOpenUsers"},
|
|
||||||
{4, &ACC_SU::GetLastOpenedUser, "GetLastOpenedUser"},
|
|
||||||
{5, &ACC_SU::GetProfile, "GetProfile"},
|
|
||||||
{6, nullptr, "GetProfileDigest"},
|
|
||||||
{50, &ACC_SU::IsUserRegistrationRequestPermitted, "IsUserRegistrationRequestPermitted"},
|
|
||||||
{51, &ACC_SU::TrySelectUserWithoutInteractionDeprecated, "TrySelectUserWithoutInteractionDeprecated"},
|
|
||||||
{52, &ACC_SU::TrySelectUserWithoutInteraction, "TrySelectUserWithoutInteraction"}, // 19.0.0+
|
|
||||||
{60, &ACC_SU::ListOpenContextStoredUsers, "ListOpenContextStoredUsers"},
|
|
||||||
{99, nullptr, "DebugActivateOpenContextRetention"},
|
|
||||||
{100, nullptr, "GetUserRegistrationNotifier"},
|
|
||||||
{101, nullptr, "GetUserStateChangeNotifier"},
|
|
||||||
{102, &ACC_SU::GetBaasAccountManagerForSystemService, "GetBaasAccountManagerForSystemService"},
|
|
||||||
{103, nullptr, "GetBaasUserAvailabilityChangeNotifier"},
|
|
||||||
{104, nullptr, "GetProfileUpdateNotifier"},
|
|
||||||
{105, nullptr, "CheckNetworkServiceAvailabilityAsync"},
|
|
||||||
{106, nullptr, "GetProfileSyncNotifier"},
|
|
||||||
{110, &ACC_SU::StoreSaveDataThumbnailSystem, "StoreSaveDataThumbnail"},
|
|
||||||
{111, nullptr, "ClearSaveDataThumbnail"},
|
|
||||||
{112, nullptr, "LoadSaveDataThumbnail"},
|
|
||||||
{113, nullptr, "GetSaveDataThumbnailExistence"},
|
|
||||||
{120, nullptr, "ListOpenUsersInApplication"},
|
|
||||||
{130, nullptr, "ActivateOpenContextRetention"},
|
|
||||||
{140, &ACC_SU::ListQualifiedUsers, "ListQualifiedUsers"},
|
|
||||||
{150, nullptr, "AuthenticateApplicationAsync"},
|
|
||||||
{151, nullptr, "EnsureSignedDeviceIdentifierCacheForNintendoAccountAsync"},
|
|
||||||
{152, nullptr, "LoadSignedDeviceIdentifierCacheForNintendoAccount"},
|
|
||||||
{190, nullptr, "GetUserLastOpenedApplication"},
|
|
||||||
{191, nullptr, "ActivateOpenContextHolder"},
|
|
||||||
{200, &ACC_SU::BeginUserRegistration, "BeginUserRegistration"},
|
|
||||||
{201, &ACC_SU::CompleteUserRegistration, "CompleteUserRegistration"},
|
|
||||||
{202, nullptr, "CancelUserRegistration"},
|
|
||||||
{203, &ACC_SU::DeleteUser, "DeleteUser"},
|
|
||||||
{204, &ACC_SU::SetUserPosition, "SetUserPosition"},
|
|
||||||
{205, &ACC_SU::GetProfileEditor, "GetProfileEditor"},
|
|
||||||
{206, nullptr, "CompleteUserRegistrationForcibly"},
|
|
||||||
{210, nullptr, "CreateFloatingRegistrationRequest"},
|
|
||||||
{211, nullptr, "CreateProcedureToRegisterUserWithNintendoAccount"},
|
|
||||||
{212, nullptr, "ResumeProcedureToRegisterUserWithNintendoAccount"},
|
|
||||||
{230, nullptr, "AuthenticateServiceAsync"},
|
|
||||||
{250, &ACC_SU::GetBaasAccountAdministrator, "GetBaasAccountAdministrator"},
|
|
||||||
{290, nullptr, "ProxyProcedureForGuestLoginWithNintendoAccount"},
|
|
||||||
{291, nullptr, "ProxyProcedureForFloatingRegistrationWithNintendoAccount"},
|
|
||||||
{299, nullptr, "SuspendBackgroundDaemon"},
|
|
||||||
{400, nullptr, "SetPinCode"}, // 18.0.0+
|
|
||||||
{401, &ACC_SU::GetPinCodeLength, "GetPinCodeLength"}, // 18.0.0+
|
|
||||||
{402, nullptr, "GetPinCode"}, // 18.0.0+
|
|
||||||
{410, nullptr, "GetPinCodeErrorCount"}, // 18.0.0+
|
|
||||||
{411, nullptr, "ResetPinCodeErrorCount"}, // 18.0.0+
|
|
||||||
{412, nullptr, "IncrementPinCodeErrorCount"}, // 18.0.0+
|
|
||||||
{900, nullptr, "SetUserUnqualifiedForDebug"},
|
|
||||||
{901, nullptr, "UnsetUserUnqualifiedForDebug"},
|
|
||||||
{902, nullptr, "ListUsersUnqualifiedForDebug"},
|
|
||||||
{910, nullptr, "RefreshFirmwareSettingsForDebug"},
|
|
||||||
{997, nullptr, "DebugInvalidateTokenCacheForUser"},
|
|
||||||
{998, nullptr, "DebugSetUserStateClose"},
|
|
||||||
{999, nullptr, "DebugSetUserStateOpen"},
|
|
||||||
};
|
|
||||||
// clang-format on
|
|
||||||
|
|
||||||
RegisterHandlers(functions);
|
|
||||||
}
|
|
||||||
|
|
||||||
ACC_SU::~ACC_SU() = default;
|
|
||||||
|
|
||||||
} // namespace Service::Account
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "core/hle/service/acc/acc.h"
|
|
||||||
|
|
||||||
namespace Service::Account {
|
|
||||||
|
|
||||||
class ACC_SU final : public Module::Interface {
|
|
||||||
public:
|
|
||||||
explicit ACC_SU(std::shared_ptr<Module> module_,
|
|
||||||
std::shared_ptr<ProfileManager> profile_manager_, Core::System& system_);
|
|
||||||
~ACC_SU() override;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace Service::Account
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
// 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
|
|
||||||
|
|
||||||
#include "core/hle/service/acc/acc_u0.h"
|
|
||||||
|
|
||||||
namespace Service::Account {
|
|
||||||
|
|
||||||
ACC_U0::ACC_U0(std::shared_ptr<Module> module_, std::shared_ptr<ProfileManager> profile_manager_,
|
|
||||||
Core::System& system_)
|
|
||||||
: Interface(std::move(module_), std::move(profile_manager_), system_, "acc:u0") {
|
|
||||||
// clang-format off
|
|
||||||
static const FunctionInfo functions[] = {
|
|
||||||
{0, &ACC_U0::GetUserCount, "GetUserCount"},
|
|
||||||
{1, &ACC_U0::GetUserExistence, "GetUserExistence"},
|
|
||||||
{2, &ACC_U0::ListAllUsers, "ListAllUsers"},
|
|
||||||
{3, &ACC_U0::ListOpenUsers, "ListOpenUsers"},
|
|
||||||
{4, &ACC_U0::GetLastOpenedUser, "GetLastOpenedUser"},
|
|
||||||
{5, &ACC_U0::GetProfile, "GetProfile"},
|
|
||||||
{6, nullptr, "GetProfileDigest"}, // 3.0.0+
|
|
||||||
{50, &ACC_U0::IsUserRegistrationRequestPermitted, "IsUserRegistrationRequestPermitted"},
|
|
||||||
{51, &ACC_U0::TrySelectUserWithoutInteractionDeprecated, "TrySelectUserWithoutInteractionDeprecated"},
|
|
||||||
{52, &ACC_U0::TrySelectUserWithoutInteraction, "TrySelectUserWithoutInteraction"},
|
|
||||||
{60, &ACC_U0::ListOpenContextStoredUsers, "ListOpenContextStoredUsers"}, // 5.0.0 - 5.1.0
|
|
||||||
{99, nullptr, "DebugActivateOpenContextRetention"}, // 6.0.0+
|
|
||||||
{100, &ACC_U0::InitializeApplicationInfo, "InitializeApplicationInfo"},
|
|
||||||
{101, &ACC_U0::GetBaasAccountManagerForApplication, "GetBaasAccountManagerForApplication"},
|
|
||||||
{102, nullptr, "AuthenticateApplicationAsync"},
|
|
||||||
{103, nullptr, "CheckNetworkServiceAvailabilityAsync"}, // 4.0.0+
|
|
||||||
{110, &ACC_U0::StoreSaveDataThumbnailApplication, "StoreSaveDataThumbnail"},
|
|
||||||
{111, nullptr, "ClearSaveDataThumbnail"},
|
|
||||||
{120, nullptr, "CreateGuestLoginRequest"},
|
|
||||||
{130, nullptr, "LoadOpenContext"}, // 5.0.0+
|
|
||||||
{131, &ACC_U0::ListOpenContextStoredUsers, "ListOpenContextStoredUsers"}, // 6.0.0+
|
|
||||||
{140, &ACC_U0::InitializeApplicationInfoRestricted, "InitializeApplicationInfoRestricted"}, // 6.0.0+
|
|
||||||
{141, &ACC_U0::ListQualifiedUsers, "ListQualifiedUsers"}, // 6.0.0+
|
|
||||||
{150, &ACC_U0::IsUserAccountSwitchLocked, "IsUserAccountSwitchLocked"}, // 6.0.0+
|
|
||||||
{160, &ACC_U0::InitializeApplicationInfoV2, "InitializeApplicationInfoV2"},
|
|
||||||
};
|
|
||||||
// clang-format on
|
|
||||||
|
|
||||||
RegisterHandlers(functions);
|
|
||||||
}
|
|
||||||
|
|
||||||
ACC_U0::~ACC_U0() = default;
|
|
||||||
|
|
||||||
} // namespace Service::Account
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "core/hle/service/acc/acc.h"
|
|
||||||
|
|
||||||
namespace Service::Account {
|
|
||||||
|
|
||||||
class ACC_U0 final : public Module::Interface {
|
|
||||||
public:
|
|
||||||
explicit ACC_U0(std::shared_ptr<Module> module_,
|
|
||||||
std::shared_ptr<ProfileManager> profile_manager_, Core::System& system_);
|
|
||||||
~ACC_U0() override;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace Service::Account
|
|
||||||
@@ -1,59 +0,0 @@
|
|||||||
// SPDX-FileCopyrightText: Copyright 2026 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
|
|
||||||
|
|
||||||
#include "core/hle/service/acc/acc_u1.h"
|
|
||||||
|
|
||||||
namespace Service::Account {
|
|
||||||
|
|
||||||
ACC_U1::ACC_U1(std::shared_ptr<Module> module_, std::shared_ptr<ProfileManager> profile_manager_,
|
|
||||||
Core::System& system_)
|
|
||||||
: Interface(std::move(module_), std::move(profile_manager_), system_, "acc:u1") {
|
|
||||||
// clang-format off
|
|
||||||
static const FunctionInfo functions[] = {
|
|
||||||
{0, &ACC_U1::GetUserCount, "GetUserCount"},
|
|
||||||
{1, &ACC_U1::GetUserExistence, "GetUserExistence"},
|
|
||||||
{2, &ACC_U1::ListAllUsers, "ListAllUsers"},
|
|
||||||
{3, &ACC_U1::ListOpenUsers, "ListOpenUsers"},
|
|
||||||
{4, &ACC_U1::GetLastOpenedUser, "GetLastOpenedUser"},
|
|
||||||
{5, &ACC_U1::GetProfile, "GetProfile"},
|
|
||||||
{6, nullptr, "GetProfileDigest"},
|
|
||||||
{50, &ACC_U1::IsUserRegistrationRequestPermitted, "IsUserRegistrationRequestPermitted"},
|
|
||||||
{51, &ACC_U1::TrySelectUserWithoutInteraction, "TrySelectUserWithoutInteraction"},
|
|
||||||
{60, &ACC_U1::ListOpenContextStoredUsers, "ListOpenContextStoredUsers"},
|
|
||||||
{99, nullptr, "DebugActivateOpenContextRetention"},
|
|
||||||
{100, nullptr, "GetUserRegistrationNotifier"},
|
|
||||||
{101, nullptr, "GetUserStateChangeNotifier"},
|
|
||||||
{102, &ACC_U1::GetBaasAccountManagerForSystemService, "GetBaasAccountManagerForSystemService"},
|
|
||||||
{103, nullptr, "GetBaasUserAvailabilityChangeNotifier"},
|
|
||||||
{104, nullptr, "GetProfileUpdateNotifier"},
|
|
||||||
{105, nullptr, "CheckNetworkServiceAvailabilityAsync"},
|
|
||||||
{106, nullptr, "GetProfileSyncNotifier"},
|
|
||||||
{110, &ACC_U1::StoreSaveDataThumbnailApplication, "StoreSaveDataThumbnail"},
|
|
||||||
{111, nullptr, "ClearSaveDataThumbnail"},
|
|
||||||
{112, nullptr, "LoadSaveDataThumbnail"},
|
|
||||||
{113, nullptr, "GetSaveDataThumbnailExistence"},
|
|
||||||
{120, nullptr, "ListOpenUsersInApplication"},
|
|
||||||
{130, nullptr, "ActivateOpenContextRetention"},
|
|
||||||
{140, &ACC_U1::ListQualifiedUsers, "ListQualifiedUsers"},
|
|
||||||
{150, nullptr, "AuthenticateApplicationAsync"},
|
|
||||||
{151, nullptr, "EnsureSignedDeviceIdentifierCacheForNintendoAccountAsync"},
|
|
||||||
{152, nullptr, "LoadSignedDeviceIdentifierCacheForNintendoAccount"},
|
|
||||||
{190, nullptr, "GetUserLastOpenedApplication"},
|
|
||||||
{191, nullptr, "ActivateOpenContextHolder"},
|
|
||||||
{401, &ACC_U1::GetPinCodeLength, "GetPinCodeLength"}, // 18.0.0+
|
|
||||||
{402, nullptr, "GetPinCode"}, // 18.0.0+
|
|
||||||
{997, nullptr, "DebugInvalidateTokenCacheForUser"},
|
|
||||||
{998, nullptr, "DebugSetUserStateClose"},
|
|
||||||
{999, nullptr, "DebugSetUserStateOpen"},
|
|
||||||
};
|
|
||||||
// clang-format on
|
|
||||||
|
|
||||||
RegisterHandlers(functions);
|
|
||||||
}
|
|
||||||
|
|
||||||
ACC_U1::~ACC_U1() = default;
|
|
||||||
|
|
||||||
} // namespace Service::Account
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "core/hle/service/acc/acc.h"
|
|
||||||
|
|
||||||
namespace Service::Account {
|
|
||||||
|
|
||||||
class ACC_U1 final : public Module::Interface {
|
|
||||||
public:
|
|
||||||
explicit ACC_U1(std::shared_ptr<Module> module_,
|
|
||||||
std::shared_ptr<ProfileManager> profile_manager_, Core::System& system_);
|
|
||||||
~ACC_U1() override;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace Service::Account
|
|
||||||
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
@@ -54,11 +57,58 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class BPC_C final : public ServiceFramework<BPC_C> {
|
||||||
|
public:
|
||||||
|
explicit BPC_C(Core::System& system_) : ServiceFramework{system_, "bpc:c"} {
|
||||||
|
// clang-format off
|
||||||
|
static const FunctionInfo functions[] = {
|
||||||
|
{0, nullptr, "ShutdownSystem"},
|
||||||
|
{1, nullptr, "RebootSystem"},
|
||||||
|
{2, nullptr, "GetWakeupReason"},
|
||||||
|
{3, nullptr, "GetShutdownReason"},
|
||||||
|
{4, nullptr, "GetAcOk"},
|
||||||
|
{5, nullptr, "GetPowerEvent"},
|
||||||
|
};
|
||||||
|
// clang-format on
|
||||||
|
RegisterHandlers(functions);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
class BPC_B final : public ServiceFramework<BPC_B> {
|
||||||
|
public:
|
||||||
|
explicit BPC_B(Core::System& system_) : ServiceFramework{system_, "bpc:b"} {
|
||||||
|
// clang-format off
|
||||||
|
static const FunctionInfo functions[] = {
|
||||||
|
{0, nullptr, "GetSleepButtonState"},
|
||||||
|
{1, nullptr, "GetPowerButtonEvent"},
|
||||||
|
};
|
||||||
|
// clang-format on
|
||||||
|
RegisterHandlers(functions);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
class BPC_W final : public ServiceFramework<BPC_W> {
|
||||||
|
public:
|
||||||
|
explicit BPC_W(Core::System& system_) : ServiceFramework{system_, "bpc:w"} {
|
||||||
|
// clang-format off
|
||||||
|
static const FunctionInfo functions[] = {
|
||||||
|
{0, nullptr, "CreateWakeupTimer"},
|
||||||
|
{1, nullptr, "CancelWakeupTimer"},
|
||||||
|
{2, nullptr, "EnableWakeupTimerOnDevice"},
|
||||||
|
};
|
||||||
|
// clang-format on
|
||||||
|
RegisterHandlers(functions);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
void LoopProcess(Core::System& system) {
|
void LoopProcess(Core::System& system) {
|
||||||
auto server_manager = std::make_unique<ServerManager>(system);
|
auto server_manager = std::make_unique<ServerManager>(system);
|
||||||
|
|
||||||
server_manager->RegisterNamedService("bpc", std::make_shared<BPC>(system));
|
server_manager->RegisterNamedService("bpc", std::make_shared<BPC>(system));
|
||||||
server_manager->RegisterNamedService("bpc:r", std::make_shared<BPC_R>(system));
|
server_manager->RegisterNamedService("bpc:r", std::make_shared<BPC_R>(system));
|
||||||
|
server_manager->RegisterNamedService("bpc:c", std::make_shared<BPC_C>(system));
|
||||||
|
server_manager->RegisterNamedService("bpc:b", std::make_shared<BPC_B>(system));
|
||||||
|
server_manager->RegisterNamedService("bpc:w", std::make_shared<BPC_W>(system));
|
||||||
ServerManager::RunServer(std::move(server_manager));
|
ServerManager::RunServer(std::move(server_manager));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,20 +18,12 @@ void LoopProcess(Core::System& system) {
|
|||||||
auto server_manager = std::make_unique<ServerManager>(system);
|
auto server_manager = std::make_unique<ServerManager>(system);
|
||||||
auto album_manager = std::make_shared<AlbumManager>(system);
|
auto album_manager = std::make_shared<AlbumManager>(system);
|
||||||
|
|
||||||
server_manager->RegisterNamedService(
|
server_manager->RegisterNamedService("caps:a", std::make_shared<IAlbumAccessorService>(system, album_manager));
|
||||||
"caps:a", std::make_shared<IAlbumAccessorService>(system, album_manager));
|
server_manager->RegisterNamedService("caps:c", std::make_shared<IAlbumControlService>(system, album_manager));
|
||||||
server_manager->RegisterNamedService(
|
server_manager->RegisterNamedService("caps:u", std::make_shared<IAlbumApplicationService>(system, album_manager));
|
||||||
"caps:c", std::make_shared<IAlbumControlService>(system, album_manager));
|
server_manager->RegisterNamedService("caps:ss", std::make_shared<IScreenShotService>(system, album_manager));
|
||||||
server_manager->RegisterNamedService(
|
server_manager->RegisterNamedService("caps:sc", std::make_shared<IScreenShotControlService>(system));
|
||||||
"caps:u", std::make_shared<IAlbumApplicationService>(system, album_manager));
|
server_manager->RegisterNamedService("caps:su", std::make_shared<IScreenShotApplicationService>(system, album_manager));
|
||||||
|
|
||||||
server_manager->RegisterNamedService(
|
|
||||||
"caps:ss", std::make_shared<IScreenShotService>(system, album_manager));
|
|
||||||
server_manager->RegisterNamedService("caps:sc",
|
|
||||||
std::make_shared<IScreenShotControlService>(system));
|
|
||||||
server_manager->RegisterNamedService(
|
|
||||||
"caps:su", std::make_shared<IScreenShotApplicationService>(system, album_manager));
|
|
||||||
|
|
||||||
ServerManager::RunServer(std::move(server_manager));
|
ServerManager::RunServer(std::move(server_manager));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -263,6 +263,9 @@ Result AlbumManager::SaveScreenShot(ApplicationAlbumEntry& out_entry,
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: ???
|
||||||
|
R_UNLESS(!image_data.empty(), ResultUnknown);
|
||||||
|
|
||||||
const auto date = ConvertToAlbumDateTime(posix_time);
|
const auto date = ConvertToAlbumDateTime(posix_time);
|
||||||
|
|
||||||
return SaveImage(out_entry, image_data, title_id, date);
|
return SaveImage(out_entry, image_data, title_id, date);
|
||||||
|
|||||||
@@ -43,6 +43,30 @@ private:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ECTX_W::ECTX_W(Core::System& system_) : ServiceFramework{system_, "ectx:w"} {
|
||||||
|
// clang-format off
|
||||||
|
static const FunctionInfo functions[] = {
|
||||||
|
{0, nullptr, "CreateContextRegistrar"},
|
||||||
|
{1, nullptr, "CommitContext"},
|
||||||
|
{2, nullptr, "RemoveContext"},
|
||||||
|
};
|
||||||
|
// clang-format on
|
||||||
|
RegisterHandlers(functions);
|
||||||
|
}
|
||||||
|
ECTX_W::~ECTX_W() = default;
|
||||||
|
|
||||||
|
ECTX_R::ECTX_R(Core::System& system_) : ServiceFramework{system_, "ectx:r"} {
|
||||||
|
// clang-format off
|
||||||
|
static const FunctionInfo functions[] = {
|
||||||
|
{0, nullptr, "GetContextInfo"},
|
||||||
|
{1, nullptr, "PullContext"},
|
||||||
|
{2, nullptr, "ListContextDescriptorWithResultForDebug"},
|
||||||
|
};
|
||||||
|
// clang-format on
|
||||||
|
RegisterHandlers(functions);
|
||||||
|
}
|
||||||
|
ECTX_R::~ECTX_R() = default;
|
||||||
|
|
||||||
ECTX_AW::ECTX_AW(Core::System& system_) : ServiceFramework{system_, "ectx:aw"} {
|
ECTX_AW::ECTX_AW(Core::System& system_) : ServiceFramework{system_, "ectx:aw"} {
|
||||||
// clang-format off
|
// clang-format off
|
||||||
static const FunctionInfo functions[] = {
|
static const FunctionInfo functions[] = {
|
||||||
|
|||||||
@@ -11,6 +11,18 @@ class System;
|
|||||||
|
|
||||||
namespace Service::Glue {
|
namespace Service::Glue {
|
||||||
|
|
||||||
|
class ECTX_W final : public ServiceFramework<ECTX_W> {
|
||||||
|
public:
|
||||||
|
explicit ECTX_W(Core::System& system_);
|
||||||
|
~ECTX_W() override;
|
||||||
|
};
|
||||||
|
|
||||||
|
class ECTX_R final : public ServiceFramework<ECTX_R> {
|
||||||
|
public:
|
||||||
|
explicit ECTX_R(Core::System& system_);
|
||||||
|
~ECTX_R() override;
|
||||||
|
};
|
||||||
|
|
||||||
class ECTX_AW final : public ServiceFramework<ECTX_AW> {
|
class ECTX_AW final : public ServiceFramework<ECTX_AW> {
|
||||||
public:
|
public:
|
||||||
explicit ECTX_AW(Core::System& system_);
|
explicit ECTX_AW(Core::System& system_);
|
||||||
|
|||||||
@@ -19,40 +19,27 @@ void LoopProcess(Core::System& system) {
|
|||||||
auto server_manager = std::make_unique<ServerManager>(system);
|
auto server_manager = std::make_unique<ServerManager>(system);
|
||||||
|
|
||||||
// ARP
|
// ARP
|
||||||
server_manager->RegisterNamedService("arp:r",
|
server_manager->RegisterNamedService("arp:r", std::make_shared<ARP_R>(system, system.GetARPManager()));
|
||||||
std::make_shared<ARP_R>(system, system.GetARPManager()));
|
server_manager->RegisterNamedService("arp:w", std::make_shared<ARP_W>(system, system.GetARPManager()));
|
||||||
server_manager->RegisterNamedService("arp:w",
|
|
||||||
std::make_shared<ARP_W>(system, system.GetARPManager()));
|
|
||||||
|
|
||||||
// BackGround Task Controller
|
// BackGround Task Controller
|
||||||
server_manager->RegisterNamedService("bgtc:t", std::make_shared<BGTC_T>(system));
|
server_manager->RegisterNamedService("bgtc:t", std::make_shared<BGTC_T>(system));
|
||||||
server_manager->RegisterNamedService("bgtc:sc", std::make_shared<BGTC_SC>(system));
|
server_manager->RegisterNamedService("bgtc:sc", std::make_shared<BGTC_SC>(system));
|
||||||
|
|
||||||
// Error Context
|
// Error Context
|
||||||
|
server_manager->RegisterNamedService("ectx:w", std::make_shared<ECTX_W>(system));
|
||||||
|
server_manager->RegisterNamedService("ectx:r", std::make_shared<ECTX_R>(system));
|
||||||
server_manager->RegisterNamedService("ectx:aw", std::make_shared<ECTX_AW>(system));
|
server_manager->RegisterNamedService("ectx:aw", std::make_shared<ECTX_AW>(system));
|
||||||
|
|
||||||
// Notification Services
|
// Notification Services
|
||||||
server_manager->RegisterNamedService(
|
server_manager->RegisterNamedService("notif:a", std::make_shared<INotificationServicesForApplication>(system));
|
||||||
"notif:a", std::make_shared<INotificationServicesForApplication>(system));
|
server_manager->RegisterNamedService("notif:s", std::make_shared<INotificationServices>(system));
|
||||||
server_manager->RegisterNamedService("notif:s",
|
|
||||||
std::make_shared<INotificationServices>(system));
|
|
||||||
|
|
||||||
// Time
|
// Time
|
||||||
auto time = std::make_shared<Time::TimeManager>(system);
|
auto time = std::make_shared<Time::TimeManager>(system);
|
||||||
|
server_manager->RegisterNamedService("time:u", std::make_shared<Time::StaticService>(system, Service::PSC::Time::StaticServiceSetupInfo{0, 0, 0, 0, 0, 0}, time, "time:u"));
|
||||||
server_manager->RegisterNamedService(
|
server_manager->RegisterNamedService("time:a", std::make_shared<Time::StaticService>(system, Service::PSC::Time::StaticServiceSetupInfo{1, 1, 0, 1, 0, 0}, time, "time:a"));
|
||||||
"time:u",
|
server_manager->RegisterNamedService("time:r", std::make_shared<Time::StaticService>(system, Service::PSC::Time::StaticServiceSetupInfo{0, 0, 0, 0, 1, 0}, time, "time:r"));
|
||||||
std::make_shared<Time::StaticService>(
|
|
||||||
system, Service::PSC::Time::StaticServiceSetupInfo{0, 0, 0, 0, 0, 0}, time, "time:u"));
|
|
||||||
server_manager->RegisterNamedService(
|
|
||||||
"time:a",
|
|
||||||
std::make_shared<Time::StaticService>(
|
|
||||||
system, Service::PSC::Time::StaticServiceSetupInfo{1, 1, 0, 1, 0, 0}, time, "time:a"));
|
|
||||||
server_manager->RegisterNamedService(
|
|
||||||
"time:r",
|
|
||||||
std::make_shared<Time::StaticService>(
|
|
||||||
system, Service::PSC::Time::StaticServiceSetupInfo{0, 0, 0, 0, 1, 0}, time, "time:r"));
|
|
||||||
|
|
||||||
ServerManager::RunServer(std::move(server_manager));
|
ServerManager::RunServer(std::move(server_manager));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
@@ -16,27 +19,77 @@
|
|||||||
|
|
||||||
namespace Service::HID {
|
namespace Service::HID {
|
||||||
|
|
||||||
|
class IHidTemporaryServer final : public ServiceFramework<IHidTemporaryServer> {
|
||||||
|
public:
|
||||||
|
explicit IHidTemporaryServer(Core::System& system_)
|
||||||
|
: ServiceFramework{system_, "hid:tmp"} {
|
||||||
|
// clang-format off
|
||||||
|
static const FunctionInfo functions[] = {
|
||||||
|
{0, nullptr, "GetConsoleSixAxisSensorCalibrationValues"},
|
||||||
|
};
|
||||||
|
// clang-format on
|
||||||
|
RegisterHandlers(functions);
|
||||||
|
}
|
||||||
|
~IHidTemporaryServer() override = default;
|
||||||
|
};
|
||||||
|
|
||||||
|
class AHID_CD final : public ServiceFramework<AHID_CD> {
|
||||||
|
public:
|
||||||
|
explicit AHID_CD(Core::System& system_)
|
||||||
|
: ServiceFramework{system_, "ahid:cd"} {
|
||||||
|
// clang-format off
|
||||||
|
static const FunctionInfo functions[] = {
|
||||||
|
{0, nullptr, "AcquireDevice"},
|
||||||
|
{1, nullptr, "ReleaseDevice"},
|
||||||
|
{2, nullptr, "GetCtrlSession"},
|
||||||
|
{3, nullptr, "GetReadSession"},
|
||||||
|
{4, nullptr, "GetWriteSession"},
|
||||||
|
};
|
||||||
|
// clang-format on
|
||||||
|
RegisterHandlers(functions);
|
||||||
|
}
|
||||||
|
~AHID_CD() override = default;
|
||||||
|
};
|
||||||
|
|
||||||
|
class AHID_HDR final : public ServiceFramework<AHID_HDR> {
|
||||||
|
public:
|
||||||
|
explicit AHID_HDR(Core::System& system_)
|
||||||
|
: ServiceFramework{system_, "ahid:hdr"} {
|
||||||
|
// clang-format off
|
||||||
|
static const FunctionInfo functions[] = {
|
||||||
|
{0, nullptr, "GetDeviceEntries"},
|
||||||
|
{1, nullptr, "GetDeviceList"},
|
||||||
|
{2, nullptr, "GetDeviceParameters"},
|
||||||
|
{3, nullptr, "AttachDevice"},
|
||||||
|
{4, nullptr, "DetachDevice"},
|
||||||
|
{5, nullptr, "SetDeviceFilter"},
|
||||||
|
};
|
||||||
|
// clang-format on
|
||||||
|
RegisterHandlers(functions);
|
||||||
|
}
|
||||||
|
~AHID_HDR() override = default;
|
||||||
|
};
|
||||||
|
|
||||||
void LoopProcess(Core::System& system) {
|
void LoopProcess(Core::System& system) {
|
||||||
auto server_manager = std::make_unique<ServerManager>(system);
|
auto server_manager = std::make_unique<ServerManager>(system);
|
||||||
std::shared_ptr<HidFirmwareSettings> firmware_settings =
|
auto firmware_settings = std::make_shared<HidFirmwareSettings>(system);
|
||||||
std::make_shared<HidFirmwareSettings>(system);
|
auto resource_manager = std::make_shared<ResourceManager>(system, firmware_settings);
|
||||||
std::shared_ptr<ResourceManager> resource_manager =
|
|
||||||
std::make_shared<ResourceManager>(system, firmware_settings);
|
|
||||||
|
|
||||||
resource_manager->Initialize();
|
resource_manager->Initialize();
|
||||||
|
|
||||||
server_manager->RegisterNamedService(
|
server_manager->RegisterNamedService("hid", std::make_shared<IHidServer>(system, resource_manager, firmware_settings));
|
||||||
"hid", std::make_shared<IHidServer>(system, resource_manager, firmware_settings));
|
server_manager->RegisterNamedService("hid:dbg", std::make_shared<IHidDebugServer>(system, resource_manager, firmware_settings));
|
||||||
server_manager->RegisterNamedService(
|
server_manager->RegisterNamedService("hid:sys", std::make_shared<IHidSystemServer>(system, resource_manager, firmware_settings));
|
||||||
"hid:dbg", std::make_shared<IHidDebugServer>(system, resource_manager, firmware_settings));
|
server_manager->RegisterNamedService("hid:tmp", std::make_shared<IHidTemporaryServer>(system));
|
||||||
server_manager->RegisterNamedService(
|
|
||||||
"hid:sys", std::make_shared<IHidSystemServer>(system, resource_manager, firmware_settings));
|
|
||||||
|
|
||||||
server_manager->RegisterNamedService("hidbus", std::make_shared<Hidbus>(system));
|
server_manager->RegisterNamedService("hidbus", std::make_shared<Hidbus>(system));
|
||||||
|
|
||||||
server_manager->RegisterNamedService("irs", std::make_shared<IRS::IRS>(system));
|
server_manager->RegisterNamedService("irs", std::make_shared<IRS::IRS>(system));
|
||||||
server_manager->RegisterNamedService("irs:sys", std::make_shared<IRS::IRS_SYS>(system));
|
server_manager->RegisterNamedService("irs:sys", std::make_shared<IRS::IRS_SYS>(system));
|
||||||
|
|
||||||
|
server_manager->RegisterNamedService("ahid:cd", std::make_shared<AHID_CD>(system));
|
||||||
|
server_manager->RegisterNamedService("ahid:hdr", std::make_shared<AHID_HDR>(system));
|
||||||
|
|
||||||
server_manager->RegisterNamedService("xcd:sys", std::make_shared<XCD_SYS>(system));
|
server_manager->RegisterNamedService("xcd:sys", std::make_shared<XCD_SYS>(system));
|
||||||
|
|
||||||
system.RunServer(std::move(server_manager));
|
system.RunServer(std::move(server_manager));
|
||||||
|
|||||||
@@ -38,10 +38,30 @@ IHidSystemServer::IHidSystemServer(Core::System& system_, std::shared_ptr<Resour
|
|||||||
{213, nullptr, "ActivateNfc"},
|
{213, nullptr, "ActivateNfc"},
|
||||||
{214, nullptr, "GetXcdHandleForNpadWithNfc"},
|
{214, nullptr, "GetXcdHandleForNpadWithNfc"},
|
||||||
{215, nullptr, "IsNfcActivated"},
|
{215, nullptr, "IsNfcActivated"},
|
||||||
{230, nullptr, "AcquireIrSensorEventHandle"},
|
{216, nullptr, "GetAbstractedPadIdForNpadWithNfc"},
|
||||||
|
{217, nullptr, "SetNfcEvent"},
|
||||||
|
{218, nullptr, "GetNfcInfo"},
|
||||||
|
{219, nullptr, "StartNfcDiscovery"},
|
||||||
|
{220, nullptr, "StopNfcDiscovery"},
|
||||||
|
{221, nullptr, "StartNtagRead"},
|
||||||
|
{222, nullptr, "StartNtagWrite"},
|
||||||
|
{223, nullptr, "SendNfcRawData"},
|
||||||
|
{224, nullptr, "RegisterMifareKey"},
|
||||||
|
{225, nullptr, "ClearMifareKey"},
|
||||||
|
{226, nullptr, "StartMifareRead"},
|
||||||
|
{227, nullptr, "StartMifareWrite"},
|
||||||
|
{230, nullptr, "AcquireIrSensorEventHndle" },
|
||||||
{231, nullptr, "ActivateIrSensor"},
|
{231, nullptr, "ActivateIrSensor"},
|
||||||
{232, nullptr, "GetIrSensorState"},
|
{232, nullptr, "GetIrSensorState"},
|
||||||
{233, nullptr, "GetXcdHandleForNpadWithIrSensor"},
|
{233, nullptr, "GetXcdHandleForNpadWihIrSensor" },
|
||||||
|
{234, nullptr, "GetNpadJoyHoldType"},
|
||||||
|
{241, nullptr, "GetDataFormat"},
|
||||||
|
{242, nullptr, "SetDataFormat"},
|
||||||
|
{243, nullptr, "GetMcuState"},
|
||||||
|
{244, nullptr, "SetMcuState"},
|
||||||
|
{245, nullptr, "GetMcuVersionForNfc"},
|
||||||
|
{246, nullptr, "CheckNfcDevicePower"},
|
||||||
|
{247, nullptr, "SetMcuStateImmediate"},
|
||||||
{301, nullptr, "ActivateNpadSystem"},
|
{301, nullptr, "ActivateNpadSystem"},
|
||||||
{303, &IHidSystemServer::ApplyNpadSystemCommonPolicy, "ApplyNpadSystemCommonPolicy"},
|
{303, &IHidSystemServer::ApplyNpadSystemCommonPolicy, "ApplyNpadSystemCommonPolicy"},
|
||||||
{304, &IHidSystemServer::EnableAssigningSingleOnSlSrPress, "EnableAssigningSingleOnSlSrPress"},
|
{304, &IHidSystemServer::EnableAssigningSingleOnSlSrPress, "EnableAssigningSingleOnSlSrPress"},
|
||||||
|
|||||||
@@ -330,12 +330,12 @@ public:
|
|||||||
/// Helper function to test whether the output buffer at buffer_index can be written
|
/// Helper function to test whether the output buffer at buffer_index can be written
|
||||||
[[nodiscard]] bool CanWriteBuffer(std::size_t buffer_index = 0) const;
|
[[nodiscard]] bool CanWriteBuffer(std::size_t buffer_index = 0) const;
|
||||||
|
|
||||||
[[nodiscard]] Handle GetCopyHandle(std::size_t index) const {
|
[[nodiscard]] Handle GetCopyHandle(std::size_t index) const noexcept {
|
||||||
return incoming_copy_handles.at(index);
|
return index >= incoming_copy_handles.size() ? 0 : incoming_copy_handles[index];
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] Handle GetMoveHandle(std::size_t index) const {
|
[[nodiscard]] Handle GetMoveHandle(std::size_t index) const noexcept {
|
||||||
return incoming_move_handles.at(index);
|
return index >= incoming_move_handles.size() ? 0 : incoming_move_handles[index];
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddMoveObject(Kernel::KAutoObject* object) {
|
void AddMoveObject(Kernel::KAutoObject* object) {
|
||||||
|
|||||||
@@ -0,0 +1,86 @@
|
|||||||
|
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#include "common/logging.h"
|
||||||
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
|
#include "core/hle/service/mnpp/mnpp.h"
|
||||||
|
#include "core/hle/service/server_manager.h"
|
||||||
|
#include "core/hle/service/service.h"
|
||||||
|
|
||||||
|
namespace Service::MNPP {
|
||||||
|
|
||||||
|
class MNPP_APP final : public ServiceFramework<MNPP_APP> {
|
||||||
|
public:
|
||||||
|
explicit MNPP_APP(Core::System& system_) : ServiceFramework{system_, "mnpp:app"} {
|
||||||
|
// clang-format off
|
||||||
|
static const FunctionInfo functions[] = {
|
||||||
|
{0, &MNPP_APP::Cmd0, "Cmd0"},
|
||||||
|
{1, &MNPP_APP::Cmd1, "Cmd1"},
|
||||||
|
};
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
|
RegisterHandlers(functions);
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
void Cmd0(HLERequestContext& ctx) {
|
||||||
|
LOG_WARNING(Service_MNPP, "(STUBBED) called");
|
||||||
|
|
||||||
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
|
rb.Push(ResultSuccess);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Cmd1(HLERequestContext& ctx) {
|
||||||
|
LOG_WARNING(Service_MNPP, "(STUBBED) called");
|
||||||
|
|
||||||
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
|
rb.Push(ResultSuccess);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
class MNPP_SYS final : public ServiceFramework<MNPP_SYS> {
|
||||||
|
public:
|
||||||
|
explicit MNPP_SYS(Core::System& system_) : ServiceFramework{system_, "mnpp:sys"} {
|
||||||
|
// clang-format off
|
||||||
|
static const FunctionInfo functions[] = {
|
||||||
|
{0, nullptr, "Cmd0"},
|
||||||
|
{10, nullptr, "Cmd10"},
|
||||||
|
{100, nullptr, "Cmd100"},
|
||||||
|
{200, nullptr, "Cmd200"},
|
||||||
|
{300, nullptr, "Cmd300"},
|
||||||
|
{400, nullptr, "Cmd400"},
|
||||||
|
};
|
||||||
|
// clang-format on
|
||||||
|
RegisterHandlers(functions);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
class MNPP_WEB final : public ServiceFramework<MNPP_WEB> {
|
||||||
|
public:
|
||||||
|
explicit MNPP_WEB(Core::System& system_) : ServiceFramework{system_, "mnpp:web"} {
|
||||||
|
// clang-format off
|
||||||
|
static const FunctionInfo functions[] = {
|
||||||
|
{0, nullptr, "Cmd0"},
|
||||||
|
{1, nullptr, "Cmd1"},
|
||||||
|
{10, nullptr, "Cmd10"},
|
||||||
|
{20, nullptr, "Cmd20"},
|
||||||
|
{100, nullptr, "Cmd100"},
|
||||||
|
};
|
||||||
|
// clang-format on
|
||||||
|
RegisterHandlers(functions);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
void LoopProcess(Core::System& system) {
|
||||||
|
auto server_manager = std::make_unique<ServerManager>(system);
|
||||||
|
|
||||||
|
server_manager->RegisterNamedService("mnpp:app", std::make_shared<MNPP_APP>(system));
|
||||||
|
server_manager->RegisterNamedService("mnpp:sys", std::make_shared<MNPP_SYS>(system));
|
||||||
|
server_manager->RegisterNamedService("mnpp:web", std::make_shared<MNPP_WEB>(system));
|
||||||
|
ServerManager::RunServer(std::move(server_manager));
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace Service::MNPP
|
||||||
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
|
||||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
||||||
|
|
||||||
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
|
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
|
|
||||||
#include "common/logging.h"
|
|
||||||
#include "core/hle/service/ipc_helpers.h"
|
|
||||||
#include "core/hle/service/mnpp/mnpp_app.h"
|
|
||||||
#include "core/hle/service/server_manager.h"
|
|
||||||
#include "core/hle/service/service.h"
|
|
||||||
|
|
||||||
namespace Service::MNPP {
|
|
||||||
|
|
||||||
class MNPP_APP final : public ServiceFramework<MNPP_APP> {
|
|
||||||
public:
|
|
||||||
explicit MNPP_APP(Core::System& system_) : ServiceFramework{system_, "mnpp:app"} {
|
|
||||||
// clang-format off
|
|
||||||
static const FunctionInfo functions[] = {
|
|
||||||
{0, &MNPP_APP::Unknown0, "unknown0"},
|
|
||||||
{1, &MNPP_APP::Unknown1, "unknown1"},
|
|
||||||
};
|
|
||||||
// clang-format on
|
|
||||||
|
|
||||||
RegisterHandlers(functions);
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
void Unknown0(HLERequestContext& ctx) {
|
|
||||||
LOG_WARNING(Service_MNPP, "(STUBBED) called");
|
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
|
||||||
rb.Push(ResultSuccess);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Unknown1(HLERequestContext& ctx) {
|
|
||||||
LOG_WARNING(Service_MNPP, "(STUBBED) called");
|
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
|
||||||
rb.Push(ResultSuccess);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
void LoopProcess(Core::System& system) {
|
|
||||||
auto server_manager = std::make_unique<ServerManager>(system);
|
|
||||||
|
|
||||||
server_manager->RegisterNamedService("mnpp:app", std::make_shared<MNPP_APP>(system));
|
|
||||||
ServerManager::RunServer(std::move(server_manager));
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace Service::MNPP
|
|
||||||
@@ -55,6 +55,30 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class PCV_ARB final : public ServiceFramework<PCV_ARB> {
|
||||||
|
public:
|
||||||
|
explicit PCV_ARB(Core::System& system_) : ServiceFramework{system_, "pcv:arb"} {
|
||||||
|
// clang-format off
|
||||||
|
static const FunctionInfo functions[] = {
|
||||||
|
{0, nullptr, "ReleaseControl"},
|
||||||
|
};
|
||||||
|
// clang-format on
|
||||||
|
RegisterHandlers(functions);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
class PCV_IMM final : public ServiceFramework<PCV_IMM> {
|
||||||
|
public:
|
||||||
|
explicit PCV_IMM(Core::System& system_) : ServiceFramework{system_, "pcv:imm"} {
|
||||||
|
// clang-format off
|
||||||
|
static const FunctionInfo functions[] = {
|
||||||
|
{0, nullptr, "SetClockRate"},
|
||||||
|
};
|
||||||
|
// clang-format on
|
||||||
|
RegisterHandlers(functions);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
class IClkrstSession final : public ServiceFramework<IClkrstSession> {
|
class IClkrstSession final : public ServiceFramework<IClkrstSession> {
|
||||||
public:
|
public:
|
||||||
explicit IClkrstSession(Core::System& system_, DeviceCode device_code_)
|
explicit IClkrstSession(Core::System& system_, DeviceCode device_code_)
|
||||||
@@ -148,6 +172,8 @@ void LoopProcess(Core::System& system) {
|
|||||||
auto server_manager = std::make_unique<ServerManager>(system);
|
auto server_manager = std::make_unique<ServerManager>(system);
|
||||||
|
|
||||||
server_manager->RegisterNamedService("pcv", std::make_shared<PCV>(system));
|
server_manager->RegisterNamedService("pcv", std::make_shared<PCV>(system));
|
||||||
|
server_manager->RegisterNamedService("pcv:arb", std::make_shared<PCV_ARB>(system));
|
||||||
|
server_manager->RegisterNamedService("pcv:imm", std::make_shared<PCV_IMM>(system));
|
||||||
server_manager->RegisterNamedService("clkrst", std::make_shared<CLKRST>(system, "clkrst"));
|
server_manager->RegisterNamedService("clkrst", std::make_shared<CLKRST>(system, "clkrst"));
|
||||||
server_manager->RegisterNamedService("clkrst:i", std::make_shared<CLKRST>(system, "clkrst:i"));
|
server_manager->RegisterNamedService("clkrst:i", std::make_shared<CLKRST>(system, "clkrst:i"));
|
||||||
server_manager->RegisterNamedService("clkrst:a", std::make_shared<CLKRST_A>(system));
|
server_manager->RegisterNamedService("clkrst:a", std::make_shared<CLKRST_A>(system));
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
#include "core/hle/service/mig/mig.h"
|
#include "core/hle/service/mig/mig.h"
|
||||||
#include "core/hle/service/mii/mii.h"
|
#include "core/hle/service/mii/mii.h"
|
||||||
#include "core/hle/service/mm/mm_u.h"
|
#include "core/hle/service/mm/mm_u.h"
|
||||||
#include "core/hle/service/mnpp/mnpp_app.h"
|
#include "core/hle/service/mnpp/mnpp.h"
|
||||||
#include "core/hle/service/ncm/ncm.h"
|
#include "core/hle/service/ncm/ncm.h"
|
||||||
#include "core/hle/service/nfc/nfc.h"
|
#include "core/hle/service/nfc/nfc.h"
|
||||||
#include "core/hle/service/nfp/nfp.h"
|
#include "core/hle/service/nfp/nfp.h"
|
||||||
|
|||||||
@@ -173,8 +173,26 @@ void BSD::Socket(HLERequestContext& ctx) {
|
|||||||
|
|
||||||
LOG_DEBUG(Service, "called. domain={} type={} protocol={}", domain, type, protocol);
|
LOG_DEBUG(Service, "called. domain={} type={} protocol={}", domain, type, protocol);
|
||||||
|
|
||||||
const auto [fd, bsd_errno] = SocketImpl(static_cast<Domain>(domain), static_cast<Type>(type),
|
const auto [fd, bsd_errno] = SocketImpl(Domain(domain), Type(type), Protocol(protocol));
|
||||||
static_cast<Protocol>(protocol));
|
|
||||||
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
|
rb.Push(ResultSuccess);
|
||||||
|
rb.Push<s32>(fd);
|
||||||
|
rb.PushEnum(bsd_errno);
|
||||||
|
}
|
||||||
|
|
||||||
|
void BSD::SocketExempt(HLERequestContext& ctx) {
|
||||||
|
IPC::RequestParser rp{ctx};
|
||||||
|
const u32 domain = rp.Pop<u32>();
|
||||||
|
const u32 type = rp.Pop<u32>();
|
||||||
|
const u32 protocol = rp.Pop<u32>();
|
||||||
|
|
||||||
|
LOG_DEBUG(Service, "called. domain={} type={} protocol={}", domain, type, protocol);
|
||||||
|
|
||||||
|
auto [fd, bsd_errno] = SocketImpl(Domain(domain), Type(type), Protocol(protocol));
|
||||||
|
if (bsd_errno == Errno::SUCCESS) {
|
||||||
|
bsd_errno = ShutdownImpl(fd, 0);
|
||||||
|
}
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
@@ -445,6 +463,7 @@ void BSD::Close(HLERequestContext& ctx) {
|
|||||||
BuildErrnoResponse(ctx, CloseImpl(fd));
|
BuildErrnoResponse(ctx, CloseImpl(fd));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// @brief Only bsd:s is able to dup()
|
||||||
void BSD::DuplicateSocket(HLERequestContext& ctx) {
|
void BSD::DuplicateSocket(HLERequestContext& ctx) {
|
||||||
struct InputParameters {
|
struct InputParameters {
|
||||||
s32 fd;
|
s32 fd;
|
||||||
@@ -463,6 +482,13 @@ void BSD::DuplicateSocket(HLERequestContext& ctx) {
|
|||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
|
if (is_user) {
|
||||||
|
rb.PushRaw(OutputParameters{
|
||||||
|
.ret = 0,
|
||||||
|
.bsd_errno = Errno::INVAL,
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
auto const res_v = DuplicateSocketImpl(input.fd);
|
auto const res_v = DuplicateSocketImpl(input.fd);
|
||||||
if (auto* res = std::get_if<s32>(&res_v)) {
|
if (auto* res = std::get_if<s32>(&res_v)) {
|
||||||
@@ -496,11 +522,13 @@ void BSD::ExecuteWork(HLERequestContext& ctx, Work work) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::pair<s32, Errno> BSD::SocketImpl(Domain domain, Type type, Protocol protocol) {
|
std::pair<s32, Errno> BSD::SocketImpl(Domain domain, Type type, Protocol protocol) {
|
||||||
|
// user bsd:u has restrictions on SOCK_SEQPACKET and SOCK_RAW
|
||||||
if (type == Type::SEQPACKET) {
|
if (is_user && (type == Type::SEQPACKET || type == Type::RAW)) {
|
||||||
UNIMPLEMENTED_MSG("SOCK_SEQPACKET errno management");
|
if (type == Type::RAW && domain == Domain::INET && protocol == Protocol::ICMP) {
|
||||||
} else if (type == Type::RAW && (domain != Domain::INET || protocol != Protocol::ICMP)) {
|
// fine, can use on bsd:s and bsd:u
|
||||||
UNIMPLEMENTED_MSG("SOCK_RAW errno management");
|
} else {
|
||||||
|
return {-1, Errno::INVAL};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[[maybe_unused]] const bool unk_flag = (static_cast<u32>(type) & 0x20000000) != 0;
|
[[maybe_unused]] const bool unk_flag = (static_cast<u32>(type) & 0x20000000) != 0;
|
||||||
@@ -1052,14 +1080,15 @@ void BSD::OnProxyPacketReceived(const Network::ProxyPacket& packet) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
BSD::BSD(Core::System& system_, const char* name)
|
BSD::BSD(Core::System& system_, const char* name, bool is_user_)
|
||||||
: ServiceFramework{system_, name} {
|
: ServiceFramework{system_, name}
|
||||||
|
, is_user{is_user_} {
|
||||||
// clang-format off
|
// clang-format off
|
||||||
static const FunctionInfo functions[] = {
|
static const FunctionInfo functions[] = {
|
||||||
{0, &BSD::RegisterClient, "RegisterClient"},
|
{0, &BSD::RegisterClient, "RegisterClient"},
|
||||||
{1, &BSD::StartMonitoring, "StartMonitoring"},
|
{1, &BSD::StartMonitoring, "StartMonitoring"},
|
||||||
{2, &BSD::Socket, "Socket"},
|
{2, &BSD::Socket, "Socket"},
|
||||||
{3, nullptr, "SocketExempt"},
|
{3, &BSD::SocketExempt, "SocketExempt"},
|
||||||
{4, nullptr, "Open"},
|
{4, nullptr, "Open"},
|
||||||
{5, &BSD::Select, "Select"},
|
{5, &BSD::Select, "Select"},
|
||||||
{6, &BSD::Poll, "Poll"},
|
{6, &BSD::Poll, "Poll"},
|
||||||
@@ -1125,7 +1154,8 @@ std::unique_lock<std::mutex> BSD::LockService() noexcept {
|
|||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
BSDCFG::BSDCFG(Core::System& system_) : ServiceFramework{system_, "bsdcfg"} {
|
BSDCFG::BSDCFG(Core::System& system_, const char *name)
|
||||||
|
: ServiceFramework{system_, name} {
|
||||||
// clang-format off
|
// clang-format off
|
||||||
static const FunctionInfo functions[] = {
|
static const FunctionInfo functions[] = {
|
||||||
{0, nullptr, "SetIfUp"},
|
{0, nullptr, "SetIfUp"},
|
||||||
@@ -1152,4 +1182,16 @@ BSDCFG::BSDCFG(Core::System& system_) : ServiceFramework{system_, "bsdcfg"} {
|
|||||||
|
|
||||||
BSDCFG::~BSDCFG() = default;
|
BSDCFG::~BSDCFG() = default;
|
||||||
|
|
||||||
|
BSD_NU::BSD_NU(Core::System& system_)
|
||||||
|
: ServiceFramework{system_, "bsd:nu"} {
|
||||||
|
// clang-format off
|
||||||
|
static const FunctionInfo functions[] = {
|
||||||
|
{0, nullptr, "CreateUserService"},
|
||||||
|
};
|
||||||
|
// clang-format on
|
||||||
|
RegisterHandlers(functions);
|
||||||
|
}
|
||||||
|
|
||||||
|
BSD_NU::~BSD_NU() = default;
|
||||||
|
|
||||||
} // namespace Service::Sockets
|
} // namespace Service::Sockets
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ namespace Service::Sockets {
|
|||||||
|
|
||||||
class BSD final : public ServiceFramework<BSD> {
|
class BSD final : public ServiceFramework<BSD> {
|
||||||
public:
|
public:
|
||||||
explicit BSD(Core::System& system_, const char* name);
|
explicit BSD(Core::System& system_, const char* name, bool is_user);
|
||||||
~BSD() override;
|
~BSD() override;
|
||||||
|
|
||||||
// These methods are called from SSL; the first two are also called from
|
// These methods are called from SSL; the first two are also called from
|
||||||
@@ -129,6 +129,7 @@ private:
|
|||||||
void RegisterClient(HLERequestContext& ctx);
|
void RegisterClient(HLERequestContext& ctx);
|
||||||
void StartMonitoring(HLERequestContext& ctx);
|
void StartMonitoring(HLERequestContext& ctx);
|
||||||
void Socket(HLERequestContext& ctx);
|
void Socket(HLERequestContext& ctx);
|
||||||
|
void SocketExempt(HLERequestContext& ctx);
|
||||||
void Select(HLERequestContext& ctx);
|
void Select(HLERequestContext& ctx);
|
||||||
void Poll(HLERequestContext& ctx);
|
void Poll(HLERequestContext& ctx);
|
||||||
void Accept(HLERequestContext& ctx);
|
void Accept(HLERequestContext& ctx);
|
||||||
@@ -155,8 +156,7 @@ private:
|
|||||||
void ExecuteWork(HLERequestContext& ctx, Work work);
|
void ExecuteWork(HLERequestContext& ctx, Work work);
|
||||||
|
|
||||||
std::pair<s32, Errno> SocketImpl(Domain domain, Type type, Protocol protocol);
|
std::pair<s32, Errno> SocketImpl(Domain domain, Type type, Protocol protocol);
|
||||||
std::pair<s32, Errno> PollImpl(std::vector<u8>& write_buffer, std::span<const u8> read_buffer,
|
std::pair<s32, Errno> PollImpl(std::vector<u8>& write_buffer, std::span<const u8> read_buffer, s32 nfds, s32 timeout);
|
||||||
s32 nfds, s32 timeout);
|
|
||||||
std::pair<s32, Errno> AcceptImpl(s32 fd, std::vector<u8>& write_buffer);
|
std::pair<s32, Errno> AcceptImpl(s32 fd, std::vector<u8>& write_buffer);
|
||||||
Errno BindImpl(s32 fd, std::span<const u8> addr);
|
Errno BindImpl(s32 fd, std::span<const u8> addr);
|
||||||
Errno ConnectImpl(s32 fd, std::span<const u8> addr);
|
Errno ConnectImpl(s32 fd, std::span<const u8> addr);
|
||||||
@@ -189,12 +189,19 @@ private:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::unique_lock<std::mutex> LockService() noexcept override;
|
std::unique_lock<std::mutex> LockService() noexcept override;
|
||||||
|
bool is_user = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
class BSDCFG final : public ServiceFramework<BSDCFG> {
|
class BSDCFG final : public ServiceFramework<BSDCFG> {
|
||||||
public:
|
public:
|
||||||
explicit BSDCFG(Core::System& system_);
|
explicit BSDCFG(Core::System& system_, const char *name);
|
||||||
~BSDCFG() override;
|
~BSDCFG() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class BSD_NU final : public ServiceFramework<BSD_NU> {
|
||||||
|
public:
|
||||||
|
explicit BSD_NU(Core::System& system_);
|
||||||
|
~BSD_NU() override;
|
||||||
|
};
|
||||||
|
|
||||||
} // namespace Service::Sockets
|
} // namespace Service::Sockets
|
||||||
|
|||||||
@@ -406,4 +406,21 @@ void SFDNSRES::ResolverSetOptionRequest(HLERequestContext& ctx) {
|
|||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<s32>(0); // bsd errno
|
rb.Push<s32>(0); // bsd errno
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
DNS_PRIV::DNS_PRIV(Core::System& system_)
|
||||||
|
: ServiceFramework{system_, "dns:priv"} {
|
||||||
|
// clang-format off
|
||||||
|
static const FunctionInfo functions[] = {
|
||||||
|
{0, nullptr, "Cmd0"},
|
||||||
|
{1, nullptr, "Cmd1"},
|
||||||
|
{2, nullptr, "Cmd2"},
|
||||||
|
};
|
||||||
|
// clang-format on
|
||||||
|
RegisterHandlers(functions);
|
||||||
|
}
|
||||||
|
|
||||||
|
DNS_PRIV::~DNS_PRIV() = default;
|
||||||
|
|
||||||
|
|
||||||
} // namespace Service::Sockets
|
} // namespace Service::Sockets
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
@@ -25,4 +28,10 @@ private:
|
|||||||
void ResolverSetOptionRequest(HLERequestContext& ctx);
|
void ResolverSetOptionRequest(HLERequestContext& ctx);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class DNS_PRIV final : public ServiceFramework<DNS_PRIV> {
|
||||||
|
public:
|
||||||
|
explicit DNS_PRIV(Core::System& system_);
|
||||||
|
~DNS_PRIV() override;
|
||||||
|
};
|
||||||
|
|
||||||
} // namespace Service::Sockets
|
} // namespace Service::Sockets
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
@@ -12,12 +15,16 @@ namespace Service::Sockets {
|
|||||||
void LoopProcess(Core::System& system) {
|
void LoopProcess(Core::System& system) {
|
||||||
auto server_manager = std::make_unique<ServerManager>(system);
|
auto server_manager = std::make_unique<ServerManager>(system);
|
||||||
|
|
||||||
server_manager->RegisterNamedService("bsd:s", std::make_shared<BSD>(system, "bsd:s"));
|
server_manager->RegisterNamedService("bsd:s", std::make_shared<BSD>(system, "bsd:s", false));
|
||||||
server_manager->RegisterNamedService("bsd:u", std::make_shared<BSD>(system, "bsd:u"));
|
server_manager->RegisterNamedService("bsd:u", std::make_shared<BSD>(system, "bsd:u", true));
|
||||||
server_manager->RegisterNamedService("bsdcfg", std::make_shared<BSDCFG>(system));
|
server_manager->RegisterNamedService("bsd:a", std::make_shared<BSD>(system, "bsd:a", true));
|
||||||
|
server_manager->RegisterNamedService("bsd:nu", std::make_shared<BSD_NU>(system));
|
||||||
|
server_manager->RegisterNamedService("bsdcfg", std::make_shared<BSDCFG>(system, "bsdcfg"));
|
||||||
|
server_manager->RegisterNamedService("ifcfg", std::make_shared<BSDCFG>(system, "ifcfg"));
|
||||||
server_manager->RegisterNamedService("nsd:a", std::make_shared<NSD>(system, "nsd:a"));
|
server_manager->RegisterNamedService("nsd:a", std::make_shared<NSD>(system, "nsd:a"));
|
||||||
server_manager->RegisterNamedService("nsd:u", std::make_shared<NSD>(system, "nsd:u"));
|
server_manager->RegisterNamedService("nsd:u", std::make_shared<NSD>(system, "nsd:u"));
|
||||||
server_manager->RegisterNamedService("sfdnsres", std::make_shared<SFDNSRES>(system));
|
server_manager->RegisterNamedService("sfdnsres", std::make_shared<SFDNSRES>(system));
|
||||||
|
server_manager->RegisterNamedService("dns:priv", std::make_shared<DNS_PRIV>(system));
|
||||||
server_manager->StartAdditionalHostThreads("bsdsocket", 2);
|
server_manager->StartAdditionalHostThreads("bsdsocket", 2);
|
||||||
ServerManager::RunServer(std::move(server_manager));
|
ServerManager::RunServer(std::move(server_manager));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,12 +53,11 @@ Result NpadAbstractBatteryHandler::DecrementRefCounter() {
|
|||||||
Result NpadAbstractBatteryHandler::UpdateBatteryState(u64 aruid) {
|
Result NpadAbstractBatteryHandler::UpdateBatteryState(u64 aruid) {
|
||||||
const auto npad_index = NpadIdTypeToIndex(properties_handler->GetNpadId());
|
const auto npad_index = NpadIdTypeToIndex(properties_handler->GetNpadId());
|
||||||
AruidData* aruid_data = applet_resource_holder->applet_resource->GetAruidData(aruid);
|
AruidData* aruid_data = applet_resource_holder->applet_resource->GetAruidData(aruid);
|
||||||
if (aruid_data == nullptr) {
|
if (aruid_data == nullptr || aruid_data->shared_memory_format == nullptr) {
|
||||||
return ResultSuccess;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto& npad_internal_state =
|
auto& npad_internal_state = aruid_data->shared_memory_format->npad.npad_entry[npad_index].internal_state;
|
||||||
aruid_data->shared_memory_format->npad.npad_entry[npad_index].internal_state;
|
|
||||||
auto& system_properties = npad_internal_state.system_properties;
|
auto& system_properties = npad_internal_state.system_properties;
|
||||||
|
|
||||||
system_properties.is_charging_joy_dual.Assign(dual_battery.is_charging);
|
system_properties.is_charging_joy_dual.Assign(dual_battery.is_charging);
|
||||||
|
|||||||
@@ -80,7 +80,11 @@ Result NPad::Activate(u64 aruid) {
|
|||||||
std::scoped_lock shared_lock{*applet_resource_holder.shared_mutex};
|
std::scoped_lock shared_lock{*applet_resource_holder.shared_mutex};
|
||||||
|
|
||||||
auto* data = applet_resource_holder.applet_resource->GetAruidData(aruid);
|
auto* data = applet_resource_holder.applet_resource->GetAruidData(aruid);
|
||||||
const auto aruid_index = applet_resource_holder.applet_resource->GetIndexFromAruid(aruid);
|
auto aruid_index = applet_resource_holder.applet_resource->GetIndexFromAruid(aruid);
|
||||||
|
if (aruid_index >= AruidIndexMax) {
|
||||||
|
LOG_ERROR(Service_HID, "Invalid aruid:{:016X}", aruid);
|
||||||
|
aruid_index = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (data == nullptr || !data->flag.is_assigned) {
|
if (data == nullptr || !data->flag.is_assigned) {
|
||||||
return ResultSuccess;
|
return ResultSuccess;
|
||||||
@@ -1099,13 +1103,16 @@ Result NPad::RegisterAppletResourceUserId(u64 aruid) {
|
|||||||
|
|
||||||
void NPad::UnregisterAppletResourceUserId(u64 aruid) {
|
void NPad::UnregisterAppletResourceUserId(u64 aruid) {
|
||||||
// TODO: Remove this once abstract pad is emulated properly
|
// TODO: Remove this once abstract pad is emulated properly
|
||||||
const auto aruid_index = npad_resource.GetIndexFromAruid(aruid);
|
auto aruid_index = npad_resource.GetIndexFromAruid(aruid);
|
||||||
|
if (aruid_index >= AruidIndexMax) {
|
||||||
|
LOG_ERROR(Service_HID, "Invalid aruid:{:016X}", aruid);
|
||||||
|
aruid_index = 0;
|
||||||
|
}
|
||||||
for (auto& controller : controller_data[aruid_index]) {
|
for (auto& controller : controller_data[aruid_index]) {
|
||||||
controller.is_active = false;
|
controller.is_active = false;
|
||||||
controller.is_connected = false;
|
controller.is_connected = false;
|
||||||
controller.shared_memory = nullptr;
|
controller.shared_memory = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
npad_resource.UnregisterAppletResourceUserId(aruid);
|
npad_resource.UnregisterAppletResourceUserId(aruid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -71,6 +71,9 @@ Result NPadResource::RegisterAppletResourceUserId(u64 aruid) {
|
|||||||
|
|
||||||
void NPadResource::UnregisterAppletResourceUserId(u64 aruid) {
|
void NPadResource::UnregisterAppletResourceUserId(u64 aruid) {
|
||||||
const u64 aruid_index = GetIndexFromAruid(aruid);
|
const u64 aruid_index = GetIndexFromAruid(aruid);
|
||||||
|
if (aruid_index >= AruidIndexMax) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
FreeAppletResourceId(aruid);
|
FreeAppletResourceId(aruid);
|
||||||
if (aruid_index < AruidIndexMax) {
|
if (aruid_index < AruidIndexMax) {
|
||||||
|
|||||||
@@ -223,6 +223,8 @@ std::unique_ptr<TranslationMap> InitializeTranslations(QObject* parent) {
|
|||||||
tr("Controls the DMA read mode.\nUnsafe is faster, while Safe is more stable and can fix issues in some games.\nDefault follows the GPU Accuracy setting."));
|
tr("Controls the DMA read mode.\nUnsafe is faster, while Safe is more stable and can fix issues in some games.\nDefault follows the GPU Accuracy setting."));
|
||||||
INSERT(Settings, gpu_fence_behavior, tr("GPU Fence Behavior:"),
|
INSERT(Settings, gpu_fence_behavior, tr("GPU Fence Behavior:"),
|
||||||
tr("Controls the GPU fence synchronization behavior.\nImmediate is the fastest option, but can introduce some issues.\nBalanced offers better compatibility and may fix issues in some games.\nAccurate further improves compatibility at the cost of some performance.\nStrict is the slowest option, but can fix issues that require stricter synchronization.\nDefault follows the GPU Accuracy setting."));
|
tr("Controls the GPU fence synchronization behavior.\nImmediate is the fastest option, but can introduce some issues.\nBalanced offers better compatibility and may fix issues in some games.\nAccurate further improves compatibility at the cost of some performance.\nStrict is the slowest option, but can fix issues that require stricter synchronization.\nDefault follows the GPU Accuracy setting."));
|
||||||
|
INSERT(Settings, enable_gpu_buffer_readback, tr("Enable GPU buffer readback"),
|
||||||
|
tr("Preserves GPU-modified data by reading it back before uploading.\nSome games require this to render certain effects properly."));
|
||||||
INSERT(Settings, use_asynchronous_shaders, tr("Enable asynchronous shader compilation"),
|
INSERT(Settings, use_asynchronous_shaders, tr("Enable asynchronous shader compilation"),
|
||||||
tr("May reduce shader stutter."));
|
tr("May reduce shader stutter."));
|
||||||
INSERT(Settings, gpu_clock, tr("GPU Clocks"),
|
INSERT(Settings, gpu_clock, tr("GPU Clocks"),
|
||||||
|
|||||||
@@ -1448,8 +1448,8 @@ BufferId BufferCache<P>::FindBuffer(DAddr device_addr, u32 size) {
|
|||||||
const BufferId buffer_id = page_table[page];
|
const BufferId buffer_id = page_table[page];
|
||||||
if (buffer_id) {
|
if (buffer_id) {
|
||||||
Buffer& buffer = slot_buffers[buffer_id];
|
Buffer& buffer = slot_buffers[buffer_id];
|
||||||
|
WaitForGpuFenceIfNeeded(buffer);
|
||||||
if (buffer.IsInBounds(device_addr, size)) {
|
if (buffer.IsInBounds(device_addr, size)) {
|
||||||
SynchronizeBufferIfNeeded(buffer);
|
|
||||||
return buffer_id;
|
return buffer_id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1457,28 +1457,16 @@ BufferId BufferCache<P>::FindBuffer(DAddr device_addr, u32 size) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <class P>
|
template <class P>
|
||||||
void BufferCache<P>::SynchronizeBufferIfNeeded(Buffer& buffer) {
|
void BufferCache<P>::WaitForGpuFenceIfNeeded(Buffer& buffer) {
|
||||||
const bool gpu_fence_accurate = Settings::IsGPUFenceBehaviorAccurate();
|
if constexpr (!IS_OPENGL) {
|
||||||
const bool gpu_fence_strict = Settings::IsGPUFenceBehaviorStrict();
|
const bool gpu_fence_accurate = Settings::IsGPUFenceBehaviorAccurate();
|
||||||
const bool should_sync = gpu_fence_accurate || gpu_fence_strict;
|
const bool gpu_fence_strict = Settings::IsGPUFenceBehaviorStrict();
|
||||||
if (should_sync) {
|
if (gpu_fence_accurate || gpu_fence_strict) {
|
||||||
if (gpu_fence_accurate) {
|
const u64 gpu_tick_delay = gpu_fence_strict ? 0 : 3;
|
||||||
if constexpr (!IS_OPENGL) {
|
const u64 buffer_tick = buffer.getWriteTick();
|
||||||
const bool should_wait = buffer.getWriteTick() > runtime.KnownGpuTick() + 3;
|
const u64 gpu_tick = runtime.KnownGpuTick();
|
||||||
if (should_wait) {
|
if (buffer_tick > gpu_tick + gpu_tick_delay) {
|
||||||
runtime.Wait(buffer.getWriteTick());
|
runtime.Wait(buffer_tick);
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (gpu_fence_strict) {
|
|
||||||
bool should_download = true;
|
|
||||||
if constexpr (!IS_OPENGL) {
|
|
||||||
should_download = buffer.getWriteTick() > runtime.KnownGpuTick();
|
|
||||||
if (should_download) {
|
|
||||||
runtime.Wait(buffer.getWriteTick());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (should_download) {
|
|
||||||
DownloadBufferMemory(buffer);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1700,6 +1688,9 @@ void BufferCache<P>::ImmediateUploadMemory([[maybe_unused]] Buffer& buffer,
|
|||||||
if (immediate_buffer.empty()) {
|
if (immediate_buffer.empty()) {
|
||||||
immediate_buffer = ImmediateBuffer(largest_copy);
|
immediate_buffer = ImmediateBuffer(largest_copy);
|
||||||
}
|
}
|
||||||
|
if (Settings::values.enable_gpu_buffer_readback.GetValue()) {
|
||||||
|
DownloadBufferMemory(buffer, device_addr, copy.size);
|
||||||
|
}
|
||||||
device_memory.ReadBlockUnsafe(device_addr, immediate_buffer.data(), copy.size);
|
device_memory.ReadBlockUnsafe(device_addr, immediate_buffer.data(), copy.size);
|
||||||
upload_span = immediate_buffer.subspan(0, copy.size);
|
upload_span = immediate_buffer.subspan(0, copy.size);
|
||||||
}
|
}
|
||||||
@@ -1718,6 +1709,9 @@ void BufferCache<P>::MappedUploadMemory([[maybe_unused]] Buffer& buffer,
|
|||||||
for (BufferCopy& copy : copies) {
|
for (BufferCopy& copy : copies) {
|
||||||
u8* const src_pointer = staging_pointer.data() + copy.src_offset;
|
u8* const src_pointer = staging_pointer.data() + copy.src_offset;
|
||||||
const DAddr device_addr = buffer.CpuAddr() + copy.dst_offset;
|
const DAddr device_addr = buffer.CpuAddr() + copy.dst_offset;
|
||||||
|
if (Settings::values.enable_gpu_buffer_readback.GetValue()) {
|
||||||
|
DownloadBufferMemory(buffer, device_addr, copy.size);
|
||||||
|
}
|
||||||
device_memory.ReadBlockUnsafe(device_addr, src_pointer, copy.size);
|
device_memory.ReadBlockUnsafe(device_addr, src_pointer, copy.size);
|
||||||
// Apply the staging offset
|
// Apply the staging offset
|
||||||
copy.src_offset += upload_staging.offset;
|
copy.src_offset += upload_staging.offset;
|
||||||
|
|||||||
@@ -435,8 +435,6 @@ private:
|
|||||||
|
|
||||||
bool SynchronizeBuffer(Buffer& buffer, DAddr device_addr, u32 size);
|
bool SynchronizeBuffer(Buffer& buffer, DAddr device_addr, u32 size);
|
||||||
|
|
||||||
void SynchronizeBufferIfNeeded(Buffer& buffer);
|
|
||||||
|
|
||||||
void UploadMemory(Buffer& buffer, u64 total_size_bytes, u64 largest_copy,
|
void UploadMemory(Buffer& buffer, u64 total_size_bytes, u64 largest_copy,
|
||||||
std::span<BufferCopy> copies);
|
std::span<BufferCopy> copies);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user