aboutsummaryrefslogtreecommitdiff
path: root/libpsn00b/include
diff options
context:
space:
mode:
authorspicyjpeg <88942473+spicyjpeg@users.noreply.github.com>2021-11-18 17:25:58 +0100
committerspicyjpeg <88942473+spicyjpeg@users.noreply.github.com>2021-11-18 17:25:58 +0100
commit853fa4eed241cdd87b8c2d2e60cf755509d9a184 (patch)
tree0fbd0201df56b95ff6ca6362692236b7d7e9b5bf /libpsn00b/include
parent619fa016bbc4ddd8d4a670cf3f8aa63617473b2f (diff)
downloadpsn00bsdk-853fa4eed241cdd87b8c2d2e60cf755509d9a184.tar.gz
sprintf improvements, added new _mem_init, GetSystemInfo
Diffstat (limited to 'libpsn00b/include')
-rw-r--r--libpsn00b/include/psxapi.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/libpsn00b/include/psxapi.h b/libpsn00b/include/psxapi.h
index 9e92568..ec0dfea 100644
--- a/libpsn00b/include/psxapi.h
+++ b/libpsn00b/include/psxapi.h
@@ -32,6 +32,35 @@
#define RCntMdFR 0x0000
#define RCntMdGATE 0x0010
+typedef struct { // Thread control block
+ int status;
+ int mode;
+ union {
+ unsigned int reg[37];
+ struct {
+ unsigned int zero, at;
+ unsigned int v0, v1;
+ unsigned int a0, a1, a2, a3;
+ unsigned int t0, t1, t2, t3, t4, t5, t6, t7;
+ unsigned int s0, s1, s2, s3, s4, s5, s6, s7;
+ unsigned int t8, t9;
+ unsigned int k0, k1;
+ unsigned int gp, sp, fp, ra;
+
+ unsigned int cop0r14;
+ unsigned int hi;
+ unsigned int lo;
+ unsigned int cop0r12;
+ unsigned int cop0r13;
+ };
+ };
+ int _reserved[9];
+} TCB;
+
+typedef struct { // Process control block
+ TCB *thread;
+} PCB;
+
typedef struct { // Device control block
char *name;
int flags;
@@ -182,6 +211,9 @@ void ChangeClearRCnt(int t, int m);
int Exec(struct EXEC *exec, int argc, char **argv);
void FlushCache(void);
+// Misc functions
+int GetSystemInfo(int index);
+
void _boot(void);
#ifdef __cplusplus