diff options
Diffstat (limited to '')
| -rw-r--r-- | src/common/logging/log.h | 5 | ||||
| -rw-r--r-- | src/core/hle/service/ac_u.cpp | 20 | ||||
| -rw-r--r-- | src/core/hle/service/frd/frd.cpp | 12 | ||||
| -rw-r--r-- | src/core/hle/service/frd/frd.h | 9 | ||||
| -rw-r--r-- | src/core/hle/service/frd/frd_u.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/service/fs/fs_user.cpp | 24 | ||||
| -rw-r--r-- | src/core/hle/service/mic_u.cpp | 20 | ||||
| -rw-r--r-- | src/core/hle/service/service.h | 12 |
8 files changed, 88 insertions, 16 deletions
diff --git a/src/common/logging/log.h b/src/common/logging/log.h index 8011534b8..96d0dfb8c 100644 --- a/src/common/logging/log.h +++ b/src/common/logging/log.h | |||
| @@ -60,7 +60,7 @@ enum class Class : ClassType { | |||
| 60 | Service_AM, ///< The AM (Application manager) service | 60 | Service_AM, ///< The AM (Application manager) service |
| 61 | Service_PTM, ///< The PTM (Power status & misc.) service | 61 | Service_PTM, ///< The PTM (Power status & misc.) service |
| 62 | Service_LDR, ///< The LDR (3ds dll loader) service | 62 | Service_LDR, ///< The LDR (3ds dll loader) service |
| 63 | Service_MIC, ///< The MIC (microphone) service | 63 | Service_MIC, ///< The MIC (Microphone) service |
| 64 | Service_NDM, ///< The NDM (Network daemon manager) service | 64 | Service_NDM, ///< The NDM (Network daemon manager) service |
| 65 | Service_NIM, ///< The NIM (Network interface manager) service | 65 | Service_NIM, ///< The NIM (Network interface manager) service |
| 66 | Service_NWM, ///< The NWM (Network wlan manager) service | 66 | Service_NWM, ///< The NWM (Network wlan manager) service |
| @@ -85,8 +85,7 @@ enum class Class : ClassType { | |||
| 85 | Audio_DSP, ///< The HLE implementation of the DSP | 85 | Audio_DSP, ///< The HLE implementation of the DSP |
| 86 | Audio_Sink, ///< Emulator audio output backend | 86 | Audio_Sink, ///< Emulator audio output backend |
| 87 | Loader, ///< ROM loader | 87 | Loader, ///< ROM loader |
| 88 | 88 | Count ///< Total number of logging classes | |
| 89 | Count ///< Total number of logging classes | ||
| 90 | }; | 89 | }; |
| 91 | 90 | ||
| 92 | /// Logs a message to the global logger. | 91 | /// Logs a message to the global logger. |
diff --git a/src/core/hle/service/ac_u.cpp b/src/core/hle/service/ac_u.cpp index 18026975f..fe367aca5 100644 --- a/src/core/hle/service/ac_u.cpp +++ b/src/core/hle/service/ac_u.cpp | |||
| @@ -230,6 +230,24 @@ static void IsConnected(Service::Interface* self) { | |||
| 230 | LOG_WARNING(Service_AC, "(STUBBED) called"); | 230 | LOG_WARNING(Service_AC, "(STUBBED) called"); |
| 231 | } | 231 | } |
| 232 | 232 | ||
| 233 | /** | ||
| 234 | * AC_U::SetClientVersion service function | ||
| 235 | * Inputs: | ||
| 236 | * 1 : Used SDK Version | ||
| 237 | * Outputs: | ||
| 238 | * 1 : Result of function, 0 on success, otherwise error code | ||
| 239 | */ | ||
| 240 | static void SetClientVersion(Service::Interface* self) { | ||
| 241 | u32* cmd_buff = Kernel::GetCommandBuffer(); | ||
| 242 | |||
| 243 | const u32 version = cmd_buff[1]; | ||
| 244 | self->SetVersion(version); | ||
| 245 | |||
| 246 | LOG_WARNING(Service_AC, "(STUBBED) called, version: 0x%08X", version); | ||
| 247 | |||
| 248 | cmd_buff[1] = RESULT_SUCCESS.raw; // No error | ||
| 249 | } | ||
| 250 | |||
| 233 | const Interface::FunctionInfo FunctionTable[] = { | 251 | const Interface::FunctionInfo FunctionTable[] = { |
| 234 | {0x00010000, CreateDefaultConfig, "CreateDefaultConfig"}, | 252 | {0x00010000, CreateDefaultConfig, "CreateDefaultConfig"}, |
| 235 | {0x00040006, ConnectAsync, "ConnectAsync"}, | 253 | {0x00040006, ConnectAsync, "ConnectAsync"}, |
| @@ -250,7 +268,7 @@ const Interface::FunctionInfo FunctionTable[] = { | |||
| 250 | {0x00300004, RegisterDisconnectEvent, "RegisterDisconnectEvent"}, | 268 | {0x00300004, RegisterDisconnectEvent, "RegisterDisconnectEvent"}, |
| 251 | {0x003C0042, nullptr, "GetAPSSIDList"}, | 269 | {0x003C0042, nullptr, "GetAPSSIDList"}, |
| 252 | {0x003E0042, IsConnected, "IsConnected"}, | 270 | {0x003E0042, IsConnected, "IsConnected"}, |
| 253 | {0x00400042, nullptr, "SetClientVersion"}, | 271 | {0x00400042, SetClientVersion, "SetClientVersion"}, |
| 254 | }; | 272 | }; |
| 255 | 273 | ||
| 256 | //////////////////////////////////////////////////////////////////////////////////////////////////// | 274 | //////////////////////////////////////////////////////////////////////////////////////////////////// |
diff --git a/src/core/hle/service/frd/frd.cpp b/src/core/hle/service/frd/frd.cpp index 1d16f8732..34fdf7f53 100644 --- a/src/core/hle/service/frd/frd.cpp +++ b/src/core/hle/service/frd/frd.cpp | |||
| @@ -100,6 +100,18 @@ void GetMyScreenName(Service::Interface* self) { | |||
| 100 | LOG_WARNING(Service_FRD, "(STUBBED) called"); | 100 | LOG_WARNING(Service_FRD, "(STUBBED) called"); |
| 101 | } | 101 | } |
| 102 | 102 | ||
| 103 | void SetClientSdkVersion(Service::Interface* self) { | ||
| 104 | u32* cmd_buff = Kernel::GetCommandBuffer(); | ||
| 105 | |||
| 106 | const u32 version = cmd_buff[1]; | ||
| 107 | |||
| 108 | self->SetVersion(version); | ||
| 109 | |||
| 110 | LOG_WARNING(Service_FRD, "(STUBBED) called, version: 0x%08X", version); | ||
| 111 | |||
| 112 | cmd_buff[1] = RESULT_SUCCESS.raw; // No error | ||
| 113 | } | ||
| 114 | |||
| 103 | void Init() { | 115 | void Init() { |
| 104 | using namespace Kernel; | 116 | using namespace Kernel; |
| 105 | 117 | ||
diff --git a/src/core/hle/service/frd/frd.h b/src/core/hle/service/frd/frd.h index c8283a7f3..e61940ea0 100644 --- a/src/core/hle/service/frd/frd.h +++ b/src/core/hle/service/frd/frd.h | |||
| @@ -95,6 +95,15 @@ void GetMyFriendKey(Service::Interface* self); | |||
| 95 | */ | 95 | */ |
| 96 | void GetMyScreenName(Service::Interface* self); | 96 | void GetMyScreenName(Service::Interface* self); |
| 97 | 97 | ||
| 98 | /** | ||
| 99 | * FRD::SetClientSdkVersion service function | ||
| 100 | * Inputs: | ||
| 101 | * 1 : Used SDK Version | ||
| 102 | * Outputs: | ||
| 103 | * 1 : Result of function, 0 on success, otherwise error code | ||
| 104 | */ | ||
| 105 | void SetClientSdkVersion(Service::Interface* self); | ||
| 106 | |||
| 98 | /// Initialize FRD service(s) | 107 | /// Initialize FRD service(s) |
| 99 | void Init(); | 108 | void Init(); |
| 100 | 109 | ||
diff --git a/src/core/hle/service/frd/frd_u.cpp b/src/core/hle/service/frd/frd_u.cpp index bd1c9c16b..496f29ca9 100644 --- a/src/core/hle/service/frd/frd_u.cpp +++ b/src/core/hle/service/frd/frd_u.cpp | |||
| @@ -58,7 +58,7 @@ const Interface::FunctionInfo FunctionTable[] = { | |||
| 58 | {0x002F0040, nullptr, "AllowHalfAwake"}, | 58 | {0x002F0040, nullptr, "AllowHalfAwake"}, |
| 59 | {0x00300000, nullptr, "GetServerTypes"}, | 59 | {0x00300000, nullptr, "GetServerTypes"}, |
| 60 | {0x00310082, nullptr, "GetFriendComment"}, | 60 | {0x00310082, nullptr, "GetFriendComment"}, |
| 61 | {0x00320042, nullptr, "SetClientSdkVersion"}, | 61 | {0x00320042, SetClientSdkVersion, "SetClientSdkVersion"}, |
| 62 | {0x00330000, nullptr, "GetMyApproachContext"}, | 62 | {0x00330000, nullptr, "GetMyApproachContext"}, |
| 63 | {0x00340046, nullptr, "AddFriendWithApproach"}, | 63 | {0x00340046, nullptr, "AddFriendWithApproach"}, |
| 64 | {0x00350082, nullptr, "DecryptApproachContext"}, | 64 | {0x00350082, nullptr, "DecryptApproachContext"}, |
diff --git a/src/core/hle/service/fs/fs_user.cpp b/src/core/hle/service/fs/fs_user.cpp index 00edc7622..9ec17b395 100644 --- a/src/core/hle/service/fs/fs_user.cpp +++ b/src/core/hle/service/fs/fs_user.cpp | |||
| @@ -763,23 +763,27 @@ static void CreateLegacySystemSaveData(Service::Interface* self) { | |||
| 763 | * FS_User::InitializeWithSdkVersion service function. | 763 | * FS_User::InitializeWithSdkVersion service function. |
| 764 | * Inputs: | 764 | * Inputs: |
| 765 | * 0 : 0x08610042 | 765 | * 0 : 0x08610042 |
| 766 | * 1 : Unknown | 766 | * 1 : Used SDK Version |
| 767 | * 2 : Unknown | 767 | * 2 : ProcessId Header |
| 768 | * 3 : Unknown | 768 | * 3 : placeholder for ProcessId |
| 769 | * Outputs: | 769 | * Outputs: |
| 770 | * 1 : Result of function, 0 on success, otherwise error code | 770 | * 1 : Result of function, 0 on success, otherwise error code |
| 771 | */ | 771 | */ |
| 772 | static void InitializeWithSdkVersion(Service::Interface* self) { | 772 | static void InitializeWithSdkVersion(Service::Interface* self) { |
| 773 | u32* cmd_buff = Kernel::GetCommandBuffer(); | 773 | u32* cmd_buff = Kernel::GetCommandBuffer(); |
| 774 | 774 | ||
| 775 | u32 unk1 = cmd_buff[1]; | 775 | const u32 version = cmd_buff[1]; |
| 776 | u32 unk2 = cmd_buff[2]; | 776 | self->SetVersion(version); |
| 777 | u32 unk3 = cmd_buff[3]; | ||
| 778 | 777 | ||
| 779 | cmd_buff[1] = RESULT_SUCCESS.raw; | 778 | if (cmd_buff[2] == IPC::CallingPidDesc()) { |
| 780 | 779 | LOG_WARNING(Service_FS, "(STUBBED) called, version: 0x%08X", version); | |
| 781 | LOG_WARNING(Service_FS, "(STUBBED) called unk1=0x%08X, unk2=0x%08X, unk3=0x%08X", unk1, unk2, | 780 | cmd_buff[1] = RESULT_SUCCESS.raw; |
| 782 | unk3); | 781 | } else { |
| 782 | LOG_ERROR(Service_FS, "ProcessId Header must be 0x20"); | ||
| 783 | cmd_buff[1] = ResultCode(ErrorDescription::OS_InvalidBufferDescriptor, ErrorModule::OS, | ||
| 784 | ErrorSummary::WrongArgument, ErrorLevel::Permanent) | ||
| 785 | .raw; | ||
| 786 | } | ||
| 783 | } | 787 | } |
| 784 | 788 | ||
| 785 | /** | 789 | /** |
diff --git a/src/core/hle/service/mic_u.cpp b/src/core/hle/service/mic_u.cpp index 563341504..1f851d328 100644 --- a/src/core/hle/service/mic_u.cpp +++ b/src/core/hle/service/mic_u.cpp | |||
| @@ -287,6 +287,24 @@ static void SetAllowShellClosed(Service::Interface* self) { | |||
| 287 | LOG_WARNING(Service_MIC, "(STUBBED) called, allow_shell_closed=%u", allow_shell_closed); | 287 | LOG_WARNING(Service_MIC, "(STUBBED) called, allow_shell_closed=%u", allow_shell_closed); |
| 288 | } | 288 | } |
| 289 | 289 | ||
| 290 | /** | ||
| 291 | * MIC_U::SetClientVersion service function | ||
| 292 | * Inputs: | ||
| 293 | * 1 : Used SDK Version | ||
| 294 | * Outputs: | ||
| 295 | * 1 : Result of function, 0 on success, otherwise error code | ||
| 296 | */ | ||
| 297 | static void SetClientVersion(Service::Interface* self) { | ||
| 298 | u32* cmd_buff = Kernel::GetCommandBuffer(); | ||
| 299 | |||
| 300 | const u32 version = cmd_buff[1]; | ||
| 301 | self->SetVersion(version); | ||
| 302 | |||
| 303 | LOG_WARNING(Service_MIC, "(STUBBED) called, version: 0x%08X", version); | ||
| 304 | |||
| 305 | cmd_buff[1] = RESULT_SUCCESS.raw; // No error | ||
| 306 | } | ||
| 307 | |||
| 290 | const Interface::FunctionInfo FunctionTable[] = { | 308 | const Interface::FunctionInfo FunctionTable[] = { |
| 291 | {0x00010042, MapSharedMem, "MapSharedMem"}, | 309 | {0x00010042, MapSharedMem, "MapSharedMem"}, |
| 292 | {0x00020000, UnmapSharedMem, "UnmapSharedMem"}, | 310 | {0x00020000, UnmapSharedMem, "UnmapSharedMem"}, |
| @@ -303,7 +321,7 @@ const Interface::FunctionInfo FunctionTable[] = { | |||
| 303 | {0x000D0040, SetClamp, "SetClamp"}, | 321 | {0x000D0040, SetClamp, "SetClamp"}, |
| 304 | {0x000E0000, GetClamp, "GetClamp"}, | 322 | {0x000E0000, GetClamp, "GetClamp"}, |
| 305 | {0x000F0040, SetAllowShellClosed, "SetAllowShellClosed"}, | 323 | {0x000F0040, SetAllowShellClosed, "SetAllowShellClosed"}, |
| 306 | {0x00100040, nullptr, "SetClientSDKVersion"}, | 324 | {0x00100040, SetClientVersion, "SetClientVersion"}, |
| 307 | }; | 325 | }; |
| 308 | 326 | ||
| 309 | //////////////////////////////////////////////////////////////////////////////////////////////////// | 327 | //////////////////////////////////////////////////////////////////////////////////////////////////// |
diff --git a/src/core/hle/service/service.h b/src/core/hle/service/service.h index 39b5ffaae..29daacfc4 100644 --- a/src/core/hle/service/service.h +++ b/src/core/hle/service/service.h | |||
| @@ -29,6 +29,10 @@ public: | |||
| 29 | return GetPortName(); | 29 | return GetPortName(); |
| 30 | } | 30 | } |
| 31 | 31 | ||
| 32 | virtual void SetVersion(u32 raw_version) { | ||
| 33 | version.raw = raw_version; | ||
| 34 | } | ||
| 35 | |||
| 32 | typedef void (*Function)(Interface*); | 36 | typedef void (*Function)(Interface*); |
| 33 | 37 | ||
| 34 | struct FunctionInfo { | 38 | struct FunctionInfo { |
| @@ -58,6 +62,14 @@ protected: | |||
| 58 | 62 | ||
| 59 | void Register(const FunctionInfo* functions, size_t n); | 63 | void Register(const FunctionInfo* functions, size_t n); |
| 60 | 64 | ||
| 65 | union { | ||
| 66 | u32 raw; | ||
| 67 | BitField<0, 8, u32> major; | ||
| 68 | BitField<8, 8, u32> minor; | ||
| 69 | BitField<16, 8, u32> build; | ||
| 70 | BitField<24, 8, u32> revision; | ||
| 71 | } version = {}; | ||
| 72 | |||
| 61 | private: | 73 | private: |
| 62 | boost::container::flat_map<u32, FunctionInfo> m_functions; | 74 | boost::container::flat_map<u32, FunctionInfo> m_functions; |
| 63 | }; | 75 | }; |