aboutsummaryrefslogtreecommitdiff
path: root/libpsn00b/psxapi/sys.s
blob: e54bd980f6d417b66ed19a0306e94232fd891562 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
# PSn00bSDK BIOS API stubs
# (C) 2022 spicyjpeg - MPL licensed

# This file has been generated automatically. Each function is placed in its
# own section to allow the linker to strip unused functions.

.set noreorder

## A0 table functions (7)

.section .text.b_setjmp
.global b_setjmp
.type b_setjmp, @function
b_setjmp:
	li $t2, 0xa0
	jr $t2
	li $t1, 0x13

.section .text.b_longjmp
.global b_longjmp
.type b_longjmp, @function
b_longjmp:
	li $t2, 0xa0
	jr $t2
	li $t1, 0x14

.section .text.b_InitHeap
.global b_InitHeap
.type b_InitHeap, @function
b_InitHeap:
	li $t2, 0xa0
	jr $t2
	li $t1, 0x39

.section .text.Exec
.global Exec
.type Exec, @function
Exec:
	li $t2, 0xa0
	jr $t2
	li $t1, 0x43

.section .text.FlushCache
.global FlushCache
.type FlushCache, @function
FlushCache:
	li $t2, 0xa0
	jr $t2
	li $t1, 0x44

.section .text._boot
.global _boot
.type _boot, @function
_boot:
	li $t2, 0xa0
	jr $t2
	li $t1, 0xa0

.section .text.GetSystemInfo
.global GetSystemInfo
.type GetSystemInfo, @function
GetSystemInfo:
	li $t2, 0xa0
	jr $t2
	li $t1, 0xb4

## B0 table functions (19)

.section .text._kernel_malloc
.global _kernel_malloc
.type _kernel_malloc, @function
_kernel_malloc:
	li $t2, 0xb0
	jr $t2
	li $t1, 0x00

.section .text._kernel_free
.global _kernel_free
.type _kernel_free, @function
_kernel_free:
	li $t2, 0xb0
	jr $t2
	li $t1, 0x01

.section .text.SetRCnt
.global SetRCnt
.type SetRCnt, @function
SetRCnt:
	li $t2, 0xb0
	jr $t2
	li $t1, 0x02

.section .text.GetRCnt
.global GetRCnt
.type GetRCnt, @function
GetRCnt:
	li $t2, 0xb0
	jr $t2
	li $t1, 0x03

.section .text.StartRCnt
.global StartRCnt
.type StartRCnt, @function
StartRCnt:
	li $t2, 0xb0
	jr $t2
	li $t1, 0x04

.section .text.StopRCnt
.global StopRCnt
.type StopRCnt, @function
StopRCnt:
	li $t2, 0xb0
	jr $t2
	li $t1, 0x05

.section .text.ResetRCnt
.global ResetRCnt
.type ResetRCnt, @function
ResetRCnt:
	li $t2, 0xb0
	jr $t2
	li $t1, 0x06

.section .text.OpenEvent
.global OpenEvent
.type OpenEvent, @function
OpenEvent:
	li $t2, 0xb0
	jr $t2
	li $t1, 0x08

.section .text.EnableEvent
.global EnableEvent
.type EnableEvent, @function
EnableEvent:
	li $t2, 0xb0
	jr $t2
	li $t1, 0x0c

.section .text.DisableEvent
.global DisableEvent
.type DisableEvent, @function
DisableEvent:
	li $t2, 0xb0
	jr $t2
	li $t1, 0x0d

.section .text.InitPAD
.global InitPAD
.type InitPAD, @function
InitPAD:
	li $t2, 0xb0
	jr $t2
	li $t1, 0x12

.section .text.StartPAD
.global StartPAD
.type StartPAD, @function
StartPAD:
	li $t2, 0xb0
	jr $t2
	li $t1, 0x13

.section .text.StopPAD
.global StopPAD
.type StopPAD, @function
StopPAD:
	li $t2, 0xb0
	jr $t2
	li $t1, 0x14

.section .text.ReturnFromException
.global ReturnFromException
.type ReturnFromException, @function
ReturnFromException:
	li $t2, 0xb0
	jr $t2
	li $t1, 0x17

.section .text.SetDefaultExitFromException
.global SetDefaultExitFromException
.type SetDefaultExitFromException, @function
SetDefaultExitFromException:
	li $t2, 0xb0
	jr $t2
	li $t1, 0x18

.section .text.SetCustomExitFromException
.global SetCustomExitFromException
.type SetCustomExitFromException, @function
SetCustomExitFromException:
	li $t2, 0xb0
	jr $t2
	li $t1, 0x19

.section .text.GetC0Table
.global GetC0Table
.type GetC0Table, @function
GetC0Table:
	li $t2, 0xb0
	jr $t2
	li $t1, 0x56

.section .text.GetB0Table
.global GetB0Table
.type GetB0Table, @function
GetB0Table:
	li $t2, 0xb0
	jr $t2
	li $t1, 0x57

.section .text.ChangeClearPAD
.global ChangeClearPAD
.type ChangeClearPAD, @function
ChangeClearPAD:
	li $t2, 0xb0
	jr $t2
	li $t1, 0x5b

## C0 table functions (3)

.section .text.SysEnqIntRP
.global SysEnqIntRP
.type SysEnqIntRP, @function
SysEnqIntRP:
	li $t2, 0xc0
	jr $t2
	li $t1, 0x02

.section .text.SysDeqIntRP
.global SysDeqIntRP
.type SysDeqIntRP, @function
SysDeqIntRP:
	li $t2, 0xc0
	jr $t2
	li $t1, 0x03

.section .text.ChangeClearRCnt
.global ChangeClearRCnt
.type ChangeClearRCnt, @function
ChangeClearRCnt:
	li $t2, 0xc0
	jr $t2
	li $t1, 0x0a

## Syscalls (2)

.section .text.EnterCriticalSection
.global EnterCriticalSection
.type EnterCriticalSection, @function
EnterCriticalSection:
	li      $a0, 0x01
	syscall 0
	jr      $ra
	nop

.section .text.ExitCriticalSection
.global ExitCriticalSection
.type ExitCriticalSection, @function
ExitCriticalSection:
	li      $a0, 0x02
	syscall 0
	jr      $ra
	nop