diff --git a/src/core/hle/service/caps/caps.cpp b/src/core/hle/service/caps/caps.cpp index ae39e58a27..f07fbd2185 100644 --- a/src/core/hle/service/caps/caps.cpp +++ b/src/core/hle/service/caps/caps.cpp @@ -14,9 +14,24 @@ #include "core/hle/service/caps/caps_u.h" #include "core/hle/service/server_manager.h" #include "core/hle/service/service.h" +#include "frontend_common/firmware_manager.h" namespace Service::Capture { +class IDecoderControlService final : public ServiceFramework { +public: + explicit IDecoderControlService(Core::System& system_) : ServiceFramework{system_, "grc:d"} { + // clang-format off + static const FunctionInfo functions[] = { + {3001, nullptr, "DecodeJpeg"}, + {4001, nullptr, "ShrinkJpeg"}, + {4002, nullptr, "ShrinkJpegEx"}, + }; + // clang-format on + RegisterHandlers(functions); + } +}; + void LoopProcess(Core::System& system) { auto server_manager = std::make_unique(system); auto album_manager = std::make_shared(system); @@ -27,6 +42,10 @@ void LoopProcess(Core::System& system) { server_manager->RegisterNamedService("caps:ss", std::make_shared(system, album_manager)); server_manager->RegisterNamedService("caps:sc", std::make_shared(system)); server_manager->RegisterNamedService("caps:su", std::make_shared(system, album_manager)); + // +4.0.0 + if (FirmwareManager::GetFirmwareVersion(system).first.major >= 4) { + server_manager->RegisterNamedService("caps:dc", std::make_shared(system)); + } ServerManager::RunServer(std::move(server_manager)); } diff --git a/src/core/hle/service/grc/grc.cpp b/src/core/hle/service/grc/grc.cpp index 64275da36d..b3d39a6294 100644 --- a/src/core/hle/service/grc/grc.cpp +++ b/src/core/hle/service/grc/grc.cpp @@ -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-License-Identifier: GPL-2.0-or-later @@ -26,10 +29,25 @@ public: } }; +class GRC_D final : public ServiceFramework { +public: + explicit GRC_D(Core::System& system_) : ServiceFramework{system_, "grc:d"} { + // clang-format off + static const FunctionInfo functions[] = { + {1, nullptr, "Initialize"}, + {2, nullptr, "Transfer"}, + {3, nullptr, "Cmd3"}, + }; + // clang-format on + RegisterHandlers(functions); + } +}; + void LoopProcess(Core::System& system) { auto server_manager = std::make_unique(system); server_manager->RegisterNamedService("grc:c", std::make_shared(system)); + server_manager->RegisterNamedService("grc:d", std::make_shared(system)); ServerManager::RunServer(std::move(server_manager)); } diff --git a/src/core/hle/service/mii/mii.cpp b/src/core/hle/service/mii/mii.cpp index 51df5bc628..513bb671f8 100644 --- a/src/core/hle/service/mii/mii.cpp +++ b/src/core/hle/service/mii/mii.cpp @@ -367,10 +367,8 @@ void LoopProcess(Core::System& system) { auto server_manager = std::make_unique(system); std::shared_ptr manager = std::make_shared(); - server_manager->RegisterNamedService( - "mii:e", std::make_shared(system, "mii:e", manager, true)); - server_manager->RegisterNamedService( - "mii:u", std::make_shared(system, "mii:u", manager, false)); + server_manager->RegisterNamedService("mii:e", std::make_shared(system, "mii:e", manager, true)); + server_manager->RegisterNamedService("mii:u", std::make_shared(system, "mii:u", manager, false)); server_manager->RegisterNamedService("miiimg", std::make_shared(system)); ServerManager::RunServer(std::move(server_manager)); } diff --git a/src/core/hle/service/ns/ns.cpp b/src/core/hle/service/ns/ns.cpp index 8402e83cb1..4d6154404e 100644 --- a/src/core/hle/service/ns/ns.cpp +++ b/src/core/hle/service/ns/ns.cpp @@ -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-License-Identifier: GPL-2.0-or-later @@ -12,32 +15,48 @@ namespace Service::NS { +class INotifyService final : public ServiceFramework { +public: + explicit INotifyService(Core::System& system_) : ServiceFramework{system_, "pdm:ntfy"} { + // clang-format off + static const FunctionInfo functions[] = { + { 0, nullptr, "NotifyAppletEvent" }, + { 2, nullptr, "NotifyOperationModeChangeEvent" }, + { 3, nullptr, "NotifyPowerStateChangeEvent" }, + { 4, nullptr, "NotifyClearAllEvent" }, + { 5, nullptr, "NotifyEventForDebug" }, + { 6, nullptr, "SuspendUserAccountEventService" }, + { 7, nullptr, "ResumeUserAccountEventService" }, + { 8, nullptr, "NotifyLibraryAppletEvent" }, + { 9, nullptr, "Cmd9" }, + { 20, nullptr, "Cmd20" }, + { 30, nullptr, "Cmd30" }, + { 100, nullptr, "Cmd100" }, + { 101, nullptr, "Cmd101" }, + }; + // clang-format on + RegisterHandlers(functions); + } +}; + void LoopProcess(Core::System& system) { auto server_manager = std::make_unique(system); - server_manager->RegisterNamedService( - "ns:am2", std::make_shared(system, "ns:am2")); - server_manager->RegisterNamedService( - "ns:ec", std::make_shared(system, "ns:ec")); - server_manager->RegisterNamedService( - "ns:rid", std::make_shared(system, "ns:rid")); - server_manager->RegisterNamedService( - "ns:rt", std::make_shared(system, "ns:rt")); - server_manager->RegisterNamedService( - "ns:web", std::make_shared(system, "ns:web")); - server_manager->RegisterNamedService( - "ns:ro", std::make_shared(system, "ns:ro")); + server_manager->RegisterNamedService("ns:am2", std::make_shared(system, "ns:am2")); + server_manager->RegisterNamedService("ns:ec", std::make_shared(system, "ns:ec")); + server_manager->RegisterNamedService("ns:rid", std::make_shared(system, "ns:rid")); + server_manager->RegisterNamedService("ns:rt", std::make_shared(system, "ns:rt")); + server_manager->RegisterNamedService("ns:web", std::make_shared(system, "ns:web")); + server_manager->RegisterNamedService("ns:ro", std::make_shared(system, "ns:ro")); server_manager->RegisterNamedService("ns:dev", std::make_shared(system)); server_manager->RegisterNamedService("ns:su", std::make_shared(system)); - server_manager->RegisterNamedService("ns:vm", - std::make_shared(system)); + server_manager->RegisterNamedService("ns:vm", std::make_shared(system)); + server_manager->RegisterNamedService("pdm:ntfy", std::make_shared(system)); server_manager->RegisterNamedService("pdm:qry", std::make_shared(system)); - server_manager->RegisterNamedService("pl:s", - std::make_shared(system, "pl:s")); - server_manager->RegisterNamedService("pl:u", - std::make_shared(system, "pl:u")); + server_manager->RegisterNamedService("pl:s", std::make_shared(system, "pl:s")); + server_manager->RegisterNamedService("pl:u", std::make_shared(system, "pl:u")); ServerManager::RunServer(std::move(server_manager)); } diff --git a/src/core/hle/service/ns/query_service.cpp b/src/core/hle/service/ns/query_service.cpp index ea605cb831..d22de1d169 100644 --- a/src/core/hle/service/ns/query_service.cpp +++ b/src/core/hle/service/ns/query_service.cpp @@ -38,6 +38,12 @@ IQueryService::IQueryService(Core::System& system_) : ServiceFramework{system_, {17, D<&IQueryService::QueryLastPlayTime>, "QueryLastPlayTime"}, {18, D<&IQueryService::QueryApplicationPlayStatisticsForSystem>, "QueryApplicationPlayStatisticsForSystem"}, {19, D<&IQueryService::QueryApplicationPlayStatisticsByUserAccountIdForSystem>, "QueryApplicationPlayStatisticsByUserAccountIdForSystem"}, + { 30, nullptr, "Cmd30" }, + { 31, nullptr, "Cmd31" }, + { 100, nullptr, "Cmd100" }, + { 110, nullptr, "Cmd110" }, + { 118, nullptr, "Cmd118" }, + { 119, nullptr, "Cmd119" }, }; // clang-format on diff --git a/src/core/hle/service/spl/spl.cpp b/src/core/hle/service/spl/spl.cpp index 89403a6d90..81be99c360 100644 --- a/src/core/hle/service/spl/spl.cpp +++ b/src/core/hle/service/spl/spl.cpp @@ -185,27 +185,4 @@ SPL_MANU::SPL_MANU(Core::System& system_, std::shared_ptr module_) SPL_MANU::~SPL_MANU() = default; -SPL_LDN::SPL_LDN(Core::System& system_, std::shared_ptr module_) - : Interface(system_, std::move(module_), "spl:manu") { - // clang-format off - static const FunctionInfo functions[] = { - {0, nullptr, "GenerateRandomBytes"}, - {1, nullptr, "GetConfig"}, - {2, nullptr, "Cmd2"}, - {3, nullptr, "Cmd3"}, - {4, nullptr, "Cmd4"}, - {5, nullptr, "GetConfigWithBuffer"}, - {7000, nullptr, "GenerateNxAdvertiseKey"}, - {7001, nullptr, "GenerateNxSessionKey"}, - {7002, nullptr, "GenerateNxLp2pKeyIndex1"}, - {7003, nullptr, "GenerateNxLp2pKeyIndex2"}, - {7004, nullptr, "GenerateOunceAdvertiseKey"}, - {7005, nullptr, "GenerateOunceSessionKey"}, - }; - // clang-format on - RegisterHandlers(functions); -} - -SPL_LDN::~SPL_LDN() = default; - } // namespace Service::SPL diff --git a/src/core/hle/service/spl/spl.h b/src/core/hle/service/spl/spl.h index 928530579b..83a3cda539 100644 --- a/src/core/hle/service/spl/spl.h +++ b/src/core/hle/service/spl/spl.h @@ -50,10 +50,4 @@ public: ~SPL_MANU() override; }; -class SPL_LDN final : public Module::Interface { -public: - explicit SPL_LDN(Core::System& system_, std::shared_ptr module_); - ~SPL_LDN() override; -}; - } // namespace Service::SPL diff --git a/src/core/hle/service/spl/spl_module.cpp b/src/core/hle/service/spl/spl_module.cpp index 0529fd41f0..d62cecf9a2 100644 --- a/src/core/hle/service/spl/spl_module.cpp +++ b/src/core/hle/service/spl/spl_module.cpp @@ -214,7 +214,6 @@ void LoopProcess(Core::System& system) { server_manager->RegisterNamedService("spl:ssl", std::make_shared(system, module)); server_manager->RegisterNamedService("spl:es", std::make_shared(system, module)); server_manager->RegisterNamedService("spl:manu", std::make_shared(system, module)); - server_manager->RegisterNamedService("spl:ldn", std::make_shared(system, module)); ServerManager::RunServer(std::move(server_manager)); } diff --git a/src/core/hle/service/usb/usb.cpp b/src/core/hle/service/usb/usb.cpp index a451d4f783..179d1f7097 100644 --- a/src/core/hle/service/usb/usb.cpp +++ b/src/core/hle/service/usb/usb.cpp @@ -11,6 +11,7 @@ #include "core/hle/service/server_manager.h" #include "core/hle/service/service.h" #include "core/hle/service/usb/usb.h" +#include "frontend_common/firmware_manager.h" namespace Service::USB { @@ -221,6 +222,44 @@ public: } }; +class IPdManufactureManager final : public ServiceFramework { +public: + explicit IPdManufactureManager(Core::System& system_) : ServiceFramework{system_, "usb:pd:m"} { + // clang-format off + static const FunctionInfo functions[] = { + {0, nullptr, "OpenManufactureSession"}, + }; + // clang-format on + RegisterHandlers(functions); + } +}; + +class IQdbManager final : public ServiceFramework { +public: + explicit IQdbManager(Core::System& system_) : ServiceFramework{system_, "usb:qdb"} { + // clang-format off + static const FunctionInfo functions[] = { + {0, nullptr, "ImportQuirkDevices"}, + {1, nullptr, "HasQuirk"}, + }; + // clang-format on + RegisterHandlers(functions); + } +}; + +class IPmObserverService final : public ServiceFramework { +public: + explicit IPmObserverService(Core::System& system_) : ServiceFramework{system_, "usb:obsv"} { + // clang-format off + static const FunctionInfo functions[] = { + {0, nullptr, "GetTopologyChangeEvent"}, + {1, nullptr, "GetFlattenedTopology"}, + }; + // clang-format on + RegisterHandlers(functions); + } +}; + void LoopProcess(Core::System& system) { auto server_manager = std::make_unique(system); @@ -228,7 +267,16 @@ void LoopProcess(Core::System& system) { server_manager->RegisterNamedService("usb:hs", std::make_shared(system)); server_manager->RegisterNamedService("usb:pd", std::make_shared(system)); server_manager->RegisterNamedService("usb:pd:c", std::make_shared(system)); + server_manager->RegisterNamedService("usb:pd:m", std::make_shared(system)); server_manager->RegisterNamedService("usb:pm", std::make_shared(system)); + // +7.0.0 + if (FirmwareManager::GetFirmwareVersion(system).first.major >= 7) { + server_manager->RegisterNamedService("usb:qdb", std::make_shared(system)); + } + // +8.0.0 + if (FirmwareManager::GetFirmwareVersion(system).first.major >= 8) { + server_manager->RegisterNamedService("usb:obsv", std::make_shared(system)); + } ServerManager::RunServer(std::move(server_manager)); }