Match and link RAssertDolphin.cpp

This commit is contained in:
Phillip Stephens 2023-10-05 03:09:48 -07:00
parent 8e579a2706
commit fbcbe2c541
10 changed files with 287 additions and 217 deletions

View File

@ -8,8 +8,8 @@
.section .sbss, "wa"
.balign 8
.global lbl_805A9248
lbl_805A9248:
.global CallFatal
CallFatal:
.skip 0x4
.global rs_debugger_buffer_size
rs_debugger_buffer_size:
@ -156,7 +156,7 @@ lbl_802D6AAC:
/* 802D6ABC 002D3A1C 7C 60 07 75 */ extsb. r0, r3
/* 802D6AC0 002D3A20 40 82 00 60 */ bne lbl_802D6B20
/* 802D6AC4 002D3A24 A0 81 00 20 */ lhz r4, 0x20(r1)
/* 802D6AC8 002D3A28 80 62 C5 88 */ lwz r3, lbl_805AE2A8@sda21(r2)
/* 802D6AC8 002D3A28 80 62 C5 88 */ lwz r3, ExitButtons@sda21(r2)
/* 802D6ACC 002D3A2C 70 80 0C 10 */ andi. r0, r4, 0xc10
/* 802D6AD0 002D3A30 90 61 00 10 */ stw r3, 0x10(r1)
/* 802D6AD4 002D3A34 2C 00 0C 10 */ cmpwi r0, 0xc10
@ -186,27 +186,27 @@ lbl_802D6B20:
/* 802D6B28 002D3A88 38 60 00 00 */ li r3, 0x0
/* 802D6B2C 002D3A8C 48 0B 29 5D */ bl VISetBlack
/* 802D6B30 002D3A90 48 0B 27 BD */ bl VIFlush
/* 802D6B34 002D3A94 3C 60 80 3D */ lis r3, lbl_803D6AB8@ha
/* 802D6B34 002D3A94 3C 60 80 3D */ lis r3, "@stringBase0"@ha
/* 802D6B38 002D3A98 57 5F 04 3E */ clrlwi r31, r26, 16
/* 802D6B3C 002D3A9C 38 63 6C 98 */ addi r3, r3, lbl_803D6AB8@l
/* 802D6B3C 002D3A9C 38 63 6C 98 */ addi r3, r3, "@stringBase0"@l
/* 802D6B40 002D3AA0 7F E4 FB 78 */ mr r4, r31
/* 802D6B44 002D3AA4 4C C6 31 82 */ crclr 6
/* 802D6B48 002D3AA8 48 0A 90 41 */ bl OSReport
/* 802D6B4C 002D3AAC 3C 60 80 3D */ lis r3, lbl_803D6AB8@ha
/* 802D6B50 002D3AB0 80 82 82 88 */ lwz r4, lbl_805A9FA8@sda21(r2)
/* 802D6B54 002D3AB4 38 63 6C 98 */ addi r3, r3, lbl_803D6AB8@l
/* 802D6B4C 002D3AAC 3C 60 80 3D */ lis r3, "@stringBase0"@ha
/* 802D6B50 002D3AB0 80 82 82 88 */ lwz r4, BuildTime@sda21(r2)
/* 802D6B54 002D3AB4 38 63 6C 98 */ addi r3, r3, "@stringBase0"@l
/* 802D6B58 002D3AB8 38 63 00 25 */ addi r3, r3, 0x25
/* 802D6B5C 002D3ABC 4C C6 31 82 */ crclr 6
/* 802D6B60 002D3AC0 48 0A 90 29 */ bl OSReport
/* 802D6B64 002D3AC4 3C 60 80 3D */ lis r3, lbl_803D6AB8@ha
/* 802D6B64 002D3AC4 3C 60 80 3D */ lis r3, "@stringBase0"@ha
/* 802D6B68 002D3AC8 7F 64 DB 78 */ mr r4, r27
/* 802D6B6C 002D3ACC 38 63 6C 98 */ addi r3, r3, lbl_803D6AB8@l
/* 802D6B6C 002D3ACC 38 63 6C 98 */ addi r3, r3, "@stringBase0"@l
/* 802D6B70 002D3AD0 38 63 00 29 */ addi r3, r3, 0x29
/* 802D6B74 002D3AD4 4C C6 31 82 */ crclr 6
/* 802D6B78 002D3AD8 48 0A 90 11 */ bl OSReport
/* 802D6B7C 002D3ADC 3C 60 80 3D */ lis r3, lbl_803D6AB8@ha
/* 802D6B7C 002D3ADC 3C 60 80 3D */ lis r3, "@stringBase0"@ha
/* 802D6B80 002D3AE0 7F 79 DB 78 */ mr r25, r27
/* 802D6B84 002D3AE4 3B 03 6C 98 */ addi r24, r3, lbl_803D6AB8@l
/* 802D6B84 002D3AE4 3B 03 6C 98 */ addi r24, r3, "@stringBase0"@l
/* 802D6B88 002D3AE8 3A E0 00 00 */ li r23, 0x0
lbl_802D6B8C:
/* 802D6B8C 002D3AEC 81 19 00 40 */ lwz r8, 0x40(r25)
@ -222,23 +222,23 @@ lbl_802D6B8C:
/* 802D6BB4 002D3B14 3B 39 00 04 */ addi r25, r25, 0x4
/* 802D6BB8 002D3B18 28 17 00 10 */ cmplwi r23, 0x10
/* 802D6BBC 002D3B1C 41 80 FF D0 */ blt lbl_802D6B8C
/* 802D6BC0 002D3B20 3C 60 80 3D */ lis r3, lbl_803D6AB8@ha
/* 802D6BC0 002D3B20 3C 60 80 3D */ lis r3, "@stringBase0"@ha
/* 802D6BC4 002D3B24 80 9B 00 84 */ lwz r4, 0x84(r27)
/* 802D6BC8 002D3B28 38 63 6C 98 */ addi r3, r3, lbl_803D6AB8@l
/* 802D6BC8 002D3B28 38 63 6C 98 */ addi r3, r3, "@stringBase0"@l
/* 802D6BCC 002D3B2C 80 BB 00 80 */ lwz r5, 0x80(r27)
/* 802D6BD0 002D3B30 38 63 00 9D */ addi r3, r3, 0x9d
/* 802D6BD4 002D3B34 4C C6 31 82 */ crclr 6
/* 802D6BD8 002D3B38 48 0A 8F B1 */ bl OSReport
/* 802D6BDC 002D3B3C 3C 60 80 3D */ lis r3, lbl_803D6AB8@ha
/* 802D6BDC 002D3B3C 3C 60 80 3D */ lis r3, "@stringBase0"@ha
/* 802D6BE0 002D3B40 80 9B 01 98 */ lwz r4, 0x198(r27)
/* 802D6BE4 002D3B44 38 63 6C 98 */ addi r3, r3, lbl_803D6AB8@l
/* 802D6BE4 002D3B44 38 63 6C 98 */ addi r3, r3, "@stringBase0"@l
/* 802D6BE8 002D3B48 80 BB 01 9C */ lwz r5, 0x19c(r27)
/* 802D6BEC 002D3B4C 38 63 00 CC */ addi r3, r3, 0xcc
/* 802D6BF0 002D3B50 4C C6 31 82 */ crclr 6
/* 802D6BF4 002D3B54 48 0A 8F 95 */ bl OSReport
/* 802D6BF8 002D3B58 3C 60 80 3D */ lis r3, lbl_803D6AB8@ha
/* 802D6BF8 002D3B58 3C 60 80 3D */ lis r3, "@stringBase0"@ha
/* 802D6BFC 002D3B5C 7F 84 E3 78 */ mr r4, r28
/* 802D6C00 002D3B60 38 63 6C 98 */ addi r3, r3, lbl_803D6AB8@l
/* 802D6C00 002D3B60 38 63 6C 98 */ addi r3, r3, "@stringBase0"@l
/* 802D6C04 002D3B64 7F A5 EB 78 */ mr r5, r29
/* 802D6C08 002D3B68 38 63 00 FB */ addi r3, r3, 0xfb
/* 802D6C0C 002D3B6C 4C C6 31 82 */ crclr 6
@ -247,9 +247,9 @@ lbl_802D6B8C:
/* 802D6C18 002D3B78 2C 18 00 00 */ cmpwi r24, 0x0
/* 802D6C1C 002D3B7C 41 82 00 2C */ beq lbl_802D6C48
/* 802D6C20 002D3B80 3C 80 80 48 */ lis r4, rs_debugger_buffer@ha
/* 802D6C24 002D3B84 3C 60 80 3D */ lis r3, lbl_803D6AB8@ha
/* 802D6C24 002D3B84 3C 60 80 3D */ lis r3, "@stringBase0"@ha
/* 802D6C28 002D3B88 38 04 99 80 */ addi r0, r4, rs_debugger_buffer@l
/* 802D6C2C 002D3B8C 38 83 6C 98 */ addi r4, r3, lbl_803D6AB8@l
/* 802D6C2C 002D3B8C 38 83 6C 98 */ addi r4, r3, "@stringBase0"@l
/* 802D6C30 002D3B90 7C 60 C2 14 */ add r3, r0, r24
/* 802D6C34 002D3B94 38 84 01 2A */ addi r4, r4, 0x12a
/* 802D6C38 002D3B98 4C C6 31 82 */ crclr 6
@ -257,9 +257,9 @@ lbl_802D6B8C:
/* 802D6C40 002D3BA0 7F 18 1A 14 */ add r24, r24, r3
/* 802D6C44 002D3BA4 48 00 00 28 */ b lbl_802D6C6C
lbl_802D6C48:
/* 802D6C48 002D3BA8 3C 80 80 3D */ lis r4, lbl_803D6AB8@ha
/* 802D6C48 002D3BA8 3C 80 80 3D */ lis r4, "@stringBase0"@ha
/* 802D6C4C 002D3BAC 3C 60 80 48 */ lis r3, rs_debugger_buffer@ha
/* 802D6C50 002D3BB0 38 84 6C 98 */ addi r4, r4, lbl_803D6AB8@l
/* 802D6C50 002D3BB0 38 84 6C 98 */ addi r4, r4, "@stringBase0"@l
/* 802D6C54 002D3BB4 7F E5 FB 78 */ mr r5, r31
/* 802D6C58 002D3BB8 38 63 99 80 */ addi r3, r3, rs_debugger_buffer@l
/* 802D6C5C 002D3BBC 38 84 01 39 */ addi r4, r4, 0x139
@ -268,17 +268,17 @@ lbl_802D6C48:
/* 802D6C68 002D3BC8 7F 18 1A 14 */ add r24, r24, r3
lbl_802D6C6C:
/* 802D6C6C 002D3BCC 3C 80 80 48 */ lis r4, rs_debugger_buffer@ha
/* 802D6C70 002D3BD0 3C 60 80 3D */ lis r3, lbl_803D6AB8@ha
/* 802D6C70 002D3BD0 3C 60 80 3D */ lis r3, "@stringBase0"@ha
/* 802D6C74 002D3BD4 38 04 99 80 */ addi r0, r4, rs_debugger_buffer@l
/* 802D6C78 002D3BD8 80 A2 82 88 */ lwz r5, lbl_805A9FA8@sda21(r2)
/* 802D6C7C 002D3BDC 38 83 6C 98 */ addi r4, r3, lbl_803D6AB8@l
/* 802D6C78 002D3BD8 80 A2 82 88 */ lwz r5, BuildTime@sda21(r2)
/* 802D6C7C 002D3BDC 38 83 6C 98 */ addi r4, r3, "@stringBase0"@l
/* 802D6C80 002D3BE0 7C 60 C2 14 */ add r3, r0, r24
/* 802D6C84 002D3BE4 38 84 00 25 */ addi r4, r4, 0x25
/* 802D6C88 002D3BE8 4C C6 31 82 */ crclr 6
/* 802D6C8C 002D3BEC 48 0B 72 2D */ bl sprintf
/* 802D6C90 002D3BF0 3C A0 80 48 */ lis r5, rs_debugger_buffer@ha
/* 802D6C94 002D3BF4 3C 80 80 3D */ lis r4, lbl_803D6AB8@ha
/* 802D6C98 002D3BF8 38 84 6C 98 */ addi r4, r4, lbl_803D6AB8@l
/* 802D6C94 002D3BF4 3C 80 80 3D */ lis r4, "@stringBase0"@ha
/* 802D6C98 002D3BF8 38 84 6C 98 */ addi r4, r4, "@stringBase0"@l
/* 802D6C9C 002D3BFC 7F D8 1A 14 */ add r30, r24, r3
/* 802D6CA0 002D3C00 38 05 99 80 */ addi r0, r5, rs_debugger_buffer@l
/* 802D6CA4 002D3C04 80 BB 01 98 */ lwz r5, 0x198(r27)
@ -292,10 +292,10 @@ lbl_802D6C6C:
/* 802D6CC4 002D3C24 28 00 00 0F */ cmplwi r0, 0xf
/* 802D6CC8 002D3C28 40 82 00 2C */ bne lbl_802D6CF4
/* 802D6CCC 002D3C2C 3C 80 80 48 */ lis r4, rs_debugger_buffer@ha
/* 802D6CD0 002D3C30 3C 60 80 3D */ lis r3, lbl_803D6AB8@ha
/* 802D6CD0 002D3C30 3C 60 80 3D */ lis r3, "@stringBase0"@ha
/* 802D6CD4 002D3C34 38 04 99 80 */ addi r0, r4, rs_debugger_buffer@l
/* 802D6CD8 002D3C38 7F 85 E3 78 */ mr r5, r28
/* 802D6CDC 002D3C3C 38 83 6C 98 */ addi r4, r3, lbl_803D6AB8@l
/* 802D6CDC 002D3C3C 38 83 6C 98 */ addi r4, r3, "@stringBase0"@l
/* 802D6CE0 002D3C40 7C 60 F2 14 */ add r3, r0, r30
/* 802D6CE4 002D3C44 38 84 01 6E */ addi r4, r4, 0x16e
/* 802D6CE8 002D3C48 4C C6 31 82 */ crclr 6
@ -303,25 +303,25 @@ lbl_802D6C6C:
/* 802D6CF0 002D3C50 7F DE 1A 14 */ add r30, r30, r3
lbl_802D6CF4:
/* 802D6CF4 002D3C54 3C 80 80 48 */ lis r4, rs_debugger_buffer@ha
/* 802D6CF8 002D3C58 3C 60 80 3D */ lis r3, lbl_803D6AB8@ha
/* 802D6CF8 002D3C58 3C 60 80 3D */ lis r3, "@stringBase0"@ha
/* 802D6CFC 002D3C5C 38 04 99 80 */ addi r0, r4, rs_debugger_buffer@l
/* 802D6D00 002D3C60 38 83 6C 98 */ addi r4, r3, lbl_803D6AB8@l
/* 802D6D00 002D3C60 38 83 6C 98 */ addi r4, r3, "@stringBase0"@l
/* 802D6D04 002D3C64 7C 60 F2 14 */ add r3, r0, r30
/* 802D6D08 002D3C68 38 84 01 74 */ addi r4, r4, 0x174
/* 802D6D0C 002D3C6C 4C C6 31 82 */ crclr 6
/* 802D6D10 002D3C70 48 0B 71 A9 */ bl sprintf
/* 802D6D14 002D3C74 3C 80 80 3D */ lis r4, lbl_803D6AB8@ha
/* 802D6D14 002D3C74 3C 80 80 3D */ lis r4, "@stringBase0"@ha
/* 802D6D18 002D3C78 7F DE 1A 14 */ add r30, r30, r3
/* 802D6D1C 002D3C7C 38 64 6C 98 */ addi r3, r4, lbl_803D6AB8@l
/* 802D6D1C 002D3C7C 38 64 6C 98 */ addi r3, r4, "@stringBase0"@l
/* 802D6D20 002D3C80 38 63 01 77 */ addi r3, r3, 0x177
/* 802D6D24 002D3C84 4C C6 31 82 */ crclr 6
/* 802D6D28 002D3C88 48 0A 8E 61 */ bl OSReport
/* 802D6D2C 002D3C8C 3C A0 80 00 */ lis r5, 0x80000400@ha
/* 802D6D30 002D3C90 3C 80 80 3D */ lis r4, lbl_803D6AB8@ha
/* 802D6D30 002D3C90 3C 80 80 3D */ lis r4, "@stringBase0"@ha
/* 802D6D34 002D3C94 3C 60 80 48 */ lis r3, rs_debugger_buffer@ha
/* 802D6D38 002D3C98 83 FB 00 04 */ lwz r31, 0x4(r27)
/* 802D6D3C 002D3C9C 3B 05 04 00 */ addi r24, r5, 0x80000400@l
/* 802D6D40 002D3CA0 3B 84 6C 98 */ addi r28, r4, lbl_803D6AB8@l
/* 802D6D40 002D3CA0 3B 84 6C 98 */ addi r28, r4, "@stringBase0"@l
/* 802D6D44 002D3CA4 3B 43 99 80 */ addi r26, r3, rs_debugger_buffer@l
/* 802D6D48 002D3CA8 3A E0 00 00 */ li r23, 0x0
/* 802D6D4C 002D3CAC 3F 20 81 80 */ lis r25, 0x8180
@ -347,17 +347,17 @@ lbl_802D6D54:
/* 802D6D98 002D3CF8 7F DE 1A 14 */ add r30, r30, r3
/* 802D6D9C 002D3CFC 48 00 00 44 */ b lbl_802D6DE0
lbl_802D6DA0:
/* 802D6DA0 002D3D00 3C 60 80 3D */ lis r3, lbl_803D6AB8@ha
/* 802D6DA0 002D3D00 3C 60 80 3D */ lis r3, "@stringBase0"@ha
/* 802D6DA4 002D3D04 7F E4 FB 78 */ mr r4, r31
/* 802D6DA8 002D3D08 38 63 6C 98 */ addi r3, r3, lbl_803D6AB8@l
/* 802D6DA8 002D3D08 38 63 6C 98 */ addi r3, r3, "@stringBase0"@l
/* 802D6DAC 002D3D0C 38 63 01 D0 */ addi r3, r3, 0x1d0
/* 802D6DB0 002D3D10 4C C6 31 82 */ crclr 6
/* 802D6DB4 002D3D14 48 0A 8D D5 */ bl OSReport
/* 802D6DB8 002D3D18 3C 80 80 48 */ lis r4, rs_debugger_buffer@ha
/* 802D6DBC 002D3D1C 3C 60 80 3D */ lis r3, lbl_803D6AB8@ha
/* 802D6DBC 002D3D1C 3C 60 80 3D */ lis r3, "@stringBase0"@ha
/* 802D6DC0 002D3D20 38 04 99 80 */ addi r0, r4, rs_debugger_buffer@l
/* 802D6DC4 002D3D24 7F E5 FB 78 */ mr r5, r31
/* 802D6DC8 002D3D28 38 83 6C 98 */ addi r4, r3, lbl_803D6AB8@l
/* 802D6DC8 002D3D28 38 83 6C 98 */ addi r4, r3, "@stringBase0"@l
/* 802D6DCC 002D3D2C 7C 60 F2 14 */ add r3, r0, r30
/* 802D6DD0 002D3D30 38 84 01 E3 */ addi r4, r4, 0x1e3
/* 802D6DD4 002D3D34 4C C6 31 82 */ crclr 6
@ -375,19 +375,19 @@ lbl_802D6DE4:
/* 802D6DFC 002D3D5C 3A F7 00 01 */ addi r23, r23, 0x1
/* 802D6E00 002D3D60 41 80 FF 54 */ blt lbl_802D6D54
lbl_802D6E04:
/* 802D6E04 002D3D64 3C 60 80 3D */ lis r3, lbl_803D6AB8@ha
/* 802D6E04 002D3D64 3C 60 80 3D */ lis r3, "@stringBase0"@ha
/* 802D6E08 002D3D68 80 9B 01 98 */ lwz r4, 0x198(r27)
/* 802D6E0C 002D3D6C 38 63 6C 98 */ addi r3, r3, lbl_803D6AB8@l
/* 802D6E0C 002D3D6C 38 63 6C 98 */ addi r3, r3, "@stringBase0"@l
/* 802D6E10 002D3D70 7F A5 EB 78 */ mr r5, r29
/* 802D6E14 002D3D74 38 63 01 F4 */ addi r3, r3, 0x1f4
/* 802D6E18 002D3D78 4C C6 31 82 */ crclr 6
/* 802D6E1C 002D3D7C 48 0A 8D 6D */ bl OSReport
/* 802D6E20 002D3D80 88 0D A6 88 */ lbz r0, lbl_805A9248@sda21(r13)
/* 802D6E20 002D3D80 88 0D A6 88 */ lbz r0, CallFatal@sda21(r13)
/* 802D6E24 002D3D84 28 00 00 00 */ cmplwi r0, 0x0
/* 802D6E28 002D3D88 40 82 00 28 */ bne lbl_802D6E50
/* 802D6E2C 002D3D8C 80 82 C5 80 */ lwz r4, lbl_805AE2A0@sda21(r2)
/* 802D6E2C 002D3D8C 80 82 C5 80 */ lwz r4, bg@sda21(r2)
/* 802D6E30 002D3D90 3C 60 80 48 */ lis r3, rs_debugger_buffer@ha
/* 802D6E34 002D3D94 80 02 C5 84 */ lwz r0, lbl_805AE2A4@sda21(r2)
/* 802D6E34 002D3D94 80 02 C5 84 */ lwz r0, fg@sda21(r2)
/* 802D6E38 002D3D98 38 A3 99 80 */ addi r5, r3, rs_debugger_buffer@l
/* 802D6E3C 002D3D9C 90 81 00 08 */ stw r4, 0x8(r1)
/* 802D6E40 002D3DA0 38 61 00 0C */ addi r3, r1, 0xc
@ -443,7 +443,7 @@ lbl_802D69D0:
/* 802D69DC 002D393C 7C 00 07 75 */ extsb. r0, r0
/* 802D69E0 002D3940 40 82 00 60 */ bne lbl_802D6A40
/* 802D69E4 002D3944 A0 81 00 20 */ lhz r4, 0x20(r1)
/* 802D69E8 002D3948 80 62 C5 88 */ lwz r3, lbl_805AE2A8@sda21(r2)
/* 802D69E8 002D3948 80 62 C5 88 */ lwz r3, ExitButtons@sda21(r2)
/* 802D69EC 002D394C 70 80 0C 10 */ andi. r0, r4, 0xc10
/* 802D69F0 002D3950 90 61 00 10 */ stw r3, 0x10(r1)
/* 802D69F4 002D3954 2C 00 0C 10 */ cmpwi r0, 0xc10
@ -473,27 +473,27 @@ lbl_802D6A40:
/* 802D6A48 002D39A8 38 60 00 00 */ li r3, 0
/* 802D6A4C 002D39AC 48 0B 28 61 */ bl VISetBlack
/* 802D6A50 002D39B0 48 0B 26 C1 */ bl VIFlush
/* 802D6A54 002D39B4 3C 60 80 3D */ lis r3, lbl_803D6AB8@ha
/* 802D6A54 002D39B4 3C 60 80 3D */ lis r3, "@stringBase0"@ha
/* 802D6A58 002D39B8 57 5F 04 3E */ clrlwi r31, r26, 0x10
/* 802D6A5C 002D39BC 38 63 6A B8 */ addi r3, r3, lbl_803D6AB8@l
/* 802D6A5C 002D39BC 38 63 6A B8 */ addi r3, r3, "@stringBase0"@l
/* 802D6A60 002D39C0 7F E4 FB 78 */ mr r4, r31
/* 802D6A64 002D39C4 4C C6 31 82 */ crclr 6
/* 802D6A68 002D39C8 48 0A 8F 45 */ bl OSReport
/* 802D6A6C 002D39CC 3C 60 80 3D */ lis r3, lbl_803D6AB8@ha
/* 802D6A70 002D39D0 80 82 82 88 */ lwz r4, lbl_805A9FA8@sda21(r2)
/* 802D6A74 002D39D4 38 63 6A B8 */ addi r3, r3, lbl_803D6AB8@l
/* 802D6A6C 002D39CC 3C 60 80 3D */ lis r3, "@stringBase0"@ha
/* 802D6A70 002D39D0 80 82 82 88 */ lwz r4, BuildTime@sda21(r2)
/* 802D6A74 002D39D4 38 63 6A B8 */ addi r3, r3, "@stringBase0"@l
/* 802D6A78 002D39D8 38 63 00 25 */ addi r3, r3, 0x25
/* 802D6A7C 002D39DC 4C C6 31 82 */ crclr 6
/* 802D6A80 002D39E0 48 0A 8F 2D */ bl OSReport
/* 802D6A84 002D39E4 3C 60 80 3D */ lis r3, lbl_803D6AB8@ha
/* 802D6A84 002D39E4 3C 60 80 3D */ lis r3, "@stringBase0"@ha
/* 802D6A88 002D39E8 7F 64 DB 78 */ mr r4, r27
/* 802D6A8C 002D39EC 38 63 6A B8 */ addi r3, r3, lbl_803D6AB8@l
/* 802D6A8C 002D39EC 38 63 6A B8 */ addi r3, r3, "@stringBase0"@l
/* 802D6A90 002D39F0 38 63 00 29 */ addi r3, r3, 0x29
/* 802D6A94 002D39F4 4C C6 31 82 */ crclr 6
/* 802D6A98 002D39F8 48 0A 8F 15 */ bl OSReport
/* 802D6A9C 002D39FC 3C 60 80 3D */ lis r3, lbl_803D6AB8@ha
/* 802D6A9C 002D39FC 3C 60 80 3D */ lis r3, "@stringBase0"@ha
/* 802D6AA0 002D3A00 7F 79 DB 78 */ mr r25, r27
/* 802D6AA4 002D3A04 3B 03 6A B8 */ addi r24, r3, lbl_803D6AB8@l
/* 802D6AA4 002D3A04 3B 03 6A B8 */ addi r24, r3, "@stringBase0"@l
/* 802D6AA8 002D3A08 3A E0 00 00 */ li r23, 0
lbl_802D6AAC:
/* 802D6AAC 002D3A0C 81 19 00 40 */ lwz r8, 0x40(r25)
@ -509,23 +509,23 @@ lbl_802D6AAC:
/* 802D6AD4 002D3A34 3B 39 00 04 */ addi r25, r25, 4
/* 802D6AD8 002D3A38 28 17 00 10 */ cmplwi r23, 0x10
/* 802D6ADC 002D3A3C 41 80 FF D0 */ blt lbl_802D6AAC
/* 802D6AE0 002D3A40 3C 60 80 3D */ lis r3, lbl_803D6AB8@ha
/* 802D6AE0 002D3A40 3C 60 80 3D */ lis r3, "@stringBase0"@ha
/* 802D6AE4 002D3A44 80 9B 00 84 */ lwz r4, 0x84(r27)
/* 802D6AE8 002D3A48 38 63 6A B8 */ addi r3, r3, lbl_803D6AB8@l
/* 802D6AE8 002D3A48 38 63 6A B8 */ addi r3, r3, "@stringBase0"@l
/* 802D6AEC 002D3A4C 80 BB 00 80 */ lwz r5, 0x80(r27)
/* 802D6AF0 002D3A50 38 63 00 9D */ addi r3, r3, 0x9d
/* 802D6AF4 002D3A54 4C C6 31 82 */ crclr 6
/* 802D6AF8 002D3A58 48 0A 8E B5 */ bl OSReport
/* 802D6AFC 002D3A5C 3C 60 80 3D */ lis r3, lbl_803D6AB8@ha
/* 802D6AFC 002D3A5C 3C 60 80 3D */ lis r3, "@stringBase0"@ha
/* 802D6B00 002D3A60 80 9B 01 98 */ lwz r4, 0x198(r27)
/* 802D6B04 002D3A64 38 63 6A B8 */ addi r3, r3, lbl_803D6AB8@l
/* 802D6B04 002D3A64 38 63 6A B8 */ addi r3, r3, "@stringBase0"@l
/* 802D6B08 002D3A68 80 BB 01 9C */ lwz r5, 0x19c(r27)
/* 802D6B0C 002D3A6C 38 63 00 CC */ addi r3, r3, 0xcc
/* 802D6B10 002D3A70 4C C6 31 82 */ crclr 6
/* 802D6B14 002D3A74 48 0A 8E 99 */ bl OSReport
/* 802D6B18 002D3A78 3C 60 80 3D */ lis r3, lbl_803D6AB8@ha
/* 802D6B18 002D3A78 3C 60 80 3D */ lis r3, "@stringBase0"@ha
/* 802D6B1C 002D3A7C 7F 84 E3 78 */ mr r4, r28
/* 802D6B20 002D3A80 38 63 6A B8 */ addi r3, r3, lbl_803D6AB8@l
/* 802D6B20 002D3A80 38 63 6A B8 */ addi r3, r3, "@stringBase0"@l
/* 802D6B24 002D3A84 7F A5 EB 78 */ mr r5, r29
/* 802D6B28 002D3A88 38 63 00 FB */ addi r3, r3, 0xfb
/* 802D6B2C 002D3A8C 4C C6 31 82 */ crclr 6
@ -534,9 +534,9 @@ lbl_802D6AAC:
/* 802D6B38 002D3A98 2C 18 00 00 */ cmpwi r24, 0
/* 802D6B3C 002D3A9C 41 82 00 2C */ beq lbl_802D6B68
/* 802D6B40 002D3AA0 3C 80 80 48 */ lis r4, rs_debugger_buffer@ha
/* 802D6B44 002D3AA4 3C 60 80 3D */ lis r3, lbl_803D6AB8@ha
/* 802D6B44 002D3AA4 3C 60 80 3D */ lis r3, "@stringBase0"@ha
/* 802D6B48 002D3AA8 38 04 97 A0 */ addi r0, r4, rs_debugger_buffer@l
/* 802D6B4C 002D3AAC 38 83 6A B8 */ addi r4, r3, lbl_803D6AB8@l
/* 802D6B4C 002D3AAC 38 83 6A B8 */ addi r4, r3, "@stringBase0"@l
/* 802D6B50 002D3AB0 7C 60 C2 14 */ add r3, r0, r24
/* 802D6B54 002D3AB4 38 84 01 2A */ addi r4, r4, 0x12a
/* 802D6B58 002D3AB8 4C C6 31 82 */ crclr 6
@ -544,9 +544,9 @@ lbl_802D6AAC:
/* 802D6B60 002D3AC0 7F 18 1A 14 */ add r24, r24, r3
/* 802D6B64 002D3AC4 48 00 00 28 */ b lbl_802D6B8C
lbl_802D6B68:
/* 802D6B68 002D3AC8 3C 80 80 3D */ lis r4, lbl_803D6AB8@ha
/* 802D6B68 002D3AC8 3C 80 80 3D */ lis r4, "@stringBase0"@ha
/* 802D6B6C 002D3ACC 3C 60 80 48 */ lis r3, rs_debugger_buffer@ha
/* 802D6B70 002D3AD0 38 84 6A B8 */ addi r4, r4, lbl_803D6AB8@l
/* 802D6B70 002D3AD0 38 84 6A B8 */ addi r4, r4, "@stringBase0"@l
/* 802D6B74 002D3AD4 7F E5 FB 78 */ mr r5, r31
/* 802D6B78 002D3AD8 38 63 97 A0 */ addi r3, r3, rs_debugger_buffer@l
/* 802D6B7C 002D3ADC 38 84 01 39 */ addi r4, r4, 0x139
@ -555,17 +555,17 @@ lbl_802D6B68:
/* 802D6B88 002D3AE8 7F 18 1A 14 */ add r24, r24, r3
lbl_802D6B8C:
/* 802D6B8C 002D3AEC 3C 80 80 48 */ lis r4, rs_debugger_buffer@ha
/* 802D6B90 002D3AF0 3C 60 80 3D */ lis r3, lbl_803D6AB8@ha
/* 802D6B90 002D3AF0 3C 60 80 3D */ lis r3, "@stringBase0"@ha
/* 802D6B94 002D3AF4 38 04 97 A0 */ addi r0, r4, rs_debugger_buffer@l
/* 802D6B98 002D3AF8 80 A2 82 88 */ lwz r5, lbl_805A9FA8@sda21(r2)
/* 802D6B9C 002D3AFC 38 83 6A B8 */ addi r4, r3, lbl_803D6AB8@l
/* 802D6B98 002D3AF8 80 A2 82 88 */ lwz r5, BuildTime@sda21(r2)
/* 802D6B9C 002D3AFC 38 83 6A B8 */ addi r4, r3, "@stringBase0"@l
/* 802D6BA0 002D3B00 7C 60 C2 14 */ add r3, r0, r24
/* 802D6BA4 002D3B04 38 84 00 25 */ addi r4, r4, 0x25
/* 802D6BA8 002D3B08 4C C6 31 82 */ crclr 6
/* 802D6BAC 002D3B0C 48 0B 71 31 */ bl sprintf
/* 802D6BB0 002D3B10 3C A0 80 48 */ lis r5, rs_debugger_buffer@ha
/* 802D6BB4 002D3B14 3C 80 80 3D */ lis r4, lbl_803D6AB8@ha
/* 802D6BB8 002D3B18 38 84 6A B8 */ addi r4, r4, lbl_803D6AB8@l
/* 802D6BB4 002D3B14 3C 80 80 3D */ lis r4, "@stringBase0"@ha
/* 802D6BB8 002D3B18 38 84 6A B8 */ addi r4, r4, "@stringBase0"@l
/* 802D6BBC 002D3B1C 7F D8 1A 14 */ add r30, r24, r3
/* 802D6BC0 002D3B20 38 05 97 A0 */ addi r0, r5, rs_debugger_buffer@l
/* 802D6BC4 002D3B24 80 BB 01 98 */ lwz r5, 0x198(r27)
@ -579,10 +579,10 @@ lbl_802D6B8C:
/* 802D6BE4 002D3B44 28 00 00 0F */ cmplwi r0, 0xf
/* 802D6BE8 002D3B48 40 82 00 2C */ bne lbl_802D6C14
/* 802D6BEC 002D3B4C 3C 80 80 48 */ lis r4, rs_debugger_buffer@ha
/* 802D6BF0 002D3B50 3C 60 80 3D */ lis r3, lbl_803D6AB8@ha
/* 802D6BF0 002D3B50 3C 60 80 3D */ lis r3, "@stringBase0"@ha
/* 802D6BF4 002D3B54 38 04 97 A0 */ addi r0, r4, rs_debugger_buffer@l
/* 802D6BF8 002D3B58 7F 85 E3 78 */ mr r5, r28
/* 802D6BFC 002D3B5C 38 83 6A B8 */ addi r4, r3, lbl_803D6AB8@l
/* 802D6BFC 002D3B5C 38 83 6A B8 */ addi r4, r3, "@stringBase0"@l
/* 802D6C00 002D3B60 7C 60 F2 14 */ add r3, r0, r30
/* 802D6C04 002D3B64 38 84 01 6E */ addi r4, r4, 0x16e
/* 802D6C08 002D3B68 4C C6 31 82 */ crclr 6
@ -590,25 +590,25 @@ lbl_802D6B8C:
/* 802D6C10 002D3B70 7F DE 1A 14 */ add r30, r30, r3
lbl_802D6C14:
/* 802D6C14 002D3B74 3C 80 80 48 */ lis r4, rs_debugger_buffer@ha
/* 802D6C18 002D3B78 3C 60 80 3D */ lis r3, lbl_803D6AB8@ha
/* 802D6C18 002D3B78 3C 60 80 3D */ lis r3, "@stringBase0"@ha
/* 802D6C1C 002D3B7C 38 04 97 A0 */ addi r0, r4, rs_debugger_buffer@l
/* 802D6C20 002D3B80 38 83 6A B8 */ addi r4, r3, lbl_803D6AB8@l
/* 802D6C20 002D3B80 38 83 6A B8 */ addi r4, r3, "@stringBase0"@l
/* 802D6C24 002D3B84 7C 60 F2 14 */ add r3, r0, r30
/* 802D6C28 002D3B88 38 84 01 74 */ addi r4, r4, 0x174
/* 802D6C2C 002D3B8C 4C C6 31 82 */ crclr 6
/* 802D6C30 002D3B90 48 0B 70 AD */ bl sprintf
/* 802D6C34 002D3B94 3C 80 80 3D */ lis r4, lbl_803D6AB8@ha
/* 802D6C34 002D3B94 3C 80 80 3D */ lis r4, "@stringBase0"@ha
/* 802D6C38 002D3B98 7F DE 1A 14 */ add r30, r30, r3
/* 802D6C3C 002D3B9C 38 64 6A B8 */ addi r3, r4, lbl_803D6AB8@l
/* 802D6C3C 002D3B9C 38 64 6A B8 */ addi r3, r4, "@stringBase0"@l
/* 802D6C40 002D3BA0 38 63 01 77 */ addi r3, r3, 0x177
/* 802D6C44 002D3BA4 4C C6 31 82 */ crclr 6
/* 802D6C48 002D3BA8 48 0A 8D 65 */ bl OSReport
/* 802D6C4C 002D3BAC 3C A0 80 00 */ lis r5, 0x80000400@ha
/* 802D6C50 002D3BB0 3C 80 80 3D */ lis r4, lbl_803D6AB8@ha
/* 802D6C50 002D3BB0 3C 80 80 3D */ lis r4, "@stringBase0"@ha
/* 802D6C54 002D3BB4 3C 60 80 48 */ lis r3, rs_debugger_buffer@ha
/* 802D6C58 002D3BB8 83 FB 00 04 */ lwz r31, 4(r27)
/* 802D6C5C 002D3BBC 3B 05 04 00 */ addi r24, r5, 0x80000400@l
/* 802D6C60 002D3BC0 3B 84 6A B8 */ addi r28, r4, lbl_803D6AB8@l
/* 802D6C60 002D3BC0 3B 84 6A B8 */ addi r28, r4, "@stringBase0"@l
/* 802D6C64 002D3BC4 3B 43 97 A0 */ addi r26, r3, rs_debugger_buffer@l
/* 802D6C68 002D3BC8 3A E0 00 00 */ li r23, 0
/* 802D6C6C 002D3BCC 3F 20 81 80 */ lis r25, 0x8180
@ -634,17 +634,17 @@ lbl_802D6C74:
/* 802D6CB8 002D3C18 7F DE 1A 14 */ add r30, r30, r3
/* 802D6CBC 002D3C1C 48 00 00 44 */ b lbl_802D6D00
lbl_802D6CC0:
/* 802D6CC0 002D3C20 3C 60 80 3D */ lis r3, lbl_803D6AB8@ha
/* 802D6CC0 002D3C20 3C 60 80 3D */ lis r3, "@stringBase0"@ha
/* 802D6CC4 002D3C24 7F E4 FB 78 */ mr r4, r31
/* 802D6CC8 002D3C28 38 63 6A B8 */ addi r3, r3, lbl_803D6AB8@l
/* 802D6CC8 002D3C28 38 63 6A B8 */ addi r3, r3, "@stringBase0"@l
/* 802D6CCC 002D3C2C 38 63 01 D0 */ addi r3, r3, 0x1d0
/* 802D6CD0 002D3C30 4C C6 31 82 */ crclr 6
/* 802D6CD4 002D3C34 48 0A 8C D9 */ bl OSReport
/* 802D6CD8 002D3C38 3C 80 80 48 */ lis r4, rs_debugger_buffer@ha
/* 802D6CDC 002D3C3C 3C 60 80 3D */ lis r3, lbl_803D6AB8@ha
/* 802D6CDC 002D3C3C 3C 60 80 3D */ lis r3, "@stringBase0"@ha
/* 802D6CE0 002D3C40 38 04 97 A0 */ addi r0, r4, rs_debugger_buffer@l
/* 802D6CE4 002D3C44 7F E5 FB 78 */ mr r5, r31
/* 802D6CE8 002D3C48 38 83 6A B8 */ addi r4, r3, lbl_803D6AB8@l
/* 802D6CE8 002D3C48 38 83 6A B8 */ addi r4, r3, "@stringBase0"@l
/* 802D6CEC 002D3C4C 7C 60 F2 14 */ add r3, r0, r30
/* 802D6CF0 002D3C50 38 84 01 E3 */ addi r4, r4, 0x1e3
/* 802D6CF4 002D3C54 4C C6 31 82 */ crclr 6
@ -662,19 +662,19 @@ lbl_802D6D04:
/* 802D6D1C 002D3C7C 3A F7 00 01 */ addi r23, r23, 1
/* 802D6D20 002D3C80 41 80 FF 54 */ blt lbl_802D6C74
lbl_802D6D24:
/* 802D6D24 002D3C84 3C 60 80 3D */ lis r3, lbl_803D6AB8@ha
/* 802D6D24 002D3C84 3C 60 80 3D */ lis r3, "@stringBase0"@ha
/* 802D6D28 002D3C88 80 9B 01 98 */ lwz r4, 0x198(r27)
/* 802D6D2C 002D3C8C 38 63 6A B8 */ addi r3, r3, lbl_803D6AB8@l
/* 802D6D2C 002D3C8C 38 63 6A B8 */ addi r3, r3, "@stringBase0"@l
/* 802D6D30 002D3C90 7F A5 EB 78 */ mr r5, r29
/* 802D6D34 002D3C94 38 63 01 F4 */ addi r3, r3, 0x1f4
/* 802D6D38 002D3C98 4C C6 31 82 */ crclr 6
/* 802D6D3C 002D3C9C 48 0A 8C 71 */ bl OSReport
/* 802D6D40 002D3CA0 88 0D A6 88 */ lbz r0, lbl_805A9248@sda21(r13)
/* 802D6D40 002D3CA0 88 0D A6 88 */ lbz r0, CallFatal@sda21(r13)
/* 802D6D44 002D3CA4 28 00 00 00 */ cmplwi r0, 0
/* 802D6D48 002D3CA8 40 82 00 28 */ bne lbl_802D6D70
/* 802D6D4C 002D3CAC 80 82 C5 80 */ lwz r4, lbl_805AE2A0@sda21(r2)
/* 802D6D4C 002D3CAC 80 82 C5 80 */ lwz r4, bg@sda21(r2)
/* 802D6D50 002D3CB0 3C 60 80 48 */ lis r3, rs_debugger_buffer@ha
/* 802D6D54 002D3CB4 80 02 C5 84 */ lwz r0, lbl_805AE2A4@sda21(r2)
/* 802D6D54 002D3CB4 80 02 C5 84 */ lwz r0, fg@sda21(r2)
/* 802D6D58 002D3CB8 38 A3 97 A0 */ addi r5, r3, rs_debugger_buffer@l
/* 802D6D5C 002D3CBC 90 81 00 08 */ stw r4, 8(r1)
/* 802D6D60 002D3CC0 38 61 00 0C */ addi r3, r1, 0xc
@ -692,18 +692,18 @@ lbl_802D6D70:
.section .sdata2, "a"
.balign 8
.global lbl_805AE2A0
lbl_805AE2A0:
.global bg
bg:
# ROM: 0x3FAB40
.4byte 0x80000000
.global lbl_805AE2A4
lbl_805AE2A4:
.global fg
fg:
# ROM: 0x3FAB44
.4byte 0xFFFFFF00
.global lbl_805AE2A8
lbl_805AE2A8:
.global ExitButtons
ExitButtons:
# ROM: 0x3FAB48
.4byte 0x02010408
.4byte 0
@ -711,8 +711,8 @@ lbl_805AE2A8:
.section .rodata
.balign 8
.global lbl_803D6AB8
lbl_803D6AB8:
.global "@stringBase0"
"@stringBase0":
# ROM: 0x3D3AB8
.asciz "Unhandled exception %d - Production\n"
.byte 0x25, 0x73, 0x0A
@ -746,4 +746,3 @@ lbl_803D6AB8:
.4byte 0x00307825
.asciz "08x: 0x%08x 0x%08x"
.balign 4

View File

@ -116,11 +116,7 @@ lbl_803CC540:
.global MetroidBuildInfo
MetroidBuildInfo:
.ascii "!#$MetroidBuildInfo!#$"
.global BuildString
BuildString:
# Replaced after build
.asciz "PAD_PAD_PAD_PAD_PAD_PAD_PAD_PAD_PAD"
.ascii "!#$MetroidBuildInfo!#$PAD_PAD_PAD_PAD_PAD_PAD_PAD_PAD_PAD"
.balign 4
.global lbl_803CC5C4
@ -432,10 +428,10 @@ lbl_805A6D0C:
.section .sdata2, "a"
.balign 8
.global lbl_805A9FA8
lbl_805A9FA8:
.global BuildTime
BuildTime:
# ROM: 0x3F6848
.4byte BuildString
.4byte MetroidBuildInfo+22
.global lbl_805A9FAC
lbl_805A9FAC:
@ -4021,7 +4017,6 @@ lbl_8001EB40:
lbl_8001EB58:
/* 8001EB58 0001BAB8 80 01 00 14 */ lwz r0, 0x14(r1)
/* 8001EB5C 0001BABC 7C 08 03 A6 */ mtlr r0
.global lbl_8001EB60
lbl_8001EB60:
/* 8001EB60 0001BAC0 38 21 00 10 */ addi r1, r1, 0x10
/* 8001EB64 0001BAC4 4E 80 00 20 */ blr
@ -7378,7 +7373,6 @@ SetUIText__13SGBALinkFrameF7EUIType:
/* 80021B4C 0001EAAC 7C 03 00 2E */ lwzx r0, r3, r0
/* 80021B50 0001EAB0 7C 09 03 A6 */ mtctr r0
/* 80021B54 0001EAB4 4E 80 04 20 */ bctr
.global lbl_80021B58
lbl_80021B58:
/* 80021B58 0001EAB8 3A 80 00 49 */ li r20, 0x49
/* 80021B5C 0001EABC 3B C0 00 52 */ li r30, 0x52
@ -7386,7 +7380,6 @@ lbl_80021B58:
/* 80021B64 0001EAC4 3B 20 00 01 */ li r25, 1
/* 80021B68 0001EAC8 3B 60 00 01 */ li r27, 1
/* 80021B6C 0001EACC 48 00 00 D4 */ b lbl_80021C40
.global lbl_80021B70
lbl_80021B70:
/* 80021B70 0001EAD0 3A 80 00 44 */ li r20, 0x44
/* 80021B74 0001EAD4 3B C0 00 52 */ li r30, 0x52
@ -7395,7 +7388,6 @@ lbl_80021B70:
/* 80021B80 0001EAE0 3B 80 00 01 */ li r28, 1
/* 80021B84 0001EAE4 3B 60 00 01 */ li r27, 1
/* 80021B88 0001EAE8 48 00 00 B8 */ b lbl_80021C40
.global lbl_80021B8C
lbl_80021B8C:
/* 80021B8C 0001EAEC 3A 80 00 4A */ li r20, 0x4a
/* 80021B90 0001EAF0 3B C0 00 52 */ li r30, 0x52
@ -7404,7 +7396,6 @@ lbl_80021B8C:
/* 80021B9C 0001EAFC 3B 40 00 01 */ li r26, 1
/* 80021BA0 0001EB00 3B 00 00 01 */ li r24, 1
/* 80021BA4 0001EB04 48 00 00 9C */ b lbl_80021C40
.global lbl_80021BA8
lbl_80021BA8:
/* 80021BA8 0001EB08 3A 80 00 4B */ li r20, 0x4b
/* 80021BAC 0001EB0C 3B C0 00 52 */ li r30, 0x52
@ -7412,7 +7403,6 @@ lbl_80021BA8:
/* 80021BB4 0001EB14 3B A0 00 01 */ li r29, 1
/* 80021BB8 0001EB18 3B 00 00 01 */ li r24, 1
/* 80021BBC 0001EB1C 48 00 00 84 */ b lbl_80021C40
.global lbl_80021BC0
lbl_80021BC0:
/* 80021BC0 0001EB20 3A 80 00 4C */ li r20, 0x4c
/* 80021BC4 0001EB24 3B C0 00 52 */ li r30, 0x52
@ -7421,7 +7411,6 @@ lbl_80021BC0:
/* 80021BD0 0001EB30 3B 00 00 01 */ li r24, 1
/* 80021BD4 0001EB34 3B 40 00 01 */ li r26, 1
/* 80021BD8 0001EB38 48 00 00 68 */ b lbl_80021C40
.global lbl_80021BDC
lbl_80021BDC:
/* 80021BDC 0001EB3C 80 75 00 04 */ lwz r3, 4(r21)
/* 80021BE0 0001EB40 48 22 70 5D */ bl StartLink__11CGBASupportFv
@ -7430,7 +7419,6 @@ lbl_80021BDC:
/* 80021BEC 0001EB4C 3B 00 00 01 */ li r24, 1
/* 80021BF0 0001EB50 3A E0 00 01 */ li r23, 1
/* 80021BF4 0001EB54 48 00 00 4C */ b lbl_80021C40
.global lbl_80021BF8
lbl_80021BF8:
/* 80021BF8 0001EB58 3A 80 00 45 */ li r20, 0x45
/* 80021BFC 0001EB5C 3B C0 00 52 */ li r30, 0x52
@ -7441,7 +7429,6 @@ lbl_80021BF8:
/* 80021C10 0001EB70 3B 40 00 01 */ li r26, 1
/* 80021C14 0001EB74 3B 00 00 01 */ li r24, 1
/* 80021C18 0001EB78 48 00 00 28 */ b lbl_80021C40
.global lbl_80021C1C
lbl_80021C1C:
/* 80021C1C 0001EB7C 88 75 00 40 */ lbz r3, 0x40(r21)
/* 80021C20 0001EB80 3B E0 00 53 */ li r31, 0x53
@ -7452,7 +7439,6 @@ lbl_80021C1C:
/* 80021C34 0001EB94 7C 03 FE 70 */ srawi r3, r0, 0x1f
/* 80021C38 0001EB98 38 03 00 47 */ addi r0, r3, 0x47
/* 80021C3C 0001EB9C 7C 14 03 78 */ mr r20, r0
.global lbl_80021C40
lbl_80021C40:
/* 80021C40 0001EBA0 38 61 00 38 */ addi r3, r1, 0x38
/* 80021C44 0001EBA4 38 8D 81 4C */ addi r4, r13, lbl_805A6D0C@sda21

View File

@ -25,7 +25,7 @@ LIBS = [
["MetroidPrime/CAxisAngle", True],
["MetroidPrime/CEulerAngles", False],
["MetroidPrime/CArchMsgParmUserInput", True],
"MetroidPrime/CFrontEndUI",
["MetroidPrime/CFrontEndUI", False],
["MetroidPrime/CInputGenerator", False],
["MetroidPrime/CMainFlow", False],
"MetroidPrime/CMFGame",
@ -471,7 +471,7 @@ LIBS = [
["Kyoto/Alloc/CCallStackDolphin", True],
["Kyoto/Basics/COsContextDolphin", True],
["Kyoto/Basics/CSWDataDolphin", True],
["Kyoto/Basics/RAssertDolphin", False],
["Kyoto/Basics/RAssertDolphin", True],
["Kyoto/Animation/CAnimation", True],
["Kyoto/Animation/CAnimationManager", False],
"Kyoto/Animation/CAnimationSet",

View File

@ -5,17 +5,16 @@
#include <rstl/list.hpp>
struct SMediumAllocPuddle {
SMediumAllocPuddle(uint numBlocks, void* ptr, const bool unk);
SMediumAllocPuddle(const uint numBlocks, void* data, const bool canErase);
~SMediumAllocPuddle();
void* FindFree(uint blockCount);
void* FindFreeEntry(uint blockCount);
void Free(const void* ptr);
const uint GetUnkx10() const { return x10_; }
const uint GetNumBlocks() const { return x14_numBlocks; }
const uint GetNumAllocs() const { return x18_numAllocs; }
const uint GetNumEntries() const { return x1c_numEntries; }
const bool GetUnk2() const { return x20_unk2; }
const bool CanErase() const { return x20_canErase; }
const uint GetPtrOffset(const void* ptr) const { return (uchar*)ptr - x0_mainData.get(); }
static ushort GetBlockOffset(const void* ptrA, const void* ptrB);
static void InitBookKeeping(uchar* bookKeepingPtr, const ushort blockCount);
@ -24,11 +23,11 @@ private:
rstl::auto_ptr< void > x0_mainData;
uchar* x8_bookKeeping;
uchar* xc_cachedBookKeepingAddr;
uint x10_;
uint x10_unused;
uint x14_numBlocks;
uint x18_numAllocs;
uint x1c_numEntries;
bool x20_unk2 : 1;
bool x20_canErase : 1;
};
class CMediumAllocPool {

View File

@ -5,6 +5,12 @@
#include "dolphin/os.h"
#define BUILD_INFO_TAG "!#$MetroidBuildInfo!#$"
#define BUILD_TIME_DUMMY "PAD_PAD_PAD_PAD_PAD_PAD_PAD_PAD_PAD"
#define BUILD_INFO BUILD_INFO_TAG BUILD_TIME_DUMMY
#define BUILD_INFO_TAG_SIZE sizeof(BUILD_INFO_TAG) - 1
extern const char* BuildTime;
void rs_debugger_printf(const char* format, ...);
void ErrorHandler(OSError code, OSContext* context, int, int);
void SetErrorHandlers();

View File

@ -5,8 +5,26 @@
class CFrontEndUI : public CIOWin {
public:
struct SFusionBonusFrame {
struct SGBALinkFrame {
enum EUIType {
kUIT_Empty = -1,
kUIT_InsertPak = 0,
kUIT_ConnectSocket = 1,
kUIT_PressStartAndSelect = 2,
kUIT_BeginLink = 3,
kUIT_Linking = 4,
kUIT_LinkFailed = 5,
kUIT_LinkCompleteOrLinking = 6,
kUIT_TurnOffGBA = 7,
kUIT_Complete = 8,
kUIT_Cancelled = 9
};
};
};
CFrontEndUI();
EMessageReturn OnMessage(const CArchitectureMessage& message, CArchitectureQueue& queue);
private:

View File

@ -25,7 +25,7 @@ void GXSetArray(GXAttr attr, const void* data, u8 stride);
#endif
void GXInvalidateVtxCache(void);
static void GXSetTexCoordGen(GXTexCoordID dst_coord, GXTexGenType func,
static inline void GXSetTexCoordGen(GXTexCoordID dst_coord, GXTexGenType func,
GXTexGenSrc src_param, u32 mtx) {
GXSetTexCoordGen2(dst_coord, func, src_param, mtx, GX_FALSE, GX_PTIDENTITY);
}

View File

@ -120,9 +120,9 @@ enum __ReadProcActions { __GetChar, __UngetChar, __CheckForError };
int puts(const char* s);
int printf(const char*, ...);
int sprintf(char* s, const char* format, ...);
int vprintf(const char* format, va_list arg);
int vsprintf(char* s, const char* format, va_list arg);
size_t sprintf(char* s, const char* format, ...);
size_t vprintf(const char* format, va_list arg);
size_t vsprintf(char* s, const char* format, va_list arg);
size_t fread(const void*, size_t memb_size, size_t num_memb, FILE*);
size_t fwrite(const void*, size_t memb_size, size_t num_memb, FILE*);
int fseek(FILE* file, long offset, int mode);

View File

@ -20,7 +20,7 @@ void* CMediumAllocPool::Alloc(uint len) {
void* ret;
uint blockCount = 1;
if (len >= 32) {
blockCount = (len + 31) >> 5;
blockCount = (len + 31) / 32;
}
ret = puddle->FindFree(blockCount);
@ -44,13 +44,13 @@ void* CMediumAllocPool::Alloc(uint len) {
}
int CMediumAllocPool::Free(const void* ptr) {
rstl::list<SMediumAllocPuddle>::node* node = x0_list.begin().get_node();
rstl::list< SMediumAllocPuddle >::node* node = x0_list.begin().get_node();
for (; node != x0_list.end().get_node(); node = node->get_next()) {
SMediumAllocPuddle* puddle = node->get_value();
if (puddle->GetPtrOffset(ptr) < puddle->GetNumEntries() * 32) {
puddle->Free(ptr);
if (node->get_value()->GetNumAllocs() == 0 && node->get_value()->GetUnk2()) {
if (x18_lastNodePrev == node ) {
if (node->get_value()->GetNumAllocs() == 0 && node->get_value()->CanErase()) {
if (x18_lastNodePrev == node) {
x18_lastNodePrev = x0_list.begin().get_node();
}
@ -90,22 +90,22 @@ uint CMediumAllocPool::GetNumBlocksAvailable() {
}
/* this is such a hack... */
#pragma inline_max_size(325)
#pragma inline_max_size(250)
void CMediumAllocPool::AddPuddle(uint len, void* data, const bool unk) {
x0_list.push_back(SMediumAllocPuddle(len, data, unk));
x18_lastNodePrev = x0_list.end().get_node();
x18_lastNodePrev = x18_lastNodePrev->get_prev();
}
SMediumAllocPuddle::SMediumAllocPuddle(const uint numBlocks, void* data, const bool unk)
SMediumAllocPuddle::SMediumAllocPuddle(const uint numBlocks, void* data, const bool canErase)
: x0_mainData(data)
, x8_bookKeeping((uchar*)data + numBlocks * 32)
, xc_cachedBookKeepingAddr(nullptr)
, x10_(-1)
, x10_unused(-1)
, x14_numBlocks(numBlocks)
, x18_numAllocs(0)
, x1c_numEntries(numBlocks)
, x20_unk2(unk) {
, x20_canErase(canErase) {
SMediumAllocPuddle::InitBookKeeping(x8_bookKeeping, numBlocks);
}
@ -131,14 +131,58 @@ void* SMediumAllocPuddle::FindFree(uint blockCount) {
return ret;
}
void* SMediumAllocPuddle::FindFreeEntry(uint numBlocks) { return nullptr; }
void* SMediumAllocPuddle::FindFreeEntry(uint numBlocks) {
if (GetNumBlocks() >= numBlocks) {
uchar* cachedBookPtr = xc_cachedBookKeepingAddr;
uchar* bookPtr = x8_bookKeeping;
if (cachedBookPtr == nullptr) {
cachedBookPtr = bookPtr;
}
uchar* ptr2 = bookPtr + GetNumEntries();
uchar* ptr1 = cachedBookPtr;
do {
if ((*ptr1 & 0x80) == 0 || ptr1 == ptr2) {
if (ptr1 == ptr2) {
ptr1 = bookPtr;
} else {
ptr1 += *ptr1;
}
} else {
uint offset = GetBlockOffset(ptr1, ptr2);
if (offset >= numBlocks) {
if ((ushort)(offset - numBlocks)) {
SMediumAllocPuddle::InitBookKeeping(ptr1 + numBlocks, offset - numBlocks);
}
xc_cachedBookKeepingAddr = ptr1;
return ptr1;
}
ptr1 += offset;
if (ptr1 == cachedBookPtr) {
break;
}
if (ptr1 == ptr2) {
ptr1 = bookPtr;
}
}
} while (ptr1 != cachedBookPtr);
}
return nullptr;
}
void SMediumAllocPuddle::Free(const void* ptr) {}
ushort SMediumAllocPuddle::GetBlockOffset(const void* ptr1, const void* ptr2) {
unsigned char tmp = (uchar*)ptr2 - (uchar*)ptr1 > 1 ? ((uchar*)ptr1)[1] : 0;
ushort x = tmp + (*(uchar*)(ptr1) & 0x7f) * 0x100;
ushort x = tmp + (*(uchar*)(ptr1)&0x7f) * 0x100;
if ((x & 0x6000) == 0) {
return x;
}

View File

@ -6,107 +6,125 @@
#include "dolphin/pad.h"
#include "dolphin/vi.h"
#include <stdio.h>
#include <stdarg.h>
#include <stdio.h>
static const char* buildTime = "Build v1.088 10/29/2002 2:21:25";
static bool CallFatal = false;
static char rs_debugger_buffer[1024];
static int rs_debugger_buffer_size;
static bool DAT_805a9248;
static const GXColor bg = {128, 0, 0, 0};
static const GXColor fg = {255, 255, 255, 0};
static const uchar ExitButtons[4] = {PAD_BUTTON_RIGHT, PAD_BUTTON_LEFT, PAD_BUTTON_DOWN,
PAD_BUTTON_UP};
void ErrorHandler(OSError code, OSContext* context, int arg1, int arg2) {
uint loopExitCriteria;
static void hack() {
static const char* tmp1 = "%s\0\n";
static const char* tmp2 = "0x%08x: 0x%08x 0x%08x";
}
void ErrorHandler(OSError code, OSContext* context, int dsisr, int dar) {
OSContext newContext;
uint loopExitCriteria;
PADStatus pads[4];
uint local_60;
uchar local_60[4];
u32* gpr;
uint i;
uint len;
if (code != 15 || ((arg1 & 0x10) == 0 && (arg2 < 0x1800001))) {
OSProtectRange(3, 0, 0, 3);
loopExitCriteria = 0;
PADControlMotor(0, 0);
VISetBlack(1);
VIFlush();
while (loopExitCriteria < 4) {
if (code == 15 && ((dsisr & 0x10) != 0 || ((uint)dar > 0x1800000))) {
return;
}
OSProtectRange(3, 0, 0, 3);
loopExitCriteria = 0;
PADControlMotor(0, 0);
VISetBlack(1);
VIFlush();
#if VERSION >= 1
OSClearContext(&newContext);
OSSetCurrentContext(&newContext);
OSEnableInterrupts();
#endif
while (loopExitCriteria < 4) {
PADRead(pads);
#if VERSION >= 1
while (pads[1].err == PAD_ERR_NO_CONTROLLER) {
PADReset(PAD_CHAN1_BIT);
PADRead(pads);
if (pads[1].err == 0) {
local_60 = 0x2010408;
if ((pads[1].button & 0xc10) == 0xc10) {
if ((pads[1].button & 0xf) != 0) {
if ((pads[1].button & loopExitCriteria) == 0) { // TODO: wrong logic with loopExitCriteria
if ((loopExitCriteria != 0) &&
pads[1].button == 0) { // TODO: wrong logic with pads[1].button
loopExitCriteria = 0;
}
} else {
loopExitCriteria += 1;
}
}
#endif
if (pads[1].err == PAD_ERR_NONE) {
*(uint*)local_60 = *(uint*)ExitButtons;
if ((pads[1].button & 0xc10) == 0xc10) {
if ((pads[1].button & 0xf) != 0) {
if ((pads[1].button & local_60[loopExitCriteria]) != 0) {
loopExitCriteria += 1;
} else if ((loopExitCriteria != 0) &&
((pads[1].button & local_60[loopExitCriteria - 1]) == 0)) {
loopExitCriteria = 0;
}
} else {
loopExitCriteria = 0;
}
} else {
loopExitCriteria = 0;
}
}
VISetBlack(0);
VIFlush();
OSReport("Unhandled exception %d - Production\n", code);
OSReport("%s\n", buildTime);
OSReport("------------------------- Context 0x%08x -------------------------\n", context);
}
VISetBlack(0);
VIFlush();
int i = 0;
do {
OSReport("r%-2d = 0x%08x (%14d) r%-2d = 0x%08x (%14d)\n", i, context->gpr[i],
context->gpr[i], i + 0x10, context->gpr[i + 0x10], context->gpr[i + 0x10]);
i += 1;
} while (i < 0x10);
OSReport("Unhandled exception %d - Production\n", code);
OSReport("%s\n", BuildTime);
OSReport("------------------------- Context 0x%08x -------------------------\n", context);
OSReport("LR = 0x%08x CR = 0x%08x\n", context->lr, context->cr);
OSReport("SRR0 = 0x%08x SRR1 = 0x%08x\n", context->srr0, context->srr1);
OSReport("DSISR= 0x%08x DAR = 0x%08x\n", arg1, arg2);
for (i = 0; i < 16; ++i) {
OSReport("r%-2d = 0x%08x (%14d) r%-2d = 0x%08x (%14d)\n", i, context->gpr[i],
context->gpr[i], i + 0x10, context->gpr[i + 0x10], context->gpr[i + 0x10]);
}
if (rs_debugger_buffer_size == 0) {
i = sprintf(rs_debugger_buffer, "Exception %d - Production\n", code);
OSReport("LR = 0x%08x CR = 0x%08x\n", context->lr, context->cr);
OSReport("SRR0 = 0x%08x SRR1 = 0x%08x\n", context->srr0, context->srr1);
OSReport("DSISR= 0x%08x DAR = 0x%08x\n", dsisr, dar);
len = rs_debugger_buffer_size;
if (rs_debugger_buffer_size != 0) {
len += sprintf(rs_debugger_buffer + rs_debugger_buffer_size, " - Production\n");
} else {
len += sprintf(rs_debugger_buffer, "Exception %d - Production\n", code);
}
len += sprintf(rs_debugger_buffer + len, "%s\n", BuildTime);
len += sprintf(rs_debugger_buffer + len, "IP: 0x%8.8x Mem: 0x%8.8x", context->srr0, dar);
if (code == 15) {
len += sprintf(rs_debugger_buffer + len, " - %d", dsisr);
}
len += sprintf(rs_debugger_buffer + len, "\n\n");
OSReport("\nAddress: Back Chain LR Save\n");
gpr = (u32*)context->gpr[1];
for (i = 0; gpr != NULL && gpr != (void*)0xFFFFFFFF && i++ < 16;) {
if (gpr > (void*)0x80000400 && gpr < (void*)0x81800000) {
OSReport("0x%08x: 0x%08x 0x%08x\n", gpr, *gpr, gpr[1]);
len += sprintf(rs_debugger_buffer + len, "0x%08x: 0x%08x 0x%08x\n", gpr, *gpr, gpr[1]);
} else {
i = sprintf(rs_debugger_buffer + rs_debugger_buffer_size, " - Production\n");
OSReport("0x%08x: BAD PTR\n", gpr);
sprintf(rs_debugger_buffer + len, "0x%08x: BAD PTR\n", gpr);
break;
}
int j = sprintf(rs_debugger_buffer + rs_debugger_buffer_size + i, "%s\n", buildTime);
int bufferIndex = rs_debugger_buffer_size + i + j;
bufferIndex +=
sprintf(rs_debugger_buffer + bufferIndex, "IP: 0x%8.8x Mem: 0x%8.8x", context->srr0, arg2);
if (code == 0xf) {
bufferIndex += sprintf(rs_debugger_buffer + bufferIndex, " - %d", arg1);
}
bufferIndex += sprintf(rs_debugger_buffer + bufferIndex, "\n\n");
gpr = (u32*)*gpr;
}
OSReport("\nAddress: Back Chain LR Save\n");
uint stackPtr = context->gpr[1];
bool check;
i = 0;
while (true) {
if (((stackPtr == NULL) || (stackPtr == 0xffffffff)) || (check = 0xf < i, i += 1, check)) {
break;
}
if ((stackPtr < 0x80000401) || (0x817fffff < stackPtr)) {
OSReport("0x%08x: BAD PTR\n", stackPtr);
sprintf(rs_debugger_buffer + j, "0x%08x: BAD PTR\n", stackPtr);
break;
}
uint* asPtr = (uint*)stackPtr;
OSReport("0x%08x: 0x%08x 0x%08x\n", stackPtr, *asPtr, asPtr[1]);
bufferIndex +=
sprintf(rs_debugger_buffer + j, "0x%08x: 0x%08x 0x%08x\n", stackPtr, *asPtr, asPtr[1]);
stackPtr = *asPtr;
}
OSReport("\nInstruction at 0x%x (read from SRR0) attempted to access invalid address 0x%x "
"(read from DAR)\n",
context->srr0, arg2);
if (!DAT_805a9248) {
GXColor fg; // = &DAT_80000000;
GXColor bg; // = 0xffffff00;
OSFatal(fg, bg, rs_debugger_buffer);
}
OSReport("\nInstruction at 0x%x (read from SRR0) attempted to access invalid address 0x%x (read "
"from DAR)\n",
context->srr0, dar);
if (!CallFatal) {
OSFatal(fg, bg, rs_debugger_buffer);
}
}