mirror of
https://github.com/pmret/papermario.git
synced 2024-11-13 22:43:00 +01:00
0d70e3ecac
* Remove JP dump * Add new JP dump * Fix sort_symbol_addrs to only look at one version * Deduplicate and sort symbol_addrs * Clean up JP rom if conditions * Use /current dir for diffing * Fix state_step_logos * Add todo comments for unsplitted segments * Fix draw_merlee_message * rename background_gfx * Fix background_gfx * Fix JP build * Set unused data offsets to auto
233 lines
11 KiB
ArmAsm
233 lines
11 KiB
ArmAsm
.include "macro.inc"
|
|
|
|
/* assembler directives */
|
|
.set noat /* allow manual use of $at */
|
|
.set noreorder /* don't insert nops after branches */
|
|
.set gp=64 /* allow use of 64-bit general purpose registers */
|
|
|
|
.section .text, "ax"
|
|
|
|
/* Generated by spimdisasm 1.11.1 */
|
|
|
|
# Handwritten function
|
|
glabel bcopy
|
|
/* 3FA20 80064620 10C0001B */ beqz $a2, .LJP_80064690
|
|
/* 3FA24 80064624 00A03821 */ addu $a3, $a1, $zero
|
|
/* 3FA28 80064628 10850019 */ beq $a0, $a1, .LJP_80064690
|
|
/* 3FA2C 8006462C 00000000 */ nop
|
|
/* 3FA30 80064630 00A4082A */ slt $at, $a1, $a0
|
|
/* 3FA34 80064634 14200007 */ bnez $at, .LJP_80064654
|
|
/* 3FA38 80064638 00000000 */ nop
|
|
/* 3FA3C 8006463C 00861020 */ add $v0, $a0, $a2 # handwritten instruction
|
|
/* 3FA40 80064640 00A2082A */ slt $at, $a1, $v0
|
|
/* 3FA44 80064644 10200003 */ beqz $at, .LJP_80064654
|
|
/* 3FA48 80064648 00000000 */ nop
|
|
/* 3FA4C 8006464C 1000005C */ b .LJP_800647C0
|
|
/* 3FA50 80064650 00000000 */ nop
|
|
.LJP_80064654:
|
|
/* 3FA54 80064654 28C10010 */ slti $at, $a2, 0x10
|
|
/* 3FA58 80064658 14200005 */ bnez $at, .LJP_80064670
|
|
/* 3FA5C 8006465C 00000000 */ nop
|
|
/* 3FA60 80064660 30820003 */ andi $v0, $a0, 0x3
|
|
/* 3FA64 80064664 30A30003 */ andi $v1, $a1, 0x3
|
|
/* 3FA68 80064668 1043000B */ beq $v0, $v1, .LJP_80064698
|
|
/* 3FA6C 8006466C 00000000 */ nop
|
|
.LJP_80064670:
|
|
/* 3FA70 80064670 10C00007 */ beqz $a2, .LJP_80064690
|
|
/* 3FA74 80064674 00000000 */ nop
|
|
/* 3FA78 80064678 00861821 */ addu $v1, $a0, $a2
|
|
.LJP_8006467C:
|
|
/* 3FA7C 8006467C 80820000 */ lb $v0, 0x0($a0)
|
|
/* 3FA80 80064680 24840001 */ addiu $a0, $a0, 0x1
|
|
/* 3FA84 80064684 A0A20000 */ sb $v0, 0x0($a1)
|
|
/* 3FA88 80064688 1483FFFC */ bne $a0, $v1, .LJP_8006467C
|
|
/* 3FA8C 8006468C 24A50001 */ addiu $a1, $a1, 0x1
|
|
.LJP_80064690:
|
|
/* 3FA90 80064690 03E00008 */ jr $ra
|
|
/* 3FA94 80064694 00E01021 */ addu $v0, $a3, $zero
|
|
.LJP_80064698:
|
|
/* 3FA98 80064698 1040001A */ beqz $v0, .LJP_80064704
|
|
/* 3FA9C 8006469C 00000000 */ nop
|
|
/* 3FAA0 800646A0 24010001 */ addiu $at, $zero, 0x1
|
|
/* 3FAA4 800646A4 10410010 */ beq $v0, $at, .LJP_800646E8
|
|
/* 3FAA8 800646A8 00000000 */ nop
|
|
/* 3FAAC 800646AC 24010002 */ addiu $at, $zero, 0x2
|
|
/* 3FAB0 800646B0 10410007 */ beq $v0, $at, .LJP_800646D0
|
|
/* 3FAB4 800646B4 00000000 */ nop
|
|
/* 3FAB8 800646B8 80820000 */ lb $v0, 0x0($a0)
|
|
/* 3FABC 800646BC 24840001 */ addiu $a0, $a0, 0x1
|
|
/* 3FAC0 800646C0 A0A20000 */ sb $v0, 0x0($a1)
|
|
/* 3FAC4 800646C4 24A50001 */ addiu $a1, $a1, 0x1
|
|
/* 3FAC8 800646C8 1000000E */ b .LJP_80064704
|
|
/* 3FACC 800646CC 24C6FFFF */ addiu $a2, $a2, -0x1
|
|
.LJP_800646D0:
|
|
/* 3FAD0 800646D0 84820000 */ lh $v0, 0x0($a0)
|
|
/* 3FAD4 800646D4 24840002 */ addiu $a0, $a0, 0x2
|
|
/* 3FAD8 800646D8 A4A20000 */ sh $v0, 0x0($a1)
|
|
/* 3FADC 800646DC 24A50002 */ addiu $a1, $a1, 0x2
|
|
/* 3FAE0 800646E0 10000008 */ b .LJP_80064704
|
|
/* 3FAE4 800646E4 24C6FFFE */ addiu $a2, $a2, -0x2
|
|
.LJP_800646E8:
|
|
/* 3FAE8 800646E8 80820000 */ lb $v0, 0x0($a0)
|
|
/* 3FAEC 800646EC 84830001 */ lh $v1, 0x1($a0)
|
|
/* 3FAF0 800646F0 24840003 */ addiu $a0, $a0, 0x3
|
|
/* 3FAF4 800646F4 A0A20000 */ sb $v0, 0x0($a1)
|
|
/* 3FAF8 800646F8 A4A30001 */ sh $v1, 0x1($a1)
|
|
/* 3FAFC 800646FC 24A50003 */ addiu $a1, $a1, 0x3
|
|
/* 3FB00 80064700 24C6FFFD */ addiu $a2, $a2, -0x3
|
|
.LJP_80064704:
|
|
/* 3FB04 80064704 28C10020 */ slti $at, $a2, 0x20
|
|
/* 3FB08 80064708 14200015 */ bnez $at, .LJP_80064760
|
|
/* 3FB0C 8006470C 00000000 */ nop
|
|
/* 3FB10 80064710 8C820000 */ lw $v0, 0x0($a0)
|
|
/* 3FB14 80064714 8C830004 */ lw $v1, 0x4($a0)
|
|
/* 3FB18 80064718 8C880008 */ lw $t0, 0x8($a0)
|
|
/* 3FB1C 8006471C 8C89000C */ lw $t1, 0xC($a0)
|
|
/* 3FB20 80064720 8C8A0010 */ lw $t2, 0x10($a0)
|
|
/* 3FB24 80064724 8C8B0014 */ lw $t3, 0x14($a0)
|
|
/* 3FB28 80064728 8C8C0018 */ lw $t4, 0x18($a0)
|
|
/* 3FB2C 8006472C 8C8D001C */ lw $t5, 0x1C($a0)
|
|
/* 3FB30 80064730 24840020 */ addiu $a0, $a0, 0x20
|
|
/* 3FB34 80064734 ACA20000 */ sw $v0, 0x0($a1)
|
|
/* 3FB38 80064738 ACA30004 */ sw $v1, 0x4($a1)
|
|
/* 3FB3C 8006473C ACA80008 */ sw $t0, 0x8($a1)
|
|
/* 3FB40 80064740 ACA9000C */ sw $t1, 0xC($a1)
|
|
/* 3FB44 80064744 ACAA0010 */ sw $t2, 0x10($a1)
|
|
/* 3FB48 80064748 ACAB0014 */ sw $t3, 0x14($a1)
|
|
/* 3FB4C 8006474C ACAC0018 */ sw $t4, 0x18($a1)
|
|
/* 3FB50 80064750 ACAD001C */ sw $t5, 0x1C($a1)
|
|
/* 3FB54 80064754 24A50020 */ addiu $a1, $a1, 0x20
|
|
/* 3FB58 80064758 1000FFEA */ b .LJP_80064704
|
|
/* 3FB5C 8006475C 24C6FFE0 */ addiu $a2, $a2, -0x20
|
|
.LJP_80064760:
|
|
/* 3FB60 80064760 28C10010 */ slti $at, $a2, 0x10
|
|
/* 3FB64 80064764 1420000D */ bnez $at, .LJP_8006479C
|
|
/* 3FB68 80064768 00000000 */ nop
|
|
/* 3FB6C 8006476C 8C820000 */ lw $v0, 0x0($a0)
|
|
/* 3FB70 80064770 8C830004 */ lw $v1, 0x4($a0)
|
|
/* 3FB74 80064774 8C880008 */ lw $t0, 0x8($a0)
|
|
/* 3FB78 80064778 8C89000C */ lw $t1, 0xC($a0)
|
|
/* 3FB7C 8006477C 24840010 */ addiu $a0, $a0, 0x10
|
|
/* 3FB80 80064780 ACA20000 */ sw $v0, 0x0($a1)
|
|
/* 3FB84 80064784 ACA30004 */ sw $v1, 0x4($a1)
|
|
/* 3FB88 80064788 ACA80008 */ sw $t0, 0x8($a1)
|
|
/* 3FB8C 8006478C ACA9000C */ sw $t1, 0xC($a1)
|
|
/* 3FB90 80064790 24A50010 */ addiu $a1, $a1, 0x10
|
|
/* 3FB94 80064794 1000FFF2 */ b .LJP_80064760
|
|
/* 3FB98 80064798 24C6FFF0 */ addiu $a2, $a2, -0x10
|
|
.LJP_8006479C:
|
|
/* 3FB9C 8006479C 28C10004 */ slti $at, $a2, 0x4
|
|
/* 3FBA0 800647A0 1420FFB3 */ bnez $at, .LJP_80064670
|
|
/* 3FBA4 800647A4 00000000 */ nop
|
|
/* 3FBA8 800647A8 8C820000 */ lw $v0, 0x0($a0)
|
|
/* 3FBAC 800647AC 24840004 */ addiu $a0, $a0, 0x4
|
|
/* 3FBB0 800647B0 ACA20000 */ sw $v0, 0x0($a1)
|
|
/* 3FBB4 800647B4 24A50004 */ addiu $a1, $a1, 0x4
|
|
/* 3FBB8 800647B8 1000FFF8 */ b .LJP_8006479C
|
|
/* 3FBBC 800647BC 24C6FFFC */ addiu $a2, $a2, -0x4
|
|
.LJP_800647C0:
|
|
/* 3FBC0 800647C0 00862020 */ add $a0, $a0, $a2 # handwritten instruction
|
|
/* 3FBC4 800647C4 00A62820 */ add $a1, $a1, $a2 # handwritten instruction
|
|
/* 3FBC8 800647C8 28C10010 */ slti $at, $a2, 0x10
|
|
/* 3FBCC 800647CC 14200005 */ bnez $at, .LJP_800647E4
|
|
/* 3FBD0 800647D0 00000000 */ nop
|
|
/* 3FBD4 800647D4 30820003 */ andi $v0, $a0, 0x3
|
|
/* 3FBD8 800647D8 30A30003 */ andi $v1, $a1, 0x3
|
|
/* 3FBDC 800647DC 1043000D */ beq $v0, $v1, .LJP_80064814
|
|
/* 3FBE0 800647E0 00000000 */ nop
|
|
.LJP_800647E4:
|
|
/* 3FBE4 800647E4 10C0FFAA */ beqz $a2, .LJP_80064690
|
|
/* 3FBE8 800647E8 00000000 */ nop
|
|
/* 3FBEC 800647EC 2484FFFF */ addiu $a0, $a0, -0x1
|
|
/* 3FBF0 800647F0 24A5FFFF */ addiu $a1, $a1, -0x1
|
|
/* 3FBF4 800647F4 00861823 */ subu $v1, $a0, $a2
|
|
.LJP_800647F8:
|
|
/* 3FBF8 800647F8 80820000 */ lb $v0, 0x0($a0)
|
|
/* 3FBFC 800647FC 2484FFFF */ addiu $a0, $a0, -0x1
|
|
/* 3FC00 80064800 A0A20000 */ sb $v0, 0x0($a1)
|
|
/* 3FC04 80064804 1483FFFC */ bne $a0, $v1, .LJP_800647F8
|
|
/* 3FC08 80064808 24A5FFFF */ addiu $a1, $a1, -0x1
|
|
/* 3FC0C 8006480C 03E00008 */ jr $ra
|
|
/* 3FC10 80064810 00E01021 */ addu $v0, $a3, $zero
|
|
.LJP_80064814:
|
|
/* 3FC14 80064814 1040001A */ beqz $v0, .LJP_80064880
|
|
/* 3FC18 80064818 00000000 */ nop
|
|
/* 3FC1C 8006481C 24010003 */ addiu $at, $zero, 0x3
|
|
/* 3FC20 80064820 10410010 */ beq $v0, $at, .LJP_80064864
|
|
/* 3FC24 80064824 00000000 */ nop
|
|
/* 3FC28 80064828 24010002 */ addiu $at, $zero, 0x2
|
|
/* 3FC2C 8006482C 10410007 */ beq $v0, $at, .LJP_8006484C
|
|
/* 3FC30 80064830 00000000 */ nop
|
|
/* 3FC34 80064834 8082FFFF */ lb $v0, -0x1($a0)
|
|
/* 3FC38 80064838 2484FFFF */ addiu $a0, $a0, -0x1
|
|
/* 3FC3C 8006483C A0A2FFFF */ sb $v0, -0x1($a1)
|
|
/* 3FC40 80064840 24A5FFFF */ addiu $a1, $a1, -0x1
|
|
/* 3FC44 80064844 1000000E */ b .LJP_80064880
|
|
/* 3FC48 80064848 24C6FFFF */ addiu $a2, $a2, -0x1
|
|
.LJP_8006484C:
|
|
/* 3FC4C 8006484C 8482FFFE */ lh $v0, -0x2($a0)
|
|
/* 3FC50 80064850 2484FFFE */ addiu $a0, $a0, -0x2
|
|
/* 3FC54 80064854 A4A2FFFE */ sh $v0, -0x2($a1)
|
|
/* 3FC58 80064858 24A5FFFE */ addiu $a1, $a1, -0x2
|
|
/* 3FC5C 8006485C 10000008 */ b .LJP_80064880
|
|
/* 3FC60 80064860 24C6FFFE */ addiu $a2, $a2, -0x2
|
|
.LJP_80064864:
|
|
/* 3FC64 80064864 8082FFFF */ lb $v0, -0x1($a0)
|
|
/* 3FC68 80064868 8483FFFD */ lh $v1, -0x3($a0)
|
|
/* 3FC6C 8006486C 2484FFFD */ addiu $a0, $a0, -0x3
|
|
/* 3FC70 80064870 A0A2FFFF */ sb $v0, -0x1($a1)
|
|
/* 3FC74 80064874 A4A3FFFD */ sh $v1, -0x3($a1)
|
|
/* 3FC78 80064878 24A5FFFD */ addiu $a1, $a1, -0x3
|
|
/* 3FC7C 8006487C 24C6FFFD */ addiu $a2, $a2, -0x3
|
|
.LJP_80064880:
|
|
/* 3FC80 80064880 28C10020 */ slti $at, $a2, 0x20
|
|
/* 3FC84 80064884 14200015 */ bnez $at, .LJP_800648DC
|
|
/* 3FC88 80064888 00000000 */ nop
|
|
/* 3FC8C 8006488C 8C82FFFC */ lw $v0, -0x4($a0)
|
|
/* 3FC90 80064890 8C83FFF8 */ lw $v1, -0x8($a0)
|
|
/* 3FC94 80064894 8C88FFF4 */ lw $t0, -0xC($a0)
|
|
/* 3FC98 80064898 8C89FFF0 */ lw $t1, -0x10($a0)
|
|
/* 3FC9C 8006489C 8C8AFFEC */ lw $t2, -0x14($a0)
|
|
/* 3FCA0 800648A0 8C8BFFE8 */ lw $t3, -0x18($a0)
|
|
/* 3FCA4 800648A4 8C8CFFE4 */ lw $t4, -0x1C($a0)
|
|
/* 3FCA8 800648A8 8C8DFFE0 */ lw $t5, -0x20($a0)
|
|
/* 3FCAC 800648AC 2484FFE0 */ addiu $a0, $a0, -0x20
|
|
/* 3FCB0 800648B0 ACA2FFFC */ sw $v0, -0x4($a1)
|
|
/* 3FCB4 800648B4 ACA3FFF8 */ sw $v1, -0x8($a1)
|
|
/* 3FCB8 800648B8 ACA8FFF4 */ sw $t0, -0xC($a1)
|
|
/* 3FCBC 800648BC ACA9FFF0 */ sw $t1, -0x10($a1)
|
|
/* 3FCC0 800648C0 ACAAFFEC */ sw $t2, -0x14($a1)
|
|
/* 3FCC4 800648C4 ACABFFE8 */ sw $t3, -0x18($a1)
|
|
/* 3FCC8 800648C8 ACACFFE4 */ sw $t4, -0x1C($a1)
|
|
/* 3FCCC 800648CC ACADFFE0 */ sw $t5, -0x20($a1)
|
|
/* 3FCD0 800648D0 24A5FFE0 */ addiu $a1, $a1, -0x20
|
|
/* 3FCD4 800648D4 1000FFEA */ b .LJP_80064880
|
|
/* 3FCD8 800648D8 24C6FFE0 */ addiu $a2, $a2, -0x20
|
|
.LJP_800648DC:
|
|
/* 3FCDC 800648DC 28C10010 */ slti $at, $a2, 0x10
|
|
/* 3FCE0 800648E0 1420000D */ bnez $at, .LJP_80064918
|
|
/* 3FCE4 800648E4 00000000 */ nop
|
|
/* 3FCE8 800648E8 8C82FFFC */ lw $v0, -0x4($a0)
|
|
/* 3FCEC 800648EC 8C83FFF8 */ lw $v1, -0x8($a0)
|
|
/* 3FCF0 800648F0 8C88FFF4 */ lw $t0, -0xC($a0)
|
|
/* 3FCF4 800648F4 8C89FFF0 */ lw $t1, -0x10($a0)
|
|
/* 3FCF8 800648F8 2484FFF0 */ addiu $a0, $a0, -0x10
|
|
/* 3FCFC 800648FC ACA2FFFC */ sw $v0, -0x4($a1)
|
|
/* 3FD00 80064900 ACA3FFF8 */ sw $v1, -0x8($a1)
|
|
/* 3FD04 80064904 ACA8FFF4 */ sw $t0, -0xC($a1)
|
|
/* 3FD08 80064908 ACA9FFF0 */ sw $t1, -0x10($a1)
|
|
/* 3FD0C 8006490C 24A5FFF0 */ addiu $a1, $a1, -0x10
|
|
/* 3FD10 80064910 1000FFF2 */ b .LJP_800648DC
|
|
/* 3FD14 80064914 24C6FFF0 */ addiu $a2, $a2, -0x10
|
|
.LJP_80064918:
|
|
/* 3FD18 80064918 28C10004 */ slti $at, $a2, 0x4
|
|
/* 3FD1C 8006491C 1420FFB1 */ bnez $at, .LJP_800647E4
|
|
/* 3FD20 80064920 00000000 */ nop
|
|
/* 3FD24 80064924 8C82FFFC */ lw $v0, -0x4($a0)
|
|
/* 3FD28 80064928 2484FFFC */ addiu $a0, $a0, -0x4
|
|
/* 3FD2C 8006492C ACA2FFFC */ sw $v0, -0x4($a1)
|
|
/* 3FD30 80064930 24A5FFFC */ addiu $a1, $a1, -0x4
|
|
/* 3FD34 80064934 1000FFF8 */ b .LJP_80064918
|
|
/* 3FD38 80064938 24C6FFFC */ addiu $a2, $a2, -0x4
|
|
/* 3FD3C 8006493C 00000000 */ nop
|