
- Each service must have xyzInit/xyzExit (with that name) - xyzInit/xyzExit use reference counting - xyzExit returns void - The utilities in <3ds/result.h> are used instead of manual error checking - The intrinsics in <3ds/synchronization.h> are used instead of inline asm - Other miscellaneous changes - APT now uses a lightweight lock instead of a mutex - Initial handle parameters in PTMU were killed - Explicit init'ion to 0 or NULL has been removed for global variables since they end up on .bss anyway - MIC hasn't been touched because it must be rewritten first - CFGNOR needs a slight touch before converting - SOC is still to be cleaned up
50 lines
1.4 KiB
C
50 lines
1.4 KiB
C
/**
|
|
* @file pm.h
|
|
* @brief PM (Process Manager) service.
|
|
*/
|
|
#pragma once
|
|
|
|
/// Initializes PM.
|
|
Result pmInit(void);
|
|
|
|
/// Exits PM.
|
|
void pmExit(void);
|
|
|
|
/**
|
|
* @brief Launches a title.
|
|
* @param mediatype Mediatype of the title.
|
|
* @param titleid ID of the title.
|
|
* @param launch_flags Flags to launch the title with.
|
|
*/
|
|
Result PM_LaunchTitle(u8 mediatype, u64 titleid, u32 launch_flags);
|
|
|
|
/**
|
|
* @brief Gets launch flags from a title's exheader.
|
|
* @param mediatype Mediatype of the title.
|
|
* @param titleid ID of the title.
|
|
* @param out Pointer to write the launch flags to.
|
|
*/
|
|
Result PM_GetTitleExheaderFlags(u8 mediatype, u64 titleid, u8* out);
|
|
|
|
/**
|
|
* @brief Sets the current FIRM launch parameters.
|
|
* @param size Size of the FIRM launch parameter buffer.
|
|
* @param in Buffer to retrieve the launch parameters from.
|
|
*/
|
|
Result PM_SetFIRMLaunchParams(u32 size, u8* in);
|
|
|
|
/**
|
|
* @brief Gets the current FIRM launch parameters.
|
|
* @param size Size of the FIRM launch parameter buffer.
|
|
* @param out Buffer to write the launch parameters to.
|
|
*/
|
|
Result PM_GetFIRMLaunchParams(u32 size, u8* out);
|
|
|
|
/**
|
|
* @brief Sets the current FIRM launch parameters.
|
|
* @param firm_titleid_low Low Title ID of the FIRM title to launch.
|
|
* @param size Size of the FIRM launch parameter buffer.
|
|
* @param in Buffer to retrieve the launch parameters from.
|
|
*/
|
|
Result PM_LaunchFIRMSetParams(u32 firm_titleid_low, u32 size, u8* in);
|