VERY experimental Nintendo Switch 2 emulator
C++
Qlauncher firmware 19
Pavel Barabanov1bd86b08f2e8
diff --git a/src/core/hle/service/acc/acc.cpp b/src/core/hle/service/acc/acc.cppindex 7e3352fe0e..b652ae5141 100644--- a/src/core/hle/service/acc/acc.cpp+++ b/src/core/hle/service/acc/acc.cpp@@ -99,6 +99,7 @@ public:{140, nullptr, "GetNetworkServiceLicenseCache"}, // 5.0.0+{141, nullptr, "RefreshNetworkServiceLicenseCacheAsync"}, // 5.0.0+{142, nullptr, "RefreshNetworkServiceLicenseCacheAsyncIfSecondsElapsed"}, // 5.0.0++ {143, D<&IManagerForSystemService::GetNetworkServiceLicenseCacheEx>, "GetNetworkServiceLicenseCacheEx"}, // 15.0.0+{150, nullptr, "CreateAuthorizationRequest"},{160, nullptr, "RequiresUpdateNetworkServiceAccountIdTokenCache"},{161, nullptr, "RequireReauthenticationOfNetworkServiceAccount"},@@ -122,6 +123,14 @@ private:R_SUCCEED();}+ Result GetNetworkServiceLicenseCacheEx() {+ LOG_DEBUG(Service_ACC, "(STUBBED) called.");++ // TODO (jarrodnorwell)++ R_RETURN(ResultUnknown);+ }+Common::UUID account_id;};@@ -318,30 +327,73 @@ public:explicit IProfileCommon(Core::System& system_, const char* name, bool editor_commands,Common::UUID user_id_, ProfileManager& profile_manager_): ServiceFramework{system_, name}, profile_manager{profile_manager_}, user_id{user_id_} {+ // clang-format offstatic const FunctionInfo functions[] = {{0, &IProfileCommon::Get, "Get"},{1, &IProfileCommon::GetBase, "GetBase"},{10, &IProfileCommon::GetImageSize, "GetImageSize"},{11, &IProfileCommon::LoadImage, "LoadImage"},- {20, nullptr, "GetLargeImageSize"}, // 18.0.0+- {21, nullptr, "LoadLargeImage"}, // 18.0.0+- {30, nullptr, "GetImageId"} // 18.0.0++ {20, &IProfileCommon::Unknown20, "Unknown20"},+ {21, &IProfileCommon::Unknown21, "Unknown21"},+ {30, &IProfileCommon::Unknown30, "Unknown30"}};-+ // clang-format onRegisterHandlers(functions);if (editor_commands) {+ // clang-format offstatic const FunctionInfo editor_functions[] = {{100, &IProfileCommon::Store, "Store"},{101, &IProfileCommon::StoreWithImage, "StoreWithImage"},- {110, nullptr, "StoreWithLargeImage"} // 18.0.0++ {110, &IProfileCommon::Unknown110, "Unknown110"}};+ // clang-format onRegisterHandlers(editor_functions);}}protected:+ void Unknown20(HLERequestContext& ctx) {+ LOG_DEBUG(Service_ACC, "(STUBBED) called.");++ // TODO (jarrodnorwell)+ // inbytes: 0x0, outbytes: 0x4++ IPC::ResponseBuilder rb{ctx, 2};+ rb.Push(ResultSuccess);+ }++ void Unknown21(HLERequestContext& ctx) {+ LOG_DEBUG(Service_ACC, "(STUBBED) called.");++ // TODO (jarrodnorwell)+ // buffers: [0x6], inbytes: 0x0, outbytes: 0x4++ IPC::ResponseBuilder rb{ctx, 2};+ rb.Push(ResultSuccess);+ }++ void Unknown30(HLERequestContext& ctx) {+ LOG_DEBUG(Service_ACC, "(STUBBED) called.");++ // TODO (jarrodnorwell)+ // inbytes: 0x0, outbytes: 0x10++ IPC::ResponseBuilder rb{ctx, 2};+ rb.Push(ResultSuccess);+ }++ void Unknown110(HLERequestContext& ctx) {+ LOG_DEBUG(Service_ACC, "(STUBBED) called.");++ // TODO (jarrodnorwell)+ // buffer_entry_sizes: [0x80, 0x0], buffers: [0x19, 0x5], inbytes: 0x38, outbytes: 0x0++ IPC::ResponseBuilder rb{ctx, 2};+ rb.Push(ResultSuccess);+ }+void Get(HLERequestContext& ctx) {LOG_DEBUG(Service_ACC, "called user_id=0x{}", user_id.RawString());ProfileBase profile_base{};@@ -1020,6 +1072,29 @@ void Module::Interface::StoreSaveDataThumbnail(HLERequestContext& ctx, const Comrb.Push(ResultSuccess);}+void Module::Interface::TrySelectUserWithoutInteractionDeprecated(HLERequestContext& ctx) {+ LOG_DEBUG(Service_ACC, "called");+ // A u8 is passed into this function which we can safely ignore. It's to determine if we have+ // access to use the network or not by the looks of it+ IPC::ResponseBuilder rb{ctx, 6};+ if (profile_manager->GetUserCount() != 1) {+ rb.Push(ResultSuccess);+ rb.PushRaw(Common::InvalidUUID);+ return;+ }++ const auto user_list = profile_manager->GetAllUsers();+ if (std::ranges::all_of(user_list, [](const auto& user) { return user.IsInvalid(); })) {+ rb.Push(ResultUnknown); // TODO(ogniK): Find the correct error code+ rb.PushRaw(Common::InvalidUUID);+ return;+ }++ // Select the first user we have+ rb.Push(ResultSuccess);+ rb.PushRaw(profile_manager->GetUser(0)->uuid);+}+void Module::Interface::TrySelectUserWithoutInteraction(HLERequestContext& ctx) {LOG_DEBUG(Service_ACC, "called");// A u8 is passed into this function which we can safely ignore. It's to determine if we have@@ -1046,8 +1121,8 @@ void Module::Interface::TrySelectUserWithoutInteraction(HLERequestContext& ctx)Module::Interface::Interface(std::shared_ptr<Module> module_,std::shared_ptr<ProfileManager> profile_manager_,Core::System& system_, const char* name)- : ServiceFramework{system_, name}, module{std::move(module_)}, profile_manager{std::move(- profile_manager_)} {}+ : ServiceFramework{system_, name}, module{std::move(module_)},+ profile_manager{std::move(profile_manager_)} {}Module::Interface::~Interface() = default;diff --git a/src/core/hle/service/acc/acc.h b/src/core/hle/service/acc/acc.hindex 0395229b47..81745b0db3 100644--- a/src/core/hle/service/acc/acc.h+++ b/src/core/hle/service/acc/acc.h@@ -30,6 +30,7 @@ public:void InitializeApplicationInfoRestricted(HLERequestContext& ctx);void GetBaasAccountManagerForApplication(HLERequestContext& ctx);void IsUserRegistrationRequestPermitted(HLERequestContext& ctx);+ void TrySelectUserWithoutInteractionDeprecated(HLERequestContext& ctx);void TrySelectUserWithoutInteraction(HLERequestContext& ctx);void IsUserAccountSwitchLocked(HLERequestContext& ctx);void InitializeApplicationInfoV2(HLERequestContext& ctx);diff --git a/src/core/hle/service/acc/acc_su.cpp b/src/core/hle/service/acc/acc_su.cppindex 2e26cafe3c..d3051f8be0 100644--- a/src/core/hle/service/acc/acc_su.cpp+++ b/src/core/hle/service/acc/acc_su.cpp@@ -18,7 +18,8 @@ ACC_SU::ACC_SU(std::shared_ptr<Module> module_, std::shared_ptr<ProfileManager>{5, &ACC_SU::GetProfile, "GetProfile"},{6, nullptr, "GetProfileDigest"},{50, &ACC_SU::IsUserRegistrationRequestPermitted, "IsUserRegistrationRequestPermitted"},- {51, &ACC_SU::TrySelectUserWithoutInteraction, "TrySelectUserWithoutInteraction"},+ {51, &ACC_SU::TrySelectUserWithoutInteractionDeprecated, "TrySelectUserWithoutInteractionDeprecated"},+ {52, &ACC_SU::TrySelectUserWithoutInteraction, "TrySelectUserWithoutInteraction"}, // 19.0.0+{60, &ACC_SU::ListOpenContextStoredUsers, "ListOpenContextStoredUsers"},{99, nullptr, "DebugActivateOpenContextRetention"},{100, nullptr, "GetUserRegistrationNotifier"},diff --git a/src/core/hle/service/am/service/all_system_applet_proxies_service.cpp b/src/core/hle/service/am/service/all_system_applet_proxies_service.cppindex bc9c86c557..5a787494a8 100644--- a/src/core/hle/service/am/service/all_system_applet_proxies_service.cpp+++ b/src/core/hle/service/am/service/all_system_applet_proxies_service.cpp@@ -4,6 +4,7 @@#include "core/core.h"#include "core/hle/service/am/applet_manager.h"#include "core/hle/service/am/service/all_system_applet_proxies_service.h"+#include "core/hle/service/am/service/application_proxy.h"#include "core/hle/service/am/service/library_applet_proxy.h"#include "core/hle/service/am/service/system_applet_proxy.h"#include "core/hle/service/am/window_system.h"@@ -20,9 +21,10 @@ IAllSystemAppletProxiesService::IAllSystemAppletProxiesService(Core::System& sys{200, D<&IAllSystemAppletProxiesService::OpenLibraryAppletProxyOld>, "OpenLibraryAppletProxyOld"},{201, D<&IAllSystemAppletProxiesService::OpenLibraryAppletProxy>, "OpenLibraryAppletProxy"},{300, nullptr, "OpenOverlayAppletProxy"},- {350, nullptr, "OpenSystemApplicationProxy"},+ {350, D<&IAllSystemAppletProxiesService::OpenSystemApplicationProxy>, "OpenSystemApplicationProxy"},{400, nullptr, "CreateSelfLibraryAppletCreatorForDevelop"},{410, nullptr, "GetSystemAppletControllerForDebug"},+ {450, D<&IAllSystemAppletProxiesService::GetSystemProcessCommonFunctions>, "GetSystemProcessCommonFunctions"}, // 19.0.0+{1000, nullptr, "GetDebugFunctions"},};// clang-format on@@ -63,6 +65,22 @@ Result IAllSystemAppletProxiesService::OpenLibraryAppletProxy(}}+Result IAllSystemAppletProxiesService::OpenSystemApplicationProxy(+ Out<SharedPointer<IApplicationProxy>> out_system_application_proxy, ClientProcessId pid,+ InCopyHandle<Kernel::KProcess> process_handle,+ InLargeData<AppletAttribute, BufferAttr_HipcMapAlias> attribute) {+ LOG_DEBUG(Service_AM, "called");++ if (const auto applet = this->GetAppletFromProcessId(pid); applet) {+ *out_system_application_proxy = std::make_shared<IApplicationProxy>(+ system, applet, process_handle.Get(), m_window_system);+ R_SUCCEED();+ } else {+ UNIMPLEMENTED();+ R_THROW(ResultUnknown);+ }+}+Result IAllSystemAppletProxiesService::OpenLibraryAppletProxyOld(Out<SharedPointer<ILibraryAppletProxy>> out_library_applet_proxy, ClientProcessId pid,InCopyHandle<Kernel::KProcess> process_handle) {@@ -73,6 +91,14 @@ Result IAllSystemAppletProxiesService::OpenLibraryAppletProxyOld(this->OpenLibraryAppletProxy(out_library_applet_proxy, pid, process_handle, attribute));}+Result IAllSystemAppletProxiesService::GetSystemProcessCommonFunctions() {+ LOG_DEBUG(Service_AM, "(STUBBED) called.");++ // TODO (jarrodnorwell)++ R_SUCCEED();+}+std::shared_ptr<Applet> IAllSystemAppletProxiesService::GetAppletFromProcessId(ProcessId process_id) {return m_window_system.GetByAppletResourceUserId(process_id.pid);diff --git a/src/core/hle/service/am/service/all_system_applet_proxies_service.h b/src/core/hle/service/am/service/all_system_applet_proxies_service.hindex e3e79dc4fa..a3111c4c9b 100644--- a/src/core/hle/service/am/service/all_system_applet_proxies_service.h+++ b/src/core/hle/service/am/service/all_system_applet_proxies_service.h@@ -12,6 +12,7 @@ namespace AM {struct Applet;struct AppletAttribute;+class IApplicationProxy;class ILibraryAppletProxy;class ISystemAppletProxy;class WindowSystem;@@ -33,6 +34,11 @@ private:Result OpenLibraryAppletProxyOld(Out<SharedPointer<ILibraryAppletProxy>> out_library_applet_proxy, ClientProcessId pid,InCopyHandle<Kernel::KProcess> process_handle);+ Result OpenSystemApplicationProxy(+ Out<SharedPointer<IApplicationProxy>> out_system_application_proxy, ClientProcessId pid,+ InCopyHandle<Kernel::KProcess> process_handle,+ InLargeData<AppletAttribute, BufferAttr_HipcMapAlias> attribute);+ Result GetSystemProcessCommonFunctions();private:std::shared_ptr<Applet> GetAppletFromProcessId(ProcessId pid);diff --git a/src/core/hle/service/audio/audio_controller.cpp b/src/core/hle/service/audio/audio_controller.cppindex 7a51d1023d..4b6f468c92 100644--- a/src/core/hle/service/audio/audio_controller.cpp+++ b/src/core/hle/service/audio/audio_controller.cpp@@ -57,6 +57,7 @@ IAudioController::IAudioController(Core::System& system_){40, nullptr, "GetSystemInformationForDebug"},{41, nullptr, "SetVolumeButtonLongPressTime"},{42, nullptr, "SetNativeVolumeForDebug"},+ {5000, D<&IAudioController::Unknown5000>, "Unknown5000"},{10000, nullptr, "NotifyAudioOutputTargetForPlayReport"},{10001, nullptr, "NotifyAudioOutputChannelCountForPlayReport"},{10002, nullptr, "NotifyUnsupportedUsbOutputDeviceAttachedForPlayReport"},@@ -68,6 +69,9 @@ IAudioController::IAudioController(Core::System& system_){10105, nullptr, "BindAudioOutputChannelCountUpdateEventForPlayReport"},{10106, nullptr, "GetDefaultAudioOutputTargetForPlayReport"},{50000, nullptr, "SetAnalogInputBoostGainForPrototyping"},+ {50001, nullptr, "OverrideDefaultTargetForDebug"},+ {50003, nullptr, "SetForceOverrideExternalDeviceNameForDebug"},+ {50004, nullptr, "ClearForceOverrideExternalDeviceNameForDebug"}};// clang-format on@@ -175,5 +179,12 @@ Result IAudioController::AcquireTargetNotification(*out_notification_event = ¬ification_event->GetReadableEvent();R_SUCCEED();}+Result IAudioController::Unknown5000(Out<SharedPointer<IAudioController>> out_audio_controller) {+ LOG_DEBUG(Audio, "Creating duplicate audio controller interface");+ // Return a new reference to this controller instance+ *out_audio_controller = std::static_pointer_cast<IAudioController>(shared_from_this());++ R_SUCCEED();+}} // namespace Service::Audiodiff --git a/src/core/hle/service/audio/audio_controller.h b/src/core/hle/service/audio/audio_controller.hindex d37c4843e3..b7645332e6 100644--- a/src/core/hle/service/audio/audio_controller.h+++ b/src/core/hle/service/audio/audio_controller.h@@ -49,6 +49,7 @@ private:Result SetSpeakerAutoMuteEnabled(bool is_speaker_auto_mute_enabled);Result IsSpeakerAutoMuteEnabled(Out<bool> out_is_speaker_auto_mute_enabled);Result AcquireTargetNotification(OutCopyHandle<Kernel::KReadableEvent> out_notification_event);+ Result Unknown5000(Out<SharedPointer<IAudioController>> out_audio_controller);KernelHelpers::ServiceContext service_context;diff --git a/src/core/hle/service/bcat/news/news_service.cpp b/src/core/hle/service/bcat/news/news_service.cppindex bc6c2afd2a..5083184229 100644--- a/src/core/hle/service/bcat/news/news_service.cpp+++ b/src/core/hle/service/bcat/news/news_service.cpp@@ -9,7 +9,7 @@ namespace Service::News {INewsService::INewsService(Core::System& system_) : ServiceFramework{system_, "INewsService"} {// clang-format offstatic const FunctionInfo functions[] = {- {10100, nullptr, "PostLocalNews"},+ {10100, D<&INewsService::PostLocalNews>, "PostLocalNews"},{20100, nullptr, "SetPassphrase"},{30100, D<&INewsService::GetSubscriptionStatus>, "GetSubscriptionStatus"},{30101, nullptr, "GetTopicList"},@@ -36,6 +36,12 @@ INewsService::INewsService(Core::System& system_) : ServiceFramework{system_, "IINewsService::~INewsService() = default;+Result INewsService::PostLocalNews(InBuffer<BufferAttr_HipcAutoSelect> buffer_data) {+ LOG_WARNING(Service_BCAT, "(STUBBED) called, buffer_size={}", buffer_data.size());++ R_SUCCEED();+}+Result INewsService::GetSubscriptionStatus(Out<u32> out_status,InBuffer<BufferAttr_HipcPointer> buffer_data) {LOG_WARNING(Service_BCAT, "(STUBBED) called, buffer_size={}", buffer_data.size());diff --git a/src/core/hle/service/bcat/news/news_service.h b/src/core/hle/service/bcat/news/news_service.hindex f1716a3029..245f08afc3 100644--- a/src/core/hle/service/bcat/news/news_service.h+++ b/src/core/hle/service/bcat/news/news_service.h@@ -18,6 +18,8 @@ public:~INewsService() override;private:+ Result PostLocalNews(InBuffer<BufferAttr_HipcAutoSelect> buffer_data);+Result GetSubscriptionStatus(Out<u32> out_status, InBuffer<BufferAttr_HipcPointer> buffer_data);Result IsSystemUpdateRequired(Out<bool> out_is_system_update_required);diff --git a/src/core/hle/service/nifm/nifm.cpp b/src/core/hle/service/nifm/nifm.cppindex 0a1658d784..d758e9aa3d 100644--- a/src/core/hle/service/nifm/nifm.cpp+++ b/src/core/hle/service/nifm/nifm.cpp@@ -419,24 +419,24 @@ void IGeneralService::GetCurrentNetworkProfile(HLERequestContext& ctx) {rb.Push(ResultSuccess);}-void IGeneralService::EnumerateNetworkInterfaces(HLERequestContext& ctx) {- LOG_DEBUG(Service_NIFM, "(STUBBED) called.");-- // TODO (jarrodnorwell)-- IPC::ResponseBuilder rb{ctx, 2};- rb.Push(ResultSuccess);-}--void IGeneralService::EnumerateNetworkProfiles(HLERequestContext& ctx) {- LOG_DEBUG(Service_NIFM, "(STUBBED) called.");-- // TODO (jarrodnorwell)-- IPC::ResponseBuilder rb{ctx, 2};- rb.Push(ResultSuccess);-}-+void IGeneralService::EnumerateNetworkInterfaces(HLERequestContext& ctx) {+ LOG_DEBUG(Service_NIFM, "(STUBBED) called.");++ // TODO (jarrodnorwell)++ IPC::ResponseBuilder rb{ctx, 2};+ rb.Push(ResultSuccess);+}++void IGeneralService::EnumerateNetworkProfiles(HLERequestContext& ctx) {+ LOG_DEBUG(Service_NIFM, "(STUBBED) called.");++ // TODO (jarrodnorwell)++ IPC::ResponseBuilder rb{ctx, 2};+ rb.Push(ResultSuccess);+}+void IGeneralService::RemoveNetworkProfile(HLERequestContext& ctx) {LOG_WARNING(Service_NIFM, "(STUBBED) called");@@ -583,24 +583,65 @@ void IGeneralService::IsAnyForegroundRequestAccepted(HLERequestContext& ctx) {rb.Push<u8>(is_accepted);}-void IGeneralService::ConfirmSystemAvailability(HLERequestContext& ctx) {- LOG_DEBUG(Service_NIFM, "(STUBBED) called.");-- // TODO (jarrodnorwell)-- IPC::ResponseBuilder rb{ctx, 2};- rb.Push(ResultSuccess);-}--void IGeneralService::SetBackgroundRequestEnabled(HLERequestContext& ctx) {- LOG_WARNING(Service_NIFM, "(STUBBED) called.");-- // TODO (jarrodnorwell)-- IPC::ResponseBuilder rb{ctx, 2};- rb.Push(ResultSuccess);-}-+void IGeneralService::GetSsidListVersion(HLERequestContext& ctx) {+ LOG_WARNING(Service_NIFM, "(STUBBED) called");++ constexpr u32 ssid_list_version = 0;++ IPC::ResponseBuilder rb{ctx, 3};+ rb.Push(ResultSuccess);+ rb.Push(ssid_list_version);+}++void IGeneralService::ConfirmSystemAvailability(HLERequestContext& ctx) {+ LOG_DEBUG(Service_NIFM, "(STUBBED) called.");++ // TODO (jarrodnorwell)++ IPC::ResponseBuilder rb{ctx, 2};+ rb.Push(ResultSuccess);+}++void IGeneralService::SetBackgroundRequestEnabled(HLERequestContext& ctx) {+ LOG_WARNING(Service_NIFM, "(STUBBED) called.");++ // TODO (jarrodnorwell)++ IPC::ResponseBuilder rb{ctx, 2};+ rb.Push(ResultSuccess);+}++void IGeneralService::GetCurrentAccessPoint(HLERequestContext& ctx) {+ LOG_WARNING(Service_NIFM, "(STUBBED) called");++ struct AccessPointInfo {+ u8 ssid_length{};+ std::array<char, 0x20> ssid{};+ u8 unknown_1{};+ u8 unknown_2{};+ u8 unknown_3{};+ std::array<char, 0x41> passphrase{};+ };+ static_assert(sizeof(AccessPointInfo) == 0x65, "AccessPointInfo has incorrect size.");++ const auto net_iface = Network::GetSelectedNetworkInterface();+ AccessPointInfo access_point_info{};++ if (net_iface) {+ const std::string ssid = "yuzu Network";+ access_point_info.ssid_length = static_cast<u8>(ssid.size());+ std::memcpy(access_point_info.ssid.data(), ssid.c_str(), ssid.size());++ const std::string passphrase = "yuzupassword";+ std::memcpy(access_point_info.passphrase.data(), passphrase.c_str(), passphrase.size());+ }++ ctx.WriteBuffer(access_point_info);++ IPC::ResponseBuilder rb{ctx, 2};+ rb.Push(ResultSuccess);+}+IGeneralService::IGeneralService(Core::System& system_): ServiceFramework{system_, "IGeneralService"}, network{system_.GetRoomNetwork()} {// clang-format off@@ -609,8 +650,8 @@ IGeneralService::IGeneralService(Core::System& system_){2, &IGeneralService::CreateScanRequest, "CreateScanRequest"},{4, &IGeneralService::CreateRequest, "CreateRequest"},{5, &IGeneralService::GetCurrentNetworkProfile, "GetCurrentNetworkProfile"},- {6, &IGeneralService::EnumerateNetworkInterfaces, "EnumerateNetworkInterfaces"},- {7, &IGeneralService::EnumerateNetworkProfiles, "EnumerateNetworkProfiles"},+ {6, &IGeneralService::EnumerateNetworkInterfaces, "EnumerateNetworkInterfaces"},+ {7, &IGeneralService::EnumerateNetworkProfiles, "EnumerateNetworkProfiles"},{8, nullptr, "GetNetworkProfile"},{9, nullptr, "SetNetworkProfile"},{10, &IGeneralService::RemoveNetworkProfile, "RemoveNetworkProfile"},@@ -628,7 +669,7 @@ IGeneralService::IGeneralService(Core::System& system_){22, &IGeneralService::IsAnyForegroundRequestAccepted, "IsAnyForegroundRequestAccepted"},{23, nullptr, "PutToSleep"},{24, nullptr, "WakeUp"},- {25, nullptr, "GetSsidListVersion"},+ {25, &IGeneralService::GetSsidListVersion, "GetSsidListVersion"},{26, nullptr, "SetExclusiveClient"},{27, nullptr, "GetDefaultIpSetting"},{28, nullptr, "SetDefaultIpSetting"},@@ -636,10 +677,10 @@ IGeneralService::IGeneralService(Core::System& system_){30, nullptr, "SetEthernetCommunicationEnabledForTest"},{31, nullptr, "GetTelemetorySystemEventReadableHandle"},{32, nullptr, "GetTelemetryInfo"},- {33, &IGeneralService::ConfirmSystemAvailability, "ConfirmSystemAvailability"}, // 2.0.0+- {34, &IGeneralService::SetBackgroundRequestEnabled, "SetBackgroundRequestEnabled"}, // 4.0.0++ {33, &IGeneralService::ConfirmSystemAvailability, "ConfirmSystemAvailability"}, // 2.0.0++ {34, &IGeneralService::SetBackgroundRequestEnabled, "SetBackgroundRequestEnabled"}, // 4.0.0+{35, nullptr, "GetScanData"},- {36, nullptr, "GetCurrentAccessPoint"},+ {36, &IGeneralService::GetCurrentAccessPoint, "GetCurrentAccessPoint"},{37, nullptr, "Shutdown"},{38, nullptr, "GetAllowedChannels"},{39, nullptr, "NotifyApplicationSuspended"},diff --git a/src/core/hle/service/nifm/nifm.h b/src/core/hle/service/nifm/nifm.hindex 95b87443f7..4682a4a273 100644--- a/src/core/hle/service/nifm/nifm.h+++ b/src/core/hle/service/nifm/nifm.h@@ -27,8 +27,8 @@ private:void CreateScanRequest(HLERequestContext& ctx);void CreateRequest(HLERequestContext& ctx);void GetCurrentNetworkProfile(HLERequestContext& ctx);- void EnumerateNetworkInterfaces(HLERequestContext& ctx);- void EnumerateNetworkProfiles(HLERequestContext& ctx);+ void EnumerateNetworkInterfaces(HLERequestContext& ctx);+ void EnumerateNetworkProfiles(HLERequestContext& ctx);void RemoveNetworkProfile(HLERequestContext& ctx);void GetCurrentIpAddress(HLERequestContext& ctx);void CreateTemporaryNetworkProfile(HLERequestContext& ctx);@@ -38,8 +38,10 @@ private:void IsEthernetCommunicationEnabled(HLERequestContext& ctx);void IsAnyInternetRequestAccepted(HLERequestContext& ctx);void IsAnyForegroundRequestAccepted(HLERequestContext& ctx);- void ConfirmSystemAvailability(HLERequestContext& ctx);- void SetBackgroundRequestEnabled(HLERequestContext& ctx);+ void GetSsidListVersion(HLERequestContext& ctx);+ void ConfirmSystemAvailability(HLERequestContext& ctx);+ void SetBackgroundRequestEnabled(HLERequestContext& ctx);+ void GetCurrentAccessPoint(HLERequestContext& ctx);Network::RoomNetwork& network;};diff --git a/src/core/hle/service/npns/npns.cpp b/src/core/hle/service/npns/npns.cppindex 9b976b0631..dca4a3a770 100644--- a/src/core/hle/service/npns/npns.cpp+++ b/src/core/hle/service/npns/npns.cpp@@ -25,7 +25,7 @@ public:{5, C<&INpnsSystem::GetReceiveEvent>, "GetReceiveEvent"},{6, nullptr, "ListenUndelivered"},{7, nullptr, "GetStateChangeEvent"},- {8, nullptr, "ListenToByName"}, // 18.0.0++ {8, C<&INpnsSystem::ListenToByName>, "ListenToByName"},{11, nullptr, "SubscribeTopic"},{12, nullptr, "UnsubscribeTopic"},{13, nullptr, "QueryIsTopicExist"},@@ -57,10 +57,10 @@ public:{51, nullptr, "DeleteDigitalTwinKeyValue"}, // 18.0.0+{101, nullptr, "Suspend"},{102, nullptr, "Resume"},- {103, nullptr, "GetState"},+ {103, C<&INpnsSystem::GetState>, "GetState"},{104, nullptr, "GetStatistics"},{105, nullptr, "GetPlayReportRequestEvent"},- {106, nullptr, "GetLastNotifiedTime"}, // 18.0.0++ {106, C<&INpnsSystem::GetLastNotifiedTime>, "GetLastNotifiedTime"}, // 18.0.0+{107, nullptr, "SetLastNotifiedTime"}, // 18.0.0+{111, nullptr, "GetJid"},{112, nullptr, "CreateJid"},@@ -74,7 +74,7 @@ public:{154, nullptr, "CreateTokenAsync"},{155, nullptr, "CreateTokenAsyncWithApplicationId"},{156, nullptr, "CreateTokenWithNameAsync"}, // 18.0.0+- {161, nullptr, "GetRequestChangeStateCancelEvent"},+ {161, C<&INpnsSystem::GetRequestChangeStateCancelEvent>, "GetRequestChangeStateCancelEvent"}, // 10.0.0+{162, nullptr, "RequestChangeStateForceTimedWithCancelEvent"},{201, nullptr, "RequestChangeStateForceTimed"},{202, nullptr, "RequestChangeStateForceAsync"},@@ -90,27 +90,62 @@ public:RegisterHandlers(functions);get_receive_event = service_context.CreateEvent("npns:s:GetReceiveEvent");+ get_request_change_state_cancel_event =+ service_context.CreateEvent("npns:s:GetRequestChangeStateCancelEvent");}~INpnsSystem() override {service_context.CloseEvent(get_receive_event);+ service_context.CloseEvent(get_request_change_state_cancel_event);}private:Result ListenTo(u32 program_id) {- LOG_WARNING(Service_AM, "(STUBBED) called, program_id={}", program_id);+ LOG_WARNING(Service_NPNS, "(STUBBED) called, program_id={}", program_id);R_SUCCEED();}Result GetReceiveEvent(OutCopyHandle<Kernel::KReadableEvent> out_event) {- LOG_WARNING(Service_AM, "(STUBBED) called");+ LOG_WARNING(Service_NPNS, "(STUBBED) called");*out_event = &get_receive_event->GetReadableEvent();R_SUCCEED();}+ Result ListenToByName() {+ LOG_DEBUG(Service_NPNS, "(STUBBED) called.");++ // TODO (jarrodnorwell)++ R_SUCCEED();+ }++ Result GetState(Out<u32> out_state) {+ LOG_WARNING(Service_NPNS, "(STUBBED) called");+ *out_state = 0;+ R_SUCCEED();+ }++ Result GetLastNotifiedTime(Out<s64> out_last_notified_time) {+ LOG_WARNING(Service_NPNS, "(STUBBED) called");++ *out_last_notified_time = 0;+ R_SUCCEED();+ }++ Result GetRequestChangeStateCancelEvent(OutCopyHandle<Kernel::KReadableEvent> out_event) {+ LOG_DEBUG(Service_NPNS, "(STUBBED) called.");++ // TODO (jarrodnorwell)++ *out_event = &get_request_change_state_cancel_event->GetReadableEvent();++ R_SUCCEED();+ }+KernelHelpers::ServiceContext service_context;Kernel::KEvent* get_receive_event;+ Kernel::KEvent* get_request_change_state_cancel_event;};class INpnsUser final : public ServiceFramework<INpnsUser> {diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cppindex ddd85678b2..1b8f575586 100644--- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp+++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp@@ -71,6 +71,12 @@ NvResult nvhost_ctrl_gpu::Ioctl3(DeviceFD fd, Ioctl command, std::span<const u8>case 0x6:return WrapFixedInlOut(this, &nvhost_ctrl_gpu::GetTPCMasks3, input, output,inline_output);+ case 0x13:+ LOG_DEBUG(Service_NVDRV, "(STUBBED) called.");++ // TODO (jarrodnorwell)++ return NvResult::NotImplemented;default:break;}@@ -78,7 +84,8 @@ NvResult nvhost_ctrl_gpu::Ioctl3(DeviceFD fd, Ioctl command, std::span<const u8>default:break;}- UNIMPLEMENTED_MSG("Unimplemented ioctl={:08X}", command.raw);+ UNIMPLEMENTED_MSG("Unimplemented ioctl={:08X}, group={:01X}, command={:01X}", command.raw,+ command.group, command.cmd);return NvResult::NotImplemented;}diff --git a/src/core/hle/service/pctl/parental_control_service.cpp b/src/core/hle/service/pctl/parental_control_service.cppindex 18baccd8ee..3483ea30d9 100644--- a/src/core/hle/service/pctl/parental_control_service.cpp+++ b/src/core/hle/service/pctl/parental_control_service.cpp@@ -79,7 +79,7 @@ IParentalControlService::IParentalControlService(Core::System& system_, Capabili{1453, D<&IParentalControlService::IsPlayTimerEnabled>, "IsPlayTimerEnabled"},{1454, nullptr, "GetPlayTimerRemainingTime"},{1455, D<&IParentalControlService::IsRestrictedByPlayTimer>, "IsRestrictedByPlayTimer"},- {1456, D<&IParentalControlService::GetPlayTimerSettings>, "GetPlayTimerSettings"},+ {1456, D<&IParentalControlService::GetPlayTimerSettingsOld>, "GetPlayTimerSettingsOld"},{1457, D<&IParentalControlService::GetPlayTimerEventToRequestSuspension>, "GetPlayTimerEventToRequestSuspension"},{1458, D<&IParentalControlService::IsPlayTimerAlarmDisabled>, "IsPlayTimerAlarmDisabled"},{1471, nullptr, "NotifyWrongPinCodeInputManyTimes"},@@ -122,8 +122,7 @@ IParentalControlService::IParentalControlService(Core::System& system_, Capabili{2014, nullptr, "FinishSynchronizeParentalControlSettings"},{2015, nullptr, "FinishSynchronizeParentalControlSettingsWithLastUpdated"},{2016, nullptr, "RequestUpdateExemptionListAsync"},- {145601, nullptr, "GetPlayTimerSettingsVer2"}, // 18.0.0+- {195101, nullptr, "SetPlayTimerSettingsForDebugVer2"} // 18.0.0++ {145601, D<&IParentalControlService::GetPlayTimerSettings>, "GetPlayTimerSettings"} // 18.0.0+};// clang-format onRegisterHandlers(functions);@@ -377,6 +376,13 @@ Result IParentalControlService::IsRestrictedByPlayTimer(Out<bool> out_is_restricR_SUCCEED();}+Result IParentalControlService::GetPlayTimerSettingsOld(+ Out<PlayTimerSettings> out_play_timer_settings) {+ LOG_WARNING(Service_PCTL, "(STUBBED) called");+ *out_play_timer_settings = {};+ R_SUCCEED();+}+Result IParentalControlService::GetPlayTimerSettings(Out<PlayTimerSettings> out_play_timer_settings) {LOG_WARNING(Service_PCTL, "(STUBBED) called");diff --git a/src/core/hle/service/pctl/parental_control_service.h b/src/core/hle/service/pctl/parental_control_service.hindex 03dbaa2e5f..d58c75f380 100644--- a/src/core/hle/service/pctl/parental_control_service.h+++ b/src/core/hle/service/pctl/parental_control_service.h@@ -46,13 +46,14 @@ private:Result StopPlayTimer();Result IsPlayTimerEnabled(Out<bool> out_is_play_timer_enabled);Result IsRestrictedByPlayTimer(Out<bool> out_is_restricted_by_play_timer);- Result GetPlayTimerSettings(Out<PlayTimerSettings> out_play_timer_settings);+ Result GetPlayTimerSettingsOld(Out<PlayTimerSettings> out_play_timer_settings);Result GetPlayTimerEventToRequestSuspension(OutCopyHandle<Kernel::KReadableEvent> out_event);Result IsPlayTimerAlarmDisabled(Out<bool> out_play_timer_alarm_disabled);Result GetUnlinkedEvent(OutCopyHandle<Kernel::KReadableEvent> out_event);Result GetStereoVisionRestriction(Out<bool> out_stereo_vision_restriction);Result SetStereoVisionRestriction(bool stereo_vision_restriction);Result ResetConfirmedStereoVisionPermission();+ Result GetPlayTimerSettings(Out<PlayTimerSettings> out_play_timer_settings);struct States {u64 current_tid{};