This commit is contained in:
lizzie
2026-08-15 17:53:47 +00:00
parent 4bb0e8398a
commit b6078e1139
9 changed files with 130 additions and 52 deletions
+19
View File
@@ -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<IDecoderControlService> {
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<ServerManager>(system);
auto album_manager = std::make_shared<AlbumManager>(system);
@@ -27,6 +42,10 @@ void LoopProcess(Core::System& system) {
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));
// +4.0.0
if (FirmwareManager::GetFirmwareVersion(system).first.major >= 4) {
server_manager->RegisterNamedService("caps:dc", std::make_shared<IDecoderControlService>(system));
}
ServerManager::RunServer(std::move(server_manager));
}
+18
View File
@@ -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<GRC_D> {
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<ServerManager>(system);
server_manager->RegisterNamedService("grc:c", std::make_shared<GRC>(system));
server_manager->RegisterNamedService("grc:d", std::make_shared<GRC_D>(system));
ServerManager::RunServer(std::move(server_manager));
}
+2 -4
View File
@@ -367,10 +367,8 @@ void LoopProcess(Core::System& system) {
auto server_manager = std::make_unique<ServerManager>(system);
std::shared_ptr<MiiManager> manager = std::make_shared<MiiManager>();
server_manager->RegisterNamedService(
"mii:e", std::make_shared<IStaticService>(system, "mii:e", manager, true));
server_manager->RegisterNamedService(
"mii:u", std::make_shared<IStaticService>(system, "mii:u", manager, false));
server_manager->RegisterNamedService("mii:e", std::make_shared<IStaticService>(system, "mii:e", manager, true));
server_manager->RegisterNamedService("mii:u", std::make_shared<IStaticService>(system, "mii:u", manager, false));
server_manager->RegisterNamedService("miiimg", std::make_shared<IImageDatabaseService>(system));
ServerManager::RunServer(std::move(server_manager));
}
+37 -18
View File
@@ -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<INotifyService> {
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<ServerManager>(system);
server_manager->RegisterNamedService(
"ns:am2", std::make_shared<IServiceGetterInterface>(system, "ns:am2"));
server_manager->RegisterNamedService(
"ns:ec", std::make_shared<IServiceGetterInterface>(system, "ns:ec"));
server_manager->RegisterNamedService(
"ns:rid", std::make_shared<IServiceGetterInterface>(system, "ns:rid"));
server_manager->RegisterNamedService(
"ns:rt", std::make_shared<IServiceGetterInterface>(system, "ns:rt"));
server_manager->RegisterNamedService(
"ns:web", std::make_shared<IServiceGetterInterface>(system, "ns:web"));
server_manager->RegisterNamedService(
"ns:ro", std::make_shared<IServiceGetterInterface>(system, "ns:ro"));
server_manager->RegisterNamedService("ns:am2", std::make_shared<IServiceGetterInterface>(system, "ns:am2"));
server_manager->RegisterNamedService("ns:ec", std::make_shared<IServiceGetterInterface>(system, "ns:ec"));
server_manager->RegisterNamedService("ns:rid", std::make_shared<IServiceGetterInterface>(system, "ns:rid"));
server_manager->RegisterNamedService("ns:rt", std::make_shared<IServiceGetterInterface>(system, "ns:rt"));
server_manager->RegisterNamedService("ns:web", std::make_shared<IServiceGetterInterface>(system, "ns:web"));
server_manager->RegisterNamedService("ns:ro", std::make_shared<IServiceGetterInterface>(system, "ns:ro"));
server_manager->RegisterNamedService("ns:dev", std::make_shared<IDevelopInterface>(system));
server_manager->RegisterNamedService("ns:su", std::make_shared<ISystemUpdateInterface>(system));
server_manager->RegisterNamedService("ns:vm",
std::make_shared<IVulnerabilityManagerInterface>(system));
server_manager->RegisterNamedService("ns:vm", std::make_shared<IVulnerabilityManagerInterface>(system));
server_manager->RegisterNamedService("pdm:ntfy", std::make_shared<INotifyService>(system));
server_manager->RegisterNamedService("pdm:qry", std::make_shared<IQueryService>(system));
server_manager->RegisterNamedService("pl:s",
std::make_shared<IPlatformServiceManager>(system, "pl:s"));
server_manager->RegisterNamedService("pl:u",
std::make_shared<IPlatformServiceManager>(system, "pl:u"));
server_manager->RegisterNamedService("pl:s", std::make_shared<IPlatformServiceManager>(system, "pl:s"));
server_manager->RegisterNamedService("pl:u", std::make_shared<IPlatformServiceManager>(system, "pl:u"));
ServerManager::RunServer(std::move(server_manager));
}
@@ -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
-23
View File
@@ -185,27 +185,4 @@ SPL_MANU::SPL_MANU(Core::System& system_, std::shared_ptr<Module> module_)
SPL_MANU::~SPL_MANU() = default;
SPL_LDN::SPL_LDN(Core::System& system_, std::shared_ptr<Module> 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
-6
View File
@@ -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> module_);
~SPL_LDN() override;
};
} // namespace Service::SPL
-1
View File
@@ -214,7 +214,6 @@ void LoopProcess(Core::System& system) {
server_manager->RegisterNamedService("spl:ssl", std::make_shared<SPL_SSL>(system, module));
server_manager->RegisterNamedService("spl:es", std::make_shared<SPL_ES>(system, module));
server_manager->RegisterNamedService("spl:manu", std::make_shared<SPL_MANU>(system, module));
server_manager->RegisterNamedService("spl:ldn", std::make_shared<SPL_LDN>(system, module));
ServerManager::RunServer(std::move(server_manager));
}
+48
View File
@@ -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<IPdManufactureManager> {
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<IQdbManager> {
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<IPmObserverService> {
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<ServerManager>(system);
@@ -228,7 +267,16 @@ void LoopProcess(Core::System& system) {
server_manager->RegisterNamedService("usb:hs", std::make_shared<IClientRootSession>(system));
server_manager->RegisterNamedService("usb:pd", std::make_shared<IPdManager>(system));
server_manager->RegisterNamedService("usb:pd:c", std::make_shared<IPdCradleManager>(system));
server_manager->RegisterNamedService("usb:pd:m", std::make_shared<IPdManufactureManager>(system));
server_manager->RegisterNamedService("usb:pm", std::make_shared<IPmMainService>(system));
// +7.0.0
if (FirmwareManager::GetFirmwareVersion(system).first.major >= 7) {
server_manager->RegisterNamedService("usb:qdb", std::make_shared<IQdbManager>(system));
}
// +8.0.0
if (FirmwareManager::GetFirmwareVersion(system).first.major >= 8) {
server_manager->RegisterNamedService("usb:obsv", std::make_shared<IPmObserverService>(system));
}
ServerManager::RunServer(std::move(server_manager));
}