RetroArch
ctr
exec-3dsx
mini-hb-menu
common.h
Go to the documentation of this file.
1
#pragma once
2
3
// C stdlib includes
4
#include <stdio.h>
5
#include <stdlib.h>
6
#include <
string.h
>
7
#include <limits.h>
8
#include <unistd.h>
9
#include <dirent.h>
10
#include <sys/stat.h>
11
#include <sys/types.h>
12
13
// 3DS includes
14
#include <3ds.h>
15
16
17
#define ENTRY_ARGBUFSIZE 0x400
18
#define NUM_SERVICESTHATMATTER 5
19
20
typedef
enum
21
{
22
StrId_Loading
= 0,
23
StrId_Directory
,
24
StrId_DefaultLongTitle
,
25
StrId_DefaultPublisher
,
26
StrId_IOError
,
27
StrId_CouldNotOpenFile
,
28
29
StrId_NoAppsFound_Title
,
30
StrId_NoAppsFound_Msg
,
31
32
StrId_Reboot
,
33
StrId_ReturnToHome
,
34
35
StrId_TitleSelector
,
36
StrId_ErrorReadingTitleMetadata
,
37
StrId_NoTitlesFound
,
38
StrId_SelectTitle
,
39
40
StrId_NoTargetTitleSupport
,
41
StrId_MissingTargetTitle
,
42
43
StrId_NetLoader
,
44
StrId_NetLoaderUnavailable
,
45
StrId_NetLoaderOffline
,
46
StrId_NetLoaderError
,
47
StrId_NetLoaderActive
,
48
StrId_NetLoaderTransferring
,
49
50
StrId_Max
,
51
}
StrId
;
52
53
54
typedef
struct
55
{
56
char
*
dst
;
57
u32
buf
[
ENTRY_ARGBUFSIZE
/
sizeof
(
u32
)];
58
}
argData_s
;
59
60
typedef
struct
61
{
62
bool
scanned
;
63
u32
sectionSizes[3];
64
bool
servicesThatMatter[
NUM_SERVICESTHATMATTER
];
65
}
executableMetadata_s
;
66
67
typedef
struct
68
{
69
u32
num
;
70
u32
text_end
;
71
u32
data_address
;
72
u32
data_size
;
73
u32
processLinearOffset
;
74
u32
processHookAddress
;
75
u32
processAppCodeAddress
;
76
u32
processHookTidLow
, processHookTidHigh;
77
u32
mediatype
;
78
bool
capabilities[0x10];
// {socuAccess, csndAccess, qtmAccess, nfcAccess, httpcAccess, reserved...}
79
}
memmap_header_t
;
80
81
typedef
struct
82
{
83
u32
src
,
dst
,
size
;
84
}
memmap_entry_t
;
85
86
typedef
struct
87
{
88
memmap_header_t
header
;
89
memmap_entry_t
map[];
90
}
memmap_t
;
91
92
#define memmapSize(m) (sizeof(memmap_header_t) + sizeof(memmap_entry_t)*(m)->header.num)
93
94
95
#include "
launch.h
"
StrId_Loading
Definition:
common.h:22
executableMetadata_s
Definition:
common.h:60
StrId_MissingTargetTitle
Definition:
common.h:41
ENTRY_ARGBUFSIZE
#define ENTRY_ARGBUFSIZE
Definition:
common.h:17
buf
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition:
glext.h:8418
StrId_IOError
Definition:
common.h:26
memmap_entry_t
Definition:
common.h:81
StrId_ReturnToHome
Definition:
common.h:33
executableMetadata_s::scanned
bool scanned
Definition:
common.h:62
argData_s
Definition:
common.h:54
memmap_header_t::data_address
u32 data_address
Definition:
common.h:71
memmap_entry_t::src
u32 src
Definition:
common.h:83
size
GLsizeiptr size
Definition:
glext.h:6559
StrId_TitleSelector
Definition:
common.h:35
StrId_ErrorReadingTitleMetadata
Definition:
common.h:36
memmap_header_t::mediatype
u32 mediatype
Definition:
common.h:77
memmap_header_t::processLinearOffset
u32 processLinearOffset
Definition:
common.h:73
memmap_header_t::text_end
u32 text_end
Definition:
common.h:70
StrId_NoAppsFound_Msg
Definition:
common.h:30
memmap_header_t::num
u32 num
Definition:
common.h:69
memmap_header_t
Definition:
common.h:67
memmap_header_t::processHookAddress
u32 processHookAddress
Definition:
common.h:74
memmap_header_t::processHookTidLow
u32 processHookTidLow
Definition:
common.h:76
StrId_SelectTitle
Definition:
common.h:38
string.h
NUM_SERVICESTHATMATTER
#define NUM_SERVICESTHATMATTER
Definition:
common.h:18
StrId_NetLoaderTransferring
Definition:
common.h:48
StrId_Reboot
Definition:
common.h:32
StrId_Directory
Definition:
common.h:23
StrId_NetLoaderActive
Definition:
common.h:47
StrId_NetLoader
Definition:
common.h:43
StrId_NoTargetTitleSupport
Definition:
common.h:40
argData_s::dst
char * dst
Definition:
common.h:56
StrId_NetLoaderError
Definition:
common.h:46
memmap_t::header
memmap_header_t header
Definition:
common.h:88
StrId_NetLoaderUnavailable
Definition:
common.h:44
StrId_Max
Definition:
common.h:50
memmap_header_t::processAppCodeAddress
u32 processAppCodeAddress
Definition:
common.h:75
memmap_header_t::data_size
u32 data_size
Definition:
common.h:72
StrId_CouldNotOpenFile
Definition:
common.h:27
dst
GLenum GLenum dst
Definition:
glext.h:6980
memmap_t
Definition:
common.h:86
launch.h
StrId_NoTitlesFound
Definition:
common.h:37
StrId_NetLoaderOffline
Definition:
common.h:45
u32
uint32_t u32
32bit unsigned integer
Definition:
gctypes.h:19
StrId_NoAppsFound_Title
Definition:
common.h:29
StrId_DefaultLongTitle
Definition:
common.h:24
StrId_DefaultPublisher
Definition:
common.h:25
StrId
StrId
Definition:
common.h:20
Generated by
1.8.15