prime/asm/MetroidPrime/CGBASupport.s

1098 lines
49 KiB
ArmAsm
Raw Normal View History

2022-04-14 08:02:42 +00:00
.include "macros.inc"
2022-04-18 04:19:18 +00:00
.section .data
.balign 8
2022-04-18 04:19:18 +00:00
2022-08-23 03:54:30 +00:00
Update_jumptable:
2022-04-18 04:19:18 +00:00
# ROM: 0x3E5C18
2022-08-23 03:54:30 +00:00
.4byte Update_case0
.4byte Update_default
.4byte Update_case2
.4byte Update_case3
.4byte Update_case4
.4byte Update_case5
.4byte Update_case6
.4byte Update_default
.4byte Update_default
2022-04-18 04:19:18 +00:00
.4byte 0
2022-04-23 07:19:32 +00:00
.section .sdata
.balign 8
2022-04-23 07:19:32 +00:00
.global lbl_805A82B8
lbl_805A82B8:
# ROM: 0x3F5C58
.4byte 0
.global lbl_805A82BC
lbl_805A82BC:
# ROM: 0x3F5C5C
.4byte 0
2022-04-18 04:19:18 +00:00
2022-07-14 05:36:41 +00:00
.section .sbss, "wa"
.balign 8
2022-07-14 05:36:41 +00:00
.global g_GBA
g_GBA:
2022-07-14 05:36:41 +00:00
.skip 0x8
.section .text, "ax"
2022-04-14 08:02:42 +00:00
.if version >= 2
2022-08-23 03:54:30 +00:00
.global PollResponse__11CGBASupportFv
PollResponse__11CGBASupportFv:
/* 80248648 002455A8 94 21 FF D0 */ stwu r1, -0x30(r1)
/* 8024864C 002455AC 7C 08 02 A6 */ mflr r0
/* 80248650 002455B0 90 01 00 34 */ stw r0, 0x34(r1)
/* 80248654 002455B4 38 81 00 08 */ addi r4, r1, 0x8
/* 80248658 002455B8 93 E1 00 2C */ stw r31, 0x2c(r1)
/* 8024865C 002455BC 7C 7F 1B 78 */ mr r31, r3
/* 80248660 002455C0 93 C1 00 28 */ stw r30, 0x28(r1)
/* 80248664 002455C4 93 A1 00 24 */ stw r29, 0x24(r1)
/* 80248668 002455C8 93 81 00 20 */ stw r28, 0x20(r1)
/* 8024866C 002455CC 80 63 00 40 */ lwz r3, 0x40(r3)
/* 80248670 002455D0 48 18 12 DD */ bl GBAReset
/* 80248674 002455D4 2C 03 00 01 */ cmpwi r3, 0x1
/* 80248678 002455D8 40 82 00 20 */ bne lbl_80248698
/* 8024867C 002455DC 80 7F 00 40 */ lwz r3, 0x40(r31)
/* 80248680 002455E0 38 81 00 08 */ addi r4, r1, 0x8
/* 80248684 002455E4 48 18 12 C9 */ bl GBAReset
/* 80248688 002455E8 2C 03 00 01 */ cmpwi r3, 0x1
/* 8024868C 002455EC 40 82 00 0C */ bne lbl_80248698
/* 80248690 002455F0 38 60 00 00 */ li r3, 0x0
/* 80248694 002455F4 48 00 03 00 */ b lbl_80248994
lbl_80248698:
/* 80248698 002455F8 80 7F 00 40 */ lwz r3, 0x40(r31)
/* 8024869C 002455FC 38 81 00 08 */ addi r4, r1, 0x8
/* 802486A0 00245600 48 18 11 B9 */ bl GBAGetStatus
/* 802486A4 00245604 2C 03 00 01 */ cmpwi r3, 0x1
/* 802486A8 00245608 40 82 00 0C */ bne lbl_802486B4
/* 802486AC 0024560C 38 60 00 00 */ li r3, 0x0
/* 802486B0 00245610 48 00 02 E4 */ b lbl_80248994
lbl_802486B4:
/* 802486B4 00245614 88 01 00 08 */ lbz r0, 0x8(r1)
/* 802486B8 00245618 28 00 00 28 */ cmplwi r0, 0x28
/* 802486BC 0024561C 41 82 00 0C */ beq lbl_802486C8
/* 802486C0 00245620 38 60 00 00 */ li r3, 0x0
/* 802486C4 00245624 48 00 02 D0 */ b lbl_80248994
lbl_802486C8:
/* 802486C8 00245628 48 13 89 ED */ bl OSGetFontEncode
/* 802486CC 0024562C 54 60 04 3E */ clrlwi r0, r3, 16
/* 802486D0 00245630 3C 60 41 4D */ lis r3, 0x414d
/* 802486D4 00245634 20 00 00 01 */ subfic r0, r0, 0x1
/* 802486D8 00245638 7C 00 00 34 */ cntlzw r0, r0
/* 802486DC 0024563C 38 83 54 45 */ addi r4, r3, 0x5445
/* 802486E0 00245640 54 00 DE 3F */ rlwinm. r0, r0, 27, 24, 31
/* 802486E4 00245644 41 82 00 08 */ beq lbl_802486EC
/* 802486E8 00245648 38 83 54 4A */ addi r4, r3, 0x544a
lbl_802486EC:
/* 802486EC 0024564C 90 81 00 18 */ stw r4, 0x18(r1)
/* 802486F0 00245650 38 81 00 14 */ addi r4, r1, 0x14
/* 802486F4 00245654 80 7F 00 40 */ lwz r3, 0x40(r31)
/* 802486F8 00245658 38 A1 00 08 */ addi r5, r1, 0x8
/* 802486FC 0024565C 48 18 23 F5 */ bl GBARead
/* 80248700 00245660 2C 03 00 01 */ cmpwi r3, 0x1
/* 80248704 00245664 40 82 00 0C */ bne lbl_80248710
/* 80248708 00245668 38 60 00 00 */ li r3, 0x0
/* 8024870C 0024566C 48 00 02 88 */ b lbl_80248994
lbl_80248710:
/* 80248710 00245670 80 61 00 14 */ lwz r3, 0x14(r1)
/* 80248714 00245674 80 01 00 18 */ lwz r0, 0x18(r1)
/* 80248718 00245678 7C 03 00 40 */ cmplw r3, r0
/* 8024871C 0024567C 41 82 00 0C */ beq lbl_80248728
/* 80248720 00245680 38 60 00 00 */ li r3, 0x0
/* 80248724 00245684 48 00 02 70 */ b lbl_80248994
lbl_80248728:
/* 80248728 00245688 80 7F 00 40 */ lwz r3, 0x40(r31)
/* 8024872C 0024568C 38 81 00 08 */ addi r4, r1, 0x8
/* 80248730 00245690 48 18 11 29 */ bl GBAGetStatus
/* 80248734 00245694 2C 03 00 01 */ cmpwi r3, 0x1
/* 80248738 00245698 40 82 00 0C */ bne lbl_80248744
/* 8024873C 0024569C 38 60 00 00 */ li r3, 0x0
/* 80248740 002456A0 48 00 02 54 */ b lbl_80248994
lbl_80248744:
/* 80248744 002456A4 88 01 00 08 */ lbz r0, 0x8(r1)
/* 80248748 002456A8 28 00 00 20 */ cmplwi r0, 0x20
/* 8024874C 002456AC 41 82 00 0C */ beq lbl_80248758
/* 80248750 002456B0 38 60 00 00 */ li r3, 0x0
/* 80248754 002456B4 48 00 02 40 */ b lbl_80248994
lbl_80248758:
/* 80248758 002456B8 80 7F 00 40 */ lwz r3, 0x40(r31)
/* 8024875C 002456BC 38 81 00 18 */ addi r4, r1, 0x18
/* 80248760 002456C0 38 A1 00 08 */ addi r5, r1, 0x8
/* 80248764 002456C4 48 18 24 E5 */ bl GBAWrite
/* 80248768 002456C8 2C 03 00 01 */ cmpwi r3, 0x1
/* 8024876C 002456CC 40 82 00 0C */ bne lbl_80248778
/* 80248770 002456D0 38 60 00 00 */ li r3, 0x0
/* 80248774 002456D4 48 00 02 20 */ b lbl_80248994
lbl_80248778:
/* 80248778 002456D8 80 7F 00 40 */ lwz r3, 0x40(r31)
/* 8024877C 002456DC 38 81 00 08 */ addi r4, r1, 0x8
/* 80248780 002456E0 48 18 10 D9 */ bl GBAGetStatus
/* 80248784 002456E4 2C 03 00 01 */ cmpwi r3, 0x1
/* 80248788 002456E8 40 82 00 0C */ bne lbl_80248794
/* 8024878C 002456EC 38 60 00 00 */ li r3, 0x0
/* 80248790 002456F0 48 00 02 04 */ b lbl_80248994
lbl_80248794:
/* 80248794 002456F4 88 01 00 08 */ lbz r0, 0x8(r1)
/* 80248798 002456F8 54 00 06 B6 */ rlwinm r0, r0, 0, 26, 27
/* 8024879C 002456FC 2C 00 00 30 */ cmpwi r0, 0x30
/* 802487A0 00245700 41 82 00 0C */ beq lbl_802487AC
/* 802487A4 00245704 38 60 00 00 */ li r3, 0x0
/* 802487A8 00245708 48 00 01 EC */ b lbl_80248994
lbl_802487AC:
/* 802487AC 0024570C 48 13 CD 19 */ bl OSGetTick
/* 802487B0 00245710 3C 80 43 1C */ lis r4, 0x431c
/* 802487B4 00245714 7C 7C 1B 78 */ mr r28, r3
/* 802487B8 00245718 3B A4 DE 83 */ addi r29, r4, -0x217d
/* 802487BC 0024571C 3F C0 80 00 */ lis r30, 0x800000F8@ha
lbl_802487C0:
/* 802487C0 00245720 48 13 CD 05 */ bl OSGetTick
/* 802487C4 00245724 80 1E 00 F8 */ lwz r0, 0x800000F8@l(r30)
/* 802487C8 00245728 7C 7C 18 50 */ subf r3, r28, r3
/* 802487CC 0024572C 54 63 18 38 */ slwi r3, r3, 3
/* 802487D0 00245730 54 00 F0 BE */ srwi r0, r0, 2
/* 802487D4 00245734 7C 1D 00 16 */ mulhwu r0, r29, r0
/* 802487D8 00245738 54 00 8B FE */ srwi r0, r0, 15
/* 802487DC 0024573C 7C 03 03 96 */ divwu r0, r3, r0
/* 802487E0 00245740 28 00 01 F4 */ cmplwi r0, 0x1f4
/* 802487E4 00245744 41 81 01 AC */ bgt lbl_80248990
/* 802487E8 00245748 80 7F 00 40 */ lwz r3, 0x40(r31)
/* 802487EC 0024574C 38 81 00 08 */ addi r4, r1, 0x8
/* 802487F0 00245750 48 18 10 69 */ bl GBAGetStatus
/* 802487F4 00245754 2C 03 00 01 */ cmpwi r3, 0x1
/* 802487F8 00245758 41 82 FF C8 */ beq lbl_802487C0
/* 802487FC 0024575C 88 01 00 08 */ lbz r0, 0x8(r1)
/* 80248800 00245760 54 00 07 39 */ rlwinm. r0, r0, 0, 28, 28
/* 80248804 00245764 41 82 FF BC */ beq lbl_802487C0
/* 80248808 00245768 80 7F 00 40 */ lwz r3, 0x40(r31)
/* 8024880C 0024576C 38 81 00 08 */ addi r4, r1, 0x8
/* 80248810 00245770 48 18 10 49 */ bl GBAGetStatus
/* 80248814 00245774 2C 03 00 00 */ cmpwi r3, 0x0
/* 80248818 00245778 40 82 FF A8 */ bne lbl_802487C0
/* 8024881C 0024577C 88 01 00 08 */ lbz r0, 0x8(r1)
/* 80248820 00245780 28 00 00 38 */ cmplwi r0, 0x38
/* 80248824 00245784 40 82 FF 9C */ bne lbl_802487C0
/* 80248828 00245788 80 7F 00 40 */ lwz r3, 0x40(r31)
/* 8024882C 0024578C 38 81 00 10 */ addi r4, r1, 0x10
/* 80248830 00245790 38 A1 00 08 */ addi r5, r1, 0x8
/* 80248834 00245794 48 18 22 BD */ bl GBARead
/* 80248838 00245798 2C 03 00 00 */ cmpwi r3, 0x0
/* 8024883C 0024579C 41 82 00 0C */ beq lbl_80248848
/* 80248840 002457A0 38 60 00 00 */ li r3, 0x0
/* 80248844 002457A4 48 00 01 50 */ b lbl_80248994
lbl_80248848:
/* 80248848 002457A8 81 01 00 10 */ lwz r8, 0x10(r1)
/* 8024884C 002457AC 38 C1 00 0C */ addi r6, r1, 0xc
/* 80248850 002457B0 38 E0 00 03 */ li r7, 0x3
/* 80248854 002457B4 38 A0 FF FF */ li r5, -0x1
/* 80248858 002457B8 55 04 46 3E */ srwi r4, r8, 24
/* 8024885C 002457BC 55 03 86 3E */ rlwinm r3, r8, 16, 24, 31
/* 80248860 002457C0 55 00 C6 3E */ rlwinm r0, r8, 24, 24, 31
/* 80248864 002457C4 98 81 00 0C */ stb r4, 0xc(r1)
/* 80248868 002457C8 98 61 00 0D */ stb r3, 0xd(r1)
/* 8024886C 002457CC 98 01 00 0E */ stb r0, 0xe(r1)
/* 80248870 002457D0 99 01 00 0F */ stb r8, 0xf(r1)
lbl_80248874:
/* 80248874 002457D4 88 06 00 00 */ lbz r0, 0x0(r6)
/* 80248878 002457D8 38 C6 00 01 */ addi r6, r6, 0x1
/* 8024887C 002457DC 7C A5 02 78 */ xor r5, r5, r0
/* 80248880 002457E0 54 A0 07 FF */ clrlwi. r0, r5, 31
/* 80248884 002457E4 41 82 00 10 */ beq lbl_80248894
/* 80248888 002457E8 54 A5 F8 7E */ srwi r5, r5, 1
/* 8024888C 002457EC 68 A5 B0 10 */ xori r5, r5, 0xb010
/* 80248890 002457F0 48 00 00 08 */ b lbl_80248898
lbl_80248894:
/* 80248894 002457F4 54 A5 F8 7E */ srwi r5, r5, 1
lbl_80248898:
/* 80248898 002457F8 54 A0 07 FF */ clrlwi. r0, r5, 31
/* 8024889C 002457FC 41 82 00 10 */ beq lbl_802488AC
/* 802488A0 00245800 54 A5 F8 7E */ srwi r5, r5, 1
/* 802488A4 00245804 68 A5 B0 10 */ xori r5, r5, 0xb010
/* 802488A8 00245808 48 00 00 08 */ b lbl_802488B0
lbl_802488AC:
/* 802488AC 0024580C 54 A5 F8 7E */ srwi r5, r5, 1
lbl_802488B0:
/* 802488B0 00245810 54 A0 07 FF */ clrlwi. r0, r5, 31
/* 802488B4 00245814 41 82 00 10 */ beq lbl_802488C4
/* 802488B8 00245818 54 A5 F8 7E */ srwi r5, r5, 1
/* 802488BC 0024581C 68 A5 B0 10 */ xori r5, r5, 0xb010
/* 802488C0 00245820 48 00 00 08 */ b lbl_802488C8
lbl_802488C4:
/* 802488C4 00245824 54 A5 F8 7E */ srwi r5, r5, 1
lbl_802488C8:
/* 802488C8 00245828 54 A0 07 FF */ clrlwi. r0, r5, 31
/* 802488CC 0024582C 41 82 00 10 */ beq lbl_802488DC
/* 802488D0 00245830 54 A5 F8 7E */ srwi r5, r5, 1
/* 802488D4 00245834 68 A5 B0 10 */ xori r5, r5, 0xb010
/* 802488D8 00245838 48 00 00 08 */ b lbl_802488E0
lbl_802488DC:
/* 802488DC 0024583C 54 A5 F8 7E */ srwi r5, r5, 1
lbl_802488E0:
/* 802488E0 00245840 54 A0 07 FF */ clrlwi. r0, r5, 31
/* 802488E4 00245844 41 82 00 10 */ beq lbl_802488F4
/* 802488E8 00245848 54 A5 F8 7E */ srwi r5, r5, 1
/* 802488EC 0024584C 68 A5 B0 10 */ xori r5, r5, 0xb010
/* 802488F0 00245850 48 00 00 08 */ b lbl_802488F8
lbl_802488F4:
/* 802488F4 00245854 54 A5 F8 7E */ srwi r5, r5, 1
lbl_802488F8:
/* 802488F8 00245858 54 A0 07 FF */ clrlwi. r0, r5, 31
/* 802488FC 0024585C 41 82 00 10 */ beq lbl_8024890C
/* 80248900 00245860 54 A5 F8 7E */ srwi r5, r5, 1
/* 80248904 00245864 68 A5 B0 10 */ xori r5, r5, 0xb010
/* 80248908 00245868 48 00 00 08 */ b lbl_80248910
lbl_8024890C:
/* 8024890C 0024586C 54 A5 F8 7E */ srwi r5, r5, 1
lbl_80248910:
/* 80248910 00245870 54 A0 07 FF */ clrlwi. r0, r5, 31
/* 80248914 00245874 41 82 00 10 */ beq lbl_80248924
/* 80248918 00245878 54 A5 F8 7E */ srwi r5, r5, 1
/* 8024891C 0024587C 68 A5 B0 10 */ xori r5, r5, 0xb010
/* 80248920 00245880 48 00 00 08 */ b lbl_80248928
lbl_80248924:
/* 80248924 00245884 54 A5 F8 7E */ srwi r5, r5, 1
lbl_80248928:
/* 80248928 00245888 54 A0 07 FF */ clrlwi. r0, r5, 31
/* 8024892C 0024588C 41 82 00 10 */ beq lbl_8024893C
/* 80248930 00245890 54 A5 F8 7E */ srwi r5, r5, 1
/* 80248934 00245894 68 A5 B0 10 */ xori r5, r5, 0xb010
/* 80248938 00245898 48 00 00 08 */ b lbl_80248940
lbl_8024893C:
/* 8024893C 0024589C 54 A5 F8 7E */ srwi r5, r5, 1
lbl_80248940:
/* 80248940 002458A0 34 E7 FF FF */ addic. r7, r7, -0x1
/* 80248944 002458A4 40 82 FF 30 */ bne lbl_80248874
/* 80248948 002458A8 88 61 00 0F */ lbz r3, 0xf(r1)
/* 8024894C 002458AC 54 A0 06 3E */ clrlwi r0, r5, 24
/* 80248950 002458B0 7C 03 00 40 */ cmplw r3, r0
/* 80248954 002458B4 41 82 00 0C */ beq lbl_80248960_
/* 80248958 002458B8 38 60 00 00 */ li r3, 0x0
/* 8024895C 002458BC 48 00 00 38 */ b lbl_80248994
lbl_80248960_:
/* 80248960 002458C0 88 81 00 0E */ lbz r4, 0xe(r1)
/* 80248964 002458C4 38 60 00 00 */ li r3, 0x0
/* 80248968 002458C8 54 80 FF FE */ rlwinm r0, r4, 31, 31, 31
/* 8024896C 002458CC 68 00 00 01 */ xori r0, r0, 0x1
/* 80248970 002458D0 98 1F 00 44 */ stb r0, 0x44(r31)
/* 80248974 002458D4 88 1F 00 44 */ lbz r0, 0x44(r31)
/* 80248978 002458D8 28 00 00 00 */ cmplwi r0, 0x0
/* 8024897C 002458DC 41 82 00 10 */ beq lbl_8024898C
/* 80248980 002458E0 54 80 07 FF */ clrlwi. r0, r4, 31
/* 80248984 002458E4 40 81 00 08 */ ble lbl_8024898C
/* 80248988 002458E8 38 60 00 01 */ li r3, 0x1
lbl_8024898C:
/* 8024898C 002458EC 98 7F 00 45 */ stb r3, 0x45(r31)
lbl_80248990:
/* 80248990 002458F0 38 60 00 01 */ li r3, 0x1
lbl_80248994:
/* 80248994 002458F4 80 01 00 34 */ lwz r0, 0x34(r1)
/* 80248998 002458F8 83 E1 00 2C */ lwz r31, 0x2c(r1)
/* 8024899C 002458FC 83 C1 00 28 */ lwz r30, 0x28(r1)
/* 802489A0 00245900 83 A1 00 24 */ lwz r29, 0x24(r1)
/* 802489A4 00245904 83 81 00 20 */ lwz r28, 0x20(r1)
/* 802489A8 00245908 7C 08 03 A6 */ mtlr r0
/* 802489AC 0024590C 38 21 00 30 */ addi r1, r1, 0x30
/* 802489B0 00245910 4E 80 00 20 */ blr
.else
2022-04-14 08:02:42 +00:00
.global PollResponse__11CGBASupportFv
PollResponse__11CGBASupportFv:
/* 802485D4 00245534 94 21 FF D0 */ stwu r1, -0x30(r1)
/* 802485D8 00245538 7C 08 02 A6 */ mflr r0
/* 802485DC 0024553C 90 01 00 34 */ stw r0, 0x34(r1)
/* 802485E0 00245540 38 81 00 08 */ addi r4, r1, 8
/* 802485E4 00245544 93 E1 00 2C */ stw r31, 0x2c(r1)
/* 802485E8 00245548 7C 7F 1B 78 */ mr r31, r3
/* 802485EC 0024554C 93 C1 00 28 */ stw r30, 0x28(r1)
/* 802485F0 00245550 93 A1 00 24 */ stw r29, 0x24(r1)
/* 802485F4 00245554 93 81 00 20 */ stw r28, 0x20(r1)
/* 802485F8 00245558 80 63 00 40 */ lwz r3, 0x40(r3)
/* 802485FC 0024555C 48 18 12 4D */ bl GBAReset
/* 80248600 00245560 2C 03 00 01 */ cmpwi r3, 1
/* 80248604 00245564 40 82 00 20 */ bne lbl_80248624
/* 80248608 00245568 80 7F 00 40 */ lwz r3, 0x40(r31)
/* 8024860C 0024556C 38 81 00 08 */ addi r4, r1, 8
/* 80248610 00245570 48 18 12 39 */ bl GBAReset
/* 80248614 00245574 2C 03 00 01 */ cmpwi r3, 1
/* 80248618 00245578 40 82 00 0C */ bne lbl_80248624
/* 8024861C 0024557C 38 60 00 00 */ li r3, 0
/* 80248620 00245580 48 00 02 D8 */ b lbl_802488F8
lbl_80248624:
/* 80248624 00245584 80 7F 00 40 */ lwz r3, 0x40(r31)
/* 80248628 00245588 38 81 00 08 */ addi r4, r1, 8
/* 8024862C 0024558C 48 18 11 29 */ bl GBAGetStatus
/* 80248630 00245590 2C 03 00 01 */ cmpwi r3, 1
/* 80248634 00245594 40 82 00 0C */ bne lbl_80248640
/* 80248638 00245598 38 60 00 00 */ li r3, 0
/* 8024863C 0024559C 48 00 02 BC */ b lbl_802488F8
lbl_80248640:
/* 80248640 002455A0 88 01 00 08 */ lbz r0, 8(r1)
/* 80248644 002455A4 28 00 00 28 */ cmplwi r0, 0x28
/* 80248648 002455A8 41 82 00 0C */ beq lbl_80248654
/* 8024864C 002455AC 38 60 00 00 */ li r3, 0
/* 80248650 002455B0 48 00 02 A8 */ b lbl_802488F8
lbl_80248654:
/* 80248654 002455B4 80 7F 00 40 */ lwz r3, 0x40(r31)
/* 80248658 002455B8 38 81 00 14 */ addi r4, r1, 0x14
/* 8024865C 002455BC 38 A1 00 08 */ addi r5, r1, 8
/* 80248660 002455C0 48 18 23 8D */ bl GBARead
/* 80248664 002455C4 2C 03 00 01 */ cmpwi r3, 1
/* 80248668 002455C8 40 82 00 0C */ bne lbl_80248674
/* 8024866C 002455CC 38 60 00 00 */ li r3, 0
/* 80248670 002455D0 48 00 02 88 */ b lbl_802488F8
lbl_80248674:
/* 80248674 002455D4 80 61 00 14 */ lwz r3, 0x14(r1)
/* 80248678 002455D8 3C 03 BE B3 */ addis r0, r3, 0xbeb3
/* 8024867C 002455DC 28 00 54 45 */ cmplwi r0, 0x5445
/* 80248680 002455E0 41 82 00 0C */ beq lbl_8024868C
/* 80248684 002455E4 38 60 00 00 */ li r3, 0
/* 80248688 002455E8 48 00 02 70 */ b lbl_802488F8
lbl_8024868C:
/* 8024868C 002455EC 80 7F 00 40 */ lwz r3, 0x40(r31)
/* 80248690 002455F0 38 81 00 08 */ addi r4, r1, 8
/* 80248694 002455F4 48 18 10 C1 */ bl GBAGetStatus
/* 80248698 002455F8 2C 03 00 01 */ cmpwi r3, 1
/* 8024869C 002455FC 40 82 00 0C */ bne lbl_802486A8
/* 802486A0 00245600 38 60 00 00 */ li r3, 0
/* 802486A4 00245604 48 00 02 54 */ b lbl_802488F8
lbl_802486A8:
/* 802486A8 00245608 88 01 00 08 */ lbz r0, 8(r1)
/* 802486AC 0024560C 28 00 00 20 */ cmplwi r0, 0x20
/* 802486B0 00245610 41 82 00 0C */ beq lbl_802486BC
/* 802486B4 00245614 38 60 00 00 */ li r3, 0
/* 802486B8 00245618 48 00 02 40 */ b lbl_802488F8
lbl_802486BC:
/* 802486BC 0024561C 80 7F 00 40 */ lwz r3, 0x40(r31)
/* 802486C0 00245620 38 A1 00 08 */ addi r5, r1, 8
/* 802486C4 00245624 38 82 B8 78 */ addi r4, r2, lbl_805AD598@sda21
/* 802486C8 00245628 48 18 24 7D */ bl GBAWrite
/* 802486CC 0024562C 2C 03 00 01 */ cmpwi r3, 1
/* 802486D0 00245630 40 82 00 0C */ bne lbl_802486DC
/* 802486D4 00245634 38 60 00 00 */ li r3, 0
/* 802486D8 00245638 48 00 02 20 */ b lbl_802488F8
lbl_802486DC:
/* 802486DC 0024563C 80 7F 00 40 */ lwz r3, 0x40(r31)
/* 802486E0 00245640 38 81 00 08 */ addi r4, r1, 8
/* 802486E4 00245644 48 18 10 71 */ bl GBAGetStatus
/* 802486E8 00245648 2C 03 00 01 */ cmpwi r3, 1
/* 802486EC 0024564C 40 82 00 0C */ bne lbl_802486F8
/* 802486F0 00245650 38 60 00 00 */ li r3, 0
/* 802486F4 00245654 48 00 02 04 */ b lbl_802488F8
lbl_802486F8:
/* 802486F8 00245658 88 01 00 08 */ lbz r0, 8(r1)
/* 802486FC 0024565C 54 00 06 B6 */ rlwinm r0, r0, 0, 0x1a, 0x1b
/* 80248700 00245660 2C 00 00 30 */ cmpwi r0, 0x30
/* 80248704 00245664 41 82 00 0C */ beq lbl_80248710
/* 80248708 00245668 38 60 00 00 */ li r3, 0
/* 8024870C 0024566C 48 00 01 EC */ b lbl_802488F8
lbl_80248710:
/* 80248710 00245670 48 13 CC B1 */ bl OSGetTick
/* 80248714 00245674 3C 80 43 1C */ lis r4, 0x431BDE83@ha
/* 80248718 00245678 7C 7C 1B 78 */ mr r28, r3
/* 8024871C 0024567C 3B A4 DE 83 */ addi r29, r4, 0x431BDE83@l
/* 80248720 00245680 3F C0 80 00 */ lis r30, 0x8000
lbl_80248724:
/* 80248724 00245684 48 13 CC 9D */ bl OSGetTick
/* 80248728 00245688 80 1E 00 F8 */ lwz r0, 0xf8(r30)
/* 8024872C 0024568C 7C 7C 18 50 */ subf r3, r28, r3
/* 80248730 00245690 54 63 18 38 */ slwi r3, r3, 3
/* 80248734 00245694 54 00 F0 BE */ srwi r0, r0, 2
/* 80248738 00245698 7C 1D 00 16 */ mulhwu r0, r29, r0
/* 8024873C 0024569C 54 00 8B FE */ srwi r0, r0, 0xf
/* 80248740 002456A0 7C 03 03 96 */ divwu r0, r3, r0
/* 80248744 002456A4 28 00 01 F4 */ cmplwi r0, 0x1f4
/* 80248748 002456A8 41 81 01 AC */ bgt lbl_802488F4
/* 8024874C 002456AC 80 7F 00 40 */ lwz r3, 0x40(r31)
/* 80248750 002456B0 38 81 00 08 */ addi r4, r1, 8
/* 80248754 002456B4 48 18 10 01 */ bl GBAGetStatus
/* 80248758 002456B8 2C 03 00 01 */ cmpwi r3, 1
/* 8024875C 002456BC 41 82 FF C8 */ beq lbl_80248724
/* 80248760 002456C0 88 01 00 08 */ lbz r0, 8(r1)
/* 80248764 002456C4 54 00 07 39 */ rlwinm. r0, r0, 0, 0x1c, 0x1c
/* 80248768 002456C8 41 82 FF BC */ beq lbl_80248724
/* 8024876C 002456CC 80 7F 00 40 */ lwz r3, 0x40(r31)
/* 80248770 002456D0 38 81 00 08 */ addi r4, r1, 8
/* 80248774 002456D4 48 18 0F E1 */ bl GBAGetStatus
/* 80248778 002456D8 2C 03 00 00 */ cmpwi r3, 0
/* 8024877C 002456DC 40 82 FF A8 */ bne lbl_80248724
/* 80248780 002456E0 88 01 00 08 */ lbz r0, 8(r1)
/* 80248784 002456E4 28 00 00 38 */ cmplwi r0, 0x38
/* 80248788 002456E8 40 82 FF 9C */ bne lbl_80248724
/* 8024878C 002456EC 80 7F 00 40 */ lwz r3, 0x40(r31)
/* 80248790 002456F0 38 81 00 10 */ addi r4, r1, 0x10
/* 80248794 002456F4 38 A1 00 08 */ addi r5, r1, 8
/* 80248798 002456F8 48 18 22 55 */ bl GBARead
/* 8024879C 002456FC 2C 03 00 00 */ cmpwi r3, 0
/* 802487A0 00245700 41 82 00 0C */ beq lbl_802487AC
/* 802487A4 00245704 38 60 00 00 */ li r3, 0
/* 802487A8 00245708 48 00 01 50 */ b lbl_802488F8
lbl_802487AC:
/* 802487AC 0024570C 81 01 00 10 */ lwz r8, 0x10(r1)
/* 802487B0 00245710 38 C1 00 0C */ addi r6, r1, 0xc
/* 802487B4 00245714 38 E0 00 03 */ li r7, 3
/* 802487B8 00245718 38 A0 FF FF */ li r5, -1
/* 802487BC 0024571C 55 04 46 3E */ srwi r4, r8, 0x18
/* 802487C0 00245720 55 03 86 3E */ rlwinm r3, r8, 0x10, 0x18, 0x1f
/* 802487C4 00245724 55 00 C6 3E */ rlwinm r0, r8, 0x18, 0x18, 0x1f
/* 802487C8 00245728 98 81 00 0C */ stb r4, 0xc(r1)
/* 802487CC 0024572C 98 61 00 0D */ stb r3, 0xd(r1)
/* 802487D0 00245730 98 01 00 0E */ stb r0, 0xe(r1)
/* 802487D4 00245734 99 01 00 0F */ stb r8, 0xf(r1)
lbl_802487D8:
/* 802487D8 00245738 88 06 00 00 */ lbz r0, 0(r6)
/* 802487DC 0024573C 38 C6 00 01 */ addi r6, r6, 1
/* 802487E0 00245740 7C A5 02 78 */ xor r5, r5, r0
/* 802487E4 00245744 54 A0 07 FF */ clrlwi. r0, r5, 0x1f
/* 802487E8 00245748 41 82 00 10 */ beq lbl_802487F8
/* 802487EC 0024574C 54 A5 F8 7E */ srwi r5, r5, 1
/* 802487F0 00245750 68 A5 B0 10 */ xori r5, r5, 0xb010
/* 802487F4 00245754 48 00 00 08 */ b lbl_802487FC
lbl_802487F8:
/* 802487F8 00245758 54 A5 F8 7E */ srwi r5, r5, 1
lbl_802487FC:
/* 802487FC 0024575C 54 A0 07 FF */ clrlwi. r0, r5, 0x1f
/* 80248800 00245760 41 82 00 10 */ beq lbl_80248810
/* 80248804 00245764 54 A5 F8 7E */ srwi r5, r5, 1
/* 80248808 00245768 68 A5 B0 10 */ xori r5, r5, 0xb010
/* 8024880C 0024576C 48 00 00 08 */ b lbl_80248814
lbl_80248810:
/* 80248810 00245770 54 A5 F8 7E */ srwi r5, r5, 1
lbl_80248814:
/* 80248814 00245774 54 A0 07 FF */ clrlwi. r0, r5, 0x1f
/* 80248818 00245778 41 82 00 10 */ beq lbl_80248828
/* 8024881C 0024577C 54 A5 F8 7E */ srwi r5, r5, 1
/* 80248820 00245780 68 A5 B0 10 */ xori r5, r5, 0xb010
/* 80248824 00245784 48 00 00 08 */ b lbl_8024882C
lbl_80248828:
/* 80248828 00245788 54 A5 F8 7E */ srwi r5, r5, 1
lbl_8024882C:
/* 8024882C 0024578C 54 A0 07 FF */ clrlwi. r0, r5, 0x1f
/* 80248830 00245790 41 82 00 10 */ beq lbl_80248840
/* 80248834 00245794 54 A5 F8 7E */ srwi r5, r5, 1
/* 80248838 00245798 68 A5 B0 10 */ xori r5, r5, 0xb010
/* 8024883C 0024579C 48 00 00 08 */ b lbl_80248844
lbl_80248840:
/* 80248840 002457A0 54 A5 F8 7E */ srwi r5, r5, 1
lbl_80248844:
/* 80248844 002457A4 54 A0 07 FF */ clrlwi. r0, r5, 0x1f
/* 80248848 002457A8 41 82 00 10 */ beq lbl_80248858
/* 8024884C 002457AC 54 A5 F8 7E */ srwi r5, r5, 1
/* 80248850 002457B0 68 A5 B0 10 */ xori r5, r5, 0xb010
/* 80248854 002457B4 48 00 00 08 */ b lbl_8024885C
lbl_80248858:
/* 80248858 002457B8 54 A5 F8 7E */ srwi r5, r5, 1
lbl_8024885C:
/* 8024885C 002457BC 54 A0 07 FF */ clrlwi. r0, r5, 0x1f
/* 80248860 002457C0 41 82 00 10 */ beq lbl_80248870
/* 80248864 002457C4 54 A5 F8 7E */ srwi r5, r5, 1
/* 80248868 002457C8 68 A5 B0 10 */ xori r5, r5, 0xb010
/* 8024886C 002457CC 48 00 00 08 */ b lbl_80248874
lbl_80248870:
/* 80248870 002457D0 54 A5 F8 7E */ srwi r5, r5, 1
lbl_80248874:
/* 80248874 002457D4 54 A0 07 FF */ clrlwi. r0, r5, 0x1f
/* 80248878 002457D8 41 82 00 10 */ beq lbl_80248888
/* 8024887C 002457DC 54 A5 F8 7E */ srwi r5, r5, 1
/* 80248880 002457E0 68 A5 B0 10 */ xori r5, r5, 0xb010
/* 80248884 002457E4 48 00 00 08 */ b lbl_8024888C
lbl_80248888:
/* 80248888 002457E8 54 A5 F8 7E */ srwi r5, r5, 1
lbl_8024888C:
/* 8024888C 002457EC 54 A0 07 FF */ clrlwi. r0, r5, 0x1f
/* 80248890 002457F0 41 82 00 10 */ beq lbl_802488A0
/* 80248894 002457F4 54 A5 F8 7E */ srwi r5, r5, 1
/* 80248898 002457F8 68 A5 B0 10 */ xori r5, r5, 0xb010
/* 8024889C 002457FC 48 00 00 08 */ b lbl_802488A4
lbl_802488A0:
/* 802488A0 00245800 54 A5 F8 7E */ srwi r5, r5, 1
lbl_802488A4:
/* 802488A4 00245804 34 E7 FF FF */ addic. r7, r7, -1
/* 802488A8 00245808 40 82 FF 30 */ bne lbl_802487D8
/* 802488AC 0024580C 88 61 00 0F */ lbz r3, 0xf(r1)
/* 802488B0 00245810 54 A0 06 3E */ clrlwi r0, r5, 0x18
/* 802488B4 00245814 7C 03 00 40 */ cmplw r3, r0
/* 802488B8 00245818 41 82 00 0C */ beq lbl_802488C4
/* 802488BC 0024581C 38 60 00 00 */ li r3, 0
/* 802488C0 00245820 48 00 00 38 */ b lbl_802488F8
lbl_802488C4:
/* 802488C4 00245824 88 81 00 0E */ lbz r4, 0xe(r1)
/* 802488C8 00245828 38 60 00 00 */ li r3, 0
/* 802488CC 0024582C 54 80 FF FE */ rlwinm r0, r4, 0x1f, 0x1f, 0x1f
/* 802488D0 00245830 68 00 00 01 */ xori r0, r0, 1
/* 802488D4 00245834 98 1F 00 44 */ stb r0, 0x44(r31)
/* 802488D8 00245838 88 1F 00 44 */ lbz r0, 0x44(r31)
/* 802488DC 0024583C 28 00 00 00 */ cmplwi r0, 0
/* 802488E0 00245840 41 82 00 10 */ beq lbl_802488F0
/* 802488E4 00245844 54 80 07 FF */ clrlwi. r0, r4, 0x1f
/* 802488E8 00245848 40 81 00 08 */ ble lbl_802488F0
/* 802488EC 0024584C 38 60 00 01 */ li r3, 1
lbl_802488F0:
/* 802488F0 00245850 98 7F 00 45 */ stb r3, 0x45(r31)
lbl_802488F4:
/* 802488F4 00245854 38 60 00 01 */ li r3, 1
lbl_802488F8:
/* 802488F8 00245858 80 01 00 34 */ lwz r0, 0x34(r1)
/* 802488FC 0024585C 83 E1 00 2C */ lwz r31, 0x2c(r1)
/* 80248900 00245860 83 C1 00 28 */ lwz r30, 0x28(r1)
/* 80248904 00245864 83 A1 00 24 */ lwz r29, 0x24(r1)
/* 80248908 00245868 83 81 00 20 */ lwz r28, 0x20(r1)
/* 8024890C 0024586C 7C 08 03 A6 */ mtlr r0
/* 80248910 00245870 38 21 00 30 */ addi r1, r1, 0x30
2022-07-14 05:48:03 +00:00
/* 80248914 00245874 4E 80 00 20 */ blr
2022-04-14 08:02:42 +00:00
2022-08-23 03:54:30 +00:00
.endif
.global Update__11CGBASupportFf
Update__11CGBASupportFf:
2022-04-14 08:02:42 +00:00
/* 80248918 00245878 94 21 FF D0 */ stwu r1, -0x30(r1)
/* 8024891C 0024587C 7C 08 02 A6 */ mflr r0
/* 80248920 00245880 90 01 00 34 */ stw r0, 0x34(r1)
/* 80248924 00245884 DB E1 00 20 */ stfd f31, 0x20(r1)
/* 80248928 00245888 F3 E1 00 28 */ psq_st f31, 40(r1), 0, qr0
/* 8024892C 0024588C 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 80248930 00245890 93 C1 00 18 */ stw r30, 0x18(r1)
/* 80248934 00245894 7C 7F 1B 78 */ mr r31, r3
/* 80248938 00245898 FF E0 08 90 */ fmr f31, f1
/* 8024893C 0024589C 80 A3 00 34 */ lwz r5, 0x34(r3)
/* 80248940 002458A0 28 05 00 08 */ cmplwi r5, 8
2022-08-23 03:54:30 +00:00
/* 80248944 002458A4 41 81 02 10 */ bgt Update_default
/* 80248948 002458A8 3C 80 80 3F */ lis r4, Update_jumptable@ha
2022-04-14 08:02:42 +00:00
/* 8024894C 002458AC 54 A0 10 3A */ slwi r0, r5, 2
2022-08-23 03:54:30 +00:00
/* 80248950 002458B0 38 84 8C 18 */ addi r4, r4, Update_jumptable@l
2022-04-14 08:02:42 +00:00
/* 80248954 002458B4 7C 04 00 2E */ lwzx r0, r4, r0
/* 80248958 002458B8 7C 09 03 A6 */ mtctr r0
2022-07-14 05:48:03 +00:00
/* 8024895C 002458BC 4E 80 04 20 */ bctr
2022-08-23 03:54:30 +00:00
Update_case0:
2022-04-14 08:02:42 +00:00
/* 80248960 002458C0 2C 05 00 00 */ cmpwi r5, 0
2022-08-23 03:54:30 +00:00
/* 80248964 002458C4 40 82 01 F0 */ bne Update_default
2022-04-14 08:02:42 +00:00
/* 80248968 002458C8 80 7F 00 30 */ lwz r3, 0x30(r31)
/* 8024896C 002458CC 81 83 00 00 */ lwz r12, 0(r3)
/* 80248970 002458D0 81 8C 00 10 */ lwz r12, 0x10(r12)
/* 80248974 002458D4 7D 89 03 A6 */ mtctr r12
2022-07-14 05:48:03 +00:00
/* 80248978 002458D8 4E 80 04 21 */ bctrl
2022-04-14 08:02:42 +00:00
/* 8024897C 002458DC 54 60 06 3F */ clrlwi. r0, r3, 0x18
2022-08-23 03:54:30 +00:00
/* 80248980 002458E0 41 82 01 D4 */ beq Update_default
2022-04-14 08:02:42 +00:00
/* 80248984 002458E4 80 7F 00 30 */ lwz r3, 0x30(r31)
/* 80248988 002458E8 28 03 00 00 */ cmplwi r3, 0
/* 8024898C 002458EC 41 82 00 18 */ beq lbl_802489A4
/* 80248990 002458F0 81 83 00 00 */ lwz r12, 0(r3)
/* 80248994 002458F4 38 80 00 01 */ li r4, 1
/* 80248998 002458F8 81 8C 00 08 */ lwz r12, 8(r12)
/* 8024899C 002458FC 7D 89 03 A6 */ mtctr r12
2022-07-14 05:48:03 +00:00
/* 802489A0 00245900 4E 80 04 21 */ bctrl
2022-04-14 08:02:42 +00:00
lbl_802489A4:
/* 802489A4 00245904 38 60 00 00 */ li r3, 0
/* 802489A8 00245908 38 00 00 01 */ li r0, 1
/* 802489AC 0024590C 90 7F 00 30 */ stw r3, 0x30(r31)
/* 802489B0 00245910 90 1F 00 34 */ stw r0, 0x34(r31)
/* 802489B4 00245914 83 FF 00 2C */ lwz r31, 0x2c(r31)
/* 802489B8 00245918 48 13 CA 09 */ bl OSGetTick
/* 802489BC 0024591C 98 7F 00 C8 */ stb r3, 0xc8(r31)
2022-08-23 03:54:30 +00:00
.if version >= 2
/* 80248A5C 002459BC 54 65 C6 3E */ rlwinm r5, r3, 24, 24, 31
/* 80248A60 002459C0 54 64 86 3E */ rlwinm r4, r3, 16, 24, 31
/* 80248A64 002459C4 54 60 46 3E */ srwi r0, r3, 24
/* 80248A68 002459C8 98 BF 00 C9 */ stb r5, 0xc9(r31)
/* 80248A6C 002459CC 98 9F 00 CA */ stb r4, 0xca(r31)
/* 80248A70 002459D0 98 1F 00 CB */ stb r0, 0xcb(r31)
/* 80248A74 002459D4 48 13 86 41 */ bl OSGetFontEncode
/* 80248A78 002459D8 54 60 04 3E */ clrlwi r0, r3, 16
/* 80248A7C 002459DC 28 00 00 01 */ cmplwi r0, 0x1
/* 80248A80 002459E0 40 82 00 18 */ bne lbl_80248A98
/* 80248A84 002459E4 38 60 00 4A */ li r3, 0x4a
/* 80248A88 002459E8 38 00 00 C4 */ li r0, 0xc4
/* 80248A8C 002459EC 98 7F 00 AF */ stb r3, 0xaf(r31)
/* 80248A90 002459F0 98 1F 00 BD */ stb r0, 0xbd(r31)
/* 80248A94 002459F4 48 00 01 80 */ b Update_default
lbl_80248A98:
/* 80248A98 002459F8 38 60 00 45 */ li r3, 0x45
/* 80248A9C 002459FC 38 00 00 C9 */ li r0, 0xc9
/* 80248AA0 00245A00 98 7F 00 AF */ stb r3, 0xaf(r31)
/* 80248AA4 00245A04 98 1F 00 BD */ stb r0, 0xbd(r31)
/* 80248AA8 00245A08 48 00 01 6C */ b Update_default
.else
2022-04-14 08:02:42 +00:00
/* 802489C0 00245920 54 60 C6 3E */ rlwinm r0, r3, 0x18, 0x18, 0x1f
/* 802489C4 00245924 54 65 86 3E */ rlwinm r5, r3, 0x10, 0x18, 0x1f
/* 802489C8 00245928 54 64 46 3E */ srwi r4, r3, 0x18
/* 802489CC 0024592C 98 1F 00 C9 */ stb r0, 0xc9(r31)
/* 802489D0 00245930 38 60 00 45 */ li r3, 0x45
/* 802489D4 00245934 38 00 00 C9 */ li r0, 0xc9
/* 802489D8 00245938 98 BF 00 CA */ stb r5, 0xca(r31)
/* 802489DC 0024593C 98 9F 00 CB */ stb r4, 0xcb(r31)
/* 802489E0 00245940 98 7F 00 AF */ stb r3, 0xaf(r31)
/* 802489E4 00245944 98 1F 00 BD */ stb r0, 0xbd(r31)
2022-08-23 03:54:30 +00:00
/* 802489E8 00245948 48 00 01 6C */ b Update_default
.endif
Update_case2:
2022-04-14 08:02:42 +00:00
/* 802489EC 0024594C C0 02 B8 7C */ lfs f0, lbl_805AD59C@sda21(r2)
/* 802489F0 00245950 38 00 00 03 */ li r0, 3
/* 802489F4 00245954 D0 1F 00 38 */ stfs f0, 0x38(r31)
/* 802489F8 00245958 90 1F 00 34 */ stw r0, 0x34(r31)
2022-08-23 03:54:30 +00:00
Update_case3:
2022-04-14 08:02:42 +00:00
/* 802489FC 0024595C 3B C0 00 01 */ li r30, 1
lbl_80248A00:
/* 80248A00 00245960 7F C3 F3 78 */ mr r3, r30
/* 80248A04 00245964 48 17 74 E5 */ bl SIProbe
/* 80248A08 00245968 3C 03 FF FC */ addis r0, r3, 0xfffc
/* 80248A0C 0024596C 28 00 00 00 */ cmplwi r0, 0
/* 80248A10 00245970 40 82 00 1C */ bne lbl_80248A2C
/* 80248A14 00245974 93 DF 00 40 */ stw r30, 0x40(r31)
/* 80248A18 00245978 38 00 00 04 */ li r0, 4
/* 80248A1C 0024597C C0 02 B8 7C */ lfs f0, lbl_805AD59C@sda21(r2)
/* 80248A20 00245980 90 1F 00 34 */ stw r0, 0x34(r31)
/* 80248A24 00245984 D0 1F 00 38 */ stfs f0, 0x38(r31)
2022-08-23 03:54:30 +00:00
/* 80248A28 00245988 48 00 01 2C */ b Update_default
2022-04-14 08:02:42 +00:00
lbl_80248A2C:
/* 80248A2C 0024598C 3B DE 00 01 */ addi r30, r30, 1
/* 80248A30 00245990 2C 1E 00 04 */ cmpwi r30, 4
/* 80248A34 00245994 41 80 FF CC */ blt lbl_80248A00
/* 80248A38 00245998 C0 3F 00 38 */ lfs f1, 0x38(r31)
/* 80248A3C 0024599C C0 0D 96 F8 */ lfs f0, lbl_805A82B8@sda21(r13)
/* 80248A40 002459A0 EC 21 F8 28 */ fsubs f1, f1, f31
/* 80248A44 002459A4 FC 00 08 40 */ fcmpo cr0, f0, f1
/* 80248A48 002459A8 D0 21 00 0C */ stfs f1, 0xc(r1)
/* 80248A4C 002459AC 40 80 00 0C */ bge lbl_80248A58
/* 80248A50 002459B0 38 61 00 0C */ addi r3, r1, 0xc
/* 80248A54 002459B4 48 00 00 08 */ b lbl_80248A5C
lbl_80248A58:
/* 80248A58 002459B8 38 6D 96 F8 */ addi r3, r13, lbl_805A82B8@sda21
lbl_80248A5C:
/* 80248A5C 002459BC C0 03 00 00 */ lfs f0, 0(r3)
/* 80248A60 002459C0 C0 22 B8 80 */ lfs f1, lbl_805AD5A0@sda21(r2)
/* 80248A64 002459C4 D0 1F 00 38 */ stfs f0, 0x38(r31)
/* 80248A68 002459C8 C0 1F 00 38 */ lfs f0, 0x38(r31)
/* 80248A6C 002459CC FC 01 00 00 */ fcmpu cr0, f1, f0
2022-08-23 03:54:30 +00:00
/* 80248A70 002459D0 40 82 00 E4 */ bne Update_default
2022-04-14 08:02:42 +00:00
/* 80248A74 002459D4 38 00 00 08 */ li r0, 8
/* 80248A78 002459D8 90 1F 00 34 */ stw r0, 0x34(r31)
2022-08-23 03:54:30 +00:00
/* 80248A7C 002459DC 48 00 00 D8 */ b Update_default
Update_case4:
2022-04-14 08:02:42 +00:00
/* 80248A80 002459E0 38 00 00 05 */ li r0, 5
/* 80248A84 002459E4 3C 60 80 25 */ lis r3, joyboot_callback__Fll@ha
2022-04-14 08:02:42 +00:00
/* 80248A88 002459E8 90 1F 00 34 */ stw r0, 0x34(r31)
/* 80248A8C 002459EC 39 23 8D D8 */ addi r9, r3, joyboot_callback__Fll@l
2022-04-14 08:02:42 +00:00
/* 80248A90 002459F0 39 1F 00 3C */ addi r8, r31, 0x3c
/* 80248A94 002459F4 38 A0 00 02 */ li r5, 2
/* 80248A98 002459F8 80 7F 00 40 */ lwz r3, 0x40(r31)
/* 80248A9C 002459FC 80 DF 00 2C */ lwz r6, 0x2c(r31)
/* 80248AA0 00245A00 80 FF 00 14 */ lwz r7, 0x14(r31)
/* 80248AA4 00245A04 54 64 08 3C */ slwi r4, r3, 1
/* 80248AA8 00245A08 48 18 0F B5 */ bl GBAJoyBootAsync
2022-08-23 03:54:30 +00:00
/* 80248AAC 00245A0C 48 00 00 A8 */ b Update_default
Update_case5:
2022-04-14 08:02:42 +00:00
/* 80248AB0 00245A10 80 7F 00 40 */ lwz r3, 0x40(r31)
/* 80248AB4 00245A14 38 9F 00 3C */ addi r4, r31, 0x3c
/* 80248AB8 00245A18 48 18 0E 31 */ bl GBAGetProcessStatus
/* 80248ABC 00245A1C 2C 03 00 02 */ cmpwi r3, 2
2022-08-23 03:54:30 +00:00
/* 80248AC0 00245A20 41 82 00 94 */ beq Update_default
2022-04-14 08:02:42 +00:00
/* 80248AC4 00245A24 80 7F 00 40 */ lwz r3, 0x40(r31)
/* 80248AC8 00245A28 38 9F 00 3C */ addi r4, r31, 0x3c
/* 80248ACC 00245A2C 48 18 0C 89 */ bl GBAGetStatus
/* 80248AD0 00245A30 2C 03 00 01 */ cmpwi r3, 1
/* 80248AD4 00245A34 40 82 00 10 */ bne lbl_80248AE4
/* 80248AD8 00245A38 38 00 00 08 */ li r0, 8
/* 80248ADC 00245A3C 90 1F 00 34 */ stw r0, 0x34(r31)
2022-08-23 03:54:30 +00:00
/* 80248AE0 00245A40 48 00 00 74 */ b Update_default
2022-04-14 08:02:42 +00:00
lbl_80248AE4:
/* 80248AE4 00245A44 C0 02 B8 7C */ lfs f0, lbl_805AD59C@sda21(r2)
/* 80248AE8 00245A48 38 00 00 06 */ li r0, 6
/* 80248AEC 00245A4C D0 1F 00 38 */ stfs f0, 0x38(r31)
/* 80248AF0 00245A50 90 1F 00 34 */ stw r0, 0x34(r31)
2022-08-23 03:54:30 +00:00
/* 80248AF4 00245A54 48 00 00 60 */ b Update_default
Update_case6:
2022-04-14 08:02:42 +00:00
/* 80248AF8 00245A58 4B FF FA DD */ bl PollResponse__11CGBASupportFv
/* 80248AFC 00245A5C 54 60 06 3F */ clrlwi. r0, r3, 0x18
/* 80248B00 00245A60 41 82 00 10 */ beq lbl_80248B10
/* 80248B04 00245A64 38 00 00 07 */ li r0, 7
/* 80248B08 00245A68 90 1F 00 34 */ stw r0, 0x34(r31)
2022-08-23 03:54:30 +00:00
/* 80248B0C 00245A6C 48 00 00 48 */ b Update_default
2022-04-14 08:02:42 +00:00
lbl_80248B10:
/* 80248B10 00245A70 C0 3F 00 38 */ lfs f1, 0x38(r31)
/* 80248B14 00245A74 C0 0D 96 FC */ lfs f0, lbl_805A82BC@sda21(r13)
/* 80248B18 00245A78 EC 21 F8 28 */ fsubs f1, f1, f31
/* 80248B1C 00245A7C FC 00 08 40 */ fcmpo cr0, f0, f1
/* 80248B20 00245A80 D0 21 00 08 */ stfs f1, 8(r1)
/* 80248B24 00245A84 40 80 00 0C */ bge lbl_80248B30
/* 80248B28 00245A88 38 61 00 08 */ addi r3, r1, 8
/* 80248B2C 00245A8C 48 00 00 08 */ b lbl_80248B34
lbl_80248B30:
/* 80248B30 00245A90 38 6D 96 FC */ addi r3, r13, lbl_805A82BC@sda21
lbl_80248B34:
/* 80248B34 00245A94 C0 03 00 00 */ lfs f0, 0(r3)
/* 80248B38 00245A98 C0 22 B8 80 */ lfs f1, lbl_805AD5A0@sda21(r2)
/* 80248B3C 00245A9C D0 1F 00 38 */ stfs f0, 0x38(r31)
/* 80248B40 00245AA0 C0 1F 00 38 */ lfs f0, 0x38(r31)
/* 80248B44 00245AA4 FC 01 00 00 */ fcmpu cr0, f1, f0
2022-08-23 03:54:30 +00:00
/* 80248B48 00245AA8 40 82 00 0C */ bne Update_default
2022-04-14 08:02:42 +00:00
/* 80248B4C 00245AAC 38 00 00 08 */ li r0, 8
/* 80248B50 00245AB0 90 1F 00 34 */ stw r0, 0x34(r31)
2022-08-23 03:54:30 +00:00
Update_default:
2022-04-14 08:02:42 +00:00
/* 80248B54 00245AB4 E3 E1 00 28 */ psq_l f31, 40(r1), 0, qr0
/* 80248B58 00245AB8 80 01 00 34 */ lwz r0, 0x34(r1)
/* 80248B5C 00245ABC CB E1 00 20 */ lfd f31, 0x20(r1)
/* 80248B60 00245AC0 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 80248B64 00245AC4 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 80248B68 00245AC8 7C 08 03 A6 */ mtlr r0
/* 80248B6C 00245ACC 38 21 00 30 */ addi r1, r1, 0x30
2022-07-14 05:48:03 +00:00
/* 80248B70 00245AD0 4E 80 00 20 */ blr
2022-04-14 08:02:42 +00:00
2022-08-23 03:54:30 +00:00
.if version >= 2
.global IsReady__11CGBASupportFv
IsReady__11CGBASupportFv:
/* 80248C34 00245B94 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 80248C38 00245B98 7C 08 02 A6 */ mflr r0
/* 80248C3C 00245B9C 90 01 00 14 */ stw r0, 0x14(r1)
/* 80248C40 00245BA0 93 E1 00 0C */ stw r31, 0xc(r1)
/* 80248C44 00245BA4 7C 7F 1B 78 */ mr r31, r3
/* 80248C48 00245BA8 80 03 00 34 */ lwz r0, 0x34(r3)
/* 80248C4C 00245BAC 2C 00 00 00 */ cmpwi r0, 0x0
/* 80248C50 00245BB0 41 82 00 0C */ beq lbl_80248C5C
/* 80248C54 00245BB4 38 60 00 01 */ li r3, 0x1
/* 80248C58 00245BB8 48 00 00 B4 */ b lbl_80248D0C
lbl_80248C5C:
/* 80248C5C 00245BBC 80 7F 00 30 */ lwz r3, 0x30(r31)
/* 80248C60 00245BC0 81 83 00 00 */ lwz r12, 0x0(r3)
/* 80248C64 00245BC4 81 8C 00 10 */ lwz r12, 0x10(r12)
/* 80248C68 00245BC8 7D 89 03 A6 */ mtctr r12
/* 80248C6C 00245BCC 4E 80 04 21 */ bctrl
/* 80248C70 00245BD0 54 60 06 3F */ clrlwi. r0, r3, 24
/* 80248C74 00245BD4 41 82 00 94 */ beq lbl_80248D08
/* 80248C78 00245BD8 80 7F 00 30 */ lwz r3, 0x30(r31)
/* 80248C7C 00245BDC 28 03 00 00 */ cmplwi r3, 0x0
/* 80248C80 00245BE0 41 82 00 18 */ beq lbl_80248C98
/* 80248C84 00245BE4 81 83 00 00 */ lwz r12, 0x0(r3)
/* 80248C88 00245BE8 38 80 00 01 */ li r4, 0x1
/* 80248C8C 00245BEC 81 8C 00 08 */ lwz r12, 0x8(r12)
/* 80248C90 00245BF0 7D 89 03 A6 */ mtctr r12
/* 80248C94 00245BF4 4E 80 04 21 */ bctrl
lbl_80248C98:
/* 80248C98 00245BF8 38 60 00 00 */ li r3, 0x0
/* 80248C9C 00245BFC 38 00 00 01 */ li r0, 0x1
/* 80248CA0 00245C00 90 7F 00 30 */ stw r3, 0x30(r31)
/* 80248CA4 00245C04 90 1F 00 34 */ stw r0, 0x34(r31)
/* 80248CA8 00245C08 83 FF 00 2C */ lwz r31, 0x2c(r31)
/* 80248CAC 00245C0C 48 13 C8 19 */ bl OSGetTick
/* 80248CB0 00245C10 98 7F 00 C8 */ stb r3, 0xc8(r31)
/* 80248CB4 00245C14 54 65 C6 3E */ rlwinm r5, r3, 24, 24, 31
/* 80248CB8 00245C18 54 64 86 3E */ rlwinm r4, r3, 16, 24, 31
/* 80248CBC 00245C1C 54 60 46 3E */ srwi r0, r3, 24
/* 80248CC0 00245C20 98 BF 00 C9 */ stb r5, 0xc9(r31)
/* 80248CC4 00245C24 98 9F 00 CA */ stb r4, 0xca(r31)
/* 80248CC8 00245C28 98 1F 00 CB */ stb r0, 0xcb(r31)
/* 80248CCC 00245C2C 48 13 83 E9 */ bl OSGetFontEncode
/* 80248CD0 00245C30 54 60 04 3E */ clrlwi r0, r3, 16
/* 80248CD4 00245C34 28 00 00 01 */ cmplwi r0, 0x1
/* 80248CD8 00245C38 40 82 00 18 */ bne lbl_80248CF0
/* 80248CDC 00245C3C 38 60 00 4A */ li r3, 0x4a
/* 80248CE0 00245C40 38 00 00 C4 */ li r0, 0xc4
/* 80248CE4 00245C44 98 7F 00 AF */ stb r3, 0xaf(r31)
/* 80248CE8 00245C48 98 1F 00 BD */ stb r0, 0xbd(r31)
/* 80248CEC 00245C4C 48 00 00 14 */ b lbl_80248D00
lbl_80248CF0:
/* 80248CF0 00245C50 38 60 00 45 */ li r3, 0x45
/* 80248CF4 00245C54 38 00 00 C9 */ li r0, 0xc9
/* 80248CF8 00245C58 98 7F 00 AF */ stb r3, 0xaf(r31)
/* 80248CFC 00245C5C 98 1F 00 BD */ stb r0, 0xbd(r31)
lbl_80248D00:
/* 80248D00 00245C60 38 60 00 01 */ li r3, 0x1
/* 80248D04 00245C64 48 00 00 08 */ b lbl_80248D0C
lbl_80248D08:
/* 80248D08 00245C68 38 60 00 00 */ li r3, 0x0
lbl_80248D0C:
/* 80248D0C 00245C6C 80 01 00 14 */ lwz r0, 0x14(r1)
/* 80248D10 00245C70 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 80248D14 00245C74 7C 08 03 A6 */ mtlr r0
/* 80248D18 00245C78 38 21 00 10 */ addi r1, r1, 0x10
/* 80248D1C 00245C7C 4E 80 00 20 */ blr
.else
2022-04-14 08:02:42 +00:00
.global IsReady__11CGBASupportFv
IsReady__11CGBASupportFv:
/* 80248B74 00245AD4 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 80248B78 00245AD8 7C 08 02 A6 */ mflr r0
/* 80248B7C 00245ADC 90 01 00 14 */ stw r0, 0x14(r1)
/* 80248B80 00245AE0 93 E1 00 0C */ stw r31, 0xc(r1)
/* 80248B84 00245AE4 7C 7F 1B 78 */ mr r31, r3
/* 80248B88 00245AE8 80 03 00 34 */ lwz r0, 0x34(r3)
/* 80248B8C 00245AEC 2C 00 00 00 */ cmpwi r0, 0
/* 80248B90 00245AF0 41 82 00 0C */ beq lbl_80248B9C
/* 80248B94 00245AF4 38 60 00 01 */ li r3, 1
/* 80248B98 00245AF8 48 00 00 90 */ b lbl_80248C28
lbl_80248B9C:
/* 80248B9C 00245AFC 80 7F 00 30 */ lwz r3, 0x30(r31)
/* 80248BA0 00245B00 81 83 00 00 */ lwz r12, 0(r3)
/* 80248BA4 00245B04 81 8C 00 10 */ lwz r12, 0x10(r12)
/* 80248BA8 00245B08 7D 89 03 A6 */ mtctr r12
2022-07-14 05:48:03 +00:00
/* 80248BAC 00245B0C 4E 80 04 21 */ bctrl
2022-04-14 08:02:42 +00:00
/* 80248BB0 00245B10 54 60 06 3F */ clrlwi. r0, r3, 0x18
/* 80248BB4 00245B14 41 82 00 70 */ beq lbl_80248C24
/* 80248BB8 00245B18 80 7F 00 30 */ lwz r3, 0x30(r31)
/* 80248BBC 00245B1C 28 03 00 00 */ cmplwi r3, 0
/* 80248BC0 00245B20 41 82 00 18 */ beq lbl_80248BD8
/* 80248BC4 00245B24 81 83 00 00 */ lwz r12, 0(r3)
/* 80248BC8 00245B28 38 80 00 01 */ li r4, 1
/* 80248BCC 00245B2C 81 8C 00 08 */ lwz r12, 8(r12)
/* 80248BD0 00245B30 7D 89 03 A6 */ mtctr r12
2022-07-14 05:48:03 +00:00
/* 80248BD4 00245B34 4E 80 04 21 */ bctrl
2022-04-14 08:02:42 +00:00
lbl_80248BD8:
/* 80248BD8 00245B38 38 60 00 00 */ li r3, 0
/* 80248BDC 00245B3C 38 00 00 01 */ li r0, 1
/* 80248BE0 00245B40 90 7F 00 30 */ stw r3, 0x30(r31)
/* 80248BE4 00245B44 90 1F 00 34 */ stw r0, 0x34(r31)
/* 80248BE8 00245B48 83 FF 00 2C */ lwz r31, 0x2c(r31)
/* 80248BEC 00245B4C 48 13 C7 D5 */ bl OSGetTick
/* 80248BF0 00245B50 98 7F 00 C8 */ stb r3, 0xc8(r31)
/* 80248BF4 00245B54 54 60 C6 3E */ rlwinm r0, r3, 0x18, 0x18, 0x1f
/* 80248BF8 00245B58 54 66 86 3E */ rlwinm r6, r3, 0x10, 0x18, 0x1f
/* 80248BFC 00245B5C 54 65 46 3E */ srwi r5, r3, 0x18
/* 80248C00 00245B60 98 1F 00 C9 */ stb r0, 0xc9(r31)
/* 80248C04 00245B64 38 80 00 45 */ li r4, 0x45
/* 80248C08 00245B68 38 00 00 C9 */ li r0, 0xc9
/* 80248C0C 00245B6C 38 60 00 01 */ li r3, 1
/* 80248C10 00245B70 98 DF 00 CA */ stb r6, 0xca(r31)
/* 80248C14 00245B74 98 BF 00 CB */ stb r5, 0xcb(r31)
/* 80248C18 00245B78 98 9F 00 AF */ stb r4, 0xaf(r31)
/* 80248C1C 00245B7C 98 1F 00 BD */ stb r0, 0xbd(r31)
/* 80248C20 00245B80 48 00 00 08 */ b lbl_80248C28
lbl_80248C24:
/* 80248C24 00245B84 38 60 00 00 */ li r3, 0
lbl_80248C28:
/* 80248C28 00245B88 80 01 00 14 */ lwz r0, 0x14(r1)
/* 80248C2C 00245B8C 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 80248C30 00245B90 7C 08 03 A6 */ mtlr r0
/* 80248C34 00245B94 38 21 00 10 */ addi r1, r1, 0x10
2022-07-14 05:48:03 +00:00
/* 80248C38 00245B98 4E 80 00 20 */ blr
2022-04-14 08:02:42 +00:00
2022-08-23 03:54:30 +00:00
.endif
2022-04-14 08:02:42 +00:00
.global StartLink__11CGBASupportFv
StartLink__11CGBASupportFv:
/* 80248C3C 00245B9C 38 80 00 02 */ li r4, 2
/* 80248C40 00245BA0 38 00 FF FF */ li r0, -1
/* 80248C44 00245BA4 90 83 00 34 */ stw r4, 0x34(r3)
/* 80248C48 00245BA8 90 03 00 40 */ stw r0, 0x40(r3)
2022-07-14 05:48:03 +00:00
/* 80248C4C 00245BAC 4E 80 00 20 */ blr
2022-04-14 08:02:42 +00:00
.global InitializeSupport__11CGBASupportFv
InitializeSupport__11CGBASupportFv:
/* 80248C50 00245BB0 38 00 00 01 */ li r0, 1
/* 80248C54 00245BB4 C0 02 B8 80 */ lfs f0, lbl_805AD5A0@sda21(r2)
/* 80248C58 00245BB8 90 03 00 34 */ stw r0, 0x34(r3)
/* 80248C5C 00245BBC 38 80 00 00 */ li r4, 0
/* 80248C60 00245BC0 38 00 FF FF */ li r0, -1
/* 80248C64 00245BC4 D0 03 00 38 */ stfs f0, 0x38(r3)
/* 80248C68 00245BC8 98 83 00 3C */ stb r4, 0x3c(r3)
/* 80248C6C 00245BCC 90 03 00 40 */ stw r0, 0x40(r3)
/* 80248C70 00245BD0 98 83 00 44 */ stb r4, 0x44(r3)
/* 80248C74 00245BD4 98 83 00 45 */ stb r4, 0x45(r3)
2022-07-14 05:48:03 +00:00
/* 80248C78 00245BD8 4E 80 00 20 */ blr
2022-04-14 08:02:42 +00:00
.global __dt__11CGBASupportFv
__dt__11CGBASupportFv:
/* 80248C7C 00245BDC 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 80248C80 00245BE0 7C 08 02 A6 */ mflr r0
/* 80248C84 00245BE4 90 01 00 14 */ stw r0, 0x14(r1)
/* 80248C88 00245BE8 93 E1 00 0C */ stw r31, 0xc(r1)
/* 80248C8C 00245BEC 7C 9F 23 78 */ mr r31, r4
/* 80248C90 00245BF0 93 C1 00 08 */ stw r30, 8(r1)
/* 80248C94 00245BF4 7C 7E 1B 79 */ or. r30, r3, r3
/* 80248C98 00245BF8 41 82 00 60 */ beq lbl_80248CF8
/* 80248C9C 00245BFC 38 60 00 00 */ li r3, 0
/* 80248CA0 00245C00 34 1E 00 30 */ addic. r0, r30, 0x30
/* 80248CA4 00245C04 90 6D A5 50 */ stw r3, g_GBA@sda21(r13)
2022-04-14 08:02:42 +00:00
/* 80248CA8 00245C08 41 82 00 24 */ beq lbl_80248CCC
/* 80248CAC 00245C0C 80 7E 00 30 */ lwz r3, 0x30(r30)
/* 80248CB0 00245C10 28 03 00 00 */ cmplwi r3, 0
/* 80248CB4 00245C14 41 82 00 18 */ beq lbl_80248CCC
/* 80248CB8 00245C18 81 83 00 00 */ lwz r12, 0(r3)
/* 80248CBC 00245C1C 38 80 00 01 */ li r4, 1
/* 80248CC0 00245C20 81 8C 00 08 */ lwz r12, 8(r12)
/* 80248CC4 00245C24 7D 89 03 A6 */ mtctr r12
2022-07-14 05:48:03 +00:00
/* 80248CC8 00245C28 4E 80 04 21 */ bctrl
2022-04-14 08:02:42 +00:00
lbl_80248CCC:
/* 80248CCC 00245C2C 34 1E 00 2C */ addic. r0, r30, 0x2c
/* 80248CD0 00245C30 41 82 00 0C */ beq lbl_80248CDC
/* 80248CD4 00245C34 80 7E 00 2C */ lwz r3, 0x2c(r30)
/* 80248CD8 00245C38 48 0C CC 59 */ bl Free__7CMemoryFPCv
lbl_80248CDC:
/* 80248CDC 00245C3C 7F C3 F3 78 */ mr r3, r30
/* 80248CE0 00245C40 38 80 FF FF */ li r4, -1
/* 80248CE4 00245C44 48 10 6F 2D */ bl __dt__8CDvdFileFv
/* 80248CE8 00245C48 7F E0 07 35 */ extsh. r0, r31
/* 80248CEC 00245C4C 40 81 00 0C */ ble lbl_80248CF8
/* 80248CF0 00245C50 7F C3 F3 78 */ mr r3, r30
/* 80248CF4 00245C54 48 0C CC 3D */ bl Free__7CMemoryFPCv
lbl_80248CF8:
/* 80248CF8 00245C58 80 01 00 14 */ lwz r0, 0x14(r1)
/* 80248CFC 00245C5C 7F C3 F3 78 */ mr r3, r30
/* 80248D00 00245C60 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 80248D04 00245C64 83 C1 00 08 */ lwz r30, 8(r1)
/* 80248D08 00245C68 7C 08 03 A6 */ mtlr r0
/* 80248D0C 00245C6C 38 21 00 10 */ addi r1, r1, 0x10
2022-07-14 05:48:03 +00:00
/* 80248D10 00245C70 4E 80 00 20 */ blr
2022-04-14 08:02:42 +00:00
2022-08-23 03:54:30 +00:00
.if version >= 2
.global __ct__11CGBASupportFv
__ct__11CGBASupportFv:
/* 80248DF8 00245D58 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 80248DFC 00245D5C 7C 08 02 A6 */ mflr r0
/* 80248E00 00245D60 90 01 00 24 */ stw r0, 0x24(r1)
/* 80248E04 00245D64 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 80248E08 00245D68 7C 7F 1B 78 */ mr r31, r3
/* 80248E0C 00245D6C 48 13 82 A9 */ bl OSGetFontEncode
/* 80248E10 00245D70 54 60 04 3E */ clrlwi r0, r3, 16
/* 80248E14 00245D74 3C 80 80 3D */ lis r4, lbl_803D4768@ha
/* 80248E18 00245D78 20 00 00 01 */ subfic r0, r0, 0x1
/* 80248E1C 00245D7C 7F E3 FB 78 */ mr r3, r31
/* 80248E20 00245D80 7C 00 00 34 */ cntlzw r0, r0
/* 80248E24 00245D84 38 A4 48 68 */ addi r5, r4, lbl_803D4768@l
/* 80248E28 00245D88 54 00 DE 3F */ rlwinm. r0, r0, 27, 24, 31
/* 80248E2C 00245D8C 38 85 00 0F */ addi r4, r5, 0xf
/* 80248E30 00245D90 41 82 00 08 */ beq lbl_80248E38
/* 80248E34 00245D94 7C A4 2B 78 */ mr r4, r5
lbl_80248E38:
/* 80248E38 00245D98 48 10 70 2D */ bl __ct__8CDvdFileFPCc
/* 80248E3C 00245D9C 80 DF 00 14 */ lwz r6, 0x14(r31)
/* 80248E40 00245DA0 3C A0 80 3D */ lis r5, lbl_803D4768@ha
/* 80248E44 00245DA4 38 A5 48 68 */ addi r5, r5, lbl_803D4768@l
2022-10-15 04:33:23 +00:00
/* 80248E48 00245DA8 3C 80 80 3D */ lis r4, kUnknownType__10CCallStack@ha
2022-08-23 03:54:30 +00:00
/* 80248E4C 00245DAC 38 06 00 1F */ addi r0, r6, 0x1f
/* 80248E50 00245DB0 38 61 00 08 */ addi r3, r1, 0x8
/* 80248E54 00245DB4 54 00 00 34 */ rlwinm r0, r0, 0, 0, 26
2022-10-15 04:33:23 +00:00
/* 80248E58 00245DB8 38 C4 6B B8 */ addi r6, r4, kUnknownType__10CCallStack@l
2022-08-23 03:54:30 +00:00
/* 80248E5C 00245DBC 90 1F 00 28 */ stw r0, 0x28(r31)
/* 80248E60 00245DC0 38 A5 00 1E */ addi r5, r5, 0x1e
/* 80248E64 00245DC4 38 80 FF FF */ li r4, -0x1
/* 80248E68 00245DC8 48 08 D6 A9 */ bl __ct__10CCallStackFUiPCcPCc
/* 80248E6C 00245DCC 7C 67 1B 78 */ mr r7, r3
/* 80248E70 00245DD0 80 7F 00 28 */ lwz r3, 0x28(r31)
/* 80248E74 00245DD4 38 80 00 02 */ li r4, 0x2
/* 80248E78 00245DD8 38 A0 00 01 */ li r5, 0x1
/* 80248E7C 00245DDC 38 C0 00 00 */ li r6, 0x0
/* 80248E80 00245DE0 48 0C CC 85 */ bl Alloc__7CMemoryFUlQ210IAllocator5EHintQ210IAllocator6EScopeQ210IAllocator5ETypeRC10CCallStack
/* 80248E84 00245DE4 90 7F 00 2C */ stw r3, 0x2c(r31)
/* 80248E88 00245DE8 7F E3 FB 78 */ mr r3, r31
/* 80248E8C 00245DEC 80 9F 00 2C */ lwz r4, 0x2c(r31)
/* 80248E90 00245DF0 80 BF 00 28 */ lwz r5, 0x28(r31)
/* 80248E94 00245DF4 48 10 6E E9 */ bl SyncRead__8CDvdFileFPvUi
/* 80248E98 00245DF8 90 7F 00 30 */ stw r3, 0x30(r31)
/* 80248E9C 00245DFC 38 60 00 00 */ li r3, 0x0
/* 80248EA0 00245E00 C0 02 B8 7C */ lfs f0, lbl_805AD5A0@sda21(r2)
/* 80248EA4 00245E04 38 00 FF FF */ li r0, -0x1
/* 80248EA8 00245E08 90 7F 00 34 */ stw r3, 0x34(r31)
/* 80248EAC 00245E0C D0 1F 00 38 */ stfs f0, 0x38(r31)
/* 80248EB0 00245E10 98 7F 00 3C */ stb r3, 0x3c(r31)
/* 80248EB4 00245E14 90 1F 00 40 */ stw r0, 0x40(r31)
/* 80248EB8 00245E18 98 7F 00 44 */ stb r3, 0x44(r31)
/* 80248EBC 00245E1C 98 7F 00 45 */ stb r3, 0x45(r31)
/* 80248EC0 00245E20 48 18 08 91 */ bl GBAInit
/* 80248EC4 00245E24 93 ED A5 50 */ stw r31, g_GBA@sda21(r13)
2022-08-23 03:54:30 +00:00
/* 80248EC8 00245E28 48 13 81 ED */ bl OSGetFontEncode
/* 80248ECC 00245E2C 80 01 00 24 */ lwz r0, 0x24(r1)
/* 80248ED0 00245E30 7F E3 FB 78 */ mr r3, r31
/* 80248ED4 00245E34 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 80248ED8 00245E38 7C 08 03 A6 */ mtlr r0
/* 80248EDC 00245E3C 38 21 00 20 */ addi r1, r1, 0x20
/* 80248EE0 00245E40 4E 80 00 20 */ blr
.else
2022-04-14 08:02:42 +00:00
.global __ct__11CGBASupportFv
__ct__11CGBASupportFv:
/* 80248D14 00245C74 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 80248D18 00245C78 7C 08 02 A6 */ mflr r0
/* 80248D1C 00245C7C 3C 80 80 3D */ lis r4, lbl_803D4768@ha
/* 80248D20 00245C80 90 01 00 24 */ stw r0, 0x24(r1)
/* 80248D24 00245C84 38 84 47 68 */ addi r4, r4, lbl_803D4768@l
/* 80248D28 00245C88 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 80248D2C 00245C8C 7C 7F 1B 78 */ mr r31, r3
/* 80248D30 00245C90 48 10 6F A1 */ bl __ct__8CDvdFileFPCc
/* 80248D34 00245C94 80 DF 00 14 */ lwz r6, 0x14(r31)
/* 80248D38 00245C98 3C A0 80 3D */ lis r5, lbl_803D4768@ha
/* 80248D3C 00245C9C 38 A5 47 68 */ addi r5, r5, lbl_803D4768@l
2022-10-15 04:33:23 +00:00
/* 80248D40 00245CA0 3C 80 80 3D */ lis r4, kUnknownType__10CCallStack@ha
2022-04-14 08:02:42 +00:00
/* 80248D44 00245CA4 38 06 00 1F */ addi r0, r6, 0x1f
/* 80248D48 00245CA8 38 61 00 08 */ addi r3, r1, 8
/* 80248D4C 00245CAC 54 00 00 34 */ rlwinm r0, r0, 0, 0, 0x1a
2022-10-15 04:33:23 +00:00
/* 80248D50 00245CB0 38 C4 6A A8 */ addi r6, r4, kUnknownType__10CCallStack@l
2022-04-14 08:02:42 +00:00
/* 80248D54 00245CB4 90 1F 00 28 */ stw r0, 0x28(r31)
/* 80248D58 00245CB8 38 A5 00 0F */ addi r5, r5, 0xf
/* 80248D5C 00245CBC 38 80 FF FF */ li r4, -1
/* 80248D60 00245CC0 48 08 D6 75 */ bl __ct__10CCallStackFUiPCcPCc
/* 80248D64 00245CC4 7C 67 1B 78 */ mr r7, r3
/* 80248D68 00245CC8 80 7F 00 28 */ lwz r3, 0x28(r31)
/* 80248D6C 00245CCC 38 80 00 02 */ li r4, 2
/* 80248D70 00245CD0 38 A0 00 01 */ li r5, 1
/* 80248D74 00245CD4 38 C0 00 00 */ li r6, 0
/* 80248D78 00245CD8 48 0C CC 1D */ bl Alloc__7CMemoryFUlQ210IAllocator5EHintQ210IAllocator6EScopeQ210IAllocator5ETypeRC10CCallStack
/* 80248D7C 00245CDC 90 7F 00 2C */ stw r3, 0x2c(r31)
/* 80248D80 00245CE0 7F E3 FB 78 */ mr r3, r31
/* 80248D84 00245CE4 80 9F 00 2C */ lwz r4, 0x2c(r31)
/* 80248D88 00245CE8 80 BF 00 28 */ lwz r5, 0x28(r31)
/* 80248D8C 00245CEC 48 10 6E 5D */ bl SyncRead__8CDvdFileFPvUi
/* 80248D90 00245CF0 90 7F 00 30 */ stw r3, 0x30(r31)
/* 80248D94 00245CF4 38 60 00 00 */ li r3, 0
/* 80248D98 00245CF8 C0 02 B8 80 */ lfs f0, lbl_805AD5A0@sda21(r2)
/* 80248D9C 00245CFC 38 00 FF FF */ li r0, -1
/* 80248DA0 00245D00 90 7F 00 34 */ stw r3, 0x34(r31)
/* 80248DA4 00245D04 D0 1F 00 38 */ stfs f0, 0x38(r31)
/* 80248DA8 00245D08 98 7F 00 3C */ stb r3, 0x3c(r31)
/* 80248DAC 00245D0C 90 1F 00 40 */ stw r0, 0x40(r31)
/* 80248DB0 00245D10 98 7F 00 44 */ stb r3, 0x44(r31)
/* 80248DB4 00245D14 98 7F 00 45 */ stb r3, 0x45(r31)
/* 80248DB8 00245D18 48 18 08 95 */ bl GBAInit
/* 80248DBC 00245D1C 93 ED A5 50 */ stw r31, g_GBA@sda21(r13)
2022-04-14 08:02:42 +00:00
/* 80248DC0 00245D20 7F E3 FB 78 */ mr r3, r31
/* 80248DC4 00245D24 80 01 00 24 */ lwz r0, 0x24(r1)
/* 80248DC8 00245D28 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 80248DCC 00245D2C 7C 08 03 A6 */ mtlr r0
/* 80248DD0 00245D30 38 21 00 20 */ addi r1, r1, 0x20
2022-07-14 05:48:03 +00:00
/* 80248DD4 00245D34 4E 80 00 20 */ blr
2022-04-14 08:02:42 +00:00
2022-08-23 03:54:30 +00:00
.endif
.global joyboot_callback__Fll
joyboot_callback__Fll:
2022-07-14 05:48:03 +00:00
/* 80248DD8 00245D38 4E 80 00 20 */ blr
2022-07-18 05:20:04 +00:00
.section .sdata2, "a"
.balign 8
2022-08-23 03:54:30 +00:00
.if version < 2
2022-07-18 05:20:04 +00:00
.global lbl_805AD598
lbl_805AD598:
# ROM: 0x3F9E38
.4byte 0x414D5445
2022-08-23 03:54:30 +00:00
.endif
2022-07-18 05:20:04 +00:00
.global lbl_805AD59C
lbl_805AD59C:
# ROM: 0x3F9E3C
.float 4.0
.global lbl_805AD5A0
lbl_805AD5A0:
# ROM: 0x3F9E40
.4byte 0
2022-07-18 05:21:27 +00:00
.section .rodata
.balign 8
2022-07-18 05:21:27 +00:00
.global lbl_803D4768
lbl_803D4768:
2022-08-23 03:54:30 +00:00
.if version >= 2
.asciz "client_jap.bin"
.endif
2022-07-18 05:21:27 +00:00
# ROM: 0x3D1768
.asciz "client_pad.bin"
2022-08-23 03:54:30 +00:00
.asciz "??(??)"
2022-07-18 05:21:27 +00:00
.balign 4