Rename functions in link.c

This commit is contained in:
PikalaxALT 2017-11-11 00:05:44 -05:00
parent 2c37f83546
commit e874cbd9d9
23 changed files with 688 additions and 797 deletions

View File

@ -1021,7 +1021,7 @@ _0808003C:
.4byte _08080508
_08080094:
bl sub_8080588
ldr r1, =gUnknown_020229C6
ldr r1, =gLinkType
ldr r2, =0x00004422
adds r0, r2, 0
strh r0, [r1]
@ -1193,7 +1193,7 @@ _080801F8:
ldr r1, =gScriptItemId
ldrh r1, [r1]
bl sub_807FE14
ldr r0, =gUnknown_020228C4
ldr r0, =gBlockSendBuffer
ldr r1, [r4]
adds r1, r5
movs r2, 0x10
@ -2063,7 +2063,7 @@ _08080950:
bl sub_8080674
movs r4, 0
movs r6, 0
ldr r0, =gUnknown_020229C6
ldr r0, =gLinkType
mov r12, r0
movs r7, 0x92
lsls r7, 1
@ -2571,9 +2571,9 @@ _08080DAE:
thumb_func_start sub_8080DF8
sub_8080DF8: @ 8080DF8
push {lr}
ldr r3, =gUnknown_03003110
ldr r3, =gSendCmd
movs r0, 0
ldr r1, =gUnknown_03003090
ldr r1, =gRecvCmds
movs r2, 0x3
_08080E02:
strh r0, [r3]
@ -2608,7 +2608,7 @@ sub_8080E20: @ 8080E20
ldrsh r1, [r2, r4]
cmp r0, r1
ble _08080E58
ldr r0, =gUnknown_03003090
ldr r0, =gRecvCmds
movs r4, 0xC
ldrsh r1, [r2, r4]
lsls r1, 4
@ -2704,12 +2704,12 @@ _08080ED8:
bgt _08080F40
cmp r1, 0x4B
bls _08080F2C
ldr r1, =gUnknown_03003090
ldr r1, =gRecvCmds
ldr r0, =0x00004523
b _08080F30
.pool
_08080F2C:
ldr r1, =gUnknown_03003090
ldr r1, =gRecvCmds
ldr r0, =0x00005432
_08080F30:
strh r0, [r1, 0x14]
@ -2728,7 +2728,7 @@ _08080F40:
lsrs r0, 24
cmp r0, 0x3B
bhi _08080F68
ldr r1, =gUnknown_03003090
ldr r1, =gRecvCmds
ldr r0, =0x00005432
b _08080F9E
.pool
@ -2745,7 +2745,7 @@ _08080F6E:
lsrs r0, 24
cmp r0, 0x13
bhi _08080F8C
ldr r1, =gUnknown_03003090
ldr r1, =gRecvCmds
ldr r0, =0x00005432
b _08080F9E
.pool
@ -2758,7 +2758,7 @@ _08080F90:
bl sub_8080E6C
b _08080FA0
_08080F9A:
ldr r1, =gUnknown_03003090
ldr r1, =gRecvCmds
ldr r0, =0x00004523
_08080F9E:
strh r0, [r1, 0x14]
@ -2847,13 +2847,13 @@ sub_8080FD0: @ 8080FD0
bgt _08081088
cmp r2, 0x42
bls _08081078
ldr r1, =gUnknown_03003090
ldr r1, =gRecvCmds
ldr r0, =0x00004523
strh r0, [r1, 0x24]
b _080810B0
.pool
_08081078:
ldr r1, =gUnknown_03003090
ldr r1, =gRecvCmds
ldr r0, =0x00005432
strh r0, [r1, 0x24]
b _080810B0
@ -2861,7 +2861,7 @@ _08081078:
_08081088:
cmp r2, 0x41
bls _08081092
ldr r1, =gUnknown_03003090
ldr r1, =gRecvCmds
ldr r0, =0x00004523
strh r0, [r1, 0x24]
_08081092:
@ -2871,7 +2871,7 @@ _08081092:
lsrs r0, 24
cmp r0, 0x18
bhi _080810A4
ldr r1, =gUnknown_03003090
ldr r1, =gRecvCmds
ldr r0, =0x00005432
strh r0, [r1, 0x24]
_080810A4:
@ -2889,7 +2889,7 @@ _080810B0:
b _080810EC
.pool
_080810CC:
ldr r0, =gUnknown_03003090
ldr r0, =gRecvCmds
ldr r1, =0x00004523
strh r1, [r0, 0x24]
movs r0, 0x1
@ -2972,13 +2972,13 @@ sub_80810F8: @ 80810F8
bgt _080811AC
cmp r2, 0x58
bls _0808119C
ldr r1, =gUnknown_03003090
ldr r1, =gRecvCmds
ldr r0, =0x00004523
strh r0, [r1, 0x34]
b _080811DE
.pool
_0808119C:
ldr r1, =gUnknown_03003090
ldr r1, =gRecvCmds
ldr r0, =0x00005432
strh r0, [r1, 0x34]
b _080811DE
@ -2986,7 +2986,7 @@ _0808119C:
_080811AC:
cmp r2, 0x3C
bls _080811C0
ldr r1, =gUnknown_03003090
ldr r1, =gRecvCmds
ldr r0, =0x00004523
b _080811D0
.pool
@ -2997,7 +2997,7 @@ _080811C0:
lsrs r0, 24
cmp r0, 0x4
bhi _080811D2
ldr r1, =gUnknown_03003090
ldr r1, =gRecvCmds
ldr r0, =0x00005432
_080811D0:
strh r0, [r1, 0x34]
@ -3016,7 +3016,7 @@ _080811DE:
b _08081218
.pool
_080811F8:
ldr r0, =gUnknown_03003090
ldr r0, =gRecvCmds
ldr r1, =0x00004523
strh r1, [r0, 0x34]
movs r0, 0x1
@ -3063,7 +3063,7 @@ sub_8081224: @ 8081224
ldrsh r0, [r2, r1]
cmp r0, 0
bne _0808127E
ldr r0, =gUnknown_03003090
ldr r0, =gRecvCmds
ldr r1, =0x00004523
strh r1, [r0, 0x14]
movs r0, 0x1
@ -3370,9 +3370,9 @@ sub_80814F4: @ 80814F4
ldrh r0, [r0]
cmp r0, 0
beq _0808153C
ldr r3, =gUnknown_03003110
ldr r3, =gSendCmd
ldrh r0, [r3, 0x4]
ldr r2, =gUnknown_03003090
ldr r2, =gRecvCmds
cmp r0, 0
beq _0808151C
movs r1, 0
@ -3381,7 +3381,7 @@ sub_80814F4: @ 80814F4
strh r0, [r2]
strh r1, [r3, 0x4]
_0808151C:
ldr r0, =gUnknown_03003090
ldr r0, =gRecvCmds
ldr r3, =0x00004444
adds r1, r2, 0
adds r1, 0x10
@ -3409,7 +3409,7 @@ _0808153C:
blt _0808154C
b _080816F6
_0808154C:
ldr r0, =gUnknown_03003090
ldr r0, =gRecvCmds
adds r2, r0, 0
adds r2, 0x20
str r2, [sp]
@ -3605,7 +3605,7 @@ _080816F6:
cmp r7, r0
bge _08081722
movs r2, 0
ldr r1, =gUnknown_03003090
ldr r1, =gRecvCmds
_08081710:
strh r2, [r1]
strh r2, [r1, 0x4]
@ -3711,19 +3711,19 @@ _080817BA:
lsrs r0, 24
cmp r0, 0x2
bne _08081810
ldr r1, =gUnknown_03003110
ldr r1, =gSendCmd
ldr r0, =0x00004523
b _08081828
.pool
_08081810:
cmp r0, 0x1
bne _08081824
ldr r1, =gUnknown_03003110
ldr r1, =gSendCmd
ldr r0, =0x00005432
b _08081828
.pool
_08081824:
ldr r1, =gUnknown_03003110
ldr r1, =gSendCmd
ldr r0, =0x00002345
_08081828:
strh r0, [r1, 0x4]
@ -3804,7 +3804,7 @@ _080818B4:
lsls r5, 1
adds r1, r5
ldrh r1, [r1]
bl sub_800A994
bl SetLinkDebugValues
bl sub_80814F4
ldr r0, [r4]
adds r0, r5
@ -4804,7 +4804,7 @@ _08082078:
lsls r0, 16
cmp r0, 0
bgt _080820C6
bl sub_8009F8C
bl ClearLinkCallback
ldr r2, [r4]
adds r1, r2, 0
adds r1, 0x4C
@ -5176,7 +5176,7 @@ _0808239E:
b _0808249E
.pool
_080823B0:
ldr r6, =gUnknown_03003110
ldr r6, =gSendCmd
adds r0, r6, 0
bl sub_8081F94
ldr r4, =gUnknown_020322A4
@ -5972,7 +5972,7 @@ sub_8082AD4: @ 8082AD4
bne _08082AE0
b _08082CA4
_08082AE0:
ldr r4, =gUnknown_03003090
ldr r4, =gRecvCmds
ldrh r0, [r4]
ldr r1, =0x00002fff
movs r2, 0xBC
@ -6051,7 +6051,7 @@ _08082B8A:
b _08082BF4
.pool
_08082B9C:
ldr r6, =gUnknown_03003090
ldr r6, =gRecvCmds
lsls r4, r5, 4
adds r0, r4, r6
ldrh r0, [r0]
@ -6146,7 +6146,7 @@ _08082C4E:
cmp r0, r4
beq _08082C48
_08082C6A:
ldr r4, =gUnknown_03003110
ldr r4, =gSendCmd
adds r0, r4, 0
bl sub_8081F94
bl GetLinkPlayerCount
@ -6269,7 +6269,7 @@ _08082D3C:
ldrh r1, [r2]
adds r0, r1
strh r0, [r2]
ldr r1, =gUnknown_03003110
ldr r1, =gSendCmd
movs r4, 0x8B
lsls r4, 1
adds r0, r3, r4
@ -6284,7 +6284,7 @@ _08082D3C:
b _08082DEA
.pool
_08082D90:
ldr r3, =gUnknown_03003090
ldr r3, =gRecvCmds
ldrh r0, [r3]
movs r1, 0xFF
lsls r1, 8

View File

@ -143,7 +143,7 @@ sub_80B2478: @ 80B2478
lsrs r0, 24
lsls r1, 24
lsrs r1, 24
bl sub_800A0C8
bl GetLinkPlayerDataExchangeStatusTimed
lsls r0, 24
lsrs r0, 24
subs r0, 0x1
@ -244,7 +244,7 @@ sub_80B252C: @ 80B252C
lsrs r1, r0, 24
cmp r1, 0
bne _080B2570
ldr r0, =gUnknown_020229C6
ldr r0, =gLinkType
strh r1, [r0]
ldr r1, =gTasks
lsls r0, r4, 2
@ -274,7 +274,7 @@ sub_80B2578: @ 80B2578
cmp r0, 0
beq _080B258E
movs r0, 0x1
bl sub_800B330
bl SetSuppressLinkErrorMessage
_080B258E:
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
@ -286,7 +286,7 @@ _080B258E:
b _080B25BA
.pool
_080B25A4:
ldr r1, =gUnknown_020229C6
ldr r1, =gLinkType
movs r0, 0
strh r0, [r1]
ldr r1, =gTasks
@ -374,9 +374,9 @@ sub_80B2634: @ 80B2634
ldrsh r2, [r4, r3]
cmp r2, 0
bne _080B266C
bl sub_800A0AC
bl OpenLinkTimed
bl sub_800AB98
bl sub_800A2BC
bl ResetLinkPlayers
ldr r0, =gUnknown_08550594
bl AddWindow
strh r0, [r4, 0xA]
@ -418,7 +418,7 @@ sub_80B2688: @ 80B2688
cmp r5, 0x1
bls _080B26FC
movs r0, 0x1
bl sub_800B330
bl SetSuppressLinkErrorMessage
ldr r1, =gTasks
lsls r0, r4, 2
adds r0, r4
@ -729,7 +729,7 @@ _080B297C:
cmp r2, 0x9
bne _080B2994
_080B2984:
bl sub_80097E8
bl CloseLink
bl HideFieldMessageBox
ldr r0, =sub_80B2CB0
b _080B29E4
@ -743,7 +743,7 @@ _080B2994:
strb r0, [r1]
ldrb r0, [r4]
bl sub_800AA04
ldr r4, =gUnknown_020228C4
ldr r4, =gBlockSendBuffer
adds r0, r4, 0
bl sub_80C30A4
ldr r0, =gUnknown_0203CEF8
@ -812,7 +812,7 @@ _080B2A42:
cmp r0, 0x9
bne _080B2A6C
_080B2A4A:
bl sub_80097E8
bl CloseLink
_080B2A4E:
bl HideFieldMessageBox
ldr r0, =gTasks
@ -833,7 +833,7 @@ _080B2A6C:
strb r0, [r1]
ldrb r0, [r4]
bl sub_800AA04
ldr r4, =gUnknown_020228C4
ldr r4, =gBlockSendBuffer
adds r0, r4, 0
bl sub_80C30A4
ldr r0, =gUnknown_0203CEF8
@ -964,7 +964,7 @@ task_map_chg_seq_0807EC34: @ 80B2B94
ldrh r0, [r5]
cmp r0, 0x1
bne _080B2C10
ldr r0, =gUnknown_020229C6
ldr r0, =gLinkType
ldrh r2, [r0]
ldr r0, =0x00002266
cmp r2, r0
@ -1065,7 +1065,7 @@ _080B2C7E:
cmp r4, r0
bcc _080B2C5C
movs r0, 0
bl sub_800B330
bl SetSuppressLinkErrorMessage
bl ResetBlockReceivedFlags
ldr r0, =gScriptResult
adds r1, r5, 0
@ -1215,20 +1215,20 @@ _080B2DC0:
b _080B2E34
_080B2DCA:
movs r3, 0x2
ldr r1, =gUnknown_020229C6
ldr r1, =gLinkType
ldr r4, =0x00002233
b _080B2E30
.pool
_080B2DDC:
movs r3, 0x2
ldr r1, =gUnknown_020229C6
ldr r1, =gLinkType
ldr r4, =0x00002244
b _080B2E30
.pool
_080B2DEC:
movs r3, 0x4
movs r2, 0x4
ldr r1, =gUnknown_020229C6
ldr r1, =gLinkType
ldr r4, =0x00002255
b _080B2E30
.pool
@ -1243,12 +1243,12 @@ _080B2E00:
ands r0, r1
cmp r0, 0
bne _080B2E2C
ldr r1, =gUnknown_020229C6
ldr r1, =gLinkType
ldr r4, =0x00002266
b _080B2E30
.pool
_080B2E2C:
ldr r1, =gUnknown_020229C6
ldr r1, =gLinkType
ldr r4, =0x00002277
_080B2E30:
adds r0, r4, 0
@ -1266,7 +1266,7 @@ _080B2E34:
thumb_func_start sub_80B2E4C
sub_80B2E4C: @ 80B2E4C
push {lr}
ldr r1, =gUnknown_020229C6
ldr r1, =gLinkType
ldr r2, =0x00001133
adds r0, r2, 0
strh r0, [r1]
@ -1287,7 +1287,7 @@ sub_80B2E74: @ 80B2E74
ldr r1, =gScriptResult
movs r0, 0
strh r0, [r1]
ldr r1, =gUnknown_020229C6
ldr r1, =gLinkType
ldr r2, =0x00003311
adds r0, r2, 0
strh r0, [r1]
@ -1454,7 +1454,7 @@ _080B2FC6:
thumb_func_start sub_80B2FD8
sub_80B2FD8: @ 80B2FD8
push {lr}
ldr r1, =gUnknown_020229C6
ldr r1, =gLinkType
ldr r2, =0x00004411
adds r0, r2, 0
strh r0, [r1]
@ -1472,7 +1472,7 @@ sub_80B2FD8: @ 80B2FD8
thumb_func_start sub_80B3000
sub_80B3000: @ 80B3000
push {lr}
ldr r1, =gUnknown_020229C6
ldr r1, =gLinkType
ldr r2, =0x00006601
adds r0, r2, 0
strh r0, [r1]
@ -1490,7 +1490,7 @@ sub_80B3000: @ 80B3000
thumb_func_start sub_80B3028
sub_80B3028: @ 80B3028
push {lr}
ldr r1, =gUnknown_020229C6
ldr r1, =gLinkType
ldr r2, =0x00006602
adds r0, r2, 0
strh r0, [r1]
@ -1540,17 +1540,17 @@ _080B3084:
.4byte _080B3128
.4byte _080B30D8
_080B30A8:
ldr r1, =gUnknown_020229C6
ldr r1, =gLinkType
ldr r2, =0x00002233
b _080B3124
.pool
_080B30B8:
ldr r1, =gUnknown_020229C6
ldr r1, =gLinkType
ldr r2, =0x00002244
b _080B3124
.pool
_080B30C8:
ldr r1, =gUnknown_020229C6
ldr r1, =gLinkType
ldr r2, =0x00002255
b _080B3124
.pool
@ -1564,22 +1564,22 @@ _080B30D8:
ands r0, r1
cmp r0, 0
bne _080B3100
ldr r1, =gUnknown_020229C6
ldr r1, =gLinkType
ldr r2, =0x00002266
b _080B3124
.pool
_080B3100:
ldr r1, =gUnknown_020229C6
ldr r1, =gLinkType
ldr r2, =0x00002277
b _080B3124
.pool
_080B3110:
ldr r1, =gUnknown_020229C6
ldr r1, =gLinkType
ldr r2, =0x00001111
b _080B3124
.pool
_080B3120:
ldr r1, =gUnknown_020229C6
ldr r1, =gLinkType
ldr r2, =0x00003322
_080B3124:
adds r0, r2, 0
@ -1610,8 +1610,8 @@ sub_80B3144: @ 80B3144
ldrsh r2, [r4, r3]
cmp r2, 0
bne _080B3178
bl sub_8009734
bl sub_800A2BC
bl OpenLink
bl ResetLinkPlayers
ldr r0, =task00_08081A90
movs r1, 0x50
bl CreateTask
@ -1710,7 +1710,7 @@ sub_80B3220: @ 80B3220
ldrb r0, [r0]
cmp r0, 0x1
bne _080B3248
bl sub_800A23C
bl IsLinkPlayerDataExchangeComplete
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
@ -1809,11 +1809,11 @@ _080B32F8:
movs r0, 0x1
movs r1, 0
bl fade_screen
ldr r1, =gUnknown_020229C6
ldr r1, =gLinkType
ldr r2, =0x00002211
adds r0, r2, 0
strh r0, [r1]
bl sub_8009FAC
bl ClearLinkCallback_2
b _080B3346
.pool
_080B3318:
@ -1922,11 +1922,11 @@ _080B3408:
movs r0, 0x1
movs r1, 0
bl fade_screen
ldr r0, =gUnknown_020229C6
ldr r0, =gLinkType
ldr r2, =0x00002211
adds r1, r2, 0
strh r1, [r0]
bl sub_8009FAC
bl ClearLinkCallback_2
movs r0, 0x1
strh r0, [r6]
b _080B3532
@ -1945,7 +1945,7 @@ _080B343A:
b _080B3532
.pool
_080B3444:
ldr r1, =gUnknown_020229CC
ldr r1, =gLocalLinkPlayer
movs r0, 0
movs r2, 0x1C
bl SendBlock
@ -2400,7 +2400,7 @@ _080B382E:
movs r0, 0x1
movs r1, 0
bl fade_screen
bl sub_8009FAC
bl ClearLinkCallback_2
b _080B3864
_080B3840:
ldr r0, =gPaletteFade
@ -2548,7 +2548,7 @@ nullsub_37: @ 80B3964
thumb_func_start sub_80B3968
sub_80B3968: @ 80B3968
push {lr}
ldr r1, =gUnknown_020229C6
ldr r1, =gLinkType
ldr r2, =0x00002211
adds r0, r2, 0
strh r0, [r1]
@ -2651,8 +2651,8 @@ task00_08081A90: @ 80B3A30
lsls r0, 17
cmp r1, r0
ble _080B3A62
bl sub_80097E8
ldr r0, =c2_800ACD4
bl CloseLink
ldr r0, =CB2_LinkError
bl SetMainCallback2
adds r0, r4, 0
bl DestroyTask
@ -2669,8 +2669,8 @@ _080B3A62:
lsls r0, 24
cmp r0, 0
bne _080B3A86
bl sub_80097E8
ldr r0, =c2_800ACD4
bl CloseLink
ldr r0, =CB2_LinkError
bl SetMainCallback2
_080B3A86:
adds r0, r4, 0
@ -2761,7 +2761,7 @@ _080B3B2A:
b _080B3BB8
.pool
_080B3B40:
bl sub_8009734
bl OpenLink
ldr r0, =task00_08081A90
movs r1, 0x1
bl CreateTask
@ -2808,7 +2808,7 @@ _080B3B9E:
ldrb r0, [r0]
cmp r0, 0x1
bne _080B3BB8
bl sub_800A23C
bl IsLinkPlayerDataExchangeComplete
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
@ -2829,7 +2829,7 @@ sub_80B3BC4: @ 80B3BC4
ldrb r0, [r0]
cmp r0, 0
bne _080B3BD6
ldr r1, =gUnknown_020229C6
ldr r1, =gLinkType
ldr r2, =0x00002288
adds r0, r2, 0
strh r0, [r1]

View File

@ -284,7 +284,7 @@ _080FC6FE:
lsls r0, 24
cmp r0, 0
beq _080FC7F4
ldr r0, =gUnknown_020228C4
ldr r0, =gBlockSendBuffer
ldr r1, =gUnknown_02039F25
ldrb r1, [r1]
lsls r1, 6
@ -297,7 +297,7 @@ _080FC6FE:
b _080FC7F4
.pool
_080FC738:
ldr r0, =gUnknown_020228C4
ldr r0, =gBlockSendBuffer
ldr r1, =gUnknown_02039F25
ldrb r1, [r1]
lsls r1, 6
@ -487,7 +487,7 @@ _080FC8D8:
beq _080FC954
b _080FC96E
_080FC8DE:
ldr r1, =gUnknown_020228C4
ldr r1, =gBlockSendBuffer
ldrh r0, [r4, 0x1A]
strb r0, [r1]
bl GetMultiplayerId
@ -1142,7 +1142,7 @@ _080FCE8C:
beq _080FCEFC
b _080FCF16
_080FCE92:
ldr r1, =gUnknown_020228C4
ldr r1, =gBlockSendBuffer
movs r0, 0x6E
strb r0, [r1]
bl GetMultiplayerId

View File

@ -8987,7 +8987,7 @@ _080AF994:
beq _080AF9D0
b _080AF9E8
_080AF99A:
bl sub_8009FAC
bl ClearLinkCallback_2
movs r0, 0x1
movs r1, 0
bl fade_screen

View File

@ -562,7 +562,7 @@ task_intro_2: @ 816D12C
movs r0, 0xCF
lsls r0, 1
bl m4aSongNumStart
bl sub_800B628
bl ResetSerial
add sp, 0x4
pop {r4,r5}
pop {r0}

View File

@ -5,163 +5,15 @@
.text
thumb_func_start sub_800A824
sub_800A824: @ 800A824
push {lr}
ldr r0, =gUnknown_030030E0
ldr r0, [r0]
movs r1, 0x20
ands r0, r1
cmp r0, 0
_0800A830:
beq _0800A838
ldr r0, =0x00002222
bl sub_8009D90
_0800A838:
ldr r1, =gUnknown_03003140
movs r0, 0
str r0, [r1]
pop {r0}
bx r0
.pool
thumb_func_end sub_800A824
thumb_func_start task00_link_test
task00_link_test: @ 800A850
push {r4-r6,lr}
sub sp, 0x20
ldr r1, =gASCIITestPrint
mov r0, sp
bl strcpy
mov r0, sp
movs r1, 0x5
movs r2, 0x2
bl sub_800A7DC
ldr r0, =gUnknown_03003144
ldrb r0, [r0]
movs r1, 0x2
movs r2, 0x1
movs r3, 0x2
bl sub_800A6E8
ldr r4, =gUnknown_030030E0
ldr r0, [r4]
movs r1, 0xF
movs r2, 0x1
movs r3, 0x8
bl sub_800A6E8
ldr r0, =gUnknown_03003170
ldrb r0, [r0, 0x1]
movs r1, 0x2
movs r2, 0xA
movs r3, 0x2
bl sub_800A6E8
ldr r0, [r4]
movs r1, 0x1C
ands r0, r1
lsrs r0, 2
movs r1, 0xF
movs r2, 0xA
movs r3, 0x2
bl sub_800A6E8
bl GetMultiplayerId
lsls r0, 24
lsrs r0, 24
movs r1, 0xF
movs r2, 0xC
movs r3, 0x2
bl sub_800A6E8
ldr r0, =gUnknown_03003160
ldrb r0, [r0]
movs r1, 0x19
movs r2, 0x1
movs r3, 0x2
bl sub_800A6E8
ldr r0, =gUnknown_03004130
ldrb r0, [r0]
movs r1, 0x19
movs r2, 0x2
movs r3, 0x2
bl sub_800A6E8
bl GetBlockReceivedStatus
lsls r0, 24
lsrs r0, 24
movs r1, 0xF
movs r2, 0x5
movs r3, 0x2
bl sub_800A6E8
ldr r0, =gUnknown_0300302C
ldr r0, [r0]
movs r1, 0x2
movs r2, 0xC
movs r3, 0x8
bl sub_800A6E8
ldr r0, =gUnknown_03003070
ldr r0, [r0]
movs r1, 0x2
movs r2, 0xD
movs r3, 0x8
bl sub_800A6E8
bl sub_800B2E8
lsls r0, 24
lsrs r0, 24
movs r1, 0x19
movs r2, 0x5
movs r3, 0x1
bl sub_800A6E8
bl sub_800B2F8
lsls r0, 24
lsrs r0, 24
movs r1, 0x19
movs r2, 0x6
movs r3, 0x1
bl sub_800A6E8
bl sub_800B320
lsls r0, 24
lsrs r0, 24
movs r1, 0x19
movs r2, 0x7
movs r3, 0x1
bl sub_800A6E8
bl sub_800B33C
lsls r0, 24
lsrs r0, 24
movs r1, 0x19
movs r2, 0x8
movs r3, 0x1
bl sub_800A6E8
movs r6, 0
movs r5, 0x80
lsls r5, 19
ldr r4, =gUnknown_03003148
_0800A94E:
ldrh r0, [r4]
lsrs r2, r5, 24
movs r1, 0xA
movs r3, 0x4
bl sub_800A6E8
movs r0, 0x80
lsls r0, 17
adds r5, r0
adds r4, 0x2
adds r6, 0x1
cmp r6, 0x3
ble _0800A94E
add sp, 0x20
pop {r4-r6}
pop {r0}
bx r0
.pool
thumb_func_end task00_link_test
thumb_func_start sub_800A994
sub_800A994: @ 800A994
thumb_func_start SetLinkDebugValues
SetLinkDebugValues: @ 800A994
ldr r2, =gUnknown_0300302C
str r0, [r2]
ldr r0, =gUnknown_03003070
str r1, [r0]
bx lr
.pool
thumb_func_end sub_800A994
thumb_func_end SetLinkDebugValues
thumb_func_start sub_800A9A8
sub_800A9A8: @ 800A9A8
@ -281,7 +133,7 @@ sub_800AA60: @ 800AA60
ldr r0, =gUnknown_02022A74
ldr r2, =0x00002288
mov r8, r2
ldr r7, =gUnknown_020229C6
ldr r7, =gLinkType
mov r6, r12
adds r6, 0x14
adds r5, r0, 0x4
@ -393,11 +245,11 @@ _0800AB36:
cmp r0, 0
beq _0800AB6A
_0800AB5A:
ldr r1, =gUnknown_0300306C
ldr r1, =gLinkErrorOccurred
movs r0, 0x1
strb r0, [r1]
bl sub_80097E8
ldr r0, =c2_800ACD4
bl CloseLink
ldr r0, =CB2_LinkError
bl SetMainCallback2
_0800AB6A:
adds r0, r4, 0x1
@ -429,7 +281,7 @@ sub_800AB98: @ 800AB98
thumb_func_start sub_800ABAC
sub_800ABAC: @ 800ABAC
ldr r0, =gUnknown_030030E0
ldr r0, =gLinkStatus
ldr r0, [r0]
movs r1, 0x1C
ands r0, r1
@ -445,7 +297,7 @@ sub_800ABBC: @ 800ABBC
ldrb r0, [r0]
cmp r0, 0
bne _0800ABDC
ldr r0, =gUnknown_030030E0
ldr r0, =gLinkStatus
ldr r0, [r0]
lsrs r0, 5
movs r1, 0x1
@ -482,7 +334,7 @@ sub_800ABF4: @ 800ABF4
b _0800AC20
.pool
_0800AC0C:
ldr r2, =gUnknown_03003140
ldr r2, =gLinkCallback
ldr r1, [r2]
cmp r1, 0
bne _0800AC20
@ -509,7 +361,7 @@ sub_800AC34: @ 800AC34
b _0800AC70
.pool
_0800AC48:
ldr r2, =gUnknown_03003140
ldr r2, =gLinkCallback
ldr r1, [r2]
cmp r1, 0
beq _0800AC64
@ -540,8 +392,8 @@ sub_800AC80: @ 800AC80
cmp r0, 0
bne _0800AC96
ldr r0, =0x00005fff
bl sub_8009D90
ldr r1, =gUnknown_03003140
bl BuildSendCmd
ldr r1, =gLinkCallback
ldr r0, =sub_800ACAC
str r0, [r1]
_0800AC96:
@ -580,11 +432,11 @@ _0800ACD0:
negs r1, r1
ands r0, r1
str r0, [r2]
ldr r0, =gUnknown_03002748
ldr r0, =gLinkVSyncDisabled
movs r4, 0x1
strb r4, [r0]
bl sub_80097E8
ldr r1, =gUnknown_03003140
bl CloseLink
ldr r1, =gLinkCallback
movs r0, 0
str r0, [r1]
ldr r0, =gUnknown_030030E4
@ -607,7 +459,7 @@ sub_800AD10: @ 800AD10
b _0800AD4C
.pool
_0800AD24:
ldr r2, =gUnknown_03003140
ldr r2, =gLinkCallback
ldr r1, [r2]
cmp r1, 0
beq _0800AD40
@ -638,8 +490,8 @@ sub_800AD5C: @ 800AD5C
cmp r0, 0
bne _0800AD72
ldr r0, =0x00005fff
bl sub_8009D90
ldr r1, =gUnknown_03003140
bl BuildSendCmd
ldr r1, =gLinkCallback
ldr r0, =sub_800AD88
str r0, [r1]
_0800AD72:
@ -684,11 +536,11 @@ _0800ADB6:
negs r1, r1
ands r0, r1
str r0, [r2]
ldr r0, =gUnknown_03002748
ldr r0, =gLinkVSyncDisabled
movs r4, 0x1
strb r4, [r0]
bl sub_80097E8
ldr r1, =gUnknown_03003140
bl CloseLink
ldr r1, =gLinkCallback
movs r0, 0
str r0, [r1]
ldr r0, =gUnknown_030030E4
@ -711,7 +563,7 @@ sub_800ADF8: @ 800ADF8
b _0800AE1E
.pool
_0800AE0C:
ldr r1, =gUnknown_03003140
ldr r1, =gLinkCallback
ldr r0, [r1]
cmp r0, 0
bne _0800AE18
@ -735,8 +587,8 @@ sub_800AE30: @ 800AE30
cmp r0, 0
bne _0800AE46
ldr r0, =0x00002ffe
bl sub_8009D90
ldr r1, =gUnknown_03003140
bl BuildSendCmd
ldr r1, =gLinkCallback
ldr r0, =sub_800AE5C
str r0, [r1]
_0800AE46:
@ -772,7 +624,7 @@ _0800AE86:
cmp r1, r2
bne _0800AEA4
movs r1, 0
ldr r4, =gUnknown_03003140
ldr r4, =gLinkCallback
ldr r3, =gUnknown_030030EC
movs r2, 0
_0800AE92:
@ -795,18 +647,18 @@ _0800AEA4:
thumb_func_start sub_800AEB4
sub_800AEB4: @ 800AEB4
push {lr}
ldr r0, =gUnknown_020229C4
ldr r0, =gLinkOpen
ldrb r0, [r0]
cmp r0, 0
beq _0800AEF4
ldr r0, =gUnknown_030030E0
ldr r0, =gLinkStatus
ldr r2, [r0]
movs r0, 0xFE
lsls r0, 11
ands r0, r2
cmp r0, 0
beq _0800AEF4
ldr r0, =gUnknown_030030F8
ldr r0, =gSuppressLinkErrorMessage
ldrb r0, [r0]
cmp r0, 0
bne _0800AEEA
@ -818,13 +670,13 @@ sub_800AEB4: @ 800AEB4
ldr r0, =gUnknown_03003160
ldrb r0, [r0]
strb r0, [r1, 0x5]
ldr r0, =c2_800ACD4
ldr r0, =CB2_LinkError
bl SetMainCallback2
_0800AEEA:
ldr r1, =gUnknown_0300306C
ldr r1, =gLinkErrorOccurred
movs r0, 0x1
strb r0, [r1]
bl sub_80097E8
bl CloseLink
_0800AEF4:
pop {r0}
bx r0
@ -845,8 +697,8 @@ sub_800AF18: @ 800AF18
.pool
thumb_func_end sub_800AF18
thumb_func_start c2_800ACD4
c2_800ACD4: @ 800AF30
thumb_func_start CB2_LinkError
CB2_LinkError: @ 800AF30
push {r4,lr}
movs r0, 0
movs r1, 0
@ -935,7 +787,7 @@ _0800AF8C:
ldr r1, =gSoftResetDisabled
movs r0, 0
strb r0, [r1]
ldr r0, =sub_8009404
ldr r0, =Task_DestroySelf
movs r1, 0
bl CreateTask
bl StopMapMusic
@ -953,7 +805,7 @@ _0800B03C:
pop {r0}
bx r0
.pool
thumb_func_end c2_800ACD4
thumb_func_end CB2_LinkError
thumb_func_start sub_800B080
sub_800B080: @ 800B080
@ -1251,7 +1103,7 @@ _0800B314:
thumb_func_start sub_800B320
sub_800B320: @ 800B320
ldr r0, =gUnknown_030030E0
ldr r0, =gLinkStatus
ldr r0, [r0]
lsrs r0, 6
movs r1, 0x1
@ -1260,17 +1112,17 @@ sub_800B320: @ 800B320
.pool
thumb_func_end sub_800B320
thumb_func_start sub_800B330
sub_800B330: @ 800B330
ldr r1, =gUnknown_030030F8
thumb_func_start SetSuppressLinkErrorMessage
SetSuppressLinkErrorMessage: @ 800B330
ldr r1, =gSuppressLinkErrorMessage
strb r0, [r1]
bx lr
.pool
thumb_func_end sub_800B330
thumb_func_end SetSuppressLinkErrorMessage
thumb_func_start sub_800B33C
sub_800B33C: @ 800B33C
ldr r0, =gUnknown_0300306C
ldr r0, =gLinkErrorOccurred
ldrb r0, [r0]
bx lr
.pool
@ -1279,11 +1131,11 @@ sub_800B33C: @ 800B33C
thumb_func_start sub_800B348
sub_800B348: @ 800B348
push {r4-r6,lr}
bl sub_8009638
ldr r1, =gUnknown_03003030
bl InitLocalLinkPlayer
ldr r1, =gLocalLinkPlayerBlock
adds r2, r1, 0
adds r2, 0x10
ldr r0, =gUnknown_020229CC
ldr r0, =gLocalLinkPlayer
ldm r0!, {r3-r5}
stm r2!, {r3-r5}
ldm r0!, {r3,r4,r6}
@ -1307,7 +1159,7 @@ sub_800B348: @ 800B348
strh r2, [r0]
ldrb r2, [r3, 0x2]
strb r2, [r0, 0x2]
ldr r0, =gUnknown_020228C4
ldr r0, =gBlockSendBuffer
movs r2, 0x3C
bl memcpy
pop {r4-r6}
@ -1353,7 +1205,7 @@ sub_800B3A4: @ 800B3A4
cmp r0, 0
beq _0800B3F4
_0800B3EE:
ldr r0, =c2_800ACD4
ldr r0, =CB2_LinkError
bl SetMainCallback2
_0800B3F4:
pop {r4-r6}
@ -1369,14 +1221,14 @@ HandleLinkConnection: @ 800B40C
ldrb r0, [r0]
cmp r0, 0
bne _0800B45C
ldr r0, =gUnknown_03003144
ldr r1, =gUnknown_03003110
ldr r2, =gUnknown_03003090
ldr r0, =gShouldAdvanceLinkState
ldr r1, =gSendCmd
ldr r2, =gRecvCmds
bl sub_800B638
ldr r4, =gUnknown_030030E0
ldr r4, =gLinkStatus
str r0, [r4]
ldr r0, =gMain+0x2c
bl sub_80099E0
bl LinkMain2
ldr r0, [r4]
movs r1, 0x80
lsls r1, 1
@ -1466,7 +1318,7 @@ sub_800B4DC: @ 800B4DC
ldrb r0, [r0]
cmp r0, 0
bne _0800B4FC
ldr r0, =gUnknown_03003170
ldr r0, =gLink
ldr r1, =0x00000fbd
adds r0, r1
ldrb r0, [r0]
@ -1516,8 +1368,8 @@ sub_800B524: @ 800B524
bx r0
thumb_func_end sub_800B524
thumb_func_start sub_800B53C
sub_800B53C: @ 800B53C
thumb_func_start DisableSerial
DisableSerial: @ 800B53C
push {lr}
sub sp, 0x4
movs r0, 0xC0
@ -1541,7 +1393,7 @@ sub_800B53C: @ 800B53C
str r0, [r2]
str r1, [r2, 0x4]
str r0, [sp]
ldr r1, =gUnknown_03003170
ldr r1, =gLink
ldr r2, =0x050003f0
mov r0, sp
bl CpuSet
@ -1549,10 +1401,10 @@ sub_800B53C: @ 800B53C
pop {r0}
bx r0
.pool
thumb_func_end sub_800B53C
thumb_func_end DisableSerial
thumb_func_start sub_800B594
sub_800B594: @ 800B594
thumb_func_start EnableSerial
EnableSerial: @ 800B594
push {r4,r5,lr}
sub sp, 0x4
movs r0, 0xC0
@ -1576,7 +1428,7 @@ sub_800B594: @ 800B594
strh r4, [r0]
movs r5, 0
str r5, [sp]
ldr r1, =gUnknown_03003170
ldr r1, =gLink
ldr r2, =0x050003f0
mov r0, sp
bl CpuSet
@ -1599,16 +1451,16 @@ sub_800B594: @ 800B594
pop {r0}
bx r0
.pool
thumb_func_end sub_800B594
thumb_func_end EnableSerial
thumb_func_start sub_800B628
sub_800B628: @ 800B628
thumb_func_start ResetSerial
ResetSerial: @ 800B628
push {lr}
bl sub_800B594
bl sub_800B53C
bl EnableSerial
bl DisableSerial
pop {r0}
bx r0
thumb_func_end sub_800B628
thumb_func_end ResetSerial
thumb_func_start sub_800B638
sub_800B638: @ 800B638
@ -1616,7 +1468,7 @@ sub_800B638: @ 800B638
adds r4, r0, 0
adds r5, r1, 0
adds r6, r2, 0
ldr r0, =gUnknown_03003170
ldr r0, =gLink
ldrb r0, [r0, 0x1]
cmp r0, 0x4
bhi _0800B6EA
@ -1634,8 +1486,8 @@ _0800B65C:
.4byte _0800B6D4
.4byte _0800B6DE
_0800B670:
bl sub_800B53C
ldr r1, =gUnknown_03003170
bl DisableSerial
ldr r1, =gLink
movs r0, 0x1
strb r0, [r1, 0x1]
b _0800B6EA
@ -1644,8 +1496,8 @@ _0800B680:
ldrb r0, [r4]
cmp r0, 0x1
bne _0800B6EA
bl sub_800B594
ldr r1, =gUnknown_03003170
bl EnableSerial
ldr r1, =gLink
movs r0, 0x2
strb r0, [r1, 0x1]
b _0800B6EA
@ -1659,7 +1511,7 @@ _0800B698:
bl sub_800B764
b _0800B6EA
_0800B6A8:
ldr r2, =gUnknown_03003170
ldr r2, =gLink
ldrb r0, [r2]
cmp r0, 0x8
bne _0800B6EA
@ -1670,7 +1522,7 @@ _0800B6A8:
b _0800B6EA
.pool
_0800B6C0:
ldr r0, =gUnknown_03003170
ldr r0, =gLink
movs r1, 0
strb r1, [r0, 0x1]
ldr r0, =0x0400012a
@ -1679,7 +1531,7 @@ _0800B6C0:
.pool
_0800B6D4:
bl sub_800B790
ldr r1, =gUnknown_03003170
ldr r1, =gLink
movs r0, 0x4
strb r0, [r1, 0x1]
_0800B6DE:
@ -1690,7 +1542,7 @@ _0800B6DE:
_0800B6EA:
movs r0, 0
strb r0, [r4]
ldr r1, =gUnknown_03003170
ldr r1, =gLink
ldrb r2, [r1, 0x2]
ldrb r0, [r1, 0x3]
lsls r0, 2
@ -1762,7 +1614,7 @@ sub_800B764: @ 800B764
ldr r1, [r0]
movs r0, 0xC
ands r1, r0
ldr r2, =gUnknown_03003170
ldr r2, =gLink
cmp r1, 0x8
bne _0800B788
ldrb r0, [r2, 0x2]
@ -1782,7 +1634,7 @@ _0800B78C:
thumb_func_start sub_800B790
sub_800B790: @ 800B790
push {lr}
ldr r0, =gUnknown_03003170
ldr r0, =gLink
ldrb r0, [r0]
cmp r0, 0
beq _0800B7AE
@ -1815,7 +1667,7 @@ sub_800B7C0: @ 800B7C0
strh r0, [r2]
movs r0, 0
strh r0, [r1]
ldr r1, =gUnknown_03003170
ldr r1, =gLink
ldr r4, =0x00000339
adds r0, r1, r4
ldrb r4, [r0]
@ -1920,7 +1772,7 @@ sub_800B8A8: @ 800B8A8
strh r0, [r2]
movs r0, 0
strh r0, [r1]
ldr r1, =gUnknown_03003170
ldr r1, =gLink
ldr r3, =0x00000fbd
adds r0, r1, r3
ldrb r0, [r0]
@ -2042,7 +1894,7 @@ _0800B990:
thumb_func_start sub_800B9B8
sub_800B9B8: @ 800B9B8
push {r4,lr}
ldr r3, =gUnknown_03003170
ldr r3, =gLink
ldrb r4, [r3]
cmp r4, 0
beq _0800B9F4
@ -2114,7 +1966,7 @@ Timer3Intr: @ 800BA28
thumb_func_start sub_800BA38
sub_800BA38: @ 800BA38
push {r4,lr}
ldr r4, =gUnknown_03003170
ldr r4, =gLink
ldr r0, =0x04000128
ldr r1, [r0]
lsls r0, r1, 26
@ -2150,7 +2002,7 @@ _0800BA86:
movs r0, 0x4
strb r0, [r4, 0x1]
_0800BA8A:
ldr r3, =gUnknown_03003170
ldr r3, =gLink
ldrb r0, [r3, 0xD]
adds r0, 0x1
movs r2, 0
@ -2192,7 +2044,7 @@ sub_800BAD0: @ 800BAD0
push {r6,r7}
movs r5, 0
ldr r6, =0x0000ffff
ldr r0, =gUnknown_03003170
ldr r0, =gLink
ldrb r1, [r0, 0xE]
adds r7, r0, 0
cmp r1, 0x1
@ -2207,7 +2059,7 @@ _0800BAFC:
_0800BB00:
adds r0, r2, 0
strh r0, [r1]
ldr r2, =gUnknown_03003170+0x4
ldr r2, =gLink+0x4
ldr r3, =0x04000120
ldr r0, [r3]
ldr r1, [r3, 0x4]
@ -2313,7 +2165,7 @@ sub_800BBCC: @ 800BBCC
ldr r0, [r0]
str r0, [sp]
str r1, [sp, 0x4]
ldr r0, =gUnknown_03003170
ldr r0, =gLink
ldrb r1, [r0, 0x16]
adds r6, r0, 0
cmp r1, 0
@ -2447,7 +2299,7 @@ _0800BCD0:
thumb_func_start sub_800BCE4
sub_800BCE4: @ 800BCE4
push {r4,lr}
ldr r0, =gUnknown_03003170
ldr r0, =gLink
ldrb r1, [r0, 0x16]
adds r4, r0, 0
cmp r1, 0x8
@ -2533,7 +2385,7 @@ _0800BD8C:
thumb_func_start sub_800BD98
sub_800BD98: @ 800BD98
push {lr}
ldr r0, =gUnknown_03003170
ldr r0, =gLink
ldrb r0, [r0]
cmp r0, 0
beq _0800BDB4
@ -2555,7 +2407,7 @@ _0800BDB4:
thumb_func_start sub_800BDCC
sub_800BDCC: @ 800BDCC
push {lr}
ldr r1, =gUnknown_03003170
ldr r1, =gLink
ldrb r0, [r1, 0x17]
cmp r0, 0x8
bne _0800BDE4
@ -2582,7 +2434,7 @@ _0800BDF4:
thumb_func_start sub_800BDFC
sub_800BDFC: @ 800BDFC
push {r4-r6,lr}
ldr r1, =gUnknown_03003170
ldr r1, =gLink
ldr r2, =0x00000339
adds r0, r1, r2
movs r2, 0
@ -2624,7 +2476,7 @@ _0800BE22:
thumb_func_start sub_800BE50
sub_800BE50: @ 800BE50
push {r4-r7,lr}
ldr r1, =gUnknown_03003170
ldr r1, =gLink
ldr r2, =0x00000fbd
adds r0, r1, r2
movs r2, 0

View File

@ -5084,13 +5084,13 @@ _0800E64A:
adds r0, r4, 0
bl sub_800D724
strh r5, [r7]
ldr r1, =gUnknown_03003110
ldr r1, =gSendCmd
ldr r2, =0x01000008
adds r0, r7, 0
bl CpuSet
mov r0, r8
strh r5, [r0]
ldr r1, =gUnknown_03003090
ldr r1, =gRecvCmds
ldr r2, =0x01000028
bl CpuSet
mov r0, r9
@ -5143,7 +5143,7 @@ sub_800E700: @ 800E700
lsrs r1, r0, 16
cmp r1, 0
bne _0800E732
ldr r0, =gUnknown_020229C6
ldr r0, =gLinkType
strh r1, [r0]
bl sub_800AAF4
movs r0, 0
@ -6115,7 +6115,7 @@ sub_800EFB0: @ 800EFB0
push {r4-r7,lr}
sub sp, 0x4
movs r2, 0
ldr r7, =gUnknown_03003090
ldr r7, =gRecvCmds
ldr r0, =gUnknown_03005000
adds r6, r7, 0
ldr r1, =0x00000c87
@ -6160,8 +6160,8 @@ _0800EFD0:
thumb_func_start sub_800F014
sub_800F014: @ 800F014
push {lr}
ldr r3, =gUnknown_03003110
ldr r2, =gUnknown_03003090
ldr r3, =gSendCmd
ldr r2, =gRecvCmds
movs r1, 0x6
_0800F01C:
ldrh r0, [r3]
@ -6171,7 +6171,7 @@ _0800F01C:
subs r1, 0x1
cmp r1, 0
bge _0800F01C
ldr r1, =gUnknown_03003110
ldr r1, =gSendCmd
movs r2, 0
adds r0, r1, 0
adds r0, 0xC
@ -6250,7 +6250,7 @@ _0800F0C4:
.pool
_0800F0CC:
movs r3, 0
ldr r4, =gUnknown_03003090
ldr r4, =gRecvCmds
_0800F0D0:
movs r2, 0
lsls r0, r3, 4
@ -6518,7 +6518,7 @@ _0800F2E0:
str r2, [sp, 0x4]
adds r5, 0x1
str r5, [sp]
ldr r1, =gUnknown_03003090
ldr r1, =gRecvCmds
mov r9, r1
adds r5, r3, 0
adds r7, r4, 0
@ -6745,7 +6745,7 @@ sub_800F4F0: @ 800F4F0
mov r1, sp
bl sub_800D934
movs r1, 0
ldr r0, =gUnknown_03003090
ldr r0, =gRecvCmds
mov r12, r0
_0800F506:
movs r4, 0
@ -6849,7 +6849,7 @@ _0800F5C0:
ldrb r1, [r2]
strb r0, [r2]
bl sub_8010528
ldr r5, =gUnknown_03003110
ldr r5, =gSendCmd
add r4, sp, 0x48
adds r0, r5, 0
adds r1, r4, 0
@ -7069,7 +7069,7 @@ rfu_func_080F97B8: @ 800F794
ldrh r2, [r3]
cmp r2, 0
beq _0800F7C6
ldr r0, =gUnknown_030022B4
ldr r0, =gLinkTransferringData
ldrb r0, [r0]
cmp r0, 0x1
beq _0800F7C6
@ -7143,7 +7143,7 @@ sub_800F820: @ 800F820
cmp r0, 0
bne _0800F83C
bl sub_8082D18
ldr r1, =gUnknown_03003110
ldr r1, =gSendCmd
strh r0, [r1, 0xC]
_0800F83C:
ldr r1, =gUnknown_020223C0
@ -7182,7 +7182,7 @@ sub_800F86C: @ 800F86C
_0800F87A:
mov r1, r8
lsls r0, r1, 4
ldr r2, =gUnknown_03003090
ldr r2, =gRecvCmds
adds r1, r0, r2
ldrh r7, [r1]
movs r3, 0xFF
@ -7282,12 +7282,12 @@ _0800F920:
beq _0800F930
b _0800FC08
_0800F930:
ldr r1, =gUnknown_03003090+0x2
ldr r1, =gRecvCmds+0x2
adds r0, r5, r1
ldrh r0, [r0]
ldr r2, =gUnknown_03005000
strb r0, [r2, 0xD]
ldr r3, =gUnknown_03003090+0x4
ldr r3, =gRecvCmds+0x4
adds r0, r5, r3
bl sub_800F74C
ldr r4, =gUnknown_03005CCE
@ -7317,13 +7317,13 @@ _0800F982:
adds r0, 0x80
movs r2, 0
strh r4, [r0]
ldr r1, =gUnknown_03003090+0x2
ldr r1, =gRecvCmds+0x2
adds r0, r5, r1
ldrh r0, [r0]
adds r1, r3, 0
adds r1, 0x82
strh r0, [r1]
ldr r1, =gUnknown_03003090+0x4
ldr r1, =gRecvCmds+0x4
adds r0, r5, r1
ldrh r1, [r0]
adds r0, r3, 0
@ -7392,7 +7392,7 @@ _0800FA0E:
adds r2, r4, 0x1
lsls r0, r2, 1
adds r0, r3
ldr r4, =gUnknown_03003090
ldr r4, =gRecvCmds
adds r0, r4
ldrh r0, [r0]
strh r0, [r1]
@ -7453,7 +7453,7 @@ _0800FA90:
.pool
_0800FAAC:
ldr r2, =gUnknown_082ED6B8
ldr r3, =gUnknown_03003090+0x2
ldr r3, =gRecvCmds+0x2
adds r0, r5, r3
ldrh r1, [r0]
lsls r1, 3
@ -7477,7 +7477,7 @@ _0800FAE0:
movs r4, 0x80
lsls r4, 1
adds r0, r2, r4
ldr r3, =gUnknown_03003090+0x2
ldr r3, =gRecvCmds+0x2
adds r1, r5, r3
ldrh r0, [r0]
mov r6, r8
@ -7505,7 +7505,7 @@ _0800FB10:
adds r6, 0x1
cmp r0, 0
beq _0800FC08
ldr r0, =gUnknown_03003090+0x2
ldr r0, =gRecvCmds+0x2
adds r4, r5, r0
ldrh r1, [r4]
ldr r0, =gUnknown_03007890
@ -7516,14 +7516,14 @@ _0800FB10:
beq _0800FB48
strb r2, [r3]
bl sub_800D630
ldr r1, =gUnknown_03003090+0x4
ldr r1, =gRecvCmds+0x4
adds r0, r5, r1
ldrh r1, [r0]
ldr r2, =0x00000ce4
adds r0, r7, r2
strb r1, [r0]
_0800FB48:
ldr r0, =gUnknown_03003090
ldr r0, =gRecvCmds
adds r0, 0x6
adds r0, r5, r0
ldrh r0, [r0]
@ -7536,16 +7536,16 @@ _0800FB78:
movs r0, 0xEE
lsls r0, 8
bl sub_800FD14
ldr r1, =gUnknown_03003110
ldr r3, =gUnknown_03003090+0x2
ldr r1, =gSendCmd
ldr r3, =gRecvCmds+0x2
adds r0, r5, r3
ldrh r0, [r0]
strh r0, [r1, 0x2]
ldr r4, =gUnknown_03003090+0x4
ldr r4, =gRecvCmds+0x4
adds r0, r5, r4
ldrh r0, [r0]
strh r0, [r1, 0x4]
ldr r0, =gUnknown_03003090
ldr r0, =gRecvCmds
adds r0, 0x6
adds r0, r5, r0
ldrh r0, [r0]
@ -7561,13 +7561,13 @@ _0800FBB0:
bne _0800FC44
ldr r0, =0x00000ce3
adds r2, r4, r0
ldr r1, =gUnknown_03003090+0x2
ldr r1, =gRecvCmds+0x2
adds r3, r5, r1
ldrb r1, [r3]
ldrb r0, [r2]
orrs r0, r1
strb r0, [r2]
ldr r2, =gUnknown_03003090+0x4
ldr r2, =gRecvCmds+0x4
adds r0, r5, r2
ldrh r1, [r0]
ldr r2, =0x00000ce4
@ -7582,7 +7582,7 @@ _0800FBF4:
mov r3, r8
lsls r1, r3, 1
adds r1, r0
ldr r4, =gUnknown_03003090+0x2
ldr r4, =gRecvCmds+0x2
adds r0, r5, r4
ldrh r0, [r0]
strh r0, [r1]
@ -7747,7 +7747,7 @@ sub_800FD14: @ 800FD14
push {r4,r5,lr}
lsls r0, 16
lsrs r1, r0, 16
ldr r5, =gUnknown_03003110
ldr r5, =gSendCmd
strh r1, [r5]
movs r0, 0xF0
lsls r0, 7
@ -7900,7 +7900,7 @@ _0800FE46:
sub_800FE50: @ 800FE50
push {r4,lr}
adds r4, r0, 0
ldr r0, =gUnknown_03003110
ldr r0, =gSendCmd
ldrh r0, [r0]
cmp r0, 0
bne _0800FE76
@ -7934,7 +7934,7 @@ sub_800FE84: @ 800FE84
ldr r0, [r5]
cmp r0, 0
bne _0800FEB8
ldr r0, =gUnknown_03003110
ldr r0, =gSendCmd
ldrh r0, [r0]
cmp r0, 0
bne _0800FEB8
@ -7986,7 +7986,7 @@ _0800FEC8:
str r7, [r5, 0x70]
b _0800FF1C
_0800FF0A:
ldr r4, =gUnknown_020228C4
ldr r4, =gBlockSendBuffer
cmp r7, r4
beq _0800FF1A
adds r0, r4, 0
@ -8019,7 +8019,7 @@ _0800FF32:
thumb_func_start rfufunc_80F9F44
rfufunc_80F9F44: @ 800FF4C
push {r4,r5,lr}
ldr r0, =gUnknown_03003110
ldr r0, =gSendCmd
ldrh r0, [r0]
cmp r0, 0
bne _0800FFA0
@ -8044,7 +8044,7 @@ rfufunc_80F9F44: @ 800FF4C
.pool
_0800FF84:
bl GetMultiplayerId
ldr r1, =gUnknown_03003090
ldr r1, =gRecvCmds
lsls r0, 24
lsrs r0, 20
adds r0, r1
@ -8070,7 +8070,7 @@ sub_800FFB0: @ 800FFB0
ldr r0, =gUnknown_03005000
mov r12, r0
ldr r5, [r0, 0x70]
ldr r3, =gUnknown_03003110
ldr r3, =gSendCmd
mov r2, r12
adds r2, 0x6C
ldrh r1, [r2]
@ -8139,7 +8139,7 @@ rfufunc_80FA020: @ 8010028
ldrb r0, [r5, 0xC]
cmp r0, 0
bne _080100F0
ldr r3, =gUnknown_03003110
ldr r3, =gSendCmd
adds r2, r5, 0
adds r2, 0x6E
ldrh r0, [r2]
@ -8150,7 +8150,7 @@ rfufunc_80FA020: @ 8010028
strh r0, [r3]
movs r4, 0
mov r9, r5
ldr r0, =gUnknown_03003090
ldr r0, =gRecvCmds
mov r12, r0
lsls r5, r6, 4
adds r7, r2, 0
@ -8376,7 +8376,7 @@ _08010220:
thumb_func_start sub_801022C
sub_801022C: @ 801022C
push {r4,lr}
ldr r0, =gUnknown_03003110
ldr r0, =gSendCmd
ldrh r0, [r0]
cmp r0, 0
bne _0801024E
@ -8531,7 +8531,7 @@ sub_8010358: @ 8010358
ldrb r0, [r0]
cmp r0, 0
bne _0801037A
ldr r0, =gUnknown_03003110
ldr r0, =gSendCmd
ldrh r0, [r0]
cmp r0, 0
bne _0801037A
@ -8560,7 +8560,7 @@ sub_8010390: @ 8010390
ldrb r0, [r0]
cmp r0, 0
bne _0801041E
ldr r0, =gUnknown_03003110
ldr r0, =gSendCmd
ldrh r0, [r0]
cmp r0, 0
bne _0801041E
@ -8603,7 +8603,7 @@ _080103FA:
ldrb r0, [r0]
cmp r0, 0
bne _0801041E
ldr r0, =gUnknown_03003110
ldr r0, =gSendCmd
ldrh r0, [r0]
cmp r0, 0
bne _0801041E
@ -9241,7 +9241,7 @@ _080108F0:
b _080109D2
.pool
_08010904:
ldr r0, =gUnknown_03003110
ldr r0, =gSendCmd
ldrh r0, [r0]
cmp r0, 0
bne _080109D2
@ -9513,7 +9513,7 @@ _08010B28:
.4byte _08010C0A
.4byte _08010C94
_08010B40:
ldr r0, =gUnknown_03003110
ldr r0, =gSendCmd
ldrh r0, [r0]
cmp r0, 0
beq _08010B4A
@ -9527,7 +9527,7 @@ _08010B4A:
b _08010C4A
.pool
_08010B60:
ldr r0, =gUnknown_03003110
ldr r0, =gSendCmd
ldrh r0, [r0]
cmp r0, 0
beq _08010B6A
@ -9571,7 +9571,7 @@ _08010B8C:
b _08010C4A
.pool
_08010BC0:
ldr r5, =gUnknown_020228C4
ldr r5, =gBlockSendBuffer
adds r1, r5, 0
ldr r0, =gUnknown_082ED7EC
ldm r0!, {r2-r4}
@ -9609,7 +9609,7 @@ _08010BE2:
adds r0, 0x1
strh r0, [r1, 0x8]
_08010C0A:
ldr r5, =gUnknown_020228C4
ldr r5, =gBlockSendBuffer
ldr r1, =gUnknown_03005000
ldrb r0, [r1, 0xD]
strb r0, [r5, 0xF]
@ -9633,7 +9633,7 @@ _08010C20:
mov r1, r12
movs r2, 0x8C
bl memcpy
ldr r1, =gUnknown_020228C4
ldr r1, =gBlockSendBuffer
movs r0, 0
movs r2, 0xA0
bl SendBlock
@ -9758,7 +9758,7 @@ _08010D56:
cmp r0, 0
beq _08010DA6
bl sub_800B348
ldr r1, =gUnknown_020228C4
ldr r1, =gBlockSendBuffer
movs r0, 0
movs r2, 0x3C
bl SendBlock
@ -9824,7 +9824,7 @@ _08010DDE:
movs r0, 0x2
strb r0, [r1]
_08010DE4:
ldr r4, =c2_800ACD4
ldr r4, =CB2_LinkError
adds r0, r4, 0
bl SetMainCallback2
ldr r0, =gMain
@ -9862,7 +9862,7 @@ _08010E20:
ldrb r1, [r0]
movs r1, 0x2
strb r1, [r0]
bl sub_80097E8
bl CloseLink
b _08010E8E
.pool
_08010E5C:
@ -11412,7 +11412,7 @@ sub_8011AC8: @ 8011AC8
sub sp, 0x4
movs r0, 0
str r0, [sp]
ldr r1, =gUnknown_03003090
ldr r1, =gRecvCmds
ldr r2, =0x05000014
mov r0, sp
bl CpuSet
@ -11445,12 +11445,12 @@ sub_8011AFC: @ 8011AFC
lsls r0, 24
cmp r0, 0
beq _08011B70
ldr r1, =gUnknown_020229C6
ldr r1, =gLinkType
ldr r2, =0x00001111
adds r0, r2, 0
strh r0, [r1]
bl sub_800B488
bl sub_8009734
bl OpenLink
ldr r0, =gMain
ldrh r0, [r0, 0x24]
bl SeedRng

View File

@ -84,7 +84,7 @@ _081789AC:
movs r0, 0x50
movs r1, 0
bl SetGpuReg
ldr r0, =sub_8009404
ldr r0, =Task_DestroySelf
movs r1, 0
bl CreateTask
bl StopMapMusic
@ -232,15 +232,15 @@ _08178B56:
ldrb r0, [r1]
adds r0, 0x1
strb r0, [r1]
ldr r1, =gUnknown_020229C6
ldr r1, =gLinkType
ldr r2, =0x00005501
adds r0, r2, 0
strh r0, [r1]
bl sub_8009734
bl OpenLink
b _08178E58
.pool
_08178B80:
ldr r0, =gUnknown_030030E0
ldr r0, =gLinkStatus
ldr r1, [r0]
movs r0, 0x20
ands r0, r1
@ -327,7 +327,7 @@ _08178C38:
_08178C42:
movs r0, 0x5
bl PlaySE
bl sub_80097E8
bl CloseLink
movs r0, 0x87
lsls r0, 3
adds r1, r4, r0
@ -345,7 +345,7 @@ _08178C54:
_08178C68:
movs r0, 0x2
movs r1, 0x2
bl sub_800A0C8
bl GetLinkPlayerDataExchangeStatusTimed
lsls r0, 24
lsrs r0, 24
cmp r0, 0x3
@ -383,7 +383,7 @@ _08178CAC:
b _08178E34
.pool
_08178CCC:
bl sub_80097E8
bl CloseLink
_08178CD0:
ldr r4, =gStringVar4
adds r0, r4, 0
@ -416,7 +416,7 @@ _08178D00:
_08178D0E:
movs r0, 0x5
bl PlaySE
bl sub_80097E8
bl CloseLink
movs r2, 0x87
lsls r2, 3
adds r1, r4, r2
@ -560,7 +560,7 @@ _08178E48:
bne _08178E58
bl DoSoftReset
_08178E58:
ldr r0, =gUnknown_030030E0
ldr r0, =gLinkStatus
ldr r0, [r0]
movs r1, 0x40
ands r0, r1
@ -570,7 +570,7 @@ _08178E58:
lsls r0, 24
cmp r0, 0
bne _08178E98
bl sub_80097E8
bl CloseLink
ldr r4, =gStringVar4
adds r0, r4, 0
movs r1, 0x1

View File

@ -25789,7 +25789,7 @@ sub_81D3B54: @ 81D3B54
adds r5, r1, 0
bl sub_81D41A0
movs r7, 0x2
ldr r4, =gUnknown_03003144
ldr r4, =gShouldAdvanceLinkState
_081D3B64:
bl sub_81D4170
ldr r0, =gUnknown_030012E2
@ -25857,7 +25857,7 @@ sub_81D3BE8: @ 81D3BE8
adds r5, r0, 0
bl sub_81D41A0
movs r6, 0x2
ldr r4, =gUnknown_03003144
ldr r4, =gShouldAdvanceLinkState
_081D3BF6:
bl sub_81D4170
ldr r0, =gUnknown_030012E2
@ -26006,7 +26006,7 @@ sub_81D3D34: @ 81D3D34
movs r1, 0x8
orrs r0, r1
strh r0, [r2]
ldr r0, =gUnknown_03003144
ldr r0, =gShouldAdvanceLinkState
strb r3, [r0]
ldr r0, =gUnknown_030012E6
strh r3, [r0]
@ -26062,7 +26062,7 @@ _081D3DC8:
beq _081D3DD8
bl sub_81D413C
_081D3DD8:
ldr r0, =gUnknown_03003144
ldr r0, =gShouldAdvanceLinkState
ldrb r0, [r0]
cmp r0, 0x2
beq _081D3DE2
@ -26080,7 +26080,7 @@ _081D3DE8:
movs r0, 0x3
strb r0, [r1, 0x1]
_081D3DFC:
ldr r0, =gUnknown_03003144
ldr r0, =gShouldAdvanceLinkState
ldrb r0, [r0]
cmp r0, 0x2
bne _081D3E18
@ -28050,7 +28050,7 @@ _081D4E12:
beq _081D4E1C
movs r5, 0x3
_081D4E1C:
ldr r1, =gUnknown_03003144
ldr r1, =gShouldAdvanceLinkState
movs r0, 0
strb r0, [r1]
adds r0, r5, 0
@ -28068,13 +28068,13 @@ sub_81D4E30: @ 81D4E30
lsls r2, 6
movs r1, 0
bl memset
ldr r1, =gUnknown_020229C6
ldr r1, =gLinkType
ldr r2, =0x00005503
adds r0, r2, 0
strh r0, [r1]
bl sub_8009734
bl OpenLink
movs r0, 0x1
bl sub_800B330
bl SetSuppressLinkErrorMessage
pop {r0}
bx r0
.pool
@ -28090,7 +28090,7 @@ sub_81D4E60: @ 81D4E60
strh r0, [r1]
movs r0, 0
strh r0, [r2]
ldr r0, =gUnknown_03003170+0x4
ldr r0, =gLink+0x4
ldr r1, [r0, 0x4]
ldr r0, [r0]
str r0, [sp, 0x4]
@ -28256,7 +28256,7 @@ _081D4FB6:
ldrb r0, [r0]
cmp r0, 0
beq _081D4FE6
bl sub_800A23C
bl IsLinkPlayerDataExchangeComplete
lsls r0, 24
cmp r0, 0
beq _081D4FE0
@ -28447,7 +28447,7 @@ _081D515C:
beq _081D5166
b _081D52FC
_081D5166:
bl sub_80097E8
bl CloseLink
b _081D525C
_081D516C:
adds r0, r4, 0
@ -28500,7 +28500,7 @@ _081D51D0:
beq _081D51F4
movs r0, 0x5
bl PlaySE
bl sub_80097E8
bl CloseLink
adds r0, r4, 0
bl sub_81D505C
b _081D535A
@ -28513,7 +28513,7 @@ _081D51F4:
bls _081D5210
adds r0, r4, 0
bl sub_81D505C
bl sub_80097E8
bl CloseLink
movs r0, 0x7
strb r0, [r4, 0x8]
b _081D548A
@ -28523,7 +28523,7 @@ _081D5210:
beq _081D522E
movs r0, 0x5
bl PlaySE
bl sub_80097E8
bl CloseLink
adds r0, r4, 0
bl sub_81D505C
movs r0, 0x8
@ -28537,7 +28537,7 @@ _081D522E:
bne _081D523C
b _081D548A
_081D523C:
bl sub_80097E8
bl CloseLink
bl sub_81D4E30
adds r0, r4, 0
bl sub_81D505C
@ -28654,13 +28654,13 @@ _081D5340:
_081D5350:
movs r0, 0x5
bl PlaySE
bl sub_80097E8
bl CloseLink
_081D535A:
movs r0, 0x17
strb r0, [r4, 0x8]
b _081D548A
_081D5360:
bl sub_80097E8
bl CloseLink
movs r0, 0x15
strb r0, [r4, 0x8]
b _081D548A
@ -28670,7 +28670,7 @@ _081D536A:
cmp r0, 0
beq _081D537A
_081D5374:
bl sub_80097E8
bl CloseLink
b _081D53C0
_081D537A:
bl GetBlockReceivedStatus

View File

@ -747,7 +747,7 @@ _080E7384:
movs r0, 0xC8
lsls r0, 1
strh r0, [r5, 0x8]
bl sub_8009FAC
bl ClearLinkCallback_2
b _080E7566
.pool
_080E73A0:
@ -993,7 +993,7 @@ _080E75AC:
movs r0, 0xC8
muls r0, r2
adds r1, r0
ldr r0, =gUnknown_020228C4
ldr r0, =gBlockSendBuffer
movs r2, 0xC8
bl memcpy
b _080E75FC

View File

@ -3584,7 +3584,7 @@ sub_808631C: @ 808631C
lsrs r0, 24
cmp r0, 0x1
bne _0808632E
bl sub_80097E8
bl CloseLink
_0808632E:
ldr r0, =gSerialIsRFU
ldrb r0, [r0]
@ -5950,7 +5950,7 @@ sub_8087690: @ 8087690
ldrb r0, [r0]
cmp r0, 0
bne _080876B0
ldr r0, =gUnknown_03003170
ldr r0, =gLink
ldr r1, =0x00000339
adds r0, r1
ldrb r0, [r0]

View File

@ -70,7 +70,7 @@ sub_8011E2C: @ 8011E2C
push {r4-r6,lr}
lsls r0, 24
lsrs r4, r0, 24
ldr r6, =gUnknown_03003110
ldr r6, =gSendCmd
ldrh r0, [r6]
cmp r0, 0
bne _08011E7A
@ -1244,7 +1244,7 @@ _08012848:
movs r2, 0
bl sub_8010F84
bl sub_800B488
bl sub_8009734
bl OpenLink
ldrb r1, [r4]
movs r0, 0xF
ands r0, r1
@ -2752,7 +2752,7 @@ _08013590:
movs r2, 0
bl sub_8010F84
bl sub_800B488
bl sub_8009734
bl OpenLink
bl sub_8011C5C
movs r0, 0x70
bl AllocZeroed
@ -3500,7 +3500,7 @@ _08013CD0:
movs r2, 0
bl sub_8010F84
bl sub_800B488
bl sub_8009734
bl OpenLink
bl sub_8011C5C
movs r0, 0x1
bl sub_80111B0
@ -3934,7 +3934,7 @@ _08013FFC:
b _0801405A
.pool
_08014038:
ldr r4, =gUnknown_020228C4
ldr r4, =gBlockSendBuffer
ldr r0, =gSaveBlock1Ptr
ldr r1, [r0]
ldr r0, =0x00002be0
@ -4505,7 +4505,7 @@ _080145D8:
.pool
_080145F4:
bl overworld_free_bg_tilemaps
ldr r0, =gUnknown_020228C4
ldr r0, =gBlockSendBuffer
movs r1, 0x1
bl sub_80143E4
bl sp000_heal_pokemon
@ -4524,7 +4524,7 @@ _08014620:
bl sp000_heal_pokemon
bl copy_player_party_to_sav1
bl copy_bags_and_unk_data_from_save_blocks
ldr r0, =gUnknown_020228C4
ldr r0, =gBlockSendBuffer
movs r1, 0x1
bl sub_80143E4
movs r0, 0x2
@ -4540,7 +4540,7 @@ _0801464C:
bl sp000_heal_pokemon
bl copy_player_party_to_sav1
bl copy_bags_and_unk_data_from_save_blocks
ldr r0, =gUnknown_020228C4
ldr r0, =gBlockSendBuffer
movs r1, 0x1
bl sub_80143E4
movs r0, 0x5
@ -4552,7 +4552,7 @@ _0801464C:
b _080146B0
.pool
_08014678:
ldr r0, =gUnknown_020228C4
ldr r0, =gBlockSendBuffer
movs r1, 0x1
bl sub_80143E4
bl overworld_free_bg_tilemaps
@ -4565,7 +4565,7 @@ _08014678:
b _080146B0
.pool
_08014698:
ldr r0, =gUnknown_020228C4
ldr r0, =gBlockSendBuffer
movs r1, 0x1
bl sub_80143E4
bl overworld_free_bg_tilemaps
@ -4605,7 +4605,7 @@ _080146F6:
bl sub_801DD98
b _08014764
_080146FC:
ldr r0, =gUnknown_020228C4
ldr r0, =gBlockSendBuffer
movs r1, 0
bl sub_80143E4
ldr r0, =sub_80141A4
@ -4675,7 +4675,7 @@ sub_8014790: @ 8014790
lsls r0, 3
ldr r1, =gTasks + 0x8
adds r7, r0, r1
ldr r0, =gUnknown_020228C4
ldr r0, =gBlockSendBuffer
mov r9, r0
movs r1, 0
ldrsh r0, [r7, r1]
@ -4999,7 +4999,7 @@ _08014AB0:
movs r1, 0
bl sub_8010FA0
bl sub_800B488
bl sub_8009734
bl OpenLink
movs r0, 0x2
bl sub_8011C10
movs r0, 0x1
@ -5537,7 +5537,7 @@ _08014FA4:
movs r2, 0
bl sub_8010F84
bl sub_800B488
bl sub_8009734
bl OpenLink
bl sub_8011C5C
movs r0, 0x70
bl AllocZeroed
@ -5925,7 +5925,7 @@ _08015358:
movs r2, 0
bl sub_8010F84
bl sub_800B488
bl sub_8009734
bl OpenLink
bl sub_8011C5C
movs r0, 0x70
bl AllocZeroed
@ -6475,7 +6475,7 @@ _08015878:
ldrh r2, [r2, 0xC]
bl sub_8010FCC
bl sub_800B488
bl sub_8009734
bl OpenLink
bl sub_8011C84
ldr r0, [r6, 0x8]
movs r1, 0x1
@ -6822,7 +6822,7 @@ _08015BBE:
bne _08015BCA
bl _08016878
_08015BCA:
ldr r0, =gUnknown_020228C4
ldr r0, =gBlockSendBuffer
movs r1, 0x1
bl sub_80143E4
ldr r0, =sub_80140E0
@ -7349,7 +7349,7 @@ _080160DA:
bne _080160E4
b _08016878
_080160E4:
ldr r0, =gUnknown_020228C4
ldr r0, =gBlockSendBuffer
movs r1, 0x1
bl sub_80143E4
ldr r0, =sub_80140E0
@ -8184,7 +8184,7 @@ _08016894:
sub_801689C: @ 801689C
push {r4,r5,lr}
adds r2, r0, 0
ldr r3, =gUnknown_03003090
ldr r3, =gRecvCmds
ldrh r5, [r3, 0x12]
adds r4, r5, 0
cmp r4, 0
@ -8325,7 +8325,7 @@ _080169BE:
movs r2, 0
bl sub_8010F84
bl sub_800B488
bl sub_8009734
bl OpenLink
bl sub_8011C84
movs r0, 0x1
bl sub_80111B0
@ -11147,7 +11147,7 @@ _08017FC6:
sub_8017FD8: @ 8017FD8
push {lr}
adds r2, r0, 0
ldr r0, =gUnknown_03003090
ldr r0, =gRecvCmds
ldrh r1, [r0, 0x2]
cmp r1, 0
beq _08017FFC
@ -14200,7 +14200,7 @@ _080198FE:
b _08019922
.pool
_0801990C:
bl sub_80097E8
bl CloseLink
ldr r0, [r5, 0x10]
bl Free
adds r0, r4, 0
@ -16823,7 +16823,7 @@ _0801AE48:
beq _0801AE54
b _0801AFAE
_0801AE54:
ldr r4, =gUnknown_020228C4
ldr r4, =gBlockSendBuffer
adds r0, r4, 0
movs r1, 0
movs r2, 0x20
@ -16840,7 +16840,7 @@ _0801AE78:
movs r0, 0x51
_0801AE7A:
strb r0, [r4]
ldr r1, =gUnknown_020228C4
ldr r1, =gBlockSendBuffer
movs r0, 0
movs r2, 0x20
bl SendBlock
@ -33351,7 +33351,7 @@ sub_802339C: @ 802339C
mov r10, r3
_080233C0:
lsls r0, r7, 4
ldr r1, =gUnknown_03003090
ldr r1, =gRecvCmds
adds r2, r0, r1
ldrh r1, [r2]
movs r0, 0xFF
@ -33960,7 +33960,7 @@ sub_802385C: @ 802385C
push {r4,r5,lr}
adds r5, r0, 0
movs r4, 0
ldr r3, =gUnknown_03003090
ldr r3, =gRecvCmds
ldrb r0, [r5, 0x9]
cmp r4, r0
bcs _08023880
@ -42728,7 +42728,7 @@ sub_8027DD0: @ 8027DD0
sub_8027DFC: @ 8027DFC
push {lr}
adds r2, r0, 0
ldr r3, =gUnknown_03003090
ldr r3, =gRecvCmds
ldrh r0, [r3]
movs r1, 0xFF
lsls r1, 8
@ -43184,7 +43184,7 @@ sub_8028164: @ 8028164
mov r9, r0
adds r2, r7, 0
adds r2, 0x14
ldr r4, =gUnknown_03003090
ldr r4, =gRecvCmds
ldrh r0, [r4]
movs r1, 0xFF
lsls r1, 8
@ -43397,7 +43397,7 @@ sub_8028318: @ 8028318
push {r4,lr}
adds r2, r0, 0
adds r4, r1, 0
ldr r3, =gUnknown_03003090
ldr r3, =gRecvCmds
ldrh r0, [r3]
movs r1, 0xFF
lsls r1, 8
@ -43449,7 +43449,7 @@ sub_8028350: @ 8028350
sub_8028374: @ 8028374
push {lr}
adds r2, r0, 0
ldr r3, =gUnknown_03003090
ldr r3, =gRecvCmds
ldrh r0, [r3]
movs r1, 0xFF
lsls r1, 8
@ -54921,7 +54921,7 @@ sub_802E0D0: @ 802E0D0
push {r4,lr}
sub sp, 0xC
adds r4, r1, 0
ldr r3, =gUnknown_03003090
ldr r3, =gRecvCmds
lsls r2, r0, 4
adds r0, r2, r3
ldrh r1, [r0]
@ -55048,7 +55048,7 @@ sub_802E1BC: @ 802E1BC
sub sp, 0xC
adds r5, r0, 0
adds r4, r1, 0
ldr r2, =gUnknown_03003090
ldr r2, =gRecvCmds
ldrh r0, [r2]
movs r1, 0xFF
lsls r1, 8
@ -55138,7 +55138,7 @@ sub_802E264: @ 802E264
adds r4, r0, 0
adds r5, r2, 0
adds r6, r3, 0
ldr r3, =gUnknown_03003090
ldr r3, =gRecvCmds
lsls r2, r1, 4
adds r0, r2, r3
ldrh r1, [r0]
@ -55193,7 +55193,7 @@ sub_802E2D0: @ 802E2D0
push {r4,lr}
sub sp, 0xC
adds r4, r0, 0
ldr r3, =gUnknown_03003090
ldr r3, =gRecvCmds
lsls r2, r1, 4
adds r0, r2, r3
ldrh r1, [r0]
@ -56187,7 +56187,7 @@ sub_802EAB0: @ 802EAB0
ldrb r0, [r0]
cmp r0, 0
beq _0802EB14
ldr r1, =gUnknown_03003090
ldr r1, =gRecvCmds
ldrh r0, [r1, 0x2]
ldr r5, =0x00007fff
cmp r0, r5

View File

@ -401,7 +401,7 @@ _080774B2:
ldrb r2, [r0]
cmp r2, 0
bne _0807754C
ldr r1, =gUnknown_020229C6
ldr r1, =gLinkType
ldr r5, =0x00001122
adds r0, r5, 0
strh r0, [r1]
@ -414,12 +414,12 @@ _080774B2:
cmp r0, 0
beq _08077528
bl sub_800B488
bl sub_8009734
bl OpenLink
bl sub_8011BA4
b _08077B46
.pool
_08077528:
bl sub_8009734
bl OpenLink
ldr r0, =gMain
movs r7, 0x87
lsls r7, 3
@ -510,7 +510,7 @@ _080775E8:
beq _080775F2
b _08077B46
_080775F2:
bl sub_800A23C
bl IsLinkPlayerDataExchangeComplete
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
@ -2142,7 +2142,7 @@ _08078484:
.4byte _080786F0
.4byte _08078720
_080784DC:
ldr r0, =gUnknown_020228C4
ldr r0, =gBlockSendBuffer
ldr r1, =gPlayerParty
movs r2, 0xC8
bl sub_8078438
@ -2208,7 +2208,7 @@ _08078552:
b _080787A2
.pool
_0807857C:
ldr r0, =gUnknown_020228C4
ldr r0, =gBlockSendBuffer
ldr r1, =gPlayerParty + 200
movs r2, 0xC8
bl sub_8078438
@ -2247,7 +2247,7 @@ _080785B6:
b _080787A2
.pool
_080785E0:
ldr r0, =gUnknown_020228C4
ldr r0, =gBlockSendBuffer
ldr r1, =gPlayerParty + 400
movs r2, 0xC8
bl sub_8078438
@ -2286,7 +2286,7 @@ _0807861A:
b _080787A2
.pool
_08078644:
ldr r0, =gUnknown_020228C4
ldr r0, =gBlockSendBuffer
ldr r1, =gSaveBlock1Ptr
ldr r1, [r1]
ldr r2, =0x00002be0
@ -2328,7 +2328,7 @@ _0807868A:
b _080787A2
.pool
_080786B4:
ldr r0, =gUnknown_020228C4
ldr r0, =gBlockSendBuffer
ldr r1, =gSaveBlock1Ptr
ldr r1, [r1]
ldr r2, =0x000031a8
@ -7024,8 +7024,8 @@ _0807AC92:
lsls r0, 1
cmp r1, r0
bls _0807ACC4
bl sub_80097E8
ldr r0, =c2_800ACD4
bl CloseLink
ldr r0, =CB2_LinkError
bl SetMainCallback2
ldr r1, [r4]
adds r3, r1, 0
@ -7258,11 +7258,11 @@ _0807AEAC:
ldrb r0, [r0]
cmp r0, 0
bne _0807AEC0
ldr r1, =gUnknown_020229C6
ldr r1, =gLinkType
ldr r2, =0x00001144
adds r0, r2, 0
strh r0, [r1]
bl sub_80097E8
bl CloseLink
_0807AEC0:
ldr r4, =gUnknown_020322A0
movs r5, 0x80
@ -7330,7 +7330,7 @@ _0807AF58:
adds r0, 0xFA
movs r1, 0x1
strb r1, [r0]
bl sub_8009734
bl OpenLink
ldr r1, =gMain
movs r2, 0x87
lsls r2, 3
@ -7407,7 +7407,7 @@ _0807B006:
beq _0807B014
b _0807B116
_0807B014:
bl sub_800A23C
bl IsLinkPlayerDataExchangeComplete
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1

View File

@ -1 +1 @@
gUnknown_03003130
gLinkTestBGInfo

View File

@ -1,9 +1,9 @@
gKeyRepeatStartDelay
gUnknown_030022B4
gLinkTransferringData
gMain
gKeyRepeatContinueDelay
gSoftResetDisabled
gIntrTable
gUnknown_03002748
gLinkVSyncDisabled
IntrMain_Buffer
gPcmDmaCounter

View File

@ -162,15 +162,15 @@ gUnknown_082ED6A5:: @ 82ED6A5
.align 2
gUnknown_082ED6B8:: @ 82ED6B8
.4byte gUnknown_020228C4
.4byte gBlockSendBuffer
.4byte 0x000000c8
.4byte gUnknown_020228C4
.4byte gBlockSendBuffer
.4byte 0x000000c8
.4byte gUnknown_020228C4
.4byte gBlockSendBuffer
.4byte 0x00000064
.4byte gUnknown_020228C4
.4byte gBlockSendBuffer
.4byte 0x000000dc
.4byte gUnknown_020228C4
.4byte gBlockSendBuffer
.4byte 0x00000028
.align 2

View File

@ -39,7 +39,7 @@ gSpecials:: @ 81DBA64
def_special sub_80B2E4C
def_special sub_80B2E74
def_special sub_80B2EA8
def_special sub_80097E8
def_special CloseLink
def_special sub_80B3968
def_special sub_80B3924
def_special nullsub_37

View File

@ -59,6 +59,9 @@ enum
EXCHANGE_COMPLETE,
EXCHANGE_TIMED_OUT,
EXCHANGE_IN_PROGRESS,
EXCHANGE_STAT_4,
EXCHANGE_STAT_5,
EXCHANGE_STAT_6
};
enum
@ -146,8 +149,8 @@ struct BlockRequest
extern const struct BlockRequest sBlockRequestLookupTable[5];
extern struct Link gLink;
extern u16 gRecvCmds[CMD_LENGTH][MAX_LINK_PLAYERS];
extern u8 gUnknown_020228C4[BLOCK_BUFFER_SIZE]; // gBlockSendBuffer
extern u16 gRecvCmds[MAX_LINK_PLAYERS][CMD_LENGTH];
extern u8 gBlockSendBuffer[BLOCK_BUFFER_SIZE]; // gBlockSendBuffer
extern u8 gBlockSendBuffer[BLOCK_BUFFER_SIZE];
extern u16 gLinkType;
extern u32 gLinkStatus;
@ -162,14 +165,14 @@ extern bool8 gSerialIsRFU;
void Task_DestroySelf(u8);
void OpenLink(void);
void CloseLink(void);
u16 LinkMain2(u16 *);
u16 LinkMain2(const u16 *);
void sub_8007B14(void);
bool32 sub_8007B24(void);
void ClearLinkCallback(void);
void ClearLinkCallback_2(void);
u8 GetLinkPlayerCount(void);
void OpenLinkTimed(void);
u8 GetLinkPlayerDataExchangeStatusTimed(void);
u8 GetLinkPlayerDataExchangeStatusTimed(int lower, int upper);
bool8 IsLinkPlayerDataExchangeComplete(void);
u32 GetLinkPlayerTrainerId(u8);
void ResetLinkPlayers(void);
@ -181,7 +184,6 @@ bool8 SendBlock(u8, const void *, u16);
u8 GetBlockReceivedStatus(void);
void ResetBlockReceivedFlags(void);
void ResetBlockReceivedFlag(u8);
void SetLinkDebugValues(u32, u32);
u8 GetLinkPlayerCount_2(void);
bool8 IsLinkMaster(void);
void CB2_LinkError(void);
@ -201,43 +203,44 @@ bool8 sub_800A520(void);
void sub_800DFB4(u8, u8);
void sub_800ADF8(void);
void sub_800B488(void);
void sub_8009734(void);
void sub_800A620(void);
void sub_8011BD0(void);
u8 sub_800ABAC(void);
u8 sub_800ABBC(void);
void sub_800AC34(void);
void sub_800B628(void);
void sub_80097E8(void);
void sub_800A994(u32 seed, u8 flags);
void SetLinkDebugValues(u32 seed, u32 flags);
void sub_800A418(void);
void SetSuppressLinkErrorMessage(bool8 flag);
void sub_800B524(struct LinkPlayer *linkPlayer);
u8 sub_800B2E8(void);
u8 sub_800B320(void);
u8 sub_800B33C(void);
extern u16 gUnknown_03003020[6];
extern u32 gUnknown_0300302C;
extern struct LinkPlayerBlock gUnknown_03003030;
extern bool8 gUnknown_0300306C;
extern struct LinkPlayerBlock gLocalLinkPlayerBlock;
extern bool8 gLinkErrorOccurred;
extern u32 gUnknown_03003070;
extern bool8 gUnknown_03003078[4];
extern u8 gUnknown_0300307C[4];
extern u16 gUnknown_03003084;
extern u16 gUnknown_03003090[4][8];
extern u32 gUnknown_030030E0;
extern u16 gLinkHeldKeys;
extern u32 gLinkStatus;
extern u8 gUnknown_030030E4;
extern u8 gUnknown_030030E8;
extern u8 gUnknown_030030EC[4];
extern u8 gUnknown_030030F0[4];
extern u16 gUnknown_030030F4;
extern u8 gUnknown_030030F8;
extern u8 gSuppressLinkErrorMessage;
extern bool8 gSerialIsRFU;
extern bool8 gUnknown_03003100;
extern u16 gUnknown_03003110[8];
extern u8 gUnknown_03003120;
extern struct LinkTestBGInfo gUnknown_03003130;
extern void (*gUnknown_03003140)(void);
extern bool8 gUnknown_03003144;
extern u16 gUnknown_03003148[4];
extern u8 gUnknown_03003150;
extern struct LinkTestBGInfo gLinkTestBGInfo;
extern void (*gLinkCallback)(void);
extern bool8 gShouldAdvanceLinkState;
extern u16 gLinkTestBlockChecksums[4];
extern u8 gBlockRequestType;
extern u8 gUnknown_03003160;
extern u8 gUnknown_03004130;
#endif // GUARD_LINK_H

View File

@ -46,12 +46,12 @@ extern const u8 gGameVersion;
extern const u8 gGameLanguage;
extern u16 gKeyRepeatStartDelay;
extern bool8 gUnknown_030022B4;
extern bool8 gLinkTransferringData;
extern struct Main gMain;
extern u16 gKeyRepeatContinueDelay;
extern bool8 gSoftResetDisabled;
extern IntrFunc gIntrTable[];
extern u8 gUnknown_03002748;
extern u8 gLinkVSyncDisabled;
extern u32 IntrMain_Buffer[];
extern u8 gPcmDmaCounter;

View File

@ -62,7 +62,7 @@ void HandleLinkBattleSetup(void)
if (gSerialIsRFU)
sub_800B488();
if (!gReceivedRemoteLinkPlayers)
sub_8009734();
OpenLink();
CreateTask(task00_08081A90, 0);
CreateTasksForSendRecvLinkBuffers();
}

File diff suppressed because it is too large Load Diff

View File

@ -80,12 +80,12 @@ const IntrFunc gIntrTableTemplate[] =
static u16 gUnknown_03000000;
u16 gKeyRepeatStartDelay;
bool8 gUnknown_030022B4;
bool8 gLinkTransferringData;
struct Main gMain;
u16 gKeyRepeatContinueDelay;
bool8 gSoftResetDisabled;
IntrFunc gIntrTable[INTR_COUNT];
u8 gUnknown_03002748;
u8 gLinkVSyncDisabled;
u32 IntrMain_Buffer[0x200];
u8 gPcmDmaCounter;
@ -129,7 +129,7 @@ void AgbMain()
if (gFlashMemoryPresent != TRUE)
SetMainCallback2(NULL);
gUnknown_030022B4 = FALSE;
gLinkTransferringData = FALSE;
gUnknown_03000000 = 0xFC0;
for (;;)
@ -147,22 +147,22 @@ void AgbMain()
if (sub_8087634() == 1)
{
gUnknown_030022B4 = TRUE;
gLinkTransferringData = TRUE;
UpdateLinkAndCallCallbacks();
gUnknown_030022B4 = FALSE;
gLinkTransferringData = FALSE;
}
else
{
gUnknown_030022B4 = FALSE;
gLinkTransferringData = FALSE;
UpdateLinkAndCallCallbacks();
if (sub_80875C8() == 1)
{
gMain.newKeys = 0;
ClearSpriteCopyRequests();
gUnknown_030022B4 = TRUE;
gLinkTransferringData = TRUE;
UpdateLinkAndCallCallbacks();
gUnknown_030022B4 = FALSE;
gLinkTransferringData = FALSE;
}
}
@ -338,7 +338,7 @@ static void VBlankIntr(void)
{
if (gSerialIsRFU != FALSE)
LinkVSync();
else if (gUnknown_03002748 == FALSE)
else if (gLinkVSyncDisabled == FALSE)
sub_800B9B8();
gMain.vblankCounter1++;

View File

@ -18,10 +18,10 @@ gUnknown_03003020: @ 3003020
gUnknown_0300302C: @ 300302C
.space 0x4
gUnknown_03003030: @ 3003030
gLocalLinkPlayerBlock: @ 3003030
.space 0x3C
gUnknown_0300306C: @ 300306C
gLinkErrorOccurred: @ 300306C
.space 0x4
gUnknown_03003070: @ 3003070
@ -33,13 +33,13 @@ gUnknown_03003078: @ 3003078
gUnknown_0300307C: @ 300307C
.space 0x8
gUnknown_03003084: @ 3003084
gLinkHeldKeys: @ 3003084
.space 0xC
gUnknown_03003090: @ 3003090
gRecvCmds: @ 3003090
.space 0x50
gUnknown_030030E0: @ 30030E0
gLinkStatus: @ 30030E0
.space 0x4
gUnknown_030030E4: @ 30030E4
@ -57,7 +57,7 @@ gUnknown_030030F0: @ 30030F0
gUnknown_030030F4: @ 30030F4
.space 0x4
gUnknown_030030F8: @ 30030F8
gSuppressLinkErrorMessage: @ 30030F8
.space 0x4
gSerialIsRFU: @ 30030FC
@ -66,7 +66,7 @@ gSerialIsRFU: @ 30030FC
gUnknown_03003100: @ 3003100
.space 0x10
gUnknown_03003110: @ 3003110
gSendCmd: @ 3003110
.space 0x10
gUnknown_03003120: @ 3003120
@ -75,25 +75,25 @@ gUnknown_03003120: @ 3003120
gReceivedRemoteLinkPlayers: @ 3003124
.space 0xC
gUnknown_03003130: @ 3003130
gLinkTestBGInfo: @ 3003130
.space 0x10
gUnknown_03003140: @ 3003140
gLinkCallback: @ 3003140
.space 0x4
gUnknown_03003144: @ 3003144
gShouldAdvanceLinkState: @ 3003144
.space 0x4
gUnknown_03003148: @ 3003148
gLinkTestBlockChecksums: @ 3003148
.space 0x8
gUnknown_03003150: @ 3003150
gBlockRequestType: @ 3003150
.space 0x10
gUnknown_03003160: @ 3003160
.space 0x10
gUnknown_03003170: @ 3003170
gLink: @ 3003170
.space 0xFC0
gUnknown_03004130: @ 3004130