[hle] Firmware 23.0.0 (#4390)

Preparing when something inevitably requires *at least* this reporting of version/etc.

Authored-by: @Maufeat
Signed-off-by: lizzie <lizzie@eden-emu.dev>

- [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions).
- [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md)
- [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability.

-------------------

Co-authored-by: Maufeat <sahyno1996@gmail.com>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4390
Reviewed-by: Maufeat <sahyno1996@gmail.com>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
This commit is contained in:
lizzie
2026-09-10 22:28:39 +02:00
committed by crueter
parent ed566919f4
commit e7a96c7907
13 changed files with 107 additions and 33 deletions
@@ -16,6 +16,7 @@
#include "core/hle/service/cmif_serialization.h"
#include "core/loader/loader.h"
#include "core/launch_timestamp_cache.h"
#include "core/hle/api_version.h"
namespace Service::AM {
@@ -87,7 +88,7 @@ Result IApplicationCreator::CreateSystemApplication(
std::vector<u8> control;
std::unique_ptr<Loader::AppLoader> loader;
auto process = CreateProcess(system, application_id, 1, 22);
auto process = CreateProcess(system, application_id, 1, HLE::ApiVersion::HOS_VERSION_MAJOR);
R_UNLESS(process != nullptr, ResultUnknown);
const auto applet = std::make_shared<Applet>(system, std::move(process), true);
@@ -13,6 +13,8 @@
#include "core/hle/service/am/process_creation.h"
#include "core/hle/service/am/service/library_applet_accessor.h"
#include "core/hle/service/am/service/library_applet_creator.h"
#include "core/hle/api_version.h"
#include "core/hle/service/am/service/storage.h"
#include "core/hle/service/am/window_system.h"
#include "core/hle/service/cmif_serialization.h"
@@ -108,20 +110,7 @@ std::shared_ptr<ILibraryAppletAccessor> CreateGuestApplet(Core::System& system,
return {};
}
// TODO: enable other versions of applets
enum : u8 {
Firmware1400 = 14,
Firmware1500 = 15,
Firmware1600 = 16,
Firmware1700 = 17,
Firmware1800 = 18,
Firmware1900 = 19,
Firmware2000 = 20,
Firmware2100 = 21,
Firmware2200 = 22,
};
auto process = CreateProcess(system, program_id, Firmware1400, Firmware2200);
auto process = CreateProcess(system, program_id, 1, HLE::ApiVersion::HOS_VERSION_MAJOR);
if (process) {
const auto applet = std::make_shared<Applet>(system, std::move(process), false);
applet->program_id = program_id;
@@ -71,6 +71,7 @@ ISelfController::ISelfController(Core::System& system_, std::shared_ptr<Applet>
{120, D<&ISelfController::SaveCurrentScreenshot>, "SaveCurrentScreenshot"},
{130, D<&ISelfController::SetRecordVolumeMuted>, "SetRecordVolumeMuted"},
{230, D<&ISelfController::Unknown230>, "Unknown230"},
{240, D<&ISelfController::Unknown240>, "Unknown240"},
{1000, nullptr, "GetDebugStorageChannel"},
};
// clang-format on
@@ -422,4 +423,10 @@ Result ISelfController::Unknown230(u32 in_val, Out<u16> out_val) {
R_SUCCEED();
}
Result ISelfController::Unknown240(u32 in_val) {
LOG_WARNING(Service_AM, "(STUBBED) called, in_val={}", in_val);
R_SUCCEED();
}
} // namespace Service::AM
@@ -68,6 +68,7 @@ private:
Result SaveCurrentScreenshot(Capture::AlbumReportOption album_report_option);
Result SetRecordVolumeMuted(bool muted);
Result Unknown230(u32 in_val, Out<u16> out_val);
Result Unknown240(u32 in_val);
Kernel::KProcess* const m_process;
const std::shared_ptr<Applet> m_applet;
@@ -54,7 +54,7 @@ FSP_SRV::FSP_SRV(Core::System& system_)
static const FunctionInfo functions[] = {
{0, nullptr, "OpenFileSystem"},
{1, D<&FSP_SRV::SetCurrentProcess>, "SetCurrentProcess"},
{2, nullptr, "OpenDataFileSystemByCurrentProcess"},
{2, D<&FSP_SRV::OpenDataFileSystemByCurrentProcess>, "OpenDataFileSystemByCurrentProcess"},
{7, D<&FSP_SRV::OpenFileSystemWithPatch>, "OpenFileSystemWithPatch"},
{8, nullptr, "OpenFileSystemWithId"},
{9, nullptr, "OpenDataFileSystemByApplicationId"},
@@ -118,6 +118,7 @@ FSP_SRV::FSP_SRV(Core::System& system_)
{204, nullptr, "OpenDataFileSystemByProgramIndex"},
{205, D<&FSP_SRV::OpenDataStorageWithProgramIndex>, "OpenDataStorageWithProgramIndex"},
{206, nullptr, "OpenDataStorageByPath"},
{210, D<&FSP_SRV::SetCurrentProcess>, "SetCurrentProcess"},
{400, nullptr, "OpenDeviceOperator"},
{500, nullptr, "OpenSdCardDetectionEventNotifier"},
{501, nullptr, "OpenGameCardDetectionEventNotifier"},
@@ -460,6 +461,31 @@ Result FSP_SRV::OpenSaveDataTransferProhibiter(
R_SUCCEED();
}
Result FSP_SRV::OpenDataFileSystemByCurrentProcess(OutInterface<IFileSystem> out_interface) {
LOG_DEBUG(Service_FS, "called");
if (!romfs) {
auto current_romfs = romfs_controller->OpenRomFSCurrentProcess();
if (!current_romfs) {
LOG_CRITICAL(Service_FS, "No file system interface available!");
R_RETURN(ResultUnknown);
}
romfs = current_romfs;
}
auto extracted_romfs = FileSys::ExtractRomFS(romfs);
if (!extracted_romfs) {
LOG_CRITICAL(Service_FS, "Failed to extract RomFS for the current process!");
R_RETURN(ResultUnknown);
}
*out_interface = std::make_shared<IFileSystem>(
system, extracted_romfs, SizeGetter::FromStorageId(fsc, FileSys::StorageId::NandUser));
R_SUCCEED();
}
Result FSP_SRV::OpenDataStorageByCurrentProcess(OutInterface<IStorage> out_interface) {
LOG_DEBUG(Service_FS, "called");
@@ -51,6 +51,7 @@ public:
private:
Result SetCurrentProcess(ClientProcessId pid);
Result OpenDataFileSystemByCurrentProcess(OutInterface<IFileSystem> out_interface);
Result OpenFileSystemWithPatch(OutInterface<IFileSystem> out_interface,
FileSystemProxyType type, u64 open_program_id);
Result OpenSdCardFileSystem(OutInterface<IFileSystem> out_interface);
@@ -4,6 +4,8 @@
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <chrono>
#include "core/core.h"
#include "core/file_sys/control_metadata.h"
#include "core/file_sys/patch_manager.h"
@@ -94,6 +96,7 @@ IParentalControlService::IParentalControlService(Core::System& system_, Capabili
{1457, D<&IParentalControlService::GetPlayTimerEventToRequestSuspension>, "GetPlayTimerEventToRequestSuspension"},
{1458, D<&IParentalControlService::IsPlayTimerAlarmDisabled>, "IsPlayTimerAlarmDisabled"},
{1459, D<&IParentalControlService::GetPlayTimerRemainingTimeDisplayInfo>, "GetPlayTimerRemainingTimeDisplayInfo"},
{1460, D<&IParentalControlService::Unknown1460>, "Unknown1460"},
{1471, nullptr, "NotifyWrongPinCodeInputManyTimes"},
{1472, nullptr, "CancelNetworkRequest"},
{1473, D<&IParentalControlService::GetUnlinkedEvent>, "GetUnlinkedEvent"},
@@ -440,8 +443,15 @@ Result IParentalControlService::IsPlayTimerAlarmDisabled(Out<bool> out_play_time
R_SUCCEED();
}
Result IParentalControlService::GetPlayTimerRemainingTimeDisplayInfo(/* Out 0x18 */) {
LOG_INFO(Service_PCTL, "called");
Result IParentalControlService::GetPlayTimerRemainingTimeDisplayInfo(Out<PlayTimerRemainingTimeDisplayInfo> out_display_info) {
LOG_DEBUG(Service_PCTL, "called");
*out_display_info = {.state = PlayTimerDisplayState::NotConfigured};
R_SUCCEED();
}
Result IParentalControlService::Unknown1460(u8 in_unk, Out<PlayTimerRemainingTimeDisplayInfo> out_display_info) {
LOG_DEBUG(Service_PCTL, "called, in_unk={}", in_unk);
*out_display_info = {.state = PlayTimerDisplayState::NotConfigured};
R_SUCCEED();
}
@@ -55,7 +55,8 @@ private:
Result GetPlayTimerSettingsOld(Out<PlayTimerSettingsOld> out_play_timer_settings);
Result GetPlayTimerEventToRequestSuspension(OutCopyHandle<Kernel::KReadableEvent> out_event);
Result IsPlayTimerAlarmDisabled(Out<bool> out_play_timer_alarm_disabled);
Result GetPlayTimerRemainingTimeDisplayInfo();
Result GetPlayTimerRemainingTimeDisplayInfo(Out<PlayTimerRemainingTimeDisplayInfo> out_display_info);
Result Unknown1460(u8 in_unk, Out<PlayTimerRemainingTimeDisplayInfo> out_display_info);
Result GetUnlinkedEvent(OutCopyHandle<Kernel::KReadableEvent> out_event);
Result GetStereoVisionRestriction(Out<bool> out_stereo_vision_restriction);
Result SetStereoVisionRestriction(bool stereo_vision_restriction);
+22 -1
View File
@@ -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
@@ -49,4 +49,25 @@ struct PlayTimerSettings {
};
static_assert(sizeof(PlayTimerSettings) == 0x44, "PlayTimerSettings has incorrect size.");
enum class PlayTimerDisplayState : u8 {
TimesUp = 0,
BedtimeAlarm = 1,
RemainingTime = 2,
Unknown3 = 3,
Unknown4 = 4,
Unknown5 = 5,
TimerDisabled = 6,
NotConfigured = 7,
};
// This is nn::pctl::PlayTimerRemainingTimeDisplayInfo
struct PlayTimerRemainingTimeDisplayInfo {
PlayTimerDisplayState state;
INSERT_PADDING_BYTES(0x7);
u64 unknown_08;
u64 remaining_time;
};
static_assert(sizeof(PlayTimerRemainingTimeDisplayInfo) == 0x18,
"PlayTimerRemainingTimeDisplayInfo has incorrect size.");
} // namespace Service::PCTL