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