PS2SDK
PS2 Homebrew Libraries
|
Functions | |
int | SifLoadFileInit (void) |
void | SifLoadFileExit (void) |
int | SifLoadModule (const char *path, int arg_len, const char *args) |
int | SifLoadStartModule (const char *path, int arg_len, const char *args, int *mod_res) |
int | SifLoadModuleEncrypted (const char *path, int arg_len, const char *args) |
int | SifLoadModuleBuffer (void *ptr, int arg_len, const char *args) |
int | SifLoadStartModuleBuffer (void *ptr, int arg_len, const char *args, int *mod_res) |
int | SifLoadElfPart (const char *path, const char *secname, t_ExecData *data) |
int | SifLoadElf (const char *path, t_ExecData *data) |
int | SifLoadElfEncrypted (const char *path, t_ExecData *data) |
int | SifIopSetVal (u32 iop_addr, int val, int type) |
int | SifIopGetVal (u32 iop_addr, void *val, int type) |
int | SifExecModuleBuffer (void *ptr, u32 size, u32 arg_len, const char *args, int *mod_res) |
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 SifLoadFileInit | ( | void | ) |
#include <ee/kernel/include/loadfile.h>
Initialize the LOADFILE library.
Initializes the LOADFILE API and binds to the remote LOADFILE RPC server.
void SifLoadFileExit | ( | void | ) |
#include <ee/kernel/include/loadfile.h>
Reset the LOADFILE library.
Deinitializes the LOADFILE library in preparation of an IOP reset.
int SifLoadModule | ( | const char * | path, |
int | arg_len, | ||
const char * | args | ||
) |
#include <ee/kernel/include/loadfile.h>
Load and execute an IRX module.
path | Path to an IRX module |
arg_len | Length, in bytes, of the argument list |
args | List of arguments to pass to the IRX on startup |
Loads an IRX module from the specified path, and executes it. The args parameter specifies a list of arguments that are passed to the loaded module as the argv[] array. Each argument string in args must be seperated by NUL ('\0'). Pass the length of the entire args list, including the NUL seperators in the args_len parameter.
int SifLoadStartModule | ( | const char * | path, |
int | arg_len, | ||
const char * | args, | ||
int * | mod_res | ||
) |
#include <ee/kernel/include/loadfile.h>
Load and execute and IRX module, and retrieve the module's load status.
path | Path to an IRX module |
arg_len | Length, in bytes, of the argument list |
args | List of arguments to pass to the IRX on startup |
mod_res | Pointer to a variable that will store the return value from the IRX's _start() function |
Loads an IRX module from the specified path, and executes it. See SifLoadModule for details on the arg_len and args parameters. If mod_res is non-NULL, the result code from the module's _start() function is stored here.
int SifLoadModuleEncrypted | ( | const char * | path, |
int | arg_len, | ||
const char * | args | ||
) |
#include <ee/kernel/include/loadfile.h>
Load and execute an IRX module encrypted with MagicGate.
path | Path to an IRX module |
arg_len | Length, in bytes, of the argument list |
args | List of arguments to pass to the IRX on startup |
There is no real use for this function; it is only included in ps2lib for completeness.
int SifLoadModuleBuffer | ( | void * | ptr, |
int | arg_len, | ||
const char * | args | ||
) |
#include <ee/kernel/include/loadfile.h>
Load and execute an IRX module from a buffer in IOP RAM.
ptr | Pointer to a buffer in IOP RAM where the IRX module will be loaded from |
arg_len | Length, in bytes, of the argument list |
args | List of arguments to pass to the IRX on startup |
Loads an IRX module from a buffer located in IOP RAM. See SifLoadModule for details on the arg_len and args parameters.
int SifLoadStartModuleBuffer | ( | void * | ptr, |
int | arg_len, | ||
const char * | args, | ||
int * | mod_res | ||
) |
#include <ee/kernel/include/loadfile.h>
Load and execute an IRX module from a buffer in IOP RAM, and retrieve the module's load status.
ptr | Pointer to a buffer in IOP RAM where the IRX module will be loaded from |
arg_len | Length, in bytes, of the argument list |
args | List of arguments to pass to the IRX on startup |
mod_res | Pointer to a variable that will store the return value from the IRX's _start() function |
Loads an IRX module from a buffer located in IOP RAM. See SifLoadModule for details on the arg_len and args parameters. If mod_res is non-NULL, the result code from the module's _start() function is stored here.
int SifLoadElfPart | ( | const char * | path, |
const char * | secname, | ||
t_ExecData * | data | ||
) |
#include <ee/kernel/include/loadfile.h>
Load the specified section of an ELF executable into EE RAM.
path | Path to an ELF executable |
secname | The name of a single section to load from the ELF, or "all" to load all sections |
data | Pointer to a variable that will store information about the loaded executable |
Loads the section secname from the ELF file specified by path into EE RAM.
data points to a t_ExecData structure where information about the loaded section will be returned.
int SifLoadElf | ( | const char * | path, |
t_ExecData * | data | ||
) |
#include <ee/kernel/include/loadfile.h>
Load an ELF executable into EE RAM.
path | Path to an ELF executable |
data | Pointer to a variable that will store information about the loaded executable |
Loads the ELF executable specified by path into EE RAM. data points to a t_ExecData structure where information about the loaded executable will be returned.
int SifLoadElfEncrypted | ( | const char * | path, |
t_ExecData * | data | ||
) |
#include <ee/kernel/include/loadfile.h>
Load a MagicGate-encrypted ELF executable into EE RAM.
path | Path to an ELF executable |
data | Pointer to a variable that will store information about the loaded executable |
There is no real use for this function; it is only included in ps2lib for completeness.
int SifIopSetVal | ( | u32 | iop_addr, |
int | val, | ||
int | type | ||
) |
#include <ee/kernel/include/loadfile.h>
Write a value to an address within the IOP's memory space.
iop_addr | Address to modify in the IOP's address space |
val | Data to write at iop_addr |
type | A type describing the size of the val argument |
Writes the data passed in val to the IOP address specified by iop_addr. Use the following types specify the size of data write:
int SifIopGetVal | ( | u32 | iop_addr, |
void * | val, | ||
int | type | ||
) |
#include <ee/kernel/include/loadfile.h>
Read a value from an address within the IOP's memory space.
iop_addr | Address within the IOP's address space to read from |
val | Pointer to a variable that stores the value read |
type | A type describing the size of the data to read |
Reads data of the size specified by type from the IOP address specified by iop_addr. Use the following types to specify the size of the data to read:
int SifExecModuleBuffer | ( | void * | ptr, |
u32 | size, | ||
u32 | arg_len, | ||
const char * | args, | ||
int * | mod_res | ||
) |
#include <ee/kernel/include/loadfile.h>
Transfer an IRX module from EE RAM to IOP RAM and execute it.
ptr | Pointer to a buffer in EE RAM where the IRX module will be loaded from |
size | Size of the buffer in EE RAM that contains the IRX module |
arg_len | Length, in bytes, of the argument list |
args | List of arguments to pass to the IRX on startup |
mod_res | Pointer to a variable that will store the return value from the IRX's _start() function |
Transfers an IRX module stored in a buffer in EE RAM to the IOP, and calls SifLoadModuleBuffer to load and execute the module. See SifLoadModule for details on the arg_len and args parameters. If mod_res is non-NULL, the result code from the module's _start() function is stored here.
int SifExecModuleFile | ( | const char * | path, |
u32 | arg_len, | ||
const char * | args, | ||
int * | mod_res | ||
) |
#include <ee/kernel/include/loadfile.h>
Read an IRX module from a file into IOP RAM and execute it.
path | Path to an IRX module |
arg_len | Length, in bytes, of the argument list |
args | List of arguments to pass to the IRX on startup |
mod_res | Pointer to a variable that will store the return value from the IRX's _start() function |
Loads an IRX module from the specified path into a buffer on the IOP, then calls SifLoadModuleBuffer to load and execute the module. See SifLoadModule for details on the arg_len and args parameters. This function is useful if you need to load an IRX module from a prohibited device, such as the memory card.
int _SifLoadModule | ( | const char * | path, |
int | arg_len, | ||
const char * | args, | ||
int * | modres, | ||
int | fno, | ||
int | dontwait | ||
) |
#include <ee/kernel/include/loadfile.h>
Low-level function for loading and executing an IRX module.
path | Path to an IRX module |
arg_len | Length, in bytes, of the argument list |
args | List of arguments to pass to the IRX on startup |
*modres | Pointer to a variable that will store the return value from the IRX's _start() function |
fno | Function number of function to execute. |
dontwait | Whether to wait for the module's _start function to finish executing. |
Unless required, use the higher-level functions instead.