ps2sdk  1.1
A collection of Open Source libraries used for developing applications on Sony's PlayStation 2® (PS2).
loadfile.h
Go to the documentation of this file.
1 /*
2 # _____ ___ ____ ___ ____
3 # ____| | ____| | | |____|
4 # | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5 #-----------------------------------------------------------------------
6 # (c) 2003 Marcus R. Brown (mrbrown@0xd6.org)
7 # Licenced under Academic Free License version 2.0
8 # Review ps2sdk README & LICENSE files for further details.
9 */
10 
16 #ifndef __LOADFILE_H__
17 #define __LOADFILE_H__
18 
19 #include <tamtypes.h>
20 
21 #define LF_PATH_MAX 252
22 #define LF_ARG_MAX 252
23 
28 };
29 
33 
36 
39 
41 
44 
47 };
48 
49 typedef struct
50 {
55 } t_ExecData;
56 
57 /* Extended error codes */
59 #define SCE_EBINDMISS 0x10000
61 #define SCE_ECALLMISS 0x10001
63 #define SCE_ELOADMISS 0x10003
64 
65 #ifdef __cplusplus
66 extern "C" {
67 #endif
68 
76 int SifLoadFileInit(void);
82 void SifLoadFileExit(void);
83 
106 int SifLoadModule(const char *path, int arg_len, const char *args);
124 int SifLoadStartModule(const char *path, int arg_len, const char *args, int *mod_res);
125 
140 int SifLoadModuleEncrypted(const char *path, int arg_len, const char *args);
141 
160 int SifLoadModuleBuffer(void *ptr, int arg_len, const char *args);
181 int SifLoadStartModuleBuffer(void *ptr, int arg_len, const char *args, int *mod_res);
182 
183 int SifStopModule(int id, int arg_len, const char *args, int *mod_res);
184 int SifUnloadModule(int id);
185 int SifSearchModuleByName(const char *name);
186 int SifSearchModuleByAddress(const void *ptr);
187 
204 int SifLoadElfPart(const char *path, const char *secname, t_ExecData *data);
220 int SifLoadElf(const char *path, t_ExecData *data);
233 int SifLoadElfEncrypted(const char *path, t_ExecData *data);
234 
257 int SifIopSetVal(u32 iop_addr, int val, int type);
278 int SifIopGetVal(u32 iop_addr, void *val, int type);
279 
298 int SifExecModuleBuffer(void *ptr, u32 size, u32 arg_len, const char *args, int *mod_res);
316 int SifExecModuleFile(const char *path, u32 arg_len, const char *args, int *mod_res);
317 
318 
336 int _SifLoadModule(const char *path, int arg_len, const char *args,
337  int *modres, int fno, int dontwait);
338 
339 #ifdef __cplusplus
340 }
341 #endif
342 
343 #endif /* __LOADFILE_H__ */
int SifLoadModuleEncrypted(const char *path, int arg_len, const char *args)
int SifLoadModule(const char *path, int arg_len, const char *args)
int SifLoadStartModuleBuffer(void *ptr, int arg_len, const char *args, int *mod_res)
void SifLoadFileExit(void)
int SifLoadElf(const char *path, t_ExecData *data)
int SifLoadElfPart(const char *path, const char *secname, t_ExecData *data)
int SifLoadElfEncrypted(const char *path, t_ExecData *data)
int SifExecModuleBuffer(void *ptr, u32 size, u32 arg_len, const char *args, int *mod_res)
int SifLoadFileInit(void)
int SifIopSetVal(u32 iop_addr, int val, int type)
int SifExecModuleFile(const char *path, u32 arg_len, const char *args, int *mod_res)
int _SifLoadModule(const char *path, int arg_len, const char *args, int *modres, int fno, int dontwait)
int SifIopGetVal(u32 iop_addr, void *val, int type)
int SifLoadModuleBuffer(void *ptr, int arg_len, const char *args)
int SifLoadStartModule(const char *path, int arg_len, const char *args, int *mod_res)
u32 data
Definition: libmouse.c:36
int SifSearchModuleByName(const char *name)
_lf_val_types
Definition: loadfile.h:24
@ LF_VAL_BYTE
Definition: loadfile.h:25
@ LF_VAL_LONG
Definition: loadfile.h:27
@ LF_VAL_SHORT
Definition: loadfile.h:26
int SifStopModule(int id, int arg_len, const char *args, int *mod_res)
_lf_functions
Definition: loadfile.h:30
@ LF_F_ELF_LOAD
Definition: loadfile.h:32
@ LF_F_SET_ADDR
Definition: loadfile.h:34
@ LF_F_MOD_UNLOAD
Definition: loadfile.h:43
@ LF_F_SEARCH_MOD_BY_NAME
Definition: loadfile.h:45
@ LF_F_GET_ADDR
Definition: loadfile.h:35
@ LF_F_MG_MOD_LOAD
Definition: loadfile.h:37
@ LF_F_MOD_BUF_LOAD
Definition: loadfile.h:40
@ LF_F_MOD_STOP
Definition: loadfile.h:42
@ LF_F_MG_ELF_LOAD
Definition: loadfile.h:38
@ LF_F_MOD_LOAD
Definition: loadfile.h:31
@ LF_F_SEARCH_MOD_BY_ADDRESS
Definition: loadfile.h:46
int SifUnloadModule(int id)
int SifSearchModuleByAddress(const void *ptr)
u32 sp
Definition: loadfile.h:53
u32 dummy
Definition: loadfile.h:54
u32 epc
Definition: loadfile.h:51
u32 gp
Definition: loadfile.h:52
unsigned int u32
Definition: tamtypes.h:30