mirror of
https://git.citron-emu.org/citron/emulator
synced 2025-12-19 10:43:33 +00:00
Add Firmware 20.0.0-21.0.0 IPC support and stubs
This commit implements comprehensive firmware 20.0.0 through 21.0.0 support for Citron, including: - Updated firmware version constants to 21.0.0 in api_version.h - Updated HID service firmware version string to 21.0.0 - Added IPC command stubs for firmware 20.0.0+ in: * ISystemSettingsServer (commands 263, 264, 282, 283, 289, 300, 301, 306, 307) * IFirmwareDebugSettingsServer (command 24) * IApplicationFunctions (command 330) * IOlscServiceForSystemService (command 914) * IRemoteStorageController (commands 28, 901) * IService (migration) (commands 2250, 2260) * IAudioController (command 10200) - Created new service interfaces with proper stubs: * IContinuousRecorder (grcsrv) - command 5 [20.2.0+] with 0x20-byte input * IDownloadContext (news) - command 4 [20.0.0+] * INotifyService (pdm:ntfy) - commands 100, 101 [20.0.0+] returning outinterfaces - Added all new source files to CMakeLists.txt build system - Fixed logging tag usage (Service_Migration instead of Service_MIG) - Added required CMIF serialization headers for proper template instantiation All stubs return success explicitly, eliminating the need for auto-stubbing. All implementations follow Switchbrew documentation as closely as possible. Based on Switchbrew documentation: - https://switchbrew.org/wiki/21.0.0 - https://switchbrew.org/wiki/20.5.0 - https://switchbrew.org/wiki/20.4.0 - https://switchbrew.org/wiki/20.3.0 - https://switchbrew.org/wiki/20.2.0 - https://switchbrew.org/wiki/20.1.5 - https://switchbrew.org/wiki/20.1.1 - https://switchbrew.org/wiki/20.1.0 - https://switchbrew.org/wiki/20.0.1 - https://switchbrew.org/wiki/20.0.0 Signed-off-by: Zephyron <zephyron@citron-emu.org>
This commit is contained in:
@@ -581,6 +581,8 @@ add_library(core STATIC
|
|||||||
hle/service/bcat/delivery_cache_storage_service.h
|
hle/service/bcat/delivery_cache_storage_service.h
|
||||||
hle/service/bcat/delivery_task_suspension_service.cpp
|
hle/service/bcat/delivery_task_suspension_service.cpp
|
||||||
hle/service/bcat/delivery_task_suspension_service.h
|
hle/service/bcat/delivery_task_suspension_service.h
|
||||||
|
hle/service/bcat/news/download_context.cpp
|
||||||
|
hle/service/bcat/news/download_context.h
|
||||||
hle/service/bcat/news/newly_arrived_event_holder.cpp
|
hle/service/bcat/news/newly_arrived_event_holder.cpp
|
||||||
hle/service/bcat/news/newly_arrived_event_holder.h
|
hle/service/bcat/news/newly_arrived_event_holder.h
|
||||||
hle/service/bcat/news/news_data_service.cpp
|
hle/service/bcat/news/news_data_service.cpp
|
||||||
@@ -721,6 +723,8 @@ add_library(core STATIC
|
|||||||
hle/service/glue/time/time_zone_binary.h
|
hle/service/glue/time/time_zone_binary.h
|
||||||
hle/service/glue/time/worker.cpp
|
hle/service/glue/time/worker.cpp
|
||||||
hle/service/glue/time/worker.h
|
hle/service/glue/time/worker.h
|
||||||
|
hle/service/grc/continuous_recorder.cpp
|
||||||
|
hle/service/grc/continuous_recorder.h
|
||||||
hle/service/grc/grc.cpp
|
hle/service/grc/grc.cpp
|
||||||
hle/service/grc/grc.h
|
hle/service/grc/grc.h
|
||||||
hle/service/hid/active_vibration_device_list.cpp
|
hle/service/hid/active_vibration_device_list.cpp
|
||||||
@@ -853,6 +857,8 @@ add_library(core STATIC
|
|||||||
hle/service/ns/language.h
|
hle/service/ns/language.h
|
||||||
hle/service/ns/ns.cpp
|
hle/service/ns/ns.cpp
|
||||||
hle/service/ns/ns.h
|
hle/service/ns/ns.h
|
||||||
|
hle/service/ns/notify_service.cpp
|
||||||
|
hle/service/ns/notify_service.h
|
||||||
hle/service/ns/ns_results.h
|
hle/service/ns/ns_results.h
|
||||||
hle/service/ns/ns_types.h
|
hle/service/ns/ns_types.h
|
||||||
hle/service/ns/platform_service_manager.cpp
|
hle/service/ns/platform_service_manager.cpp
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ namespace HLE::ApiVersion {
|
|||||||
|
|
||||||
// Horizon OS version constants.
|
// Horizon OS version constants.
|
||||||
|
|
||||||
constexpr u8 HOS_VERSION_MAJOR = 20;
|
constexpr u8 HOS_VERSION_MAJOR = 21;
|
||||||
constexpr u8 HOS_VERSION_MINOR = 4;
|
constexpr u8 HOS_VERSION_MINOR = 0;
|
||||||
constexpr u8 HOS_VERSION_MICRO = 0;
|
constexpr u8 HOS_VERSION_MICRO = 0;
|
||||||
|
|
||||||
// NintendoSDK version constants.
|
// NintendoSDK version constants.
|
||||||
@@ -22,9 +22,9 @@ constexpr u8 SDK_REVISION_MAJOR = 1;
|
|||||||
constexpr u8 SDK_REVISION_MINOR = 0;
|
constexpr u8 SDK_REVISION_MINOR = 0;
|
||||||
|
|
||||||
constexpr char PLATFORM_STRING[] = "NX";
|
constexpr char PLATFORM_STRING[] = "NX";
|
||||||
constexpr char VERSION_HASH[] = "cc744ded0c0eb7b0a71917a97ec00926427cd652";
|
constexpr char VERSION_HASH[] = "f6b2425b6888a66590db104fc734891696e0ecb3";
|
||||||
constexpr char DISPLAY_VERSION[] = "20.4.0";
|
constexpr char DISPLAY_VERSION[] = "21.0.0";
|
||||||
constexpr char DISPLAY_TITLE[] = "NintendoSDK Firmware for NX 20.4.0-1.0";
|
constexpr char DISPLAY_TITLE[] = "NintendoSDK Firmware for NX 21.0.0-1.0";
|
||||||
|
|
||||||
// Atmosphere version constants.
|
// Atmosphere version constants.
|
||||||
|
|
||||||
|
|||||||
@@ -91,6 +91,7 @@ IApplicationFunctions::IApplicationFunctions(Core::System& system_, std::shared_
|
|||||||
{300, nullptr, "RequestToLaunchApplication"},
|
{300, nullptr, "RequestToLaunchApplication"},
|
||||||
{301, nullptr, "RequestToLaunchApplicationWithUserAndArguments"},
|
{301, nullptr, "RequestToLaunchApplicationWithUserAndArguments"},
|
||||||
{310, nullptr, "RequestToLaunchApplicationWithArgumentsAndUserSelectionAndError"},
|
{310, nullptr, "RequestToLaunchApplicationWithArgumentsAndUserSelectionAndError"},
|
||||||
|
{330, D<&IApplicationFunctions::Unknown330>, "Unknown330"}, // [20.2.0+]
|
||||||
{350, nullptr, "DeclareApplicationAlive"},
|
{350, nullptr, "DeclareApplicationAlive"},
|
||||||
{400, nullptr, "CreateApplicationResourceUsageSystemReportForDebug"},
|
{400, nullptr, "CreateApplicationResourceUsageSystemReportForDebug"},
|
||||||
{401, nullptr, "WriteApplicationResourceUsageSystemReportForDebug"},
|
{401, nullptr, "WriteApplicationResourceUsageSystemReportForDebug"},
|
||||||
@@ -526,4 +527,9 @@ Result IApplicationFunctions::GetLaunchRequiredVersionUpgrade(OutCopyHandle<Kern
|
|||||||
R_SUCCEED();
|
R_SUCCEED();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Result IApplicationFunctions::Unknown330() {
|
||||||
|
LOG_WARNING(Service_AM, "(STUBBED) called Unknown330 [20.2.0+]");
|
||||||
|
R_SUCCEED();
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace Service::AM
|
} // namespace Service::AM
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ private:
|
|||||||
Result GetHealthWarningDisappearedSystemEvent(OutCopyHandle<Kernel::KReadableEvent> out_event);
|
Result GetHealthWarningDisappearedSystemEvent(OutCopyHandle<Kernel::KReadableEvent> out_event);
|
||||||
Result PrepareForJit();
|
Result PrepareForJit();
|
||||||
Result GetLaunchRequiredVersionUpgrade(OutCopyHandle<Kernel::KReadableEvent> out_event);
|
Result GetLaunchRequiredVersionUpgrade(OutCopyHandle<Kernel::KReadableEvent> out_event);
|
||||||
|
Result Unknown330(); // [20.2.0+]
|
||||||
|
|
||||||
const std::shared_ptr<Applet> m_applet;
|
const std::shared_ptr<Applet> m_applet;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ IAudioController::IAudioController(Core::System& system_)
|
|||||||
{50003, D<&IAudioController::SetForceOverrideExternalDeviceNameForDebug>, "SetForceOverrideExternalDeviceNameForDebug"}, // [19.0.0+]
|
{50003, D<&IAudioController::SetForceOverrideExternalDeviceNameForDebug>, "SetForceOverrideExternalDeviceNameForDebug"}, // [19.0.0+]
|
||||||
{50004, D<&IAudioController::ClearForceOverrideExternalDeviceNameForDebug>, "ClearForceOverrideExternalDeviceNameForDebug"}, // [19.0.0+]
|
{50004, D<&IAudioController::ClearForceOverrideExternalDeviceNameForDebug>, "ClearForceOverrideExternalDeviceNameForDebug"}, // [19.0.0+]
|
||||||
{5000, nullptr, "Unknown5000"}, // [19.0.0+]
|
{5000, nullptr, "Unknown5000"}, // [19.0.0+]
|
||||||
{10200, nullptr, "Unknown10200"}, // [20.0.0+]
|
{10200, D<&IAudioController::Unknown10200>, "Unknown10200"}, // [20.0.0+]
|
||||||
};
|
};
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
||||||
@@ -402,4 +402,9 @@ Result IAudioController::ClearForceOverrideExternalDeviceNameForDebug() {
|
|||||||
R_SUCCEED();
|
R_SUCCEED();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Result IAudioController::Unknown10200() {
|
||||||
|
LOG_WARNING(Audio, "(STUBBED) called Unknown10200 [20.0.0+]");
|
||||||
|
R_SUCCEED();
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace Service::Audio
|
} // namespace Service::Audio
|
||||||
|
|||||||
@@ -90,6 +90,7 @@ private:
|
|||||||
Result OverrideDefaultTargetForDebug(u32 target); // [19.0.0-19.0.1]
|
Result OverrideDefaultTargetForDebug(u32 target); // [19.0.0-19.0.1]
|
||||||
Result SetForceOverrideExternalDeviceNameForDebug(InLargeData<std::array<u8, 0x80>, BufferAttr_HipcMapAlias> device_name); // [19.0.0+]
|
Result SetForceOverrideExternalDeviceNameForDebug(InLargeData<std::array<u8, 0x80>, BufferAttr_HipcMapAlias> device_name); // [19.0.0+]
|
||||||
Result ClearForceOverrideExternalDeviceNameForDebug(); // [19.0.0+]
|
Result ClearForceOverrideExternalDeviceNameForDebug(); // [19.0.0+]
|
||||||
|
Result Unknown10200(); // [20.0.0+]
|
||||||
|
|
||||||
KernelHelpers::ServiceContext service_context;
|
KernelHelpers::ServiceContext service_context;
|
||||||
|
|
||||||
|
|||||||
32
src/core/hle/service/bcat/news/download_context.cpp
Normal file
32
src/core/hle/service/bcat/news/download_context.cpp
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
#include "common/logging/log.h"
|
||||||
|
#include "core/hle/service/bcat/news/download_context.h"
|
||||||
|
#include "core/hle/service/cmif_serialization.h"
|
||||||
|
|
||||||
|
namespace Service::News {
|
||||||
|
|
||||||
|
IDownloadContext::IDownloadContext(Core::System& system_)
|
||||||
|
: ServiceFramework{system_, "IDownloadContext"} {
|
||||||
|
// clang-format off
|
||||||
|
static const FunctionInfo functions[] = {
|
||||||
|
{0, nullptr, "Unknown0"},
|
||||||
|
{1, nullptr, "Unknown1"},
|
||||||
|
{2, nullptr, "Unknown2"},
|
||||||
|
{3, nullptr, "Unknown3"},
|
||||||
|
{4, D<&IDownloadContext::Unknown4>, "Unknown4"}, // [20.0.0+]
|
||||||
|
};
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
|
RegisterHandlers(functions);
|
||||||
|
}
|
||||||
|
|
||||||
|
IDownloadContext::~IDownloadContext() = default;
|
||||||
|
|
||||||
|
Result IDownloadContext::Unknown4() {
|
||||||
|
LOG_WARNING(Service_BCAT, "(STUBBED) called Unknown4 [20.0.0+]");
|
||||||
|
R_SUCCEED();
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace Service::News
|
||||||
24
src/core/hle/service/bcat/news/download_context.h
Normal file
24
src/core/hle/service/bcat/news/download_context.h
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "core/hle/service/cmif_types.h"
|
||||||
|
#include "core/hle/service/service.h"
|
||||||
|
|
||||||
|
namespace Core {
|
||||||
|
class System;
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace Service::News {
|
||||||
|
|
||||||
|
class IDownloadContext final : public ServiceFramework<IDownloadContext> {
|
||||||
|
public:
|
||||||
|
explicit IDownloadContext(Core::System& system_);
|
||||||
|
~IDownloadContext() override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
Result Unknown4(); // [20.0.0+]
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace Service::News
|
||||||
33
src/core/hle/service/grc/continuous_recorder.cpp
Normal file
33
src/core/hle/service/grc/continuous_recorder.cpp
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#include "common/logging/log.h"
|
||||||
|
#include "core/hle/service/cmif_serialization.h"
|
||||||
|
#include "core/hle/service/grc/continuous_recorder.h"
|
||||||
|
|
||||||
|
namespace Service::GRC {
|
||||||
|
|
||||||
|
IContinuousRecorder::IContinuousRecorder(Core::System& system_)
|
||||||
|
: ServiceFramework{system_, "IContinuousRecorder"} {
|
||||||
|
// clang-format off
|
||||||
|
static const FunctionInfo functions[] = {
|
||||||
|
{0, nullptr, "Unknown0"},
|
||||||
|
{1, nullptr, "Unknown1"},
|
||||||
|
{2, nullptr, "Unknown2"},
|
||||||
|
{3, nullptr, "Unknown3"},
|
||||||
|
{4, nullptr, "Unknown4"},
|
||||||
|
{5, D<&IContinuousRecorder::Unknown5>, "Unknown5"}, // [20.2.0+] Takes 0x20-byte input
|
||||||
|
};
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
|
RegisterHandlers(functions);
|
||||||
|
}
|
||||||
|
|
||||||
|
IContinuousRecorder::~IContinuousRecorder() = default;
|
||||||
|
|
||||||
|
Result IContinuousRecorder::Unknown5(InBuffer<BufferAttr_HipcPointer> buffer) {
|
||||||
|
LOG_WARNING(Service_GRC, "(STUBBED) called Unknown5 [20.2.0+], buffer_size={}", buffer.size());
|
||||||
|
R_SUCCEED();
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace Service::GRC
|
||||||
24
src/core/hle/service/grc/continuous_recorder.h
Normal file
24
src/core/hle/service/grc/continuous_recorder.h
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "core/hle/service/cmif_types.h"
|
||||||
|
#include "core/hle/service/service.h"
|
||||||
|
|
||||||
|
namespace Core {
|
||||||
|
class System;
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace Service::GRC {
|
||||||
|
|
||||||
|
class IContinuousRecorder final : public ServiceFramework<IContinuousRecorder> {
|
||||||
|
public:
|
||||||
|
explicit IContinuousRecorder(Core::System& system_);
|
||||||
|
~IContinuousRecorder() override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
Result Unknown5(InBuffer<BufferAttr_HipcPointer> buffer); // [20.2.0+] Takes 0x20-byte input
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace Service::GRC
|
||||||
@@ -3,6 +3,8 @@
|
|||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
#include "core/hle/service/cmif_serialization.h"
|
||||||
|
#include "core/hle/service/grc/continuous_recorder.h"
|
||||||
#include "core/hle/service/grc/grc.h"
|
#include "core/hle/service/grc/grc.h"
|
||||||
#include "core/hle/service/server_manager.h"
|
#include "core/hle/service/server_manager.h"
|
||||||
#include "core/hle/service/service.h"
|
#include "core/hle/service/service.h"
|
||||||
@@ -11,10 +13,10 @@ namespace Service::GRC {
|
|||||||
|
|
||||||
class GRC final : public ServiceFramework<GRC> {
|
class GRC final : public ServiceFramework<GRC> {
|
||||||
public:
|
public:
|
||||||
explicit GRC(Core::System& system_) : ServiceFramework{system_, "grc:c"} {
|
explicit GRC(Core::System& system_) : ServiceFramework{system_, "grc:c"}, system{system_} {
|
||||||
// clang-format off
|
// clang-format off
|
||||||
static const FunctionInfo functions[] = {
|
static const FunctionInfo functions[] = {
|
||||||
{1, nullptr, "OpenContinuousRecorder"},
|
{1, D<&GRC::OpenContinuousRecorder>, "OpenContinuousRecorder"},
|
||||||
{2, nullptr, "OpenGameMovieTrimmer"},
|
{2, nullptr, "OpenGameMovieTrimmer"},
|
||||||
{3, nullptr, "OpenOffscreenRecorder"},
|
{3, nullptr, "OpenOffscreenRecorder"},
|
||||||
{101, nullptr, "CreateMovieMaker"},
|
{101, nullptr, "CreateMovieMaker"},
|
||||||
@@ -24,8 +26,18 @@ public:
|
|||||||
|
|
||||||
RegisterHandlers(functions);
|
RegisterHandlers(functions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
Result OpenContinuousRecorder(Out<SharedPointer<IContinuousRecorder>> out_interface);
|
||||||
|
Core::System& system;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Result GRC::OpenContinuousRecorder(Out<SharedPointer<IContinuousRecorder>> out_interface) {
|
||||||
|
LOG_WARNING(Service_GRC, "(STUBBED) called");
|
||||||
|
*out_interface = std::make_shared<IContinuousRecorder>(system);
|
||||||
|
R_SUCCEED();
|
||||||
|
}
|
||||||
|
|
||||||
void LoopProcess(Core::System& system) {
|
void LoopProcess(Core::System& system) {
|
||||||
auto server_manager = std::make_unique<ServerManager>(system);
|
auto server_manager = std::make_unique<ServerManager>(system);
|
||||||
|
|
||||||
|
|||||||
@@ -2165,7 +2165,7 @@ Result IHidServer::GetFirmwareVersionStringForUserSupportPage(OutBuffer<BufferAt
|
|||||||
LOG_WARNING(Service_HID, "(STUBBED) called, applet_resource_user_id={}", aruid.pid);
|
LOG_WARNING(Service_HID, "(STUBBED) called, applet_resource_user_id={}", aruid.pid);
|
||||||
|
|
||||||
// Return atmosphere's firmware version & NX version
|
// Return atmosphere's firmware version & NX version
|
||||||
constexpr std::string_view firmware_version = "20.1.5|AMS 1.9.1|E";
|
constexpr std::string_view firmware_version = "21.0.0|AMS 1.9.5|E";
|
||||||
std::memcpy(out_firmware_version.data(), firmware_version.data(),
|
std::memcpy(out_firmware_version.data(), firmware_version.data(),
|
||||||
std::min(out_firmware_version.size(), firmware_version.size()));
|
std::min(out_firmware_version.size(), firmware_version.size()));
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
||||||
|
// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
#include "common/logging/log.h"
|
||||||
|
#include "core/hle/service/cmif_serialization.h"
|
||||||
#include "core/hle/service/mig/mig.h"
|
#include "core/hle/service/mig/mig.h"
|
||||||
#include "core/hle/service/server_manager.h"
|
#include "core/hle/service/server_manager.h"
|
||||||
#include "core/hle/service/service.h"
|
#include "core/hle/service/service.h"
|
||||||
@@ -24,14 +27,30 @@ public:
|
|||||||
{1100, nullptr, "Unknown1100"},
|
{1100, nullptr, "Unknown1100"},
|
||||||
{1101, nullptr, "Unknown1101"},
|
{1101, nullptr, "Unknown1101"},
|
||||||
{1200, nullptr, "Unknown1200"},
|
{1200, nullptr, "Unknown1200"},
|
||||||
{1201, nullptr, "Unknown1201"}
|
{1201, nullptr, "Unknown1201"},
|
||||||
|
{2250, D<&MIG_USR::Unknown2250>, "Unknown2250"}, // [20.2.0+] interface version updated
|
||||||
|
{2260, D<&MIG_USR::Unknown2260>, "Unknown2260"}, // [20.2.0+] interface version updated
|
||||||
};
|
};
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
||||||
RegisterHandlers(functions);
|
RegisterHandlers(functions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
Result Unknown2250();
|
||||||
|
Result Unknown2260();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Result MIG_USR::Unknown2250() {
|
||||||
|
LOG_WARNING(Service_Migration, "(STUBBED) called Unknown2250 [20.2.0+]");
|
||||||
|
R_SUCCEED();
|
||||||
|
}
|
||||||
|
|
||||||
|
Result MIG_USR::Unknown2260() {
|
||||||
|
LOG_WARNING(Service_Migration, "(STUBBED) called Unknown2260 [20.2.0+]");
|
||||||
|
R_SUCCEED();
|
||||||
|
}
|
||||||
|
|
||||||
void LoopProcess(Core::System& system) {
|
void LoopProcess(Core::System& system) {
|
||||||
auto server_manager = std::make_unique<ServerManager>(system);
|
auto server_manager = std::make_unique<ServerManager>(system);
|
||||||
|
|
||||||
|
|||||||
@@ -142,6 +142,8 @@ private:
|
|||||||
void LoopProcess(Core::System& system) {
|
void LoopProcess(Core::System& system) {
|
||||||
auto server_manager = std::make_unique<ServerManager>(system);
|
auto server_manager = std::make_unique<ServerManager>(system);
|
||||||
|
|
||||||
|
// Note: In firmware 21.0.0+, the ngct sysmodule is stubbed and ngct:u service was moved into ngc.
|
||||||
|
// We keep both services registered for backward compatibility with older firmware versions.
|
||||||
server_manager->RegisterNamedService("ngct:u", std::make_shared<NgctServiceImpl>(system));
|
server_manager->RegisterNamedService("ngct:u", std::make_shared<NgctServiceImpl>(system));
|
||||||
server_manager->RegisterNamedService("ngc:u", std::make_shared<NgcServiceImpl>(system));
|
server_manager->RegisterNamedService("ngc:u", std::make_shared<NgcServiceImpl>(system));
|
||||||
ServerManager::RunServer(std::move(server_manager));
|
ServerManager::RunServer(std::move(server_manager));
|
||||||
|
|||||||
38
src/core/hle/service/ns/notify_service.cpp
Normal file
38
src/core/hle/service/ns/notify_service.cpp
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#include "common/logging/log.h"
|
||||||
|
#include "core/hle/service/cmif_serialization.h"
|
||||||
|
#include "core/hle/service/ns/notify_service.h"
|
||||||
|
#include "core/hle/service/ns/service_getter_interface.h"
|
||||||
|
|
||||||
|
namespace Service::NS {
|
||||||
|
|
||||||
|
INotifyService::INotifyService(Core::System& system_)
|
||||||
|
: ServiceFramework{system_, "pdm:ntfy"}, system{system_} {
|
||||||
|
// clang-format off
|
||||||
|
static const FunctionInfo functions[] = {
|
||||||
|
{0, nullptr, "Unknown0"},
|
||||||
|
{100, D<&INotifyService::Unknown100>, "Unknown100"}, // [20.0.0+]
|
||||||
|
{101, D<&INotifyService::Unknown101>, "Unknown101"}, // [20.0.0+]
|
||||||
|
};
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
|
RegisterHandlers(functions);
|
||||||
|
}
|
||||||
|
|
||||||
|
INotifyService::~INotifyService() = default;
|
||||||
|
|
||||||
|
Result INotifyService::Unknown100(Out<SharedPointer<IServiceGetterInterface>> out_interface) {
|
||||||
|
LOG_WARNING(Service_NS, "(STUBBED) called Unknown100 [20.0.0+]");
|
||||||
|
*out_interface = std::make_shared<IServiceGetterInterface>(system, "pdm:ntfy");
|
||||||
|
R_SUCCEED();
|
||||||
|
}
|
||||||
|
|
||||||
|
Result INotifyService::Unknown101(Out<SharedPointer<IServiceGetterInterface>> out_interface) {
|
||||||
|
LOG_WARNING(Service_NS, "(STUBBED) called Unknown101 [20.0.0+]");
|
||||||
|
*out_interface = std::make_shared<IServiceGetterInterface>(system, "pdm:ntfy");
|
||||||
|
R_SUCCEED();
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace Service::NS
|
||||||
30
src/core/hle/service/ns/notify_service.h
Normal file
30
src/core/hle/service/ns/notify_service.h
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "core/hle/service/cmif_types.h"
|
||||||
|
#include "core/hle/service/service.h"
|
||||||
|
|
||||||
|
namespace Service::NS {
|
||||||
|
class IServiceGetterInterface;
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace Core {
|
||||||
|
class System;
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace Service::NS {
|
||||||
|
|
||||||
|
class INotifyService final : public ServiceFramework<INotifyService> {
|
||||||
|
public:
|
||||||
|
explicit INotifyService(Core::System& system_);
|
||||||
|
~INotifyService() override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
Result Unknown100(Out<SharedPointer<IServiceGetterInterface>> out_interface); // [20.0.0+]
|
||||||
|
Result Unknown101(Out<SharedPointer<IServiceGetterInterface>> out_interface); // [20.0.0+]
|
||||||
|
Core::System& system;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace Service::NS
|
||||||
@@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
#include "core/hle/service/ns/develop_interface.h"
|
#include "core/hle/service/ns/develop_interface.h"
|
||||||
#include "core/hle/service/ns/ns.h"
|
#include "core/hle/service/ns/ns.h"
|
||||||
|
#include "core/hle/service/ns/notify_service.h"
|
||||||
#include "core/hle/service/ns/platform_service_manager.h"
|
#include "core/hle/service/ns/platform_service_manager.h"
|
||||||
#include "core/hle/service/ns/query_service.h"
|
#include "core/hle/service/ns/query_service.h"
|
||||||
#include "core/hle/service/ns/service_getter_interface.h"
|
#include "core/hle/service/ns/service_getter_interface.h"
|
||||||
@@ -33,6 +34,7 @@ void LoopProcess(Core::System& system) {
|
|||||||
server_manager->RegisterNamedService("ns:vm",
|
server_manager->RegisterNamedService("ns:vm",
|
||||||
std::make_shared<IVulnerabilityManagerInterface>(system));
|
std::make_shared<IVulnerabilityManagerInterface>(system));
|
||||||
server_manager->RegisterNamedService("pdm:qry", std::make_shared<IQueryService>(system));
|
server_manager->RegisterNamedService("pdm:qry", std::make_shared<IQueryService>(system));
|
||||||
|
server_manager->RegisterNamedService("pdm:ntfy", std::make_shared<INotifyService>(system));
|
||||||
|
|
||||||
server_manager->RegisterNamedService("pl:s",
|
server_manager->RegisterNamedService("pl:s",
|
||||||
std::make_shared<IPlatformServiceManager>(system, "pl:s"));
|
std::make_shared<IPlatformServiceManager>(system, "pl:s"));
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ IOlscServiceForSystemService::IOlscServiceForSystemService(Core::System& system_
|
|||||||
{911, nullptr, "CleanupSeriesInfoType1"},
|
{911, nullptr, "CleanupSeriesInfoType1"},
|
||||||
{912, nullptr, "RemoveSeriesInfoType1"},
|
{912, nullptr, "RemoveSeriesInfoType1"},
|
||||||
{913, nullptr, "GetSeriesInfoType1"},
|
{913, nullptr, "GetSeriesInfoType1"},
|
||||||
|
{914, D<&IOlscServiceForSystemService::Unknown914>, "Unknown914"}, // [20.2.0+]
|
||||||
{1000, nullptr, "UpdateIssueOld"},
|
{1000, nullptr, "UpdateIssueOld"},
|
||||||
{1010, nullptr, "Unknown1010"},
|
{1010, nullptr, "Unknown1010"},
|
||||||
{1011, nullptr, "ListIssueInfoOld"},
|
{1011, nullptr, "ListIssueInfoOld"},
|
||||||
@@ -114,4 +115,9 @@ Result IOlscServiceForSystemService::CloneService(
|
|||||||
R_SUCCEED();
|
R_SUCCEED();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Result IOlscServiceForSystemService::Unknown914() {
|
||||||
|
LOG_WARNING(Service_OLSC, "(STUBBED) called Unknown914 [20.2.0+]");
|
||||||
|
R_SUCCEED();
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace Service::OLSC
|
} // namespace Service::OLSC
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ private:
|
|||||||
Result OpenDaemonController(Out<SharedPointer<IDaemonController>> out_interface);
|
Result OpenDaemonController(Out<SharedPointer<IDaemonController>> out_interface);
|
||||||
Result GetDataTransferPolicyInfo(Out<u16> out_policy_info, u64 application_id);
|
Result GetDataTransferPolicyInfo(Out<u16> out_policy_info, u64 application_id);
|
||||||
Result CloneService(Out<SharedPointer<IOlscServiceForSystemService>> out_interface);
|
Result CloneService(Out<SharedPointer<IOlscServiceForSystemService>> out_interface);
|
||||||
|
Result Unknown914(); // [20.2.0+]
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Service::OLSC
|
} // namespace Service::OLSC
|
||||||
|
|||||||
@@ -33,7 +33,9 @@ IRemoteStorageController::IRemoteStorageController(Core::System& system_)
|
|||||||
{23, nullptr, "TouchSecondarySave"},
|
{23, nullptr, "TouchSecondarySave"},
|
||||||
{24, nullptr, "GetSecondarySaveDataInfo"},
|
{24, nullptr, "GetSecondarySaveDataInfo"},
|
||||||
{25, nullptr, "RegisterDownloadSaveDataTransferTaskForAutonomyRegistration"},
|
{25, nullptr, "RegisterDownloadSaveDataTransferTaskForAutonomyRegistration"},
|
||||||
|
{28, D<&IRemoteStorageController::Unknown28>, "Unknown28"}, // [20.2.0+]
|
||||||
{900, nullptr, "Unknown900"},
|
{900, nullptr, "Unknown900"},
|
||||||
|
{901, D<&IRemoteStorageController::Unknown901>, "Unknown901"}, // [20.2.0+]
|
||||||
};
|
};
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
||||||
@@ -51,4 +53,14 @@ Result IRemoteStorageController::GetSecondarySave(Out<bool> out_has_secondary_sa
|
|||||||
R_SUCCEED();
|
R_SUCCEED();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Result IRemoteStorageController::Unknown28() {
|
||||||
|
LOG_WARNING(Service_OLSC, "(STUBBED) called Unknown28 [20.2.0+]");
|
||||||
|
R_SUCCEED();
|
||||||
|
}
|
||||||
|
|
||||||
|
Result IRemoteStorageController::Unknown901() {
|
||||||
|
LOG_WARNING(Service_OLSC, "(STUBBED) called Unknown901 [20.2.0+]");
|
||||||
|
R_SUCCEED();
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace Service::OLSC
|
} // namespace Service::OLSC
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ public:
|
|||||||
private:
|
private:
|
||||||
Result GetSecondarySave(Out<bool> out_has_secondary_save, Out<std::array<u64, 3>> out_unknown,
|
Result GetSecondarySave(Out<bool> out_has_secondary_save, Out<std::array<u64, 3>> out_unknown,
|
||||||
u64 application_id);
|
u64 application_id);
|
||||||
|
Result Unknown28(); // [20.2.0+]
|
||||||
|
Result Unknown901(); // [20.2.0+]
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Service::OLSC
|
} // namespace Service::OLSC
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
||||||
|
// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#include "common/logging/log.h"
|
||||||
|
#include "core/hle/service/cmif_serialization.h"
|
||||||
#include "core/hle/service/set/firmware_debug_settings_server.h"
|
#include "core/hle/service/set/firmware_debug_settings_server.h"
|
||||||
|
|
||||||
namespace Service::Set {
|
namespace Service::Set {
|
||||||
@@ -18,6 +21,7 @@ IFirmwareDebugSettingsServer::IFirmwareDebugSettingsServer(Core::System& system_
|
|||||||
{21, nullptr, "SetAllowedSslHosts"},
|
{21, nullptr, "SetAllowedSslHosts"},
|
||||||
{22, nullptr, "SetHostFsMountPoint"},
|
{22, nullptr, "SetHostFsMountPoint"},
|
||||||
{23, nullptr, "SetMemoryUsageRateFlag"},
|
{23, nullptr, "SetMemoryUsageRateFlag"},
|
||||||
|
{24, D<&IFirmwareDebugSettingsServer::Unknown24>, "Unknown24"}, // [20.0.0+]
|
||||||
};
|
};
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
||||||
@@ -26,4 +30,9 @@ IFirmwareDebugSettingsServer::IFirmwareDebugSettingsServer(Core::System& system_
|
|||||||
|
|
||||||
IFirmwareDebugSettingsServer::~IFirmwareDebugSettingsServer() = default;
|
IFirmwareDebugSettingsServer::~IFirmwareDebugSettingsServer() = default;
|
||||||
|
|
||||||
|
Result IFirmwareDebugSettingsServer::Unknown24() {
|
||||||
|
LOG_WARNING(Service_SET, "(STUBBED) called Unknown24 [20.0.0+]");
|
||||||
|
R_SUCCEED();
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace Service::Set
|
} // namespace Service::Set
|
||||||
|
|||||||
@@ -15,6 +15,9 @@ class IFirmwareDebugSettingsServer final : public ServiceFramework<IFirmwareDebu
|
|||||||
public:
|
public:
|
||||||
explicit IFirmwareDebugSettingsServer(Core::System& system_);
|
explicit IFirmwareDebugSettingsServer(Core::System& system_);
|
||||||
~IFirmwareDebugSettingsServer() override;
|
~IFirmwareDebugSettingsServer() override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
Result Unknown24(); // [20.0.0+]
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Service::Set
|
} // namespace Service::Set
|
||||||
|
|||||||
@@ -301,6 +301,15 @@ ISystemSettingsServer::ISystemSettingsServer(Core::System& system_)
|
|||||||
{208, nullptr, "SetHearingProtectionSafeguardFlag"},
|
{208, nullptr, "SetHearingProtectionSafeguardFlag"},
|
||||||
{209, nullptr, "GetHearingProtectionSafeguardRemainingTime"},
|
{209, nullptr, "GetHearingProtectionSafeguardRemainingTime"},
|
||||||
{210, nullptr, "SetHearingProtectionSafeguardRemainingTime"},
|
{210, nullptr, "SetHearingProtectionSafeguardRemainingTime"},
|
||||||
|
{263, C<&ISystemSettingsServer::Unknown263>, "Unknown263"}, // [20.0.0+]
|
||||||
|
{264, C<&ISystemSettingsServer::Unknown264>, "Unknown264"}, // [20.0.0+]
|
||||||
|
{282, C<&ISystemSettingsServer::Unknown282>, "Unknown282"}, // [20.0.0+]
|
||||||
|
{283, C<&ISystemSettingsServer::Unknown283>, "Unknown283"}, // [20.0.0+]
|
||||||
|
{289, C<&ISystemSettingsServer::Unknown289>, "Unknown289"}, // [20.0.0+]
|
||||||
|
{300, C<&ISystemSettingsServer::Unknown300>, "Unknown300"}, // [20.0.0+]
|
||||||
|
{301, C<&ISystemSettingsServer::Unknown301>, "Unknown301"}, // [20.0.0+]
|
||||||
|
{306, C<&ISystemSettingsServer::Unknown306>, "Unknown306"}, // [20.0.0+]
|
||||||
|
{307, C<&ISystemSettingsServer::Unknown307>, "Unknown307"}, // [20.0.0+]
|
||||||
};
|
};
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
||||||
@@ -1389,4 +1398,49 @@ Result ISystemSettingsServer::GetSettingsItemValueImpl(std::span<u8> out_value,
|
|||||||
R_SUCCEED();
|
R_SUCCEED();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Result ISystemSettingsServer::Unknown263() {
|
||||||
|
LOG_WARNING(Service_SET, "(STUBBED) called Unknown263 [20.0.0+]");
|
||||||
|
R_SUCCEED();
|
||||||
|
}
|
||||||
|
|
||||||
|
Result ISystemSettingsServer::Unknown264() {
|
||||||
|
LOG_WARNING(Service_SET, "(STUBBED) called Unknown264 [20.0.0+]");
|
||||||
|
R_SUCCEED();
|
||||||
|
}
|
||||||
|
|
||||||
|
Result ISystemSettingsServer::Unknown282() {
|
||||||
|
LOG_WARNING(Service_SET, "(STUBBED) called Unknown282 [20.0.0+]");
|
||||||
|
R_SUCCEED();
|
||||||
|
}
|
||||||
|
|
||||||
|
Result ISystemSettingsServer::Unknown283() {
|
||||||
|
LOG_WARNING(Service_SET, "(STUBBED) called Unknown283 [20.0.0+]");
|
||||||
|
R_SUCCEED();
|
||||||
|
}
|
||||||
|
|
||||||
|
Result ISystemSettingsServer::Unknown289() {
|
||||||
|
LOG_WARNING(Service_SET, "(STUBBED) called Unknown289 [20.0.0+]");
|
||||||
|
R_SUCCEED();
|
||||||
|
}
|
||||||
|
|
||||||
|
Result ISystemSettingsServer::Unknown300() {
|
||||||
|
LOG_WARNING(Service_SET, "(STUBBED) called Unknown300 [20.0.0+]");
|
||||||
|
R_SUCCEED();
|
||||||
|
}
|
||||||
|
|
||||||
|
Result ISystemSettingsServer::Unknown301() {
|
||||||
|
LOG_WARNING(Service_SET, "(STUBBED) called Unknown301 [20.0.0+]");
|
||||||
|
R_SUCCEED();
|
||||||
|
}
|
||||||
|
|
||||||
|
Result ISystemSettingsServer::Unknown306() {
|
||||||
|
LOG_WARNING(Service_SET, "(STUBBED) called Unknown306 [20.0.0+]");
|
||||||
|
R_SUCCEED();
|
||||||
|
}
|
||||||
|
|
||||||
|
Result ISystemSettingsServer::Unknown307() {
|
||||||
|
LOG_WARNING(Service_SET, "(STUBBED) called Unknown307 [20.0.0+]");
|
||||||
|
R_SUCCEED();
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace Service::Set
|
} // namespace Service::Set
|
||||||
|
|||||||
@@ -155,6 +155,15 @@ public:
|
|||||||
Result GetFieldTestingFlag(Out<bool> out_field_testing_flag);
|
Result GetFieldTestingFlag(Out<bool> out_field_testing_flag);
|
||||||
Result GetPanelCrcMode(Out<s32> out_panel_crc_mode);
|
Result GetPanelCrcMode(Out<s32> out_panel_crc_mode);
|
||||||
Result SetPanelCrcMode(s32 panel_crc_mode);
|
Result SetPanelCrcMode(s32 panel_crc_mode);
|
||||||
|
Result Unknown263(); // [20.0.0+]
|
||||||
|
Result Unknown264(); // [20.0.0+]
|
||||||
|
Result Unknown282(); // [20.0.0+]
|
||||||
|
Result Unknown283(); // [20.0.0+]
|
||||||
|
Result Unknown289(); // [20.0.0+]
|
||||||
|
Result Unknown300(); // [20.0.0+]
|
||||||
|
Result Unknown301(); // [20.0.0+]
|
||||||
|
Result Unknown306(); // [20.0.0+]
|
||||||
|
Result Unknown307(); // [20.0.0+]
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool LoadSettingsFile(std::filesystem::path& path, auto&& default_func);
|
bool LoadSettingsFile(std::filesystem::path& path, auto&& default_func);
|
||||||
|
|||||||
Reference in New Issue
Block a user