NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
ODEMU.h
1#ifndef RVL_SDK_NDEV_EXI2_AD_ODEMU_H
2#define RVL_SDK_NDEV_EXI2_AD_ODEMU_H
3#include <types.h>
4#ifdef __cplusplus
5extern "C" {
6#endif
7
8static u32 ODEMUGenMailData(u32 ofs, u32 size) {
9 return (ofs & 0xff) << 0x10 | 0x1f000000 | size & 0x1fff;
10}
11
12static u32 ODEMUGetPage(u32 mail) {
13 return (mail & 0xFF0000) >> 16;
14}
15
16static u32 ODEMUGetPc2NngcOffset(u32 mail) {
17 if (!(ODEMUGetPage(mail) & 0x1)) {
18 return 0;
19 }
20
21 return 0x800;
22}
23
24static BOOL ODEMUIsValidMail(u32 mail) {
25 return (mail & 0x1F000000) == 0x1F000000;
26}
27
28static u32 ODEMUGetSize(u32 mail) {
29 return mail & 0x1FFF;
30}
31
32#ifdef __cplusplus
33}
34#endif
35#endif