diff options
| author | John Wilbert M. Villamor <lameguy64@gmail.com> | 2020-09-19 20:43:05 +0800 |
|---|---|---|
| committer | John Wilbert M. Villamor <lameguy64@gmail.com> | 2020-09-19 20:43:05 +0800 |
| commit | 9f4891f95070c66ea9f1aba99d72724d4ab24e5a (patch) | |
| tree | 723e3ef2118a3d1a9e6dafa811ed1b8b1bc9196e /libpsn00b/include | |
| parent | 6762c39551ded059450d17d8bb0cb80642c8aaab (diff) | |
| download | psn00bsdk-9f4891f95070c66ea9f1aba99d72724d4ab24e5a.tar.gz | |
Revised makefiles, added strtok(), command line arguments, SetHeapSize(), moved ISR and callback system to psxetc, moved debug font to psxgpu, fixed CD-ROM library crashing on PSIO, fixed interrupt callback setup to fix crashing on ResetGraph()
Diffstat (limited to 'libpsn00b/include')
| -rw-r--r-- | libpsn00b/include/hwregs_a.h | 1 | ||||
| -rw-r--r-- | libpsn00b/include/malloc.h | 1 | ||||
| -rw-r--r-- | libpsn00b/include/psxapi.h | 2 | ||||
| -rw-r--r-- | libpsn00b/include/psxcd.h | 3 | ||||
| -rw-r--r-- | libpsn00b/include/psxetc.h | 10 | ||||
| -rw-r--r-- | libpsn00b/include/psxgpu.h | 14 | ||||
| -rw-r--r-- | libpsn00b/include/psxgte.h | 1 | ||||
| -rw-r--r-- | libpsn00b/include/stdlib.h | 3 |
8 files changed, 23 insertions, 12 deletions
diff --git a/libpsn00b/include/hwregs_a.h b/libpsn00b/include/hwregs_a.h index 9d4313b..d9f46ba 100644 --- a/libpsn00b/include/hwregs_a.h +++ b/libpsn00b/include/hwregs_a.h @@ -21,6 +21,7 @@ .set CD_REG2, 0x1802 .set CD_REG3, 0x1803 +.set SBUS_5, 0x1018 .set COM_DELAY, 0x1020 # SPU (must be used with 16-bit load/store instructions) diff --git a/libpsn00b/include/malloc.h b/libpsn00b/include/malloc.h index e6cd126..d94823f 100644 --- a/libpsn00b/include/malloc.h +++ b/libpsn00b/include/malloc.h @@ -7,6 +7,7 @@ extern "C" { unsigned int *GetBSSend(); void InitHeap(unsigned int *addr, int size); +int SetHeapSize(int size); void *malloc(int size); void free(void *ptr); diff --git a/libpsn00b/include/psxapi.h b/libpsn00b/include/psxapi.h index 0953dc3..c366702 100644 --- a/libpsn00b/include/psxapi.h +++ b/libpsn00b/include/psxapi.h @@ -179,7 +179,7 @@ void ChangeClearPAD(int mode); void ChangeClearRCnt(int t, int m); // Executable functions -int Exec(struct EXEC *exec, int argc, char *argv); +int Exec(struct EXEC *exec, int argc, char **argv); void _boot(void); diff --git a/libpsn00b/include/psxcd.h b/libpsn00b/include/psxcd.h index 072a219..6616b53 100644 --- a/libpsn00b/include/psxcd.h +++ b/libpsn00b/include/psxcd.h @@ -72,6 +72,7 @@ #define CdlIsoSeekError 0x01 #define CdlIsoReadError 0x02 #define CdlIsoInvalidFs 0x03 +#define CdlIsoLidOpen 0x04 #define btoi(b) ((b)/16*10+(b)%16) /* Convert BCD value to integer */ #define itob(i) ((i)/10*16+(i)%10) /* Convert integer to BCD value */ @@ -161,6 +162,8 @@ int CdGetVolumeLabel(char* label); long* CdAutoPauseCallback(void(*func)()); int CdIsoError(); +int CdLoadSession(int session); + #ifdef __cplusplus } #endif diff --git a/libpsn00b/include/psxetc.h b/libpsn00b/include/psxetc.h index d0c8bc1..a55e593 100644 --- a/libpsn00b/include/psxetc.h +++ b/libpsn00b/include/psxetc.h @@ -5,11 +5,11 @@ extern "C" { #endif -void FntLoad(int x, int y); -char *FntSort(unsigned int *ot, char *pri, int x, int y, const char *text); -int FntOpen(int x, int y, int w, int h, int isbg, int n); -int FntPrint(int id, const char *fmt, ...); -char *FntFlush(int id); +// Interrupt callback functions +void *DMACallback(int dma, void (*func)(void)); +void *InterruptCallback(int irq, void (*func)(void)); +void *GetInterruptCallback(int irq); // Original +void RestartCallback(); #ifdef __cplusplus } diff --git a/libpsn00b/include/psxgpu.h b/libpsn00b/include/psxgpu.h index 01b3280..bcd1835 100644 --- a/libpsn00b/include/psxgpu.h +++ b/libpsn00b/include/psxgpu.h @@ -560,12 +560,6 @@ void WaitGPUdma(void); void *VSyncCallback(void (*func)(void)); void *DrawSyncCallback(void (*func)(void)); -// Interrupt callback functions -void *DMACallback(int dma, void (*func)(void)); -void *InterruptCallback(int irq, void (*func)(void)); -void *GetInterruptCallback(int irq); // Original -void RestartCallback(); - void LoadImage(RECT *rect, unsigned int *data); void StoreImage(RECT *rect, unsigned int *data); @@ -582,6 +576,14 @@ int GetTimInfo(unsigned int *tim, TIM_IMAGE *timimg); DISPENV *SetDefDispEnv(DISPENV *disp, int x, int y, int w, int h); DRAWENV *SetDefDrawEnv(DRAWENV *draw, int x, int y, int w, int h); +// Debug font functions + +void FntLoad(int x, int y); +char *FntSort(unsigned int *ot, char *pri, int x, int y, const char *text); +int FntOpen(int x, int y, int w, int h, int isbg, int n); +int FntPrint(int id, const char *fmt, ...); +char *FntFlush(int id); + #ifdef __cplusplus } #endif diff --git a/libpsn00b/include/psxgte.h b/libpsn00b/include/psxgte.h index 98d9fa4..da9aff6 100644 --- a/libpsn00b/include/psxgte.h +++ b/libpsn00b/include/psxgte.h @@ -58,6 +58,7 @@ MATRIX *HiRotMatrix(VECTOR *r, MATRIX *m); MATRIX *TransMatrix(MATRIX *m, VECTOR *r); MATRIX *ScaleMatrix(MATRIX *m, VECTOR *s); +MATRIX *ScaleMatrixL(MATRIX *m, VECTOR *s); MATRIX *MulMatrix(MATRIX *m0, MATRIX *m1); MATRIX *MulMatrix0(MATRIX *m0, MATRIX *m1, MATRIX *m2); diff --git a/libpsn00b/include/stdlib.h b/libpsn00b/include/stdlib.h index 845cbea..474eba6 100644 --- a/libpsn00b/include/stdlib.h +++ b/libpsn00b/include/stdlib.h @@ -45,6 +45,9 @@ void *realloc(void *buf , int n); extern "C" { #endif +extern int __argc; +extern char __argv[]; + int rand(); void srand(unsigned long seed); |
