summaryrefslogtreecommitdiff
path: root/asm/Dolphin/gx/GXGeometry.s
blob: 995f3bc85774d07a11cbd862c04d87fadf3de523 (plain)
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
.include "macros.inc"

.section .text, "ax"  # 0x80005600 - 0x8036FBA0
.global __GXSetDirtyState
__GXSetDirtyState:
/* 800A8808 000A5748  7C 08 02 A6 */	mflr r0
/* 800A880C 000A574C  90 01 00 04 */	stw r0, 4(r1)
/* 800A8810 000A5750  94 21 FF F8 */	stwu r1, -8(r1)
/* 800A8814 000A5754  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800A8818 000A5758  80 03 04 F4 */	lwz r0, 0x4f4(r3)
/* 800A881C 000A575C  54 00 07 FF */	clrlwi. r0, r0, 0x1f
/* 800A8820 000A5760  41 82 00 08 */	beq lbl_800A8828
/* 800A8824 000A5764  48 00 27 59 */	bl __GXSetSUTexRegs
lbl_800A8828:
/* 800A8828 000A5768  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800A882C 000A576C  80 03 04 F4 */	lwz r0, 0x4f4(r3)
/* 800A8830 000A5770  54 00 07 BD */	rlwinm. r0, r0, 0, 0x1e, 0x1e
/* 800A8834 000A5774  41 82 00 08 */	beq lbl_800A883C
/* 800A8838 000A5778  48 00 30 E1 */	bl __GXUpdateBPMask
lbl_800A883C:
/* 800A883C 000A577C  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800A8840 000A5780  80 03 04 F4 */	lwz r0, 0x4f4(r3)
/* 800A8844 000A5784  54 00 07 7B */	rlwinm. r0, r0, 0, 0x1d, 0x1d
/* 800A8848 000A5788  41 82 00 08 */	beq lbl_800A8850
/* 800A884C 000A578C  48 00 03 79 */	bl __GXSetGenMode
lbl_800A8850:
/* 800A8850 000A5790  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800A8854 000A5794  80 03 04 F4 */	lwz r0, 0x4f4(r3)
/* 800A8858 000A5798  54 00 07 39 */	rlwinm. r0, r0, 0, 0x1c, 0x1c
/* 800A885C 000A579C  41 82 00 08 */	beq lbl_800A8864
/* 800A8860 000A57A0  4B FF E7 6D */	bl __GXSetVCD
lbl_800A8864:
/* 800A8864 000A57A4  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800A8868 000A57A8  80 03 04 F4 */	lwz r0, 0x4f4(r3)
/* 800A886C 000A57AC  54 00 06 F7 */	rlwinm. r0, r0, 0, 0x1b, 0x1b
/* 800A8870 000A57B0  41 82 00 08 */	beq lbl_800A8878
/* 800A8874 000A57B4  4B FF F2 19 */	bl __GXSetVAT
lbl_800A8878:
/* 800A8878 000A57B8  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800A887C 000A57BC  80 03 04 F4 */	lwz r0, 0x4f4(r3)
/* 800A8880 000A57C0  54 00 06 F9 */	rlwinm. r0, r0, 0, 0x1b, 0x1c
/* 800A8884 000A57C4  41 82 00 08 */	beq lbl_800A888C
/* 800A8888 000A57C8  4B FF E7 99 */	bl __GXCalculateVLim
lbl_800A888C:
/* 800A888C 000A57CC  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800A8890 000A57D0  38 00 00 00 */	li r0, 0
/* 800A8894 000A57D4  90 03 04 F4 */	stw r0, 0x4f4(r3)
/* 800A8898 000A57D8  80 01 00 0C */	lwz r0, 0xc(r1)
/* 800A889C 000A57DC  38 21 00 08 */	addi r1, r1, 8
/* 800A88A0 000A57E0  7C 08 03 A6 */	mtlr r0
/* 800A88A4 000A57E4  4E 80 00 20 */	blr 

.global GXBegin
GXBegin:
/* 800A88A8 000A57E8  7C 08 02 A6 */	mflr r0
/* 800A88AC 000A57EC  90 01 00 04 */	stw r0, 4(r1)
/* 800A88B0 000A57F0  94 21 FF D8 */	stwu r1, -0x28(r1)
/* 800A88B4 000A57F4  93 E1 00 24 */	stw r31, 0x24(r1)
/* 800A88B8 000A57F8  3B E5 00 00 */	addi r31, r5, 0
/* 800A88BC 000A57FC  93 C1 00 20 */	stw r30, 0x20(r1)
/* 800A88C0 000A5800  3B C4 00 00 */	addi r30, r4, 0
/* 800A88C4 000A5804  93 A1 00 1C */	stw r29, 0x1c(r1)
/* 800A88C8 000A5808  3B A3 00 00 */	addi r29, r3, 0
/* 800A88CC 000A580C  80 CD 82 C8 */	lwz r6, gx@sda21(r13)
/* 800A88D0 000A5810  80 06 04 F4 */	lwz r0, 0x4f4(r6)
/* 800A88D4 000A5814  28 00 00 00 */	cmplwi r0, 0
/* 800A88D8 000A5818  41 82 00 80 */	beq lbl_800A8958
/* 800A88DC 000A581C  54 00 07 FF */	clrlwi. r0, r0, 0x1f
/* 800A88E0 000A5820  41 82 00 08 */	beq lbl_800A88E8
/* 800A88E4 000A5824  48 00 26 99 */	bl __GXSetSUTexRegs
lbl_800A88E8:
/* 800A88E8 000A5828  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800A88EC 000A582C  80 03 04 F4 */	lwz r0, 0x4f4(r3)
/* 800A88F0 000A5830  54 00 07 BD */	rlwinm. r0, r0, 0, 0x1e, 0x1e
/* 800A88F4 000A5834  41 82 00 08 */	beq lbl_800A88FC
/* 800A88F8 000A5838  48 00 30 21 */	bl __GXUpdateBPMask
lbl_800A88FC:
/* 800A88FC 000A583C  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800A8900 000A5840  80 03 04 F4 */	lwz r0, 0x4f4(r3)
/* 800A8904 000A5844  54 00 07 7B */	rlwinm. r0, r0, 0, 0x1d, 0x1d
/* 800A8908 000A5848  41 82 00 08 */	beq lbl_800A8910
/* 800A890C 000A584C  48 00 02 B9 */	bl __GXSetGenMode
lbl_800A8910:
/* 800A8910 000A5850  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800A8914 000A5854  80 03 04 F4 */	lwz r0, 0x4f4(r3)
/* 800A8918 000A5858  54 00 07 39 */	rlwinm. r0, r0, 0, 0x1c, 0x1c
/* 800A891C 000A585C  41 82 00 08 */	beq lbl_800A8924
/* 800A8920 000A5860  4B FF E6 AD */	bl __GXSetVCD
lbl_800A8924:
/* 800A8924 000A5864  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800A8928 000A5868  80 03 04 F4 */	lwz r0, 0x4f4(r3)
/* 800A892C 000A586C  54 00 06 F7 */	rlwinm. r0, r0, 0, 0x1b, 0x1b
/* 800A8930 000A5870  41 82 00 08 */	beq lbl_800A8938
/* 800A8934 000A5874  4B FF F1 59 */	bl __GXSetVAT
lbl_800A8938:
/* 800A8938 000A5878  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800A893C 000A587C  80 03 04 F4 */	lwz r0, 0x4f4(r3)
/* 800A8940 000A5880  54 00 06 F9 */	rlwinm. r0, r0, 0, 0x1b, 0x1c
/* 800A8944 000A5884  41 82 00 08 */	beq lbl_800A894C
/* 800A8948 000A5888  4B FF E6 D9 */	bl __GXCalculateVLim
lbl_800A894C:
/* 800A894C 000A588C  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800A8950 000A5890  38 00 00 00 */	li r0, 0
/* 800A8954 000A5894  90 03 04 F4 */	stw r0, 0x4f4(r3)
lbl_800A8958:
/* 800A8958 000A5898  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800A895C 000A589C  80 03 00 00 */	lwz r0, 0(r3)
/* 800A8960 000A58A0  28 00 00 00 */	cmplwi r0, 0
/* 800A8964 000A58A4  40 82 00 08 */	bne lbl_800A896C
/* 800A8968 000A58A8  48 00 00 31 */	bl __GXSendFlushPrim
lbl_800A896C:
/* 800A896C 000A58AC  7F C0 EB 78 */	or r0, r30, r29
/* 800A8970 000A58B0  3C 60 CC 01 */	lis r3, 0xCC008000@ha
/* 800A8974 000A58B4  98 03 80 00 */	stb r0, 0xCC008000@l(r3)
/* 800A8978 000A58B8  B3 E3 80 00 */	sth r31, -0x8000(r3)
/* 800A897C 000A58BC  80 01 00 2C */	lwz r0, 0x2c(r1)
/* 800A8980 000A58C0  83 E1 00 24 */	lwz r31, 0x24(r1)
/* 800A8984 000A58C4  83 C1 00 20 */	lwz r30, 0x20(r1)
/* 800A8988 000A58C8  83 A1 00 1C */	lwz r29, 0x1c(r1)
/* 800A898C 000A58CC  38 21 00 28 */	addi r1, r1, 0x28
/* 800A8990 000A58D0  7C 08 03 A6 */	mtlr r0
/* 800A8994 000A58D4  4E 80 00 20 */	blr 

.global __GXSendFlushPrim
__GXSendFlushPrim:
/* 800A8998 000A58D8  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800A899C 000A58DC  38 00 00 98 */	li r0, 0x98
/* 800A89A0 000A58E0  3C A0 CC 01 */	lis r5, 0xCC008000@ha
/* 800A89A4 000A58E4  A0 C3 00 04 */	lhz r6, 4(r3)
/* 800A89A8 000A58E8  38 80 00 00 */	li r4, 0
/* 800A89AC 000A58EC  A0 63 00 06 */	lhz r3, 6(r3)
/* 800A89B0 000A58F0  7C E6 19 D6 */	mullw r7, r6, r3
/* 800A89B4 000A58F4  98 05 80 00 */	stb r0, 0xCC008000@l(r5)
/* 800A89B8 000A58F8  B0 C5 80 00 */	sth r6, -0x8000(r5)
/* 800A89BC 000A58FC  38 67 00 03 */	addi r3, r7, 3
/* 800A89C0 000A5900  28 07 00 00 */	cmplwi r7, 0
/* 800A89C4 000A5904  54 63 F0 BE */	srwi r3, r3, 2
/* 800A89C8 000A5908  40 81 00 48 */	ble lbl_800A8A10
/* 800A89CC 000A590C  54 60 E8 FF */	rlwinm. r0, r3, 0x1d, 3, 0x1f
/* 800A89D0 000A5910  7C 09 03 A6 */	mtctr r0
/* 800A89D4 000A5914  41 82 00 30 */	beq lbl_800A8A04
lbl_800A89D8:
/* 800A89D8 000A5918  90 85 80 00 */	stw r4, -0x8000(r5)
/* 800A89DC 000A591C  90 85 80 00 */	stw r4, -0x8000(r5)
/* 800A89E0 000A5920  90 85 80 00 */	stw r4, -0x8000(r5)
/* 800A89E4 000A5924  90 85 80 00 */	stw r4, -0x8000(r5)
/* 800A89E8 000A5928  90 85 80 00 */	stw r4, -0x8000(r5)
/* 800A89EC 000A592C  90 85 80 00 */	stw r4, -0x8000(r5)
/* 800A89F0 000A5930  90 85 80 00 */	stw r4, -0x8000(r5)
/* 800A89F4 000A5934  90 85 80 00 */	stw r4, -0x8000(r5)
/* 800A89F8 000A5938  42 00 FF E0 */	bdnz lbl_800A89D8
/* 800A89FC 000A593C  70 63 00 07 */	andi. r3, r3, 7
/* 800A8A00 000A5940  41 82 00 10 */	beq lbl_800A8A10
lbl_800A8A04:
/* 800A8A04 000A5944  7C 69 03 A6 */	mtctr r3
lbl_800A8A08:
/* 800A8A08 000A5948  90 85 80 00 */	stw r4, -0x8000(r5)
/* 800A8A0C 000A594C  42 00 FF FC */	bdnz lbl_800A8A08
lbl_800A8A10:
/* 800A8A10 000A5950  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800A8A14 000A5954  38 00 00 01 */	li r0, 1
/* 800A8A18 000A5958  B0 03 00 02 */	sth r0, 2(r3)
/* 800A8A1C 000A595C  4E 80 00 20 */	blr 

.global GXSetLineWidth
GXSetLineWidth:
/* 800A8A20 000A5960  80 AD 82 C8 */	lwz r5, gx@sda21(r13)
/* 800A8A24 000A5964  54 86 80 1E */	slwi r6, r4, 0x10
/* 800A8A28 000A5968  38 80 00 61 */	li r4, 0x61
/* 800A8A2C 000A596C  80 05 00 7C */	lwz r0, 0x7c(r5)
/* 800A8A30 000A5970  38 E5 00 7C */	addi r7, r5, 0x7c
/* 800A8A34 000A5974  3C A0 CC 01 */	lis r5, 0xCC008000@ha
/* 800A8A38 000A5978  54 00 00 2E */	rlwinm r0, r0, 0, 0, 0x17
/* 800A8A3C 000A597C  50 60 06 3E */	rlwimi r0, r3, 0, 0x18, 0x1f
/* 800A8A40 000A5980  90 07 00 00 */	stw r0, 0(r7)
/* 800A8A44 000A5984  38 00 00 00 */	li r0, 0
/* 800A8A48 000A5988  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800A8A4C 000A598C  38 E3 00 7C */	addi r7, r3, 0x7c
/* 800A8A50 000A5990  80 63 00 7C */	lwz r3, 0x7c(r3)
/* 800A8A54 000A5994  54 63 04 18 */	rlwinm r3, r3, 0, 0x10, 0xc
/* 800A8A58 000A5998  7C 63 33 78 */	or r3, r3, r6
/* 800A8A5C 000A599C  90 67 00 00 */	stw r3, 0(r7)
/* 800A8A60 000A59A0  98 85 80 00 */	stb r4, 0xCC008000@l(r5)
/* 800A8A64 000A59A4  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800A8A68 000A59A8  80 64 00 7C */	lwz r3, 0x7c(r4)
/* 800A8A6C 000A59AC  90 65 80 00 */	stw r3, -0x8000(r5)
/* 800A8A70 000A59B0  B0 04 00 02 */	sth r0, 2(r4)
/* 800A8A74 000A59B4  4E 80 00 20 */	blr 

.global GXSetPointSize
GXSetPointSize:
/* 800A8A78 000A59B8  80 AD 82 C8 */	lwz r5, gx@sda21(r13)
/* 800A8A7C 000A59BC  54 86 98 18 */	slwi r6, r4, 0x13
/* 800A8A80 000A59C0  84 05 00 7C */	lwzu r0, 0x7c(r5)
/* 800A8A84 000A59C4  38 80 00 61 */	li r4, 0x61
/* 800A8A88 000A59C8  54 00 06 1E */	rlwinm r0, r0, 0, 0x18, 0xf
/* 800A8A8C 000A59CC  50 60 44 2E */	rlwimi r0, r3, 8, 0x10, 0x17
/* 800A8A90 000A59D0  90 05 00 00 */	stw r0, 0(r5)
/* 800A8A94 000A59D4  3C A0 CC 01 */	lis r5, 0xCC008000@ha
/* 800A8A98 000A59D8  38 00 00 00 */	li r0, 0
/* 800A8A9C 000A59DC  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800A8AA0 000A59E0  38 E3 00 7C */	addi r7, r3, 0x7c
/* 800A8AA4 000A59E4  80 63 00 7C */	lwz r3, 0x7c(r3)
/* 800A8AA8 000A59E8  54 63 03 52 */	rlwinm r3, r3, 0, 0xd, 9
/* 800A8AAC 000A59EC  7C 63 33 78 */	or r3, r3, r6
/* 800A8AB0 000A59F0  90 67 00 00 */	stw r3, 0(r7)
/* 800A8AB4 000A59F4  98 85 80 00 */	stb r4, 0xCC008000@l(r5)
/* 800A8AB8 000A59F8  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800A8ABC 000A59FC  80 64 00 7C */	lwz r3, 0x7c(r4)
/* 800A8AC0 000A5A00  90 65 80 00 */	stw r3, -0x8000(r5)
/* 800A8AC4 000A5A04  B0 04 00 02 */	sth r0, 2(r4)
/* 800A8AC8 000A5A08  4E 80 00 20 */	blr 

.global GXEnableTexOffsets
GXEnableTexOffsets:
/* 800A8ACC 000A5A0C  80 0D 82 C8 */	lwz r0, gx@sda21(r13)
/* 800A8AD0 000A5A10  54 67 10 3A */	slwi r7, r3, 2
/* 800A8AD4 000A5A14  7C C0 3A 14 */	add r6, r0, r7
/* 800A8AD8 000A5A18  80 66 00 B8 */	lwz r3, 0xb8(r6)
/* 800A8ADC 000A5A1C  54 80 91 9A */	rlwinm r0, r4, 0x12, 6, 0xd
/* 800A8AE0 000A5A20  54 A4 99 58 */	rlwinm r4, r5, 0x13, 5, 0xc
/* 800A8AE4 000A5A24  54 63 03 98 */	rlwinm r3, r3, 0, 0xe, 0xc
/* 800A8AE8 000A5A28  7C 60 03 78 */	or r0, r3, r0
/* 800A8AEC 000A5A2C  90 06 00 B8 */	stw r0, 0xb8(r6)
/* 800A8AF0 000A5A30  38 60 00 61 */	li r3, 0x61
/* 800A8AF4 000A5A34  3C A0 CC 01 */	lis r5, 0xCC008000@ha
/* 800A8AF8 000A5A38  80 CD 82 C8 */	lwz r6, gx@sda21(r13)
/* 800A8AFC 000A5A3C  38 00 00 00 */	li r0, 0
/* 800A8B00 000A5A40  7D 06 3A 14 */	add r8, r6, r7
/* 800A8B04 000A5A44  80 C8 00 B8 */	lwz r6, 0xb8(r8)
/* 800A8B08 000A5A48  54 C6 03 56 */	rlwinm r6, r6, 0, 0xd, 0xb
/* 800A8B0C 000A5A4C  7C C4 23 78 */	or r4, r6, r4
/* 800A8B10 000A5A50  90 88 00 B8 */	stw r4, 0xb8(r8)
/* 800A8B14 000A5A54  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800A8B18 000A5A58  98 65 80 00 */	stb r3, 0xCC008000@l(r5)
/* 800A8B1C 000A5A5C  7C 64 3A 14 */	add r3, r4, r7
/* 800A8B20 000A5A60  80 63 00 B8 */	lwz r3, 0xb8(r3)
/* 800A8B24 000A5A64  90 65 80 00 */	stw r3, -0x8000(r5)
/* 800A8B28 000A5A68  B0 04 00 02 */	sth r0, 2(r4)
/* 800A8B2C 000A5A6C  4E 80 00 20 */	blr 

.global GXSetCullMode
GXSetCullMode:
/* 800A8B30 000A5A70  2C 03 00 02 */	cmpwi r3, 2
/* 800A8B34 000A5A74  41 82 00 1C */	beq lbl_800A8B50
/* 800A8B38 000A5A78  40 80 00 1C */	bge lbl_800A8B54
/* 800A8B3C 000A5A7C  2C 03 00 01 */	cmpwi r3, 1
/* 800A8B40 000A5A80  40 80 00 08 */	bge lbl_800A8B48
/* 800A8B44 000A5A84  48 00 00 10 */	b lbl_800A8B54
lbl_800A8B48:
/* 800A8B48 000A5A88  38 60 00 02 */	li r3, 2
/* 800A8B4C 000A5A8C  48 00 00 08 */	b lbl_800A8B54
lbl_800A8B50:
/* 800A8B50 000A5A90  38 60 00 01 */	li r3, 1
lbl_800A8B54:
/* 800A8B54 000A5A94  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800A8B58 000A5A98  54 60 70 22 */	slwi r0, r3, 0xe
/* 800A8B5C 000A5A9C  84 64 02 04 */	lwzu r3, 0x204(r4)
/* 800A8B60 000A5AA0  54 63 04 9E */	rlwinm r3, r3, 0, 0x12, 0xf
/* 800A8B64 000A5AA4  7C 60 03 78 */	or r0, r3, r0
/* 800A8B68 000A5AA8  90 04 00 00 */	stw r0, 0(r4)
/* 800A8B6C 000A5AAC  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800A8B70 000A5AB0  80 03 04 F4 */	lwz r0, 0x4f4(r3)
/* 800A8B74 000A5AB4  60 00 00 04 */	ori r0, r0, 4
/* 800A8B78 000A5AB8  90 03 04 F4 */	stw r0, 0x4f4(r3)
/* 800A8B7C 000A5ABC  4E 80 00 20 */	blr 

.global GXSetCoPlanar
GXSetCoPlanar:
/* 800A8B80 000A5AC0  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800A8B84 000A5AC4  54 60 99 58 */	rlwinm r0, r3, 0x13, 5, 0xc
/* 800A8B88 000A5AC8  38 A0 00 61 */	li r5, 0x61
/* 800A8B8C 000A5ACC  80 64 02 04 */	lwz r3, 0x204(r4)
/* 800A8B90 000A5AD0  38 C4 02 04 */	addi r6, r4, 0x204
/* 800A8B94 000A5AD4  3C 80 CC 01 */	lis r4, 0xCC008000@ha
/* 800A8B98 000A5AD8  54 63 03 56 */	rlwinm r3, r3, 0, 0xd, 0xb
/* 800A8B9C 000A5ADC  7C 60 03 78 */	or r0, r3, r0
/* 800A8BA0 000A5AE0  90 06 00 00 */	stw r0, 0(r6)
/* 800A8BA4 000A5AE4  3C 00 FE 08 */	lis r0, 0xfe08
/* 800A8BA8 000A5AE8  98 A4 80 00 */	stb r5, 0xCC008000@l(r4)
/* 800A8BAC 000A5AEC  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800A8BB0 000A5AF0  90 04 80 00 */	stw r0, -0x8000(r4)
/* 800A8BB4 000A5AF4  98 A4 80 00 */	stb r5, -0x8000(r4)
/* 800A8BB8 000A5AF8  80 03 02 04 */	lwz r0, 0x204(r3)
/* 800A8BBC 000A5AFC  90 04 80 00 */	stw r0, -0x8000(r4)
/* 800A8BC0 000A5B00  4E 80 00 20 */	blr 

.global __GXSetGenMode
__GXSetGenMode:
/* 800A8BC4 000A5B04  38 00 00 61 */	li r0, 0x61
/* 800A8BC8 000A5B08  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800A8BCC 000A5B0C  3C A0 CC 01 */	lis r5, 0xCC008000@ha
/* 800A8BD0 000A5B10  98 05 80 00 */	stb r0, 0xCC008000@l(r5)
/* 800A8BD4 000A5B14  38 00 00 00 */	li r0, 0
/* 800A8BD8 000A5B18  80 64 02 04 */	lwz r3, 0x204(r4)
/* 800A8BDC 000A5B1C  90 65 80 00 */	stw r3, -0x8000(r5)
/* 800A8BE0 000A5B20  B0 04 00 02 */	sth r0, 2(r4)
/* 800A8BE4 000A5B24  4E 80 00 20 */	blr