From: Tony Wasserka Date: Sat, 20 Sep 2014 12:45:45 +0000 (+0200) Subject: Add the system call outputDebugString. X-Git-Tag: v0.2.0~86^2^2^2 X-Git-Url: https://chaos.moe/g/?a=commitdiff_plain;h=90692fee609901cf7f0b020adcaf075eec5151c7;p=corbenik%2Fctrulib.git Add the system call outputDebugString. This doesn't do anything on retail consoles, but homebrew developers can use it to debug applications in Citra or in other 3DS emulators which HLE this system call. --- diff --git a/libctru/include/3ds/svc.h b/libctru/include/3ds/svc.h index 402194d..0de77b0 100644 --- a/libctru/include/3ds/svc.h +++ b/libctru/include/3ds/svc.h @@ -48,5 +48,6 @@ s32 svcGetProcessInfo(s64* out, Handle process, u32 type); s32 svcConnectToPort(volatile Handle* out, const char* portName); s32 svcSendSyncRequest(Handle session); s32 svcGetProcessId(u32 *out, Handle handle); +s32 svcOutputDebugString(const char* str, int length); #endif diff --git a/libctru/source/svc.s b/libctru/source/svc.s index 1969ddc..98ab6b3 100644 --- a/libctru/source/svc.s +++ b/libctru/source/svc.s @@ -195,3 +195,13 @@ svcGetProcessId: ldr r3, [sp], #4 str r1, [r3] bx lr + +.global svcOutputDebugString +.type svcOutputDebugString, %function +svcOutputDebugString: + str r0, [sp,#-0x4]! + svc 0x3D + ldr r2, [sp], #4 + str r1, [r2] + bx lr +