PS2SDK
PS2 Homebrew Libraries
mcserv.h
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 
11 #ifndef __MCSERV_H__
12 #define __MCSERV_H__
13 
14 #include <loadcore.h>
15 #include <intrman.h>
16 #include <sysclib.h>
17 #include <sifman.h>
18 #include <sifcmd.h>
19 #include <thbase.h>
20 #include <stdio.h>
21 #include <mcman.h>
22 
23 //#define DEBUG
24 
25 #ifdef BUILDING_XFROMSERV
26 #define MODNAME "xfrmserv"
27 // NOTE: feature level is at mcserv 0x208
28 #define MODVER 0x301
29 #else
30 #define MODNAME "mcserv"
31 #define MODVER 0x208
32 #endif
33 
34 #ifdef SIO_DEBUG
35  #include <sior.h>
36  #define DEBUG
37  #define DPRINTF(format, args...) \
38  sio_printf(MODNAME ": " format, ##args)
39 #else
40  #ifdef DEBUG
41  #define DPRINTF(format, args...) \
42  printf(MODNAME ": " format, ##args)
43  #else
44  #define DPRINTF(format, args...)
45  #endif
46 #endif
47 
48 
49 // internal function prototypes
50 extern void *cb_rpc_S_0400(u32 fno, void *buf, int size);
51 extern void thread_rpc_S_0400(void* param);
52 extern int sceMcInit(void);
53 extern int sceMcOpen(void);
54 extern int sceMcClose(void);
55 extern int sceMcRead(void);
56 extern int sceMcWrite(void);
57 extern int sceMcSeek(void);
58 extern int sceMcGetDir(void);
59 extern int sceMcFormat(void);
60 extern int sceMcGetInfo(void);
61 extern int sceMcDelete(void);
62 extern int sceMcFlush(void);
63 extern int sceMcChDir(void);
64 extern int sceMcSetFileInfo(void);
65 extern int sceMcEraseBlock(void);
66 extern int sceMcReadPage(void);
67 extern int sceMcWritePage(void);
68 extern int sceMcUnformat(void);
69 extern int sceMcRead2(void);
70 extern int sceMcGetInfo2(void);
71 extern int sceMcGetEntSpace(void);
72 extern int sceMcCheckBlock(void);
73 
74 extern int _McInit(void *rpc_buf);
75 extern int _McOpen(void *rpc_buf);
76 extern int _McClose(void *rpc_buf);
77 extern int _McRead(void *rpc_buf);
78 extern int _McWrite(void *rpc_buf);
79 extern int _McSeek(void *rpc_buf);
80 extern int _McGetDir(void *rpc_buf);
81 extern int _McFormat(void *rpc_buf);
82 extern int _McGetInfo(void *rpc_buf);
83 extern int _McDelete(void *rpc_buf);
84 extern int _McFlush(void *rpc_buf);
85 extern int _McChDir(void *rpc_buf);
86 extern int _McSetFileInfo(void *rpc_buf);
87 extern int _McEraseBlock(void *rpc_buf);
88 extern int _McReadPage(void *rpc_buf);
89 extern int _McWritePage(void *rpc_buf);
90 extern int _McUnformat(void *rpc_buf);
91 extern int _McRead2(void *rpc_buf);
92 extern int _McGetInfo2(void *rpc_buf);
93 extern int _McGetEntSpace(void *rpc_buf);
94 extern int _McCheckBlock(void *rpc_buf);
95 
96 // filename related mc command
97 // used by: mcOpen, mcGetDir, mcChdir, mcDelete, mcSetFileInfo, mcRename, mcGetEntSpace
98 typedef struct { // size = 1044
99  int port; // 0
100  int slot; // 4
101  int flags; // 8
102  int maxent; // 12
103  union {
104  sceMcTblGetDir *mcT; // 16
105  char *curdir;
106  };
107  char name[1024]; // 20
108 } mcNameParam_t;
109 
110 #endif
sior.h
thbase.h
sifman.h
sysclib.h
loadcore.h
_sceMcTblGetDir
Definition: libmc.h:139
stdio.h
mcNameParam_t
Definition: mcserv.h:98
intrman.h
mcman.h