Reinfer file boundaries

This commit is contained in:
PikalaxALT 2017-11-11 00:39:02 -05:00
parent 3321548956
commit 8eb7bdc617
7 changed files with 4753 additions and 4725 deletions

3855
asm/link.s

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -5,869 +5,6 @@
.text
thumb_func_start sub_8011DC0
sub_8011DC0: @ 8011DC0
push {lr}
lsls r1, 16
lsrs r1, 16
bl sub_8011CE4
lsls r0, 24
lsrs r1, r0, 24
cmp r1, 0xFF
beq _08011DDA
movs r0, 0x1
lsls r0, r1
bl sub_8011D6C
_08011DDA:
pop {r0}
bx r0
thumb_func_end sub_8011DC0
thumb_func_start sub_8011DE0
sub_8011DE0: @ 8011DE0
push {r4-r6,lr}
adds r4, r0, 0
cmp r4, 0
beq _08011E20
movs r3, 0
movs r2, 0
ldr r5, =gUnknown_03005CDE
adds r6, r5, 0x4
_08011DF0:
adds r0, r2, r5
ldrb r0, [r0]
cmp r0, r4
bne _08011E0E
ldrb r0, [r6]
asrs r0, r2
movs r1, 0x1
ands r0, r1
cmp r0, 0
beq _08011E0E
adds r0, r1, 0
lsls r0, r2
orrs r3, r0
lsls r0, r3, 24
lsrs r3, r0, 24
_08011E0E:
adds r2, 0x1
cmp r2, 0x3
ble _08011DF0
cmp r3, 0
beq _08011E20
adds r0, r3, 0
movs r1, 0x2
bl sub_8011E94
_08011E20:
pop {r4-r6}
pop {r0}
bx r0
.pool
thumb_func_end sub_8011DE0
thumb_func_start sub_8011E2C
sub_8011E2C: @ 8011E2C
push {r4-r6,lr}
lsls r0, 24
lsrs r4, r0, 24
ldr r6, =gSendCmd
ldrh r0, [r6]
cmp r0, 0
bne _08011E7A
ldr r5, =gUnknown_03005000
ldr r1, =0x00000ce8
adds r0, r5, r1
ldrb r0, [r0]
cmp r0, 0
bne _08011E7A
movs r0, 0xED
lsls r0, 8
bl sub_800FD14
ldr r1, =gTasks
lsls r0, r4, 2
adds r0, r4
lsls r0, 3
adds r0, r1
ldrh r1, [r0, 0x8]
strh r1, [r6, 0x2]
ldrh r1, [r0, 0xA]
strh r1, [r6, 0x4]
ldr r1, =gUnknown_082ED695
movs r2, 0x8
ldrsh r0, [r0, r2]
adds r0, r1
ldrb r1, [r5, 0xD]
ldrb r0, [r0]
subs r1, r0
strb r1, [r5, 0xD]
ldrb r0, [r5, 0xD]
strh r0, [r6, 0x6]
adds r0, r4, 0
bl DestroyTask
_08011E7A:
pop {r4-r6}
pop {r0}
bx r0
.pool
thumb_func_end sub_8011E2C
thumb_func_start sub_8011E94
sub_8011E94: @ 8011E94
push {r4-r6,lr}
adds r4, r0, 0
adds r6, r1, 0
ldr r5, =sub_8011E2C
adds r0, r5, 0
bl FindTaskIdByFunc
lsls r0, 24
lsrs r2, r0, 24
cmp r2, 0xFF
bne _08011ECC
adds r0, r5, 0
movs r1, 0x5
bl CreateTask
lsls r0, 24
lsrs r2, r0, 24
ldr r1, =gTasks
lsls r0, r2, 2
adds r0, r2
lsls r0, 3
adds r0, r1
strh r4, [r0, 0x8]
b _08011EDC
.pool
_08011ECC:
ldr r0, =gTasks
lsls r1, r2, 2
adds r1, r2
lsls r1, 3
adds r1, r0
ldrh r0, [r1, 0x8]
orrs r4, r0
strh r4, [r1, 0x8]
_08011EDC:
ldr r1, =gTasks
lsls r0, r2, 2
adds r0, r2
lsls r0, 3
adds r0, r1
strh r6, [r0, 0xA]
pop {r4-r6}
pop {r0}
bx r0
.pool
thumb_func_end sub_8011E94
thumb_func_start sub_8011EF4
sub_8011EF4: @ 8011EF4
push {r4-r6,lr}
lsls r0, 24
lsrs r6, r0, 24
lsls r0, r6, 2
adds r0, r6
lsls r0, 3
ldr r1, =gTasks + 0x8
adds r4, r0, r1
bl sub_800EE94
lsls r0, 24
cmp r0, 0
beq _08011FA4
adds r0, r4, 0
adds r0, 0x10
bl sub_8011CD8
adds r1, r0, 0
lsls r1, 16
lsrs r1, 16
adds r0, r4, 0
bl sub_8011CE4
lsls r0, 24
lsrs r2, r0, 24
cmp r2, 0xFF
beq _08011F8C
ldr r0, =gUnknown_03007890
ldr r0, [r0]
lsls r1, r2, 5
adds r0, r1
ldrb r0, [r0, 0x16]
cmp r0, 0xFF
beq _08011F5C
ldr r0, =gUnknown_03005000
ldr r1, =0x00000c3d
adds r0, r1
strb r2, [r0]
bl sub_800EEBC
cmp r0, 0
beq _08011FAA
b _08011F84
.pool
_08011F5C:
bl sub_800F7DC
ldrb r1, [r0, 0xA]
movs r5, 0x7F
adds r0, r5, 0
ands r0, r1
cmp r0, 0x15
beq _08011FA4
bl sub_800F7DC
ldrb r1, [r0, 0xA]
adds r0, r5, 0
ands r0, r1
cmp r0, 0x16
beq _08011FA4
movs r1, 0xE0
lsls r1, 7
movs r0, 0x2
bl sub_8011A64
_08011F84:
adds r0, r6, 0
bl DestroyTask
b _08011FAA
_08011F8C:
ldrh r0, [r4, 0x1E]
adds r0, 0x1
strh r0, [r4, 0x1E]
ldr r0, =gUnknown_03005000
ldr r1, =0x00000c3d
adds r0, r1
strb r2, [r0]
b _08011FAA
.pool
_08011FA4:
ldrh r0, [r4, 0x1E]
adds r0, 0x1
strh r0, [r4, 0x1E]
_08011FAA:
movs r1, 0x1E
ldrsh r0, [r4, r1]
cmp r0, 0xF0
ble _08011FC2
movs r1, 0xE0
lsls r1, 7
movs r0, 0x2
bl sub_8011A64
adds r0, r6, 0
bl DestroyTask
_08011FC2:
pop {r4-r6}
pop {r0}
bx r0
thumb_func_end sub_8011EF4
thumb_func_start sub_8011FC8
sub_8011FC8: @ 8011FC8
push {r4-r6,lr}
adds r6, r0, 0
lsls r5, r1, 16
lsrs r5, 16
ldr r0, =gUnknown_03005000
adds r0, 0xF1
movs r1, 0
strb r1, [r0]
ldr r0, =sub_8011EF4
movs r1, 0x3
bl CreateTask
lsls r0, 24
lsrs r0, 24
lsls r4, r0, 2
adds r4, r0
lsls r4, 3
ldr r0, =gTasks + 0x8
adds r4, r0
adds r0, r4, 0
adds r1, r6, 0
bl StringCopy
strh r5, [r4, 0x10]
pop {r4-r6}
pop {r0}
bx r0
.pool
thumb_func_end sub_8011FC8
thumb_func_start sub_801200C
sub_801200C: @ 801200C
push {r4,r5,lr}
adds r4, r1, 0
lsls r0, 16
lsrs r5, r0, 16
bl sub_800F7DC
ldrb r1, [r0, 0xA]
movs r2, 0x7F
adds r0, r2, 0
ands r0, r1
cmp r0, 0x45
bne _08012032
ldrb r1, [r4, 0xA]
adds r0, r2, 0
ands r0, r1
cmp r0, 0x45
beq _08012092
_0801202E:
movs r0, 0x1
b _08012094
_08012032:
ldrb r1, [r4, 0xA]
adds r0, r2, 0
ands r0, r1
cmp r0, 0x40
bne _0801202E
cmp r5, 0x44
bne _08012092
ldr r5, =gUnknown_0300510A
ldrh r0, [r5, 0x8]
ldr r3, =0x000003ff
adds r2, r3, 0
ands r2, r0
movs r0, 0xCE
lsls r0, 1
cmp r2, r0
bne _08012068
ldrh r1, [r4, 0x8]
adds r0, r3, 0
ands r0, r1
cmp r0, r2
beq _08012092
b _0801202E
.pool
_08012068:
ldrh r1, [r4, 0x8]
adds r0, r3, 0
ands r0, r1
cmp r0, r2
bne _0801202E
ldrb r2, [r4, 0xB]
movs r0, 0xFE
ldrb r3, [r5, 0xB]
adds r1, r0, 0
ands r1, r2
ands r0, r3
cmp r1, r0
bne _0801202E
ldrb r2, [r4, 0x9]
movs r0, 0xFC
ldrb r3, [r5, 0x9]
adds r1, r0, 0
ands r1, r2
ands r0, r3
cmp r1, r0
bne _0801202E
_08012092:
movs r0, 0
_08012094:
pop {r4,r5}
pop {r1}
bx r1
thumb_func_end sub_801200C
thumb_func_start sub_801209C
sub_801209C: @ 801209C
push {r4-r7,lr}
mov r7, r8
push {r7}
lsls r0, 24
lsrs r5, r0, 24
mov r8, r5
ldr r6, =gUnknown_03005000
adds r0, r6, 0
adds r0, 0xF1
ldrb r0, [r0]
cmp r0, 0x4
bne _080120BA
adds r0, r5, 0
bl DestroyTask
_080120BA:
ldr r1, =gTasks
lsls r0, r5, 2
adds r0, r5
lsls r0, 3
adds r4, r0, r1
ldrh r0, [r4, 0x8]
adds r0, 0x1
strh r0, [r4, 0x8]
lsls r0, 16
movs r1, 0x96
lsls r1, 17
cmp r0, r1
ble _080120E4
movs r1, 0xE0
lsls r1, 7
movs r0, 0x2
bl sub_8011A64
adds r0, r5, 0
bl DestroyTask
_080120E4:
ldr r1, =0x00000ccd
adds r0, r6, r1
ldrb r0, [r0]
cmp r0, 0
beq _0801217C
ldr r0, =gUnknown_03004140
ldrb r0, [r0, 0x6]
cmp r0, 0
bne _0801217C
movs r2, 0x86
lsls r2, 1
adds r0, r6, r2
bl sub_8011CD8
adds r1, r0, 0
lsls r1, 16
lsrs r1, 16
ldr r2, =0x00000119
adds r0, r6, r2
bl sub_8011CE4
lsls r0, 24
lsrs r2, r0, 24
cmp r2, 0xFF
beq _0801217C
movs r1, 0xA
ldrsh r0, [r4, r1]
ldr r7, =gUnknown_03007890
lsls r4, r2, 5
adds r2, r4, 0
adds r2, 0x14
ldr r1, [r7]
adds r1, r2
adds r1, 0x6
bl sub_801200C
cmp r0, 0
bne _0801216C
ldr r0, [r7]
adds r1, r0, r4
ldrb r0, [r1, 0x16]
cmp r0, 0xFF
beq _0801217C
ldrh r0, [r1, 0x14]
movs r1, 0x5A
bl sub_800C12C
lsls r0, 24
cmp r0, 0
bne _0801217C
movs r0, 0xA
strh r0, [r6, 0x4]
adds r0, r5, 0
bl DestroyTask
b _0801217C
.pool
_0801216C:
movs r1, 0xE0
lsls r1, 7
movs r0, 0x2
bl sub_8011A64
mov r0, r8
bl DestroyTask
_0801217C:
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_801209C
thumb_func_start sub_8012188
sub_8012188: @ 8012188
push {r4-r7,lr}
adds r3, r0, 0
adds r5, r1, 0
lsls r4, r2, 24
lsrs r4, 24
ldr r6, =gUnknown_03005000
ldr r1, =0x00000ccf
adds r0, r6, r1
movs r7, 0
strb r7, [r0]
adds r0, r6, 0
adds r0, 0xF1
strb r7, [r0]
ldr r1, =0x00000119
adds r0, r6, r1
adds r1, r3, 0
bl StringCopy
movs r1, 0x85
lsls r1, 1
adds r0, r6, r1
adds r1, r5, 0
movs r2, 0xD
bl memcpy
bl sub_800D658
ldr r0, =sub_801209C
movs r1, 0x2
bl CreateTask
lsls r0, 24
lsrs r0, 24
ldr r5, =gTasks
lsls r1, r0, 2
adds r1, r0
lsls r1, 3
adds r1, r5
strh r4, [r1, 0xA]
ldr r0, =sub_800EB44
bl FindTaskIdByFunc
lsls r0, 24
lsrs r1, r0, 24
adds r2, r1, 0
cmp r4, 0x45
bne _08012210
cmp r1, 0xFF
beq _0801221E
lsls r0, r1, 2
adds r0, r1
lsls r0, 3
adds r0, r5
movs r1, 0x1
strh r1, [r0, 0x16]
b _0801221E
.pool
_08012210:
cmp r2, 0xFF
beq _0801221E
lsls r0, r2, 2
adds r0, r2
lsls r0, 3
adds r0, r5
strh r7, [r0, 0x16]
_0801221E:
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_8012188
thumb_func_start sub_8012224
sub_8012224: @ 8012224
push {lr}
ldr r0, =gUnknown_03005000
adds r0, 0xF0
ldrb r0, [r0]
cmp r0, 0x1
beq _08012238
movs r0, 0
b _0801223A
.pool
_08012238:
movs r0, 0x1
_0801223A:
pop {r1}
bx r1
thumb_func_end sub_8012224
thumb_func_start sub_8012240
sub_8012240: @ 8012240
push {r4,lr}
movs r1, 0
ldr r0, =gUnknown_03004140
ldrb r2, [r0]
ldr r4, =gUnknown_03005CD1
movs r3, 0x1
_0801224C:
adds r0, r2, 0
asrs r0, r1
ands r0, r3
cmp r0, 0
beq _0801226C
adds r0, r1, r4
ldrb r0, [r0]
cmp r0, 0
bne _0801226C
movs r0, 0
b _08012274
.pool
_0801226C:
adds r1, 0x1
cmp r1, 0x3
ble _0801224C
movs r0, 0x1
_08012274:
pop {r4}
pop {r1}
bx r1
thumb_func_end sub_8012240
thumb_func_start sub_801227C
sub_801227C: @ 801227C
push {r4,lr}
movs r4, 0
_08012280:
lsls r2, r4, 24
lsrs r2, 24
ldr r0, =gUnknown_082ED82C
movs r1, 0
bl nullsub_5
adds r4, 0x1
cmp r4, 0x13
ble _08012280
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end sub_801227C
thumb_func_start sub_801229C
sub_801229C: @ 801229C
push {r4-r7,lr}
mov r7, r8
push {r7}
bl GetBlockReceivedStatus
lsls r0, 24
lsrs r0, 24
movs r1, 0x1C
movs r2, 0x13
movs r3, 0x2
bl nullsub_13
ldr r4, =gUnknown_03007890
ldr r0, [r4]
ldrb r0, [r0, 0x2]
movs r1, 0x14
movs r2, 0x1
movs r3, 0x1
bl nullsub_13
ldr r0, [r4]
ldrb r0, [r0, 0x3]
movs r1, 0x17
movs r2, 0x1
movs r3, 0x1
bl nullsub_13
ldr r0, =gUnknown_03005000
ldrb r0, [r0, 0xC]
cmp r0, 0x1
bne _08012378
movs r6, 0
adds r7, r4, 0
movs r5, 0x14
_080122E0:
ldr r2, [r7]
ldrb r0, [r2, 0x7]
asrs r0, r6
movs r1, 0x1
ands r0, r1
cmp r0, 0
beq _0801231E
lsls r0, r6, 5
adds r0, r2, r0
ldrh r0, [r0, 0x18]
adds r4, r6, 0x3
lsls r4, 24
lsrs r4, 24
adds r2, r4, 0
movs r3, 0x4
bl nullsub_13
ldr r0, [r7]
adds r0, r5
adds r0, 0x6
movs r1, 0x6
adds r2, r4, 0
bl nullsub_5
ldr r0, [r7]
adds r0, r5
adds r0, 0x15
movs r1, 0x16
adds r2, r4, 0
bl nullsub_5
_0801231E:
adds r5, 0x20
adds r6, 0x1
cmp r6, 0x3
ble _080122E0
movs r6, 0
ldr r0, =gUnknown_03005000
mov r8, r0
_0801232C:
movs r5, 0
adds r7, r6, 0x1
lsls r0, r6, 3
adds r2, r6, 0
adds r2, 0xB
subs r0, r6
lsls r0, 1
mov r1, r8
adds r1, 0x14
adds r4, r0, r1
lsls r6, r2, 24
_08012342:
ldrb r0, [r4]
lsls r1, r5, 25
lsrs r1, 24
lsrs r2, r6, 24
movs r3, 0x2
bl nullsub_13
adds r4, 0x1
adds r5, 0x1
cmp r5, 0xD
ble _08012342
adds r6, r7, 0
cmp r6, 0x3
ble _0801232C
ldr r0, =gUnknown_082ED868
movs r1, 0x1
movs r2, 0xF
bl nullsub_5
b _080124AA
.pool
_08012378:
ldr r1, [r4]
ldrb r0, [r1, 0x2]
cmp r0, 0
beq _08012414
ldrb r0, [r1, 0x7]
cmp r0, 0
beq _08012414
movs r6, 0
movs r5, 0xC0
lsls r5, 18
_0801238C:
lsrs r4, r5, 24
movs r0, 0
movs r1, 0x1
adds r2, r4, 0
movs r3, 0x4
bl nullsub_13
ldr r0, =gUnknown_082ED84B
movs r1, 0x6
adds r2, r4, 0
bl nullsub_5
ldr r0, =gUnknown_082ED85B
movs r1, 0x16
adds r2, r4, 0
bl nullsub_5
movs r1, 0x80
lsls r1, 17
adds r5, r1
adds r6, 0x1
cmp r6, 0x3
ble _0801238C
ldr r5, =gUnknown_03007890
ldr r1, [r5]
ldr r4, =gUnknown_03005000
ldr r0, =0x00000c3e
adds r4, r0
ldrb r0, [r4]
lsls r0, 5
adds r1, r0
ldrh r0, [r1, 0x18]
movs r1, 0x1
movs r2, 0x3
movs r3, 0x4
bl nullsub_13
ldrb r1, [r4]
lsls r1, 5
adds r1, 0x14
ldr r0, [r5]
adds r0, r1
adds r0, 0x6
movs r1, 0x6
movs r2, 0x3
bl nullsub_5
ldrb r1, [r4]
lsls r1, 5
adds r1, 0x14
ldr r0, [r5]
adds r0, r1
adds r0, 0x15
movs r1, 0x16
movs r2, 0x3
bl nullsub_5
b _080124AA
.pool
_08012414:
movs r6, 0
ldr r1, =gUnknown_03007890
ldr r0, [r1]
ldrb r0, [r0, 0x8]
cmp r6, r0
bge _08012470
adds r7, r1, 0
movs r1, 0x14
mov r8, r1
_08012426:
ldr r0, [r7]
lsls r5, r6, 5
adds r1, r0, r5
ldrb r0, [r1, 0x16]
cmp r0, 0xFF
beq _08012462
ldrh r0, [r1, 0x18]
adds r4, r6, 0x3
lsls r4, 24
lsrs r4, 24
movs r1, 0x1
adds r2, r4, 0
movs r3, 0x4
bl nullsub_13
ldr r0, [r7]
adds r0, r5
ldrh r0, [r0, 0x14]
movs r1, 0x6
adds r2, r4, 0
movs r3, 0x4
bl nullsub_13
ldr r0, [r7]
add r0, r8
adds r0, 0x15
movs r1, 0x16
adds r2, r4, 0
bl nullsub_5
_08012462:
movs r0, 0x20
add r8, r0
adds r6, 0x1
ldr r0, [r7]
ldrb r0, [r0, 0x8]
cmp r6, r0
blt _08012426
_08012470:
cmp r6, 0x3
bgt _080124AA
lsls r0, r6, 24
movs r1, 0xC0
lsls r1, 18
adds r5, r0, r1
_0801247C:
lsrs r4, r5, 24
movs r0, 0
movs r1, 0x1
adds r2, r4, 0
movs r3, 0x4
bl nullsub_13
ldr r0, =gUnknown_082ED84B
movs r1, 0x6
adds r2, r4, 0
bl nullsub_5
ldr r0, =gUnknown_082ED85B
movs r1, 0x16
adds r2, r4, 0
bl nullsub_5
movs r0, 0x80
lsls r0, 17
adds r5, r0
adds r6, 0x1
cmp r6, 0x3
ble _0801247C
_080124AA:
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
.pool
thumb_func_end sub_801229C
thumb_func_start sub_80124C0
sub_80124C0: @ 80124C0
ldr r0, =gUnknown_03005000
ldr r1, =0x00000c1a
adds r0, r1
ldrb r0, [r0]
bx lr
.pool
thumb_func_end sub_80124C0
thumb_func_start sub_80124D4
sub_80124D4: @ 80124D4
ldr r0, =gUnknown_03005000
ldr r1, =0x000009e6
adds r0, r1
ldrb r0, [r0]
bx lr
.pool
thumb_func_end sub_80124D4
thumb_func_start nullsub_89
nullsub_89: @ 80124E8
bx lr

View File

@ -57,14 +57,6 @@ IWRAM_DATA u16 gUnknown_03000D70;
IWRAM_DATA u8 gUnknown_03000D72;
IWRAM_DATA u8 gUnknown_03000D73;
IWRAM_DATA u8 gUnknown_03000D74;
ALIGNED() IWRAM_DATA u8 gUnknown_03000D78;
ALIGNED(8) IWRAM_DATA u8 gUnknown_03000D80[16];
IWRAM_DATA u16 gUnknown_03000D90[8];
IWRAM_DATA u32 gUnknown_03000DA0;
IWRAM_DATA u32 gUnknown_03000DA4;
IWRAM_DATA void *gUnknown_03000DA8;
IWRAM_DATA void *gUnknown_03000DAC;
IWRAM_DATA bool32 gUnknown_03000DB0;
u16 gUnknown_03003020[6];
u32 gLinkDebugSeed;

16
src/link_rfu.c Normal file
View File

@ -0,0 +1,16 @@
// Includes
#include "global.h"
// Static type declarations
// Static RAM declarations
IWRAM_DATA u8 gUnknown_03000D78[8];
IWRAM_DATA u8 gUnknown_03000D80[16];
IWRAM_DATA u16 gUnknown_03000D90[8];
// Static ROM declarations
// .rodata
// .text

18
src/rom_8011DC0.c Normal file
View File

@ -0,0 +1,18 @@
// Includes
#include "global.h"
// Static type declarations
// Static RAM declarations
IWRAM_DATA u32 gUnknown_03000DA0;
IWRAM_DATA u32 gUnknown_03000DA4;
IWRAM_DATA void *gUnknown_03000DA8;
IWRAM_DATA void *gUnknown_03000DAC;
IWRAM_DATA bool32 gUnknown_03000DB0;
// Static ROM declarations
// .rodata
// .text

View File

@ -6,6 +6,8 @@
.include "src/text.o"
.include "src/sprite.o"
.include "src/link.o"
.include "src/link_rfu.o"
.include "src/rom_8011DC0.o"
.include "src/rtc.o"
.include "src/main_menu.o"
.include "src/battle_1.o"