From efe9283de57cd28a2b35652047869513c5660fc7 Mon Sep 17 00:00:00 2001 From: Takoroka <137927095+Takoroka@users.noreply.github.com> Date: Sat, 31 Oct 2026 03:01:22 -0400 Subject: hid: handle Switch 2 commands 213 and 220 213 (32 bytes and the aruid, no reply data) is sent per controller every frame by Kirby Air Riders; through the auto stub it logged two lines per call. 220 (16 bytes and the aruid) replies with one byte, which the auto stub left to the message buffer's leftovers. Accept 213 quietly and answer 220 with zero. --- src/core/hle/service/hid/hid_server.cpp | 13 +++++++++++++ src/core/hle/service/hid/hid_server.h | 6 ++++++ 2 files changed, 19 insertions(+) (limited to 'src/core') diff --git a/src/core/hle/service/hid/hid_server.cpp b/src/core/hle/service/hid/hid_server.cpp index 04b4663bc2..619df16a2b 100644 --- a/src/core/hle/service/hid/hid_server.cpp +++ b/src/core/hle/service/hid/hid_server.cpp @@ -132,7 +132,9 @@ IHidServer::IHidServer(Core::System& system_, std::shared_ptr r {210, C<&IHidServer::EndPermitVibrationSession>, "EndPermitVibrationSession"}, {211, C<&IHidServer::IsVibrationDeviceMounted>, "IsVibrationDeviceMounted"}, {212, C<&IHidServer::SendVibrationValueInBool>, "SendVibrationValueInBool"}, + {213, C<&IHidServer::Unknown213>, "Unknown213"}, {214, C<&IHidServer::SendNx2VibrationValues>, "SendNx2VibrationValues (guessed)"}, + {220, C<&IHidServer::Unknown220>, "Unknown220"}, {300, C<&IHidServer::ActivateConsoleSixAxisSensor>, "ActivateConsoleSixAxisSensor"}, {301, C<&IHidServer::StartConsoleSixAxisSensor>, "StartConsoleSixAxisSensor"}, {302, C<&IHidServer::StopConsoleSixAxisSensor>, "StopConsoleSixAxisSensor"}, @@ -1075,6 +1077,17 @@ Result IHidServer::SendNx2VibrationValues() { R_SUCCEED(); } +Result IHidServer::Unknown213() { + LOG_DEBUG(Service_HID, "(STUBBED) called"); + R_SUCCEED(); +} + +Result IHidServer::Unknown220(Out out) { + LOG_DEBUG(Service_HID, "(STUBBED) called"); + *out = 0; + R_SUCCEED(); +} + Result IHidServer::SendVibrationValueInBool( bool is_vibrating, Core::HID::VibrationDeviceHandle vibration_device_handle, ClientAppletResourceUserId aruid) { diff --git a/src/core/hle/service/hid/hid_server.h b/src/core/hle/service/hid/hid_server.h index 574d54c415..0767bb91b7 100644 --- a/src/core/hle/service/hid/hid_server.h +++ b/src/core/hle/service/hid/hid_server.h @@ -192,6 +192,12 @@ private: // Switch 2 sends vibration every frame with 214 (pointer buffers of device handles and // values, like 206); Eden doesn't emulate vibration, so accept and drop it. Result SendNx2VibrationValues(); + // 213 (32 bytes, aruid): sent per controller every frame by Kirby Air Riders (tens of + // thousands of auto stub log lines a run); no reply data. Accepted and dropped like 214. + Result Unknown213(); + // 220 (16 bytes, aruid): replies one byte (meaning unknown); answer 0 instead of leaving it to + // the message buffer's leftovers. + Result Unknown220(Out out); Result ActivateConsoleSixAxisSensor(ClientAppletResourceUserId aruid); Result StartConsoleSixAxisSensor(Core::HID::ConsoleSixAxisSensorHandle console_sixaxis_handle, ClientAppletResourceUserId aruid); -- cgit v1.2.3