mirror of
https://git.eden-emu.dev/archive/citron
synced 2026-04-14 00:30:51 -04: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:
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 "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/server_manager.h"
|
||||
#include "core/hle/service/service.h"
|
||||
@@ -11,10 +13,10 @@ namespace Service::GRC {
|
||||
|
||||
class GRC final : public ServiceFramework<GRC> {
|
||||
public:
|
||||
explicit GRC(Core::System& system_) : ServiceFramework{system_, "grc:c"} {
|
||||
explicit GRC(Core::System& system_) : ServiceFramework{system_, "grc:c"}, system{system_} {
|
||||
// clang-format off
|
||||
static const FunctionInfo functions[] = {
|
||||
{1, nullptr, "OpenContinuousRecorder"},
|
||||
{1, D<&GRC::OpenContinuousRecorder>, "OpenContinuousRecorder"},
|
||||
{2, nullptr, "OpenGameMovieTrimmer"},
|
||||
{3, nullptr, "OpenOffscreenRecorder"},
|
||||
{101, nullptr, "CreateMovieMaker"},
|
||||
@@ -24,8 +26,18 @@ public:
|
||||
|
||||
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) {
|
||||
auto server_manager = std::make_unique<ServerManager>(system);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user