diff options
| author | 2016-02-14 19:53:32 +0800 | |
|---|---|---|
| committer | 2016-03-15 00:42:47 +0800 | |
| commit | dd0b8047eb8985ff398fd6e5e4fa11d1ea111e23 (patch) | |
| tree | 091058af51d0edc57650bd72b2dca54b0703fde2 /src/core/hle/service/ndm | |
| parent | Merge pull request #1509 from lioncash/noncopy (diff) | |
| download | yuzu-dd0b8047eb8985ff398fd6e5e4fa11d1ea111e23.tar.gz yuzu-dd0b8047eb8985ff398fd6e5e4fa11d1ea111e23.tar.xz yuzu-dd0b8047eb8985ff398fd6e5e4fa11d1ea111e23.zip | |
Reorganize the ndm service path for dummy implement function
SuspendDaemons , ResumeDaemons , OverrideDefaultDaemons
The NDM file move to /core/hle/service/ndm/ now!
Diffstat (limited to 'src/core/hle/service/ndm')
| -rw-r--r-- | src/core/hle/service/ndm/ndm.cpp | 47 | ||||
| -rw-r--r-- | src/core/hle/service/ndm/ndm.h | 52 | ||||
| -rw-r--r-- | src/core/hle/service/ndm/ndm_u.cpp | 42 | ||||
| -rw-r--r-- | src/core/hle/service/ndm/ndm_u.h | 22 |
4 files changed, 163 insertions, 0 deletions
diff --git a/src/core/hle/service/ndm/ndm.cpp b/src/core/hle/service/ndm/ndm.cpp new file mode 100644 index 000000000..47076a7b8 --- /dev/null +++ b/src/core/hle/service/ndm/ndm.cpp | |||
| @@ -0,0 +1,47 @@ | |||
| 1 | // Copyright 2016 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include "common/common_types.h" | ||
| 6 | #include "common/logging/log.h" | ||
| 7 | #include "core/hle/service/service.h" | ||
| 8 | #include "core/hle/service/ndm/ndm.h" | ||
| 9 | #include "core/hle/service/ndm/ndm_u.h" | ||
| 10 | |||
| 11 | namespace Service { | ||
| 12 | namespace NDM { | ||
| 13 | |||
| 14 | void SuspendDaemons(Service::Interface* self) { | ||
| 15 | u32* cmd_buff = Kernel::GetCommandBuffer(); | ||
| 16 | |||
| 17 | LOG_WARNING(Service_NDM, "(STUBBED) bit_mask=0x%08X ", cmd_buff[1]); | ||
| 18 | |||
| 19 | cmd_buff[1] = RESULT_SUCCESS.raw; // No error | ||
| 20 | } | ||
| 21 | |||
| 22 | void ResumeDaemons(Service::Interface* self) { | ||
| 23 | u32* cmd_buff = Kernel::GetCommandBuffer(); | ||
| 24 | |||
| 25 | LOG_WARNING(Service_NDM, "(STUBBED) bit_mask=0x%08X ", cmd_buff[1]); | ||
| 26 | |||
| 27 | cmd_buff[1] = RESULT_SUCCESS.raw; // No error | ||
| 28 | } | ||
| 29 | |||
| 30 | void OverrideDefaultDaemons(Service::Interface* self) { | ||
| 31 | u32* cmd_buff = Kernel::GetCommandBuffer(); | ||
| 32 | |||
| 33 | LOG_WARNING(Service_NDM, "(STUBBED) bit_mask=0x%08X ", cmd_buff[1]); | ||
| 34 | |||
| 35 | cmd_buff[1] = RESULT_SUCCESS.raw; // No error | ||
| 36 | } | ||
| 37 | |||
| 38 | void Init() { | ||
| 39 | AddService(new NDM_U_Interface); | ||
| 40 | } | ||
| 41 | |||
| 42 | void Shutdown() { | ||
| 43 | |||
| 44 | } | ||
| 45 | |||
| 46 | }// namespace NDM | ||
| 47 | }// namespace Service | ||
diff --git a/src/core/hle/service/ndm/ndm.h b/src/core/hle/service/ndm/ndm.h new file mode 100644 index 000000000..734730f8c --- /dev/null +++ b/src/core/hle/service/ndm/ndm.h | |||
| @@ -0,0 +1,52 @@ | |||
| 1 | // Copyright 2016 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | #include "common/common_types.h" | ||
| 8 | |||
| 9 | namespace Service { | ||
| 10 | |||
| 11 | class Interface; | ||
| 12 | |||
| 13 | namespace NDM { | ||
| 14 | |||
| 15 | /** | ||
| 16 | * SuspendDaemons | ||
| 17 | * Inputs: | ||
| 18 | * 0 : Command header (0x00020082) | ||
| 19 | * 1 : Daemon bit mask | ||
| 20 | * Outputs: | ||
| 21 | * 1 : Result, 0 on success, otherwise error code | ||
| 22 | */ | ||
| 23 | void SuspendDaemons(Service::Interface* self); | ||
| 24 | |||
| 25 | /** | ||
| 26 | * ResumeDaemons | ||
| 27 | * Inputs: | ||
| 28 | * 0 : Command header (0x00020082) | ||
| 29 | * 1 : Daemon bit mask | ||
| 30 | * Outputs: | ||
| 31 | * 1 : Result, 0 on success, otherwise error code | ||
| 32 | */ | ||
| 33 | void ResumeDaemons(Service::Interface* self); | ||
| 34 | |||
| 35 | /** | ||
| 36 | * OverrideDefaultDaemons | ||
| 37 | * Inputs: | ||
| 38 | * 0 : Command header (0x00020082) | ||
| 39 | * 1 : Daemon bit mask | ||
| 40 | * Outputs: | ||
| 41 | * 1 : Result, 0 on success, otherwise error code | ||
| 42 | */ | ||
| 43 | void OverrideDefaultDaemons(Service::Interface* self); | ||
| 44 | |||
| 45 | /// Initialize NDM service | ||
| 46 | void Init(); | ||
| 47 | |||
| 48 | /// Shutdown NDM service | ||
| 49 | void Shutdown(); | ||
| 50 | |||
| 51 | }// namespace NDM | ||
| 52 | }// namespace Service | ||
diff --git a/src/core/hle/service/ndm/ndm_u.cpp b/src/core/hle/service/ndm/ndm_u.cpp new file mode 100644 index 000000000..bf95cc7aa --- /dev/null +++ b/src/core/hle/service/ndm/ndm_u.cpp | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | // Copyright 2014 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include "core/hle/service/ndm/ndm.h" | ||
| 6 | #include "core/hle/service/ndm/ndm_u.h" | ||
| 7 | |||
| 8 | namespace Service { | ||
| 9 | namespace NDM { | ||
| 10 | |||
| 11 | const Interface::FunctionInfo FunctionTable[] = { | ||
| 12 | {0x00010042, nullptr, "EnterExclusiveState"}, | ||
| 13 | {0x00020002, nullptr, "LeaveExclusiveState"}, | ||
| 14 | {0x00030000, nullptr, "QueryExclusiveMode"}, | ||
| 15 | {0x00040002, nullptr, "LockState"}, | ||
| 16 | {0x00050002, nullptr, "UnlockState"}, | ||
| 17 | {0x00060040, SuspendDaemons, "SuspendDaemons"}, | ||
| 18 | {0x00070040, ResumeDaemons, "ResumeDaemons"}, | ||
| 19 | {0x00080040, nullptr, "DisableWifiUsage"}, | ||
| 20 | {0x00090000, nullptr, "EnableWifiUsage"}, | ||
| 21 | {0x000A0000, nullptr, "GetCurrentState"}, | ||
| 22 | {0x000B0000, nullptr, "GetTargetState"}, | ||
| 23 | {0x000C0000, nullptr, "<Stubbed>"}, | ||
| 24 | {0x000D0040, nullptr, "QueryStatus"}, | ||
| 25 | {0x000E0040, nullptr, "GetDaemonDisableCount"}, | ||
| 26 | {0x000F0000, nullptr, "GetSchedulerDisableCount"}, | ||
| 27 | {0x00100040, nullptr, "SetScanInterval"}, | ||
| 28 | {0x00110000, nullptr, "GetScanInterval"}, | ||
| 29 | {0x00120040, nullptr, "SetRetryInterval"}, | ||
| 30 | {0x00130000, nullptr, "GetRetryInterval"}, | ||
| 31 | {0x00140040, OverrideDefaultDaemons, "OverrideDefaultDaemons"}, | ||
| 32 | {0x00150000, nullptr, "ResetDefaultDaemons"}, | ||
| 33 | {0x00160000, nullptr, "GetDefaultDaemons"}, | ||
| 34 | {0x00170000, nullptr, "ClearHalfAwakeMacFilter"}, | ||
| 35 | }; | ||
| 36 | |||
| 37 | NDM_U_Interface::NDM_U_Interface() { | ||
| 38 | Register(FunctionTable); | ||
| 39 | } | ||
| 40 | |||
| 41 | } // namespace NDM | ||
| 42 | } // namespace Service | ||
diff --git a/src/core/hle/service/ndm/ndm_u.h b/src/core/hle/service/ndm/ndm_u.h new file mode 100644 index 000000000..d567abc84 --- /dev/null +++ b/src/core/hle/service/ndm/ndm_u.h | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | // Copyright 2014 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | #include "core/hle/service/service.h" | ||
| 8 | |||
| 9 | namespace Service { | ||
| 10 | namespace NDM { | ||
| 11 | |||
| 12 | class NDM_U_Interface : public Service::Interface { | ||
| 13 | public: | ||
| 14 | NDM_U_Interface(); | ||
| 15 | |||
| 16 | std::string GetPortName() const override { | ||
| 17 | return "ndm:u"; | ||
| 18 | } | ||
| 19 | }; | ||
| 20 | |||
| 21 | } // namespace NDM | ||
| 22 | } // namespace Service | ||