mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-04-10 03:18:55 +02:00
[hle] splay
Signed-off-by: lizzie <lizzie@eden-emu.dev>
This commit is contained in:
parent
6f9d025ad2
commit
a4abca4040
14 changed files with 133 additions and 46 deletions
|
|
@ -66,6 +66,7 @@ enum class IntSetting(override val key: String) : AbstractIntSetting {
|
|||
LOGIN_SHARE_APPLET("login_share_applet_mode"),
|
||||
WIFI_WEB_AUTH_APPLET("wifi_web_auth_applet_mode"),
|
||||
MY_PAGE_APPLET("my_page_applet_mode"),
|
||||
SPLAY_APPLET("splay_applet_mode"),
|
||||
INPUT_OVERLAY_AUTO_HIDE("input_overlay_auto_hide"),
|
||||
OVERLAY_GRID_SIZE("overlay_grid_size"),
|
||||
DEBUG_KNOBS("debug_knobs"),
|
||||
|
|
|
|||
|
|
@ -38,7 +38,8 @@ enum class AppletInfo(val appletId: Int, val entryId: Long = 0) {
|
|||
OfflineWeb(0x17),
|
||||
LoginShare(0x18),
|
||||
WebAuth(0x19),
|
||||
MyPage(0x1A)
|
||||
MyPage(0x1A),
|
||||
Splay(0x64)
|
||||
}
|
||||
|
||||
// Matches enum in Service::NFP::CabinetMode with extra metadata
|
||||
|
|
|
|||
|
|
@ -168,6 +168,7 @@ struct Values {
|
|||
linkage, AppletMode::HLE, "wifi_web_auth_applet_mode", Category::LibraryApplet};
|
||||
Setting<AppletMode> my_page_applet_mode{linkage, AppletMode::LLE, "my_page_applet_mode",
|
||||
Category::LibraryApplet};
|
||||
Setting<AppletMode> splay_applet_mode{linkage, AppletMode::LLE, "splay_applet_mode", Category::LibraryApplet};
|
||||
|
||||
// Audio
|
||||
SwitchableSetting<AudioEngine> sink_id{linkage, AudioEngine::Auto, "output_engine",
|
||||
|
|
|
|||
|
|
@ -829,6 +829,8 @@ add_library(core STATIC
|
|||
hle/service/ns/ns_types.h
|
||||
hle/service/ns/platform_service_manager.cpp
|
||||
hle/service/ns/platform_service_manager.h
|
||||
hle/service/ns/notify_service.cpp
|
||||
hle/service/ns/notify_service.h
|
||||
hle/service/ns/query_service.cpp
|
||||
hle/service/ns/query_service.h
|
||||
hle/service/ns/read_only_application_control_data_interface.cpp
|
||||
|
|
|
|||
|
|
@ -94,7 +94,8 @@ enum class AppletId : u32 {
|
|||
LoginShare = 0x18,
|
||||
WebAuth = 0x19,
|
||||
MyPage = 0x1A,
|
||||
Lhub = 0x35
|
||||
Lhub = 0x35,
|
||||
Splay = 0x64,
|
||||
};
|
||||
|
||||
enum class AppletProgramId : u64 {
|
||||
|
|
@ -118,6 +119,8 @@ enum class AppletProgramId : u64 {
|
|||
WebAuth = 0x0100000000001011ull,
|
||||
Starter = 0x0100000000001012ull,
|
||||
MyPage = 0x0100000000001013ull,
|
||||
Maintenance = 0x0100000000001015ull,
|
||||
Splay = 0x0100000000001048ull,
|
||||
MaxProgramId = 0x0100000000001FFFull,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -172,6 +172,19 @@ void PushInShowMiiEditData(Core::System& system, AppletStorageChannel& channel)
|
|||
channel.Push(std::make_shared<IStorage>(system, std::move(argument_data)));
|
||||
}
|
||||
|
||||
void PushInShowSplay(Core::System& system, AppletStorageChannel& channel) {
|
||||
struct SplayV1 {
|
||||
std::array<char, 0x100> i_dont_know_what_this_is_used_for;
|
||||
};
|
||||
static_assert(sizeof(SplayV1) == 0x100, "MiiEditV3 has incorrect size.");
|
||||
|
||||
SplayV1 splay_arguments{};
|
||||
std::vector<u8> argument_data(sizeof(splay_arguments));
|
||||
std::memcpy(argument_data.data(), &splay_arguments, sizeof(splay_arguments));
|
||||
|
||||
channel.Push(std::make_shared<IStorage>(system, std::move(argument_data)));
|
||||
}
|
||||
|
||||
void PushInShowSoftwareKeyboard(Core::System& system, AppletStorageChannel& channel) {
|
||||
const CommonArguments arguments{
|
||||
.arguments_version = CommonArgumentVersion::Version3,
|
||||
|
|
@ -335,6 +348,9 @@ void AppletManager::SetWindowSystem(WindowSystem* window_system) {
|
|||
case AppletId::Controller:
|
||||
PushInShowController(m_system, InitializeFakeCallerApplet(m_system, applet));
|
||||
break;
|
||||
case AppletId::Splay:
|
||||
PushInShowSplay(m_system, InitializeFakeCallerApplet(m_system, applet));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ bool ShouldCreateGuestApplet(AppletId applet_id) {
|
|||
X(LoginShare, login_share)
|
||||
X(WebAuth, wifi_web_auth)
|
||||
X(MyPage, my_page)
|
||||
X(Splay, splay)
|
||||
|
||||
#undef X
|
||||
|
||||
|
|
@ -52,48 +53,28 @@ bool ShouldCreateGuestApplet(AppletId applet_id) {
|
|||
|
||||
AppletProgramId AppletIdToProgramId(AppletId applet_id) {
|
||||
switch (applet_id) {
|
||||
case AppletId::OverlayDisplay:
|
||||
return AppletProgramId::OverlayDisplay;
|
||||
case AppletId::QLaunch:
|
||||
return AppletProgramId::QLaunch;
|
||||
case AppletId::Starter:
|
||||
return AppletProgramId::Starter;
|
||||
case AppletId::Auth:
|
||||
return AppletProgramId::Auth;
|
||||
case AppletId::Cabinet:
|
||||
return AppletProgramId::Cabinet;
|
||||
case AppletId::Controller:
|
||||
return AppletProgramId::Controller;
|
||||
case AppletId::DataErase:
|
||||
return AppletProgramId::DataErase;
|
||||
case AppletId::Error:
|
||||
return AppletProgramId::Error;
|
||||
case AppletId::NetConnect:
|
||||
return AppletProgramId::NetConnect;
|
||||
case AppletId::ProfileSelect:
|
||||
return AppletProgramId::ProfileSelect;
|
||||
case AppletId::SoftwareKeyboard:
|
||||
return AppletProgramId::SoftwareKeyboard;
|
||||
case AppletId::MiiEdit:
|
||||
return AppletProgramId::MiiEdit;
|
||||
case AppletId::Web:
|
||||
return AppletProgramId::Web;
|
||||
case AppletId::Shop:
|
||||
return AppletProgramId::Shop;
|
||||
case AppletId::PhotoViewer:
|
||||
return AppletProgramId::PhotoViewer;
|
||||
case AppletId::Settings:
|
||||
return AppletProgramId::Settings;
|
||||
case AppletId::OfflineWeb:
|
||||
return AppletProgramId::OfflineWeb;
|
||||
case AppletId::LoginShare:
|
||||
return AppletProgramId::LoginShare;
|
||||
case AppletId::WebAuth:
|
||||
return AppletProgramId::WebAuth;
|
||||
case AppletId::MyPage:
|
||||
return AppletProgramId::MyPage;
|
||||
default:
|
||||
return static_cast<AppletProgramId>(0);
|
||||
case AppletId::OverlayDisplay: return AppletProgramId::OverlayDisplay;
|
||||
case AppletId::QLaunch: return AppletProgramId::QLaunch;
|
||||
case AppletId::Starter: return AppletProgramId::Starter;
|
||||
case AppletId::Auth: return AppletProgramId::Auth;
|
||||
case AppletId::Cabinet: return AppletProgramId::Cabinet;
|
||||
case AppletId::Controller: return AppletProgramId::Controller;
|
||||
case AppletId::DataErase: return AppletProgramId::DataErase;
|
||||
case AppletId::Error: return AppletProgramId::Error;
|
||||
case AppletId::NetConnect: return AppletProgramId::NetConnect;
|
||||
case AppletId::ProfileSelect: return AppletProgramId::ProfileSelect;
|
||||
case AppletId::SoftwareKeyboard: return AppletProgramId::SoftwareKeyboard;
|
||||
case AppletId::MiiEdit: return AppletProgramId::MiiEdit;
|
||||
case AppletId::Web: return AppletProgramId::Web;
|
||||
case AppletId::Shop: return AppletProgramId::Shop;
|
||||
case AppletId::PhotoViewer: return AppletProgramId::PhotoViewer;
|
||||
case AppletId::Settings: return AppletProgramId::Settings;
|
||||
case AppletId::OfflineWeb: return AppletProgramId::OfflineWeb;
|
||||
case AppletId::LoginShare: return AppletProgramId::LoginShare;
|
||||
case AppletId::WebAuth: return AppletProgramId::WebAuth;
|
||||
case AppletId::MyPage: return AppletProgramId::MyPage;
|
||||
case AppletId::Splay: return AppletProgramId::Splay;
|
||||
default: return AppletProgramId(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
42
src/core/hle/service/ns/notify_service.cpp
Normal file
42
src/core/hle/service/ns/notify_service.cpp
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "common/logging/log.h"
|
||||
#include "common/uuid.h"
|
||||
#include "core/hle/service/cmif_serialization.h"
|
||||
#include "core/hle/service/ns/notify_service.h"
|
||||
#include "core/hle/service/service.h"
|
||||
#include "core/launch_timestamp_cache.h"
|
||||
#include "frontend_common/play_time_manager.h"
|
||||
|
||||
namespace Service::NS {
|
||||
|
||||
INotifyService::INotifyService(Core::System& system_)
|
||||
: ServiceFramework{system_, "pdm:ntfy"}
|
||||
{
|
||||
// clang-format off
|
||||
static const FunctionInfo functions[] = {
|
||||
{0, nullptr, "NotifyAppletEvent"},
|
||||
{2, nullptr, "NotifyOperationModeChangeEvent"},
|
||||
{3, nullptr, "NotifyPowerStateChangeEvent"},
|
||||
{4, nullptr, "NotifyClearAllEvent"},
|
||||
{5, nullptr, "NotifyEventForDebug"},
|
||||
{6, nullptr, "SuspendUserAccountEventService"},
|
||||
{7, nullptr, "ResumeUserAccountEventService"},
|
||||
{8, nullptr, "Unknown8"},
|
||||
{9, nullptr, "Unknown9"},
|
||||
{20, nullptr, "Unknown20"},
|
||||
{100, nullptr, "Unknown100"},
|
||||
{101, nullptr, "Unknown101"},
|
||||
|
||||
};
|
||||
// clang-format on
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
INotifyService::~INotifyService() = default;
|
||||
|
||||
} // namespace Service::NS
|
||||
25
src/core/hle/service/ns/notify_service.h
Normal file
25
src/core/hle/service/ns/notify_service.h
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "common/uuid.h"
|
||||
#include "core/hle/service/am/am_types.h"
|
||||
#include "core/hle/service/cmif_types.h"
|
||||
#include "core/hle/service/ns/ns_types.h"
|
||||
#include "core/hle/service/service.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace Service::NS {
|
||||
|
||||
class INotifyService final : public ServiceFramework<INotifyService> {
|
||||
public:
|
||||
explicit INotifyService(Core::System& system_);
|
||||
~INotifyService() override;
|
||||
};
|
||||
|
||||
} // namespace Service::NS
|
||||
|
|
@ -5,6 +5,7 @@
|
|||
#include "core/hle/service/ns/ns.h"
|
||||
#include "core/hle/service/ns/platform_service_manager.h"
|
||||
#include "core/hle/service/ns/query_service.h"
|
||||
#include "core/hle/service/ns/notify_service.h"
|
||||
#include "core/hle/service/ns/service_getter_interface.h"
|
||||
#include "core/hle/service/ns/system_update_interface.h"
|
||||
#include "core/hle/service/ns/vulnerability_manager_interface.h"
|
||||
|
|
@ -33,6 +34,7 @@ void LoopProcess(Core::System& system) {
|
|||
server_manager->RegisterNamedService("ns:vm",
|
||||
std::make_shared<IVulnerabilityManagerInterface>(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",
|
||||
std::make_shared<IPlatformServiceManager>(system, "pl:s"));
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ std::unique_ptr<TranslationMap> InitializeTranslations(QObject* parent)
|
|||
INSERT(Settings, login_share_applet_mode, tr("Login share"), QString());
|
||||
INSERT(Settings, wifi_web_auth_applet_mode, tr("Wifi web auth"), QString());
|
||||
INSERT(Settings, my_page_applet_mode, tr("My page"), QString());
|
||||
INSERT(Settings, splay_applet_mode, tr("Splay"), QString());
|
||||
INSERT(Settings, enable_overlay, tr("Enable Overlay Applet"), QString());
|
||||
|
||||
// Audio
|
||||
|
|
|
|||
|
|
@ -63,7 +63,8 @@ void ConfigureApplets::Setup(const ConfigurationShared::Builder& builder) {
|
|||
setting->Id() == Settings::values.shop_applet_mode.Id() ||
|
||||
setting->Id() == Settings::values.login_share_applet_mode.Id() ||
|
||||
setting->Id() == Settings::values.wifi_web_auth_applet_mode.Id() ||
|
||||
setting->Id() == Settings::values.my_page_applet_mode.Id()) {
|
||||
setting->Id() == Settings::values.my_page_applet_mode.Id() ||
|
||||
setting->Id() == Settings::values.splay_applet_mode.Id()) {
|
||||
widget->setHidden(true);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -189,6 +189,7 @@
|
|||
<addaction name="action_Launch_MiiEdit"/>
|
||||
<addaction name="action_Launch_Controller"/>
|
||||
<addaction name="action_Launch_PhotoViewer"/>
|
||||
<addaction name="action_Launch_Splay"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuTAS">
|
||||
<property name="title">
|
||||
|
|
@ -465,6 +466,11 @@
|
|||
<string>&Mii Editor</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action_Launch_Splay">
|
||||
<property name="text">
|
||||
<string>&Splay</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action_Configure_Tas">
|
||||
<property name="text">
|
||||
<string>&Configure TAS...</string>
|
||||
|
|
|
|||
|
|
@ -1700,6 +1700,9 @@ void MainWindow::ConnectMenuEvents() {
|
|||
connect_menu(ui->action_Launch_QLaunch, [this]{
|
||||
LaunchFirmwareApplet(u64(Service::AM::AppletProgramId::QLaunch), std::nullopt);
|
||||
});
|
||||
connect_menu(ui->action_Launch_Splay, [this]{
|
||||
LaunchFirmwareApplet(u64(Service::AM::AppletProgramId::Splay), std::nullopt);
|
||||
});
|
||||
// Tools (cabinet)
|
||||
connect_menu(ui->action_Launch_Cabinet_Nickname_Owner, [this]{
|
||||
LaunchFirmwareApplet(u64(Service::AM::AppletProgramId::Cabinet), {Service::NFP::CabinetMode::StartNicknameAndOwnerSettings});
|
||||
|
|
@ -1762,7 +1765,8 @@ void MainWindow::UpdateMenuState() {
|
|||
ui->action_Launch_Cabinet_Formatter,
|
||||
ui->action_Launch_MiiEdit,
|
||||
ui->action_Launch_QLaunch,
|
||||
ui->action_Launch_Controller
|
||||
ui->action_Launch_Controller,
|
||||
ui->action_Launch_Splay
|
||||
};
|
||||
|
||||
for (QAction* action : running_actions) {
|
||||
|
|
@ -4101,6 +4105,7 @@ void MainWindow::LaunchFirmwareApplet(u64 raw_program_id, std::optional<Service:
|
|||
case AppletProgramId::LoginShare: return AppletId::LoginShare;
|
||||
case AppletProgramId::WebAuth: return AppletId::WebAuth;
|
||||
case AppletProgramId::MyPage: return AppletId::MyPage;
|
||||
case AppletProgramId::Splay: return AppletId::Splay;
|
||||
default: return AppletId::None;
|
||||
}
|
||||
}(); applet_id != Service::AM::AppletId::None) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue