diff --git a/src/common/log_classes.inc b/src/common/log_classes.inc index ba2234f041..05b7d1c6f7 100644 --- a/src/common/log_classes.inc +++ b/src/common/log_classes.inc @@ -25,6 +25,7 @@ SUB(Service, AM) SUB(Service, AOC) SUB(Service, APM) SUB(Service, ARP) +SUB(Service, Banana) SUB(Service, BCAT) SUB(Service, BPC) SUB(Service, BGTC) @@ -40,6 +41,8 @@ SUB(Service, Friend) SUB(Service, FS) SUB(Service, GRC) SUB(Service, HID) +SUB(Service, HTC) +SUB(Service, HTCS) SUB(Service, IRS) SUB(Service, JIT) SUB(Service, LBL) @@ -63,6 +66,7 @@ SUB(Service, NVDRV) SUB(Service, Nvnflinger) SUB(Service, OLSC) SUB(Service, PCIE) +SUB(Service, PCM) SUB(Service, PCTL) SUB(Service, PCV) SUB(Service, PM) diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 39aebd5f48..0ce6b405cd 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -543,6 +543,8 @@ add_library(core STATIC hle/service/audio/hardware_opus_decoder_manager.h hle/service/audio/hardware_opus_decoder.cpp hle/service/audio/hardware_opus_decoder.h + hle/service/banana/banana.cpp + hle/service/banana/banana.h hle/service/bcat/backend/backend.cpp hle/service/bcat/backend/backend.h hle/service/bcat/bcat.cpp @@ -714,6 +716,10 @@ add_library(core STATIC hle/service/hid/xcd.h hle/service/hle_ipc.cpp hle/service/hle_ipc.h + hle/service/htc/htc.cpp + hle/service/htc/htc.h + hle/service/htcs/htcs.cpp + hle/service/htcs/htcs.h hle/service/ipc_helpers.h hle/service/kernel_helpers.cpp hle/service/kernel_helpers.h @@ -952,6 +958,8 @@ add_library(core STATIC hle/service/os/process.h hle/service/pcie/pcie.cpp hle/service/pcie/pcie.h + hle/service/pcm/pcm.cpp + hle/service/pcm/pcm.h hle/service/pctl/parental_control_service_factory.cpp hle/service/pctl/parental_control_service_factory.h hle/service/pctl/parental_control_service.cpp diff --git a/src/core/hle/service/banana/banana.cpp b/src/core/hle/service/banana/banana.cpp new file mode 100644 index 0000000000..d77813cacc --- /dev/null +++ b/src/core/hle/service/banana/banana.cpp @@ -0,0 +1,40 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + +#include "common/logging.h" +#include "core/hle/service/banana/banana.h" +#include "core/hle/service/ipc_helpers.h" +#include "core/hle/service/server_manager.h" +#include "core/hle/service/service.h" + +namespace Service::Banana { + +class IProfiler final : public ServiceFramework { +public: + explicit IProfiler(Core::System& system_) : ServiceFramework{system_, "banana"} { + // clang-format off + static const FunctionInfo functions[] = { + {0, nullptr, "GetSystemEvent"}, + {1, &IProfiler::StartSignalingEvent, "StartSignalingEvent"}, + {2, nullptr, "StopSignalingEvent"}, + }; + // clang-format on + RegisterHandlers(functions); + } + +private: + void StartSignalingEvent(HLERequestContext& ctx) { + LOG_WARNING(Service_Banana, "(STUBBED) called"); + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(ResultSuccess); + } +}; + +void LoopProcess(Core::System& system) { + auto server_manager = std::make_unique(system); + + server_manager->RegisterNamedService("banana", std::make_shared(system)); + ServerManager::RunServer(std::move(server_manager)); +} + +} // namespace Service::Banana diff --git a/src/core/hle/service/banana/banana.h b/src/core/hle/service/banana/banana.h new file mode 100644 index 0000000000..9edceff20d --- /dev/null +++ b/src/core/hle/service/banana/banana.h @@ -0,0 +1,14 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + +#pragma once + +namespace Core { +class System; +} + +namespace Service::Banana { + +void LoopProcess(Core::System& system); + +} // namespace Service::Banana diff --git a/src/core/hle/service/htc/htc.cpp b/src/core/hle/service/htc/htc.cpp new file mode 100644 index 0000000000..545fe3adc6 --- /dev/null +++ b/src/core/hle/service/htc/htc.cpp @@ -0,0 +1,95 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + +#include "common/logging.h" +#include "core/hle/service/htc/htc.h" +#include "core/hle/service/ipc_helpers.h" +#include "core/hle/service/server_manager.h" +#include "core/hle/service/service.h" + +namespace Service::HTC { + +class IHtcManager final : public ServiceFramework { +public: + explicit IHtcManager(Core::System& system_) : ServiceFramework{system_, "htc"} { + // clang-format off + static const FunctionInfo functions[] = { + {0, &IHtcManager::GetEnvironmentVariable, "GetEnvironmentVariable"}, + {1, &IHtcManager::GetEnvironmentVariableLength, "GetEnvironmentVariableLength"}, + {2, nullptr, "BindHostConnectionEvent"}, + {3, nullptr, "BindHostDisconnectionEvent"}, + {4, nullptr, "BindHostConnectionEventForSystem"}, + {5, nullptr, "BindHostDisconnectionEventForSystem"}, + {6, nullptr, "GetBridgeIpAddress"}, // 3.0.0+ + {7, nullptr, "GetBridgePort"}, // 3.0.0+ + {8, nullptr, "SetCradleAttached"}, // 3.0.0+ + {9, nullptr, "GetBridgeSubnetMask"}, // 4.0.0+ + {10, nullptr, "GetBridgeMacAddress"}, // 4.0.0+ + {11, nullptr, "GetWorkingDirectoryPath"}, // 6.0.0+ + {12, nullptr, "GetWorkingDirectoryPathSize"}, // 6.0.0+ + {13, nullptr, "RunOnHostStart"}, // 6.0.0+ + {14, nullptr, "RunOnHostResults"}, // 9.0.0+ + {15, nullptr, "SetBridgeIpAddress"}, // 20.0.0+ + {16, nullptr, "SetBridgeSubnetMask"}, // 20.0.0+ + {17, nullptr, "SetBridgePort"}, // 20.0.0+ + {18, nullptr, "GetBridgeSerialNumber"}, // 20.0.0+ + {19, nullptr, "GetBridgeFwVersion"}, // 20.0.0+ + {20, nullptr, "ResetBridgeSettings"}, // 20.0.0+ + {21, nullptr, "BeginUpdateBridge"}, // 19.0.0+ + {22, nullptr, "ContinueUpdateBridge"}, // 19.0.0+ + {23, nullptr, "EndUpdateBridge"}, // 19.0.0+ + {24, nullptr, "GetBridgeType"}, // 19.0.0+ + {25, nullptr, "GetBridgeDefaultGateway"}, // 20.0.0+ + {26, nullptr, "SetBridgeDefaultGateway"}, // 20.0.0+ + {27, nullptr, "GetBridgeDhcp"}, // 20.0.0+ + {28, nullptr, "SetBridgeDhcp"}, // 20.0.0+ + {29, nullptr, "GetBridgeProgramVersion"}, // 21.0.0+ + }; + // clang-format on + RegisterHandlers(functions); + } + +private: + void GetEnvironmentVariable(HLERequestContext& ctx) { + LOG_WARNING(Service_HTC, "(STUBBED) called"); + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(ResultSuccess); + rb.Push(0); + } + + void GetEnvironmentVariableLength(HLERequestContext& ctx) { + LOG_WARNING(Service_HTC, "(STUBBED) called"); + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(ResultSuccess); + rb.Push(0); + } +}; + +class IServiceManager : public ServiceFramework { +public: + explicit IServiceManager(Core::System& system_) : ServiceFramework{system_, "htc:tenv"} { + // clang-format off + static const FunctionInfo functions[] = { + {0, &IServiceManager::GetServiceInterface, "GetServiceInterface"}, + }; + // clang-format on + RegisterHandlers(functions); + } + +private: + void GetServiceInterface(HLERequestContext& ctx) { + LOG_WARNING(Service_HTC, "(STUBBED) called"); + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(ResultSuccess); + } +}; + +void LoopProcess(Core::System& system) { + auto server_manager = std::make_unique(system); + + server_manager->RegisterNamedService("htc:tenv", std::make_shared(system)); + server_manager->RegisterNamedService("htc", std::make_shared(system)); + ServerManager::RunServer(std::move(server_manager)); +} + +} // namespace Service::HTC diff --git a/src/core/hle/service/htc/htc.h b/src/core/hle/service/htc/htc.h new file mode 100644 index 0000000000..6b9d6c3aa0 --- /dev/null +++ b/src/core/hle/service/htc/htc.h @@ -0,0 +1,14 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + +#pragma once + +namespace Core { +class System; +} + +namespace Service::HTC { + +void LoopProcess(Core::System& system); + +} // namespace Service::HTC diff --git a/src/core/hle/service/htcs/htcs.cpp b/src/core/hle/service/htcs/htcs.cpp new file mode 100644 index 0000000000..67e584405d --- /dev/null +++ b/src/core/hle/service/htcs/htcs.cpp @@ -0,0 +1,72 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + +#include "common/logging.h" +#include "core/hle/service/htcs/htcs.h" +#include "core/hle/service/ipc_helpers.h" +#include "core/hle/service/server_manager.h" +#include "core/hle/service/service.h" + +namespace Service::HTCS { + +class IHtcsManager final : public ServiceFramework { +public: + explicit IHtcsManager(Core::System& system_) : ServiceFramework{system_, "htcs"} { + // clang-format off + static const FunctionInfo functions[] = { + {0, nullptr, "Socket"}, + {1, nullptr, "Close"}, + {2, nullptr, "Connect"}, + {3, nullptr, "Bind"}, + {4, nullptr, "Listen"}, + {5, nullptr, "Accept"}, + {6, nullptr, "Recv"}, + {7, nullptr, "Send"}, + {8, nullptr, "Shutdown"}, + {9, nullptr, "Fcntl"}, + {10, &IHtcsManager::GetPeerName, "GetPeerNameAny"}, + {11, nullptr, "GetDefaultHostName"}, + {12, nullptr, "CreateSocketOld"}, + {13, &IHtcsManager::CreateSocket, "CreateSocket"}, + {100, &IHtcsManager::RegisterProcessId, "RegisterProcessId"}, + {101, &IHtcsManager::MonitorManager, "MonitorManager"}, + }; + // clang-format on + RegisterHandlers(functions); + } + +private: + void GetPeerName(HLERequestContext& ctx) { + LOG_WARNING(Service_HTCS, "(STUBBED) called"); + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(ResultSuccess); + } + + void CreateSocket(HLERequestContext& ctx) { + // debug because this gets spammed a LOT + LOG_DEBUG(Service_HTCS, "(STUBBED) called"); + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(ResultSuccess); + } + + void RegisterProcessId(HLERequestContext& ctx) { + LOG_WARNING(Service_HTCS, "(STUBBED) called"); + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(ResultSuccess); + } + + void MonitorManager(HLERequestContext& ctx) { + LOG_WARNING(Service_HTCS, "(STUBBED) called"); + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(ResultSuccess); + } +}; + +void LoopProcess(Core::System& system) { + auto server_manager = std::make_unique(system); + + server_manager->RegisterNamedService("htcs", std::make_shared(system)); + ServerManager::RunServer(std::move(server_manager)); +} + +} // namespace Service::HTCS diff --git a/src/core/hle/service/htcs/htcs.h b/src/core/hle/service/htcs/htcs.h new file mode 100644 index 0000000000..e9fe8798ba --- /dev/null +++ b/src/core/hle/service/htcs/htcs.h @@ -0,0 +1,14 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + +#pragma once + +namespace Core { +class System; +} + +namespace Service::HTCS { + +void LoopProcess(Core::System& system); + +} // namespace Service::HTCS diff --git a/src/core/hle/service/pcm/pcm.cpp b/src/core/hle/service/pcm/pcm.cpp new file mode 100644 index 0000000000..8c4a727d4a --- /dev/null +++ b/src/core/hle/service/pcm/pcm.cpp @@ -0,0 +1,42 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + +#include "common/logging.h" +#include "core/hle/service/ipc_helpers.h" +#include "core/hle/service/pcm/pcm.h" +#include "core/hle/service/server_manager.h" +#include "core/hle/service/service.h" + +namespace Service::PCM { + +class IManager final : public ServiceFramework { +public: + explicit IManager(Core::System& system_) : ServiceFramework{system_, "pcm"} { + // clang-format off + static const FunctionInfo functions[] = { + {0, nullptr, "IsSupported"}, + {1, &IManager::ReadCurrentPower, "ReadCurrentPower"}, + {2, nullptr, "IsServiceEnabled"}, // 4.0.0+ + {3, nullptr, "ReadCurrentVoltage"}, // 4.0.0+ + }; + // clang-format on + RegisterHandlers(functions); + } + +private: + void ReadCurrentPower(HLERequestContext& ctx) { + LOG_DEBUG(Service_PCM, "(STUBBED) called"); + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(ResultSuccess); + rb.Push(0); + } +}; + +void LoopProcess(Core::System& system) { + auto server_manager = std::make_unique(system); + + server_manager->RegisterNamedService("pcm", std::make_shared(system)); + ServerManager::RunServer(std::move(server_manager)); +} + +} // namespace Service::PCM diff --git a/src/core/hle/service/pcm/pcm.h b/src/core/hle/service/pcm/pcm.h new file mode 100644 index 0000000000..9a1ec9ef7d --- /dev/null +++ b/src/core/hle/service/pcm/pcm.h @@ -0,0 +1,14 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + +#pragma once + +namespace Core { +class System; +} + +namespace Service::PCM { + +void LoopProcess(Core::System& system); + +} // namespace Service::PCM diff --git a/src/core/hle/service/services.cpp b/src/core/hle/service/services.cpp index 636f54ad49..1bf19369a4 100644 --- a/src/core/hle/service/services.cpp +++ b/src/core/hle/service/services.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project @@ -11,6 +11,7 @@ #include "core/hle/service/aoc/addon_content_manager.h" #include "core/hle/service/apm/apm.h" #include "core/hle/service/audio/audio.h" +#include "core/hle/service/banana/banana.h" #include "core/hle/service/bcat/bcat.h" #include "core/hle/service/bpc/bpc.h" #include "core/hle/service/btdrv/btdrv.h" @@ -26,6 +27,8 @@ #include "core/hle/service/glue/glue.h" #include "core/hle/service/grc/grc.h" #include "core/hle/service/hid/hid.h" +#include "core/hle/service/htc/htc.h" +#include "core/hle/service/htcs/htcs.h" #include "core/hle/service/ipc_helpers.h" #include "core/hle/service/jit/jit.h" #include "core/hle/service/lbl/lbl.h" @@ -49,6 +52,7 @@ #include "core/hle/service/olsc/olsc.h" #include "core/hle/service/omm/omm.h" #include "core/hle/service/pcie/pcie.h" +#include "core/hle/service/pcm/pcm.h" #include "core/hle/service/pctl/pctl.h" #include "core/hle/service/pcv/pcv.h" #include "core/hle/service/pm/pm.h" @@ -102,6 +106,7 @@ Services::Services(std::shared_ptr& sm, Core::System& system {"am", &AM::LoopProcess}, {"aoc", &AOC::LoopProcess}, {"apm", &APM::LoopProcess}, + {"banana", &Banana::LoopProcess}, {"bcat", &BCAT::LoopProcess}, {"bpc", &BPC::LoopProcess}, {"btdrv", &BtDrv::LoopProcess}, @@ -118,6 +123,8 @@ Services::Services(std::shared_ptr& sm, Core::System& system {"glue", &Glue::LoopProcess}, {"grc", &GRC::LoopProcess}, {"hid", &HID::LoopProcess}, + {"htc", &HTC::LoopProcess}, + {"htcs", &HTCS::LoopProcess}, {"lbl", &LBL::LoopProcess}, {"LogManager.Prod", &LM::LoopProcess}, {"mig", &Migration::LoopProcess}, @@ -136,6 +143,7 @@ Services::Services(std::shared_ptr& sm, Core::System& system {"olsc", &OLSC::LoopProcess}, {"omm", &OMM::LoopProcess}, {"pcie", &PCIe::LoopProcess}, + {"pcm", &PCM::LoopProcess}, {"pctl", &PCTL::LoopProcess}, {"pcv", &PCV::LoopProcess}, {"prepo", &PlayReport::LoopProcess},