PSPSDK 2026-01-28
Loading...
Searching...
No Matches
pspmodulemgr.h
Go to the documentation of this file.
1/*
2 * PSP Software Development Kit - https://github.com/pspdev
3 * -----------------------------------------------------------------------
4 * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
5 *
6 * pspmodulemgr.h - Prototypes to manage modules.
7 *
8 * Copyright (c) 2005 Marcus R. Brown <mrbrown@ocgnet.org>
9 * Copyright (c) 2005 James Forshaw <tyranid@gmail.com>
10 * Copyright (c) 2005 John Kelley <ps2dev@kelley.ca>
11 *
12 */
13
14/* Note: Some of the structures, types, and definitions in this file were
15 extrapolated from symbolic debugging information found in the Japanese
16 version of Puzzle Bobble. */
17
18#ifndef __MODLOAD_H__
19#define __MODLOAD_H__
20
21#include <pspkerneltypes.h>
22#include <psptypes.h>
23
28#ifdef __cplusplus
29extern "C" {
30#endif
31
35#define PSP_MEMORY_PARTITION_KERNEL 1
36#define PSP_MEMORY_PARTITION_USER 2
37
38#define SCE_SECURE_INSTALL_ID_LEN (16)
39
49
57
58
70SceUID sceKernelLoadModule(const char *path, int flags, SceKernelLMOption *option);
71
82SceUID sceKernelLoadModuleMs(const char *path, int flags, SceKernelLMOption *option);
83
89SceUID sceKernelLoadModuleMs2(int apitype, const char *path, int flags, SceKernelLMOption *option);
90
101
115SceUID sceKernelLoadModuleBufferUsbWlan(SceSize bufsize, void *buf, int flags, SceKernelLMOption *option);
116
130int sceKernelStartModule(SceUID modid, SceSize argsize, void *argp, int *status, SceKernelSMOption *option);
131
143int sceKernelStopModule(SceUID modid, SceSize argsize, void *argp, int *status, SceKernelSMOption *option);
144
153
163int sceKernelSelfStopUnloadModule(int unknown, SceSize argsize, void *argp);
164
175int sceKernelStopUnloadSelfModule(SceSize argsize, void *argp, int *status, SceKernelSMOption *option);
176
177
178typedef struct SceKernelModuleInfo {
181 char reserved[3];
184 unsigned int entry_addr;
185 unsigned int gp_value;
186 unsigned int text_addr;
187 unsigned int text_size;
188 unsigned int data_size;
189 unsigned int bss_size;
190 /* The following is only available in the v1.5 firmware and above,
191 but as sceKernelQueryModuleInfo is broken in v1.0 is doesn't matter ;) */
192 unsigned short attribute;
193 unsigned char version[2];
194 char name[28];
196
210
221int sceKernelGetModuleIdList(SceUID *readbuf, int readbufsize, int *idcount);
222
230int sceKernelGetModuleIdByAddress(const void *moduleAddr);
231
234#ifdef __cplusplus
235}
236#endif
237
238#endif
int sceKernelStopUnloadSelfModule(SceSize argsize, void *argp, int *status, SceKernelSMOption *option)
Stop and unload the current module.
SceUID sceKernelLoadModuleByID(SceUID fid, int flags, SceKernelLMOption *option)
Load a module from the given file UID.
struct SceKernelLMOption SceKernelLMOption
SceUID sceKernelLoadModuleMs2(int apitype, const char *path, int flags, SceKernelLMOption *option)
Alias for sceKernelLoadModuleForLoadExecVSHMs2
struct SceKernelSMOption SceKernelSMOption
int sceKernelSelfStopUnloadModule(int unknown, SceSize argsize, void *argp)
Stop and unload the current module.
int sceKernelUnloadModule(SceUID modid)
Unload a stopped module.
SceUID sceKernelLoadModuleBufferUsbWlan(SceSize bufsize, void *buf, int flags, SceKernelLMOption *option)
Load a module from a buffer using the USB/WLAN API.
int sceKernelStartModule(SceUID modid, SceSize argsize, void *argp, int *status, SceKernelSMOption *option)
Start a loaded module.
SceUID sceKernelLoadModule(const char *path, int flags, SceKernelLMOption *option)
Load a module.
int sceKernelQueryModuleInfo(SceUID modid, SceKernelModuleInfo *info)
Query the information about a loaded module from its UID.
SceUID sceKernelLoadModuleMs(const char *path, int flags, SceKernelLMOption *option)
Load a module from MS.
int sceKernelGetModuleIdByAddress(const void *moduleAddr)
Get the ID of the module occupying the address.
int sceKernelGetModuleIdList(SceUID *readbuf, int readbufsize, int *idcount)
Get a list of module IDs.
struct SceKernelModuleInfo SceKernelModuleInfo
int sceKernelStopModule(SceUID modid, SceSize argsize, void *argp, int *status, SceKernelSMOption *option)
Stop a running module.
int SceUID
UIDs are used to describe many different kernel objects.
Definition pspkerneltypes.h:24
unsigned int SceSize
Definition psptypes.h:103
Definition pspmodulemgr.h:40
SceSize size
Definition pspmodulemgr.h:41
char creserved[2]
Definition pspmodulemgr.h:47
SceUID mpidtext
Definition pspmodulemgr.h:42
char position
Definition pspmodulemgr.h:45
char access
Definition pspmodulemgr.h:46
SceUID mpiddata
Definition pspmodulemgr.h:43
unsigned int flags
Definition pspmodulemgr.h:44
Definition pspmodulemgr.h:178
unsigned short attribute
Definition pspmodulemgr.h:192
char name[28]
Definition pspmodulemgr.h:194
unsigned int entry_addr
Definition pspmodulemgr.h:184
SceSize size
Definition pspmodulemgr.h:179
int segmentsize[4]
Definition pspmodulemgr.h:183
int segmentaddr[4]
Definition pspmodulemgr.h:182
char reserved[3]
Definition pspmodulemgr.h:181
unsigned int data_size
Definition pspmodulemgr.h:188
unsigned int text_size
Definition pspmodulemgr.h:187
unsigned int bss_size
Definition pspmodulemgr.h:189
unsigned int text_addr
Definition pspmodulemgr.h:186
unsigned int gp_value
Definition pspmodulemgr.h:185
char nsegment
Definition pspmodulemgr.h:180
unsigned char version[2]
Definition pspmodulemgr.h:193
Definition pspmodulemgr.h:50
SceUID mpidstack
Definition pspmodulemgr.h:52
unsigned int attribute
Definition pspmodulemgr.h:55
int priority
Definition pspmodulemgr.h:54
SceSize stacksize
Definition pspmodulemgr.h:53
SceSize size
Definition pspmodulemgr.h:51