sdk-core
v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Toggle main menu visibility
Loading...
Searching...
No Matches
mcman.h
Go to the documentation of this file.
1
/*
2
# _____ ___ ____ ___ ____
3
# ____| | ____| | | |____|
4
# | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5
#-----------------------------------------------------------------------
6
# Copyright (c) 2009 jimmikaelkael
7
# Licenced under Academic Free License version 2.0
8
# Review ps2sdk README & LICENSE files for further details.
9
*/
10
16
17
#ifndef __MCMAN_H__
18
#define __MCMAN_H__
19
20
#include <types.h>
21
#include <
irx.h
>
22
#include <
libmc-common.h
>
23
24
/* MCMAN public structure */
25
typedef
struct
_sceMcTblGetDir
{
// size = 64
26
sceMcStDateTime _Create;
// 0
27
sceMcStDateTime _Modify;
// 8
28
u32 FileSizeByte;
// 16
29
u16 AttrFile;
// 20
30
u16 Reserve1;
// 22
31
u32 Reserve2;
// 24
32
u32 PdaAplNo;
// 28
33
char
EntryName[32];
// 32
34
} sceMcTblGetDir;
35
36
extern
int
McDetectCard(
int
port,
int
slot);
37
extern
int
McOpen(
int
port,
int
slot,
const
char
*filename,
int
flags);
38
extern
int
McClose(
int
fd);
39
extern
int
McRead(
int
fd,
void
*buf,
int
length);
40
extern
int
McWrite(
int
fd,
void
*buf,
int
length);
41
extern
int
McSeek(
int
fd,
int
offset,
int
origin);
42
extern
int
McFormat(
int
port,
int
slot);
43
extern
int
McGetDir(
int
port,
int
slot,
const
char
*dirname,
int
flags,
int
maxent, sceMcTblGetDir *info);
44
extern
int
McDelete(
int
port,
int
slot,
const
char
*filename,
int
flags);
45
extern
int
McFlush(
int
fd);
46
extern
int
McChDir(
int
port,
int
slot,
const
char
*newdir,
char
*currentdir);
47
extern
int
McSetFileInfo(
int
port,
int
slot,
const
char
*filename, sceMcTblGetDir *info,
int
flags);
48
extern
int
McEraseBlock(
int
port,
int
block,
void
**pagebuf,
void
*eccbuf);
//MCMAN v1.1 does not have a slot argument
49
extern
int
McReadPage(
int
port,
int
slot,
int
page,
void
*buf);
50
extern
int
McWritePage(
int
port,
int
slot,
int
page,
void
*pagebuf,
void
*eccbuf);
51
extern
void
McDataChecksum(
void
*buf,
void
*ecc);
52
extern
int
McReadPS1PDACard(
int
port,
int
slot,
int
page,
void
*buf);
53
extern
int
McWritePS1PDACard(
int
port,
int
slot,
int
page,
void
*buf);
54
extern
int
McUnformat(
int
port,
int
slot);
55
extern
int
McRetOnly(
int
fd);
56
extern
int
McGetFreeClusters(
int
port,
int
slot);
57
extern
int
McGetMcType(
int
port,
int
slot);
58
extern
void
McSetPS1CardFlag(
int
flag);
59
60
/* Available in XMCMAN only */
61
extern
int
McEraseBlock2(
int
port,
int
slot,
int
block,
void
**pagebuf,
void
*eccbuf);
62
extern
int
McDetectCard2(
int
port,
int
slot);
63
extern
int
McGetFormat(
int
port,
int
slot);
64
extern
int
McGetEntSpace(
int
port,
int
slot,
const
char
*dirname);
65
extern
int
McReplaceBadBlock(
void
);
66
extern
int
McCloseAll(
void
);
67
#ifdef _IOP
68
extern
struct
irx_id
*McGetModuleInfo(
void
);
69
#endif
70
extern
int
McGetCardSpec(
int
port,
int
slot, s16 *pagesize, u16 *blocksize,
int
*cardsize, u8 *flags);
71
extern
int
McGetFATentry(
int
port,
int
slot,
int
fat_index,
int
*fat_entry);
72
extern
int
McCheckBlock(
int
port,
int
slot,
int
block);
73
extern
int
McSetFATentry(
int
port,
int
slot,
int
fat_index,
int
fat_entry);
74
extern
int
McReadDirEntry(
int
port,
int
slot,
int
cluster,
int
fsindex,
McFsEntry
**pfse);
75
extern
void
Mc1stCacheEntSetWrFlagOff(
void
);
76
extern
int
McCreateDirentry(
int
port,
int
slot,
int
parent_cluster,
int
num_entries,
int
cluster,
const
sceMcStDateTime *ctime);
77
extern
int
McReadCluster(
int
port,
int
slot,
int
cluster, McCacheEntry **pmce);
78
extern
int
McFlushCache(
int
port,
int
slot);
79
extern
int
McSetDirEntryState(
int
port,
int
slot,
int
cluster,
int
fsindex,
int
flags);
80
81
#define xfromman_IMPORTS_start DECLARE_IMPORT_TABLE(xfromman, 2, 3)
82
#define xfromman_IMPORTS_end END_IMPORT_TABLE
83
84
#define mcman_IMPORTS_start DECLARE_IMPORT_TABLE(mcman, 1, 1)
85
#define mcman_IMPORTS_end END_IMPORT_TABLE
86
87
#define xmcman_IMPORTS_start DECLARE_IMPORT_TABLE(mcman, 2, 3)
88
#define xmcman_IMPORTS_end END_IMPORT_TABLE
89
90
#define I_McDetectCard DECLARE_IMPORT(5, McDetectCard)
91
#define I_McOpen DECLARE_IMPORT(6, McOpen)
92
#define I_McClose DECLARE_IMPORT(7, McClose)
93
#define I_McRead DECLARE_IMPORT(8, McRead)
94
#define I_McWrite DECLARE_IMPORT(9, McWrite)
95
#define I_McSeek DECLARE_IMPORT(10, McSeek)
96
#define I_McFormat DECLARE_IMPORT(11, McFormat)
97
#define I_McGetDir DECLARE_IMPORT(12, McGetDir)
98
#define I_McDelete DECLARE_IMPORT(13, McDelete)
99
#define I_McFlush DECLARE_IMPORT(14, McFlush)
100
#define I_McChDir DECLARE_IMPORT(15, McChDir)
101
#define I_McSetFileInfo DECLARE_IMPORT(16, McSetFileInfo)
102
#define I_McEraseBlock DECLARE_IMPORT(17, McEraseBlock)
103
#define I_McReadPage DECLARE_IMPORT(18, McReadPage)
104
#define I_McWritePage DECLARE_IMPORT(19, McWritePage)
105
#define I_McDataChecksum DECLARE_IMPORT(20, McDataChecksum);
106
#define I_McReadPS1PDACard DECLARE_IMPORT(29, McReadPS1PDACard)
107
#define I_McWritePS1PDACard DECLARE_IMPORT(30, McWritePS1PDACard)
108
#define I_McUnformat DECLARE_IMPORT(36, McUnformat)
109
#define I_McRetOnly DECLARE_IMPORT(37, McRetOnly)
110
#define I_McGetFreeClusters DECLARE_IMPORT(38, McGetFreeClusters)
111
#define I_McGetMcType DECLARE_IMPORT(39, McGetMcType)
112
#define I_McSetPS1CardFlag DECLARE_IMPORT(40, McSetPS1CardFlag)
113
#define I_McEraseBlock2 DECLARE_IMPORT(17, McEraseBlock2)
114
#define I_McDetectCard2 DECLARE_IMPORT(21, McDetectCard2)
115
#define I_McGetFormat DECLARE_IMPORT(22, McGetFormat)
116
#define I_McGetEntSpace DECLARE_IMPORT(23, McGetEntSpace)
117
#define I_McReplaceBadBlock DECLARE_IMPORT(24, McReplaceBadBlock)
118
#define I_McCloseAll DECLARE_IMPORT(25, McCloseAll)
119
#define I_McGetModuleInfo DECLARE_IMPORT(42, McGetModuleInfo)
120
#define I_McGetCardSpec DECLARE_IMPORT(43, McGetCardSpec)
121
#define I_McGetFATentry DECLARE_IMPORT(44, McGetFATentry)
122
#define I_McCheckBlock DECLARE_IMPORT(45, McCheckBlock)
123
#define I_McSetFATentry DECLARE_IMPORT(46, McSetFATentry)
124
#define I_McReadDirEntry DECLARE_IMPORT(47, McReadDirEntry)
125
#define I_Mc1stCacheEntSetWrFlagOff DECLARE_IMPORT(48, Mc1stCacheEntSetWrFlagOff)
126
#define I_McCreateDirentry DECLARE_IMPORT(49, McCreateDirentry)
127
#define I_McReadCluster DECLARE_IMPORT(50, McReadCluster)
128
#define I_McFlushCache DECLARE_IMPORT(51, McFlushCache)
129
#define I_McSetDirEntryState DECLARE_IMPORT(52, McSetDirEntryState)
130
131
#endif
/* __MCMAN_H__ */
irx.h
libmc-common.h
McFsEntry
Definition
libmc-common.h:56
_sceMcTblGetDir
Definition
libmc.h:140
irx_id
Definition
irx.h:28
core
mcman
include
mcman.h
Generated by
1.18.0