diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/hle/kernel/kernel.cpp | 4 | ||||
-rw-r--r-- | src/core/hle/kernel/svc.cpp | 132 | ||||
-rw-r--r-- | src/core/hle/service/am/am.cpp | 22 | ||||
-rw-r--r-- | src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.cpp | 17 | ||||
-rw-r--r-- | src/core/hle/service/service.cpp | 6 | ||||
-rw-r--r-- | src/core/settings.h | 1 |
6 files changed, 174 insertions, 8 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp index 5b6c7792e..a1520e147 100644 --- a/src/core/hle/kernel/kernel.cpp +++ b/src/core/hle/kernel/kernel.cpp @@ -143,10 +143,10 @@ struct KernelCore::Impl { ASSERT(system_resource_limit->SetLimitValue(LimitableResource::PhysicalMemory, 0x100000000) .IsSuccess()); ASSERT(system_resource_limit->SetLimitValue(LimitableResource::Threads, 800).IsSuccess()); - ASSERT(system_resource_limit->SetLimitValue(LimitableResource::Events, 700).IsSuccess()); + ASSERT(system_resource_limit->SetLimitValue(LimitableResource::Events, 900).IsSuccess()); ASSERT(system_resource_limit->SetLimitValue(LimitableResource::TransferMemory, 200) .IsSuccess()); - ASSERT(system_resource_limit->SetLimitValue(LimitableResource::Sessions, 933).IsSuccess()); + ASSERT(system_resource_limit->SetLimitValue(LimitableResource::Sessions, 1133).IsSuccess()); // Derived from recent software updates. The kernel reserves 27MB constexpr u64 kernel_size{0x1b00000}; diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index 326d3b9ec..fcffc746d 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp @@ -2455,6 +2455,74 @@ static const FunctionDef SVC_Table_32[] = { {0x79, nullptr, "Unknown"}, {0x7A, nullptr, "Unknown"}, {0x7B, nullptr, "TerminateProcess32"}, + {0x7C, nullptr, "GetProcessInfo32"}, + {0x7D, nullptr, "CreateResourceLimit32"}, + {0x7E, nullptr, "SetResourceLimitLimitValue32"}, + {0x7F, nullptr, "CallSecureMonitor32"}, + {0x80, nullptr, "Unknown"}, + {0x81, nullptr, "Unknown"}, + {0x82, nullptr, "Unknown"}, + {0x83, nullptr, "Unknown"}, + {0x84, nullptr, "Unknown"}, + {0x85, nullptr, "Unknown"}, + {0x86, nullptr, "Unknown"}, + {0x87, nullptr, "Unknown"}, + {0x88, nullptr, "Unknown"}, + {0x89, nullptr, "Unknown"}, + {0x8A, nullptr, "Unknown"}, + {0x8B, nullptr, "Unknown"}, + {0x8C, nullptr, "Unknown"}, + {0x8D, nullptr, "Unknown"}, + {0x8E, nullptr, "Unknown"}, + {0x8F, nullptr, "Unknown"}, + {0x90, nullptr, "Unknown"}, + {0x91, nullptr, "Unknown"}, + {0x92, nullptr, "Unknown"}, + {0x93, nullptr, "Unknown"}, + {0x94, nullptr, "Unknown"}, + {0x95, nullptr, "Unknown"}, + {0x96, nullptr, "Unknown"}, + {0x97, nullptr, "Unknown"}, + {0x98, nullptr, "Unknown"}, + {0x99, nullptr, "Unknown"}, + {0x9A, nullptr, "Unknown"}, + {0x9B, nullptr, "Unknown"}, + {0x9C, nullptr, "Unknown"}, + {0x9D, nullptr, "Unknown"}, + {0x9E, nullptr, "Unknown"}, + {0x9F, nullptr, "Unknown"}, + {0xA0, nullptr, "Unknown"}, + {0xA1, nullptr, "Unknown"}, + {0xA2, nullptr, "Unknown"}, + {0xA3, nullptr, "Unknown"}, + {0xA4, nullptr, "Unknown"}, + {0xA5, nullptr, "Unknown"}, + {0xA6, nullptr, "Unknown"}, + {0xA7, nullptr, "Unknown"}, + {0xA8, nullptr, "Unknown"}, + {0xA9, nullptr, "Unknown"}, + {0xAA, nullptr, "Unknown"}, + {0xAB, nullptr, "Unknown"}, + {0xAC, nullptr, "Unknown"}, + {0xAD, nullptr, "Unknown"}, + {0xAE, nullptr, "Unknown"}, + {0xAF, nullptr, "Unknown"}, + {0xB0, nullptr, "Unknown"}, + {0xB1, nullptr, "Unknown"}, + {0xB2, nullptr, "Unknown"}, + {0xB3, nullptr, "Unknown"}, + {0xB4, nullptr, "Unknown"}, + {0xB5, nullptr, "Unknown"}, + {0xB6, nullptr, "Unknown"}, + {0xB7, nullptr, "Unknown"}, + {0xB8, nullptr, "Unknown"}, + {0xB9, nullptr, "Unknown"}, + {0xBA, nullptr, "Unknown"}, + {0xBB, nullptr, "Unknown"}, + {0xBC, nullptr, "Unknown"}, + {0xBD, nullptr, "Unknown"}, + {0xBE, nullptr, "Unknown"}, + {0xBF, nullptr, "Unknown"}, }; static const FunctionDef SVC_Table_64[] = { @@ -2586,6 +2654,70 @@ static const FunctionDef SVC_Table_64[] = { {0x7D, SvcWrap64<CreateResourceLimit>, "CreateResourceLimit"}, {0x7E, SvcWrap64<SetResourceLimitLimitValue>, "SetResourceLimitLimitValue"}, {0x7F, nullptr, "CallSecureMonitor"}, + {0x80, nullptr, "Unknown"}, + {0x81, nullptr, "Unknown"}, + {0x82, nullptr, "Unknown"}, + {0x83, nullptr, "Unknown"}, + {0x84, nullptr, "Unknown"}, + {0x85, nullptr, "Unknown"}, + {0x86, nullptr, "Unknown"}, + {0x87, nullptr, "Unknown"}, + {0x88, nullptr, "Unknown"}, + {0x89, nullptr, "Unknown"}, + {0x8A, nullptr, "Unknown"}, + {0x8B, nullptr, "Unknown"}, + {0x8C, nullptr, "Unknown"}, + {0x8D, nullptr, "Unknown"}, + {0x8E, nullptr, "Unknown"}, + {0x8F, nullptr, "Unknown"}, + {0x90, nullptr, "Unknown"}, + {0x91, nullptr, "Unknown"}, + {0x92, nullptr, "Unknown"}, + {0x93, nullptr, "Unknown"}, + {0x94, nullptr, "Unknown"}, + {0x95, nullptr, "Unknown"}, + {0x96, nullptr, "Unknown"}, + {0x97, nullptr, "Unknown"}, + {0x98, nullptr, "Unknown"}, + {0x99, nullptr, "Unknown"}, + {0x9A, nullptr, "Unknown"}, + {0x9B, nullptr, "Unknown"}, + {0x9C, nullptr, "Unknown"}, + {0x9D, nullptr, "Unknown"}, + {0x9E, nullptr, "Unknown"}, + {0x9F, nullptr, "Unknown"}, + {0xA0, nullptr, "Unknown"}, + {0xA1, nullptr, "Unknown"}, + {0xA2, nullptr, "Unknown"}, + {0xA3, nullptr, "Unknown"}, + {0xA4, nullptr, "Unknown"}, + {0xA5, nullptr, "Unknown"}, + {0xA6, nullptr, "Unknown"}, + {0xA7, nullptr, "Unknown"}, + {0xA8, nullptr, "Unknown"}, + {0xA9, nullptr, "Unknown"}, + {0xAA, nullptr, "Unknown"}, + {0xAB, nullptr, "Unknown"}, + {0xAC, nullptr, "Unknown"}, + {0xAD, nullptr, "Unknown"}, + {0xAE, nullptr, "Unknown"}, + {0xAF, nullptr, "Unknown"}, + {0xB0, nullptr, "Unknown"}, + {0xB1, nullptr, "Unknown"}, + {0xB2, nullptr, "Unknown"}, + {0xB3, nullptr, "Unknown"}, + {0xB4, nullptr, "Unknown"}, + {0xB5, nullptr, "Unknown"}, + {0xB6, nullptr, "Unknown"}, + {0xB7, nullptr, "Unknown"}, + {0xB8, nullptr, "Unknown"}, + {0xB9, nullptr, "Unknown"}, + {0xBA, nullptr, "Unknown"}, + {0xBB, nullptr, "Unknown"}, + {0xBC, nullptr, "Unknown"}, + {0xBD, nullptr, "Unknown"}, + {0xBE, nullptr, "Unknown"}, + {0xBF, nullptr, "Unknown"}, }; static const FunctionDef* GetSVCInfo32(u32 func_num) { diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index d91237cba..4374487a3 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp @@ -231,6 +231,7 @@ IDebugFunctions::IDebugFunctions(Core::System& system_) {10, nullptr, "PerformSystemButtonPressing"}, {20, nullptr, "InvalidateTransitionLayer"}, {30, nullptr, "RequestLaunchApplicationWithUserAndArgumentForDebug"}, + {31, nullptr, "RequestLaunchApplicationByApplicationLaunchInfoForDebug"}, {40, nullptr, "GetAppletResourceUsageInfo"}, {100, nullptr, "SetCpuBoostModeForApplet"}, {101, nullptr, "CancelCpuBoostModeForApplet"}, @@ -242,6 +243,7 @@ IDebugFunctions::IDebugFunctions(Core::System& system_) {130, nullptr, "FriendInvitationSetApplicationParameter"}, {131, nullptr, "FriendInvitationClearApplicationParameter"}, {132, nullptr, "FriendInvitationPushApplicationParameter"}, + {900, nullptr, "GetGrcProcessLaunchedSystemEvent"}, }; // clang-format on @@ -297,6 +299,7 @@ ISelfController::ISelfController(Core::System& system_, NVFlinger::NVFlinger& nv {91, &ISelfController::GetAccumulatedSuspendedTickChangedEvent, "GetAccumulatedSuspendedTickChangedEvent"}, {100, &ISelfController::SetAlbumImageTakenNotificationEnabled, "SetAlbumImageTakenNotificationEnabled"}, {110, nullptr, "SetApplicationAlbumUserData"}, + {120, nullptr, "SaveCurrentScreenshot"}, {1000, nullptr, "GetDebugStorageChannel"}, }; // clang-format on @@ -645,6 +648,7 @@ ICommonStateGetter::ICommonStateGetter(Core::System& system_, {11, nullptr, "ReleaseSleepLock"}, {12, nullptr, "ReleaseSleepLockTransiently"}, {13, nullptr, "GetAcquiredSleepLockEvent"}, + {14, nullptr, "GetWakeupCount"}, {20, nullptr, "PushToGeneralChannel"}, {30, nullptr, "GetHomeButtonReaderLockAccessor"}, {31, nullptr, "GetReaderLockAccessorEx"}, @@ -656,6 +660,7 @@ ICommonStateGetter::ICommonStateGetter(Core::System& system_, {53, &ICommonStateGetter::BeginVrModeEx, "BeginVrModeEx"}, {54, &ICommonStateGetter::EndVrModeEx, "EndVrModeEx"}, {55, nullptr, "IsInControllerFirmwareUpdateSection"}, + {59, nullptr, "SetVrPositionForDebug"}, {60, &ICommonStateGetter::GetDefaultDisplayResolution, "GetDefaultDisplayResolution"}, {61, &ICommonStateGetter::GetDefaultDisplayResolutionChangeEvent, "GetDefaultDisplayResolutionChangeEvent"}, {62, nullptr, "GetHdcpAuthenticationState"}, @@ -664,14 +669,21 @@ ICommonStateGetter::ICommonStateGetter(Core::System& system_, {65, nullptr, "GetApplicationIdByContentActionName"}, {66, &ICommonStateGetter::SetCpuBoostMode, "SetCpuBoostMode"}, {67, nullptr, "CancelCpuBoostMode"}, + {68, nullptr, "GetBuiltInDisplayType"}, {80, nullptr, "PerformSystemButtonPressingIfInFocus"}, {90, nullptr, "SetPerformanceConfigurationChangedNotification"}, {91, nullptr, "GetCurrentPerformanceConfiguration"}, {100, nullptr, "SetHandlingHomeButtonShortPressedEnabled"}, + {110, nullptr, "OpenMyGpuErrorHandler"}, {200, nullptr, "GetOperationModeSystemInfo"}, {300, nullptr, "GetSettingsPlatformRegion"}, {400, nullptr, "ActivateMigrationService"}, {401, nullptr, "DeactivateMigrationService"}, + {500, nullptr, "DisableSleepTillShutdown"}, + {501, nullptr, "SuppressDisablingSleepTemporarily"}, + {502, nullptr, "IsSleepEnabled"}, + {503, nullptr, "IsDisablingSleepSuppressed"}, + {900, nullptr, "SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled"}, }; // clang-format on @@ -1203,11 +1215,14 @@ IApplicationFunctions::IApplicationFunctions(Core::System& system_) {25, &IApplicationFunctions::ExtendSaveData, "ExtendSaveData"}, {26, &IApplicationFunctions::GetSaveDataSize, "GetSaveDataSize"}, {27, nullptr, "CreateCacheStorage"}, + {28, nullptr, "GetSaveDataSizeMax"}, + {29, nullptr, "GetCacheStorageMax"}, {30, &IApplicationFunctions::BeginBlockingHomeButtonShortAndLongPressed, "BeginBlockingHomeButtonShortAndLongPressed"}, {31, &IApplicationFunctions::EndBlockingHomeButtonShortAndLongPressed, "EndBlockingHomeButtonShortAndLongPressed"}, {32, &IApplicationFunctions::BeginBlockingHomeButton, "BeginBlockingHomeButton"}, {33, &IApplicationFunctions::EndBlockingHomeButton, "EndBlockingHomeButton"}, {34, nullptr, "SelectApplicationLicense"}, + {35, nullptr, "GetDeviceSaveDataSizeMax"}, {40, &IApplicationFunctions::NotifyRunning, "NotifyRunning"}, {50, &IApplicationFunctions::GetPseudoDeviceId, "GetPseudoDeviceId"}, {60, nullptr, "SetMediaPlaybackStateForApplication"}, @@ -1231,6 +1246,7 @@ IApplicationFunctions::IApplicationFunctions(Core::System& system_) {123, &IApplicationFunctions::GetPreviousProgramIndex, "GetPreviousProgramIndex"}, {124, nullptr, "EnableApplicationAllThreadDumpOnCrash"}, {130, &IApplicationFunctions::GetGpuErrorDetectedSystemEvent, "GetGpuErrorDetectedSystemEvent"}, + {131, nullptr, "SetDelayTimeToAbortOnGpuError"}, {140, &IApplicationFunctions::GetFriendInvitationStorageChannelEvent, "GetFriendInvitationStorageChannelEvent"}, {141, &IApplicationFunctions::TryPopFromFriendInvitationStorageChannel, "TryPopFromFriendInvitationStorageChannel"}, {150, nullptr, "GetNotificationStorageChannelEvent"}, @@ -1239,6 +1255,8 @@ IApplicationFunctions::IApplicationFunctions(Core::System& system_) {170, nullptr, "SetHdcpAuthenticationActivated"}, {180, nullptr, "GetLaunchRequiredVersion"}, {181, nullptr, "UpgradeLaunchRequiredVersion"}, + {190, nullptr, "SendServerMaintenanceOverlayNotification"}, + {200, nullptr, "GetLastApplicationExitReason"}, {500, nullptr, "StartContinuousRecordingFlushForDebug"}, {1000, nullptr, "CreateMovieMaker"}, {1001, nullptr, "PrepareForJit"}, @@ -1705,9 +1723,12 @@ IHomeMenuFunctions::IHomeMenuFunctions(Core::System& system_) {21, &IHomeMenuFunctions::GetPopFromGeneralChannelEvent, "GetPopFromGeneralChannelEvent"}, {30, nullptr, "GetHomeButtonWriterLockAccessor"}, {31, nullptr, "GetWriterLockAccessorEx"}, + {40, nullptr, "IsSleepEnabled"}, + {41, nullptr, "IsRebootEnabled"}, {100, nullptr, "PopRequestLaunchApplicationForDebug"}, {110, nullptr, "IsForceTerminateApplicationDisabledForDebug"}, {200, nullptr, "LaunchDevMenu"}, + {1000, nullptr, "SetLastApplicationExitReason"}, }; // clang-format on @@ -1751,6 +1772,7 @@ IGlobalStateController::IGlobalStateController(Core::System& system_) {13, nullptr, "UpdateDefaultDisplayResolution"}, {14, nullptr, "ShouldSleepOnBoot"}, {15, nullptr, "GetHdcpAuthenticationFailedEvent"}, + {30, nullptr, "OpenCradleFirmwareUpdater"}, }; // clang-format on diff --git a/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.cpp b/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.cpp index 4898dc27a..c2f152190 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.cpp @@ -23,17 +23,22 @@ namespace { template <typename T> std::size_t SpliceVectors(const std::vector<u8>& input, std::vector<T>& dst, std::size_t count, std::size_t offset) { - std::memcpy(dst.data(), input.data() + offset, count * sizeof(T)); - offset += count * sizeof(T); - return offset; + if (!dst.empty()) { + std::memcpy(dst.data(), input.data() + offset, count * sizeof(T)); + } + return 0; } // Write vectors will write data to the output buffer template <typename T> std::size_t WriteVectors(std::vector<u8>& dst, const std::vector<T>& src, std::size_t offset) { - std::memcpy(dst.data() + offset, src.data(), src.size() * sizeof(T)); - offset += src.size() * sizeof(T); - return offset; + if (src.empty()) { + return 0; + } else { + std::memcpy(dst.data() + offset, src.data(), src.size() * sizeof(T)); + offset += src.size() * sizeof(T); + return offset; + } } } // Anonymous namespace diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp index 1da56bc27..aec399076 100644 --- a/src/core/hle/service/service.cpp +++ b/src/core/hle/service/service.cpp @@ -70,6 +70,7 @@ #include "core/hle/service/vi/vi.h" #include "core/hle/service/wlan/wlan.h" #include "core/reporter.h" +#include "core/settings.h" namespace Service { @@ -146,6 +147,11 @@ void ServiceFrameworkBase::ReportUnimplementedFunction(Kernel::HLERequestContext system.GetReporter().SaveUnimplementedFunctionReport(ctx, ctx.GetCommand(), function_name, service_name); UNIMPLEMENTED_MSG("Unknown / unimplemented {}", fmt::to_string(buf)); + if (Settings::values.use_auto_stub) { + LOG_WARNING(Service, "Using auto stub fallback!"); + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(RESULT_SUCCESS); + } } void ServiceFrameworkBase::InvokeRequest(Kernel::HLERequestContext& ctx) { diff --git a/src/core/settings.h b/src/core/settings.h index d849dded3..a81016b23 100644 --- a/src/core/settings.h +++ b/src/core/settings.h @@ -222,6 +222,7 @@ struct Values { bool quest_flag; bool disable_macro_jit; bool extended_logging; + bool use_auto_stub; // Miscellaneous std::string log_filter; |