Disabling auto-refresh of game list by default, as it is causing bugs sometimes
[open-ps2-loader.git] / ee_core / include / modmgr.h
blob4bc06166ef50a4f9107a20ffa02e0fdae2aca3c7
1 /*
2 Copyright 2009-2010, Ifcaro, jimmikaelkael & Polo
3 Copyright 2006-2008 Polo
4 Licenced under Academic Free License version 3.0
5 Review OpenUsbLd README & LICENSE files for further details.
7 Some parts of the code are taken from HD Project by Polo
8 */
10 #ifndef MODMGR_H
11 #define MODMGR_H
13 #define LF_PATH_MAX 252
14 #define LF_ARG_MAX 252
16 enum _lf_functions {
17 LF_F_MOD_LOAD = 0,
18 LF_F_ELF_LOAD,
20 LF_F_SET_ADDR,
21 LF_F_GET_ADDR,
23 LF_F_MG_MOD_LOAD,
24 LF_F_MG_ELF_LOAD,
26 LF_F_MOD_BUF_LOAD,
28 LF_F_MOD_STOP,
29 LF_F_MOD_UNLOAD,
31 LF_F_SEARCH_MOD_BY_NAME,
32 LF_F_SEARCH_MOD_BY_ADDRESS,
35 struct _lf_module_load_arg {
36 union
38 int arg_len;
39 int result;
40 } p;
41 int modres;
42 char path[LF_PATH_MAX];
43 char args[LF_ARG_MAX];
44 } __attribute__((aligned (16)));
46 struct _lf_module_buffer_load_arg {
47 union
49 void *ptr;
50 int result;
51 } p;
52 union
54 int arg_len;
55 int modres;
56 } q;
57 char unused[LF_PATH_MAX];
58 char args[LF_ARG_MAX];
59 } __attribute__((aligned (16)));
61 struct _lf_elf_load_arg {
62 union
64 u32 epc;
65 int result;
66 } p;
67 u32 gp;
68 char path[LF_PATH_MAX];
69 char secname[LF_ARG_MAX];
70 } __attribute__((aligned (16)));
72 typedef struct
74 u32 epc;
75 u32 gp;
76 u32 sp;
77 u32 dummy;
78 } t_ExecData;
80 int LoadFileInit();
81 void LoadFileExit();
82 int LoadModule(const char *path, int arg_len, const char *args);
83 int LoadModuleAsync(const char *path, int arg_len, const char *args);
84 void GetIrxKernelRAM(void);
85 int LoadIRXfromKernel(void *irxkernelmem, int irxsize, int arglen, char *argv);
86 int LoadMemModule(void *modptr, unsigned int modsize, int arg_len, const char *args);
87 int LoadElf(const char *path, t_ExecData *data);
88 void ChangeModuleName(const char *name, const char *newname);
89 void ListModules(void);
91 #endif /* MODMGR */