.include "macros.inc"
.section .text, "ax"
.global GXSetDispCopySrc
GXSetDispCopySrc:
lwz r7, gx@sda21(r13)
li r8, 0
rlwinm r4, r4, 0xa, 6, 0x15
stw r8, 0x1e0(r7)
clrlwi r7, r5, 0x10
clrlwi r5, r6, 0x10
lwz r6, gx@sda21(r13)
addi r0, r5, -1
clrlwi r5, r3, 0x10
addi r9, r6, 0x1e0
lwz r6, 0x1e0(r6)
addi r3, r7, -1
rlwinm r6, r6, 0, 0, 0x15
or r5, r6, r5
stw r5, 0(r9)
slwi r0, r0, 0xa
lwz r5, gx@sda21(r13)
addi r6, r5, 0x1e0
lwz r5, 0x1e0(r5)
rlwinm r5, r5, 0, 0x16, 0xb
or r4, r5, r4
stw r4, 0(r6)
lwz r4, gx@sda21(r13)
addi r5, r4, 0x1e0
lwz r4, 0x1e0(r4)
clrlwi r4, r4, 8
oris r4, r4, 0x4900
stw r4, 0(r5)
lwz r4, gx@sda21(r13)
stw r8, 0x1e4(r4)
lwz r4, gx@sda21(r13)
addi r5, r4, 0x1e4
lwz r4, 0x1e4(r4)
rlwinm r4, r4, 0, 0, 0x15
or r3, r4, r3
stw r3, 0(r5)
lwz r3, gx@sda21(r13)
addi r4, r3, 0x1e4
lwz r3, 0x1e4(r3)
rlwinm r3, r3, 0, 0x16, 0xb
or r0, r3, r0
stw r0, 0(r4)
lwz r3, gx@sda21(r13)
lwzu r0, 0x1e4(r3)
clrlwi r0, r0, 8
oris r0, r0, 0x4a00
stw r0, 0(r3)
blr
.global GXSetTexCopySrc
GXSetTexCopySrc:
lwz r7, gx@sda21(r13)
li r8, 0
rlwinm r4, r4, 0xa, 6, 0x15
stw r8, 0x1f0(r7)
clrlwi r7, r5, 0x10
clrlwi r5, r6, 0x10
lwz r6, gx@sda21(r13)
addi r0, r5, -1
clrlwi r5, r3, 0x10
addi r9, r6, 0x1f0
lwz r6, 0x1f0(r6)
addi r3, r7, -1
rlwinm r6, r6, 0, 0, 0x15
or r5, r6, r5
stw r5, 0(r9)
slwi r0, r0, 0xa
lwz r5, gx@sda21(r13)
addi r6, r5, 0x1f0
lwz r5, 0x1f0(r5)
rlwinm r5, r5, 0, 0x16, 0xb
or r4, r5, r4
stw r4, 0(r6)
lwz r4, gx@sda21(r13)
addi r5, r4, 0x1f0
lwz r4, 0x1f0(r4)
clrlwi r4, r4, 8
oris r4, r4, 0x4900
stw r4, 0(r5)
lwz r4, gx@sda21(r13)
stw r8, 0x1f4(r4)
lwz r4, gx@sda21(r13)
addi r5, r4, 0x1f4
lwz r4, 0x1f4(r4)
rlwinm r4, r4, 0, 0, 0x15
or r3, r4, r3
stw r3, 0(r5)
lwz r3, gx@sda21(r13)
addi r4, r3, 0x1f4
lwz r3, 0x1f4(r3)
rlwinm r3, r3, 0, 0x16, 0xb
or r0, r3, r0
stw r0, 0(r4)
lwz r3, gx@sda21(r13)
lwzu r0, 0x1f4(r3)
clrlwi r0, r0, 8
oris r0, r0, 0x4a00
stw r0, 0(r3)
blr
.global GXSetDispCopyDst
GXSetDispCopyDst:
lwz r4, gx@sda21(r13)
li r0, 0
stw r0, 0x1e8(r4)
rlwinm r0, r3, 1, 0x10, 0x1e
srawi r0, r0, 5
lwz r3, gx@sda21(r13)
addi r4, r3, 0x1e8
lwz r3, 0x1e8(r3)
rlwinm r3, r3, 0, 0, 0x15
or r0, r3, r0
stw r0, 0(r4)
lwz r3, gx@sda21(r13)
lwzu r0, 0x1e8(r3)
clrlwi r0, r0, 8
oris r0, r0, 0x4d00
stw r0, 0(r3)
blr
.global GXSetTexCopyDst
GXSetTexCopyDst:
mflr r0
cmpwi r5, 0x13
stw r0, 4(r1)
li r0, 0
addi r8, r3, 0
stwu r1, -0x30(r1)
stw r31, 0x2c(r1)
clrlwi r31, r5, 0x1c
stw r30, 0x28(r1)
addi r30, r6, 0
lwz r7, gx@sda21(r13)
stb r0, 0x200(r7)
addi r7, r4, 0
bne lbl_800A8DE8
li r31, 0xb
lbl_800A8DE8:
cmpwi r5, 0x26
beq lbl_800A8E08
bge lbl_800A8E24
cmpwi r5, 4
bge lbl_800A8E24
cmpwi r5, 0
bge lbl_800A8E08
b lbl_800A8E24
lbl_800A8E08:
lwz r3, gx@sda21(r13)
lwzu r0, 0x1fc(r3)
rlwinm r0, r0, 0, 0x11, 0xe
oris r0, r0, 1
ori r0, r0, 0x8000
stw r0, 0(r3)
b lbl_800A8E38
lbl_800A8E24:
lwz r3, gx@sda21(r13)
lwzu r0, 0x1fc(r3)
rlwinm r0, r0, 0, 0x11, 0xe
oris r0, r0, 1
stw r0, 0(r3)
lbl_800A8E38:
rlwinm r4, r5, 0, 0x1b, 0x1b
lwz r3, gx@sda21(r13)
addi r0, r4, -16
cntlzw r0, r0
rlwinm r0, r0, 0x1b, 0x18, 0x1f
stb r0, 0x200(r3)
addi r3, r5, 0
addi r5, r7, 0
lwz r4, gx@sda21(r13)
addi r7, r1, 0x1c
lwz r0, 0x1fc(r4)
addi r6, r4, 0x1fc
addi r4, r8, 0
rlwinm r0, r0, 0, 0x1d, 0x1b
rlwimi r0, r31, 0, 0x1c, 0x1c
stw r0, 0(r6)
clrlwi r31, r31, 0x1d
addi r6, r1, 0x20
addi r8, r1, 0x18
bl __GetImageTileCount
lwz r3, gx@sda21(r13)
li r0, 0
stw r0, 0x1f8(r3)
rlwinm r3, r30, 9, 0xf, 0x16
slwi r0, r31, 4
lwz r5, 0x20(r1)
lwz r4, 0x18(r1)
lwz r6, gx@sda21(r13)
mullw r4, r5, r4
lwzu r5, 0x1f8(r6)
rlwinm r5, r5, 0, 0, 0x15
or r4, r5, r4
stw r4, 0(r6)
lwz r4, gx@sda21(r13)
addi r5, r4, 0x1f8
lwz r4, 0x1f8(r4)
clrlwi r4, r4, 8
oris r4, r4, 0x4d00
stw r4, 0(r5)
lwz r4, gx@sda21(r13)
addi r5, r4, 0x1fc
lwz r4, 0x1fc(r4)
rlwinm r4, r4, 0, 0x17, 0x15
or r3, r4, r3
stw r3, 0(r5)
lwz r3, gx@sda21(r13)
addi r4, r3, 0x1fc
lwz r3, 0x1fc(r3)
rlwinm r3, r3, 0, 0x1c, 0x18
or r0, r3, r0
stw r0, 0(r4)
lwz r0, 0x34(r1)
lwz r31, 0x2c(r1)
lwz r30, 0x28(r1)
addi r1, r1, 0x30
mtlr r0
blr
.global GXSetDispCopyFrame2Field
GXSetDispCopyFrame2Field:
lwz r4, gx@sda21(r13)
slwi r0, r3, 0xc
lwzu r3, 0x1ec(r4)
rlwinm r3, r3, 0, 0x14, 0x11
or r0, r3, r0
stw r0, 0(r4)
lwz r3, gx@sda21(r13)
lwzu r0, 0x1fc(r3)
rlwinm r0, r0, 0, 0x14, 0x11
stw r0, 0(r3)
blr
.global GXSetCopyClamp
GXSetCopyClamp:
lwz r5, gx@sda21(r13)
clrlwi r4, r3, 0x1f
addi r0, r4, -1
lwz r4, 0x1ec(r5)
addi r6, r5, 0x1ec
cntlzw r0, r0
rlwinm r5, r4, 0, 0, 0x1e
rlwinm r4, r0, 0x1b, 0x18, 0x1f
or r0, r5, r4
stw r0, 0(r6)
rlwinm r3, r3, 0, 0x1e, 0x1e
addi r0, r3, -2
lwz r3, gx@sda21(r13)
cntlzw r0, r0
rlwinm r6, r0, 0x1c, 0x17, 0x1e
addi r5, r3, 0x1ec
lwz r3, 0x1ec(r3)
rlwinm r0, r3, 0, 0x1f, 0x1d
or r0, r0, r6
stw r0, 0(r5)
lwz r3, gx@sda21(r13)
lwzu r0, 0x1fc(r3)
rlwinm r0, r0, 0, 0, 0x1e
or r0, r0, r4
stw r0, 0(r3)
lwz r3, gx@sda21(r13)
lwzu r0, 0x1fc(r3)
rlwinm r0, r0, 0, 0x1f, 0x1d
or r0, r0, r6
stw r0, 0(r3)
blr
.global GXGetNumXfbLines
GXGetNumXfbLines:
mflr r0
stw r0, 4(r1)
stwu r1, -0x20(r1)
stw r31, 0x1c(r1)
mr r31, r3
lfs f0, "@83"@sda21(r2)
fdivs f1, f0, f1
bl __cvt_fp2unsigned
clrlwi r5, r31, 0x10
addi r0, r5, -1
clrlwi r4, r3, 0x17
slwi r0, r0, 8
divwu r3, r0, r4
cmplwi r4, 0x80
addi r3, r3, 1
ble lbl_800A9030
cmplwi r4, 0x100
bge lbl_800A9030
b lbl_800A9014
lbl_800A9010:
srwi r4, r4, 1
lbl_800A9014:
clrlwi. r0, r4, 0x1f
beq lbl_800A9010
divwu r0, r5, r4
mullw r0, r0, r4
subf. r0, r0, r5
bne lbl_800A9030
addi r3, r3, 1
lbl_800A9030:
cmplwi r3, 0x400
ble lbl_800A903C
li r3, 0x400
lbl_800A903C:
lwz r0, 0x24(r1)
clrlwi r3, r3, 0x10
lwz r31, 0x1c(r1)
addi r1, r1, 0x20
mtlr r0
blr
.global GXGetYScaleFactor
GXGetYScaleFactor:
mflr r0
stw r0, 4(r1)
lis r0, 0x4330
stwu r1, -0x78(r1)
stfd f31, 0x70(r1)
stfd f30, 0x68(r1)
stfd f29, 0x60(r1)
stfd f28, 0x58(r1)
stmw r25, 0x3c(r1)
clrlwi r28, r4, 0x10
clrlwi r31, r3, 0x10
stw r28, 0x34(r1)
mr r27, r3
mr r25, r4
stw r31, 0x2c(r1)
stw r0, 0x30(r1)
stw r0, 0x28(r1)
lfd f3, "@138"@sda21(r2)
lfd f2, 0x30(r1)
lfd f1, 0x28(r1)
fsubs f2, f2, f3
lfs f0, "@83"@sda21(r2)
fsubs f1, f1, f3
fdivs f2, f2, f1
fdivs f1, f0, f2
fmr f28, f2
bl __cvt_fp2unsigned
addi r0, r31, -1
clrlwi r4, r3, 0x17
slwi r30, r0, 8
divwu r3, r30, r4
cmplwi r4, 0x80
addi r3, r3, 1
ble lbl_800A9108
cmplwi r4, 0x100
bge lbl_800A9108
b lbl_800A90EC
lbl_800A90E8:
srwi r4, r4, 1
lbl_800A90EC:
clrlwi. r0, r4, 0x1f
beq lbl_800A90E8
divwu r0, r31, r4
mullw r0, r0, r4
subf. r0, r0, r31
bne lbl_800A9108
addi r3, r3, 1
lbl_800A9108:
cmplwi r3, 0x400
ble lbl_800A9114
li r3, 0x400
lbl_800A9114:
lfd f31, "@138"@sda21(r2)
mr r0, r3
lfs f30, "@83"@sda21(r2)
clrlwi r29, r25, 0x10
clrlwi r26, r27, 0x10
lis r25, 0x4330
b lbl_800A91B4
lbl_800A9130:
addi r28, r28, -1
stw r26, 0x34(r1)
stw r28, 0x2c(r1)
stw r25, 0x28(r1)
stw r25, 0x30(r1)
lfd f1, 0x28(r1)
lfd f0, 0x30(r1)
fsubs f1, f1, f31
fsubs f0, f0, f31
fdivs f0, f1, f0
fdivs f1, f30, f0
fmr f28, f0
bl __cvt_fp2unsigned
clrlwi r4, r3, 0x17
divwu r3, r30, r4
cmplwi r4, 0x80
addi r3, r3, 1
ble lbl_800A91A4
cmplwi r4, 0x100
bge lbl_800A91A4
b lbl_800A9188
lbl_800A9184:
srwi r4, r4, 1
lbl_800A9188:
clrlwi. r0, r4, 0x1f
beq lbl_800A9184
divwu r0, r31, r4
mullw r0, r0, r4
subf. r0, r0, r31
bne lbl_800A91A4
addi r3, r3, 1
lbl_800A91A4:
cmplwi r3, 0x400
ble lbl_800A91B0
li r3, 0x400
lbl_800A91B0:
mr r0, r3
lbl_800A91B4:
cmplw r0, r29
bgt lbl_800A9130
fmr f29, f28
lfd f30, "@138"@sda21(r2)
lfs f31, "@83"@sda21(r2)
clrlwi r27, r27, 0x10
lis r26, 0x4330
b lbl_800A925C
lbl_800A91D4:
addi r28, r28, 1
stw r27, 0x34(r1)
fmr f29, f28
stw r28, 0x2c(r1)
stw r26, 0x28(r1)
stw r26, 0x30(r1)
lfd f1, 0x28(r1)
lfd f0, 0x30(r1)
fsubs f1, f1, f30
fsubs f0, f0, f30
fdivs f0, f1, f0
fdivs f1, f31, f0
fmr f28, f0
bl __cvt_fp2unsigned
clrlwi r4, r3, 0x17
divwu r3, r30, r4
cmplwi r4, 0x80
addi r3, r3, 1
ble lbl_800A924C
cmplwi r4, 0x100
bge lbl_800A924C
b lbl_800A9230
lbl_800A922C:
srwi r4, r4, 1
lbl_800A9230:
clrlwi. r0, r4, 0x1f
beq lbl_800A922C
divwu r0, r31, r4
mullw r0, r0, r4
subf. r0, r0, r31
bne lbl_800A924C
addi r3, r3, 1
lbl_800A924C:
cmplwi r3, 0x400
ble lbl_800A9258
li r3, 0x400
lbl_800A9258:
mr r0, r3
lbl_800A925C:
cmplw r0, r29
blt lbl_800A91D4
lmw r25, 0x3c(r1)
fmr f1, f29
lwz r0, 0x7c(r1)
lfd f31, 0x70(r1)
lfd f30, 0x68(r1)
lfd f29, 0x60(r1)
lfd f28, 0x58(r1)
addi r1, r1, 0x78
mtlr r0
blr
.global GXSetDispCopyYScale
GXSetDispCopyYScale:
mflr r0
stw r0, 4(r1)
stwu r1, -8(r1)
lfs f0, "@83"@sda21(r2)
fdivs f1, f0, f1
bl __cvt_fp2unsigned
clrlwi r6, r3, 0x17
lwz r4, gx@sda21(r13)
li r0, 0x61
lis r3, 0xCC008000@ha
stb r0, 0xCC008000@l(r3)
oris r0, r6, 0x4e00
li r5, 0
stw r0, -0x8000(r3)
subfic r3, r6, 0x100
addic r0, r3, -1
sth r5, 2(r4)
subfe r0, r0, r3
rlwinm r0, r0, 0xa, 0xe, 0x15
lwz r3, gx@sda21(r13)
cmplwi r6, 0x80
addi r4, r6, 0
addi r5, r3, 0x1ec
lwz r3, 0x1ec(r3)
rlwinm r3, r3, 0, 0x16, 0x14
or r0, r3, r0
stw r0, 0(r5)
lwz r3, gx@sda21(r13)
lwz r0, 0x1e4(r3)
rlwinm r5, r0, 0x16, 0x16, 0x1f
rlwinm r0, r0, 0x1e, 0xe, 0x17
divwu r3, r0, r6
addi r5, r5, 1
addi r3, r3, 1
ble lbl_800A9344
cmplwi r6, 0x100
bge lbl_800A9344
b lbl_800A9328
lbl_800A9324:
srwi r4, r4, 1
lbl_800A9328:
clrlwi. r0, r4, 0x1f
beq lbl_800A9324
divwu r0, r5, r4
mullw r0, r0, r4
subf. r0, r0, r5
bne lbl_800A9344
addi r3, r3, 1
lbl_800A9344:
cmplwi r3, 0x400
ble lbl_800A9350
li r3, 0x400
lbl_800A9350:
lwz r0, 0xc(r1)
addi r1, r1, 8
mtlr r0
blr
.global GXSetCopyClear
GXSetCopyClear:
clrlwi r0, r4, 8
lbz r4, 3(r3)
lbz r5, 0(r3)
li r6, 0x61
slwi r7, r4, 8
lwz r4, gx@sda21(r13)
rlwimi r7, r5, 0, 0x18, 0x1f
lis r5, 0xCC008000@ha
clrlwi r7, r7, 8
stb r6, 0xCC008000@l(r5)
oris r7, r7, 0x4f00
stw r7, -0x8000(r5)
oris r7, r0, 0x5100
li r0, 0
lbz r8, 2(r3)
lbz r3, 1(r3)
slwi r3, r3, 8
stb r6, -0x8000(r5)
rlwimi r3, r8, 0, 0x18, 0x1f
clrlwi r3, r3, 8
oris r3, r3, 0x5000
stw r3, -0x8000(r5)
stb r6, -0x8000(r5)
stw r7, -0x8000(r5)
sth r0, 2(r4)
blr
.global GXSetCopyFilter
GXSetCopyFilter:
stwu r1, -0x50(r1)
clrlwi. r0, r3, 0x18
stmw r23, 0x2c(r1)
beq lbl_800A94FC
lbz r0, 1(r4)
lbz r3, 7(r4)
slwi r30, r0, 4
lbz r8, 0(r4)
lbz r0, 0x13(r4)
slwi r25, r3, 4
lbz r10, 6(r4)
rlwimi r30, r8, 0, 0x1c, 0x1f
lbz r11, 2(r4)
lbz r7, 0xd(r4)
rlwimi r25, r10, 0, 0x1c, 0x1f
slwi r27, r11, 8
lbz r9, 8(r4)
lbz r3, 0xe(r4)
slwi r26, r9, 8
lbz r28, 3(r4)
rlwimi r27, r30, 0, 0x18, 0x1f
lbz r9, 0x10(r4)
slwi r23, r7, 4
lbz r12, 0xc(r4)
lbz r7, 0x15(r4)
slwi r24, r3, 8
rlwimi r23, r12, 0, 0x1c, 0x1f
lbz r29, 0x12(r4)
slwi r0, r0, 4
rlwimi r0, r29, 0, 0x1c, 0x1f
lbz r8, 0x14(r4)
slwi r28, r28, 0xc
lbz r31, 9(r4)
rlwimi r28, r27, 0, 0x14, 0x1f
lbz r29, 4(r4)
rlwimi r24, r23, 0, 0x18, 0x1f
lbz r10, 0xf(r4)
slwi r23, r8, 8
lbz r12, 0xa(r4)
rlwimi r26, r25, 0, 0x18, 0x1f
lbz r3, 0x16(r4)
slwi r25, r10, 0xc
lbz r30, 5(r4)
rlwimi r23, r0, 0, 0x18, 0x1f
lbz r0, 0x17(r4)
slwi r27, r31, 0xc
lbz r11, 0xb(r4)
lbz r8, 0x11(r4)
slwi r4, r29, 0x10
slwi r7, r7, 0xc
slwi r10, r12, 0x10
rlwimi r27, r26, 0, 0x14, 0x1f
slwi r12, r3, 0x10
rlwimi r7, r23, 0, 0x14, 0x1f
rlwimi r4, r28, 0, 0x10, 0x1f
slwi r3, r30, 0x14
rlwimi r25, r24, 0, 0x14, 0x1f
slwi r9, r9, 0x10
rlwimi r10, r27, 0, 0x10, 0x1f
rlwimi r3, r4, 0, 0xc, 0x1f
rlwimi r12, r7, 0, 0x10, 0x1f
clrlwi r7, r3, 8
slwi r3, r11, 0x14
rlwimi r3, r10, 0, 0xc, 0x1f
clrlwi r4, r3, 8
slwi r3, r8, 0x14
rlwimi r9, r25, 0, 0x10, 0x1f
rlwimi r3, r9, 0, 0xc, 0x1f
slwi r0, r0, 0x14
rlwimi r0, r12, 0, 0xc, 0x1f
clrlwi r3, r3, 8
clrlwi r0, r0, 8
oris r8, r7, 0x100
oris r7, r4, 0x200
oris r9, r3, 0x300
oris r10, r0, 0x400
b lbl_800A951C
lbl_800A94FC:
lis r8, 0x01666666@ha
lis r7, 0x02666666@ha
lis r4, 0x03666666@ha
lis r3, 0x04666666@ha
addi r8, r8, 0x01666666@l
addi r7, r7, 0x02666666@l
addi r9, r4, 0x03666666@l
addi r10, r3, 0x04666666@l
lbl_800A951C:
li r4, 0x61
lis r3, 0xCC008000@ha
stb r4, 0xCC008000@l(r3)
clrlwi. r0, r5, 0x18
stw r8, -0x8000(r3)
stb r4, -0x8000(r3)
stw r7, -0x8000(r3)
stb r4, -0x8000(r3)
stw r9, -0x8000(r3)
stb r4, -0x8000(r3)
stw r10, -0x8000(r3)
beq lbl_800A95B0
lbz r0, 0(r6)
lbz r3, 1(r6)
oris r5, r0, 0x5300
lbz r0, 4(r6)
lbz r4, 2(r6)
rlwinm r7, r5, 0, 0x1a, 0x13
slwi r5, r3, 6
lbz r3, 5(r6)
or r7, r7, r5
oris r8, r0, 0x5400
lbz r5, 3(r6)
lbz r0, 6(r6)
rlwinm r6, r7, 0, 0x14, 0xd
slwi r4, r4, 0xc
or r6, r6, r4
rlwinm r4, r8, 0, 0x1a, 0x13
slwi r3, r3, 6
or r3, r4, r3
rlwinm r6, r6, 0, 0xe, 7
slwi r4, r5, 0x12
rlwinm r3, r3, 0, 0x14, 0xd
slwi r0, r0, 0xc
or r6, r6, r4
or r7, r3, r0
b lbl_800A95C0
lbl_800A95B0:
lis r4, 0x53595000@ha
lis r3, 0x54000015@ha
addi r6, r4, 0x53595000@l
addi r7, r3, 0x54000015@l
lbl_800A95C0:
li r5, 0x61
lwz r3, gx@sda21(r13)
lis r4, 0xCC008000@ha
stb r5, 0xCC008000@l(r4)
li r0, 0
stw r6, -0x8000(r4)
stb r5, -0x8000(r4)
stw r7, -0x8000(r4)
sth r0, 2(r3)
lmw r23, 0x2c(r1)
addi r1, r1, 0x50
blr
.global GXSetDispCopyGamma
GXSetDispCopyGamma:
lwz r4, gx@sda21(r13)
slwi r0, r3, 7
lwzu r3, 0x1ec(r4)
rlwinm r3, r3, 0, 0x19, 0x16
or r0, r3, r0
stw r0, 0(r4)
blr
.global GXCopyDisp
GXCopyDisp:
clrlwi. r0, r4, 0x18
beq lbl_800A964C
lwz r7, gx@sda21(r13)
li r0, 0x61
lis r5, 0xCC008000@ha
lwz r6, 0x1d8(r7)
rlwinm r6, r6, 0, 0, 0x1e
stb r0, 0xCC008000@l(r5)
ori r6, r6, 1
rlwinm r6, r6, 0, 0x1f, 0x1b
ori r6, r6, 0xe
stw r6, -0x8000(r5)
lwz r6, 0x1d0(r7)
stb r0, -0x8000(r5)
rlwinm r0, r6, 0, 0, 0x1d
stw r0, -0x8000(r5)
lbl_800A964C:
clrlwi. r0, r4, 0x18
li r0, 0
bne lbl_800A966C
lwz r5, gx@sda21(r13)
lwz r5, 0x1dc(r5)
clrlwi r5, r5, 0x1d
cmplwi r5, 3
bne lbl_800A9698
lbl_800A966C:
lwz r5, gx@sda21(r13)
lwz r7, 0x1dc(r5)
rlwinm r5, r7, 0x1a, 0x1f, 0x1f
cmplwi r5, 1
bne lbl_800A9698
li r0, 0x61
lis r6, 0xCC008000@ha
stb r0, 0xCC008000@l(r6)
rlwinm r5, r7, 0, 0x1a, 0x18
li r0, 1
stw r5, -0x8000(r6)
lbl_800A9698:
li r9, 0x61
lwz r7, gx@sda21(r13)
lis r8, 0xCC008000@ha
stb r9, 0xCC008000@l(r8)
rlwinm r3, r3, 0x1b, 8, 0x1f
oris r10, r3, 0x4b00
lwz r6, 0x1e0(r7)
clrlwi. r5, r4, 0x18
rlwinm r3, r4, 0xb, 0xd, 0x14
stw r6, -0x8000(r8)
stb r9, -0x8000(r8)
lwz r4, 0x1e4(r7)
stw r4, -0x8000(r8)
stb r9, -0x8000(r8)
lwz r4, 0x1e8(r7)
stw r4, -0x8000(r8)
stb r9, -0x8000(r8)
stw r10, -0x8000(r8)
lwz r4, 0x1ec(r7)
rlwinm r4, r4, 0, 0x15, 0x13
or r3, r4, r3
stw r3, 0x1ec(r7)
lwz r3, gx@sda21(r13)
addi r4, r3, 0x1ec
lwz r3, 0x1ec(r3)
rlwinm r3, r3, 0, 0x12, 0x10
ori r3, r3, 0x4000
stw r3, 0(r4)
lwz r3, gx@sda21(r13)
addi r4, r3, 0x1ec
lwz r3, 0x1ec(r3)
clrlwi r3, r3, 8
oris r3, r3, 0x5200
stw r3, 0(r4)
stb r9, -0x8000(r8)
lwz r4, gx@sda21(r13)
lwz r3, 0x1ec(r4)
stw r3, -0x8000(r8)
beq lbl_800A974C
stb r9, -0x8000(r8)
lwz r3, 0x1d8(r4)
stw r3, -0x8000(r8)
stb r9, -0x8000(r8)
lwz r3, 0x1d0(r4)
stw r3, -0x8000(r8)
lbl_800A974C:
clrlwi. r0, r0, 0x18
beq lbl_800A976C
li r0, 0x61
lwz r3, gx@sda21(r13)
lis r4, 0xCC008000@ha
stb r0, 0xCC008000@l(r4)
lwz r0, 0x1dc(r3)
stw r0, -0x8000(r4)
lbl_800A976C:
lwz r3, gx@sda21(r13)
li r0, 0
sth r0, 2(r3)
blr
.global GXCopyTex
GXCopyTex:
clrlwi. r0, r4, 0x18
beq lbl_800A97BC
lwz r7, gx@sda21(r13)
li r0, 0x61
lis r5, 0xCC008000@ha
lwz r6, 0x1d8(r7)
rlwinm r6, r6, 0, 0, 0x1e
stb r0, 0xCC008000@l(r5)
ori r6, r6, 1
rlwinm r6, r6, 0, 0x1f, 0x1b
ori r6, r6, 0xe
stw r6, -0x8000(r5)
lwz r6, 0x1d0(r7)
stb r0, -0x8000(r5)
rlwinm r0, r6, 0, 0, 0x1d
stw r0, -0x8000(r5)
lbl_800A97BC:
lwz r6, gx@sda21(r13)
li r0, 0
lbz r5, 0x200(r6)
lwz r7, 0x1dc(r6)
cmplwi r5, 0
beq lbl_800A97EC
clrlwi r5, r7, 0x1d
cmplwi r5, 3
beq lbl_800A97EC
rlwinm r0, r7, 0, 0, 0x1c
ori r7, r0, 3
li r0, 1
lbl_800A97EC:
clrlwi. r5, r4, 0x18
bne lbl_800A9800
clrlwi r5, r7, 0x1d
cmplwi r5, 3
bne lbl_800A9814
lbl_800A9800:
rlwinm r5, r7, 0x1a, 0x1f, 0x1f
cmplwi r5, 1
bne lbl_800A9814
li r0, 1
rlwinm r7, r7, 0, 0x1a, 0x18
lbl_800A9814:
clrlwi. r5, r0, 0x18
beq lbl_800A982C
li r6, 0x61
lis r5, 0xCC008000@ha
stb r6, 0xCC008000@l(r5)
stw r7, -0x8000(r5)
lbl_800A982C:
li r9, 0x61
lwz r7, gx@sda21(r13)
lis r8, 0xCC008000@ha
stb r9, 0xCC008000@l(r8)
rlwinm r3, r3, 0x1b, 8, 0x1f
oris r10, r3, 0x4b00
lwz r6, 0x1f0(r7)
clrlwi. r5, r4, 0x18
rlwinm r3, r4, 0xb, 0xd, 0x14
stw r6, -0x8000(r8)
stb r9, -0x8000(r8)
lwz r4, 0x1f4(r7)
stw r4, -0x8000(r8)
stb r9, -0x8000(r8)
lwz r4, 0x1f8(r7)
stw r4, -0x8000(r8)
stb r9, -0x8000(r8)
stw r10, -0x8000(r8)
lwz r4, 0x1fc(r7)
rlwinm r4, r4, 0, 0x15, 0x13
or r3, r4, r3
stw r3, 0x1fc(r7)
lwz r3, gx@sda21(r13)
addi r4, r3, 0x1fc
lwz r3, 0x1fc(r3)
rlwinm r3, r3, 0, 0x12, 0x10
stw r3, 0(r4)
lwz r3, gx@sda21(r13)
addi r4, r3, 0x1fc
lwz r3, 0x1fc(r3)
clrlwi r3, r3, 8
oris r3, r3, 0x5200
stw r3, 0(r4)
stb r9, -0x8000(r8)
lwz r4, gx@sda21(r13)
lwz r3, 0x1fc(r4)
stw r3, -0x8000(r8)
beq lbl_800A98DC
stb r9, -0x8000(r8)
lwz r3, 0x1d8(r4)
stw r3, -0x8000(r8)
stb r9, -0x8000(r8)
lwz r3, 0x1d0(r4)
stw r3, -0x8000(r8)
lbl_800A98DC:
clrlwi. r0, r0, 0x18
beq lbl_800A98FC
li r0, 0x61
lwz r3, gx@sda21(r13)
lis r4, 0xCC008000@ha
stb r0, 0xCC008000@l(r4)
lwz r0, 0x1dc(r3)
stw r0, -0x8000(r4)
lbl_800A98FC:
lwz r3, gx@sda21(r13)
li r0, 0
sth r0, 2(r3)
blr
.global GXClearBoundingBox
GXClearBoundingBox:
li r6, 0x61
lwz r3, gx@sda21(r13)
lis r5, 0xCC008000@ha
lis r4, 0x550003FF@ha
stb r6, 0xCC008000@l(r5)
addi r0, r4, 0x550003FF@l
stw r0, -0x8000(r5)
lis r4, 0x560003FF@ha
addi r4, r4, 0x560003FF@l
stb r6, -0x8000(r5)
li r0, 0
stw r4, -0x8000(r5)
sth r0, 2(r3)
blr
.section .data, "wa"
.balign 8
.global GXNtsc480IntDf
GXNtsc480IntDf:
.4byte 0
.4byte 0x028001E0
.4byte 0x01E00028
.4byte 0x00000280
.4byte 0x01E00000
.4byte 0x00000001
.4byte 0x00000606
.4byte 0x06060606
.4byte 0x06060606
.4byte 0x06060606
.4byte 0x06060606
.4byte 0x06060606
.4byte 0x06060808
.4byte 0x0A0C0A08
.4byte 0x08000000
.global GXNtsc480Int
GXNtsc480Int:
.4byte 0
.4byte 0x028001E0
.4byte 0x01E00028
.4byte 0x00000280
.4byte 0x01E00000
.4byte 0x00000001
.4byte 0x00000606
.4byte 0x06060606
.4byte 0x06060606
.4byte 0x06060606
.4byte 0x06060606
.4byte 0x06060606
.4byte 0x06060000
.4byte 0x15161500
.4byte 0
.global GXMpal480IntDf
GXMpal480IntDf:
.4byte 0x00000008
.4byte 0x028001E0
.4byte 0x01E00028
.4byte 0x00000280
.4byte 0x01E00000
.4byte 0x00000001
.4byte 0x00000606
.4byte 0x06060606
.4byte 0x06060606
.4byte 0x06060606
.4byte 0x06060606
.4byte 0x06060606
.4byte 0x06060808
.4byte 0x0A0C0A08
.4byte 0x08000000
.global GXPal528IntDf
GXPal528IntDf:
.4byte 0x00000004
.4byte 0x02800210
.4byte 0x02100028
.4byte 0x00170280
.4byte 0x02100000
.4byte 0x00000001
.4byte 0x00000606
.4byte 0x06060606
.4byte 0x06060606
.4byte 0x06060606
.4byte 0x06060606
.4byte 0x06060606
.4byte 0x06060808
.4byte 0x0A0C0A08
.4byte 0x08000000
.global GXEurgb60Hz480IntDf
GXEurgb60Hz480IntDf:
.4byte 0x00000014
.4byte 0x028001E0
.4byte 0x01E00028
.4byte 0x00000280
.4byte 0x01E00000
.4byte 0x00000001
.4byte 0x00000606
.4byte 0x06060606
.4byte 0x06060606
.4byte 0x06060606
.4byte 0x06060606
.4byte 0x06060606
.4byte 0x06060808
.4byte 0x0A0C0A08
.4byte 0x08000000
.4byte 0
.section .sdata2, "a"
.balign 8
"@83":
.4byte 0x43800000
.4byte 0
"@138":
.4byte 0x43300000
.4byte 0