vitasdk
Documentation of the vitasdk
exfatfs.h
Go to the documentation of this file.
1 
6 #ifndef _PSP2KERN_INTERNAL_EXFATFS_H_
7 #define _PSP2KERN_INTERNAL_EXFATFS_H_
8 
9 #include <psp2kern/types.h>
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
16 /*
17  * Added this header to vita-headers to facilitate updates without being spread out to other separate projects.
18  */
19 
20 /*
21  * A mix of camelCase and snake_case is maintained to facilitate reverse engineering
22  */
23 
24 
25 #define SCE_EXFATFS_MAX_FILE_SYSTEM (0xF)
26 #define SCE_EXFATFS_MAX_FNODE (0x1000)
27 
28 #define SCE_EXFATFS_TYPE_FAT (1)
29 #define SCE_EXFATFS_TYPE_EXFAT (2)
30 
31 
32 typedef struct _SceExfatfsDateTime { // size is 0xC-bytes
41 
42 typedef struct SceExfatfsMbr { // size is 0x200-bytes
43  char data[0x200];
46 
47 typedef struct _SceExfatfsDrive { // size is 0x230-bytes
49  int unk_0x04[0x2F];
50  const char *assignName;
51  int unk_0xC4[0x47];
52 
53  // offset 0x1E0
55  const struct SceVfsMount2 *VfsMount2;
56  void *vp;
57  void *unk_0x228;
58  int unk_0x22C;
61 
62 typedef struct _SceExfatfsFnode { // size is 0x290-bytes
63  SceUInt16 FilePath[0x208 >> 1]; // in utf-16
65  struct _SceExfatfsFileSystem *fileSystem;
66  struct { // size is 0x40-bytes
81  } Stat;
82 
86 
94 
100 
107 
108 typedef struct _SceExfatfsFile { // size is 0x38-bytes
110  int mode;
112  void *Buf;
113  void *BufTop;
116  int unk_0x20;
117  int unk_0x24;
119  int unk_0x30;
120  int unk_0x34;
123 
124 typedef struct _SceExfatfsFileSystem { // size is 0x430-bytes
125  const char *devname;
126  int unk_4;
127  int unk_8;
129 
130  int unk_10;
131  int available_clusters; // Number of clusters available
132  void *PBRBuf;
133  int unk_1C;
134 
135  int unk_20;
136  int unk_24;
137  void *unk_28; // pointer of unk_80
138  int unk_2C;
139 
140  int unk_30;
141  void *unk_34;
142  void *unk_38;
143  int unk_3C;
144 
145  int unk_40;
146  int unk_44;
147  int unk_48;
148  int unk_4C;
149 
150  void *unk_50;
151  void *unk_54;
152  int unk_58;
153  int unk_5C;
154 
155  int unk_60;
156  int unk_64;
157  int unk_68;
158  int unk_6C;
159 
160  int unk_70;
161  int unk_74;
162  int unk_78;
163  int unk_7C;
164 
165  int unk_80;
166  int unk_84;
167  int unk_88;
168  int unk_8C;
169 
170  int unk_90;
171  int unk_94;
172  int unk_98;
173  int unk_9C;
174 
175  int unk_A0;
176  int unk_A4;
177  int unk_A8;
179 
181  int unk_B4; // SCE_EXFATFS_TYPE_*
182  int unk_B8;
184 
188  int unk_CC;
189  char data_0xD0[0x48];
193  void *unk_0x3E4;
195  void *unk_0x3EC;
196  SceKernelFastMutex fastmutex; // maybe not fastmutex...
199 
200 typedef struct _SceExfatfsSharedResource { // size is 0x295D60-bytes
203  void *data_0x5CD0;
206  int data_0x295CD8[0x78 >> 2]; // unknown
207  int data_0x295D50; // All SceExfatfsFnode elements number?
208  int data_0x295D54; // Available SceExfatfs_data_0x5D50 elements number
209  int data_0x295D58; // Related to ReserveUnusedFd
210  int data_0x295D5C; // Related to ReserveUnusedFd
213 
214 
215 #ifdef __cplusplus
216 }
217 #endif
218 
219 #endif /* _PSP2KERN_INTERNAL_EXFATFS_H_ */
int unk_4C
Definition: exfatfs.h:148
void * unk_50
Definition: exfatfs.h:150
int unk_B8
Definition: exfatfs.h:182
SceUInt32 clusterCount
Definition: exfatfs.h:103
int unk_3C
Definition: exfatfs.h:143
int unk_6C
Definition: exfatfs.h:158
int unk_0x20
Definition: exfatfs.h:116
int unk_A0
Definition: exfatfs.h:175
SceUInt32 DirCluster
Definition: exfatfs.h:83
int data_0x264
Definition: exfatfs.h:88
SceExfatfsDateTime mtime
Definition: exfatfs.h:74
SceExfatfsDrive * drive
Definition: exfatfs.h:178
int unk_2C
Definition: exfatfs.h:138
int unk_44
Definition: exfatfs.h:146
int unk_80
Definition: exfatfs.h:165
SceUInt16 year
Definition: exfatfs.h:33
void * Buf
Definition: exfatfs.h:112
int rsvd_sector
Definition: exfatfs.h:128
int unk_0x34
Definition: exfatfs.h:120
void * PBRBuf
Definition: exfatfs.h:132
SceUInt16 second
Definition: exfatfs.h:38
int data_0x254
Definition: exfatfs.h:84
SceOff Size
Definition: exfatfs.h:71
SceUInt64 cacheIndex
Definition: exfatfs.h:118
int unk_5C
Definition: exfatfs.h:153
int unk_94
Definition: exfatfs.h:171
#define SCE_EXFATFS_MAX_FNODE
Definition: exfatfs.h:26
int data_0x24C
Definition: exfatfs.h:80
SceUInt8 data_0x26E
Definition: exfatfs.h:92
SceUInt8 data_0x248
Definition: exfatfs.h:76
void * unk_0x3E4
Definition: exfatfs.h:193
int data_0x295D50
Definition: exfatfs.h:207
#define SCE_EXFATFS_MAX_FILE_SYSTEM
Definition: exfatfs.h:25
int unk_10
Definition: exfatfs.h:130
int mode
Definition: exfatfs.h:110
int unk_CC
Definition: exfatfs.h:188
SceUInt32 chunkCount
Definition: exfatfs.h:104
SceKernelFastMutex fastmutex
Definition: exfatfs.h:54
SceUInt8 data_0x26F
Definition: exfatfs.h:93
void * unk_0x228
Definition: exfatfs.h:57
void * unk_38
Definition: exfatfs.h:142
SceUInt16 month
Definition: exfatfs.h:34
SceUInt8 data_0x26D
Definition: exfatfs.h:91
SceUInt16 day
Definition: exfatfs.h:35
SceUInt32 tailCluster
Definition: exfatfs.h:101
const char * assignName
Definition: exfatfs.h:50
SceUInt32 Cluster
Definition: exfatfs.h:114
SceUInt16 minute
Definition: exfatfs.h:37
int unk_74
Definition: exfatfs.h:161
int unk_78
Definition: exfatfs.h:162
int unk_A8
Definition: exfatfs.h:177
int unk_0x30
Definition: exfatfs.h:119
int unk_20
Definition: exfatfs.h:135
int unk_70
Definition: exfatfs.h:160
int data_0x5CD4
Definition: exfatfs.h:204
SceOff Position
Definition: exfatfs.h:111
SceUInt32 state
Definition: exfatfs.h:48
SceExfatfsFnode * fnode
Definition: exfatfs.h:109
SceUInt32 cache_element_count
Definition: exfatfs.h:98
const char * devname
Definition: exfatfs.h:125
SceUInt32 tailIndex
Definition: exfatfs.h:102
void * cluster_cache_array
Definition: exfatfs.h:99
int unk_58
Definition: exfatfs.h:152
int unk_A4
Definition: exfatfs.h:176
void * BufTop
Definition: exfatfs.h:113
int unk_40
Definition: exfatfs.h:145
int unk_7C
Definition: exfatfs.h:163
int data_0x274
Definition: exfatfs.h:97
SceUInt32 clusterSectorCount
Definition: exfatfs.h:185
int unk_24
Definition: exfatfs.h:136
int data_0x295D58
Definition: exfatfs.h:209
SceKernelFastMutex * rootFastMutex
Definition: exfatfs.h:192
SceUInt16 * FileName
Definition: exfatfs.h:64
int unk_0x22C
Definition: exfatfs.h:58
void * unk_0x3EC
Definition: exfatfs.h:195
int unk_90
Definition: exfatfs.h:170
int unk_30
Definition: exfatfs.h:140
SceUInt16 st_mode
Definition: exfatfs.h:67
SceExfatfsFile file
Definition: exfatfs.h:190
SceUInt32 clusterIndex
Definition: exfatfs.h:115
SceUInt32 devSectors
Definition: exfatfs.h:187
int unk_B4
Definition: exfatfs.h:181
int unk_4
Definition: exfatfs.h:126
SceUInt16 refCount
Definition: exfatfs.h:95
int unk_84
Definition: exfatfs.h:166
struct _SceExfatfsFileSystem * fileSystem
Definition: exfatfs.h:65
SceUInt16 fdCount
Definition: exfatfs.h:96
void * data_0x5CD0
Definition: exfatfs.h:203
int unk_88
Definition: exfatfs.h:167
SceUInt32 DirOffClust
Definition: exfatfs.h:87
int unk_1C
Definition: exfatfs.h:133
SceUInt8 data_0x24A
Definition: exfatfs.h:78
SceKernelFastMutex fastmutex
Definition: exfatfs.h:196
int unk_98
Definition: exfatfs.h:172
int data_0x295D5C
Definition: exfatfs.h:210
SceUInt16 st_type
Definition: exfatfs.h:68
void * vp
Definition: exfatfs.h:56
int unk_68
Definition: exfatfs.h:157
SceUID unk_0x3E8
Definition: exfatfs.h:194
void * unk_28
Definition: exfatfs.h:137
SceUInt8 data_0x24B
Definition: exfatfs.h:79
SceExfatfsFnode fnode
Definition: exfatfs.h:191
void * unk_34
Definition: exfatfs.h:141
SceUInt32 mount_mode
Definition: exfatfs.h:180
SceUInt16 hour
Definition: exfatfs.h:36
int unk_8C
Definition: exfatfs.h:168
int unk_9C
Definition: exfatfs.h:173
int available_clusters
Definition: exfatfs.h:131
int unk_64
Definition: exfatfs.h:156
SceUInt32 StartCluster
Definition: exfatfs.h:75
const struct SceVfsMount2 * VfsMount2
Definition: exfatfs.h:55
int unk_0x24
Definition: exfatfs.h:117
int unk_60
Definition: exfatfs.h:155
SceSize dirSize
Definition: exfatfs.h:89
SceExfatfsDateTime atime
Definition: exfatfs.h:73
SceUInt8 data_0x249
Definition: exfatfs.h:77
SceUInt8 dirGeneralSecondaryFlags
Definition: exfatfs.h:90
SceOff DirOffset
Definition: exfatfs.h:85
SceExfatfsDateTime ctime
Definition: exfatfs.h:72
SceUInt32 firstClusterOfRoot
Definition: exfatfs.h:186
SceUInt16 st_uid
Definition: exfatfs.h:70
VITASDK_BUILD_ASSERT_EQ(0xC, SceExfatfsDateTime)
int unk_8
Definition: exfatfs.h:127
SceUInt16 st_dev
Definition: exfatfs.h:69
void * unk_54
Definition: exfatfs.h:151
int unk_48
Definition: exfatfs.h:147
int data_0x295D54
Definition: exfatfs.h:208
char data[0x200]
Definition: exfatfs.h:43
SceSize sectorSize
Definition: exfatfs.h:183
Definition: exfatfs.h:32
Definition: exfatfs.h:47
Definition: exfatfs.h:108
Definition: exfatfs.h:124
Definition: exfatfs.h:62
Definition: exfatfs.h:42
Definition: exfatfs.h:200
Definition: fast_mutex.h:18
unsigned int SceSize
Definition: types.h:56
uint16_t SceUInt16
Definition: types.h:42
int SceUID
UIDs are used to describe many different kernel objects.
Definition: types.h:90
uint64_t SceUInt64
Definition: types.h:51
uint32_t SceUInt32
Definition: types.h:45
SceInt64 SceOff
Offset type.
Definition: types.h:88
uint8_t SceUInt8
Definition: types.h:36