aboutsummaryrefslogtreecommitdiff
path: root/libpsn00b/psxapi
diff options
context:
space:
mode:
authorJohn Wilbert M. Villamor <lameguy64@gmail.com>2019-04-06 10:11:07 +0800
committerJohn Wilbert M. Villamor <lameguy64@gmail.com>2019-04-06 10:11:07 +0800
commitf3e040230772f978540a71aea43dfde200992922 (patch)
treebd8ca31b72dd01e24980b073854e263589530f56 /libpsn00b/psxapi
downloadpsn00bsdk-f3e040230772f978540a71aea43dfde200992922.tar.gz
First commit
Diffstat (limited to 'libpsn00b/psxapi')
-rw-r--r--libpsn00b/psxapi/fs/_96_init.s10
-rw-r--r--libpsn00b/psxapi/fs/_96_remove.s10
-rw-r--r--libpsn00b/psxapi/fs/chdir.s10
-rw-r--r--libpsn00b/psxapi/fs/erase.s10
-rw-r--r--libpsn00b/psxapi/fs/firstfile.s10
-rw-r--r--libpsn00b/psxapi/fs/nextfile.s10
-rw-r--r--libpsn00b/psxapi/fs/rename.s10
-rw-r--r--libpsn00b/psxapi/makefile34
-rw-r--r--libpsn00b/psxapi/stdio/close.s10
-rw-r--r--libpsn00b/psxapi/stdio/getc.s10
-rw-r--r--libpsn00b/psxapi/stdio/ioctl.s10
-rw-r--r--libpsn00b/psxapi/stdio/open.s10
-rw-r--r--libpsn00b/psxapi/stdio/printf.s10
-rw-r--r--libpsn00b/psxapi/stdio/putc.s10
-rw-r--r--libpsn00b/psxapi/stdio/read.s10
-rw-r--r--libpsn00b/psxapi/stdio/seek.s10
-rw-r--r--libpsn00b/psxapi/stdio/write.s10
-rw-r--r--libpsn00b/psxapi/sys/adddev.s10
-rw-r--r--libpsn00b/psxapi/sys/b_initheap.s10
-rw-r--r--libpsn00b/psxapi/sys/changeclearpad.s10
-rw-r--r--libpsn00b/psxapi/sys/changeclearrcnt.s10
-rw-r--r--libpsn00b/psxapi/sys/deldev.s10
-rw-r--r--libpsn00b/psxapi/sys/disableevent.s10
-rw-r--r--libpsn00b/psxapi/sys/enableevent.s10
-rw-r--r--libpsn00b/psxapi/sys/entercriticalsection.s11
-rw-r--r--libpsn00b/psxapi/sys/exitcriticalsection.s11
-rw-r--r--libpsn00b/psxapi/sys/initcard.s10
-rw-r--r--libpsn00b/psxapi/sys/initpad.s11
-rw-r--r--libpsn00b/psxapi/sys/listdev.s10
-rw-r--r--libpsn00b/psxapi/sys/openevent.s10
-rw-r--r--libpsn00b/psxapi/sys/setcustomexitfromexception.s10
-rw-r--r--libpsn00b/psxapi/sys/setdefaultexitfromexception.s10
-rw-r--r--libpsn00b/psxapi/sys/startpad.s10
-rw-r--r--libpsn00b/psxapi/sys/stoppad.s10
-rw-r--r--libpsn00b/psxapi/sys/sysenqintrp.s10
35 files changed, 377 insertions, 0 deletions
diff --git a/libpsn00b/psxapi/fs/_96_init.s b/libpsn00b/psxapi/fs/_96_init.s
new file mode 100644
index 0000000..ac35d6b
--- /dev/null
+++ b/libpsn00b/psxapi/fs/_96_init.s
@@ -0,0 +1,10 @@
+.set noreorder
+.section .text
+
+.global _96_init
+.type _96_init, @function
+_96_init:
+ addiu $t2, $0 , 0xa0
+ jr $t2
+ addiu $t1, $0 , 0x71
+ \ No newline at end of file
diff --git a/libpsn00b/psxapi/fs/_96_remove.s b/libpsn00b/psxapi/fs/_96_remove.s
new file mode 100644
index 0000000..a65c0ba
--- /dev/null
+++ b/libpsn00b/psxapi/fs/_96_remove.s
@@ -0,0 +1,10 @@
+.set noreorder
+.section .text
+
+.global _96_remove
+.type _96_remove, @function
+_96_remove:
+ addiu $t2, $0 , 0xa0
+ jr $t2
+ addiu $t1, $0 , 0x72
+ \ No newline at end of file
diff --git a/libpsn00b/psxapi/fs/chdir.s b/libpsn00b/psxapi/fs/chdir.s
new file mode 100644
index 0000000..83abf70
--- /dev/null
+++ b/libpsn00b/psxapi/fs/chdir.s
@@ -0,0 +1,10 @@
+.set noreorder
+.section .text
+
+.global chdir
+.type chdir, @function
+chdir:
+ addiu $t2, $0, 0xb0
+ jr $t2
+ addiu $t1, $0, 0x40
+ \ No newline at end of file
diff --git a/libpsn00b/psxapi/fs/erase.s b/libpsn00b/psxapi/fs/erase.s
new file mode 100644
index 0000000..0ddd05f
--- /dev/null
+++ b/libpsn00b/psxapi/fs/erase.s
@@ -0,0 +1,10 @@
+.set noreorder
+.section .text
+
+.global erase
+.type erase, @function
+erase:
+ addiu $t2, $0, 0xb0
+ jr $t2
+ addiu $t1, $0, 0x45
+ \ No newline at end of file
diff --git a/libpsn00b/psxapi/fs/firstfile.s b/libpsn00b/psxapi/fs/firstfile.s
new file mode 100644
index 0000000..2d1c1cd
--- /dev/null
+++ b/libpsn00b/psxapi/fs/firstfile.s
@@ -0,0 +1,10 @@
+.set noreorder
+.section .text
+
+.global firstfile
+.type firstfile, @function
+firstfile:
+ addiu $t2, $0, 0xb0
+ jr $t2
+ addiu $t1, $0, 0x42
+ \ No newline at end of file
diff --git a/libpsn00b/psxapi/fs/nextfile.s b/libpsn00b/psxapi/fs/nextfile.s
new file mode 100644
index 0000000..51a285a
--- /dev/null
+++ b/libpsn00b/psxapi/fs/nextfile.s
@@ -0,0 +1,10 @@
+.set noreorder
+.section .text
+
+.global nextfile
+.type nextfile, @function
+nextfile:
+ addiu $t2, $0, 0xb0
+ jr $t2
+ addiu $t1, $0, 0x43
+ \ No newline at end of file
diff --git a/libpsn00b/psxapi/fs/rename.s b/libpsn00b/psxapi/fs/rename.s
new file mode 100644
index 0000000..5815dba
--- /dev/null
+++ b/libpsn00b/psxapi/fs/rename.s
@@ -0,0 +1,10 @@
+.set noreorder
+.section .text
+
+.global rename
+.type rename, @function
+rename:
+ addiu $t2, $0, 0xb0
+ jr $t2
+ addiu $t1, $0, 0x44
+ \ No newline at end of file
diff --git a/libpsn00b/psxapi/makefile b/libpsn00b/psxapi/makefile
new file mode 100644
index 0000000..30c1522
--- /dev/null
+++ b/libpsn00b/psxapi/makefile
@@ -0,0 +1,34 @@
+# Run using make (Linux) or gmake (BSD)
+# Part of the PSn00bSDK Project
+# 2019 Lameguy64 / Meido-Tek Productions
+
+PREFIX = mipsel-unknown-elf-
+
+TARGET = ../libpsxapi.a
+
+SOURCES = stdio fs sys
+
+AFILES = $(foreach dir,$(SOURCES),$(wildcard $(dir)/*.s))
+OFILES = $(addprefix build/,$(AFILES:.s=.o))
+
+INCLUDE = -I../include
+
+AFLAGS = -msoft-float -Wa,--strip-local-absolute
+
+CC = $(PREFIX)gcc
+AS = $(PREFIX)as
+AR = $(PREFIX)ar
+RANLIB = $(PREFIX)ranlib
+
+all: $(TARGET)
+
+$(TARGET): $(OFILES)
+ $(AR) cr $(TARGET) $(OFILES)
+ $(RANLIB) $(TARGET)
+
+build/%.o: %.s
+ @mkdir -p $(dir $@)
+ $(CC) $(AFLAGS) $(INCLUDE) -c $< -o $@
+
+clean:
+ rm -Rf build $(TARGET)
diff --git a/libpsn00b/psxapi/stdio/close.s b/libpsn00b/psxapi/stdio/close.s
new file mode 100644
index 0000000..6d52762
--- /dev/null
+++ b/libpsn00b/psxapi/stdio/close.s
@@ -0,0 +1,10 @@
+.set noreorder
+.section .text
+
+.global close
+.type close, @function
+close:
+ addiu $t2, $0, 0xa0
+ jr $t2
+ addiu $t1, $0, 0x04
+ \ No newline at end of file
diff --git a/libpsn00b/psxapi/stdio/getc.s b/libpsn00b/psxapi/stdio/getc.s
new file mode 100644
index 0000000..2a93af6
--- /dev/null
+++ b/libpsn00b/psxapi/stdio/getc.s
@@ -0,0 +1,10 @@
+.set noreorder
+.section .text
+
+.global getc
+.type getc, @function
+getc:
+ addiu $t2, $0, 0xa0
+ jr $t2
+ addiu $t1, $0, 0x08
+ \ No newline at end of file
diff --git a/libpsn00b/psxapi/stdio/ioctl.s b/libpsn00b/psxapi/stdio/ioctl.s
new file mode 100644
index 0000000..9ba17e6
--- /dev/null
+++ b/libpsn00b/psxapi/stdio/ioctl.s
@@ -0,0 +1,10 @@
+.set noreorder
+.section .text
+
+.global ioctl
+.type ioctl, @function
+ioctl:
+ addiu $t2, $0, 0xa0
+ jr $t2
+ addiu $t1, $0, 0x05
+ \ No newline at end of file
diff --git a/libpsn00b/psxapi/stdio/open.s b/libpsn00b/psxapi/stdio/open.s
new file mode 100644
index 0000000..ce8c684
--- /dev/null
+++ b/libpsn00b/psxapi/stdio/open.s
@@ -0,0 +1,10 @@
+.set noreorder
+.section .text
+
+.global open
+.type open, @function
+open:
+ addiu $t2, $0, 0xa0
+ jr $t2
+ addiu $t1, $0, 0x00
+ \ No newline at end of file
diff --git a/libpsn00b/psxapi/stdio/printf.s b/libpsn00b/psxapi/stdio/printf.s
new file mode 100644
index 0000000..64f1390
--- /dev/null
+++ b/libpsn00b/psxapi/stdio/printf.s
@@ -0,0 +1,10 @@
+.set noreorder
+.section .text
+
+.global printf
+.type printf, @function
+printf:
+ addiu $t2, $0, 0xa0
+ jr $t2
+ addiu $t1, $0, 0x3f
+ \ No newline at end of file
diff --git a/libpsn00b/psxapi/stdio/putc.s b/libpsn00b/psxapi/stdio/putc.s
new file mode 100644
index 0000000..7c73241
--- /dev/null
+++ b/libpsn00b/psxapi/stdio/putc.s
@@ -0,0 +1,10 @@
+.set noreorder
+.section .text
+
+.global putchar
+.type putc, @function
+putchar:
+ addiu $t2, $0, 0xa0
+ jr $t2
+ addiu $t1, $0, 0x09
+ \ No newline at end of file
diff --git a/libpsn00b/psxapi/stdio/read.s b/libpsn00b/psxapi/stdio/read.s
new file mode 100644
index 0000000..4209232
--- /dev/null
+++ b/libpsn00b/psxapi/stdio/read.s
@@ -0,0 +1,10 @@
+.set noreorder
+.section .text
+
+.global read
+.type read, @function
+read:
+ addiu $t2, $0, 0xa0
+ jr $t2
+ addiu $t1, $0, 0x02
+ \ No newline at end of file
diff --git a/libpsn00b/psxapi/stdio/seek.s b/libpsn00b/psxapi/stdio/seek.s
new file mode 100644
index 0000000..944afd9
--- /dev/null
+++ b/libpsn00b/psxapi/stdio/seek.s
@@ -0,0 +1,10 @@
+.set noreorder
+.section .text
+
+.global seek
+.type seek, @function
+seek:
+ addiu $t2, $0, 0xA0
+ jr $t2
+ addiu $t1, $0, 0x01
+ \ No newline at end of file
diff --git a/libpsn00b/psxapi/stdio/write.s b/libpsn00b/psxapi/stdio/write.s
new file mode 100644
index 0000000..c451952
--- /dev/null
+++ b/libpsn00b/psxapi/stdio/write.s
@@ -0,0 +1,10 @@
+.set noreorder
+.section .text
+
+.global write
+.type write, @function
+write:
+ addiu $t2, $0, 0xa0
+ jr $t2
+ addiu $t1, $0, 0x03
+ \ No newline at end of file
diff --git a/libpsn00b/psxapi/sys/adddev.s b/libpsn00b/psxapi/sys/adddev.s
new file mode 100644
index 0000000..7fa717d
--- /dev/null
+++ b/libpsn00b/psxapi/sys/adddev.s
@@ -0,0 +1,10 @@
+.set noreorder
+
+.section .text
+
+.global AddDev
+.type AddDev, @function
+AddDev:
+ addiu $t2, $0, 0xb0
+ jr $t2
+ addiu $t1, $0, 0x47 \ No newline at end of file
diff --git a/libpsn00b/psxapi/sys/b_initheap.s b/libpsn00b/psxapi/sys/b_initheap.s
new file mode 100644
index 0000000..7411dd6
--- /dev/null
+++ b/libpsn00b/psxapi/sys/b_initheap.s
@@ -0,0 +1,10 @@
+.set noreorder
+.section .text
+
+.global b_InitHeap
+.type b_InitHeap, @function
+b_InitHeap:
+ addiu $t2, $0, 0xa0
+ jr $t2
+ addiu $t1, $0, 0x39
+ \ No newline at end of file
diff --git a/libpsn00b/psxapi/sys/changeclearpad.s b/libpsn00b/psxapi/sys/changeclearpad.s
new file mode 100644
index 0000000..509b03f
--- /dev/null
+++ b/libpsn00b/psxapi/sys/changeclearpad.s
@@ -0,0 +1,10 @@
+.set noreorder
+.section .text
+
+.global ChangeClearPAD
+.type ChangeClearPAD, @function
+ChangeClearPAD:
+ addiu $t2, $0 , 0xb0
+ jr $t2
+ addiu $t1, $0 , 0x5b
+ \ No newline at end of file
diff --git a/libpsn00b/psxapi/sys/changeclearrcnt.s b/libpsn00b/psxapi/sys/changeclearrcnt.s
new file mode 100644
index 0000000..a65676d
--- /dev/null
+++ b/libpsn00b/psxapi/sys/changeclearrcnt.s
@@ -0,0 +1,10 @@
+.set noreorder
+.section .text
+
+.global ChangeClearRCnt
+.type ChangeClearRCnt, @function
+ChangeClearRCnt:
+ addiu $t2, $0 , 0xc0
+ jr $t2
+ addiu $t1, $0 , 0x0a
+ \ No newline at end of file
diff --git a/libpsn00b/psxapi/sys/deldev.s b/libpsn00b/psxapi/sys/deldev.s
new file mode 100644
index 0000000..185cd32
--- /dev/null
+++ b/libpsn00b/psxapi/sys/deldev.s
@@ -0,0 +1,10 @@
+.set noreorder
+
+.section .text
+
+.global DelDev
+.type DelDev, @function
+DelDev:
+ addiu $t2, $0, 0xb0
+ jr $t2
+ addiu $t1, $0, 0x48 \ No newline at end of file
diff --git a/libpsn00b/psxapi/sys/disableevent.s b/libpsn00b/psxapi/sys/disableevent.s
new file mode 100644
index 0000000..fb60549
--- /dev/null
+++ b/libpsn00b/psxapi/sys/disableevent.s
@@ -0,0 +1,10 @@
+.set noreorder
+.section .text
+
+.global DisableEvent
+.type DisableEvent, @function
+DisableEvent:
+ addiu $t2, $0, 0xb0
+ jr $t2
+ addiu $t1, $0, 0x0d
+ \ No newline at end of file
diff --git a/libpsn00b/psxapi/sys/enableevent.s b/libpsn00b/psxapi/sys/enableevent.s
new file mode 100644
index 0000000..a95e1fc
--- /dev/null
+++ b/libpsn00b/psxapi/sys/enableevent.s
@@ -0,0 +1,10 @@
+.set noreorder
+.section .text
+
+.global EnableEvent
+.type EnableEvent, @function
+EnableEvent:
+ addiu $t2, $0, 0xb0
+ jr $t2
+ addiu $t1, $0, 0x0c
+ \ No newline at end of file
diff --git a/libpsn00b/psxapi/sys/entercriticalsection.s b/libpsn00b/psxapi/sys/entercriticalsection.s
new file mode 100644
index 0000000..ce9a368
--- /dev/null
+++ b/libpsn00b/psxapi/sys/entercriticalsection.s
@@ -0,0 +1,11 @@
+.set noreorder
+.section .text
+
+.global EnterCriticalSection
+.type EnterCriticalSection, @function
+EnterCriticalSection:
+ addiu $a0, $0, 1
+ syscall 0
+ jr $ra
+ nop
+ \ No newline at end of file
diff --git a/libpsn00b/psxapi/sys/exitcriticalsection.s b/libpsn00b/psxapi/sys/exitcriticalsection.s
new file mode 100644
index 0000000..e2ee060
--- /dev/null
+++ b/libpsn00b/psxapi/sys/exitcriticalsection.s
@@ -0,0 +1,11 @@
+.set noreorder
+.section .text
+
+.global ExitCriticalSection
+.type ExitCriticalSection, @function
+ExitCriticalSection:
+ addiu $a0, $0, 2
+ syscall 0
+ jr $ra
+ nop
+ \ No newline at end of file
diff --git a/libpsn00b/psxapi/sys/initcard.s b/libpsn00b/psxapi/sys/initcard.s
new file mode 100644
index 0000000..e589592
--- /dev/null
+++ b/libpsn00b/psxapi/sys/initcard.s
@@ -0,0 +1,10 @@
+.set noreorder
+.section .text
+
+.global InitCard
+.type InitCard, @function
+InitCard:
+ addiu $t2, $0, 0xb0
+ jr $t2
+ addiu $t1, $0, 0x4a
+ \ No newline at end of file
diff --git a/libpsn00b/psxapi/sys/initpad.s b/libpsn00b/psxapi/sys/initpad.s
new file mode 100644
index 0000000..b0f1b6f
--- /dev/null
+++ b/libpsn00b/psxapi/sys/initpad.s
@@ -0,0 +1,11 @@
+.set noreorder
+.section .text
+
+.include "hwregs_a.h"
+
+.global InitPad
+.type InitPad, @function
+InitPad:
+ addiu $t2, $0, 0xb0
+ jr $t2
+ addiu $t1, $0, 0x12
diff --git a/libpsn00b/psxapi/sys/listdev.s b/libpsn00b/psxapi/sys/listdev.s
new file mode 100644
index 0000000..fa3afec
--- /dev/null
+++ b/libpsn00b/psxapi/sys/listdev.s
@@ -0,0 +1,10 @@
+.set noreorder
+.section .text
+
+.global ListDev
+.type ListDev, @function
+ListDev:
+ addiu $t2, $0 , 0xb0
+ jr $t2
+ addiu $t1, $0 , 0x49
+ \ No newline at end of file
diff --git a/libpsn00b/psxapi/sys/openevent.s b/libpsn00b/psxapi/sys/openevent.s
new file mode 100644
index 0000000..9be0a3e
--- /dev/null
+++ b/libpsn00b/psxapi/sys/openevent.s
@@ -0,0 +1,10 @@
+.set noreorder
+.section .text
+
+.global OpenEvent
+.type OpenEvent, @function
+OpenEvent:
+ addiu $t2, $0, 0xb0
+ jr $t2
+ addiu $t1, $0, 0x08
+ \ No newline at end of file
diff --git a/libpsn00b/psxapi/sys/setcustomexitfromexception.s b/libpsn00b/psxapi/sys/setcustomexitfromexception.s
new file mode 100644
index 0000000..bcba057
--- /dev/null
+++ b/libpsn00b/psxapi/sys/setcustomexitfromexception.s
@@ -0,0 +1,10 @@
+.set noreorder
+.section .text
+
+.global SetCustomExitFromException
+.type SetCustomExitFromException, @function
+SetCustomExitFromException:
+ addiu $t2, $0, 0xb0
+ jr $t2
+ addiu $t1, $0, 0x19
+ \ No newline at end of file
diff --git a/libpsn00b/psxapi/sys/setdefaultexitfromexception.s b/libpsn00b/psxapi/sys/setdefaultexitfromexception.s
new file mode 100644
index 0000000..baaf591
--- /dev/null
+++ b/libpsn00b/psxapi/sys/setdefaultexitfromexception.s
@@ -0,0 +1,10 @@
+.set noreorder
+.section .text
+
+.global SetDefaultExitFromException
+.type SetDefaultExitFromException, @function
+SetDefaultExitFromException:
+ addiu $t2, $0, 0xb0
+ jr $t2
+ addiu $t1, $0, 0x18
+
diff --git a/libpsn00b/psxapi/sys/startpad.s b/libpsn00b/psxapi/sys/startpad.s
new file mode 100644
index 0000000..b15b0c0
--- /dev/null
+++ b/libpsn00b/psxapi/sys/startpad.s
@@ -0,0 +1,10 @@
+.set noreorder
+.section .text
+
+.global StartPad
+.type StartPad, @function
+StartPad:
+ addiu $t2, $0, 0xb0
+ jr $t2
+ addiu $t1, $0, 0x13
+ \ No newline at end of file
diff --git a/libpsn00b/psxapi/sys/stoppad.s b/libpsn00b/psxapi/sys/stoppad.s
new file mode 100644
index 0000000..562ac0f
--- /dev/null
+++ b/libpsn00b/psxapi/sys/stoppad.s
@@ -0,0 +1,10 @@
+.set noreorder
+.section .text
+
+.global StopPad
+.type StopPad, @function
+StartPad:
+ addiu $t2, $0, 0xb0
+ jr $t2
+ addiu $t1, $0, 0x14
+ \ No newline at end of file
diff --git a/libpsn00b/psxapi/sys/sysenqintrp.s b/libpsn00b/psxapi/sys/sysenqintrp.s
new file mode 100644
index 0000000..b1efe65
--- /dev/null
+++ b/libpsn00b/psxapi/sys/sysenqintrp.s
@@ -0,0 +1,10 @@
+.set noreorder
+.section .text
+
+.global SysEnqIntRP
+.type SysEnqIntRP, @function
+SysEnqIntRP:
+ addiu $t2, $0, 0xc0
+ jr $t2
+ addiu $t1, $0, 0x02
+ \ No newline at end of file