mirror of
https://git.eden-emu.dev/archive/citron
synced 2026-03-24 18:39:32 -04:00
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>
62 lines
2.0 KiB
C++
62 lines
2.0 KiB
C++
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
|
// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#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/server_manager.h"
|
|
#include "core/hle/service/service.h"
|
|
|
|
namespace Service::Migration {
|
|
|
|
class MIG_USR final : public ServiceFramework<MIG_USR> {
|
|
public:
|
|
explicit MIG_USR(Core::System& system_) : ServiceFramework{system_, "mig:usr"} {
|
|
// clang-format off
|
|
static const FunctionInfo functions[] = {
|
|
{10, nullptr, "TryGetLastMigrationInfo"},
|
|
{100, nullptr, "CreateServer"},
|
|
{101, nullptr, "ResumeServer"},
|
|
{200, nullptr, "CreateClient"},
|
|
{201, nullptr, "ResumeClient"},
|
|
{1001, nullptr, "Unknown1001"},
|
|
{1010, nullptr, "Unknown1010"},
|
|
{1100, nullptr, "Unknown1100"},
|
|
{1101, nullptr, "Unknown1101"},
|
|
{1200, nullptr, "Unknown1200"},
|
|
{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
|
|
|
|
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) {
|
|
auto server_manager = std::make_unique<ServerManager>(system);
|
|
|
|
server_manager->RegisterNamedService("mig:user", std::make_shared<MIG_USR>(system));
|
|
ServerManager::RunServer(std::move(server_manager));
|
|
}
|
|
|
|
} // namespace Service::Migration
|