diff options
| -rw-r--r-- | src/core/hle/kernel/hle_ipc.cpp | 51 | ||||
| -rw-r--r-- | src/core/hle/kernel/hle_ipc.h | 2 | ||||
| -rw-r--r-- | src/core/hle/service/audio/audren_u.cpp | 3 | ||||
| -rw-r--r-- | src/core/hle/service/hid/hid.cpp | 43 |
4 files changed, 98 insertions, 1 deletions
diff --git a/src/core/hle/kernel/hle_ipc.cpp b/src/core/hle/kernel/hle_ipc.cpp index 6d16f71a7..25ba26f18 100644 --- a/src/core/hle/kernel/hle_ipc.cpp +++ b/src/core/hle/kernel/hle_ipc.cpp | |||
| @@ -254,4 +254,55 @@ size_t HLERequestContext::GetWriteBufferSize() const { | |||
| 254 | return is_buffer_b ? BufferDescriptorB()[0].Size() : BufferDescriptorC()[0].Size(); | 254 | return is_buffer_b ? BufferDescriptorB()[0].Size() : BufferDescriptorC()[0].Size(); |
| 255 | } | 255 | } |
| 256 | 256 | ||
| 257 | std::string HLERequestContext::Description() const { | ||
| 258 | if (!command_header) { | ||
| 259 | return "No command header available"; | ||
| 260 | } | ||
| 261 | std::ostringstream s; | ||
| 262 | s << "IPC::CommandHeader: Type:" << static_cast<u32>(command_header->type.Value()); | ||
| 263 | s << ", X(Pointer):" << command_header->num_buf_x_descriptors; | ||
| 264 | if (command_header->num_buf_x_descriptors) { | ||
| 265 | s << '['; | ||
| 266 | for (u64 i = 0; i < command_header->num_buf_x_descriptors; ++i) { | ||
| 267 | s << "0x" << std::hex << BufferDescriptorX()[i].Size(); | ||
| 268 | if (i < command_header->num_buf_x_descriptors - 1) | ||
| 269 | s << ", "; | ||
| 270 | } | ||
| 271 | s << ']'; | ||
| 272 | } | ||
| 273 | s << ", A(Send):" << command_header->num_buf_a_descriptors; | ||
| 274 | if (command_header->num_buf_a_descriptors) { | ||
| 275 | s << '['; | ||
| 276 | for (u64 i = 0; i < command_header->num_buf_a_descriptors; ++i) { | ||
| 277 | s << "0x" << std::hex << BufferDescriptorA()[i].Size(); | ||
| 278 | if (i < command_header->num_buf_a_descriptors - 1) | ||
| 279 | s << ", "; | ||
| 280 | } | ||
| 281 | s << ']'; | ||
| 282 | } | ||
| 283 | s << ", B(Receive):" << command_header->num_buf_b_descriptors; | ||
| 284 | if (command_header->num_buf_b_descriptors) { | ||
| 285 | s << '['; | ||
| 286 | for (u64 i = 0; i < command_header->num_buf_b_descriptors; ++i) { | ||
| 287 | s << "0x" << std::hex << BufferDescriptorB()[i].Size(); | ||
| 288 | if (i < command_header->num_buf_b_descriptors - 1) | ||
| 289 | s << ", "; | ||
| 290 | } | ||
| 291 | s << ']'; | ||
| 292 | } | ||
| 293 | s << ", C(ReceiveList):" << BufferDescriptorC().size(); | ||
| 294 | if (!BufferDescriptorC().empty()) { | ||
| 295 | s << '['; | ||
| 296 | for (u64 i = 0; i < BufferDescriptorC().size(); ++i) { | ||
| 297 | s << "0x" << std::hex << BufferDescriptorC()[i].Size(); | ||
| 298 | if (i < BufferDescriptorC().size() - 1) | ||
| 299 | s << ", "; | ||
| 300 | } | ||
| 301 | s << ']'; | ||
| 302 | } | ||
| 303 | s << ", data_size:" << command_header->data_size.Value(); | ||
| 304 | |||
| 305 | return s.str(); | ||
| 306 | } | ||
| 307 | |||
| 257 | } // namespace Kernel | 308 | } // namespace Kernel |
diff --git a/src/core/hle/kernel/hle_ipc.h b/src/core/hle/kernel/hle_ipc.h index 81e3489c8..b5631b773 100644 --- a/src/core/hle/kernel/hle_ipc.h +++ b/src/core/hle/kernel/hle_ipc.h | |||
| @@ -202,6 +202,8 @@ public: | |||
| 202 | return domain_objects.size(); | 202 | return domain_objects.size(); |
| 203 | } | 203 | } |
| 204 | 204 | ||
| 205 | std::string Description() const; | ||
| 206 | |||
| 205 | private: | 207 | private: |
| 206 | std::array<u32, IPC::COMMAND_BUFFER_LENGTH> cmd_buf; | 208 | std::array<u32, IPC::COMMAND_BUFFER_LENGTH> cmd_buf; |
| 207 | SharedPtr<Kernel::ServerSession> server_session; | 209 | SharedPtr<Kernel::ServerSession> server_session; |
diff --git a/src/core/hle/service/audio/audren_u.cpp b/src/core/hle/service/audio/audren_u.cpp index 20306c6cf..4efc789ac 100644 --- a/src/core/hle/service/audio/audren_u.cpp +++ b/src/core/hle/service/audio/audren_u.cpp | |||
| @@ -53,7 +53,8 @@ private: | |||
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | void RequestUpdateAudioRenderer(Kernel::HLERequestContext& ctx) { | 55 | void RequestUpdateAudioRenderer(Kernel::HLERequestContext& ctx) { |
| 56 | AudioRendererResponseData response_data = {0}; | 56 | LOG_DEBUG(Service_Audio, "%s", ctx.Description().c_str()); |
| 57 | AudioRendererResponseData response_data{}; | ||
| 57 | 58 | ||
| 58 | response_data.section_0_size = | 59 | response_data.section_0_size = |
| 59 | response_data.state_entries.size() * sizeof(AudioRendererStateEntry); | 60 | response_data.state_entries.size() * sizeof(AudioRendererStateEntry); |
diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp index 3f1c18505..dacd1862d 100644 --- a/src/core/hle/service/hid/hid.cpp +++ b/src/core/hle/service/hid/hid.cpp | |||
| @@ -176,7 +176,10 @@ public: | |||
| 176 | {0, &Hid::CreateAppletResource, "CreateAppletResource"}, | 176 | {0, &Hid::CreateAppletResource, "CreateAppletResource"}, |
| 177 | {1, &Hid::ActivateDebugPad, "ActivateDebugPad"}, | 177 | {1, &Hid::ActivateDebugPad, "ActivateDebugPad"}, |
| 178 | {11, &Hid::ActivateTouchScreen, "ActivateTouchScreen"}, | 178 | {11, &Hid::ActivateTouchScreen, "ActivateTouchScreen"}, |
| 179 | {21, &Hid::ActivateMouse, "ActivateMouse"}, | ||
| 180 | {31, &Hid::ActivateKeyboard, "ActivateKeyboard"}, | ||
| 179 | {66, &Hid::StartSixAxisSensor, "StartSixAxisSensor"}, | 181 | {66, &Hid::StartSixAxisSensor, "StartSixAxisSensor"}, |
| 182 | {79, &Hid::SetGyroscopeZeroDriftMode, "SetGyroscopeZeroDriftMode"}, | ||
| 180 | {100, &Hid::SetSupportedNpadStyleSet, "SetSupportedNpadStyleSet"}, | 183 | {100, &Hid::SetSupportedNpadStyleSet, "SetSupportedNpadStyleSet"}, |
| 181 | {102, &Hid::SetSupportedNpadIdType, "SetSupportedNpadIdType"}, | 184 | {102, &Hid::SetSupportedNpadIdType, "SetSupportedNpadIdType"}, |
| 182 | {103, &Hid::ActivateNpad, "ActivateNpad"}, | 185 | {103, &Hid::ActivateNpad, "ActivateNpad"}, |
| @@ -184,9 +187,13 @@ public: | |||
| 184 | "AcquireNpadStyleSetUpdateEventHandle"}, | 187 | "AcquireNpadStyleSetUpdateEventHandle"}, |
| 185 | {120, &Hid::SetNpadJoyHoldType, "SetNpadJoyHoldType"}, | 188 | {120, &Hid::SetNpadJoyHoldType, "SetNpadJoyHoldType"}, |
| 186 | {121, &Hid::GetNpadJoyHoldType, "GetNpadJoyHoldType"}, | 189 | {121, &Hid::GetNpadJoyHoldType, "GetNpadJoyHoldType"}, |
| 190 | {122, &Hid::SetNpadJoyAssignmentModeSingleByDefault, | ||
| 191 | "SetNpadJoyAssignmentModeSingleByDefault"}, | ||
| 187 | {124, nullptr, "SetNpadJoyAssignmentModeDual"}, | 192 | {124, nullptr, "SetNpadJoyAssignmentModeDual"}, |
| 188 | {128, &Hid::SetNpadHandheldActivationMode, "SetNpadHandheldActivationMode"}, | 193 | {128, &Hid::SetNpadHandheldActivationMode, "SetNpadHandheldActivationMode"}, |
| 189 | {200, &Hid::GetVibrationDeviceInfo, "GetVibrationDeviceInfo"}, | 194 | {200, &Hid::GetVibrationDeviceInfo, "GetVibrationDeviceInfo"}, |
| 195 | {201, &Hid::SendVibrationValue, "SendVibrationValue"}, | ||
| 196 | {202, &Hid::GetActualVibrationValue, "GetActualVibrationValue"}, | ||
| 190 | {203, &Hid::CreateActiveVibrationDeviceList, "CreateActiveVibrationDeviceList"}, | 197 | {203, &Hid::CreateActiveVibrationDeviceList, "CreateActiveVibrationDeviceList"}, |
| 191 | {206, &Hid::SendVibrationValues, "SendVibrationValues"}, | 198 | {206, &Hid::SendVibrationValues, "SendVibrationValues"}, |
| 192 | }; | 199 | }; |
| @@ -224,12 +231,30 @@ private: | |||
| 224 | LOG_WARNING(Service_HID, "(STUBBED) called"); | 231 | LOG_WARNING(Service_HID, "(STUBBED) called"); |
| 225 | } | 232 | } |
| 226 | 233 | ||
| 234 | void ActivateMouse(Kernel::HLERequestContext& ctx) { | ||
| 235 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 236 | rb.Push(RESULT_SUCCESS); | ||
| 237 | LOG_WARNING(Service_HID, "(STUBBED) called"); | ||
| 238 | } | ||
| 239 | |||
| 240 | void ActivateKeyboard(Kernel::HLERequestContext& ctx) { | ||
| 241 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 242 | rb.Push(RESULT_SUCCESS); | ||
| 243 | LOG_WARNING(Service_HID, "(STUBBED) called"); | ||
| 244 | } | ||
| 245 | |||
| 227 | void StartSixAxisSensor(Kernel::HLERequestContext& ctx) { | 246 | void StartSixAxisSensor(Kernel::HLERequestContext& ctx) { |
| 228 | IPC::ResponseBuilder rb{ctx, 2}; | 247 | IPC::ResponseBuilder rb{ctx, 2}; |
| 229 | rb.Push(RESULT_SUCCESS); | 248 | rb.Push(RESULT_SUCCESS); |
| 230 | LOG_WARNING(Service_HID, "(STUBBED) called"); | 249 | LOG_WARNING(Service_HID, "(STUBBED) called"); |
| 231 | } | 250 | } |
| 232 | 251 | ||
| 252 | void SetGyroscopeZeroDriftMode(Kernel::HLERequestContext& ctx) { | ||
| 253 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 254 | rb.Push(RESULT_SUCCESS); | ||
| 255 | LOG_WARNING(Service_HID, "(STUBBED) called"); | ||
| 256 | } | ||
| 257 | |||
| 233 | void SetSupportedNpadStyleSet(Kernel::HLERequestContext& ctx) { | 258 | void SetSupportedNpadStyleSet(Kernel::HLERequestContext& ctx) { |
| 234 | IPC::ResponseBuilder rb{ctx, 2}; | 259 | IPC::ResponseBuilder rb{ctx, 2}; |
| 235 | rb.Push(RESULT_SUCCESS); | 260 | rb.Push(RESULT_SUCCESS); |
| @@ -268,6 +293,24 @@ private: | |||
| 268 | LOG_WARNING(Service_HID, "(STUBBED) called"); | 293 | LOG_WARNING(Service_HID, "(STUBBED) called"); |
| 269 | } | 294 | } |
| 270 | 295 | ||
| 296 | void SetNpadJoyAssignmentModeSingleByDefault(Kernel::HLERequestContext& ctx) { | ||
| 297 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 298 | rb.Push(RESULT_SUCCESS); | ||
| 299 | LOG_WARNING(Service_HID, "(STUBBED) called"); | ||
| 300 | } | ||
| 301 | |||
| 302 | void SendVibrationValue(Kernel::HLERequestContext& ctx) { | ||
| 303 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 304 | rb.Push(RESULT_SUCCESS); | ||
| 305 | LOG_WARNING(Service_HID, "(STUBBED) called"); | ||
| 306 | } | ||
| 307 | |||
| 308 | void GetActualVibrationValue(Kernel::HLERequestContext& ctx) { | ||
| 309 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 310 | rb.Push(RESULT_SUCCESS); | ||
| 311 | LOG_WARNING(Service_HID, "(STUBBED) called"); | ||
| 312 | } | ||
| 313 | |||
| 271 | void SetNpadHandheldActivationMode(Kernel::HLERequestContext& ctx) { | 314 | void SetNpadHandheldActivationMode(Kernel::HLERequestContext& ctx) { |
| 272 | IPC::ResponseBuilder rb{ctx, 2}; | 315 | IPC::ResponseBuilder rb{ctx, 2}; |
| 273 | rb.Push(RESULT_SUCCESS); | 316 | rb.Push(RESULT_SUCCESS); |