NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
OS.h
1#ifndef RVL_SDK_OS_H
2#define RVL_SDK_OS_H
3#include <revolution/OS/OSContext.h>
4#include <revolution/OS/OSExec.h>
5#include <types.h>
6#ifdef __cplusplus
7extern "C" {
8#endif
9
10typedef enum {
11 OS_CONSOLE_MASK = 0xF0000000,
12 OS_CONSOLE_MASK_RVL = 0x00000000,
13 OS_CONSOLE_MASK_EMU = 0x10000000,
14 OS_CONSOLE_MASK_TDEV = 0x20000000,
15
16 OS_CONSOLE_RVL_PP_1 = 0x00000011,
17 OS_CONSOLE_RVL_PP_2_1 = 0x00000012,
18 OS_CONSOLE_RVL_PP_2_2 = 0x00000020,
19
20 OS_CONSOLE_RVL_EMU = 0x10000008,
21 OS_CONSOLE_NDEV_1_0 = 0x10000010,
22 OS_CONSOLE_NDEV_1_1 = 0x10000011,
23 OS_CONSOLE_NDEV_1_2 = 0x10000012,
24 OS_CONSOLE_NDEV_2_0 = 0x10000020,
25 OS_CONSOLE_NDEV_2_1 = 0x10000021,
26} OSConsoleType;
27
28typedef enum {
29 OS_APP_TYPE_IPL = 0x40,
30 OS_APP_TYPE_DVD = 0x80,
31 OS_APP_TYPE_CHANNEL = 0x81,
32} OSAppType;
33
34typedef enum {
35 OS_EXC_SYSTEM_RESET,
36 OS_EXC_MACHINE_CHECK,
37 OS_EXC_DSI,
38 OS_EXC_ISI,
39 OS_EXC_EXT_INTERRUPT,
40 OS_EXC_ALIGNMENT,
41 OS_EXC_PROGRAM,
42 OS_EXC_FP_UNAVAIL,
43 OS_EXC_DECREMENTER,
44 OS_EXC_SYSTEM_CALL,
45 OS_EXC_TRACE,
46 OS_EXC_PERF_MONITOR,
47 OS_EXC_IABR,
48 OS_EXC_SMI,
49 OS_EXC_THERMAL_INT,
50
51 OS_EXC_MAX
52} OSExceptionType;
53
54typedef struct OSIOSRev {
55 u8 idHi; // at 0x0
56 u8 idLo; // at 0x1
57 u8 verMajor; // at 0x2
58 u8 verMinor; // at 0x3
59 u8 buildMon; // at 0x4
60 u8 buildDay; // at 0x5
61 u16 buildYear; // at 0x6
62} OSIOSRev;
63
64typedef void (*OSExceptionHandler)(u8 type, OSContext* ctx);
65
66extern BOOL __OSInIPL;
67extern BOOL __OSInNandBoot;
68extern BOOL __OSIsGcam;
69extern s64 __OSStartTime;
70extern OSExecParams __OSRebootParams;
71
72void __OSFPRInit(void);
73u32 __OSGetHollywoodRev(void);
74void __OSGetIOSRev(OSIOSRev* rev);
75u32 OSGetConsoleType(void);
76void OSInit(void);
77OSExceptionHandler __OSSetExceptionHandler(u8 type, OSExceptionHandler handler);
78OSExceptionHandler __OSGetExceptionHandler(u8 type);
79void OSDefaultExceptionHandler(u8 type, OSContext* ctx);
80void __OSPSInit(void);
81u32 __OSGetDIConfig(void);
82void OSRegisterVersion(const char* ver);
83const char* OSGetAppGamename(void);
84u8 OSGetAppType(void);
85
86#ifdef __cplusplus
87}
88#endif
89#endif
Definition OS.h:54