mirror of
https://github.com/Amethyst-szs/SuperMarioOdysseyOnline
synced 2025-10-06 00:13:16 +02:00
Add svcOutputDebugString
This commit is contained in:
@@ -32,7 +32,7 @@ include $(DEVKITPRO)/libnx/switch_rules
|
||||
#---------------------------------------------------------------------------------
|
||||
TARGET ?= $(notdir $(CURDIR))$(SMOVER)
|
||||
BUILD ?= build$(SMOVER)
|
||||
SOURCES := source/sead/time source/sead source/puppets source/server source/layouts source/states source/cameras source
|
||||
SOURCES := source/sead/time source/sead source/puppets source/server source/layouts source/states source/cameras source/nx source
|
||||
DATA := data
|
||||
INCLUDES := include include/sead
|
||||
|
||||
|
20
include/nx/svc.h
Normal file
20
include/nx/svc.h
Normal file
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* @file svc.h
|
||||
* @brief Wrappers for kernel syscalls.
|
||||
* @copyright libnx Authors
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
extern "C" {
|
||||
|
||||
/**
|
||||
* @brief Outputs debug text, if used during debugging.
|
||||
* @param[in] str Text to output.
|
||||
* @param[in] size Size of the text in bytes.
|
||||
* @return Result code.
|
||||
* @note Syscall number 0x27.
|
||||
*/
|
||||
Result svcOutputDebugString(const char *str, u64 size);
|
||||
|
||||
|
||||
}
|
17
source/nx/svc.s
Normal file
17
source/nx/svc.s
Normal file
@@ -0,0 +1,17 @@
|
||||
.macro SVC_BEGIN name
|
||||
.section .text.\name, "ax", %progbits
|
||||
.global \name
|
||||
.type \name, %function
|
||||
.align 2
|
||||
.cfi_startproc
|
||||
\name:
|
||||
.endm
|
||||
|
||||
.macro SVC_END
|
||||
.cfi_endproc
|
||||
.endm
|
||||
|
||||
SVC_BEGIN svcOutputDebugString
|
||||
svc 0x27
|
||||
ret
|
||||
SVC_END
|
Reference in New Issue
Block a user