ps2sdk
1.1
A collection of Open Source libraries used for developing applications on Sony's PlayStation 2® (PS2).
libmc-common.h
Go to the documentation of this file.
1
/*
2
# _____ ___ ____ ___ ____
3
# ____| | ____| | | |____|
4
# | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5
#-----------------------------------------------------------------------
6
# Copyright 2001-2004, ps2dev - http://www.ps2dev.org
7
# Licenced under Academic Free License version 2.0
8
# Review ps2sdk README & LICENSE files for further details.
9
*/
10
16
#ifndef __LIBMC_COMMON_H__
17
#define __LIBMC_COMMON_H__
18
19
#include <
tamtypes.h
>
20
21
typedef
struct
_sceMcStDateTime {
22
u8
Resv2
;
23
u8
Sec
;
24
u8
Min
;
25
u8
Hour
;
26
u8
Day
;
27
u8
Month
;
28
u16
Year
;
29
}
sceMcStDateTime
;
30
31
/* MCMAN public structures */
32
typedef
struct
{
// size = 128
33
int
mode
;
// 0
34
int
length
;
// 4
35
s16
linked_block
;
// 8
36
char
name[20];
// 10
37
u8
field_1e
;
// 30
38
u8
field_1f
;
// 31
39
sceMcStDateTime
created
;
// 32
40
int
field_28
;
// 40
41
u16
field_2c
;
// 44
42
u16
field_2e
;
// 46
43
sceMcStDateTime
modified
;
// 48
44
int
field_38
;
// 56
45
u8
unused2[65];
// 60
46
u8
field_7d
;
// 125
47
u8
field_7e
;
// 126
48
u8
edc
;
// 127
49
}
McFsEntryPS1
;
50
51
typedef
struct
{
// size = 512
52
u16
mode
;
// 0
53
u16
unused
;
// 2
54
u32
length
;
// 4
55
sceMcStDateTime
created
;
// 8
56
u32
cluster
;
// 16
57
u32
dir_entry
;
// 20
58
sceMcStDateTime
modified
;
// 24
59
u32
attr
;
// 32
60
u32
unused2[7];
// 36
61
char
name[32];
// 64
62
u8
unused3[416];
// 96
63
}
McFsEntry
;
64
65
typedef
struct
_MCCacheEntry {
66
int
cluster
;
// 0
67
u8
*
cl_data
;
// 4
68
u16
mc_slot
;
// 8
69
u8
wr_flag
;
// 10
70
u8
mc_port
;
// 11
71
u8
rd_flag
;
// 12
72
u8
unused[3];
// 13
73
}
McCacheEntry
;
74
78
typedef
struct
{
// size = 48
79
int
fd
;
// 0
80
int
port
;
// 4
81
int
slot
;
// 8
82
int
size
;
// 12
83
int
offset
;
// 16
84
int
origin
;
// 20
85
void
*
buffer
;
// 24
86
void
*
param
;
// 28
87
u8
data
[16];
// 32
88
}
mcDescParam_t
;
89
93
typedef
struct
{
// size = 64
94
union
{
95
s32
size1
;
// 0
96
s32
type
;
97
};
98
union
{
99
s32
size2
;
// 4
100
s32
free
;
101
};
102
void
*
dest1
;
// 8
103
void
*
dest2
;
// 12
104
u8
src1[16];
// 16
105
u8
src2[16];
// 32
106
u8
unused[16];
// 48
107
}
mcEndParam_t
;
108
112
typedef
struct
{
// size = 192
113
union
{
114
s32
size1
;
// 0
115
s32
type
;
116
};
117
union
{
118
s32
size2
;
// 4
119
s32
free
;
120
};
121
void
*
dest1
;
// 8
122
void
*
dest2
;
// 12
123
u8
src1[64];
// 16
124
u8
src2[64];
// 80
125
union
{
126
s32
formatted
;
// 144
127
u8
unused[48];
128
};
129
}
mcEndParam2_t
;
130
131
typedef
struct
{
132
s32
result
;
133
u32
mcserv_version
;
134
u32
mcman_version
;
135
}
mcRpcStat_t
;
136
137
// in addition to errno
138
#define EFORMAT 140
139
140
// MCMAN basic error codes
141
#define sceMcResSucceed 0
142
#define sceMcResChangedCard -1
143
#define sceMcResNoFormat -2
144
#define sceMcResFullDevice -3
145
#define sceMcResNoEntry -4
146
#define sceMcResDeniedPermit -5
147
#define sceMcResNotEmpty -6
148
#define sceMcResUpLimitHandle -7
149
#define sceMcResFailReplace -8
150
#define sceMcResFailResetAuth -11
151
#define sceMcResFailDetect -12
152
#define sceMcResFailDetect2 -13
153
#define sceMcResDeniedPS1Permit -51
154
#define sceMcResFailAuth -90
155
156
// Memory Card device types
157
#define sceMcTypeNoCard 0
158
#define sceMcTypePS1 1
159
#define sceMcTypePS2 2
160
#define sceMcTypePDA 3
161
162
/* High-Level File I/O */
163
// Used with the statmask field of chstat() to indicate which field(s) to change.
164
#define SCE_CST_MODE 0x01
165
#define SCE_CST_ATTR 0x02
166
#define SCE_CST_SIZE 0x04
167
#define SCE_CST_CT 0x08
168
#define SCE_CST_AT 0x10
169
#define SCE_CST_MT 0x20
170
#define SCE_CST_PRVT 0x40
171
172
// Used with the mode field of chstat() to indicate what to change.
173
#define SCE_STM_R 0x01
174
#define SCE_STM_W 0x02
175
#define SCE_STM_X 0x04
176
#define SCE_STM_C 0x08
177
#define SCE_STM_F 0x10
178
#define SCE_STM_D 0x20
179
180
/* file attributes */
181
#define sceMcFileAttrReadable SCE_STM_R
//Readable
182
#define sceMcFileAttrWriteable SCE_STM_W
//Writable
183
#define sceMcFileAttrExecutable SCE_STM_X
//Executable
184
#define sceMcFileAttrDupProhibit SCE_STM_C
//Copy Protected
185
#define sceMcFileAttrFile SCE_STM_F
//Is a file.
186
#define sceMcFileAttrSubdir SCE_STM_D
//Is a sub-directory
187
#define sceMcFileCreateDir 0x0040
//Used internally to create directories.
188
#define sceMcFileAttrClosed 0x0080
//Indicates whether a file _may_ not have been written properly. Earlier browsers do not copy this flag.
189
#define sceMcFileCreateFile 0x0200
//Equivalent in value and functionality to O_CREAT.
190
#define sceMcFile0400 0x0400
//Set during creation.
191
#define sceMcFileAttrPDAExec 0x0800
//PDA Application (1st Generation PDA Download)
192
#define sceMcFileAttrPS1 0x1000
//PlayStation-format data
193
#define sceMcFileAttrHidden 0x2000
//Indicates whether the file is a hidden file (but not to the browser).
194
#define sceMcFileAttrExists 0x8000
//Indicates whether the file exists.
195
196
/* Valid information bit fields for sceMcSetFileInfo */
197
#define sceMcFileInfoCreate 0x01
//Creation Date/Time
198
#define sceMcFileInfoModify 0x02
//Modification Date/Time
199
#define sceMcFileInfoAttr 0x04
//File Attributes
200
201
#endif
/* __LIBMC_COMMON_H__ */
data
u32 data
Definition:
libmouse.c:36
McCacheEntry
Definition:
libmc-common.h:65
McCacheEntry::mc_port
u8 mc_port
Definition:
libmc-common.h:70
McCacheEntry::rd_flag
u8 rd_flag
Definition:
libmc-common.h:71
McCacheEntry::cluster
int cluster
Definition:
libmc-common.h:66
McCacheEntry::cl_data
u8 * cl_data
Definition:
libmc-common.h:67
McCacheEntry::mc_slot
u16 mc_slot
Definition:
libmc-common.h:68
McCacheEntry::wr_flag
u8 wr_flag
Definition:
libmc-common.h:69
McFsEntryPS1
Definition:
libmc-common.h:32
McFsEntryPS1::field_7e
u8 field_7e
Definition:
libmc-common.h:47
McFsEntryPS1::field_2c
u16 field_2c
Definition:
libmc-common.h:41
McFsEntryPS1::edc
u8 edc
Definition:
libmc-common.h:48
McFsEntryPS1::field_28
int field_28
Definition:
libmc-common.h:40
McFsEntryPS1::created
sceMcStDateTime created
Definition:
libmc-common.h:39
McFsEntryPS1::field_1f
u8 field_1f
Definition:
libmc-common.h:38
McFsEntryPS1::field_1e
u8 field_1e
Definition:
libmc-common.h:37
McFsEntryPS1::modified
sceMcStDateTime modified
Definition:
libmc-common.h:43
McFsEntryPS1::field_2e
u16 field_2e
Definition:
libmc-common.h:42
McFsEntryPS1::field_7d
u8 field_7d
Definition:
libmc-common.h:46
McFsEntryPS1::field_38
int field_38
Definition:
libmc-common.h:44
McFsEntryPS1::linked_block
s16 linked_block
Definition:
libmc-common.h:35
McFsEntryPS1::mode
int mode
Definition:
libmc-common.h:33
McFsEntryPS1::length
int length
Definition:
libmc-common.h:34
McFsEntry
Definition:
libmc-common.h:51
McFsEntry::modified
sceMcStDateTime modified
Definition:
libmc-common.h:58
McFsEntry::length
u32 length
Definition:
libmc-common.h:54
McFsEntry::created
sceMcStDateTime created
Definition:
libmc-common.h:55
McFsEntry::dir_entry
u32 dir_entry
Definition:
libmc-common.h:57
McFsEntry::mode
u16 mode
Definition:
libmc-common.h:52
McFsEntry::attr
u32 attr
Definition:
libmc-common.h:59
McFsEntry::cluster
u32 cluster
Definition:
libmc-common.h:56
McFsEntry::unused
u16 unused
Definition:
libmc-common.h:53
mcDescParam_t
Definition:
libmc-common.h:78
mcDescParam_t::buffer
void * buffer
Definition:
libmc-common.h:85
mcDescParam_t::slot
int slot
Definition:
libmc-common.h:81
mcDescParam_t::port
int port
Definition:
libmc-common.h:80
mcDescParam_t::offset
int offset
Definition:
libmc-common.h:83
mcDescParam_t::fd
int fd
Definition:
libmc-common.h:79
mcDescParam_t::param
void * param
Definition:
libmc-common.h:86
mcDescParam_t::origin
int origin
Definition:
libmc-common.h:84
mcDescParam_t::size
int size
Definition:
libmc-common.h:82
mcEndParam2_t
Definition:
libmc-common.h:112
mcEndParam2_t::size1
s32 size1
Definition:
libmc-common.h:114
mcEndParam2_t::formatted
s32 formatted
Definition:
libmc-common.h:126
mcEndParam2_t::dest2
void * dest2
Definition:
libmc-common.h:122
mcEndParam2_t::type
s32 type
Definition:
libmc-common.h:115
mcEndParam2_t::free
s32 free
Definition:
libmc-common.h:119
mcEndParam2_t::size2
s32 size2
Definition:
libmc-common.h:118
mcEndParam2_t::dest1
void * dest1
Definition:
libmc-common.h:121
mcEndParam_t
Definition:
libmc-common.h:93
mcEndParam_t::dest1
void * dest1
Definition:
libmc-common.h:102
mcEndParam_t::dest2
void * dest2
Definition:
libmc-common.h:103
mcEndParam_t::size1
s32 size1
Definition:
libmc-common.h:95
mcEndParam_t::type
s32 type
Definition:
libmc-common.h:96
mcEndParam_t::size2
s32 size2
Definition:
libmc-common.h:99
mcEndParam_t::free
s32 free
Definition:
libmc-common.h:100
mcRpcStat_t
Definition:
libmc-common.h:131
mcRpcStat_t::mcman_version
u32 mcman_version
Definition:
libmc-common.h:134
mcRpcStat_t::mcserv_version
u32 mcserv_version
Definition:
libmc-common.h:133
mcRpcStat_t::result
s32 result
Definition:
libmc-common.h:132
sceMcStDateTime
Definition:
libmc-common.h:21
sceMcStDateTime::Min
u8 Min
Definition:
libmc-common.h:24
sceMcStDateTime::Resv2
u8 Resv2
Definition:
libmc-common.h:22
sceMcStDateTime::Year
u16 Year
Definition:
libmc-common.h:28
sceMcStDateTime::Month
u8 Month
Definition:
libmc-common.h:27
sceMcStDateTime::Sec
u8 Sec
Definition:
libmc-common.h:23
sceMcStDateTime::Hour
u8 Hour
Definition:
libmc-common.h:25
sceMcStDateTime::Day
u8 Day
Definition:
libmc-common.h:26
tamtypes.h
s32
signed int s32
Definition:
tamtypes.h:58
u32
unsigned int u32
Definition:
tamtypes.h:30
s16
signed short s16
Definition:
tamtypes.h:52
u16
unsigned short u16
Definition:
tamtypes.h:24
u8
unsigned char u8
Definition:
tamtypes.h:23
common
include
libmc-common.h
Generated on Thu Feb 11 2021 11:42:21 for ps2sdk by
1.9.2