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