ns.h
Go to the documentation of this file.
/**
* @file ns.h
* @brief NS (Nintendo Shell) service.
*/
#pragma once
/// Initializes NS.
Result nsInit(void);
/// Exits NS.
void nsExit(void);
/**
* @brief Launches a title and the required firmware (only if necessary).
* @param titleid ID of the title to launch, 0 for gamecard, JPN System Settings' titleID for System Settings.
*/
Result NS_LaunchFIRM(u64 titleid);
/**
* @brief Launches a title.
* @param titleid ID of the title to launch, or 0 for gamecard.
* @param launch_flags Flags used when launching the title.
* @param procid Pointer to write the process ID of the launched title to.
*/
Result NS_LaunchTitle(u64 titleid, u32 launch_flags, u32 *procid);
/// Terminates the application from which this function is called
Result NS_TerminateTitle(void);
/**
* @brief Launches a title and the required firmware.
* @param titleid ID of the title to launch, 0 for gamecard.
* @param flags Flags for firm-launch. bit0: require an application title-info structure in FIRM paramters to be specified via FIRM parameters. bit1: if clear, NS will check certain Configuration Memory fields.
*/
Result NS_LaunchApplicationFIRM(u64 titleid, u32 flags);
/**
* @brief Reboots to a title.
* @param mediatype Mediatype of the title.
* @param titleid ID of the title to launch.
*/
Result NS_RebootToTitle(u8 mediatype, u64 titleid);
/**
* @brief Terminates the process with the specified titleid.
* @param titleid ID of the title to terminate.
* @param timeout Timeout in nanoseconds. Pass 0 if not required.
*/
Result NS_TerminateProcessTID(u64 titleid, u64 timeout);
/// Reboots the system
Result NS_RebootSystem(void);
NS_LaunchApplicationFIRM
Result NS_LaunchApplicationFIRM(u64 titleid, u32 flags)
Launches a title and the required firmware.
NS_RebootToTitle
Result NS_RebootToTitle(u8 mediatype, u64 titleid)
Reboots to a title.
NS_RebootSystem
Result NS_RebootSystem(void)
Reboots the system.
nsExit
void nsExit(void)
Exits NS.
NS_LaunchTitle
Result NS_LaunchTitle(u64 titleid, u32 launch_flags, u32 *procid)
Launches a title.
NS_TerminateTitle
Result NS_TerminateTitle(void)
Terminates the application from which this function is called.
NS_LaunchFIRM
Result NS_LaunchFIRM(u64 titleid)
Launches a title and the required firmware (only if necessary).
nsInit
Result nsInit(void)
Initializes NS.
NS_TerminateProcessTID
Result NS_TerminateProcessTID(u64 titleid, u64 timeout)
Terminates the process with the specified titleid.
u64
uint64_t u64
64-bit unsigned integer
Definition: types.h:24
u8
uint8_t u8
would be nice if newlib had this already
Definition: types.h:21
Result
s32 Result
Function result.
Definition: types.h:42
u32
uint32_t u32
32-bit unsigned integer
Definition: types.h:23