aboutsummaryrefslogtreecommitdiff
path: root/libpsn00b/psxapi/sys.s
blob: e2505e1f962b56ab6d7c44277f1aa08202d62894 (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
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
# 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 (8)

.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.SetConf
.global SetConf
.type SetConf, @function
SetConf:
	li $t2, 0xa0
	jr $t2
	li $t1, 0x9c

.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 (27)

.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.DeliverEvent
.global DeliverEvent
.type DeliverEvent, @function
DeliverEvent:
	li $t2, 0xb0
	jr $t2
	li $t1, 0x07

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

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

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

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

.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.OpenTh
.global OpenTh
.type OpenTh, @function
OpenTh:
	li $t2, 0xb0
	jr $t2
	li $t1, 0x0e

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

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

.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.UnDeliverEvent
.global UnDeliverEvent
.type UnDeliverEvent, @function
UnDeliverEvent:
	li $t2, 0xb0
	jr $t2
	li $t1, 0x20

.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 (5)

.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.InstallExceptionHandlers
.global InstallExceptionHandlers
.type InstallExceptionHandlers, @function
InstallExceptionHandlers:
	li $t2, 0xc0
	jr $t2
	li $t1, 0x07

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

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