Carve out some smaller files in ARM9 static

This commit is contained in:
PikalaxALT 2021-09-05 11:34:49 -04:00
parent 1dd05b980e
commit da137c2c25
8 changed files with 60080 additions and 60046 deletions

View File

@ -1,8 +1,8 @@
; Temporary file to declare the static BSS section for ARM9
.bss
_021D221C:
.space 0x136CC
_021D2228:
.space 0x136C0
.public __global_destructor_chain
__global_destructor_chain: ; 0x021E58E8

File diff suppressed because it is too large Load Diff

54
asm/unk_02026DE0.s Normal file
View File

@ -0,0 +1,54 @@
.include "asm/macros.inc"
.include "global.inc"
.text
thumb_func_start sub_02026DE0
sub_02026DE0: ; 0x02026DE0
push {r3, r4}
ldr r3, [r0, #0xc]
mov r2, #0
sub r3, r3, #1
beq _02026DFE
ldr r4, [r0]
_02026DEC:
ldrh r3, [r4, #2]
cmp r3, r1
bhi _02026DFE
ldr r3, [r0, #0xc]
add r2, r2, #1
sub r3, r3, #1
add r4, r4, #2
cmp r2, r3
blo _02026DEC
_02026DFE:
ldr r1, [r0, #4]
ldrb r3, [r1, r2]
add r1, sp, #0
strb r3, [r1]
ldr r0, [r0, #8]
ldrb r2, [r0, r2]
strb r2, [r1, #1]
ldrb r0, [r1]
lsl r1, r2, #8
orr r0, r1
pop {r3, r4}
bx lr
.balign 4, 0
thumb_func_end sub_02026DE0
thumb_func_start sub_02026E18
sub_02026E18: ; 0x02026E18
ldr r2, [r0]
str r2, [r1, #0xc]
add r2, r0, #4
str r2, [r1]
ldr r0, [r1, #0xc]
lsl r0, r0, #1
add r2, r2, r0
str r2, [r1, #4]
ldr r0, [r1, #0xc]
add r0, r2, r0
str r0, [r1, #8]
bx lr
thumb_func_end sub_02026E18

65
asm/unk_02026E30.s Normal file
View File

@ -0,0 +1,65 @@
.include "asm/macros.inc"
.include "global.inc"
.bss
_021D221C:
.space 0xC
.text
thumb_func_start sub_02026E30
sub_02026E30: ; 0x02026E30
ldr r0, _02026E40 ; =_021D221C
mov r1, #0
str r1, [r0]
str r1, [r0, #4]
str r1, [r0, #8]
ldr r0, _02026E44 ; =_021D221C
str r1, [r0]
bx lr
.balign 4, 0
_02026E40: .word _021D221C
_02026E44: .word _021D221C
thumb_func_end sub_02026E30
thumb_func_start sub_02026E48
sub_02026E48: ; 0x02026E48
ldr r3, _02026E4C ; =sub_020CF670
bx r3
.balign 4, 0
_02026E4C: .word sub_020CF670
thumb_func_end sub_02026E48
thumb_func_start sub_02026E50
sub_02026E50: ; 0x02026E50
ldr r2, _02026E5C ; =_021D221C
str r0, [r2, #4]
str r1, [r2, #8]
mov r0, #1
str r0, [r2]
bx lr
.balign 4, 0
_02026E5C: .word _021D221C
thumb_func_end sub_02026E50
thumb_func_start sub_02026E60
sub_02026E60: ; 0x02026E60
ldr r0, _02026E7C ; =_021D221C
ldr r1, [r0]
cmp r1, #0
beq _02026E78
ldr r1, [r0, #8]
ldr r2, [r0, #4]
lsl r1, r1, #1
orr r2, r1
ldr r1, _02026E80 ; =0x04000540
str r2, [r1]
mov r1, #0
str r1, [r0]
_02026E78:
bx lr
nop
_02026E7C: .word _021D221C
_02026E80: .word 0x04000540
thumb_func_end sub_02026E60

52
asm/unk_02026E84.s Normal file
View File

@ -0,0 +1,52 @@
.include "asm/macros.inc"
.include "global.inc"
.text
thumb_func_start sub_02026E84
sub_02026E84: ; 0x02026E84
mov r0, #5
lsl r0, r0, #0x18
bx lr
.balign 4, 0
thumb_func_end sub_02026E84
thumb_func_start sub_02026E8C
sub_02026E8C: ; 0x02026E8C
mov r0, #2
lsl r0, r0, #8
bx lr
.balign 4, 0
thumb_func_end sub_02026E8C
thumb_func_start sub_02026E94
sub_02026E94: ; 0x02026E94
ldr r0, _02026E98 ; =0x05000400
bx lr
.balign 4, 0
_02026E98: .word 0x05000400
thumb_func_end sub_02026E94
thumb_func_start sub_02026E9C
sub_02026E9C: ; 0x02026E9C
mov r0, #2
lsl r0, r0, #8
bx lr
.balign 4, 0
thumb_func_end sub_02026E9C
thumb_func_start sub_02026EA4
sub_02026EA4: ; 0x02026EA4
ldr r0, _02026EA8 ; =0x05000200
bx lr
.balign 4, 0
_02026EA8: .word 0x05000200
thumb_func_end sub_02026EA4
thumb_func_start sub_02026EAC
sub_02026EAC: ; 0x02026EAC
ldr r0, _02026EB0 ; =0x05000600
bx lr
.balign 4, 0
_02026EB0: .word 0x05000600
thumb_func_end sub_02026EAC

153
asm/unk_02026EB4.s Normal file
View File

@ -0,0 +1,153 @@
.include "asm/macros.inc"
.include "global.inc"
.text
thumb_func_start sub_02026EB4
sub_02026EB4: ; 0x02026EB4
push {r3, r4, r5, r6, r7, lr}
sub sp, #8
add r7, r1, #0
mov r1, #0xc
add r6, r0, #0
add r5, r2, #0
str r3, [sp, #4]
bl AllocFromHeap
add r4, r0, #0
str r6, [r4]
bl sub_020C2698
bl sub_020CF704
mov r1, #2
ldr r0, _02026F50 ; =0x04000540
cmp r7, #0
str r1, [r0]
bne _02026F00
lsl r0, r5, #7
bl sub_020B67B4
add r6, r0, #0
ldr r0, [r4]
add r1, r6, #0
bl AllocFromHeap
str r0, [r4, #8]
mov r0, #1
str r0, [sp]
ldr r2, [r4, #8]
lsl r0, r5, #0x11
mov r1, #0
add r3, r6, #0
bl sub_02026FE8
b _02026F0A
_02026F00:
lsl r0, r5, #0x10
lsr r0, r0, #0x10
mov r1, #1
bl sub_02027000
_02026F0A:
ldr r0, [sp, #4]
cmp r0, #0
bne _02026F34
ldr r0, [sp, #0x20]
lsl r0, r0, #8
bl sub_020B6B14
add r5, r0, #0
ldr r0, [r4]
add r1, r5, #0
bl AllocFromHeap
str r0, [r4, #4]
ldr r0, [sp, #0x20]
ldr r1, [r4, #4]
lsl r0, r0, #0xd
add r2, r5, #0
mov r3, #1
bl sub_02026FF8
b _02026F3C
_02026F34:
ldr r0, [sp, #0x20]
mov r1, #1
bl sub_02027008
_02026F3C:
ldr r0, [sp, #0x24]
cmp r0, #0
beq _02026F46
blx r0
b _02026F4A
_02026F46:
bl sub_02026F6C
_02026F4A:
add r0, r4, #0
add sp, #8
pop {r3, r4, r5, r6, r7, pc}
.balign 4, 0
_02026F50: .word 0x04000540
thumb_func_end sub_02026EB4
thumb_func_start sub_02026F54
sub_02026F54: ; 0x02026F54
push {r4, lr}
add r4, r0, #0
ldr r0, [r4, #4]
bl FreeToHeap
ldr r0, [r4, #8]
bl FreeToHeap
add r0, r4, #0
bl FreeToHeap
pop {r4, pc}
thumb_func_end sub_02026F54
thumb_func_start sub_02026F6C
sub_02026F6C: ; 0x02026F6C
push {r3, lr}
mov r0, #1
add r1, r0, #0
bl GX_EngineAToggleLayers
ldr r0, _02026FD0 ; =0x04000008
mov r1, #3
ldrh r2, [r0]
bic r2, r1
strh r2, [r0]
add r0, #0x58
ldrh r2, [r0]
ldr r1, _02026FD4 ; =0xFFFFCFFD
and r1, r2
strh r1, [r0]
ldrh r1, [r0]
ldr r2, _02026FD8 ; =0x0000CFEF
and r1, r2
strh r1, [r0]
add r1, r2, #0
ldrh r3, [r0]
add r1, #0xc
and r1, r3
strh r1, [r0]
add r1, r2, #0
ldrh r3, [r0]
add r1, #8
sub r2, #0x10
and r1, r3
strh r1, [r0]
ldrh r1, [r0]
and r1, r2
strh r1, [r0]
mov r0, #0
add r1, r0, #0
add r2, r0, #0
add r3, r0, #0
bl G3X_SetFog
mov r0, #0
ldr r2, _02026FDC ; =0x00007FFF
add r1, r0, #0
mov r3, #0x3f
str r0, [sp]
bl G3X_SetClearColor
ldr r1, _02026FE0 ; =0xBFFF0000
ldr r0, _02026FE4 ; =0x04000580
str r1, [r0]
pop {r3, pc}
.balign 4, 0
_02026FD0: .word 0x04000008
_02026FD4: .word 0xFFFFCFFD
_02026FD8: .word 0x0000CFEF
_02026FDC: .word 0x00007FFF
_02026FE0: .word 0xBFFF0000
_02026FE4: .word 0x04000580
thumb_func_end sub_02026F6C

59741
asm/unk_02026FE8.s Normal file

File diff suppressed because it is too large Load Diff

View File

@ -79,6 +79,11 @@ Static main
Object unk_02025E88.o
Object pm_string.o
Object unk_02026C44.o
Object unk_02026DE0.o
Object unk_02026E30.o
Object unk_02026E84.o
Object unk_02026EB4.o
Object unk_02026FE8.o
Object scrcmd.o
### Vendor libraries ###
Object middleware.o