donut-decomp/asm/TRK_Hollywood_Revolution/targimpl.s

1900 lines
87 KiB
ArmAsm
Raw Normal View History

2022-10-16 16:05:58 +00:00
.include "macros.inc"
.section .text, "ax" # 0x80006A00 - 0x80406260 ; 0x003FF860
2022-10-16 16:31:36 +00:00
.global TRKValidMemory32
TRKValidMemory32:
2022-10-16 16:05:58 +00:00
/* 80018884 000146C4 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 80018888 000146C8 7C 08 02 A6 */ mflr r0
/* 8001888C 000146CC 7C 84 1A 14 */ add r4, r4, r3
/* 80018890 000146D0 38 C0 07 00 */ li r6, 0x700
/* 80018894 000146D4 90 01 00 14 */ stw r0, 0x14(r1)
/* 80018898 000146D8 93 E1 00 0C */ stw r31, 0xc(r1)
/* 8001889C 000146DC 3B E4 FF FF */ addi r31, r4, -0x1
/* 800188A0 000146E0 7C 1F 18 40 */ cmplw r31, r3
/* 800188A4 000146E4 93 C1 00 08 */ stw r30, 0x8(r1)
/* 800188A8 000146E8 7C BE 2B 78 */ mr r30, r5
/* 800188AC 000146EC 40 80 00 0C */ bge lbl_800188B8
/* 800188B0 000146F0 38 60 07 00 */ li r3, 0x700
/* 800188B4 000146F4 48 00 00 B0 */ b lbl_80018964
.global lbl_800188B8
lbl_800188B8:
2022-10-16 16:31:36 +00:00
/* 800188B8 000146F8 3C 80 80 40 */ lis r4, gTRKMemMap@ha
/* 800188BC 000146FC 38 84 77 78 */ addi r4, r4, gTRKMemMap@l
2022-10-16 16:05:58 +00:00
/* 800188C0 00014700 80 04 00 04 */ lwz r0, 0x4(r4)
/* 800188C4 00014704 7C 03 00 40 */ cmplw r3, r0
/* 800188C8 00014708 41 81 00 98 */ bgt lbl_80018960
/* 800188CC 0001470C 80 04 00 00 */ lwz r0, 0x0(r4)
/* 800188D0 00014710 7C 1F 00 40 */ cmplw r31, r0
/* 800188D4 00014714 41 80 00 8C */ blt lbl_80018960
/* 800188D8 00014718 2C 05 00 00 */ cmpwi r5, 0x0
/* 800188DC 0001471C 40 82 00 10 */ bne lbl_800188EC
/* 800188E0 00014720 80 04 00 08 */ lwz r0, 0x8(r4)
/* 800188E4 00014724 2C 00 00 00 */ cmpwi r0, 0x0
/* 800188E8 00014728 41 82 00 20 */ beq lbl_80018908
.global lbl_800188EC
lbl_800188EC:
/* 800188EC 0001472C 2C 05 00 01 */ cmpwi r5, 0x1
/* 800188F0 00014730 40 82 00 20 */ bne lbl_80018910
2022-10-16 16:31:36 +00:00
/* 800188F4 00014734 3C 80 80 40 */ lis r4, gTRKMemMap@ha
/* 800188F8 00014738 38 84 77 78 */ addi r4, r4, gTRKMemMap@l
2022-10-16 16:05:58 +00:00
/* 800188FC 0001473C 80 04 00 0C */ lwz r0, 0xc(r4)
/* 80018900 00014740 2C 00 00 00 */ cmpwi r0, 0x0
/* 80018904 00014744 40 82 00 0C */ bne lbl_80018910
.global lbl_80018908
lbl_80018908:
/* 80018908 00014748 38 C0 07 00 */ li r6, 0x700
/* 8001890C 0001474C 48 00 00 54 */ b lbl_80018960
.global lbl_80018910
lbl_80018910:
2022-10-16 16:31:36 +00:00
/* 80018910 00014750 3C 80 80 40 */ lis r4, gTRKMemMap@ha
2022-10-16 16:05:58 +00:00
/* 80018914 00014754 38 C0 00 00 */ li r6, 0x0
2022-10-16 16:31:36 +00:00
/* 80018918 00014758 80 04 77 78 */ lwz r0, gTRKMemMap@l(r4)
2022-10-16 16:05:58 +00:00
/* 8001891C 0001475C 7C 03 00 40 */ cmplw r3, r0
/* 80018920 00014760 40 80 00 14 */ bge lbl_80018934
/* 80018924 00014764 7F C5 F3 78 */ mr r5, r30
/* 80018928 00014768 7C 83 00 50 */ subf r4, r3, r0
2022-10-16 16:31:36 +00:00
/* 8001892C 0001476C 4B FF FF 59 */ bl TRKValidMemory32
2022-10-16 16:05:58 +00:00
/* 80018930 00014770 7C 66 1B 78 */ mr r6, r3
.global lbl_80018934
lbl_80018934:
/* 80018934 00014774 2C 06 00 00 */ cmpwi r6, 0x0
/* 80018938 00014778 40 82 00 28 */ bne lbl_80018960
2022-10-16 16:31:36 +00:00
/* 8001893C 0001477C 3C 60 80 40 */ lis r3, gTRKMemMap@ha
/* 80018940 00014780 38 63 77 78 */ addi r3, r3, gTRKMemMap@l
2022-10-16 16:05:58 +00:00
/* 80018944 00014784 80 63 00 04 */ lwz r3, 0x4(r3)
/* 80018948 00014788 7C 1F 18 40 */ cmplw r31, r3
/* 8001894C 0001478C 40 81 00 14 */ ble lbl_80018960
/* 80018950 00014790 7F C5 F3 78 */ mr r5, r30
/* 80018954 00014794 7C 83 F8 50 */ subf r4, r3, r31
2022-10-16 16:31:36 +00:00
/* 80018958 00014798 4B FF FF 2D */ bl TRKValidMemory32
2022-10-16 16:05:58 +00:00
/* 8001895C 0001479C 7C 66 1B 78 */ mr r6, r3
.global lbl_80018960
lbl_80018960:
/* 80018960 000147A0 7C C3 33 78 */ mr r3, r6
.global lbl_80018964
lbl_80018964:
/* 80018964 000147A4 80 01 00 14 */ lwz r0, 0x14(r1)
/* 80018968 000147A8 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 8001896C 000147AC 83 C1 00 08 */ lwz r30, 0x8(r1)
/* 80018970 000147B0 7C 08 03 A6 */ mtlr r0
/* 80018974 000147B4 38 21 00 10 */ addi r1, r1, 0x10
/* 80018978 000147B8 4E 80 00 20 */ blr
2022-10-16 16:31:36 +00:00
.global TRK_ppc_memcpy
TRK_ppc_memcpy:
2022-10-16 16:05:58 +00:00
/* 8001897C 000147BC 94 21 FF D0 */ stwu r1, -0x30(r1)
/* 80018980 000147C0 7C 08 02 A6 */ mflr r0
/* 80018984 000147C4 90 01 00 34 */ stw r0, 0x34(r1)
/* 80018988 000147C8 BF 01 00 10 */ stmw r24, 0x10(r1)
/* 8001898C 000147CC 7C 7D 1B 78 */ mr r29, r3
/* 80018990 000147D0 7C 9E 23 78 */ mr r30, r4
/* 80018994 000147D4 7C BA 2B 78 */ mr r26, r5
/* 80018998 000147D8 7C DB 33 78 */ mr r27, r6
/* 8001899C 000147DC 7C FC 3B 78 */ mr r28, r7
2022-10-16 16:31:36 +00:00
/* 800189A0 000147E0 48 00 17 11 */ bl PPCMfmsr
2022-10-16 16:05:58 +00:00
/* 800189A4 000147E4 7C 7F 1B 78 */ mr r31, r3
/* 800189A8 000147E8 3B 20 00 FF */ li r25, 0xff
/* 800189AC 000147EC 48 00 00 78 */ b lbl_80018A24
.global lbl_800189B0
lbl_800189B0:
/* 800189B0 000147F0 7F 83 E3 78 */ mr r3, r28
2022-10-16 16:31:36 +00:00
/* 800189B4 000147F4 48 00 17 0D */ bl PPCMtmsr
2022-10-16 16:05:58 +00:00
/* 800189B8 000147F8 57 C3 00 3A */ clrrwi r3, r30, 2
/* 800189BC 000147FC 7C 03 F0 50 */ subf r0, r3, r30
/* 800189C0 00014800 80 63 00 00 */ lwz r3, 0x0(r3)
/* 800189C4 00014804 20 00 00 03 */ subfic r0, r0, 0x3
/* 800189C8 00014808 54 00 18 38 */ slwi r0, r0, 3
/* 800189CC 0001480C 7C 60 04 30 */ srw r0, r3, r0
/* 800189D0 00014810 54 18 06 3E */ clrlwi r24, r0, 24
/* 800189D4 00014814 7C 00 04 AC */ sync
/* 800189D8 00014818 7F 63 DB 78 */ mr r3, r27
2022-10-16 16:31:36 +00:00
/* 800189DC 0001481C 48 00 16 E5 */ bl PPCMtmsr
2022-10-16 16:05:58 +00:00
/* 800189E0 00014820 57 A6 00 3A */ clrrwi r6, r29, 2
/* 800189E4 00014824 7C 06 E8 50 */ subf r0, r6, r29
/* 800189E8 00014828 80 A6 00 00 */ lwz r5, 0x0(r6)
/* 800189EC 0001482C 20 60 00 03 */ subfic r3, r0, 0x3
/* 800189F0 00014830 20 00 00 03 */ subfic r0, r0, 0x3
/* 800189F4 00014834 54 63 18 38 */ slwi r3, r3, 3
/* 800189F8 00014838 54 00 18 38 */ slwi r0, r0, 3
/* 800189FC 0001483C 7F 24 18 30 */ slw r4, r25, r3
/* 80018A00 00014840 7F 00 00 30 */ slw r0, r24, r0
/* 80018A04 00014844 7C A3 20 78 */ andc r3, r5, r4
/* 80018A08 00014848 7C 80 00 38 */ and r0, r4, r0
/* 80018A0C 0001484C 7C 60 03 78 */ or r0, r3, r0
/* 80018A10 00014850 90 06 00 00 */ stw r0, 0x0(r6)
/* 80018A14 00014854 7C 00 04 AC */ sync
/* 80018A18 00014858 3B DE 00 01 */ addi r30, r30, 0x1
/* 80018A1C 0001485C 3B BD 00 01 */ addi r29, r29, 0x1
/* 80018A20 00014860 3B 5A FF FF */ addi r26, r26, -0x1
.global lbl_80018A24
lbl_80018A24:
/* 80018A24 00014864 2C 1A 00 00 */ cmpwi r26, 0x0
/* 80018A28 00014868 40 82 FF 88 */ bne lbl_800189B0
/* 80018A2C 0001486C 7F E3 FB 78 */ mr r3, r31
2022-10-16 16:31:36 +00:00
/* 80018A30 00014870 48 00 16 91 */ bl PPCMtmsr
2022-10-16 16:05:58 +00:00
/* 80018A34 00014874 BB 01 00 10 */ lmw r24, 0x10(r1)
/* 80018A38 00014878 80 01 00 34 */ lwz r0, 0x34(r1)
/* 80018A3C 0001487C 7C 08 03 A6 */ mtlr r0
/* 80018A40 00014880 38 21 00 30 */ addi r1, r1, 0x30
/* 80018A44 00014884 4E 80 00 20 */ blr
2022-10-16 16:31:36 +00:00
.global TRKTargetAccessMemory
TRKTargetAccessMemory:
2022-10-16 16:05:58 +00:00
/* 80018A48 00014888 94 21 FF C0 */ stwu r1, -0x40(r1)
/* 80018A4C 0001488C 7C 08 02 A6 */ mflr r0
2022-10-16 16:31:36 +00:00
/* 80018A50 00014890 3D 00 80 42 */ lis r8, gTRKExceptionStatus@ha
2022-10-16 16:05:58 +00:00
/* 80018A54 00014894 90 01 00 44 */ stw r0, 0x44(r1)
2022-10-16 16:31:36 +00:00
/* 80018A58 00014898 39 08 1D 90 */ addi r8, r8, gTRKExceptionStatus@l
2022-10-16 16:05:58 +00:00
/* 80018A5C 0001489C BF 21 00 24 */ stmw r25, 0x24(r1)
/* 80018A60 000148A0 7C 9A 23 78 */ mr r26, r4
/* 80018A64 000148A4 7C BF 2B 78 */ mr r31, r5
/* 80018A68 000148A8 7C 79 1B 78 */ mr r25, r3
/* 80018A6C 000148AC 3B C0 00 00 */ li r30, 0x0
/* 80018A70 000148B0 7C FB 3B 78 */ mr r27, r7
/* 80018A74 000148B4 7F 43 D3 78 */ mr r3, r26
/* 80018A78 000148B8 80 08 00 0C */ lwz r0, 0xc(r8)
/* 80018A7C 000148BC 80 C8 00 00 */ lwz r6, 0x0(r8)
/* 80018A80 000148C0 80 A8 00 04 */ lwz r5, 0x4(r8)
/* 80018A84 000148C4 80 88 00 08 */ lwz r4, 0x8(r8)
/* 80018A88 000148C8 90 C1 00 08 */ stw r6, 0x8(r1)
/* 80018A8C 000148CC 90 A1 00 0C */ stw r5, 0xc(r1)
/* 80018A90 000148D0 90 81 00 10 */ stw r4, 0x10(r1)
/* 80018A94 000148D4 90 01 00 14 */ stw r0, 0x14(r1)
/* 80018A98 000148D8 9B C8 00 0D */ stb r30, 0xd(r8)
2022-10-16 16:31:36 +00:00
/* 80018A9C 000148DC 4B FF D0 A9 */ bl TRKTargetTranslate
2022-10-16 16:05:58 +00:00
/* 80018AA0 000148E0 7F 60 00 34 */ cntlzw r0, r27
/* 80018AA4 000148E4 80 9F 00 00 */ lwz r4, 0x0(r31)
/* 80018AA8 000148E8 7C 7C 1B 78 */ mr r28, r3
/* 80018AAC 000148EC 54 05 D9 7E */ srwi r5, r0, 5
2022-10-16 16:31:36 +00:00
/* 80018AB0 000148F0 4B FF FD D5 */ bl TRKValidMemory32
2022-10-16 16:05:58 +00:00
/* 80018AB4 000148F4 2C 03 00 00 */ cmpwi r3, 0x0
/* 80018AB8 000148F8 7C 7D 1B 78 */ mr r29, r3
/* 80018ABC 000148FC 41 82 00 0C */ beq lbl_80018AC8
/* 80018AC0 00014900 93 DF 00 00 */ stw r30, 0x0(r31)
/* 80018AC4 00014904 48 00 00 78 */ b lbl_80018B3C
.global lbl_80018AC8
lbl_80018AC8:
2022-10-16 16:31:36 +00:00
/* 80018AC8 00014908 48 00 15 E9 */ bl PPCMfmsr
/* 80018ACC 0001490C 3C 80 80 4A */ lis r4, gTRKCPUState@ha
2022-10-16 16:05:58 +00:00
/* 80018AD0 00014910 2C 1B 00 00 */ cmpwi r27, 0x0
2022-10-16 16:31:36 +00:00
/* 80018AD4 00014914 38 84 8C 68 */ addi r4, r4, gTRKCPUState@l
2022-10-16 16:05:58 +00:00
/* 80018AD8 00014918 7C 68 1B 78 */ mr r8, r3
/* 80018ADC 0001491C 80 04 01 F8 */ lwz r0, 0x1f8(r4)
/* 80018AE0 00014920 54 00 06 F6 */ rlwinm r0, r0, 0, 27, 27
/* 80018AE4 00014924 7C 67 03 78 */ or r7, r3, r0
/* 80018AE8 00014928 41 82 00 1C */ beq lbl_80018B04
/* 80018AEC 0001492C 80 BF 00 00 */ lwz r5, 0x0(r31)
/* 80018AF0 00014930 7F 23 CB 78 */ mr r3, r25
/* 80018AF4 00014934 7F 84 E3 78 */ mr r4, r28
/* 80018AF8 00014938 7D 06 43 78 */ mr r6, r8
2022-10-16 16:31:36 +00:00
/* 80018AFC 0001493C 4B FF FE 81 */ bl TRK_ppc_memcpy
2022-10-16 16:05:58 +00:00
/* 80018B00 00014940 48 00 00 3C */ b lbl_80018B3C
.global lbl_80018B04
lbl_80018B04:
/* 80018B04 00014944 80 BF 00 00 */ lwz r5, 0x0(r31)
/* 80018B08 00014948 7C E6 3B 78 */ mr r6, r7
/* 80018B0C 0001494C 7F 83 E3 78 */ mr r3, r28
/* 80018B10 00014950 7F 24 CB 78 */ mr r4, r25
/* 80018B14 00014954 7D 07 43 78 */ mr r7, r8
2022-10-16 16:31:36 +00:00
/* 80018B18 00014958 4B FF FE 65 */ bl TRK_ppc_memcpy
2022-10-16 16:05:58 +00:00
/* 80018B1C 0001495C 80 9F 00 00 */ lwz r4, 0x0(r31)
/* 80018B20 00014960 7F 83 E3 78 */ mr r3, r28
2022-10-16 16:31:36 +00:00
/* 80018B24 00014964 4B FF CA 0D */ bl TRK_flush_cache
2022-10-16 16:05:58 +00:00
/* 80018B28 00014968 7C 1A E0 40 */ cmplw r26, r28
/* 80018B2C 0001496C 41 82 00 10 */ beq lbl_80018B3C
/* 80018B30 00014970 80 9F 00 00 */ lwz r4, 0x0(r31)
/* 80018B34 00014974 7F 43 D3 78 */ mr r3, r26
2022-10-16 16:31:36 +00:00
/* 80018B38 00014978 4B FF C9 F9 */ bl TRK_flush_cache
2022-10-16 16:05:58 +00:00
.global lbl_80018B3C
lbl_80018B3C:
2022-10-16 16:31:36 +00:00
/* 80018B3C 0001497C 3C 60 80 42 */ lis r3, gTRKExceptionStatus@ha
/* 80018B40 00014980 38 63 1D 90 */ addi r3, r3, gTRKExceptionStatus@l
2022-10-16 16:05:58 +00:00
/* 80018B44 00014984 88 03 00 0D */ lbz r0, 0xd(r3)
/* 80018B48 00014988 2C 00 00 00 */ cmpwi r0, 0x0
/* 80018B4C 0001498C 41 82 00 10 */ beq lbl_80018B5C
/* 80018B50 00014990 38 00 00 00 */ li r0, 0x0
/* 80018B54 00014994 90 1F 00 00 */ stw r0, 0x0(r31)
/* 80018B58 00014998 3B A0 07 02 */ li r29, 0x702
.global lbl_80018B5C
lbl_80018B5C:
/* 80018B5C 0001499C 80 C1 00 08 */ lwz r6, 0x8(r1)
2022-10-16 16:31:36 +00:00
/* 80018B60 000149A0 3C E0 80 42 */ lis r7, gTRKExceptionStatus@ha
/* 80018B64 000149A4 94 C7 1D 90 */ stwu r6, gTRKExceptionStatus@l(r7)
2022-10-16 16:05:58 +00:00
/* 80018B68 000149A8 7F A3 EB 78 */ mr r3, r29
/* 80018B6C 000149AC 80 A1 00 0C */ lwz r5, 0xc(r1)
/* 80018B70 000149B0 80 81 00 10 */ lwz r4, 0x10(r1)
/* 80018B74 000149B4 80 01 00 14 */ lwz r0, 0x14(r1)
/* 80018B78 000149B8 90 A7 00 04 */ stw r5, 0x4(r7)
/* 80018B7C 000149BC 90 87 00 08 */ stw r4, 0x8(r7)
/* 80018B80 000149C0 90 07 00 0C */ stw r0, 0xc(r7)
/* 80018B84 000149C4 BB 21 00 24 */ lmw r25, 0x24(r1)
/* 80018B88 000149C8 80 01 00 44 */ lwz r0, 0x44(r1)
/* 80018B8C 000149CC 7C 08 03 A6 */ mtlr r0
/* 80018B90 000149D0 38 21 00 40 */ addi r1, r1, 0x40
/* 80018B94 000149D4 4E 80 00 20 */ blr
2022-10-16 16:31:36 +00:00
.global TRKTargetAccessDefault
TRKTargetAccessDefault:
2022-10-16 16:05:58 +00:00
/* 80018B98 000149D8 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 80018B9C 000149DC 7C 08 02 A6 */ mflr r0
/* 80018BA0 000149E0 28 04 00 24 */ cmplwi r4, 0x24
/* 80018BA4 000149E4 90 01 00 24 */ stw r0, 0x24(r1)
/* 80018BA8 000149E8 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 80018BAC 000149EC 93 C1 00 18 */ stw r30, 0x18(r1)
/* 80018BB0 000149F0 7C DE 33 78 */ mr r30, r6
/* 80018BB4 000149F4 40 81 00 0C */ ble lbl_80018BC0
/* 80018BB8 000149F8 38 60 07 01 */ li r3, 0x701
/* 80018BBC 000149FC 48 00 00 BC */ b lbl_80018C78
.global lbl_80018BC0
lbl_80018BC0:
2022-10-16 16:31:36 +00:00
/* 80018BC0 00014A00 3D 80 80 42 */ lis r12, gTRKExceptionStatus@ha
2022-10-16 16:05:58 +00:00
/* 80018BC4 00014A04 7C 83 20 50 */ subf r4, r3, r4
2022-10-16 16:31:36 +00:00
/* 80018BC8 00014A08 39 8C 1D 90 */ addi r12, r12, gTRKExceptionStatus@l
2022-10-16 16:05:58 +00:00
/* 80018BCC 00014A0C 2C 07 00 00 */ cmpwi r7, 0x0
/* 80018BD0 00014A10 81 2C 00 0C */ lwz r9, 0xc(r12)
2022-10-16 16:31:36 +00:00
/* 80018BD4 00014A14 3D 00 80 4A */ lis r8, gTRKCPUState@ha
2022-10-16 16:05:58 +00:00
/* 80018BD8 00014A18 81 6C 00 00 */ lwz r11, 0x0(r12)
/* 80018BDC 00014A1C 38 00 00 00 */ li r0, 0x0
/* 80018BE0 00014A20 81 4C 00 04 */ lwz r10, 0x4(r12)
/* 80018BE4 00014A24 3B E4 00 01 */ addi r31, r4, 0x1
/* 80018BE8 00014A28 80 EC 00 08 */ lwz r7, 0x8(r12)
/* 80018BEC 00014A2C 54 63 10 3A */ slwi r3, r3, 2
/* 80018BF0 00014A30 98 0C 00 0D */ stb r0, 0xd(r12)
2022-10-16 16:31:36 +00:00
/* 80018BF4 00014A34 39 08 8C 68 */ addi r8, r8, gTRKCPUState@l
2022-10-16 16:05:58 +00:00
/* 80018BF8 00014A38 57 E0 10 3A */ slwi r0, r31, 2
/* 80018BFC 00014A3C 91 61 00 08 */ stw r11, 0x8(r1)
/* 80018C00 00014A40 7C 88 1A 14 */ add r4, r8, r3
/* 80018C04 00014A44 91 41 00 0C */ stw r10, 0xc(r1)
/* 80018C08 00014A48 90 E1 00 10 */ stw r7, 0x10(r1)
/* 80018C0C 00014A4C 91 21 00 14 */ stw r9, 0x14(r1)
/* 80018C10 00014A50 90 06 00 00 */ stw r0, 0x0(r6)
/* 80018C14 00014A54 41 82 00 14 */ beq lbl_80018C28
/* 80018C18 00014A58 7C A3 2B 78 */ mr r3, r5
/* 80018C1C 00014A5C 7F E5 FB 78 */ mr r5, r31
2022-10-16 16:31:36 +00:00
/* 80018C20 00014A60 4B FF E8 05 */ bl TRKAppendBuffer_ui32
2022-10-16 16:05:58 +00:00
/* 80018C24 00014A64 48 00 00 10 */ b lbl_80018C34
.global lbl_80018C28
lbl_80018C28:
/* 80018C28 00014A68 7C A3 2B 78 */ mr r3, r5
/* 80018C2C 00014A6C 7F E5 FB 78 */ mr r5, r31
2022-10-16 16:31:36 +00:00
/* 80018C30 00014A70 4B FF EA 5D */ bl TRKReadBuffer_ui32
2022-10-16 16:05:58 +00:00
.global lbl_80018C34
lbl_80018C34:
2022-10-16 16:31:36 +00:00
/* 80018C34 00014A74 3C 80 80 42 */ lis r4, gTRKExceptionStatus@ha
/* 80018C38 00014A78 38 84 1D 90 */ addi r4, r4, gTRKExceptionStatus@l
2022-10-16 16:05:58 +00:00
/* 80018C3C 00014A7C 88 04 00 0D */ lbz r0, 0xd(r4)
/* 80018C40 00014A80 2C 00 00 00 */ cmpwi r0, 0x0
/* 80018C44 00014A84 41 82 00 10 */ beq lbl_80018C54
/* 80018C48 00014A88 38 00 00 00 */ li r0, 0x0
/* 80018C4C 00014A8C 90 1E 00 00 */ stw r0, 0x0(r30)
/* 80018C50 00014A90 38 60 07 02 */ li r3, 0x702
.global lbl_80018C54
lbl_80018C54:
/* 80018C54 00014A94 80 C1 00 08 */ lwz r6, 0x8(r1)
2022-10-16 16:31:36 +00:00
/* 80018C58 00014A98 3C E0 80 42 */ lis r7, gTRKExceptionStatus@ha
/* 80018C5C 00014A9C 94 C7 1D 90 */ stwu r6, gTRKExceptionStatus@l(r7)
2022-10-16 16:05:58 +00:00
/* 80018C60 00014AA0 80 A1 00 0C */ lwz r5, 0xc(r1)
/* 80018C64 00014AA4 80 81 00 10 */ lwz r4, 0x10(r1)
/* 80018C68 00014AA8 80 01 00 14 */ lwz r0, 0x14(r1)
/* 80018C6C 00014AAC 90 A7 00 04 */ stw r5, 0x4(r7)
/* 80018C70 00014AB0 90 87 00 08 */ stw r4, 0x8(r7)
/* 80018C74 00014AB4 90 07 00 0C */ stw r0, 0xc(r7)
.global lbl_80018C78
lbl_80018C78:
/* 80018C78 00014AB8 80 01 00 24 */ lwz r0, 0x24(r1)
/* 80018C7C 00014ABC 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 80018C80 00014AC0 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 80018C84 00014AC4 7C 08 03 A6 */ mtlr r0
/* 80018C88 00014AC8 38 21 00 20 */ addi r1, r1, 0x20
/* 80018C8C 00014ACC 4E 80 00 20 */ blr
2022-10-16 16:31:36 +00:00
.global TRKTargetAccessFP
TRKTargetAccessFP:
2022-10-16 16:05:58 +00:00
/* 80018C90 00014AD0 94 21 FF C0 */ stwu r1, -0x40(r1)
/* 80018C94 00014AD4 7C 08 02 A6 */ mflr r0
/* 80018C98 00014AD8 28 04 00 21 */ cmplwi r4, 0x21
/* 80018C9C 00014ADC 90 01 00 44 */ stw r0, 0x44(r1)
/* 80018CA0 00014AE0 BF 41 00 28 */ stmw r26, 0x28(r1)
/* 80018CA4 00014AE4 7C 7A 1B 78 */ mr r26, r3
/* 80018CA8 00014AE8 7C 9B 23 78 */ mr r27, r4
/* 80018CAC 00014AEC 7C BC 2B 78 */ mr r28, r5
/* 80018CB0 00014AF0 7C DD 33 78 */ mr r29, r6
/* 80018CB4 00014AF4 7C FE 3B 78 */ mr r30, r7
/* 80018CB8 00014AF8 40 81 00 0C */ ble lbl_80018CC4
/* 80018CBC 00014AFC 38 60 07 01 */ li r3, 0x701
/* 80018CC0 00014B00 48 00 00 F8 */ b lbl_80018DB8
.global lbl_80018CC4
lbl_80018CC4:
2022-10-16 16:31:36 +00:00
/* 80018CC4 00014B04 3C C0 80 42 */ lis r6, gTRKExceptionStatus@ha
2022-10-16 16:05:58 +00:00
/* 80018CC8 00014B08 3B E0 00 00 */ li r31, 0x0
2022-10-16 16:31:36 +00:00
/* 80018CCC 00014B0C 38 C6 1D 90 */ addi r6, r6, gTRKExceptionStatus@l
2022-10-16 16:05:58 +00:00
/* 80018CD0 00014B10 80 06 00 0C */ lwz r0, 0xc(r6)
/* 80018CD4 00014B14 80 A6 00 00 */ lwz r5, 0x0(r6)
/* 80018CD8 00014B18 80 86 00 04 */ lwz r4, 0x4(r6)
/* 80018CDC 00014B1C 80 66 00 08 */ lwz r3, 0x8(r6)
/* 80018CE0 00014B20 90 A1 00 10 */ stw r5, 0x10(r1)
/* 80018CE4 00014B24 90 81 00 14 */ stw r4, 0x14(r1)
/* 80018CE8 00014B28 90 61 00 18 */ stw r3, 0x18(r1)
/* 80018CEC 00014B2C 90 01 00 1C */ stw r0, 0x1c(r1)
/* 80018CF0 00014B30 9B E6 00 0D */ stb r31, 0xd(r6)
2022-10-16 16:31:36 +00:00
/* 80018CF4 00014B34 48 00 13 BD */ bl PPCMfmsr
2022-10-16 16:05:58 +00:00
/* 80018CF8 00014B38 60 63 20 00 */ ori r3, r3, 0x2000
2022-10-16 16:31:36 +00:00
/* 80018CFC 00014B3C 48 00 13 C5 */ bl PPCMtmsr
2022-10-16 16:05:58 +00:00
/* 80018D00 00014B40 93 FD 00 00 */ stw r31, 0x0(r29)
/* 80018D04 00014B44 38 60 00 00 */ li r3, 0x0
/* 80018D08 00014B48 48 00 00 5C */ b lbl_80018D64
.global lbl_80018D0C
lbl_80018D0C:
/* 80018D0C 00014B4C 2C 1E 00 00 */ cmpwi r30, 0x0
/* 80018D10 00014B50 41 82 00 28 */ beq lbl_80018D38
/* 80018D14 00014B54 7F 44 D3 78 */ mr r4, r26
/* 80018D18 00014B58 7F C5 F3 78 */ mr r5, r30
/* 80018D1C 00014B5C 38 61 00 08 */ addi r3, r1, 0x8
2022-10-16 16:31:36 +00:00
/* 80018D20 00014B60 48 00 10 A1 */ bl TRKPPCAccessFPRegister
2022-10-16 16:05:58 +00:00
/* 80018D24 00014B64 80 A1 00 08 */ lwz r5, 0x8(r1)
/* 80018D28 00014B68 7F 83 E3 78 */ mr r3, r28
/* 80018D2C 00014B6C 80 C1 00 0C */ lwz r6, 0xc(r1)
2022-10-16 16:31:36 +00:00
/* 80018D30 00014B70 4B FF E5 9D */ bl TRKAppendBuffer1_ui64
2022-10-16 16:05:58 +00:00
/* 80018D34 00014B74 48 00 00 20 */ b lbl_80018D54
.global lbl_80018D38
lbl_80018D38:
/* 80018D38 00014B78 7F 83 E3 78 */ mr r3, r28
/* 80018D3C 00014B7C 38 81 00 08 */ addi r4, r1, 0x8
2022-10-16 16:31:36 +00:00
/* 80018D40 00014B80 4B FF E7 D5 */ bl TRKReadBuffer1_ui64
2022-10-16 16:05:58 +00:00
/* 80018D44 00014B84 7F 44 D3 78 */ mr r4, r26
/* 80018D48 00014B88 7F C5 F3 78 */ mr r5, r30
/* 80018D4C 00014B8C 38 61 00 08 */ addi r3, r1, 0x8
2022-10-16 16:31:36 +00:00
/* 80018D50 00014B90 48 00 10 71 */ bl TRKPPCAccessFPRegister
2022-10-16 16:05:58 +00:00
.global lbl_80018D54
lbl_80018D54:
/* 80018D54 00014B94 80 9D 00 00 */ lwz r4, 0x0(r29)
/* 80018D58 00014B98 3B 5A 00 01 */ addi r26, r26, 0x1
/* 80018D5C 00014B9C 38 04 00 08 */ addi r0, r4, 0x8
/* 80018D60 00014BA0 90 1D 00 00 */ stw r0, 0x0(r29)
.global lbl_80018D64
lbl_80018D64:
/* 80018D64 00014BA4 7C 1A D8 40 */ cmplw r26, r27
/* 80018D68 00014BA8 41 81 00 0C */ bgt lbl_80018D74
/* 80018D6C 00014BAC 2C 03 00 00 */ cmpwi r3, 0x0
/* 80018D70 00014BB0 41 82 FF 9C */ beq lbl_80018D0C
.global lbl_80018D74
lbl_80018D74:
2022-10-16 16:31:36 +00:00
/* 80018D74 00014BB4 3C 80 80 42 */ lis r4, gTRKExceptionStatus@ha
/* 80018D78 00014BB8 38 84 1D 90 */ addi r4, r4, gTRKExceptionStatus@l
2022-10-16 16:05:58 +00:00
/* 80018D7C 00014BBC 88 04 00 0D */ lbz r0, 0xd(r4)
/* 80018D80 00014BC0 2C 00 00 00 */ cmpwi r0, 0x0
/* 80018D84 00014BC4 41 82 00 10 */ beq lbl_80018D94
/* 80018D88 00014BC8 38 00 00 00 */ li r0, 0x0
/* 80018D8C 00014BCC 90 1D 00 00 */ stw r0, 0x0(r29)
/* 80018D90 00014BD0 38 60 07 02 */ li r3, 0x702
.global lbl_80018D94
lbl_80018D94:
/* 80018D94 00014BD4 80 C1 00 10 */ lwz r6, 0x10(r1)
2022-10-16 16:31:36 +00:00
/* 80018D98 00014BD8 3C E0 80 42 */ lis r7, gTRKExceptionStatus@ha
/* 80018D9C 00014BDC 94 C7 1D 90 */ stwu r6, gTRKExceptionStatus@l(r7)
2022-10-16 16:05:58 +00:00
/* 80018DA0 00014BE0 80 A1 00 14 */ lwz r5, 0x14(r1)
/* 80018DA4 00014BE4 80 81 00 18 */ lwz r4, 0x18(r1)
/* 80018DA8 00014BE8 80 01 00 1C */ lwz r0, 0x1c(r1)
/* 80018DAC 00014BEC 90 A7 00 04 */ stw r5, 0x4(r7)
/* 80018DB0 00014BF0 90 87 00 08 */ stw r4, 0x8(r7)
/* 80018DB4 00014BF4 90 07 00 0C */ stw r0, 0xc(r7)
.global lbl_80018DB8
lbl_80018DB8:
/* 80018DB8 00014BF8 BB 41 00 28 */ lmw r26, 0x28(r1)
/* 80018DBC 00014BFC 80 01 00 44 */ lwz r0, 0x44(r1)
/* 80018DC0 00014C00 7C 08 03 A6 */ mtlr r0
/* 80018DC4 00014C04 38 21 00 40 */ addi r1, r1, 0x40
/* 80018DC8 00014C08 4E 80 00 20 */ blr
2022-10-16 16:31:36 +00:00
.global TRKTargetAccessExtended1
TRKTargetAccessExtended1:
2022-10-16 16:05:58 +00:00
/* 80018DCC 00014C0C 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 80018DD0 00014C10 7C 08 02 A6 */ mflr r0
/* 80018DD4 00014C14 28 04 00 60 */ cmplwi r4, 0x60
/* 80018DD8 00014C18 90 01 00 24 */ stw r0, 0x24(r1)
/* 80018DDC 00014C1C 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 80018DE0 00014C20 7C DF 33 78 */ mr r31, r6
/* 80018DE4 00014C24 40 81 00 0C */ ble lbl_80018DF0
/* 80018DE8 00014C28 38 60 07 01 */ li r3, 0x701
/* 80018DEC 00014C2C 48 00 01 30 */ b lbl_80018F1C
.global lbl_80018DF0
lbl_80018DF0:
2022-10-16 16:31:36 +00:00
/* 80018DF0 00014C30 3D 80 80 42 */ lis r12, gTRKExceptionStatus@ha
2022-10-16 16:05:58 +00:00
/* 80018DF4 00014C34 7C 03 20 40 */ cmplw r3, r4
2022-10-16 16:31:36 +00:00
/* 80018DF8 00014C38 39 8C 1D 90 */ addi r12, r12, gTRKExceptionStatus@l
2022-10-16 16:05:58 +00:00
/* 80018DFC 00014C3C 38 00 00 00 */ li r0, 0x0
/* 80018E00 00014C40 81 0C 00 0C */ lwz r8, 0xc(r12)
/* 80018E04 00014C44 81 6C 00 00 */ lwz r11, 0x0(r12)
/* 80018E08 00014C48 81 4C 00 04 */ lwz r10, 0x4(r12)
/* 80018E0C 00014C4C 81 2C 00 08 */ lwz r9, 0x8(r12)
/* 80018E10 00014C50 98 0C 00 0D */ stb r0, 0xd(r12)
/* 80018E14 00014C54 91 61 00 08 */ stw r11, 0x8(r1)
/* 80018E18 00014C58 91 41 00 0C */ stw r10, 0xc(r1)
/* 80018E1C 00014C5C 91 21 00 10 */ stw r9, 0x10(r1)
/* 80018E20 00014C60 91 01 00 14 */ stw r8, 0x14(r1)
/* 80018E24 00014C64 90 06 00 00 */ stw r0, 0x0(r6)
/* 80018E28 00014C68 41 81 00 B0 */ bgt lbl_80018ED8
/* 80018E2C 00014C6C 7C 83 20 50 */ subf r4, r3, r4
2022-10-16 16:31:36 +00:00
/* 80018E30 00014C70 3D 00 80 4A */ lis r8, gTRKCPUState@ha
2022-10-16 16:05:58 +00:00
/* 80018E34 00014C74 39 24 00 01 */ addi r9, r4, 0x1
/* 80018E38 00014C78 2C 07 00 00 */ cmpwi r7, 0x0
/* 80018E3C 00014C7C 55 27 10 3A */ slwi r7, r9, 2
2022-10-16 16:31:36 +00:00
/* 80018E40 00014C80 39 08 8C 68 */ addi r8, r8, gTRKCPUState@l
2022-10-16 16:05:58 +00:00
/* 80018E44 00014C84 54 60 10 3A */ slwi r0, r3, 2
/* 80018E48 00014C88 90 E6 00 00 */ stw r7, 0x0(r6)
/* 80018E4C 00014C8C 7C 68 02 14 */ add r3, r8, r0
/* 80018E50 00014C90 38 83 01 A8 */ addi r4, r3, 0x1a8
/* 80018E54 00014C94 41 82 00 14 */ beq lbl_80018E68
/* 80018E58 00014C98 7C A3 2B 78 */ mr r3, r5
/* 80018E5C 00014C9C 7D 25 4B 78 */ mr r5, r9
2022-10-16 16:31:36 +00:00
/* 80018E60 00014CA0 4B FF E5 C5 */ bl TRKAppendBuffer_ui32
2022-10-16 16:05:58 +00:00
/* 80018E64 00014CA4 48 00 00 74 */ b lbl_80018ED8
.global lbl_80018E68
lbl_80018E68:
/* 80018E68 00014CA8 38 08 01 EC */ addi r0, r8, 0x1ec
/* 80018E6C 00014CAC 7C 04 00 40 */ cmplw r4, r0
/* 80018E70 00014CB0 41 81 00 24 */ bgt lbl_80018E94
/* 80018E74 00014CB4 7C 64 3A 14 */ add r3, r4, r7
/* 80018E78 00014CB8 38 08 01 E8 */ addi r0, r8, 0x1e8
/* 80018E7C 00014CBC 38 63 FF FC */ addi r3, r3, -0x4
/* 80018E80 00014CC0 7C 03 00 40 */ cmplw r3, r0
/* 80018E84 00014CC4 41 80 00 10 */ blt lbl_80018E94
2022-10-16 16:31:36 +00:00
/* 80018E88 00014CC8 3C 60 80 4A */ lis r3, gTRKRestoreFlags@ha
2022-10-16 16:05:58 +00:00
/* 80018E8C 00014CCC 38 00 00 01 */ li r0, 0x1
2022-10-16 16:31:36 +00:00
/* 80018E90 00014CD0 98 03 8A F0 */ stb r0, gTRKRestoreFlags@l(r3)
2022-10-16 16:05:58 +00:00
.global lbl_80018E94
lbl_80018E94:
2022-10-16 16:31:36 +00:00
/* 80018E94 00014CD4 3C 60 80 4A */ lis r3, gTRKCPUState@ha
/* 80018E98 00014CD8 38 63 8C 68 */ addi r3, r3, gTRKCPUState@l
2022-10-16 16:05:58 +00:00
/* 80018E9C 00014CDC 38 C3 02 78 */ addi r6, r3, 0x278
/* 80018EA0 00014CE0 7C 04 30 40 */ cmplw r4, r6
/* 80018EA4 00014CE4 41 81 00 28 */ bgt lbl_80018ECC
/* 80018EA8 00014CE8 55 20 10 3A */ slwi r0, r9, 2
/* 80018EAC 00014CEC 7C 64 02 14 */ add r3, r4, r0
/* 80018EB0 00014CF0 38 03 FF FC */ addi r0, r3, -0x4
/* 80018EB4 00014CF4 7C 00 30 40 */ cmplw r0, r6
/* 80018EB8 00014CF8 41 80 00 14 */ blt lbl_80018ECC
2022-10-16 16:31:36 +00:00
/* 80018EBC 00014CFC 3C 60 80 4A */ lis r3, gTRKRestoreFlags@ha
2022-10-16 16:05:58 +00:00
/* 80018EC0 00014D00 38 00 00 01 */ li r0, 0x1
2022-10-16 16:31:36 +00:00
/* 80018EC4 00014D04 38 63 8A F0 */ addi r3, r3, gTRKRestoreFlags@l
2022-10-16 16:05:58 +00:00
/* 80018EC8 00014D08 98 03 00 01 */ stb r0, 0x1(r3)
.global lbl_80018ECC
lbl_80018ECC:
/* 80018ECC 00014D0C 7C A3 2B 78 */ mr r3, r5
/* 80018ED0 00014D10 7D 25 4B 78 */ mr r5, r9
2022-10-16 16:31:36 +00:00
/* 80018ED4 00014D14 4B FF E7 B9 */ bl TRKReadBuffer_ui32
2022-10-16 16:05:58 +00:00
.global lbl_80018ED8
lbl_80018ED8:
2022-10-16 16:31:36 +00:00
/* 80018ED8 00014D18 3C 80 80 42 */ lis r4, gTRKExceptionStatus@ha
/* 80018EDC 00014D1C 38 84 1D 90 */ addi r4, r4, gTRKExceptionStatus@l
2022-10-16 16:05:58 +00:00
/* 80018EE0 00014D20 88 04 00 0D */ lbz r0, 0xd(r4)
/* 80018EE4 00014D24 2C 00 00 00 */ cmpwi r0, 0x0
/* 80018EE8 00014D28 41 82 00 10 */ beq lbl_80018EF8
/* 80018EEC 00014D2C 38 00 00 00 */ li r0, 0x0
/* 80018EF0 00014D30 90 1F 00 00 */ stw r0, 0x0(r31)
/* 80018EF4 00014D34 38 60 07 02 */ li r3, 0x702
.global lbl_80018EF8
lbl_80018EF8:
/* 80018EF8 00014D38 80 C1 00 08 */ lwz r6, 0x8(r1)
2022-10-16 16:31:36 +00:00
/* 80018EFC 00014D3C 3C E0 80 42 */ lis r7, gTRKExceptionStatus@ha
/* 80018F00 00014D40 94 C7 1D 90 */ stwu r6, gTRKExceptionStatus@l(r7)
2022-10-16 16:05:58 +00:00
/* 80018F04 00014D44 80 A1 00 0C */ lwz r5, 0xc(r1)
/* 80018F08 00014D48 80 81 00 10 */ lwz r4, 0x10(r1)
/* 80018F0C 00014D4C 80 01 00 14 */ lwz r0, 0x14(r1)
/* 80018F10 00014D50 90 A7 00 04 */ stw r5, 0x4(r7)
/* 80018F14 00014D54 90 87 00 08 */ stw r4, 0x8(r7)
/* 80018F18 00014D58 90 07 00 0C */ stw r0, 0xc(r7)
.global lbl_80018F1C
lbl_80018F1C:
/* 80018F1C 00014D5C 80 01 00 24 */ lwz r0, 0x24(r1)
/* 80018F20 00014D60 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 80018F24 00014D64 7C 08 03 A6 */ mtlr r0
/* 80018F28 00014D68 38 21 00 20 */ addi r1, r1, 0x20
/* 80018F2C 00014D6C 4E 80 00 20 */ blr
2022-10-16 16:31:36 +00:00
.global TRKTargetAccessExtended2
TRKTargetAccessExtended2:
2022-10-16 16:05:58 +00:00
/* 80018F30 00014D70 94 21 FF C0 */ stwu r1, -0x40(r1)
/* 80018F34 00014D74 7C 08 02 A6 */ mflr r0
/* 80018F38 00014D78 28 04 00 1F */ cmplwi r4, 0x1f
/* 80018F3C 00014D7C 90 01 00 44 */ stw r0, 0x44(r1)
/* 80018F40 00014D80 BF 41 00 28 */ stmw r26, 0x28(r1)
/* 80018F44 00014D84 7C 7A 1B 78 */ mr r26, r3
/* 80018F48 00014D88 7C 9B 23 78 */ mr r27, r4
/* 80018F4C 00014D8C 7C BC 2B 78 */ mr r28, r5
/* 80018F50 00014D90 7C DD 33 78 */ mr r29, r6
/* 80018F54 00014D94 7C FE 3B 78 */ mr r30, r7
/* 80018F58 00014D98 40 81 00 0C */ ble lbl_80018F64
/* 80018F5C 00014D9C 38 60 07 01 */ li r3, 0x701
/* 80018F60 00014DA0 48 00 01 2C */ b lbl_8001908C
.global lbl_80018F64
lbl_80018F64:
2022-10-16 16:31:36 +00:00
/* 80018F64 00014DA4 3D 20 80 42 */ lis r9, gTRKExceptionStatus@ha
2022-10-16 16:05:58 +00:00
/* 80018F68 00014DA8 3B E0 00 00 */ li r31, 0x0
2022-10-16 16:31:36 +00:00
/* 80018F6C 00014DAC 39 29 1D 90 */ addi r9, r9, gTRKExceptionStatus@l
2022-10-16 16:05:58 +00:00
/* 80018F70 00014DB0 38 61 00 08 */ addi r3, r1, 0x8
/* 80018F74 00014DB4 80 09 00 0C */ lwz r0, 0xc(r9)
/* 80018F78 00014DB8 38 80 03 98 */ li r4, 0x398
/* 80018F7C 00014DBC 81 09 00 00 */ lwz r8, 0x0(r9)
/* 80018F80 00014DC0 38 A0 00 01 */ li r5, 0x1
/* 80018F84 00014DC4 80 E9 00 04 */ lwz r7, 0x4(r9)
/* 80018F88 00014DC8 80 C9 00 08 */ lwz r6, 0x8(r9)
/* 80018F8C 00014DCC 91 01 00 18 */ stw r8, 0x18(r1)
/* 80018F90 00014DD0 90 E1 00 1C */ stw r7, 0x1c(r1)
/* 80018F94 00014DD4 90 C1 00 20 */ stw r6, 0x20(r1)
/* 80018F98 00014DD8 90 01 00 24 */ stw r0, 0x24(r1)
/* 80018F9C 00014DDC 9B E9 00 0D */ stb r31, 0xd(r9)
2022-10-16 16:31:36 +00:00
/* 80018FA0 00014DE0 48 00 0C 55 */ bl TRKPPCAccessSPR
2022-10-16 16:05:58 +00:00
/* 80018FA4 00014DE4 80 01 00 08 */ lwz r0, 0x8(r1)
/* 80018FA8 00014DE8 38 61 00 08 */ addi r3, r1, 0x8
/* 80018FAC 00014DEC 38 80 03 98 */ li r4, 0x398
/* 80018FB0 00014DF0 38 A0 00 00 */ li r5, 0x0
/* 80018FB4 00014DF4 64 00 A0 00 */ oris r0, r0, 0xa000
/* 80018FB8 00014DF8 90 01 00 08 */ stw r0, 0x8(r1)
2022-10-16 16:31:36 +00:00
/* 80018FBC 00014DFC 48 00 0C 39 */ bl TRKPPCAccessSPR
2022-10-16 16:05:58 +00:00
/* 80018FC0 00014E00 93 E1 00 08 */ stw r31, 0x8(r1)
/* 80018FC4 00014E04 38 61 00 08 */ addi r3, r1, 0x8
/* 80018FC8 00014E08 38 80 03 90 */ li r4, 0x390
/* 80018FCC 00014E0C 38 A0 00 00 */ li r5, 0x0
2022-10-16 16:31:36 +00:00
/* 80018FD0 00014E10 48 00 0C 25 */ bl TRKPPCAccessSPR
2022-10-16 16:05:58 +00:00
/* 80018FD4 00014E14 93 FD 00 00 */ stw r31, 0x0(r29)
/* 80018FD8 00014E18 38 60 00 00 */ li r3, 0x0
/* 80018FDC 00014E1C 48 00 00 5C */ b lbl_80019038
.global lbl_80018FE0
lbl_80018FE0:
/* 80018FE0 00014E20 2C 1E 00 00 */ cmpwi r30, 0x0
/* 80018FE4 00014E24 41 82 00 28 */ beq lbl_8001900C
/* 80018FE8 00014E28 7F 44 D3 78 */ mr r4, r26
/* 80018FEC 00014E2C 7F C5 F3 78 */ mr r5, r30
/* 80018FF0 00014E30 38 61 00 10 */ addi r3, r1, 0x10
2022-10-16 16:31:36 +00:00
/* 80018FF4 00014E34 48 00 0C DD */ bl TRKPPCAccessPairedSingleRegister
2022-10-16 16:05:58 +00:00
/* 80018FF8 00014E38 80 A1 00 10 */ lwz r5, 0x10(r1)
/* 80018FFC 00014E3C 7F 83 E3 78 */ mr r3, r28
/* 80019000 00014E40 80 C1 00 14 */ lwz r6, 0x14(r1)
2022-10-16 16:31:36 +00:00
/* 80019004 00014E44 4B FF E2 C9 */ bl TRKAppendBuffer1_ui64
2022-10-16 16:05:58 +00:00
/* 80019008 00014E48 48 00 00 20 */ b lbl_80019028
.global lbl_8001900C
lbl_8001900C:
/* 8001900C 00014E4C 7F 83 E3 78 */ mr r3, r28
/* 80019010 00014E50 38 81 00 10 */ addi r4, r1, 0x10
2022-10-16 16:31:36 +00:00
/* 80019014 00014E54 4B FF E5 01 */ bl TRKReadBuffer1_ui64
2022-10-16 16:05:58 +00:00
/* 80019018 00014E58 7F 44 D3 78 */ mr r4, r26
/* 8001901C 00014E5C 7F C5 F3 78 */ mr r5, r30
/* 80019020 00014E60 38 61 00 10 */ addi r3, r1, 0x10
2022-10-16 16:31:36 +00:00
/* 80019024 00014E64 48 00 0C AD */ bl TRKPPCAccessPairedSingleRegister
2022-10-16 16:05:58 +00:00
.global lbl_80019028
lbl_80019028:
/* 80019028 00014E68 80 9D 00 00 */ lwz r4, 0x0(r29)
/* 8001902C 00014E6C 3B 5A 00 01 */ addi r26, r26, 0x1
/* 80019030 00014E70 38 04 00 08 */ addi r0, r4, 0x8
/* 80019034 00014E74 90 1D 00 00 */ stw r0, 0x0(r29)
.global lbl_80019038
lbl_80019038:
/* 80019038 00014E78 7C 1A D8 40 */ cmplw r26, r27
/* 8001903C 00014E7C 41 81 00 0C */ bgt lbl_80019048
/* 80019040 00014E80 2C 03 00 00 */ cmpwi r3, 0x0
/* 80019044 00014E84 41 82 FF 9C */ beq lbl_80018FE0
.global lbl_80019048
lbl_80019048:
2022-10-16 16:31:36 +00:00
/* 80019048 00014E88 3C 80 80 42 */ lis r4, gTRKExceptionStatus@ha
/* 8001904C 00014E8C 38 84 1D 90 */ addi r4, r4, gTRKExceptionStatus@l
2022-10-16 16:05:58 +00:00
/* 80019050 00014E90 88 04 00 0D */ lbz r0, 0xd(r4)
/* 80019054 00014E94 2C 00 00 00 */ cmpwi r0, 0x0
/* 80019058 00014E98 41 82 00 10 */ beq lbl_80019068
/* 8001905C 00014E9C 38 00 00 00 */ li r0, 0x0
/* 80019060 00014EA0 90 1D 00 00 */ stw r0, 0x0(r29)
/* 80019064 00014EA4 38 60 07 02 */ li r3, 0x702
.global lbl_80019068
lbl_80019068:
/* 80019068 00014EA8 80 C1 00 18 */ lwz r6, 0x18(r1)
2022-10-16 16:31:36 +00:00
/* 8001906C 00014EAC 3C E0 80 42 */ lis r7, gTRKExceptionStatus@ha
/* 80019070 00014EB0 94 C7 1D 90 */ stwu r6, gTRKExceptionStatus@l(r7)
2022-10-16 16:05:58 +00:00
/* 80019074 00014EB4 80 A1 00 1C */ lwz r5, 0x1c(r1)
/* 80019078 00014EB8 80 81 00 20 */ lwz r4, 0x20(r1)
/* 8001907C 00014EBC 80 01 00 24 */ lwz r0, 0x24(r1)
/* 80019080 00014EC0 90 A7 00 04 */ stw r5, 0x4(r7)
/* 80019084 00014EC4 90 87 00 08 */ stw r4, 0x8(r7)
/* 80019088 00014EC8 90 07 00 0C */ stw r0, 0xc(r7)
.global lbl_8001908C
lbl_8001908C:
/* 8001908C 00014ECC BB 41 00 28 */ lmw r26, 0x28(r1)
/* 80019090 00014ED0 80 01 00 44 */ lwz r0, 0x44(r1)
/* 80019094 00014ED4 7C 08 03 A6 */ mtlr r0
/* 80019098 00014ED8 38 21 00 40 */ addi r1, r1, 0x40
/* 8001909C 00014EDC 4E 80 00 20 */ blr
2022-10-16 16:31:36 +00:00
.global TRK_InterruptHandler
TRK_InterruptHandler:
2022-10-16 16:05:58 +00:00
/* 800190A0 00014EE0 7C 5A 03 A6 */ mtsrr0 r2
/* 800190A4 00014EE4 7C 9B 03 A6 */ mtsrr1 r4
/* 800190A8 00014EE8 7C 93 42 A6 */ mfsprg r4, 3
/* 800190AC 00014EEC 7C 40 00 26 */ mfcr r2
/* 800190B0 00014EF0 7C 53 43 A6 */ mtsprg 3, r2
2022-10-16 16:31:36 +00:00
/* 800190B4 00014EF4 3C 40 80 49 */ lis r2, gTRKState@h
/* 800190B8 00014EF8 60 42 8B C0 */ ori r2, r2, gTRKState@l
2022-10-16 16:05:58 +00:00
/* 800190BC 00014EFC 80 42 00 8C */ lwz r2, 0x8c(r2)
/* 800190C0 00014F00 60 42 80 02 */ ori r2, r2, 0x8002
/* 800190C4 00014F04 68 42 80 02 */ xori r2, r2, 0x8002
/* 800190C8 00014F08 7C 00 04 AC */ sync
/* 800190CC 00014F0C 7C 40 01 24 */ mtmsr r2
/* 800190D0 00014F10 7C 00 04 AC */ sync
2022-10-16 16:31:36 +00:00
/* 800190D4 00014F14 3C 40 80 55 */ lis r2, TRK_saved_exceptionID@h
/* 800190D8 00014F18 60 42 C7 68 */ ori r2, r2, TRK_saved_exceptionID@l
2022-10-16 16:05:58 +00:00
/* 800190DC 00014F1C B0 62 00 00 */ sth r3, 0x0(r2)
/* 800190E0 00014F20 2C 03 05 00 */ cmpwi r3, 0x500
/* 800190E4 00014F24 40 82 00 84 */ bne lbl_80019168
2022-10-16 16:31:36 +00:00
/* 800190E8 00014F28 3C 40 80 49 */ lis r2, gTRKCPUState@h
/* 800190EC 00014F2C 60 42 8C 68 */ ori r2, r2, gTRKCPUState@l
2022-10-16 16:05:58 +00:00
/* 800190F0 00014F30 7C 68 02 A6 */ mflr r3
/* 800190F4 00014F34 90 62 04 2C */ stw r3, 0x42c(r2)
2022-10-16 16:31:36 +00:00
/* 800190F8 00014F38 48 00 B3 A9 */ bl DefaultSwitchThreadCallback
/* 800190FC 00014F3C 3C 40 80 49 */ lis r2, gTRKCPUState@h
/* 80019100 00014F40 60 42 8C 68 */ ori r2, r2, gTRKCPUState@l
2022-10-16 16:05:58 +00:00
/* 80019104 00014F44 80 62 04 2C */ lwz r3, 0x42c(r2)
/* 80019108 00014F48 7C 68 03 A6 */ mtlr r3
2022-10-16 16:31:36 +00:00
/* 8001910C 00014F4C 3C 40 80 49 */ lis r2, gTRKState@h
/* 80019110 00014F50 60 42 8B C0 */ ori r2, r2, gTRKState@l
2022-10-16 16:05:58 +00:00
/* 80019114 00014F54 80 42 00 A0 */ lwz r2, 0xa0(r2)
/* 80019118 00014F58 88 42 00 00 */ lbz r2, 0x0(r2)
/* 8001911C 00014F5C 2C 02 00 00 */ cmpwi r2, 0x0
/* 80019120 00014F60 41 82 00 2C */ beq lbl_8001914C
2022-10-16 16:31:36 +00:00
/* 80019124 00014F64 3C 40 80 42 */ lis r2, gTRKExceptionStatus@h
/* 80019128 00014F68 60 42 1D 90 */ ori r2, r2, gTRKExceptionStatus@l
2022-10-16 16:05:58 +00:00
/* 8001912C 00014F6C 88 42 00 0C */ lbz r2, 0xc(r2)
/* 80019130 00014F70 2C 02 00 01 */ cmpwi r2, 0x1
/* 80019134 00014F74 41 82 00 18 */ beq lbl_8001914C
2022-10-16 16:31:36 +00:00
/* 80019138 00014F78 3C 40 80 49 */ lis r2, gTRKState@h
/* 8001913C 00014F7C 60 42 8B C0 */ ori r2, r2, gTRKState@l
2022-10-16 16:05:58 +00:00
/* 80019140 00014F80 38 60 00 01 */ li r3, 0x1
/* 80019144 00014F84 98 62 00 9C */ stb r3, 0x9c(r2)
/* 80019148 00014F88 48 00 00 20 */ b lbl_80019168
.global lbl_8001914C
lbl_8001914C:
2022-10-16 16:31:36 +00:00
/* 8001914C 00014F8C 3C 40 80 49 */ lis r2, gTRKSaveState@h
/* 80019150 00014F90 60 42 8B 18 */ ori r2, r2, gTRKSaveState@l
2022-10-16 16:05:58 +00:00
/* 80019154 00014F94 80 62 00 88 */ lwz r3, 0x88(r2)
/* 80019158 00014F98 7C 6F F1 20 */ mtcrf 255, r3
/* 8001915C 00014F9C 80 62 00 0C */ lwz r3, 0xc(r2)
/* 80019160 00014FA0 80 42 00 08 */ lwz r2, 0x8(r2)
/* 80019164 00014FA4 4C 00 00 64 */ rfi
.global lbl_80019168
lbl_80019168:
2022-10-16 16:31:36 +00:00
/* 80019168 00014FA8 3C 40 80 55 */ lis r2, TRK_saved_exceptionID@h
/* 8001916C 00014FAC 60 42 C7 68 */ ori r2, r2, TRK_saved_exceptionID@l
2022-10-16 16:05:58 +00:00
/* 80019170 00014FB0 A0 62 00 00 */ lhz r3, 0x0(r2)
2022-10-16 16:31:36 +00:00
/* 80019174 00014FB4 3C 40 80 42 */ lis r2, gTRKExceptionStatus@h
/* 80019178 00014FB8 60 42 1D 90 */ ori r2, r2, gTRKExceptionStatus@l
2022-10-16 16:05:58 +00:00
/* 8001917C 00014FBC 88 42 00 0C */ lbz r2, 0xc(r2)
/* 80019180 00014FC0 2C 02 00 00 */ cmpwi r2, 0x0
2022-10-16 16:31:36 +00:00
/* 80019184 00014FC4 40 82 00 B0 */ bne TRKExceptionHandler
/* 80019188 00014FC8 3C 40 80 49 */ lis r2, gTRKCPUState@h
/* 8001918C 00014FCC 60 42 8C 68 */ ori r2, r2, gTRKCPUState@l
2022-10-16 16:05:58 +00:00
/* 80019190 00014FD0 90 02 00 00 */ stw r0, 0x0(r2)
/* 80019194 00014FD4 90 22 00 04 */ stw r1, 0x4(r2)
/* 80019198 00014FD8 7C 11 42 A6 */ mfsprg r0, 1
/* 8001919C 00014FDC 90 02 00 08 */ stw r0, 0x8(r2)
/* 800191A0 00014FE0 B0 62 02 F8 */ sth r3, 0x2f8(r2)
/* 800191A4 00014FE4 B0 62 02 FA */ sth r3, 0x2fa(r2)
/* 800191A8 00014FE8 7C 12 42 A6 */ mfsprg r0, 2
/* 800191AC 00014FEC 90 02 00 0C */ stw r0, 0xc(r2)
/* 800191B0 00014FF0 BC 82 00 10 */ stmw r4, 0x10(r2)
/* 800191B4 00014FF4 7F 7A 02 A6 */ mfsrr0 r27
/* 800191B8 00014FF8 7F 88 02 A6 */ mflr r28
/* 800191BC 00014FFC 7F B3 42 A6 */ mfsprg r29, 3
/* 800191C0 00015000 7F C9 02 A6 */ mfctr r30
/* 800191C4 00015004 7F E1 02 A6 */ mfxer r31
/* 800191C8 00015008 BF 62 00 80 */ stmw r27, 0x80(r2)
2022-10-16 16:31:36 +00:00
/* 800191CC 0001500C 4B FF DA 11 */ bl TRKSaveExtended1Block
/* 800191D0 00015010 3C 40 80 42 */ lis r2, gTRKExceptionStatus@h
/* 800191D4 00015014 60 42 1D 90 */ ori r2, r2, gTRKExceptionStatus@l
2022-10-16 16:05:58 +00:00
/* 800191D8 00015018 38 60 00 01 */ li r3, 0x1
/* 800191DC 0001501C 98 62 00 0C */ stb r3, 0xc(r2)
2022-10-16 16:31:36 +00:00
/* 800191E0 00015020 3C 40 80 49 */ lis r2, gTRKState@h
/* 800191E4 00015024 60 42 8B C0 */ ori r2, r2, gTRKState@l
2022-10-16 16:05:58 +00:00
/* 800191E8 00015028 80 02 00 8C */ lwz r0, 0x8c(r2)
/* 800191EC 0001502C 7C 00 04 AC */ sync
/* 800191F0 00015030 7C 00 01 24 */ mtmsr r0
/* 800191F4 00015034 7C 00 04 AC */ sync
/* 800191F8 00015038 80 02 00 80 */ lwz r0, 0x80(r2)
/* 800191FC 0001503C 7C 08 03 A6 */ mtlr r0
/* 80019200 00015040 80 02 00 84 */ lwz r0, 0x84(r2)
/* 80019204 00015044 7C 09 03 A6 */ mtctr r0
/* 80019208 00015048 80 02 00 88 */ lwz r0, 0x88(r2)
/* 8001920C 0001504C 7C 01 03 A6 */ mtxer r0
/* 80019210 00015050 80 02 00 94 */ lwz r0, 0x94(r2)
/* 80019214 00015054 7C 12 03 A6 */ mtdsisr r0
/* 80019218 00015058 80 02 00 90 */ lwz r0, 0x90(r2)
/* 8001921C 0001505C 7C 13 03 A6 */ mtdar r0
/* 80019220 00015060 B8 62 00 0C */ lmw r3, 0xc(r2)
/* 80019224 00015064 80 02 00 00 */ lwz r0, 0x0(r2)
/* 80019228 00015068 80 22 00 04 */ lwz r1, 0x4(r2)
/* 8001922C 0001506C 80 42 00 08 */ lwz r2, 0x8(r2)
2022-10-16 16:31:36 +00:00
/* 80019230 00015070 48 00 00 A0 */ b TRKPostInterruptEvent
.global TRKExceptionHandler
TRKExceptionHandler:
/* 80019234 00015074 3C 40 80 42 */ lis r2, gTRKExceptionStatus@h
/* 80019238 00015078 60 42 1D 90 */ ori r2, r2, gTRKExceptionStatus@l
2022-10-16 16:05:58 +00:00
/* 8001923C 0001507C B0 62 00 08 */ sth r3, 0x8(r2)
/* 80019240 00015080 7C 7A 02 A6 */ mfsrr0 r3
/* 80019244 00015084 90 62 00 00 */ stw r3, 0x0(r2)
/* 80019248 00015088 A0 62 00 08 */ lhz r3, 0x8(r2)
/* 8001924C 0001508C 2C 03 02 00 */ cmpwi r3, 0x200
/* 80019250 00015090 41 82 00 50 */ beq lbl_800192A0
/* 80019254 00015094 2C 03 03 00 */ cmpwi r3, 0x300
/* 80019258 00015098 41 82 00 48 */ beq lbl_800192A0
/* 8001925C 0001509C 2C 03 04 00 */ cmpwi r3, 0x400
/* 80019260 000150A0 41 82 00 40 */ beq lbl_800192A0
/* 80019264 000150A4 2C 03 06 00 */ cmpwi r3, 0x600
/* 80019268 000150A8 41 82 00 38 */ beq lbl_800192A0
/* 8001926C 000150AC 2C 03 07 00 */ cmpwi r3, 0x700
/* 80019270 000150B0 41 82 00 30 */ beq lbl_800192A0
/* 80019274 000150B4 2C 03 08 00 */ cmpwi r3, 0x800
/* 80019278 000150B8 41 82 00 28 */ beq lbl_800192A0
/* 8001927C 000150BC 2C 03 10 00 */ cmpwi r3, 0x1000
/* 80019280 000150C0 41 82 00 20 */ beq lbl_800192A0
/* 80019284 000150C4 2C 03 11 00 */ cmpwi r3, 0x1100
/* 80019288 000150C8 41 82 00 18 */ beq lbl_800192A0
/* 8001928C 000150CC 2C 03 12 00 */ cmpwi r3, 0x1200
/* 80019290 000150D0 41 82 00 10 */ beq lbl_800192A0
/* 80019294 000150D4 2C 03 13 00 */ cmpwi r3, 0x1300
/* 80019298 000150D8 41 82 00 08 */ beq lbl_800192A0
/* 8001929C 000150DC 48 00 00 10 */ b lbl_800192AC
.global lbl_800192A0
lbl_800192A0:
/* 800192A0 000150E0 7C 7A 02 A6 */ mfsrr0 r3
/* 800192A4 000150E4 38 63 00 04 */ addi r3, r3, 0x4
/* 800192A8 000150E8 7C 7A 03 A6 */ mtsrr0 r3
.global lbl_800192AC
lbl_800192AC:
2022-10-16 16:31:36 +00:00
/* 800192AC 000150EC 3C 40 80 42 */ lis r2, gTRKExceptionStatus@h
/* 800192B0 000150F0 60 42 1D 90 */ ori r2, r2, gTRKExceptionStatus@l
2022-10-16 16:05:58 +00:00
/* 800192B4 000150F4 38 60 00 01 */ li r3, 0x1
/* 800192B8 000150F8 98 62 00 0D */ stb r3, 0xd(r2)
/* 800192BC 000150FC 7C 73 42 A6 */ mfsprg r3, 3
/* 800192C0 00015100 7C 6F F1 20 */ mtcrf 255, r3
/* 800192C4 00015104 7C 51 42 A6 */ mfsprg r2, 1
/* 800192C8 00015108 7C 72 42 A6 */ mfsprg r3, 2
/* 800192CC 0001510C 4C 00 00 64 */ rfi
2022-10-16 16:31:36 +00:00
.global TRKPostInterruptEvent
TRKPostInterruptEvent:
2022-10-16 16:05:58 +00:00
/* 800192D0 00015110 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 800192D4 00015114 7C 08 02 A6 */ mflr r0
2022-10-16 16:31:36 +00:00
/* 800192D8 00015118 3C 60 80 4A */ lis r3, gTRKState@ha
2022-10-16 16:05:58 +00:00
/* 800192DC 0001511C 90 01 00 24 */ stw r0, 0x24(r1)
2022-10-16 16:31:36 +00:00
/* 800192E0 00015120 38 63 8B C0 */ addi r3, r3, gTRKState@l
2022-10-16 16:05:58 +00:00
/* 800192E4 00015124 80 03 00 9C */ lwz r0, 0x9c(r3)
/* 800192E8 00015128 2C 00 00 00 */ cmpwi r0, 0x0
/* 800192EC 0001512C 41 82 00 10 */ beq lbl_800192FC
/* 800192F0 00015130 38 00 00 00 */ li r0, 0x0
/* 800192F4 00015134 90 03 00 9C */ stw r0, 0x9c(r3)
/* 800192F8 00015138 48 00 00 80 */ b lbl_80019378
.global lbl_800192FC
lbl_800192FC:
2022-10-16 16:31:36 +00:00
/* 800192FC 0001513C 3C 60 80 4A */ lis r3, gTRKCPUState@ha
/* 80019300 00015140 38 63 8C 68 */ addi r3, r3, gTRKCPUState@l
2022-10-16 16:05:58 +00:00
/* 80019304 00015144 80 03 02 F8 */ lwz r0, 0x2f8(r3)
/* 80019308 00015148 54 00 04 3E */ clrlwi r0, r0, 16
/* 8001930C 0001514C 2C 00 07 00 */ cmpwi r0, 0x700
/* 80019310 00015150 41 82 00 0C */ beq lbl_8001931C
/* 80019314 00015154 2C 00 0D 00 */ cmpwi r0, 0xd00
/* 80019318 00015158 40 82 00 4C */ bne lbl_80019364
.global lbl_8001931C
lbl_8001931C:
2022-10-16 16:31:36 +00:00
/* 8001931C 0001515C 3C 60 80 4A */ lis r3, gTRKCPUState@ha
2022-10-16 16:05:58 +00:00
/* 80019320 00015160 38 00 00 04 */ li r0, 0x4
2022-10-16 16:31:36 +00:00
/* 80019324 00015164 38 63 8C 68 */ addi r3, r3, gTRKCPUState@l
2022-10-16 16:05:58 +00:00
/* 80019328 00015168 90 01 00 08 */ stw r0, 0x8(r1)
/* 8001932C 0001516C 80 83 00 80 */ lwz r4, 0x80(r3)
/* 80019330 00015170 38 61 00 0C */ addi r3, r1, 0xc
/* 80019334 00015174 38 A1 00 08 */ addi r5, r1, 0x8
/* 80019338 00015178 38 C0 00 00 */ li r6, 0x0
/* 8001933C 0001517C 38 E0 00 01 */ li r7, 0x1
2022-10-16 16:31:36 +00:00
/* 80019340 00015180 4B FF F7 09 */ bl TRKTargetAccessMemory
2022-10-16 16:05:58 +00:00
/* 80019344 00015184 80 61 00 0C */ lwz r3, 0xc(r1)
/* 80019348 00015188 3C 03 F0 20 */ addis r0, r3, 0xf020
/* 8001934C 0001518C 28 00 00 00 */ cmplwi r0, 0x0
/* 80019350 00015190 40 82 00 0C */ bne lbl_8001935C
/* 80019354 00015194 38 80 00 05 */ li r4, 0x5
/* 80019358 00015198 48 00 00 10 */ b lbl_80019368
.global lbl_8001935C
lbl_8001935C:
/* 8001935C 0001519C 38 80 00 03 */ li r4, 0x3
/* 80019360 000151A0 48 00 00 08 */ b lbl_80019368
.global lbl_80019364
lbl_80019364:
/* 80019364 000151A4 38 80 00 04 */ li r4, 0x4
.global lbl_80019368
lbl_80019368:
/* 80019368 000151A8 38 61 00 10 */ addi r3, r1, 0x10
2022-10-16 16:31:36 +00:00
/* 8001936C 000151AC 4B FF CF 71 */ bl TRKConstructEvent
2022-10-16 16:05:58 +00:00
/* 80019370 000151B0 38 61 00 10 */ addi r3, r1, 0x10
2022-10-16 16:31:36 +00:00
/* 80019374 000151B4 4B FF CE 9D */ bl TRKPostEvent
2022-10-16 16:05:58 +00:00
.global lbl_80019378
lbl_80019378:
/* 80019378 000151B8 80 01 00 24 */ lwz r0, 0x24(r1)
/* 8001937C 000151BC 7C 08 03 A6 */ mtlr r0
/* 80019380 000151C0 38 21 00 20 */ addi r1, r1, 0x20
/* 80019384 000151C4 4E 80 00 20 */ blr
2022-10-16 16:31:36 +00:00
.global TRKSwapAndGo
TRKSwapAndGo:
/* 80019388 000151C8 3C 60 80 49 */ lis r3, gTRKState@h
/* 8001938C 000151CC 60 63 8B C0 */ ori r3, r3, gTRKState@l
2022-10-16 16:05:58 +00:00
/* 80019390 000151D0 BC 03 00 00 */ stmw r0, 0x0(r3)
/* 80019394 000151D4 7C 00 00 A6 */ mfmsr r0
/* 80019398 000151D8 90 03 00 8C */ stw r0, 0x8c(r3)
/* 8001939C 000151DC 7C 08 02 A6 */ mflr r0
/* 800193A0 000151E0 90 03 00 80 */ stw r0, 0x80(r3)
/* 800193A4 000151E4 7C 09 02 A6 */ mfctr r0
/* 800193A8 000151E8 90 03 00 84 */ stw r0, 0x84(r3)
/* 800193AC 000151EC 7C 01 02 A6 */ mfxer r0
/* 800193B0 000151F0 90 03 00 88 */ stw r0, 0x88(r3)
/* 800193B4 000151F4 7C 12 02 A6 */ mfdsisr r0
/* 800193B8 000151F8 90 03 00 94 */ stw r0, 0x94(r3)
/* 800193BC 000151FC 7C 13 02 A6 */ mfdar r0
/* 800193C0 00015200 90 03 00 90 */ stw r0, 0x90(r3)
/* 800193C4 00015204 38 20 80 02 */ li r1, -0x7ffe
/* 800193C8 00015208 7C 21 08 F8 */ nor r1, r1, r1
/* 800193CC 0001520C 7C 60 00 A6 */ mfmsr r3
/* 800193D0 00015210 7C 63 08 38 */ and r3, r3, r1
/* 800193D4 00015214 7C 60 01 24 */ mtmsr r3
2022-10-16 16:31:36 +00:00
/* 800193D8 00015218 3C 40 80 49 */ lis r2, gTRKState@h
/* 800193DC 0001521C 60 42 8B C0 */ ori r2, r2, gTRKState@l
2022-10-16 16:05:58 +00:00
/* 800193E0 00015220 80 42 00 A0 */ lwz r2, 0xa0(r2)
/* 800193E4 00015224 88 42 00 00 */ lbz r2, 0x0(r2)
/* 800193E8 00015228 2C 02 00 00 */ cmpwi r2, 0x0
/* 800193EC 0001522C 41 82 00 18 */ beq lbl_80019404
2022-10-16 16:31:36 +00:00
/* 800193F0 00015230 3C 40 80 49 */ lis r2, gTRKState@h
/* 800193F4 00015234 60 42 8B C0 */ ori r2, r2, gTRKState@l
2022-10-16 16:05:58 +00:00
/* 800193F8 00015238 38 60 00 01 */ li r3, 0x1
/* 800193FC 0001523C 98 62 00 9C */ stb r3, 0x9c(r2)
2022-10-16 16:31:36 +00:00
/* 80019400 00015240 48 00 00 4C */ b TRKInterruptHandlerEnableInterrupts
2022-10-16 16:05:58 +00:00
.global lbl_80019404
lbl_80019404:
2022-10-16 16:31:36 +00:00
/* 80019404 00015244 3C 40 80 42 */ lis r2, gTRKExceptionStatus@h
/* 80019408 00015248 60 42 1D 90 */ ori r2, r2, gTRKExceptionStatus@l
2022-10-16 16:05:58 +00:00
/* 8001940C 0001524C 38 60 00 00 */ li r3, 0x0
/* 80019410 00015250 98 62 00 0C */ stb r3, 0xc(r2)
2022-10-16 16:31:36 +00:00
/* 80019414 00015254 4B FF D9 8D */ bl TRKRestoreExtended1Block
/* 80019418 00015258 3C 40 80 49 */ lis r2, gTRKCPUState@h
/* 8001941C 0001525C 60 42 8C 68 */ ori r2, r2, gTRKCPUState@l
2022-10-16 16:05:58 +00:00
/* 80019420 00015260 BB 62 00 80 */ lmw r27, 0x80(r2)
/* 80019424 00015264 7F 7A 03 A6 */ mtsrr0 r27
/* 80019428 00015268 7F 88 03 A6 */ mtlr r28
/* 8001942C 0001526C 7F AF F1 20 */ mtcrf 255, r29
/* 80019430 00015270 7F C9 03 A6 */ mtctr r30
/* 80019434 00015274 7F E1 03 A6 */ mtxer r31
/* 80019438 00015278 B8 62 00 0C */ lmw r3, 0xc(r2)
/* 8001943C 0001527C 80 02 00 00 */ lwz r0, 0x0(r2)
/* 80019440 00015280 80 22 00 04 */ lwz r1, 0x4(r2)
/* 80019444 00015284 80 42 00 08 */ lwz r2, 0x8(r2)
/* 80019448 00015288 4C 00 00 64 */ rfi
2022-10-16 16:31:36 +00:00
.global TRKInterruptHandlerEnableInterrupts
TRKInterruptHandlerEnableInterrupts:
/* 8001944C 0001528C 3C 40 80 49 */ lis r2, gTRKState@h
/* 80019450 00015290 60 42 8B C0 */ ori r2, r2, gTRKState@l
2022-10-16 16:05:58 +00:00
/* 80019454 00015294 80 02 00 8C */ lwz r0, 0x8c(r2)
/* 80019458 00015298 7C 00 04 AC */ sync
/* 8001945C 0001529C 7C 00 01 24 */ mtmsr r0
/* 80019460 000152A0 7C 00 04 AC */ sync
/* 80019464 000152A4 80 02 00 80 */ lwz r0, 0x80(r2)
/* 80019468 000152A8 7C 08 03 A6 */ mtlr r0
/* 8001946C 000152AC 80 02 00 84 */ lwz r0, 0x84(r2)
/* 80019470 000152B0 7C 09 03 A6 */ mtctr r0
/* 80019474 000152B4 80 02 00 88 */ lwz r0, 0x88(r2)
/* 80019478 000152B8 7C 01 03 A6 */ mtxer r0
/* 8001947C 000152BC 80 02 00 94 */ lwz r0, 0x94(r2)
/* 80019480 000152C0 7C 12 03 A6 */ mtdsisr r0
/* 80019484 000152C4 80 02 00 90 */ lwz r0, 0x90(r2)
/* 80019488 000152C8 7C 13 03 A6 */ mtdar r0
/* 8001948C 000152CC B8 62 00 0C */ lmw r3, 0xc(r2)
/* 80019490 000152D0 80 02 00 00 */ lwz r0, 0x0(r2)
/* 80019494 000152D4 80 22 00 04 */ lwz r1, 0x4(r2)
/* 80019498 000152D8 80 42 00 08 */ lwz r2, 0x8(r2)
2022-10-16 16:31:36 +00:00
/* 8001949C 000152DC 4B FF FE 34 */ b TRKPostInterruptEvent
.global TRKTargetInterrupt
TRKTargetInterrupt:
2022-10-16 16:05:58 +00:00
/* 800194A0 000152E0 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 800194A4 000152E4 7C 08 02 A6 */ mflr r0
/* 800194A8 000152E8 90 01 00 14 */ stw r0, 0x14(r1)
/* 800194AC 000152EC 93 E1 00 0C */ stw r31, 0xc(r1)
/* 800194B0 000152F0 3B E0 00 00 */ li r31, 0x0
/* 800194B4 000152F4 80 63 00 00 */ lwz r3, 0x0(r3)
/* 800194B8 000152F8 38 03 FF FD */ addi r0, r3, -0x3
/* 800194BC 000152FC 28 00 00 01 */ cmplwi r0, 0x1
/* 800194C0 00015300 41 81 00 24 */ bgt lbl_800194E4
2022-10-16 16:31:36 +00:00
/* 800194C4 00015304 48 00 02 D5 */ bl TRKTargetCheckStep
2022-10-16 16:05:58 +00:00
/* 800194C8 00015308 2C 03 00 00 */ cmpwi r3, 0x0
/* 800194CC 0001530C 40 82 00 18 */ bne lbl_800194E4
/* 800194D0 00015310 38 60 00 01 */ li r3, 0x1
2022-10-16 16:31:36 +00:00
/* 800194D4 00015314 48 00 06 F9 */ bl TRKTargetSetStopped
2022-10-16 16:05:58 +00:00
/* 800194D8 00015318 38 60 00 90 */ li r3, 0x90
2022-10-16 16:31:36 +00:00
/* 800194DC 0001531C 4B FF CB F5 */ bl TRKDoNotifyStopped
2022-10-16 16:05:58 +00:00
/* 800194E0 00015320 7C 7F 1B 78 */ mr r31, r3
.global lbl_800194E4
lbl_800194E4:
/* 800194E4 00015324 7F E3 FB 78 */ mr r3, r31
/* 800194E8 00015328 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 800194EC 0001532C 80 01 00 14 */ lwz r0, 0x14(r1)
/* 800194F0 00015330 7C 08 03 A6 */ mtlr r0
/* 800194F4 00015334 38 21 00 10 */ addi r1, r1, 0x10
/* 800194F8 00015338 4E 80 00 20 */ blr
2022-10-16 16:31:36 +00:00
.global TRKTargetAddStopInfo
TRKTargetAddStopInfo:
2022-10-16 16:05:58 +00:00
/* 800194FC 0001533C 94 21 FB 90 */ stwu r1, -0x470(r1)
/* 80019500 00015340 7C 08 02 A6 */ mflr r0
/* 80019504 00015344 38 80 00 00 */ li r4, 0x0
/* 80019508 00015348 38 A0 00 40 */ li r5, 0x40
/* 8001950C 0001534C 90 01 04 74 */ stw r0, 0x474(r1)
/* 80019510 00015350 93 E1 04 6C */ stw r31, 0x46c(r1)
/* 80019514 00015354 93 C1 04 68 */ stw r30, 0x468(r1)
/* 80019518 00015358 93 A1 04 64 */ stw r29, 0x464(r1)
/* 8001951C 0001535C 7C 7D 1B 78 */ mr r29, r3
/* 80019520 00015360 38 61 00 20 */ addi r3, r1, 0x20
2022-10-16 16:31:36 +00:00
/* 80019524 00015364 4B FF C2 A9 */ bl TRK_memset
/* 80019528 00015368 3F E0 80 4A */ lis r31, gTRKCPUState@ha
2022-10-16 16:05:58 +00:00
/* 8001952C 0001536C 38 80 04 E8 */ li r4, 0x4e8
2022-10-16 16:31:36 +00:00
/* 80019530 00015370 3B FF 8C 68 */ addi r31, r31, gTRKCPUState@l
2022-10-16 16:05:58 +00:00
/* 80019534 00015374 38 A0 00 90 */ li r5, 0x90
/* 80019538 00015378 80 1F 00 80 */ lwz r0, 0x80(r31)
/* 8001953C 0001537C 38 61 00 14 */ addi r3, r1, 0x14
/* 80019540 00015380 90 81 00 20 */ stw r4, 0x20(r1)
/* 80019544 00015384 38 81 00 10 */ addi r4, r1, 0x10
/* 80019548 00015388 98 A1 00 24 */ stb r5, 0x24(r1)
/* 8001954C 0001538C 90 01 00 28 */ stw r0, 0x28(r1)
2022-10-16 16:31:36 +00:00
/* 80019550 00015390 48 00 0A B9 */ bl GetThreadInfo
2022-10-16 16:05:58 +00:00
/* 80019554 00015394 80 01 00 14 */ lwz r0, 0x14(r1)
/* 80019558 00015398 38 60 00 E4 */ li r3, 0xe4
/* 8001955C 0001539C 90 01 00 34 */ stw r0, 0x34(r1)
2022-10-16 16:31:36 +00:00
/* 80019560 000153A0 48 00 0A A1 */ bl ConvertAddress
2022-10-16 16:05:58 +00:00
/* 80019564 000153A4 80 63 00 00 */ lwz r3, 0x0(r3)
/* 80019568 000153A8 38 00 00 04 */ li r0, 0x4
/* 8001956C 000153AC 90 61 00 38 */ stw r3, 0x38(r1)
/* 80019570 000153B0 38 61 00 18 */ addi r3, r1, 0x18
/* 80019574 000153B4 80 9F 00 80 */ lwz r4, 0x80(r31)
/* 80019578 000153B8 38 A1 00 08 */ addi r5, r1, 0x8
/* 8001957C 000153BC 90 01 00 08 */ stw r0, 0x8(r1)
/* 80019580 000153C0 38 C0 00 00 */ li r6, 0x0
/* 80019584 000153C4 38 E0 00 01 */ li r7, 0x1
2022-10-16 16:31:36 +00:00
/* 80019588 000153C8 4B FF F4 C1 */ bl TRKTargetAccessMemory
2022-10-16 16:05:58 +00:00
/* 8001958C 000153CC 80 1F 02 F8 */ lwz r0, 0x2f8(r31)
/* 80019590 000153D0 7F A3 EB 78 */ mr r3, r29
/* 80019594 000153D4 80 A1 00 18 */ lwz r5, 0x18(r1)
/* 80019598 000153D8 38 81 00 20 */ addi r4, r1, 0x20
/* 8001959C 000153DC 54 00 04 3E */ clrlwi r0, r0, 16
/* 800195A0 000153E0 90 A1 00 2C */ stw r5, 0x2c(r1)
/* 800195A4 000153E4 38 A0 00 40 */ li r5, 0x40
/* 800195A8 000153E8 90 01 00 30 */ stw r0, 0x30(r1)
2022-10-16 16:31:36 +00:00
/* 800195AC 000153EC 4B FF DE 15 */ bl TRKAppendBuffer_ui8
2022-10-16 16:05:58 +00:00
/* 800195B0 000153F0 2C 03 00 00 */ cmpwi r3, 0x0
/* 800195B4 000153F4 7C 7E 1B 78 */ mr r30, r3
/* 800195B8 000153F8 40 82 00 6C */ bne lbl_80019624
/* 800195BC 000153FC 3B C0 00 00 */ li r30, 0x0
.global lbl_800195C0
lbl_800195C0:
/* 800195C0 00015400 80 9F 00 00 */ lwz r4, 0x0(r31)
/* 800195C4 00015404 7F A3 EB 78 */ mr r3, r29
2022-10-16 16:31:36 +00:00
/* 800195C8 00015408 4B FF DC 35 */ bl TRKAppendBuffer1_ui32
2022-10-16 16:05:58 +00:00
/* 800195CC 0001540C 3B DE 00 01 */ addi r30, r30, 0x1
/* 800195D0 00015410 3B FF 00 04 */ addi r31, r31, 0x4
/* 800195D4 00015414 2C 1E 00 20 */ cmpwi r30, 0x20
/* 800195D8 00015418 41 80 FF E8 */ blt lbl_800195C0
2022-10-16 16:31:36 +00:00
/* 800195DC 0001541C 3F E0 80 4A */ lis r31, gTRKCPUState@ha
2022-10-16 16:05:58 +00:00
/* 800195E0 00015420 7F A3 EB 78 */ mr r3, r29
2022-10-16 16:31:36 +00:00
/* 800195E4 00015424 3B FF 8C 68 */ addi r31, r31, gTRKCPUState@l
2022-10-16 16:05:58 +00:00
/* 800195E8 00015428 80 9F 00 80 */ lwz r4, 0x80(r31)
2022-10-16 16:31:36 +00:00
/* 800195EC 0001542C 4B FF DC 11 */ bl TRKAppendBuffer1_ui32
2022-10-16 16:05:58 +00:00
/* 800195F0 00015430 80 9F 00 84 */ lwz r4, 0x84(r31)
/* 800195F4 00015434 7F A3 EB 78 */ mr r3, r29
2022-10-16 16:31:36 +00:00
/* 800195F8 00015438 4B FF DC 05 */ bl TRKAppendBuffer1_ui32
2022-10-16 16:05:58 +00:00
/* 800195FC 0001543C 80 9F 00 88 */ lwz r4, 0x88(r31)
/* 80019600 00015440 7F A3 EB 78 */ mr r3, r29
2022-10-16 16:31:36 +00:00
/* 80019604 00015444 4B FF DB F9 */ bl TRKAppendBuffer1_ui32
2022-10-16 16:05:58 +00:00
/* 80019608 00015448 80 9F 00 8C */ lwz r4, 0x8c(r31)
/* 8001960C 0001544C 7F A3 EB 78 */ mr r3, r29
2022-10-16 16:31:36 +00:00
/* 80019610 00015450 4B FF DB ED */ bl TRKAppendBuffer1_ui32
2022-10-16 16:05:58 +00:00
/* 80019614 00015454 80 9F 00 90 */ lwz r4, 0x90(r31)
/* 80019618 00015458 7F A3 EB 78 */ mr r3, r29
2022-10-16 16:31:36 +00:00
/* 8001961C 0001545C 4B FF DB E1 */ bl TRKAppendBuffer1_ui32
2022-10-16 16:05:58 +00:00
/* 80019620 00015460 7C 7E 1B 78 */ mr r30, r3
.global lbl_80019624
lbl_80019624:
/* 80019624 00015464 2C 1E 00 00 */ cmpwi r30, 0x0
/* 80019628 00015468 40 82 00 6C */ bne lbl_80019694
/* 8001962C 0001546C 38 60 00 D4 */ li r3, 0xd4
2022-10-16 16:31:36 +00:00
/* 80019630 00015470 48 00 09 D1 */ bl ConvertAddress
2022-10-16 16:05:58 +00:00
/* 80019634 00015474 80 83 00 00 */ lwz r4, 0x0(r3)
/* 80019638 00015478 7F A3 EB 78 */ mr r3, r29
2022-10-16 16:31:36 +00:00
/* 8001963C 0001547C 4B FF DB C1 */ bl TRKAppendBuffer1_ui32
2022-10-16 16:05:58 +00:00
/* 80019640 00015480 38 60 00 D8 */ li r3, 0xd8
2022-10-16 16:31:36 +00:00
/* 80019644 00015484 48 00 09 BD */ bl ConvertAddress
2022-10-16 16:05:58 +00:00
/* 80019648 00015488 80 83 00 00 */ lwz r4, 0x0(r3)
/* 8001964C 0001548C 7F A3 EB 78 */ mr r3, r29
2022-10-16 16:31:36 +00:00
/* 80019650 00015490 4B FF DB AD */ bl TRKAppendBuffer1_ui32
2022-10-16 16:05:58 +00:00
/* 80019654 00015494 38 60 00 DC */ li r3, 0xdc
2022-10-16 16:31:36 +00:00
/* 80019658 00015498 48 00 09 A9 */ bl ConvertAddress
2022-10-16 16:05:58 +00:00
/* 8001965C 0001549C 80 83 00 00 */ lwz r4, 0x0(r3)
/* 80019660 000154A0 7F A3 EB 78 */ mr r3, r29
2022-10-16 16:31:36 +00:00
/* 80019664 000154A4 4B FF DB 99 */ bl TRKAppendBuffer1_ui32
2022-10-16 16:05:58 +00:00
/* 80019668 000154A8 38 60 00 E0 */ li r3, 0xe0
2022-10-16 16:31:36 +00:00
/* 8001966C 000154AC 48 00 09 95 */ bl ConvertAddress
2022-10-16 16:05:58 +00:00
/* 80019670 000154B0 80 83 00 00 */ lwz r4, 0x0(r3)
/* 80019674 000154B4 7F A3 EB 78 */ mr r3, r29
2022-10-16 16:31:36 +00:00
/* 80019678 000154B8 4B FF DB 85 */ bl TRKAppendBuffer1_ui32
2022-10-16 16:05:58 +00:00
/* 8001967C 000154BC 38 60 00 E4 */ li r3, 0xe4
2022-10-16 16:31:36 +00:00
/* 80019680 000154C0 48 00 09 81 */ bl ConvertAddress
2022-10-16 16:05:58 +00:00
/* 80019684 000154C4 80 83 00 00 */ lwz r4, 0x0(r3)
/* 80019688 000154C8 7F A3 EB 78 */ mr r3, r29
2022-10-16 16:31:36 +00:00
/* 8001968C 000154CC 4B FF DB 71 */ bl TRKAppendBuffer1_ui32
2022-10-16 16:05:58 +00:00
/* 80019690 000154D0 7C 7E 1B 78 */ mr r30, r3
.global lbl_80019694
lbl_80019694:
/* 80019694 000154D4 2C 1E 00 00 */ cmpwi r30, 0x0
/* 80019698 000154D8 40 82 00 44 */ bne lbl_800196DC
2022-10-16 16:31:36 +00:00
/* 8001969C 000154DC 3C 60 80 4A */ lis r3, gTRKCPUState@ha
2022-10-16 16:05:58 +00:00
/* 800196A0 000154E0 38 00 04 00 */ li r0, 0x400
2022-10-16 16:31:36 +00:00
/* 800196A4 000154E4 38 63 8C 68 */ addi r3, r3, gTRKCPUState@l
2022-10-16 16:05:58 +00:00
/* 800196A8 000154E8 90 01 00 0C */ stw r0, 0xc(r1)
/* 800196AC 000154EC 80 03 00 80 */ lwz r0, 0x80(r3)
/* 800196B0 000154F0 38 61 00 60 */ addi r3, r1, 0x60
/* 800196B4 000154F4 38 A1 00 0C */ addi r5, r1, 0xc
/* 800196B8 000154F8 38 C0 00 00 */ li r6, 0x0
/* 800196BC 000154FC 54 04 00 2A */ clrrwi r4, r0, 10
/* 800196C0 00015500 38 E0 00 01 */ li r7, 0x1
2022-10-16 16:31:36 +00:00
/* 800196C4 00015504 4B FF F3 85 */ bl TRKTargetAccessMemory
2022-10-16 16:05:58 +00:00
/* 800196C8 00015508 7C 7E 1B 78 */ mr r30, r3
/* 800196CC 0001550C 7F A3 EB 78 */ mr r3, r29
/* 800196D0 00015510 38 81 00 60 */ addi r4, r1, 0x60
/* 800196D4 00015514 38 A0 04 00 */ li r5, 0x400
2022-10-16 16:31:36 +00:00
/* 800196D8 00015518 4B FF D9 F1 */ bl TRK_AppendBuffer
2022-10-16 16:05:58 +00:00
.global lbl_800196DC
lbl_800196DC:
/* 800196DC 0001551C 7F C3 F3 78 */ mr r3, r30
/* 800196E0 00015520 83 E1 04 6C */ lwz r31, 0x46c(r1)
/* 800196E4 00015524 83 C1 04 68 */ lwz r30, 0x468(r1)
/* 800196E8 00015528 83 A1 04 64 */ lwz r29, 0x464(r1)
/* 800196EC 0001552C 80 01 04 74 */ lwz r0, 0x474(r1)
/* 800196F0 00015530 7C 08 03 A6 */ mtlr r0
/* 800196F4 00015534 38 21 04 70 */ addi r1, r1, 0x470
/* 800196F8 00015538 4E 80 00 20 */ blr
2022-10-16 16:31:36 +00:00
.global TRKTargetAddExceptionInfo
TRKTargetAddExceptionInfo:
2022-10-16 16:05:58 +00:00
/* 800196FC 0001553C 94 21 FF A0 */ stwu r1, -0x60(r1)
/* 80019700 00015540 7C 08 02 A6 */ mflr r0
/* 80019704 00015544 38 80 00 00 */ li r4, 0x0
/* 80019708 00015548 38 A0 00 40 */ li r5, 0x40
/* 8001970C 0001554C 90 01 00 64 */ stw r0, 0x64(r1)
/* 80019710 00015550 93 E1 00 5C */ stw r31, 0x5c(r1)
/* 80019714 00015554 93 C1 00 58 */ stw r30, 0x58(r1)
/* 80019718 00015558 7C 7E 1B 78 */ mr r30, r3
/* 8001971C 0001555C 38 61 00 10 */ addi r3, r1, 0x10
2022-10-16 16:31:36 +00:00
/* 80019720 00015560 4B FF C0 AD */ bl TRK_memset
/* 80019724 00015564 3F E0 80 42 */ lis r31, gTRKExceptionStatus@ha
2022-10-16 16:05:58 +00:00
/* 80019728 00015568 38 60 00 40 */ li r3, 0x40
2022-10-16 16:31:36 +00:00
/* 8001972C 0001556C 80 9F 1D 90 */ lwz r4, gTRKExceptionStatus@l(r31)
2022-10-16 16:05:58 +00:00
/* 80019730 00015570 38 A0 00 91 */ li r5, 0x91
/* 80019734 00015574 38 00 00 04 */ li r0, 0x4
/* 80019738 00015578 90 61 00 10 */ stw r3, 0x10(r1)
/* 8001973C 0001557C 38 61 00 0C */ addi r3, r1, 0xc
/* 80019740 00015580 38 C0 00 00 */ li r6, 0x0
/* 80019744 00015584 98 A1 00 14 */ stb r5, 0x14(r1)
/* 80019748 00015588 38 A1 00 08 */ addi r5, r1, 0x8
/* 8001974C 0001558C 38 E0 00 01 */ li r7, 0x1
/* 80019750 00015590 90 81 00 18 */ stw r4, 0x18(r1)
/* 80019754 00015594 90 01 00 08 */ stw r0, 0x8(r1)
2022-10-16 16:31:36 +00:00
/* 80019758 00015598 4B FF F2 F1 */ bl TRKTargetAccessMemory
2022-10-16 16:05:58 +00:00
/* 8001975C 0001559C 38 7F 1D 90 */ addi r3, r31, 0x1d90
/* 80019760 000155A0 80 81 00 0C */ lwz r4, 0xc(r1)
/* 80019764 000155A4 A0 03 00 08 */ lhz r0, 0x8(r3)
/* 80019768 000155A8 7F C3 F3 78 */ mr r3, r30
/* 8001976C 000155AC 90 81 00 1C */ stw r4, 0x1c(r1)
/* 80019770 000155B0 38 81 00 10 */ addi r4, r1, 0x10
/* 80019774 000155B4 38 A0 00 40 */ li r5, 0x40
/* 80019778 000155B8 90 01 00 20 */ stw r0, 0x20(r1)
2022-10-16 16:31:36 +00:00
/* 8001977C 000155BC 4B FF DC 45 */ bl TRKAppendBuffer_ui8
2022-10-16 16:05:58 +00:00
/* 80019780 000155C0 80 01 00 64 */ lwz r0, 0x64(r1)
/* 80019784 000155C4 83 E1 00 5C */ lwz r31, 0x5c(r1)
/* 80019788 000155C8 83 C1 00 58 */ lwz r30, 0x58(r1)
/* 8001978C 000155CC 7C 08 03 A6 */ mtlr r0
/* 80019790 000155D0 38 21 00 60 */ addi r1, r1, 0x60
/* 80019794 000155D4 4E 80 00 20 */ blr
2022-10-16 16:31:36 +00:00
.global TRKTargetCheckStep
TRKTargetCheckStep:
2022-10-16 16:05:58 +00:00
/* 80019798 000155D8 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8001979C 000155DC 7C 08 02 A6 */ mflr r0
2022-10-16 16:31:36 +00:00
/* 800197A0 000155E0 3C 60 80 4A */ lis r3, gTRKStepStatus@ha
2022-10-16 16:05:58 +00:00
/* 800197A4 000155E4 90 01 00 14 */ stw r0, 0x14(r1)
2022-10-16 16:31:36 +00:00
/* 800197A8 000155E8 80 03 8B 00 */ lwz r0, gTRKStepStatus@l(r3)
2022-10-16 16:05:58 +00:00
/* 800197AC 000155EC 2C 00 00 00 */ cmpwi r0, 0x0
/* 800197B0 000155F0 41 82 00 F4 */ beq lbl_800198A4
2022-10-16 16:31:36 +00:00
/* 800197B4 000155F4 3C 80 80 4A */ lis r4, gTRKCPUState@ha
2022-10-16 16:05:58 +00:00
/* 800197B8 000155F8 38 A0 00 01 */ li r5, 0x1
2022-10-16 16:31:36 +00:00
/* 800197BC 000155FC 38 84 8C 68 */ addi r4, r4, gTRKCPUState@l
2022-10-16 16:05:58 +00:00
/* 800197C0 00015600 80 04 01 F8 */ lwz r0, 0x1f8(r4)
/* 800197C4 00015604 54 00 05 A8 */ rlwinm r0, r0, 0, 22, 20
/* 800197C8 00015608 60 00 80 00 */ ori r0, r0, 0x8000
/* 800197CC 0001560C 90 04 01 F8 */ stw r0, 0x1f8(r4)
/* 800197D0 00015610 41 82 00 64 */ beq lbl_80019834
/* 800197D4 00015614 80 04 02 F8 */ lwz r0, 0x2f8(r4)
/* 800197D8 00015618 54 00 04 3E */ clrlwi r0, r0, 16
/* 800197DC 0001561C 28 00 0D 00 */ cmplwi r0, 0xd00
/* 800197E0 00015620 40 82 00 54 */ bne lbl_80019834
/* 800197E4 00015624 38 63 8B 00 */ addi r3, r3, -0x7500
/* 800197E8 00015628 80 03 00 04 */ lwz r0, 0x4(r3)
/* 800197EC 0001562C 2C 00 00 00 */ cmpwi r0, 0x0
/* 800197F0 00015630 41 82 00 10 */ beq lbl_80019800
/* 800197F4 00015634 2C 00 00 01 */ cmpwi r0, 0x1
/* 800197F8 00015638 41 82 00 1C */ beq lbl_80019814
/* 800197FC 0001563C 48 00 00 38 */ b lbl_80019834
.global lbl_80019800
lbl_80019800:
/* 80019800 00015640 80 03 00 08 */ lwz r0, 0x8(r3)
/* 80019804 00015644 2C 00 00 00 */ cmpwi r0, 0x0
/* 80019808 00015648 41 82 00 2C */ beq lbl_80019834
/* 8001980C 0001564C 38 A0 00 00 */ li r5, 0x0
/* 80019810 00015650 48 00 00 24 */ b lbl_80019834
.global lbl_80019814
lbl_80019814:
/* 80019814 00015654 80 84 00 80 */ lwz r4, 0x80(r4)
/* 80019818 00015658 80 03 00 0C */ lwz r0, 0xc(r3)
/* 8001981C 0001565C 7C 04 00 40 */ cmplw r4, r0
/* 80019820 00015660 41 80 00 14 */ blt lbl_80019834
/* 80019824 00015664 80 03 00 10 */ lwz r0, 0x10(r3)
/* 80019828 00015668 7C 04 00 40 */ cmplw r4, r0
/* 8001982C 0001566C 41 81 00 08 */ bgt lbl_80019834
/* 80019830 00015670 38 A0 00 00 */ li r5, 0x0
.global lbl_80019834
lbl_80019834:
/* 80019834 00015674 2C 05 00 00 */ cmpwi r5, 0x0
/* 80019838 00015678 41 82 00 14 */ beq lbl_8001984C
2022-10-16 16:31:36 +00:00
/* 8001983C 0001567C 3C 60 80 4A */ lis r3, gTRKStepStatus@ha
2022-10-16 16:05:58 +00:00
/* 80019840 00015680 38 00 00 00 */ li r0, 0x0
2022-10-16 16:31:36 +00:00
/* 80019844 00015684 90 03 8B 00 */ stw r0, gTRKStepStatus@l(r3)
2022-10-16 16:05:58 +00:00
/* 80019848 00015688 48 00 00 5C */ b lbl_800198A4
.global lbl_8001984C
lbl_8001984C:
2022-10-16 16:31:36 +00:00
/* 8001984C 0001568C 3C A0 80 4A */ lis r5, gTRKStepStatus@ha
/* 80019850 00015690 3C 80 80 4A */ lis r4, gTRKCPUState@ha
/* 80019854 00015694 38 84 8C 68 */ addi r4, r4, gTRKCPUState@l
2022-10-16 16:05:58 +00:00
/* 80019858 00015698 38 C0 00 01 */ li r6, 0x1
2022-10-16 16:31:36 +00:00
/* 8001985C 0001569C 38 65 8B 00 */ addi r3, r5, gTRKStepStatus@l
2022-10-16 16:05:58 +00:00
/* 80019860 000156A0 80 04 01 F8 */ lwz r0, 0x1f8(r4)
/* 80019864 000156A4 80 63 00 04 */ lwz r3, 0x4(r3)
/* 80019868 000156A8 60 00 04 00 */ ori r0, r0, 0x400
/* 8001986C 000156AC 90 C5 8B 00 */ stw r6, -0x7500(r5)
/* 80019870 000156B0 54 00 04 5E */ rlwinm r0, r0, 0, 17, 15
/* 80019874 000156B4 2C 03 00 00 */ cmpwi r3, 0x0
/* 80019878 000156B8 90 04 01 F8 */ stw r0, 0x1f8(r4)
/* 8001987C 000156BC 41 82 00 0C */ beq lbl_80019888
/* 80019880 000156C0 2C 03 00 10 */ cmpwi r3, 0x10
/* 80019884 000156C4 40 82 00 18 */ bne lbl_8001989C
.global lbl_80019888
lbl_80019888:
2022-10-16 16:31:36 +00:00
/* 80019888 000156C8 3C 80 80 4A */ lis r4, gTRKStepStatus@ha
/* 8001988C 000156CC 38 84 8B 00 */ addi r4, r4, gTRKStepStatus@l
2022-10-16 16:05:58 +00:00
/* 80019890 000156D0 80 64 00 08 */ lwz r3, 0x8(r4)
/* 80019894 000156D4 38 03 FF FF */ addi r0, r3, -0x1
/* 80019898 000156D8 90 04 00 08 */ stw r0, 0x8(r4)
.global lbl_8001989C
lbl_8001989C:
/* 8001989C 000156DC 38 60 00 00 */ li r3, 0x0
2022-10-16 16:31:36 +00:00
/* 800198A0 000156E0 48 00 03 2D */ bl TRKTargetSetStopped
2022-10-16 16:05:58 +00:00
.global lbl_800198A4
lbl_800198A4:
/* 800198A4 000156E4 80 01 00 14 */ lwz r0, 0x14(r1)
2022-10-16 16:31:36 +00:00
/* 800198A8 000156E8 3C 60 80 4A */ lis r3, gTRKStepStatus@ha
/* 800198AC 000156EC 80 63 8B 00 */ lwz r3, gTRKStepStatus@l(r3)
2022-10-16 16:05:58 +00:00
/* 800198B0 000156F0 7C 08 03 A6 */ mtlr r0
/* 800198B4 000156F4 38 21 00 10 */ addi r1, r1, 0x10
/* 800198B8 000156F8 4E 80 00 20 */ blr
2022-10-16 16:31:36 +00:00
.global TRKTargetSingleStep
TRKTargetSingleStep:
2022-10-16 16:05:58 +00:00
/* 800198BC 000156FC 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 800198C0 00015700 7C 08 02 A6 */ mflr r0
/* 800198C4 00015704 2C 04 00 00 */ cmpwi r4, 0x0
/* 800198C8 00015708 90 01 00 14 */ stw r0, 0x14(r1)
/* 800198CC 0001570C 41 82 00 0C */ beq lbl_800198D8
/* 800198D0 00015710 38 60 07 03 */ li r3, 0x703
/* 800198D4 00015714 48 00 00 60 */ b lbl_80019934
.global lbl_800198D8
lbl_800198D8:
2022-10-16 16:31:36 +00:00
/* 800198D8 00015718 3C 80 80 4A */ lis r4, gTRKCPUState@ha
/* 800198DC 0001571C 3C E0 80 4A */ lis r7, gTRKStepStatus@ha
/* 800198E0 00015720 38 84 8C 68 */ addi r4, r4, gTRKCPUState@l
2022-10-16 16:05:58 +00:00
/* 800198E4 00015724 38 A0 00 01 */ li r5, 0x1
/* 800198E8 00015728 80 04 01 F8 */ lwz r0, 0x1f8(r4)
2022-10-16 16:31:36 +00:00
/* 800198EC 0001572C 38 C7 8B 00 */ addi r6, r7, gTRKStepStatus@l
2022-10-16 16:05:58 +00:00
/* 800198F0 00015730 39 00 00 00 */ li r8, 0x0
/* 800198F4 00015734 91 06 00 04 */ stw r8, 0x4(r6)
/* 800198F8 00015738 60 00 04 00 */ ori r0, r0, 0x400
/* 800198FC 0001573C 54 00 04 5E */ rlwinm r0, r0, 0, 17, 15
/* 80019900 00015740 90 66 00 08 */ stw r3, 0x8(r6)
/* 80019904 00015744 90 A7 8B 00 */ stw r5, -0x7500(r7)
/* 80019908 00015748 90 04 01 F8 */ stw r0, 0x1f8(r4)
/* 8001990C 0001574C 48 00 00 08 */ b lbl_80019914
/* 80019910 00015750 40 82 00 18 */ bne lbl_80019928
.global lbl_80019914
lbl_80019914:
2022-10-16 16:31:36 +00:00
/* 80019914 00015754 3C 80 80 4A */ lis r4, gTRKStepStatus@ha
/* 80019918 00015758 38 84 8B 00 */ addi r4, r4, gTRKStepStatus@l
2022-10-16 16:05:58 +00:00
/* 8001991C 0001575C 80 64 00 08 */ lwz r3, 0x8(r4)
/* 80019920 00015760 38 03 FF FF */ addi r0, r3, -0x1
/* 80019924 00015764 90 04 00 08 */ stw r0, 0x8(r4)
.global lbl_80019928
lbl_80019928:
/* 80019928 00015768 38 60 00 00 */ li r3, 0x0
2022-10-16 16:31:36 +00:00
/* 8001992C 0001576C 48 00 02 A1 */ bl TRKTargetSetStopped
2022-10-16 16:05:58 +00:00
/* 80019930 00015770 38 60 00 00 */ li r3, 0x0
.global lbl_80019934
lbl_80019934:
/* 80019934 00015774 80 01 00 14 */ lwz r0, 0x14(r1)
/* 80019938 00015778 7C 08 03 A6 */ mtlr r0
/* 8001993C 0001577C 38 21 00 10 */ addi r1, r1, 0x10
/* 80019940 00015780 4E 80 00 20 */ blr
2022-10-16 16:31:36 +00:00
.global TRKTargetStepOutOfRange
TRKTargetStepOutOfRange:
2022-10-16 16:05:58 +00:00
/* 80019944 00015784 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 80019948 00015788 7C 08 02 A6 */ mflr r0
/* 8001994C 0001578C 2C 05 00 00 */ cmpwi r5, 0x0
/* 80019950 00015790 90 01 00 14 */ stw r0, 0x14(r1)
/* 80019954 00015794 41 82 00 0C */ beq lbl_80019960
/* 80019958 00015798 38 60 07 03 */ li r3, 0x703
/* 8001995C 0001579C 48 00 00 4C */ b lbl_800199A8
.global lbl_80019960
lbl_80019960:
2022-10-16 16:31:36 +00:00
/* 80019960 000157A0 3C A0 80 4A */ lis r5, gTRKCPUState@ha
/* 80019964 000157A4 3C E0 80 4A */ lis r7, gTRKStepStatus@ha
/* 80019968 000157A8 38 A5 8C 68 */ addi r5, r5, gTRKCPUState@l
2022-10-16 16:05:58 +00:00
/* 8001996C 000157AC 39 00 00 01 */ li r8, 0x1
/* 80019970 000157B0 80 05 01 F8 */ lwz r0, 0x1f8(r5)
2022-10-16 16:31:36 +00:00
/* 80019974 000157B4 38 C7 8B 00 */ addi r6, r7, gTRKStepStatus@l
2022-10-16 16:05:58 +00:00
/* 80019978 000157B8 91 06 00 04 */ stw r8, 0x4(r6)
/* 8001997C 000157BC 60 00 04 00 */ ori r0, r0, 0x400
/* 80019980 000157C0 54 00 04 5E */ rlwinm r0, r0, 0, 17, 15
/* 80019984 000157C4 90 66 00 0C */ stw r3, 0xc(r6)
/* 80019988 000157C8 90 86 00 10 */ stw r4, 0x10(r6)
/* 8001998C 000157CC 91 07 8B 00 */ stw r8, -0x7500(r7)
/* 80019990 000157D0 90 05 01 F8 */ stw r0, 0x1f8(r5)
/* 80019994 000157D4 48 00 00 08 */ b lbl_8001999C
/* 80019998 000157D8 90 04 00 08 */ stw r0, 0x8(r4)
.global lbl_8001999C
lbl_8001999C:
/* 8001999C 000157DC 38 60 00 00 */ li r3, 0x0
2022-10-16 16:31:36 +00:00
/* 800199A0 000157E0 48 00 02 2D */ bl TRKTargetSetStopped
2022-10-16 16:05:58 +00:00
/* 800199A4 000157E4 38 60 00 00 */ li r3, 0x0
.global lbl_800199A8
lbl_800199A8:
/* 800199A8 000157E8 80 01 00 14 */ lwz r0, 0x14(r1)
/* 800199AC 000157EC 7C 08 03 A6 */ mtlr r0
/* 800199B0 000157F0 38 21 00 10 */ addi r1, r1, 0x10
/* 800199B4 000157F4 4E 80 00 20 */ blr
2022-10-16 16:31:36 +00:00
.global TRKTargetGetPC
TRKTargetGetPC:
/* 800199B8 000157F8 3C 60 80 4A */ lis r3, gTRKCPUState@ha
/* 800199BC 000157FC 38 63 8C 68 */ addi r3, r3, gTRKCPUState@l
2022-10-16 16:05:58 +00:00
/* 800199C0 00015800 80 63 00 80 */ lwz r3, 0x80(r3)
/* 800199C4 00015804 4E 80 00 20 */ blr
2022-10-16 16:31:36 +00:00
.global TRKTargetSupportRequest
TRKTargetSupportRequest:
2022-10-16 16:05:58 +00:00
/* 800199C8 00015808 94 21 FF D0 */ stwu r1, -0x30(r1)
/* 800199CC 0001580C 7C 08 02 A6 */ mflr r0
2022-10-16 16:31:36 +00:00
/* 800199D0 00015810 3C E0 80 4A */ lis r7, gTRKCPUState@ha
2022-10-16 16:05:58 +00:00
/* 800199D4 00015814 90 01 00 34 */ stw r0, 0x34(r1)
2022-10-16 16:31:36 +00:00
/* 800199D8 00015818 38 E7 8C 68 */ addi r7, r7, gTRKCPUState@l
2022-10-16 16:05:58 +00:00
/* 800199DC 0001581C 93 E1 00 2C */ stw r31, 0x2c(r1)
/* 800199E0 00015820 93 C1 00 28 */ stw r30, 0x28(r1)
/* 800199E4 00015824 93 A1 00 24 */ stw r29, 0x24(r1)
/* 800199E8 00015828 83 A7 00 0C */ lwz r29, 0xc(r7)
/* 800199EC 0001582C 38 1D FF 30 */ addi r0, r29, -0xd0
/* 800199F0 00015830 28 00 00 01 */ cmplwi r0, 0x1
/* 800199F4 00015834 40 81 01 28 */ ble lbl_80019B1C
/* 800199F8 00015838 2C 1D 00 D2 */ cmpwi r29, 0xd2
/* 800199FC 0001583C 41 82 00 30 */ beq lbl_80019A2C
/* 80019A00 00015840 2C 1D 00 D3 */ cmpwi r29, 0xd3
/* 80019A04 00015844 41 82 00 74 */ beq lbl_80019A78
/* 80019A08 00015848 2C 1D 00 D4 */ cmpwi r29, 0xd4
/* 80019A0C 0001584C 41 82 00 AC */ beq lbl_80019AB8
/* 80019A10 00015850 38 61 00 10 */ addi r3, r1, 0x10
/* 80019A14 00015854 38 80 00 04 */ li r4, 0x4
2022-10-16 16:31:36 +00:00
/* 80019A18 00015858 4B FF C8 C5 */ bl TRKConstructEvent
2022-10-16 16:05:58 +00:00
/* 80019A1C 0001585C 38 61 00 10 */ addi r3, r1, 0x10
2022-10-16 16:31:36 +00:00
/* 80019A20 00015860 4B FF C7 F1 */ bl TRKPostEvent
2022-10-16 16:05:58 +00:00
/* 80019A24 00015864 38 60 00 00 */ li r3, 0x0
/* 80019A28 00015868 48 00 01 78 */ b lbl_80019BA0
.global lbl_80019A2C
lbl_80019A2C:
/* 80019A2C 0001586C 80 07 00 14 */ lwz r0, 0x14(r7)
/* 80019A30 00015870 38 C1 00 0C */ addi r6, r1, 0xc
/* 80019A34 00015874 80 67 00 10 */ lwz r3, 0x10(r7)
/* 80019A38 00015878 80 A7 00 18 */ lwz r5, 0x18(r7)
/* 80019A3C 0001587C 54 04 06 3E */ clrlwi r4, r0, 24
2022-10-16 16:31:36 +00:00
/* 80019A40 00015880 4B FF CE 61 */ bl HandleOpenFileSupportRequest
2022-10-16 16:05:58 +00:00
/* 80019A44 00015884 80 01 00 0C */ lwz r0, 0xc(r1)
/* 80019A48 00015888 7C 7F 1B 78 */ mr r31, r3
/* 80019A4C 0001588C 2C 00 00 00 */ cmpwi r0, 0x0
/* 80019A50 00015890 40 82 00 14 */ bne lbl_80019A64
/* 80019A54 00015894 2C 03 00 00 */ cmpwi r3, 0x0
/* 80019A58 00015898 41 82 00 0C */ beq lbl_80019A64
/* 80019A5C 0001589C 38 00 00 01 */ li r0, 0x1
/* 80019A60 000158A0 90 01 00 0C */ stw r0, 0xc(r1)
.global lbl_80019A64
lbl_80019A64:
2022-10-16 16:31:36 +00:00
/* 80019A64 000158A4 3C 60 80 4A */ lis r3, gTRKCPUState@ha
2022-10-16 16:05:58 +00:00
/* 80019A68 000158A8 80 01 00 0C */ lwz r0, 0xc(r1)
2022-10-16 16:31:36 +00:00
/* 80019A6C 000158AC 38 63 8C 68 */ addi r3, r3, gTRKCPUState@l
2022-10-16 16:05:58 +00:00
/* 80019A70 000158B0 90 03 00 0C */ stw r0, 0xc(r3)
/* 80019A74 000158B4 48 00 01 14 */ b lbl_80019B88
.global lbl_80019A78
lbl_80019A78:
/* 80019A78 000158B8 80 67 00 10 */ lwz r3, 0x10(r7)
/* 80019A7C 000158BC 38 81 00 0C */ addi r4, r1, 0xc
2022-10-16 16:31:36 +00:00
/* 80019A80 000158C0 4B FF CF 39 */ bl HandleCloseFileSupportRequest
2022-10-16 16:05:58 +00:00
/* 80019A84 000158C4 80 01 00 0C */ lwz r0, 0xc(r1)
/* 80019A88 000158C8 7C 7F 1B 78 */ mr r31, r3
/* 80019A8C 000158CC 2C 00 00 00 */ cmpwi r0, 0x0
/* 80019A90 000158D0 40 82 00 14 */ bne lbl_80019AA4
/* 80019A94 000158D4 2C 03 00 00 */ cmpwi r3, 0x0
/* 80019A98 000158D8 41 82 00 0C */ beq lbl_80019AA4
/* 80019A9C 000158DC 38 00 00 01 */ li r0, 0x1
/* 80019AA0 000158E0 90 01 00 0C */ stw r0, 0xc(r1)
.global lbl_80019AA4
lbl_80019AA4:
2022-10-16 16:31:36 +00:00
/* 80019AA4 000158E4 3C 60 80 4A */ lis r3, gTRKCPUState@ha
2022-10-16 16:05:58 +00:00
/* 80019AA8 000158E8 80 01 00 0C */ lwz r0, 0xc(r1)
2022-10-16 16:31:36 +00:00
/* 80019AAC 000158EC 38 63 8C 68 */ addi r3, r3, gTRKCPUState@l
2022-10-16 16:05:58 +00:00
/* 80019AB0 000158F0 90 03 00 0C */ stw r0, 0xc(r3)
/* 80019AB4 000158F4 48 00 00 D4 */ b lbl_80019B88
.global lbl_80019AB8
lbl_80019AB8:
/* 80019AB8 000158F8 80 67 00 14 */ lwz r3, 0x14(r7)
/* 80019ABC 000158FC 38 81 00 08 */ addi r4, r1, 0x8
/* 80019AC0 00015900 80 07 00 18 */ lwz r0, 0x18(r7)
/* 80019AC4 00015904 38 C1 00 0C */ addi r6, r1, 0xc
/* 80019AC8 00015908 80 63 00 00 */ lwz r3, 0x0(r3)
/* 80019ACC 0001590C 90 61 00 08 */ stw r3, 0x8(r1)
/* 80019AD0 00015910 54 05 06 3E */ clrlwi r5, r0, 24
/* 80019AD4 00015914 80 67 00 10 */ lwz r3, 0x10(r7)
2022-10-16 16:31:36 +00:00
/* 80019AD8 00015918 4B FF CF C5 */ bl HandlePositionFileSupportRequest
2022-10-16 16:05:58 +00:00
/* 80019ADC 0001591C 80 01 00 0C */ lwz r0, 0xc(r1)
/* 80019AE0 00015920 7C 7F 1B 78 */ mr r31, r3
/* 80019AE4 00015924 2C 00 00 00 */ cmpwi r0, 0x0
/* 80019AE8 00015928 40 82 00 14 */ bne lbl_80019AFC
/* 80019AEC 0001592C 2C 03 00 00 */ cmpwi r3, 0x0
/* 80019AF0 00015930 41 82 00 0C */ beq lbl_80019AFC
/* 80019AF4 00015934 38 00 00 01 */ li r0, 0x1
/* 80019AF8 00015938 90 01 00 0C */ stw r0, 0xc(r1)
.global lbl_80019AFC
lbl_80019AFC:
2022-10-16 16:31:36 +00:00
/* 80019AFC 0001593C 3C 60 80 4A */ lis r3, gTRKCPUState@ha
2022-10-16 16:05:58 +00:00
/* 80019B00 00015940 80 81 00 0C */ lwz r4, 0xc(r1)
2022-10-16 16:31:36 +00:00
/* 80019B04 00015944 38 63 8C 68 */ addi r3, r3, gTRKCPUState@l
2022-10-16 16:05:58 +00:00
/* 80019B08 00015948 80 01 00 08 */ lwz r0, 0x8(r1)
/* 80019B0C 0001594C 90 83 00 0C */ stw r4, 0xc(r3)
/* 80019B10 00015950 80 63 00 14 */ lwz r3, 0x14(r3)
/* 80019B14 00015954 90 03 00 00 */ stw r0, 0x0(r3)
/* 80019B18 00015958 48 00 00 70 */ b lbl_80019B88
.global lbl_80019B1C
lbl_80019B1C:
/* 80019B1C 0001595C 38 1D FF 2F */ addi r0, r29, -0xd1
/* 80019B20 00015960 83 C7 00 14 */ lwz r30, 0x14(r7)
/* 80019B24 00015964 7C 00 00 34 */ cntlzw r0, r0
/* 80019B28 00015968 80 67 00 10 */ lwz r3, 0x10(r7)
/* 80019B2C 0001596C 80 87 00 18 */ lwz r4, 0x18(r7)
/* 80019B30 00015970 7F C5 F3 78 */ mr r5, r30
/* 80019B34 00015974 38 C1 00 0C */ addi r6, r1, 0xc
/* 80019B38 00015978 54 08 D9 7E */ srwi r8, r0, 5
/* 80019B3C 0001597C 38 E0 00 01 */ li r7, 0x1
2022-10-16 16:31:36 +00:00
/* 80019B40 00015980 4B FF CA 45 */ bl TRK_SuppAccessFile
2022-10-16 16:05:58 +00:00
/* 80019B44 00015984 80 01 00 0C */ lwz r0, 0xc(r1)
/* 80019B48 00015988 7C 7F 1B 78 */ mr r31, r3
/* 80019B4C 0001598C 2C 00 00 00 */ cmpwi r0, 0x0
/* 80019B50 00015990 40 82 00 14 */ bne lbl_80019B64
/* 80019B54 00015994 2C 03 00 00 */ cmpwi r3, 0x0
/* 80019B58 00015998 41 82 00 0C */ beq lbl_80019B64
/* 80019B5C 0001599C 38 00 00 01 */ li r0, 0x1
/* 80019B60 000159A0 90 01 00 0C */ stw r0, 0xc(r1)
.global lbl_80019B64
lbl_80019B64:
2022-10-16 16:31:36 +00:00
/* 80019B64 000159A4 3C 60 80 4A */ lis r3, gTRKCPUState@ha
2022-10-16 16:05:58 +00:00
/* 80019B68 000159A8 2C 1D 00 D1 */ cmpwi r29, 0xd1
2022-10-16 16:31:36 +00:00
/* 80019B6C 000159AC 38 63 8C 68 */ addi r3, r3, gTRKCPUState@l
2022-10-16 16:05:58 +00:00
/* 80019B70 000159B0 80 01 00 0C */ lwz r0, 0xc(r1)
/* 80019B74 000159B4 90 03 00 0C */ stw r0, 0xc(r3)
/* 80019B78 000159B8 40 82 00 10 */ bne lbl_80019B88
/* 80019B7C 000159BC 80 63 00 18 */ lwz r3, 0x18(r3)
/* 80019B80 000159C0 80 9E 00 00 */ lwz r4, 0x0(r30)
2022-10-16 16:31:36 +00:00
/* 80019B84 000159C4 4B FF B9 AD */ bl TRK_flush_cache
2022-10-16 16:05:58 +00:00
.global lbl_80019B88
lbl_80019B88:
2022-10-16 16:31:36 +00:00
/* 80019B88 000159C8 3C A0 80 4A */ lis r5, gTRKCPUState@ha
2022-10-16 16:05:58 +00:00
/* 80019B8C 000159CC 7F E3 FB 78 */ mr r3, r31
2022-10-16 16:31:36 +00:00
/* 80019B90 000159D0 38 A5 8C 68 */ addi r5, r5, gTRKCPUState@l
2022-10-16 16:05:58 +00:00
/* 80019B94 000159D4 80 85 00 80 */ lwz r4, 0x80(r5)
/* 80019B98 000159D8 38 04 00 04 */ addi r0, r4, 0x4
/* 80019B9C 000159DC 90 05 00 80 */ stw r0, 0x80(r5)
.global lbl_80019BA0
lbl_80019BA0:
/* 80019BA0 000159E0 80 01 00 34 */ lwz r0, 0x34(r1)
/* 80019BA4 000159E4 83 E1 00 2C */ lwz r31, 0x2c(r1)
/* 80019BA8 000159E8 83 C1 00 28 */ lwz r30, 0x28(r1)
/* 80019BAC 000159EC 83 A1 00 24 */ lwz r29, 0x24(r1)
/* 80019BB0 000159F0 7C 08 03 A6 */ mtlr r0
/* 80019BB4 000159F4 38 21 00 30 */ addi r1, r1, 0x30
/* 80019BB8 000159F8 4E 80 00 20 */ blr
2022-10-16 16:31:36 +00:00
.global TRKTargetStopped
TRKTargetStopped:
/* 80019BBC 000159FC 3C 60 80 4A */ lis r3, gTRKState@ha
/* 80019BC0 00015A00 38 63 8B C0 */ addi r3, r3, gTRKState@l
2022-10-16 16:05:58 +00:00
/* 80019BC4 00015A04 80 63 00 98 */ lwz r3, 0x98(r3)
/* 80019BC8 00015A08 4E 80 00 20 */ blr
2022-10-16 16:31:36 +00:00
.global TRKTargetSetStopped
TRKTargetSetStopped:
/* 80019BCC 00015A0C 3C 80 80 4A */ lis r4, gTRKState@ha
/* 80019BD0 00015A10 38 84 8B C0 */ addi r4, r4, gTRKState@l
2022-10-16 16:05:58 +00:00
/* 80019BD4 00015A14 90 64 00 98 */ stw r3, 0x98(r4)
/* 80019BD8 00015A18 4E 80 00 20 */ blr
2022-10-16 16:31:36 +00:00
.global TRKTargetStop
TRKTargetStop:
/* 80019BDC 00015A1C 3C 80 80 4A */ lis r4, gTRKState@ha
2022-10-16 16:05:58 +00:00
/* 80019BE0 00015A20 38 00 00 01 */ li r0, 0x1
2022-10-16 16:31:36 +00:00
/* 80019BE4 00015A24 38 84 8B C0 */ addi r4, r4, gTRKState@l
2022-10-16 16:05:58 +00:00
/* 80019BE8 00015A28 38 60 00 00 */ li r3, 0x0
/* 80019BEC 00015A2C 90 04 00 98 */ stw r0, 0x98(r4)
/* 80019BF0 00015A30 4E 80 00 20 */ blr
2022-10-16 16:31:36 +00:00
.global TRKPPCAccessSPR
TRKPPCAccessSPR:
2022-10-16 16:05:58 +00:00
/* 80019BF4 00015A34 94 21 FF C0 */ stwu r1, -0x40(r1)
/* 80019BF8 00015A38 7C 08 02 A6 */ mflr r0
/* 80019BFC 00015A3C 2C 05 00 00 */ cmpwi r5, 0x0
/* 80019C00 00015A40 90 01 00 44 */ stw r0, 0x44(r1)
/* 80019C04 00015A44 93 E1 00 3C */ stw r31, 0x3c(r1)
/* 80019C08 00015A48 93 C1 00 38 */ stw r30, 0x38(r1)
/* 80019C0C 00015A4C 93 A1 00 34 */ stw r29, 0x34(r1)
2022-10-16 16:31:36 +00:00
/* 80019C10 00015A50 3F A0 80 40 */ lis r29, "@984"@ha
/* 80019C14 00015A54 87 DD 77 88 */ lwzu r30, "@984"@l(r29)
2022-10-16 16:05:58 +00:00
/* 80019C18 00015A58 93 C1 00 08 */ stw r30, 0x8(r1)
/* 80019C1C 00015A5C 83 FD 00 04 */ lwz r31, 0x4(r29)
/* 80019C20 00015A60 81 9D 00 08 */ lwz r12, 0x8(r29)
/* 80019C24 00015A64 81 7D 00 0C */ lwz r11, 0xc(r29)
/* 80019C28 00015A68 81 5D 00 10 */ lwz r10, 0x10(r29)
/* 80019C2C 00015A6C 81 3D 00 14 */ lwz r9, 0x14(r29)
/* 80019C30 00015A70 81 1D 00 18 */ lwz r8, 0x18(r29)
/* 80019C34 00015A74 80 FD 00 1C */ lwz r7, 0x1c(r29)
/* 80019C38 00015A78 80 DD 00 20 */ lwz r6, 0x20(r29)
/* 80019C3C 00015A7C 80 1D 00 24 */ lwz r0, 0x24(r29)
/* 80019C40 00015A80 93 E1 00 0C */ stw r31, 0xc(r1)
/* 80019C44 00015A84 91 81 00 10 */ stw r12, 0x10(r1)
/* 80019C48 00015A88 91 61 00 14 */ stw r11, 0x14(r1)
/* 80019C4C 00015A8C 91 41 00 18 */ stw r10, 0x18(r1)
/* 80019C50 00015A90 91 21 00 1C */ stw r9, 0x1c(r1)
/* 80019C54 00015A94 91 01 00 20 */ stw r8, 0x20(r1)
/* 80019C58 00015A98 90 E1 00 24 */ stw r7, 0x24(r1)
/* 80019C5C 00015A9C 90 C1 00 28 */ stw r6, 0x28(r1)
/* 80019C60 00015AA0 90 01 00 2C */ stw r0, 0x2c(r1)
/* 80019C64 00015AA4 41 82 00 28 */ beq lbl_80019C8C
/* 80019C68 00015AA8 54 80 33 A8 */ rlwinm r0, r4, 6, 14, 20
/* 80019C6C 00015AAC 54 84 82 DE */ rlwinm r4, r4, 16, 11, 15
/* 80019C70 00015AB0 64 06 7C 80 */ oris r6, r0, 0x7c80
/* 80019C74 00015AB4 3C 00 90 83 */ lis r0, 0x9083
/* 80019C78 00015AB8 60 84 02 A6 */ ori r4, r4, 0x2a6
/* 80019C7C 00015ABC 90 01 00 0C */ stw r0, 0xc(r1)
/* 80019C80 00015AC0 7C C0 23 78 */ or r0, r6, r4
/* 80019C84 00015AC4 90 01 00 08 */ stw r0, 0x8(r1)
/* 80019C88 00015AC8 48 00 00 24 */ b lbl_80019CAC
.global lbl_80019C8C
lbl_80019C8C:
/* 80019C8C 00015ACC 54 80 82 DE */ rlwinm r0, r4, 16, 11, 15
/* 80019C90 00015AD0 54 86 33 A8 */ rlwinm r6, r4, 6, 14, 20
/* 80019C94 00015AD4 64 C4 7C 80 */ oris r4, r6, 0x7c80
/* 80019C98 00015AD8 60 00 03 A6 */ ori r0, r0, 0x3a6
/* 80019C9C 00015ADC 3C C0 80 83 */ lis r6, 0x8083
/* 80019CA0 00015AE0 7C 80 03 78 */ or r0, r4, r0
/* 80019CA4 00015AE4 90 C1 00 08 */ stw r6, 0x8(r1)
/* 80019CA8 00015AE8 90 01 00 0C */ stw r0, 0xc(r1)
.global lbl_80019CAC
lbl_80019CAC:
/* 80019CAC 00015AEC 38 81 00 08 */ addi r4, r1, 0x8
2022-10-16 16:31:36 +00:00
/* 80019CB0 00015AF0 48 00 02 D9 */ bl TRKPPCAccessSpecialReg
2022-10-16 16:05:58 +00:00
/* 80019CB4 00015AF4 80 01 00 44 */ lwz r0, 0x44(r1)
/* 80019CB8 00015AF8 83 E1 00 3C */ lwz r31, 0x3c(r1)
/* 80019CBC 00015AFC 83 C1 00 38 */ lwz r30, 0x38(r1)
/* 80019CC0 00015B00 83 A1 00 34 */ lwz r29, 0x34(r1)
/* 80019CC4 00015B04 7C 08 03 A6 */ mtlr r0
/* 80019CC8 00015B08 38 21 00 40 */ addi r1, r1, 0x40
/* 80019CCC 00015B0C 4E 80 00 20 */ blr
2022-10-16 16:31:36 +00:00
.global TRKPPCAccessPairedSingleRegister
TRKPPCAccessPairedSingleRegister:
2022-10-16 16:05:58 +00:00
/* 80019CD0 00015B10 94 21 FF C0 */ stwu r1, -0x40(r1)
/* 80019CD4 00015B14 7C 08 02 A6 */ mflr r0
2022-10-16 16:31:36 +00:00
/* 80019CD8 00015B18 3C C0 80 40 */ lis r6, "@999"@ha
2022-10-16 16:05:58 +00:00
/* 80019CDC 00015B1C 2C 05 00 00 */ cmpwi r5, 0x0
/* 80019CE0 00015B20 90 01 00 44 */ stw r0, 0x44(r1)
/* 80019CE4 00015B24 54 80 A8 14 */ slwi r0, r4, 21
/* 80019CE8 00015B28 64 04 E0 03 */ oris r4, r0, 0xe003
/* 80019CEC 00015B2C 93 E1 00 3C */ stw r31, 0x3c(r1)
/* 80019CF0 00015B30 93 C1 00 38 */ stw r30, 0x38(r1)
/* 80019CF4 00015B34 93 A1 00 34 */ stw r29, 0x34(r1)
2022-10-16 16:31:36 +00:00
/* 80019CF8 00015B38 87 A6 77 B0 */ lwzu r29, "@999"@l(r6)
2022-10-16 16:05:58 +00:00
/* 80019CFC 00015B3C 93 A1 00 08 */ stw r29, 0x8(r1)
/* 80019D00 00015B40 83 C6 00 04 */ lwz r30, 0x4(r6)
/* 80019D04 00015B44 83 E6 00 08 */ lwz r31, 0x8(r6)
/* 80019D08 00015B48 81 86 00 0C */ lwz r12, 0xc(r6)
/* 80019D0C 00015B4C 81 66 00 10 */ lwz r11, 0x10(r6)
/* 80019D10 00015B50 81 46 00 14 */ lwz r10, 0x14(r6)
/* 80019D14 00015B54 81 26 00 18 */ lwz r9, 0x18(r6)
/* 80019D18 00015B58 81 06 00 1C */ lwz r8, 0x1c(r6)
/* 80019D1C 00015B5C 80 E6 00 20 */ lwz r7, 0x20(r6)
/* 80019D20 00015B60 80 C6 00 24 */ lwz r6, 0x24(r6)
/* 80019D24 00015B64 93 C1 00 0C */ stw r30, 0xc(r1)
/* 80019D28 00015B68 93 E1 00 10 */ stw r31, 0x10(r1)
/* 80019D2C 00015B6C 91 81 00 14 */ stw r12, 0x14(r1)
/* 80019D30 00015B70 91 61 00 18 */ stw r11, 0x18(r1)
/* 80019D34 00015B74 91 41 00 1C */ stw r10, 0x1c(r1)
/* 80019D38 00015B78 91 21 00 20 */ stw r9, 0x20(r1)
/* 80019D3C 00015B7C 91 01 00 24 */ stw r8, 0x24(r1)
/* 80019D40 00015B80 90 E1 00 28 */ stw r7, 0x28(r1)
/* 80019D44 00015B84 90 C1 00 2C */ stw r6, 0x2c(r1)
/* 80019D48 00015B88 41 82 00 08 */ beq lbl_80019D50
/* 80019D4C 00015B8C 64 04 F0 03 */ oris r4, r0, 0xf003
.global lbl_80019D50
lbl_80019D50:
/* 80019D50 00015B90 90 81 00 08 */ stw r4, 0x8(r1)
/* 80019D54 00015B94 38 81 00 08 */ addi r4, r1, 0x8
2022-10-16 16:31:36 +00:00
/* 80019D58 00015B98 48 00 02 31 */ bl TRKPPCAccessSpecialReg
2022-10-16 16:05:58 +00:00
/* 80019D5C 00015B9C 80 01 00 44 */ lwz r0, 0x44(r1)
/* 80019D60 00015BA0 83 E1 00 3C */ lwz r31, 0x3c(r1)
/* 80019D64 00015BA4 83 C1 00 38 */ lwz r30, 0x38(r1)
/* 80019D68 00015BA8 83 A1 00 34 */ lwz r29, 0x34(r1)
/* 80019D6C 00015BAC 7C 08 03 A6 */ mtlr r0
/* 80019D70 00015BB0 38 21 00 40 */ addi r1, r1, 0x40
/* 80019D74 00015BB4 4E 80 00 20 */ blr
2022-10-16 16:31:36 +00:00
.global ReadFPSCR
ReadFPSCR:
2022-10-16 16:05:58 +00:00
/* 80019D78 00015BB8 94 21 FF C0 */ stwu r1, -0x40(r1)
/* 80019D7C 00015BBC DB E1 00 10 */ stfd f31, 0x10(r1)
/* 80019D80 00015BC0 F3 E1 00 20 */ psq_st f31, 0x20(r1), 0, qr0
/* 80019D84 00015BC4 FF E0 04 8E */ mffs f31
/* 80019D88 00015BC8 DB E3 00 00 */ stfd f31, 0x0(r3)
/* 80019D8C 00015BCC E3 E1 00 20 */ psq_l f31, 0x20(r1), 0, qr0
/* 80019D90 00015BD0 CB E1 00 10 */ lfd f31, 0x10(r1)
/* 80019D94 00015BD4 38 21 00 40 */ addi r1, r1, 0x40
/* 80019D98 00015BD8 4E 80 00 20 */ blr
2022-10-16 16:31:36 +00:00
.global WriteFPSCR
WriteFPSCR:
2022-10-16 16:05:58 +00:00
/* 80019D9C 00015BDC 94 21 FF C0 */ stwu r1, -0x40(r1)
/* 80019DA0 00015BE0 DB E1 00 10 */ stfd f31, 0x10(r1)
/* 80019DA4 00015BE4 F3 E1 00 20 */ psq_st f31, 0x20(r1), 0, qr0
/* 80019DA8 00015BE8 CB E3 00 00 */ lfd f31, 0x0(r3)
/* 80019DAC 00015BEC FD FE FD 8E */ mtfsf 255, f31
/* 80019DB0 00015BF0 E3 E1 00 20 */ psq_l f31, 0x20(r1), 0, qr0
/* 80019DB4 00015BF4 CB E1 00 10 */ lfd f31, 0x10(r1)
/* 80019DB8 00015BF8 38 21 00 40 */ addi r1, r1, 0x40
/* 80019DBC 00015BFC 4E 80 00 20 */ blr
2022-10-16 16:31:36 +00:00
.global TRKPPCAccessFPRegister
TRKPPCAccessFPRegister:
2022-10-16 16:05:58 +00:00
/* 80019DC0 00015C00 94 21 FF 90 */ stwu r1, -0x70(r1)
/* 80019DC4 00015C04 7C 08 02 A6 */ mflr r0
/* 80019DC8 00015C08 28 04 00 20 */ cmplwi r4, 0x20
/* 80019DCC 00015C0C 90 01 00 74 */ stw r0, 0x74(r1)
/* 80019DD0 00015C10 BF 41 00 58 */ stmw r26, 0x58(r1)
2022-10-16 16:31:36 +00:00
/* 80019DD4 00015C14 3F 40 80 40 */ lis r26, "@1022"@ha
2022-10-16 16:05:58 +00:00
/* 80019DD8 00015C18 7C 7D 1B 78 */ mr r29, r3
/* 80019DDC 00015C1C 7C BE 2B 78 */ mr r30, r5
/* 80019DE0 00015C20 3B E0 00 00 */ li r31, 0x0
2022-10-16 16:31:36 +00:00
/* 80019DE4 00015C24 87 7A 77 D8 */ lwzu r27, "@1022"@l(r26)
2022-10-16 16:05:58 +00:00
/* 80019DE8 00015C28 93 61 00 30 */ stw r27, 0x30(r1)
/* 80019DEC 00015C2C 83 9A 00 04 */ lwz r28, 0x4(r26)
/* 80019DF0 00015C30 81 9A 00 08 */ lwz r12, 0x8(r26)
/* 80019DF4 00015C34 81 7A 00 0C */ lwz r11, 0xc(r26)
/* 80019DF8 00015C38 81 5A 00 10 */ lwz r10, 0x10(r26)
/* 80019DFC 00015C3C 81 3A 00 14 */ lwz r9, 0x14(r26)
/* 80019E00 00015C40 81 1A 00 18 */ lwz r8, 0x18(r26)
/* 80019E04 00015C44 80 FA 00 1C */ lwz r7, 0x1c(r26)
/* 80019E08 00015C48 80 DA 00 20 */ lwz r6, 0x20(r26)
/* 80019E0C 00015C4C 80 1A 00 24 */ lwz r0, 0x24(r26)
/* 80019E10 00015C50 93 81 00 34 */ stw r28, 0x34(r1)
/* 80019E14 00015C54 91 81 00 38 */ stw r12, 0x38(r1)
/* 80019E18 00015C58 91 61 00 3C */ stw r11, 0x3c(r1)
/* 80019E1C 00015C5C 91 41 00 40 */ stw r10, 0x40(r1)
/* 80019E20 00015C60 91 21 00 44 */ stw r9, 0x44(r1)
/* 80019E24 00015C64 91 01 00 48 */ stw r8, 0x48(r1)
/* 80019E28 00015C68 90 E1 00 4C */ stw r7, 0x4c(r1)
/* 80019E2C 00015C6C 90 C1 00 50 */ stw r6, 0x50(r1)
/* 80019E30 00015C70 90 01 00 54 */ stw r0, 0x54(r1)
/* 80019E34 00015C74 40 80 00 34 */ bge lbl_80019E68
/* 80019E38 00015C78 2C 05 00 00 */ cmpwi r5, 0x0
/* 80019E3C 00015C7C 54 80 A8 14 */ slwi r0, r4, 21
/* 80019E40 00015C80 64 03 C8 03 */ oris r3, r0, 0xc803
/* 80019E44 00015C84 41 82 00 08 */ beq lbl_80019E4C
/* 80019E48 00015C88 64 03 D8 03 */ oris r3, r0, 0xd803
.global lbl_80019E4C
lbl_80019E4C:
/* 80019E4C 00015C8C 90 61 00 30 */ stw r3, 0x30(r1)
/* 80019E50 00015C90 7F A3 EB 78 */ mr r3, r29
/* 80019E54 00015C94 7F C5 F3 78 */ mr r5, r30
/* 80019E58 00015C98 38 81 00 30 */ addi r4, r1, 0x30
2022-10-16 16:31:36 +00:00
/* 80019E5C 00015C9C 48 00 01 2D */ bl TRKPPCAccessSpecialReg
2022-10-16 16:05:58 +00:00
/* 80019E60 00015CA0 7C 7F 1B 78 */ mr r31, r3
/* 80019E64 00015CA4 48 00 01 0C */ b lbl_80019F70
.global lbl_80019E68
lbl_80019E68:
/* 80019E68 00015CA8 40 82 00 34 */ bne lbl_80019E9C
/* 80019E6C 00015CAC 2C 05 00 00 */ cmpwi r5, 0x0
/* 80019E70 00015CB0 41 82 00 0C */ beq lbl_80019E7C
2022-10-16 16:31:36 +00:00
/* 80019E74 00015CB4 4B FF FF 05 */ bl ReadFPSCR
2022-10-16 16:05:58 +00:00
/* 80019E78 00015CB8 48 00 00 08 */ b lbl_80019E80
.global lbl_80019E7C
lbl_80019E7C:
2022-10-16 16:31:36 +00:00
/* 80019E7C 00015CBC 4B FF FF 21 */ bl WriteFPSCR
2022-10-16 16:05:58 +00:00
.global lbl_80019E80
lbl_80019E80:
/* 80019E80 00015CC0 80 9D 00 04 */ lwz r4, 0x4(r29)
/* 80019E84 00015CC4 38 00 00 00 */ li r0, 0x0
/* 80019E88 00015CC8 38 60 FF FF */ li r3, -0x1
/* 80019E8C 00015CCC 90 1D 00 00 */ stw r0, 0x0(r29)
/* 80019E90 00015CD0 7C 80 18 38 */ and r0, r4, r3
/* 80019E94 00015CD4 90 1D 00 04 */ stw r0, 0x4(r29)
/* 80019E98 00015CD8 48 00 00 D8 */ b lbl_80019F70
.global lbl_80019E9C
lbl_80019E9C:
/* 80019E9C 00015CDC 28 04 00 21 */ cmplwi r4, 0x21
/* 80019EA0 00015CE0 40 82 00 D0 */ bne lbl_80019F70
/* 80019EA4 00015CE4 2C 05 00 00 */ cmpwi r5, 0x0
/* 80019EA8 00015CE8 40 82 00 0C */ bne lbl_80019EB4
/* 80019EAC 00015CEC 80 03 00 04 */ lwz r0, 0x4(r3)
/* 80019EB0 00015CF0 90 03 00 00 */ stw r0, 0x0(r3)
.global lbl_80019EB4
lbl_80019EB4:
2022-10-16 16:31:36 +00:00
/* 80019EB4 00015CF4 3D 80 80 40 */ lis r12, "@984"@ha
/* 80019EB8 00015CF8 85 6C 77 88 */ lwzu r11, "@984"@l(r12)
2022-10-16 16:05:58 +00:00
/* 80019EBC 00015CFC 2C 05 00 00 */ cmpwi r5, 0x0
/* 80019EC0 00015D00 91 61 00 08 */ stw r11, 0x8(r1)
/* 80019EC4 00015D04 81 4C 00 04 */ lwz r10, 0x4(r12)
/* 80019EC8 00015D08 81 2C 00 08 */ lwz r9, 0x8(r12)
/* 80019ECC 00015D0C 81 0C 00 0C */ lwz r8, 0xc(r12)
/* 80019ED0 00015D10 80 EC 00 10 */ lwz r7, 0x10(r12)
/* 80019ED4 00015D14 80 CC 00 14 */ lwz r6, 0x14(r12)
/* 80019ED8 00015D18 80 AC 00 18 */ lwz r5, 0x18(r12)
/* 80019EDC 00015D1C 80 8C 00 1C */ lwz r4, 0x1c(r12)
/* 80019EE0 00015D20 80 6C 00 20 */ lwz r3, 0x20(r12)
/* 80019EE4 00015D24 80 0C 00 24 */ lwz r0, 0x24(r12)
/* 80019EE8 00015D28 91 41 00 0C */ stw r10, 0xc(r1)
/* 80019EEC 00015D2C 91 21 00 10 */ stw r9, 0x10(r1)
/* 80019EF0 00015D30 91 01 00 14 */ stw r8, 0x14(r1)
/* 80019EF4 00015D34 90 E1 00 18 */ stw r7, 0x18(r1)
/* 80019EF8 00015D38 90 C1 00 1C */ stw r6, 0x1c(r1)
/* 80019EFC 00015D3C 90 A1 00 20 */ stw r5, 0x20(r1)
/* 80019F00 00015D40 90 81 00 24 */ stw r4, 0x24(r1)
/* 80019F04 00015D44 90 61 00 28 */ stw r3, 0x28(r1)
/* 80019F08 00015D48 90 01 00 2C */ stw r0, 0x2c(r1)
/* 80019F0C 00015D4C 41 82 00 1C */ beq lbl_80019F28
/* 80019F10 00015D50 3C 60 7C 9F */ lis r3, 0x7c9f
/* 80019F14 00015D54 3C 00 90 83 */ lis r0, 0x9083
/* 80019F18 00015D58 38 63 FA A6 */ addi r3, r3, -0x55a
/* 80019F1C 00015D5C 90 61 00 08 */ stw r3, 0x8(r1)
/* 80019F20 00015D60 90 01 00 0C */ stw r0, 0xc(r1)
/* 80019F24 00015D64 48 00 00 18 */ b lbl_80019F3C
.global lbl_80019F28
lbl_80019F28:
/* 80019F28 00015D68 3C 60 7C 9F */ lis r3, 0x7c9f
/* 80019F2C 00015D6C 3C 80 80 83 */ lis r4, 0x8083
/* 80019F30 00015D70 38 03 FB A6 */ addi r0, r3, -0x45a
/* 80019F34 00015D74 90 81 00 08 */ stw r4, 0x8(r1)
/* 80019F38 00015D78 90 01 00 0C */ stw r0, 0xc(r1)
.global lbl_80019F3C
lbl_80019F3C:
/* 80019F3C 00015D7C 7F A3 EB 78 */ mr r3, r29
/* 80019F40 00015D80 7F C5 F3 78 */ mr r5, r30
/* 80019F44 00015D84 38 81 00 08 */ addi r4, r1, 0x8
2022-10-16 16:31:36 +00:00
/* 80019F48 00015D88 48 00 00 41 */ bl TRKPPCAccessSpecialReg
2022-10-16 16:05:58 +00:00
/* 80019F4C 00015D8C 2C 1E 00 00 */ cmpwi r30, 0x0
/* 80019F50 00015D90 7C 7F 1B 78 */ mr r31, r3
/* 80019F54 00015D94 41 82 00 1C */ beq lbl_80019F70
/* 80019F58 00015D98 80 9D 00 00 */ lwz r4, 0x0(r29)
/* 80019F5C 00015D9C 38 60 FF FF */ li r3, -0x1
/* 80019F60 00015DA0 38 00 00 00 */ li r0, 0x0
/* 80019F64 00015DA4 7C 83 18 38 */ and r3, r4, r3
/* 80019F68 00015DA8 90 7D 00 04 */ stw r3, 0x4(r29)
/* 80019F6C 00015DAC 90 1D 00 00 */ stw r0, 0x0(r29)
.global lbl_80019F70
lbl_80019F70:
/* 80019F70 00015DB0 7F E3 FB 78 */ mr r3, r31
/* 80019F74 00015DB4 BB 41 00 58 */ lmw r26, 0x58(r1)
/* 80019F78 00015DB8 80 01 00 74 */ lwz r0, 0x74(r1)
/* 80019F7C 00015DBC 7C 08 03 A6 */ mtlr r0
/* 80019F80 00015DC0 38 21 00 70 */ addi r1, r1, 0x70
/* 80019F84 00015DC4 4E 80 00 20 */ blr
2022-10-16 16:31:36 +00:00
.global TRKPPCAccessSpecialReg
TRKPPCAccessSpecialReg:
2022-10-16 16:05:58 +00:00
/* 80019F88 00015DC8 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 80019F8C 00015DCC 7C 08 02 A6 */ mflr r0
/* 80019F90 00015DD0 3C A0 4E 80 */ lis r5, 0x4e80
/* 80019F94 00015DD4 90 01 00 14 */ stw r0, 0x14(r1)
/* 80019F98 00015DD8 38 05 00 20 */ addi r0, r5, 0x20
/* 80019F9C 00015DDC 93 E1 00 0C */ stw r31, 0xc(r1)
/* 80019FA0 00015DE0 7C 9F 23 78 */ mr r31, r4
/* 80019FA4 00015DE4 93 C1 00 08 */ stw r30, 0x8(r1)
/* 80019FA8 00015DE8 7C 7E 1B 78 */ mr r30, r3
/* 80019FAC 00015DEC 7F E3 FB 78 */ mr r3, r31
/* 80019FB0 00015DF0 90 04 00 24 */ stw r0, 0x24(r4)
/* 80019FB4 00015DF4 38 80 00 28 */ li r4, 0x28
2022-10-16 16:31:36 +00:00
/* 80019FB8 00015DF8 4B FF B5 79 */ bl TRK_flush_cache
/* 80019FBC 00015DFC 3C 80 80 4A */ lis r4, TRKvalue128_temp@ha
2022-10-16 16:05:58 +00:00
/* 80019FC0 00015E00 7F EC FB 78 */ mr r12, r31
/* 80019FC4 00015E04 7F C3 F3 78 */ mr r3, r30
2022-10-16 16:31:36 +00:00
/* 80019FC8 00015E08 38 84 8B B0 */ addi r4, r4, TRKvalue128_temp@l
2022-10-16 16:05:58 +00:00
/* 80019FCC 00015E0C 7D 89 03 A6 */ mtctr r12
/* 80019FD0 00015E10 4E 80 04 21 */ bctrl
/* 80019FD4 00015E14 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 80019FD8 00015E18 38 60 00 00 */ li r3, 0x0
/* 80019FDC 00015E1C 83 C1 00 08 */ lwz r30, 0x8(r1)
/* 80019FE0 00015E20 80 01 00 14 */ lwz r0, 0x14(r1)
/* 80019FE4 00015E24 7C 08 03 A6 */ mtlr r0
/* 80019FE8 00015E28 38 21 00 10 */ addi r1, r1, 0x10
/* 80019FEC 00015E2C 4E 80 00 20 */ blr
2022-10-16 16:31:36 +00:00
.global TRKTargetSetInputPendingPtr
TRKTargetSetInputPendingPtr:
/* 80019FF0 00015E30 3C 80 80 4A */ lis r4, gTRKState@ha
/* 80019FF4 00015E34 38 84 8B C0 */ addi r4, r4, gTRKState@l
2022-10-16 16:05:58 +00:00
/* 80019FF8 00015E38 90 64 00 A0 */ stw r3, 0xa0(r4)
/* 80019FFC 00015E3C 4E 80 00 20 */ blr
2022-10-16 16:31:36 +00:00
.global ConvertAddress
ConvertAddress:
2022-10-16 16:05:58 +00:00
/* 8001A000 00015E40 64 63 80 00 */ oris r3, r3, 0x8000
/* 8001A004 00015E44 4E 80 00 20 */ blr
2022-10-16 16:31:36 +00:00
.global GetThreadInfo
GetThreadInfo:
2022-10-16 16:05:58 +00:00
/* 8001A008 00015E48 38 00 00 01 */ li r0, 0x1
/* 8001A00C 00015E4C 90 03 00 00 */ stw r0, 0x0(r3)
/* 8001A010 00015E50 38 00 00 00 */ li r0, 0x0
/* 8001A014 00015E54 3C A0 80 00 */ lis r5, 0x800000DC@ha
/* 8001A018 00015E58 90 04 00 00 */ stw r0, 0x0(r4)
/* 8001A01C 00015E5C 80 E5 00 DC */ lwz r7, 0x800000DC@l(r5)
/* 8001A020 00015E60 3C 07 00 01 */ addis r0, r7, 0x1
/* 8001A024 00015E64 28 00 FF FF */ cmplwi r0, 0xffff
/* 8001A028 00015E68 4D 82 00 20 */ beqlr
/* 8001A02C 00015E6C 2C 07 00 00 */ cmpwi r7, 0x0
/* 8001A030 00015E70 4D 82 00 20 */ beqlr
/* 8001A034 00015E74 3C 07 80 00 */ addis r0, r7, 0x8000
/* 8001A038 00015E78 28 00 00 00 */ cmplwi r0, 0x0
/* 8001A03C 00015E7C 40 82 00 08 */ bne lbl_8001A044
/* 8001A040 00015E80 4E 80 00 20 */ blr
.global lbl_8001A044
lbl_8001A044:
/* 8001A044 00015E84 38 C0 00 00 */ li r6, 0x0
/* 8001A048 00015E88 48 00 00 40 */ b lbl_8001A088
.global lbl_8001A04C
lbl_8001A04C:
/* 8001A04C 00015E8C 80 05 00 E4 */ lwz r0, 0xe4(r5)
/* 8001A050 00015E90 7C 07 00 40 */ cmplw r7, r0
/* 8001A054 00015E94 40 82 00 08 */ bne lbl_8001A05C
/* 8001A058 00015E98 90 C4 00 00 */ stw r6, 0x0(r4)
.global lbl_8001A05C
lbl_8001A05C:
/* 8001A05C 00015E9C 80 07 02 FC */ lwz r0, 0x2fc(r7)
/* 8001A060 00015EA0 38 C6 00 01 */ addi r6, r6, 0x1
/* 8001A064 00015EA4 64 07 80 00 */ oris r7, r0, 0x8000
/* 8001A068 00015EA8 3C 07 00 01 */ addis r0, r7, 0x1
/* 8001A06C 00015EAC 28 00 FF FF */ cmplwi r0, 0xffff
/* 8001A070 00015EB0 41 82 00 20 */ beq lbl_8001A090
/* 8001A074 00015EB4 2C 07 00 00 */ cmpwi r7, 0x0
/* 8001A078 00015EB8 41 82 00 18 */ beq lbl_8001A090
/* 8001A07C 00015EBC 3C 07 80 00 */ addis r0, r7, 0x8000
/* 8001A080 00015EC0 28 00 00 00 */ cmplwi r0, 0x0
/* 8001A084 00015EC4 41 82 00 0C */ beq lbl_8001A090
.global lbl_8001A088
lbl_8001A088:
/* 8001A088 00015EC8 2C 07 00 00 */ cmpwi r7, 0x0
/* 8001A08C 00015ECC 40 82 FF C0 */ bne lbl_8001A04C
.global lbl_8001A090
lbl_8001A090:
/* 8001A090 00015ED0 90 C3 00 00 */ stw r6, 0x0(r3)
/* 8001A094 00015ED4 4E 80 00 20 */ blr
2022-10-17 07:58:14 +00:00
.include "macros.inc"
.section .rodata, "wa" # 0x80406560 - 0x80421040 ; 0x0001AAE0
.global gTRKMemMap
gTRKMemMap:
.4byte 0
.4byte 0xFFFFFFFF
.4byte 0x00000001
.4byte 0x00000001
.global "@984"
"@984":
.4byte 0x60000000
.4byte 0x60000000
.4byte 0x60000000
.4byte 0x60000000
.4byte 0x60000000
.4byte 0x60000000
.4byte 0x60000000
.4byte 0x60000000
.4byte 0x60000000
.4byte 0x60000000
.global "@999"
"@999":
.4byte 0x60000000
.4byte 0x60000000
.4byte 0x60000000
.4byte 0x60000000
.4byte 0x60000000
.4byte 0x60000000
.4byte 0x60000000
.4byte 0x60000000
.4byte 0x60000000
.4byte 0x60000000
.global "@1022"
"@1022":
.4byte 0x60000000
.4byte 0x60000000
.4byte 0x60000000
.4byte 0x60000000
.4byte 0x60000000
.4byte 0x60000000
.4byte 0x60000000
.4byte 0x60000000
.4byte 0x60000000
.4byte 0x60000000
.include "macros.inc"
.section .data, "wa" # 0x80421040 - 0x80496700 ; 0x000756C0
.global gTRKExceptionStatus
gTRKExceptionStatus:
.4byte 0
.4byte 0
.4byte 0
.4byte 0x01000000
.include "macros.inc"
.section .bss, "", @nobits # 0x80496700 - 0x80556420 ; 0x000BFD20
.global gTRKRestoreFlags
gTRKRestoreFlags:
.skip 0x10
.global gTRKStepStatus
gTRKStepStatus:
.skip 0x18
.global gTRKSaveState
gTRKSaveState:
.skip 0x98
.global TRKvalue128_temp
TRKvalue128_temp:
.skip 0x10
.global gTRKState
gTRKState:
.skip 0xA8
.global gTRKCPUState
gTRKCPUState:
.skip 0x438
.include "macros.inc"
.section .sbss, "", @nobits # 0x8055C6E0 - 0x8055DF80 ; 0x000018A0
.global TRK_saved_exceptionID
TRK_saved_exceptionID:
.skip 0x8