moar stubs
This commit is contained in:
@ -11,7 +11,7 @@ namespace HLE::ApiVersion {
|
||||
|
||||
// Horizon OS version constants.
|
||||
|
||||
constexpr u8 HOS_VERSION_MAJOR = 16;
|
||||
constexpr u8 HOS_VERSION_MAJOR = 12;
|
||||
constexpr u8 HOS_VERSION_MINOR = 1;
|
||||
constexpr u8 HOS_VERSION_MICRO = 0;
|
||||
|
||||
@ -22,8 +22,8 @@ constexpr u8 SDK_REVISION_MINOR = 0;
|
||||
|
||||
constexpr char PLATFORM_STRING[] = "NX";
|
||||
constexpr char VERSION_HASH[] = "76b10c2dab7d3aa73fc162f8dff1655e6a21caf4";
|
||||
constexpr char DISPLAY_VERSION[] = "16.1.0";
|
||||
constexpr char DISPLAY_TITLE[] = "NintendoSDK Firmware for NX 16.1.0-1.0";
|
||||
constexpr char DISPLAY_VERSION[] = "12.1.0";
|
||||
constexpr char DISPLAY_TITLE[] = "NintendoSDK Firmware for NX 12.1.0-1.0";
|
||||
|
||||
// Atmosphere version constants.
|
||||
|
||||
|
@ -93,7 +93,7 @@ public:
|
||||
{31, nullptr, "EnableMcMode"},
|
||||
{32, nullptr, "EnableLlrScan"},
|
||||
{33, nullptr, "DisableLlrScan"},
|
||||
{34, nullptr, "EnableRadio"},
|
||||
{34, &BtDrv::EnableRadio, "EnableRadio"},
|
||||
{35, nullptr, "SetVisibility"},
|
||||
{36, nullptr, "EnableTbfcScan"},
|
||||
{37, nullptr, "RegisterHidReportEvent"},
|
||||
@ -195,6 +195,12 @@ public:
|
||||
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
private:
|
||||
void EnableRadio(HLERequestContext& ctx) {
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(ResultSuccess);
|
||||
}
|
||||
};
|
||||
|
||||
void LoopProcess(Core::System& system) {
|
||||
|
@ -154,8 +154,8 @@ public:
|
||||
{11, nullptr, "RemoveDeviceInfo"},
|
||||
{12, nullptr, "IncreaseDeviceInfoOrder"},
|
||||
{13, nullptr, "LlrNotify"},
|
||||
{14, nullptr, "EnableRadio"},
|
||||
{15, nullptr, "DisableRadio"},
|
||||
{14, &BTM::EnableRadio, "EnableRadio"},
|
||||
{15, &BTM::DisableRadio, "DisableRadio"},
|
||||
{16, nullptr, "HidDisconnect"},
|
||||
{17, nullptr, "HidSetRetransmissionMode"},
|
||||
{18, nullptr, "AcquireAwakeReqEvent"},
|
||||
@ -230,6 +230,17 @@ public:
|
||||
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
private:
|
||||
void EnableRadio(HLERequestContext& ctx) {
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(ResultSuccess);
|
||||
}
|
||||
|
||||
void DisableRadio(HLERequestContext& ctx) {
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(ResultSuccess);
|
||||
}
|
||||
};
|
||||
|
||||
class BTM_DBG final : public ServiceFramework<BTM_DBG> {
|
||||
@ -268,8 +279,8 @@ public:
|
||||
{1, &IBtmSystemCore::CancelGamepadPairing, "CancelGamepadPairing"},
|
||||
{2, nullptr, "ClearGamepadPairingDatabase"},
|
||||
{3, nullptr, "GetPairedGamepadCount"},
|
||||
{4, nullptr, "EnableRadio"},
|
||||
{5, nullptr, "DisableRadio"},
|
||||
{4, &IBtmSystemCore::EnableRadio, "EnableRadio"},
|
||||
{5, &IBtmSystemCore::DisableRadio, "DisableRadio"},
|
||||
{6, &IBtmSystemCore::IsRadioEnabled, "IsRadioEnabled"},
|
||||
{7, &IBtmSystemCore::AcquireRadioEvent, "AcquireRadioEvent"},
|
||||
{8, nullptr, "AcquireGamepadPairingEvent"},
|
||||
@ -278,7 +289,7 @@ public:
|
||||
{11, nullptr, "StopAudioDeviceDiscovery"},
|
||||
{12, nullptr, "IsDiscoveryingAudioDevice"},
|
||||
{13, nullptr, "GetDiscoveredAudioDevice"},
|
||||
{14, nullptr, "AcquireAudioDeviceConnectionEvent"},
|
||||
{14, &IBtmSystemCore::AcquireAudioDeviceConnectionEvent, "AcquireAudioDeviceConnectionEvent"},
|
||||
{15, nullptr, "ConnectAudioDevice"},
|
||||
{16, nullptr, "IsConnectingAudioDevice"},
|
||||
{17, &IBtmSystemCore::GetConnectedAudioDevices, "GetConnectedAudioDevices"},
|
||||
@ -293,9 +304,20 @@ public:
|
||||
|
||||
RegisterHandlers(functions);
|
||||
radio_event = service_context.CreateEvent("IBtmSystemCore::RadioEvent");
|
||||
audio_device_connection_event = service_context.CreateEvent("IBtmSystemCore::AudioDeviceConnectionEvent");
|
||||
}
|
||||
|
||||
private:
|
||||
void EnableRadio(HLERequestContext& ctx) {
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(ResultSuccess);
|
||||
}
|
||||
|
||||
void DisableRadio(HLERequestContext& ctx) {
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(ResultSuccess);
|
||||
}
|
||||
|
||||
void IsRadioEnabled(HLERequestContext& ctx) {
|
||||
LOG_DEBUG(Service_BTM, "(STUBBED) called"); // Spams a lot when controller applet is running
|
||||
|
||||
@ -351,7 +373,17 @@ private:
|
||||
rb.PushCopyObjects(radio_event->GetReadableEvent());
|
||||
}
|
||||
|
||||
void AcquireAudioDeviceConnectionEvent(HLERequestContext& ctx) {
|
||||
LOG_ERROR(Service_BTM, "called");
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 3, 1};
|
||||
rb.Push(ResultSuccess);
|
||||
rb.Push(true);
|
||||
rb.PushCopyObjects(audio_device_connection_event->GetReadableEvent());
|
||||
}
|
||||
|
||||
Kernel::KEvent* radio_event;
|
||||
Kernel::KEvent* audio_device_connection_event;
|
||||
KernelHelpers::ServiceContext service_context;
|
||||
};
|
||||
|
||||
|
@ -57,7 +57,7 @@ public:
|
||||
{1, &NfcInterface::Finalize, "FinalizeOld"},
|
||||
{2, &NfcInterface::GetState, "GetStateOld"},
|
||||
{3, &NfcInterface::IsNfcEnabled, "IsNfcEnabledOld"},
|
||||
{100, nullptr, "SetNfcEnabledOld"},
|
||||
{100, &NfcInterface::SetNfcEnabled, "SetNfcEnabledOld"},
|
||||
{400, &NfcInterface::Initialize, "Initialize"},
|
||||
{401, &NfcInterface::Finalize, "Finalize"},
|
||||
{402, &NfcInterface::GetState, "GetState"},
|
||||
@ -71,7 +71,7 @@ public:
|
||||
{410, &NfcInterface::GetTagInfo, "GetTagInfo"},
|
||||
{411, &NfcInterface::AttachActivateEvent, "AttachActivateEvent"},
|
||||
{412, &NfcInterface::AttachDeactivateEvent, "AttachDeactivateEvent"},
|
||||
{500, nullptr, "SetNfcEnabled"},
|
||||
{500, &NfcInterface::SetNfcEnabled, "SetNfcEnabled"},
|
||||
{510, nullptr, "OutputTestWave"},
|
||||
{1000, &NfcInterface::ReadMifare, "ReadMifare"},
|
||||
{1001, &NfcInterface::WriteMifare, "WriteMifare"},
|
||||
|
@ -65,12 +65,9 @@ void NfcInterface::GetState(HLERequestContext& ctx) {
|
||||
void NfcInterface::IsNfcEnabled(HLERequestContext& ctx) {
|
||||
LOG_DEBUG(Service_NFC, "called");
|
||||
|
||||
// TODO: This calls nn::settings::detail::GetNfcEnableFlag
|
||||
const bool is_enabled = true;
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 3};
|
||||
rb.Push(ResultSuccess);
|
||||
rb.Push(is_enabled);
|
||||
rb.Push(true);
|
||||
}
|
||||
|
||||
void NfcInterface::ListDevices(HLERequestContext& ctx) {
|
||||
@ -212,6 +209,15 @@ void NfcInterface::AttachDeactivateEvent(HLERequestContext& ctx) {
|
||||
rb.PushCopyObjects(out_event);
|
||||
}
|
||||
|
||||
void NfcInterface::SetNfcEnabled(HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp{ctx};
|
||||
const auto is_enabled{rp.Pop<bool>()};
|
||||
LOG_DEBUG(Service_NFC, "called, is_enabled={}", is_enabled);
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(ResultSuccess);
|
||||
}
|
||||
|
||||
void NfcInterface::ReadMifare(HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp{ctx};
|
||||
const auto device_handle{rp.Pop<u64>()};
|
||||
|
@ -28,6 +28,7 @@ public:
|
||||
void GetTagInfo(HLERequestContext& ctx);
|
||||
void AttachActivateEvent(HLERequestContext& ctx);
|
||||
void AttachDeactivateEvent(HLERequestContext& ctx);
|
||||
void SetNfcEnabled(HLERequestContext& ctx);
|
||||
void ReadMifare(HLERequestContext& ctx);
|
||||
void WriteMifare(HLERequestContext& ctx);
|
||||
void SendCommandByPassThrough(HLERequestContext& ctx);
|
||||
|
@ -506,12 +506,23 @@ void IGeneralService::GetCurrentIpConfigInfo(HLERequestContext& ctx) {
|
||||
rb.PushRaw<IpConfigInfo>(ip_config_info);
|
||||
}
|
||||
|
||||
void IGeneralService::SetWirelessCommunicationEnabled(HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp{ctx};
|
||||
const auto is_enabled{rp.Pop<bool>()};
|
||||
LOG_DEBUG(Service_NIFM, "called, is_enabled={}", is_enabled);
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(ResultSuccess);
|
||||
}
|
||||
|
||||
void IGeneralService::IsWirelessCommunicationEnabled(HLERequestContext& ctx) {
|
||||
LOG_DEBUG(Service_NIFM, "(STUBBED) called");
|
||||
const auto is_enabled = false;
|
||||
|
||||
LOG_DEBUG(Service_NIFM, "called, is_enabled={}", is_enabled);
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 3};
|
||||
rb.Push(ResultSuccess);
|
||||
rb.Push<u8>(1);
|
||||
rb.Push<u8>(is_enabled);
|
||||
}
|
||||
|
||||
void IGeneralService::GetInternetConnectionStatus(HLERequestContext& ctx) {
|
||||
@ -583,7 +594,7 @@ IGeneralService::IGeneralService(Core::System& system_)
|
||||
{13, nullptr, "GetCurrentAccessPointOld"},
|
||||
{14, &IGeneralService::CreateTemporaryNetworkProfile, "CreateTemporaryNetworkProfile"},
|
||||
{15, &IGeneralService::GetCurrentIpConfigInfo, "GetCurrentIpConfigInfo"},
|
||||
{16, nullptr, "SetWirelessCommunicationEnabled"},
|
||||
{16, &IGeneralService::SetWirelessCommunicationEnabled, "SetWirelessCommunicationEnabled"},
|
||||
{17, &IGeneralService::IsWirelessCommunicationEnabled, "IsWirelessCommunicationEnabled"},
|
||||
{18, &IGeneralService::GetInternetConnectionStatus, "GetInternetConnectionStatus"},
|
||||
{19, nullptr, "SetEthernetCommunicationEnabled"},
|
||||
|
@ -31,6 +31,7 @@ private:
|
||||
void GetCurrentIpAddress(HLERequestContext& ctx);
|
||||
void CreateTemporaryNetworkProfile(HLERequestContext& ctx);
|
||||
void GetCurrentIpConfigInfo(HLERequestContext& ctx);
|
||||
void SetWirelessCommunicationEnabled(HLERequestContext& ctx);
|
||||
void IsWirelessCommunicationEnabled(HLERequestContext& ctx);
|
||||
void GetInternetConnectionStatus(HLERequestContext& ctx);
|
||||
void IsEthernetCommunicationEnabled(HLERequestContext& ctx);
|
||||
|
@ -206,6 +206,7 @@ public:
|
||||
{1122, nullptr, "RepairIssue2"},
|
||||
{1123, nullptr, "RepairIssue3"},
|
||||
{1124, nullptr, "Unknown1124"},
|
||||
{10000, &IOlscServiceForSystemService::Unknown10000, "Unknown10000"},
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
@ -220,6 +221,14 @@ private:
|
||||
rb.Push(ResultSuccess);
|
||||
rb.PushIpcInterface<ITransferTaskListController>(system);
|
||||
}
|
||||
|
||||
void Unknown10000(HLERequestContext& ctx) {
|
||||
LOG_INFO(Service_OLSC, "called");
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||
rb.Push(ResultSuccess);
|
||||
rb.PushIpcInterface<IOlscServiceForSystemService>(system);
|
||||
}
|
||||
};
|
||||
|
||||
void LoopProcess(Core::System& system) {
|
||||
|
@ -528,6 +528,16 @@ void ISystemSettingsServer::SetLockScreenFlag(HLERequestContext& ctx) {
|
||||
rb.Push(ResultSuccess);
|
||||
}
|
||||
|
||||
void ISystemSettingsServer::SetLockScreenFlag(HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp{ctx};
|
||||
const auto lock_screen_flag{rp.Pop<bool>()};
|
||||
|
||||
LOG_INFO(Service_SET, "called, lock_screen_flag={}", lock_screen_flag);
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(ResultSuccess);
|
||||
}
|
||||
|
||||
void ISystemSettingsServer::GetAccountSettings(HLERequestContext& ctx) {
|
||||
LOG_INFO(Service_SET, "called");
|
||||
|
||||
@ -1035,6 +1045,25 @@ void ISystemSettingsServer::SetNfcEnableFlag(HLERequestContext& ctx) {
|
||||
rb.Push(ResultSuccess);
|
||||
}
|
||||
|
||||
void ISystemSettingsServer::GetNfcEnableFlag(HLERequestContext& ctx) {
|
||||
const auto nfc_enable_flag = true;
|
||||
|
||||
LOG_INFO(Service_SET, "called, nfc_enable_flag={}", nfc_enable_flag);
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 3};
|
||||
rb.Push(ResultSuccess);
|
||||
rb.Push<u8>(nfc_enable_flag);
|
||||
}
|
||||
|
||||
void ISystemSettingsServer::SetNfcEnableFlag(HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp{ctx};
|
||||
const auto nfc_enable_flag{rp.Pop<bool>()};
|
||||
|
||||
LOG_INFO(Service_SET, "called, nfc_enable_flag={}", nfc_enable_flag);
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(ResultSuccess);
|
||||
}
|
||||
void ISystemSettingsServer::GetSleepSettings(HLERequestContext& ctx) {
|
||||
LOG_INFO(Service_SET, "called, flags={}, handheld_sleep_plan={}, console_sleep_plan={}",
|
||||
m_system_settings.sleep_settings.flags.raw,
|
||||
@ -1081,6 +1110,27 @@ void ISystemSettingsServer::SetWirelessLanEnableFlag(HLERequestContext& ctx) {
|
||||
rb.Push(ResultSuccess);
|
||||
}
|
||||
|
||||
void ISystemSettingsServer::GetWirelessLanEnableFlag(HLERequestContext& ctx) {
|
||||
const auto wireless_lan_enable_flag = false;
|
||||
|
||||
LOG_WARNING(Service_SET, "(STUBBED) called, wireless_lan_enable_flag={}",
|
||||
wireless_lan_enable_flag);
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 3};
|
||||
rb.Push(ResultSuccess);
|
||||
rb.Push<u8>(wireless_lan_enable_flag);
|
||||
}
|
||||
|
||||
void ISystemSettingsServer::SetWirelessLanEnableFlag(HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp{ctx};
|
||||
const auto wireless_lan_enable_flag{rp.Pop<bool>()};
|
||||
|
||||
LOG_DEBUG(Service_SET, "(STUBBED) called, wireless_lan_enable_flag={}",
|
||||
wireless_lan_enable_flag);
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(ResultSuccess);
|
||||
}
|
||||
void ISystemSettingsServer::GetInitialLaunchSettings(HLERequestContext& ctx) {
|
||||
LOG_INFO(Service_SET, "called, flags={}, timestamp={}",
|
||||
m_system_settings.initial_launch_settings_packed.flags.raw,
|
||||
|
@ -88,6 +88,7 @@ private:
|
||||
void GetUserSystemClockContext(HLERequestContext& ctx);
|
||||
void SetUserSystemClockContext(HLERequestContext& ctx);
|
||||
void GetLockScreenFlag(HLERequestContext& ctx);
|
||||
void SetLockScreenFlag(HLERequestContext& ctx);
|
||||
void GetAccountSettings(HLERequestContext& ctx);
|
||||
void SetAccountSettings(HLERequestContext& ctx);
|
||||
void GetEulaVersions(HLERequestContext& ctx);
|
||||
|
@ -4221,7 +4221,7 @@ void GMainWindow::OnCabinet(Service::NFP::CabinetMode mode) {
|
||||
}
|
||||
|
||||
void GMainWindow::OnQlaunch() {
|
||||
constexpr u64 MiiEditId = 0x0100000000001000ull;
|
||||
constexpr u64 QlaunchId = static_cast<u64>(Service::AM::Applets::AppletProgramId::QLaunch);
|
||||
auto bis_system = system->GetFileSystemController().GetSystemNANDContents();
|
||||
if (!bis_system) {
|
||||
QMessageBox::warning(this, tr("No firmware available"),
|
||||
@ -4229,7 +4229,7 @@ void GMainWindow::OnQlaunch() {
|
||||
return;
|
||||
}
|
||||
|
||||
auto mii_applet_nca = bis_system->GetEntry(MiiEditId, FileSys::ContentRecordType::Program);
|
||||
auto mii_applet_nca = bis_system->GetEntry(QlaunchId, FileSys::ContentRecordType::Program);
|
||||
if (!mii_applet_nca) {
|
||||
QMessageBox::warning(this, tr("Mii Edit Applet"),
|
||||
tr("Mii editor is not available. Please reinstall firmware."));
|
||||
@ -4239,8 +4239,8 @@ void GMainWindow::OnQlaunch() {
|
||||
system->GetAppletManager().SetCurrentAppletId(Service::AM::Applets::AppletId::QLaunch);
|
||||
|
||||
const auto filename = QString::fromStdString((mii_applet_nca->GetFullPath()));
|
||||
UISettings::values.roms_path = QFileInfo(filename).path();
|
||||
BootGame(filename);
|
||||
UISettings::values.roms_path = QFileInfo(filename).path().toStdString();
|
||||
BootGame(filename, QlaunchId);
|
||||
}
|
||||
|
||||
void GMainWindow::OnMiiEdit() {
|
||||
|
Reference in New Issue
Block a user