mirror of https://github.com/PrimeDecomp/prime.git
247 lines
12 KiB
ArmAsm
247 lines
12 KiB
ArmAsm
.include "macros.inc"
|
|
|
|
.section .data, "wa"
|
|
.balign 8
|
|
|
|
lbl_803F71A0:
|
|
.byte 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
|
.byte 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 2,255, 0, 33
|
|
.byte 19, 6, 18, 3, 18, 4, 19, 5, 0,146, 0,255, 0,136,255,255
|
|
.byte 0,137,255,255, 0,138,255,255, 0,139,255,255,143, 0,139, 0
|
|
.byte 140, 0, 2,191,128,126, 22,252,220,209, 22,253, 0, 0, 22,251
|
|
.byte 0, 1, 2,191,128,120, 36,255, 2,128,171,186, 2,148, 0, 41
|
|
.byte 142, 0, 2,191,128,120, 32,255, 2, 64, 15,255, 31, 94, 0,155
|
|
.byte 0, 0, 0,153, 0, 32, 0,135, 0, 0, 0,128, 0, 65, 2,159
|
|
.byte 128,188, 2,191, 0,140, 2,191,128,126, 22,252,220,209, 22,253
|
|
.byte 0, 3, 22,251, 0, 1,143, 0, 2,191,128,120, 2,128,205,209
|
|
.byte 2,148, 0, 76, 38,255, 2,128, 0, 1, 2,149, 0, 94, 2,128
|
|
.byte 0, 2, 2,149,128, 0, 2,159, 0, 76, 0, 33,142, 0, 2,191
|
|
.byte 128,120, 36,255, 2,191,128,120, 36,255, 2,191,128,120, 36,255
|
|
.byte 2,191,128,120, 0,197,255,255, 2, 64, 15,255, 28,158, 2,191
|
|
.byte 128,120, 0,199,255,255, 2,191,128,120, 0,198,255,255, 2,191
|
|
.byte 128,120, 0,192,255,255, 2,191,128,120, 32,255, 2, 64, 15,255
|
|
.byte 31, 94, 2,191,128,120, 33,255, 2,191,128,120, 35,255, 18, 5
|
|
.byte 18, 6, 2,159,128,181, 0, 33,129, 0, 0,129, 0, 16, 16, 32
|
|
.byte 27, 62, 0,223, 20, 86, 3, 64,255,208,132, 23, 0,128, 0, 0
|
|
.byte 0,134, 0, 0, 0,130, 0, 31, 0,222, 21,246, 20, 8, 0,223
|
|
.byte 23,102, 3, 64, 0,255, 31, 95, 2,191,136,229, 31, 28,129, 30
|
|
.byte 25, 30, 20,120, 31,252, 31, 94, 2,191,136, 9, 2,191,135, 35
|
|
.byte 0, 6,129, 6, 0,222, 22,108, 20, 4, 2, 64,255, 0, 0,223
|
|
.byte 18, 49, 21,120, 3, 64, 0,255, 31, 95, 2,191,136,229, 31, 28
|
|
.byte 129, 30, 25, 30, 20,120, 31,252, 31, 94, 2,191,136, 9, 2,191
|
|
.byte 135, 35,129, 0,137, 0, 0,209, 0, 5,153, 0,130, 0, 2,149
|
|
.byte 0,229, 2,145, 0,243, 0,130, 0, 16, 0,134, 0, 1, 0,208
|
|
.byte 23, 27,145, 0,125, 0, 77, 0, 21, 1, 31, 95, 0,223, 0, 3
|
|
.byte 21, 4, 2,191,136, 9, 2,159, 1, 2, 0,130, 0, 17, 0,223
|
|
.byte 0, 3, 21, 1, 31, 95, 0,222, 16, 67, 2, 64,255,240, 2,191
|
|
.byte 136,229, 2,159, 1, 2, 0,130, 0, 16, 0,134, 0, 1, 0,208
|
|
.byte 18,133,145, 0, 77, 0, 21, 1, 0,222, 0, 3, 20, 4, 31, 94
|
|
.byte 2,191,136, 9, 0,131, 0, 19, 27,126,137, 35, 0,131, 0, 19
|
|
.byte 0,223, 0, 7, 0,222, 17,184, 2, 64,255,240, 31, 94, 2,191
|
|
.byte 129,244,241, 0, 2,191,132, 88,143, 0, 0,130, 0, 21, 0,222
|
|
.byte 0, 6, 0,218, 22, 91, 2,191,136,229, 20,253, 20, 3, 27, 94
|
|
.byte 27, 92, 0,130, 0, 22, 0,222, 23, 35, 20,244, 0,218, 22,107
|
|
.byte 2,191,136,229,177, 0, 2,144, 1, 46,129, 0, 20,253,142, 0
|
|
.byte 0,223, 20,145, 3, 64,208,240, 28,191, 0,223, 20,104, 0,209
|
|
.byte 17,252, 21,124, 28,223, 0,209, 17,184,153, 0, 20, 24, 20,120
|
|
.byte 31, 94, 31,254, 31,101, 54, 0, 20, 2, 31,102, 55, 0, 21, 1
|
|
.byte 76, 0, 21, 24,153, 0, 53, 0, 76, 0, 0,223, 0, 18, 63, 0
|
|
.byte 0,255, 0, 18, 20,112, 0,223, 0, 17, 63, 0, 0,255, 0, 17
|
|
.byte 31,165, 21, 1, 31,230,241, 0, 21,248,245, 0, 31, 95, 31,125
|
|
.byte 129, 0, 0,222, 0, 17, 52, 0,137, 0, 0,223, 0, 18, 53, 0
|
|
.byte 76, 0, 0,223, 0, 18, 21,120, 76, 0,137, 0, 31,254, 21, 8
|
|
.byte 59, 0, 0,222, 0, 17, 62, 0, 0,223, 0, 18, 59, 0, 28,191
|
|
.byte 0,218, 21,241, 53, 0, 2,149, 1,146, 0,223, 16,226, 21, 8
|
|
.byte 31, 95, 0,223, 16, 59,121, 0, 57, 0, 48,128, 0,254, 0, 34
|
|
.byte 0,220, 18, 41, 0,221, 17,248, 92, 0,240, 0, 31,229, 48,128
|
|
.byte 2,159, 1,165, 0,223, 16,202, 21, 8, 31, 95, 0,223, 16, 67
|
|
.byte 117, 0, 57, 0, 48,128, 0,254, 0, 34, 0,220, 18, 89, 0,221
|
|
.byte 22,254, 76, 0,240, 0, 31,229, 48,128, 0,254, 0, 35, 0,218
|
|
.byte 0, 8, 0,216, 0, 9, 0,155, 0, 32, 0,153, 0, 8, 0,135
|
|
.byte 0, 0, 2,191,128,139, 2,223, 0, 0, 0, 0, 0, 0, 0, 0
|
|
.byte 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
|
|
|
lbl_803F7520:
|
|
.asciz "GBAKey.c"
|
|
.balign 4
|
|
|
|
lbl_803F752C:
|
|
.asciz "GBA - unexpected dsp call"
|
|
|
|
.section .text, "ax"
|
|
|
|
.global __F23
|
|
__F23:
|
|
/* 803CAF40 003C7EA0 7C 08 02 A6 */ mflr r0
|
|
/* 803CAF44 003C7EA4 3C 80 80 57 */ lis r4, __GBA@ha
|
|
/* 803CAF48 003C7EA8 90 01 00 04 */ stw r0, 4(r1)
|
|
/* 803CAF4C 003C7EAC 38 84 A1 A0 */ addi r4, r4, __GBA@l
|
|
/* 803CAF50 003C7EB0 38 04 00 A8 */ addi r0, r4, 0xa8
|
|
/* 803CAF54 003C7EB4 94 21 FF E0 */ stwu r1, -0x20(r1)
|
|
/* 803CAF58 003C7EB8 7C 00 18 40 */ cmplw r0, r3
|
|
/* 803CAF5C 003C7EBC 93 E1 00 1C */ stw r31, 0x1c(r1)
|
|
/* 803CAF60 003C7EC0 40 82 00 0C */ bne lbl_803CAF6C
|
|
/* 803CAF64 003C7EC4 38 00 00 00 */ li r0, 0
|
|
/* 803CAF68 003C7EC8 48 00 00 68 */ b lbl_803CAFD0
|
|
lbl_803CAF6C:
|
|
/* 803CAF6C 003C7ECC 38 84 01 00 */ addi r4, r4, 0x100
|
|
/* 803CAF70 003C7ED0 38 04 00 A8 */ addi r0, r4, 0xa8
|
|
/* 803CAF74 003C7ED4 7C 00 18 40 */ cmplw r0, r3
|
|
/* 803CAF78 003C7ED8 40 82 00 0C */ bne lbl_803CAF84
|
|
/* 803CAF7C 003C7EDC 38 00 00 01 */ li r0, 1
|
|
/* 803CAF80 003C7EE0 48 00 00 50 */ b lbl_803CAFD0
|
|
lbl_803CAF84:
|
|
/* 803CAF84 003C7EE4 38 04 01 A8 */ addi r0, r4, 0x1a8
|
|
/* 803CAF88 003C7EE8 7C 00 18 40 */ cmplw r0, r3
|
|
/* 803CAF8C 003C7EEC 38 84 01 00 */ addi r4, r4, 0x100
|
|
/* 803CAF90 003C7EF0 40 82 00 0C */ bne lbl_803CAF9C
|
|
/* 803CAF94 003C7EF4 38 00 00 02 */ li r0, 2
|
|
/* 803CAF98 003C7EF8 48 00 00 38 */ b lbl_803CAFD0
|
|
lbl_803CAF9C:
|
|
/* 803CAF9C 003C7EFC 38 04 01 A8 */ addi r0, r4, 0x1a8
|
|
/* 803CAFA0 003C7F00 7C 00 18 40 */ cmplw r0, r3
|
|
/* 803CAFA4 003C7F04 40 82 00 0C */ bne lbl_803CAFB0
|
|
/* 803CAFA8 003C7F08 38 00 00 03 */ li r0, 3
|
|
/* 803CAFAC 003C7F0C 48 00 00 24 */ b lbl_803CAFD0
|
|
lbl_803CAFB0:
|
|
/* 803CAFB0 003C7F10 3C 60 80 3F */ lis r3, lbl_803F7520@ha
|
|
/* 803CAFB4 003C7F14 4C C6 31 82 */ crclr 6
|
|
/* 803CAFB8 003C7F18 3C 80 80 3F */ lis r4, lbl_803F752C@ha
|
|
/* 803CAFBC 003C7F1C 38 A4 75 2C */ addi r5, r4, lbl_803F752C@l
|
|
/* 803CAFC0 003C7F20 38 63 75 20 */ addi r3, r3, lbl_803F7520@l
|
|
/* 803CAFC4 003C7F24 38 80 00 A9 */ li r4, 0xa9
|
|
/* 803CAFC8 003C7F28 4B FB 4A 65 */ bl OSPanic
|
|
/* 803CAFCC 003C7F2C 38 00 FF FF */ li r0, -1
|
|
lbl_803CAFD0:
|
|
/* 803CAFD0 003C7F30 3C 60 80 57 */ lis r3, __GBA@ha
|
|
/* 803CAFD4 003C7F34 54 04 40 2E */ slwi r4, r0, 8
|
|
/* 803CAFD8 003C7F38 38 03 A1 A0 */ addi r0, r3, __GBA@l
|
|
/* 803CAFDC 003C7F3C 7F E0 22 14 */ add r31, r0, r4
|
|
/* 803CAFE0 003C7F40 3C 60 AB BA */ lis r3, 0xabba
|
|
/* 803CAFE4 003C7F44 4B FA 4A 0D */ bl DSPSendMailToDSP
|
|
lbl_803CAFE8:
|
|
/* 803CAFE8 003C7F48 4B FA 49 D1 */ bl DSPCheckMailToDSP
|
|
/* 803CAFEC 003C7F4C 28 03 00 00 */ cmplwi r3, 0
|
|
/* 803CAFF0 003C7F50 40 82 FF F8 */ bne lbl_803CAFE8
|
|
/* 803CAFF4 003C7F54 80 7F 00 F8 */ lwz r3, 0xf8(r31)
|
|
/* 803CAFF8 003C7F58 4B FA 49 F9 */ bl DSPSendMailToDSP
|
|
lbl_803CAFFC:
|
|
/* 803CAFFC 003C7F5C 4B FA 49 BD */ bl DSPCheckMailToDSP
|
|
/* 803CB000 003C7F60 28 03 00 00 */ cmplwi r3, 0
|
|
/* 803CB004 003C7F64 40 82 FF F8 */ bne lbl_803CAFFC
|
|
/* 803CB008 003C7F68 80 01 00 24 */ lwz r0, 0x24(r1)
|
|
/* 803CB00C 003C7F6C 83 E1 00 1C */ lwz r31, 0x1c(r1)
|
|
/* 803CB010 003C7F70 38 21 00 20 */ addi r1, r1, 0x20
|
|
/* 803CB014 003C7F74 7C 08 03 A6 */ mtlr r0
|
|
/* 803CB018 003C7F78 4E 80 00 20 */ blr
|
|
|
|
.global __F25
|
|
__F25:
|
|
/* 803CB01C 003C7F7C 3C 80 80 57 */ lis r4, __GBA@ha
|
|
/* 803CB020 003C7F80 7C 08 02 A6 */ mflr r0
|
|
/* 803CB024 003C7F84 38 84 A1 A0 */ addi r4, r4, __GBA@l
|
|
/* 803CB028 003C7F88 90 01 00 04 */ stw r0, 4(r1)
|
|
/* 803CB02C 003C7F8C 38 04 00 A8 */ addi r0, r4, 0xa8
|
|
/* 803CB030 003C7F90 7C 00 18 40 */ cmplw r0, r3
|
|
/* 803CB034 003C7F94 94 21 FF F8 */ stwu r1, -8(r1)
|
|
/* 803CB038 003C7F98 40 82 00 0C */ bne lbl_803CB044
|
|
/* 803CB03C 003C7F9C 38 00 00 00 */ li r0, 0
|
|
/* 803CB040 003C7FA0 48 00 00 68 */ b lbl_803CB0A8
|
|
lbl_803CB044:
|
|
/* 803CB044 003C7FA4 38 84 01 00 */ addi r4, r4, 0x100
|
|
/* 803CB048 003C7FA8 38 04 00 A8 */ addi r0, r4, 0xa8
|
|
/* 803CB04C 003C7FAC 7C 00 18 40 */ cmplw r0, r3
|
|
/* 803CB050 003C7FB0 40 82 00 0C */ bne lbl_803CB05C
|
|
/* 803CB054 003C7FB4 38 00 00 01 */ li r0, 1
|
|
/* 803CB058 003C7FB8 48 00 00 50 */ b lbl_803CB0A8
|
|
lbl_803CB05C:
|
|
/* 803CB05C 003C7FBC 38 04 01 A8 */ addi r0, r4, 0x1a8
|
|
/* 803CB060 003C7FC0 7C 00 18 40 */ cmplw r0, r3
|
|
/* 803CB064 003C7FC4 38 84 01 00 */ addi r4, r4, 0x100
|
|
/* 803CB068 003C7FC8 40 82 00 0C */ bne lbl_803CB074
|
|
/* 803CB06C 003C7FCC 38 00 00 02 */ li r0, 2
|
|
/* 803CB070 003C7FD0 48 00 00 38 */ b lbl_803CB0A8
|
|
lbl_803CB074:
|
|
/* 803CB074 003C7FD4 38 04 01 A8 */ addi r0, r4, 0x1a8
|
|
/* 803CB078 003C7FD8 7C 00 18 40 */ cmplw r0, r3
|
|
/* 803CB07C 003C7FDC 40 82 00 0C */ bne lbl_803CB088
|
|
/* 803CB080 003C7FE0 38 00 00 03 */ li r0, 3
|
|
/* 803CB084 003C7FE4 48 00 00 24 */ b lbl_803CB0A8
|
|
lbl_803CB088:
|
|
/* 803CB088 003C7FE8 3C 60 80 3F */ lis r3, lbl_803F7520@ha
|
|
/* 803CB08C 003C7FEC 4C C6 31 82 */ crclr 6
|
|
/* 803CB090 003C7FF0 3C 80 80 3F */ lis r4, lbl_803F752C@ha
|
|
/* 803CB094 003C7FF4 38 A4 75 2C */ addi r5, r4, lbl_803F752C@l
|
|
/* 803CB098 003C7FF8 38 63 75 20 */ addi r3, r3, lbl_803F7520@l
|
|
/* 803CB09C 003C7FFC 38 80 00 A9 */ li r4, 0xa9
|
|
/* 803CB0A0 003C8000 4B FB 49 8D */ bl OSPanic
|
|
/* 803CB0A4 003C8004 38 00 FF FF */ li r0, -1
|
|
lbl_803CB0A8:
|
|
/* 803CB0A8 003C8008 7C 03 03 78 */ mr r3, r0
|
|
/* 803CB0AC 003C800C 38 80 00 00 */ li r4, 0
|
|
/* 803CB0B0 003C8010 4B FF ED B1 */ bl __GBAX01
|
|
/* 803CB0B4 003C8014 80 01 00 0C */ lwz r0, 0xc(r1)
|
|
/* 803CB0B8 003C8018 38 21 00 08 */ addi r1, r1, 8
|
|
/* 803CB0BC 003C801C 7C 08 03 A6 */ mtlr r0
|
|
/* 803CB0C0 003C8020 4E 80 00 20 */ blr
|
|
|
|
.global __GBAX02
|
|
__GBAX02:
|
|
/* 803CB0C4 003C8024 7C 08 02 A6 */ mflr r0
|
|
/* 803CB0C8 003C8028 3C A0 80 57 */ lis r5, __GBA@ha
|
|
/* 803CB0CC 003C802C 90 01 00 04 */ stw r0, 4(r1)
|
|
/* 803CB0D0 003C8030 38 05 A1 A0 */ addi r0, r5, __GBA@l
|
|
/* 803CB0D4 003C8034 54 63 40 2E */ slwi r3, r3, 8
|
|
/* 803CB0D8 003C8038 94 21 FF E0 */ stwu r1, -0x20(r1)
|
|
/* 803CB0DC 003C803C 38 A0 00 04 */ li r5, 4
|
|
/* 803CB0E0 003C8040 93 E1 00 1C */ stw r31, 0x1c(r1)
|
|
/* 803CB0E4 003C8044 7F E0 1A 14 */ add r31, r0, r3
|
|
/* 803CB0E8 003C8048 93 C1 00 18 */ stw r30, 0x18(r1)
|
|
/* 803CB0EC 003C804C 3B DF 00 40 */ addi r30, r31, 0x40
|
|
/* 803CB0F0 003C8050 93 A1 00 14 */ stw r29, 0x14(r1)
|
|
/* 803CB0F4 003C8054 83 BF 00 F8 */ lwz r29, 0xf8(r31)
|
|
/* 803CB0F8 003C8058 38 7D 00 00 */ addi r3, r29, 0
|
|
/* 803CB0FC 003C805C 4B C3 83 95 */ bl memcpy
|
|
/* 803CB100 003C8060 80 1E 00 00 */ lwz r0, 0(r30)
|
|
/* 803CB104 003C8064 38 7D 00 20 */ addi r3, r29, 0x20
|
|
/* 803CB108 003C8068 38 80 00 20 */ li r4, 0x20
|
|
/* 803CB10C 003C806C 90 1D 00 04 */ stw r0, 4(r29)
|
|
/* 803CB110 003C8070 80 1E 00 04 */ lwz r0, 4(r30)
|
|
/* 803CB114 003C8074 90 1D 00 08 */ stw r0, 8(r29)
|
|
/* 803CB118 003C8078 80 1E 00 0C */ lwz r0, 0xc(r30)
|
|
/* 803CB11C 003C807C 90 1D 00 0C */ stw r0, 0xc(r29)
|
|
/* 803CB120 003C8080 90 7D 00 10 */ stw r3, 0x10(r29)
|
|
/* 803CB124 003C8084 4B FB 39 61 */ bl DCInvalidateRange
|
|
/* 803CB128 003C8088 38 7D 00 00 */ addi r3, r29, 0
|
|
/* 803CB12C 003C808C 38 80 00 20 */ li r4, 0x20
|
|
/* 803CB130 003C8090 4B FB 39 81 */ bl DCFlushRange
|
|
/* 803CB134 003C8094 38 00 00 FF */ li r0, 0xff
|
|
/* 803CB138 003C8098 3C 80 80 3F */ lis r4, lbl_803F71A0@ha
|
|
/* 803CB13C 003C809C 90 1F 00 AC */ stw r0, 0xac(r31)
|
|
/* 803CB140 003C80A0 38 84 71 A0 */ addi r4, r4, lbl_803F71A0@l
|
|
/* 803CB144 003C80A4 3C 04 80 00 */ addis r0, r4, 0x8000
|
|
/* 803CB148 003C80A8 90 1F 00 B4 */ stw r0, 0xb4(r31)
|
|
/* 803CB14C 003C80AC 38 00 03 80 */ li r0, 0x380
|
|
/* 803CB150 003C80B0 3C A0 80 3D */ lis r5, __F23@ha
|
|
/* 803CB154 003C80B4 90 1F 00 B8 */ stw r0, 0xb8(r31)
|
|
/* 803CB158 003C80B8 38 C0 00 00 */ li r6, 0
|
|
/* 803CB15C 003C80BC 38 00 00 10 */ li r0, 0x10
|
|
/* 803CB160 003C80C0 90 DF 00 BC */ stw r6, 0xbc(r31)
|
|
/* 803CB164 003C80C4 38 A5 AF 40 */ addi r5, r5, __F23@l
|
|
/* 803CB168 003C80C8 3C 80 80 3D */ lis r4, __F25@ha
|
|
/* 803CB16C 003C80CC B0 1F 00 CC */ sth r0, 0xcc(r31)
|
|
/* 803CB170 003C80D0 38 04 B0 1C */ addi r0, r4, __F25@l
|
|
/* 803CB174 003C80D4 38 7F 00 A8 */ addi r3, r31, 0xa8
|
|
/* 803CB178 003C80D8 90 BF 00 D0 */ stw r5, 0xd0(r31)
|
|
/* 803CB17C 003C80DC 90 DF 00 D4 */ stw r6, 0xd4(r31)
|
|
/* 803CB180 003C80E0 90 1F 00 D8 */ stw r0, 0xd8(r31)
|
|
/* 803CB184 003C80E4 90 DF 00 DC */ stw r6, 0xdc(r31)
|
|
/* 803CB188 003C80E8 4B FA 49 D9 */ bl DSPAddTask
|
|
/* 803CB18C 003C80EC 80 01 00 24 */ lwz r0, 0x24(r1)
|
|
/* 803CB190 003C80F0 83 E1 00 1C */ lwz r31, 0x1c(r1)
|
|
/* 803CB194 003C80F4 83 C1 00 18 */ lwz r30, 0x18(r1)
|
|
/* 803CB198 003C80F8 83 A1 00 14 */ lwz r29, 0x14(r1)
|
|
/* 803CB19C 003C80FC 38 21 00 20 */ addi r1, r1, 0x20
|
|
/* 803CB1A0 003C8100 7C 08 03 A6 */ mtlr r0
|
|
/* 803CB1A4 003C8104 4E 80 00 20 */ blr
|