From 586ebd91319ccccccb6f10133a1ee5d0bd780745 Mon Sep 17 00:00:00 2001 From: TuxSH Date: Mon, 3 Jul 2017 20:35:47 +0200 Subject: [PATCH] Implement svc 0x59 and 0x5A --- libctru/include/3ds/svc.h | 12 ++++++++++++ libctru/source/svc.s | 10 ++++++++++ 2 files changed, 22 insertions(+) diff --git a/libctru/include/3ds/svc.h b/libctru/include/3ds/svc.h index baed48a..d70c0e2 100644 --- a/libctru/include/3ds/svc.h +++ b/libctru/include/3ds/svc.h @@ -1007,6 +1007,18 @@ Result svcGetHandleInfo(s64* out, Handle handle, u32 param); */ Result svcGetSystemInfo(s64* out, u32 type, s32 param); +/** + * @brief Sets the GPU protection register to restrict the range of the GPU DMA. 11.3+ only. + * @param useApplicationRestriction Whether to use the register value used for APPLICATION titles. + */ +Result svcSetGpuProt(bool useApplicationRestriction); + +/** + * @brief Enables or disables Wi-Fi. 11.4+ only. + * @param enabled Whether to enable or disable Wi-Fi. + */ +Result svcSetWifiEnabled(bool enabled); + /** * @brief Sets the current kernel state. * @param type Type of state to set (the other parameters depend on it). diff --git a/libctru/source/svc.s b/libctru/source/svc.s index 7932ddd..4e209af 100644 --- a/libctru/source/svc.s +++ b/libctru/source/svc.s @@ -502,6 +502,16 @@ SVC_BEGIN svcGetDmaState bx lr SVC_END +SVC_BEGIN svcSetGpuProt + svc 0x59 + bx lr +SVC_END + +SVC_BEGIN svcSetWifiEnabled + svc 0x5A + bx lr +SVC_END + SVC_BEGIN svcDebugActiveProcess push {r0} svc 0x60