PSPSDK 2025-04-22
Loading...
Searching...
No Matches
pspsdk.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 * pspsdk.h - Interface to the PSPSDK utility library.
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#ifndef PSPSDK_H
15#define PSPSDK_H
16
17#include <pspkerneltypes.h>
18#include <psptypes.h>
19#include <pspmodulemgr.h>
20#include <pspmoduleinfo.h>
21#include <pspthreadman.h>
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
44
56int pspSdkGetModuleIdList(SceUID *readbuf, int readbufsize, int *idcount);
57
67
76
85
94SceUID pspSdkLoadStartModule(const char *filename, int mpid);
95
106SceUID pspSdkLoadStartModuleWithArgs(const char *filename, int mpid, int argc, char * const argv[]);
107
113void pspSdkFixupImports(int moduleId);
114
122
129
134
144int pspSdkReferThreadStatusByName(const char *name, SceUID *pUID, SceKernelThreadInfo *pInfo);
145
155int pspSdkReferSemaStatusByName(const char *name, SceUID *pUID, SceKernelSemaInfo *pInfo);
156
166int pspSdkReferEventFlagStatusByName(const char *name, SceUID *pUID, SceKernelEventFlagInfo *pInfo);
167
177int pspSdkReferMboxStatusByName(const char *name, SceUID *pUID, SceKernelMbxInfo *pInfo);
178
188int pspSdkReferVplStatusByName(const char *name, SceUID *pUID, SceKernelVplInfo *pInfo);
189
199int pspSdkReferFplStatusByName(const char *name, SceUID *pUID, SceKernelFplInfo *pInfo);
200
210int pspSdkReferMppStatusByName(const char *name, SceUID *pUID, SceKernelMppInfo *pInfo);
211
221int pspSdkReferCallbackStatusByName(const char *name, SceUID *pUID, SceKernelCallbackInfo *pInfo);
222
232int pspSdkReferVTimerStatusByName(const char *name, SceUID *pUID, SceKernelVTimerInfo *pInfo);
233
244
252unsigned int pspSdkDisableInterrupts(void);
253
259void pspSdkEnableInterrupts(unsigned int istate);
260
276unsigned int pspSdkSetK1(unsigned int k1);
277
283unsigned int pspSdkGetK1(void);
284
289
300
303#ifdef __cplusplus
304}
305#endif
306
307#endif /* PSPSDK_H */
#define k1
Definition as_reg_compat.h:45
int pspSdkReferMppStatusByName(const char *name, SceUID *pUID, SceKernelMppInfo *pInfo)
Search for a message pipe with the given name and retrieve it's SceKernelMppInfo struct.
Definition threadutils.c:237
int pspSdkReferSemaStatusByName(const char *name, SceUID *pUID, SceKernelSemaInfo *pInfo)
Search for a semaphore with the given name and retrieve it's SceKernelSemaInfo struct.
Definition threadutils.c:73
int pspSdkReferEventFlagStatusByName(const char *name, SceUID *pUID, SceKernelEventFlagInfo *pInfo)
Search for an event flag with the given name and retrieve it's SceKernelEventFlagInfo struct.
Definition threadutils.c:100
int pspSdkReferMboxStatusByName(const char *name, SceUID *pUID, SceKernelMbxInfo *pInfo)
Search for a message box with the given name and retrieve it's SceKernelMbxInfo struct.
Definition threadutils.c:154
void pspSdkInetTerm()
Terminate Inet related modules.
int pspSdkInstallNoPlainModuleCheckPatch(void)
Patch sceLoadCore module to remove loading plain module checks.
int pspSdkInstallNoDeviceCheckPatch(void)
Patch the sceModuleManager module to nullify LoadDeviceCheck() calls.
int pspSdkGetModuleIdList(SceUID *readbuf, int readbufsize, int *idcount)
Get the list of module IDs.
Definition query_mod.c:21
SceSize pspSdkTotalFreeUserMemSize(void)
Gets the amount of memory available in the user partition(s).
Definition memory.c:45
int pspSdkReferFplStatusByName(const char *name, SceUID *pUID, SceKernelFplInfo *pInfo)
Search for a FPL with the given name and retrieve it's SceKernelFplInfo struct.
Definition threadutils.c:209
SceUID pspSdkLoadStartModule(const char *filename, int mpid)
Load a module and start it.
Definition loadmodule.c:62
unsigned int pspSdkSetK1(unsigned int k1)
Set the processors K1 register to a known value.
int pspSdkReferThreadEventHandlerStatusByName(const char *name, SceUID *pUID, SceKernelThreadEventHandlerInfo *pInfo)
Search for a thread event handler with the given name and retrieve it's SceKernelThreadEventHandlerIn...
Definition threadutils.c:318
int pspSdkReferVTimerStatusByName(const char *name, SceUID *pUID, SceKernelVTimerInfo *pInfo)
Search for a vtimer with the given name and retrieve it's SceKernelVTimerInfo struct.
Definition threadutils.c:291
void pspSdkEnableInterrupts(unsigned int istate)
Enable interrupts.
int pspSdkReferCallbackStatusByName(const char *name, SceUID *pUID, SceKernelCallbackInfo *pInfo)
Search for a callback with the given name and retrieve it's SceKernelCallbackInfo struct.
Definition threadutils.c:264
void pspSdkFixupImports(int moduleId)
Manually fixup library imports for late binding modules.
Definition fixup.c:70
int pspSdkReferThreadStatusByName(const char *name, SceUID *pUID, SceKernelThreadInfo *pInfo)
Search for a thread with the given name and retrieve it's SceKernelThreadInfo struct.
Definition threadutils.c:127
int pspSdkReferVplStatusByName(const char *name, SceUID *pUID, SceKernelVplInfo *pInfo)
Search for a VPL with the given name and retrieve it's SceKernelVplInfo struct.
Definition threadutils.c:182
int pspSdkQueryModuleInfoV1(SceUID uid, SceKernelModuleInfo *modinfo)
Query a modules information from its uid.
Definition query_mod.c:29
SceUID pspSdkLoadStartModuleWithArgs(const char *filename, int mpid, int argc, char *const argv[])
Load a module and start it with arguments.
Definition loadmodule.c:19
unsigned int pspSdkDisableInterrupts(void)
Disable interrupts.
int pspSdkInstallKernelLoadModulePatch(void)
Patch sceLoadModuleWithApiType to remove the kernel check in loadmodule allowing all modules to load.
unsigned int pspSdkGetK1(void)
Get the current value of the processors K1 register.
void pspSdkDisableFPUExceptions(void)
Disable the CPUs FPU exceptions.
int pspSdkLoadInetModules()
Load Inet related modules.
int pspSdkInetInit()
Initialize Inet related modules.
int SceUID
UIDs are used to describe many different kernel objects.
Definition pspkerneltypes.h:24
unsigned int SceSize
Definition psptypes.h:103
Structure to hold the status information for a callback.
Definition pspthreadman.h:1031
Structure to hold the event flag information.
Definition pspthreadman.h:675
Fixed pool status information.
Definition pspthreadman.h:1502
Current state of a messagebox.
Definition pspthreadman.h:811
Definition pspmodulemgr.h:167
Message Pipe status info.
Definition pspthreadman.h:1297
Current state of a semaphore.
Definition pspthreadman.h:481
Struct for event handler info.
Definition pspthreadman.h:1771
Structure to hold the status information for a thread.
Definition pspthreadman.h:84
Definition pspthreadman.h:1732
Variable pool status info.
Definition pspthreadman.h:1401