From 853fa4eed241cdd87b8c2d2e60cf755509d9a184 Mon Sep 17 00:00:00 2001 From: spicyjpeg <88942473+spicyjpeg@users.noreply.github.com> Date: Thu, 18 Nov 2021 17:25:58 +0100 Subject: sprintf improvements, added new _mem_init, GetSystemInfo --- libpsn00b/include/psxapi.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'libpsn00b/include') 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 -- cgit v1.2.3