through sub_8009FAC
This commit is contained in:
parent
1523d5c01e
commit
c9da45b254
2 changed files with 58 additions and 96 deletions
96
asm/link.s
96
asm/link.s
|
@ -5,102 +5,6 @@
|
|||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_8009F18
|
||||
sub_8009F18: @ 8009F18
|
||||
push {lr}
|
||||
ldr r0, =gLinkVSyncDisabled
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
beq _08009F26
|
||||
bl sub_800F804
|
||||
_08009F26:
|
||||
ldr r1, =gUnknown_03003140
|
||||
ldr r0, =sub_8009F70
|
||||
str r0, [r1]
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_8009F18
|
||||
|
||||
thumb_func_start sub_8009F3C
|
||||
sub_8009F3C: @ 8009F3C
|
||||
push {lr}
|
||||
ldr r0, =gLinkVSyncDisabled
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
beq _08009F50
|
||||
bl sub_800F7E4
|
||||
b _08009F6A
|
||||
.pool
|
||||
_08009F50:
|
||||
ldr r0, =gUnknown_03003140
|
||||
ldr r1, [r0]
|
||||
ldr r0, =sub_8009F70
|
||||
cmp r1, r0
|
||||
beq _08009F68
|
||||
movs r0, 0
|
||||
b _08009F6A
|
||||
.pool
|
||||
_08009F68:
|
||||
movs r0, 0x1
|
||||
_08009F6A:
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_8009F3C
|
||||
|
||||
thumb_func_start sub_8009F70
|
||||
sub_8009F70: @ 8009F70
|
||||
push {lr}
|
||||
ldr r0, =gReceivedRemoteLinkPlayers
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0x1
|
||||
bne _08009F80
|
||||
ldr r0, =0x0000cafe
|
||||
bl sub_8009D90
|
||||
_08009F80:
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_8009F70
|
||||
|
||||
thumb_func_start sub_8009F8C
|
||||
sub_8009F8C: @ 8009F8C
|
||||
push {lr}
|
||||
ldr r0, =gLinkVSyncDisabled
|
||||
ldrb r1, [r0]
|
||||
cmp r1, 0
|
||||
beq _08009FA0
|
||||
bl Rfu_set_zero
|
||||
b _08009FA4
|
||||
.pool
|
||||
_08009FA0:
|
||||
ldr r0, =gUnknown_03003140
|
||||
str r1, [r0]
|
||||
_08009FA4:
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_8009F8C
|
||||
|
||||
thumb_func_start sub_8009FAC
|
||||
sub_8009FAC: @ 8009FAC
|
||||
push {lr}
|
||||
ldr r0, =gLinkVSyncDisabled
|
||||
ldrb r1, [r0]
|
||||
cmp r1, 0
|
||||
beq _08009FC0
|
||||
bl Rfu_set_zero
|
||||
b _08009FC4
|
||||
.pool
|
||||
_08009FC0:
|
||||
ldr r0, =gUnknown_03003140
|
||||
str r1, [r0]
|
||||
_08009FC4:
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_8009FAC
|
||||
|
||||
thumb_func_start GetLinkPlayerCount
|
||||
GetLinkPlayerCount: @ 8009FCC
|
||||
push {lr}
|
||||
|
|
58
src/link.c
58
src/link.c
|
@ -109,6 +109,7 @@ void sub_8009638(void);
|
|||
void sub_80096BC(void);
|
||||
static void c2_08009A8C(void);
|
||||
static void sub_8009AA0(u8 unused);
|
||||
void sub_8009F70(void);
|
||||
void sub_800A2E0(void);
|
||||
void sub_800A2F4(void *heapptr, size_t src);
|
||||
void sub_800A418(void);
|
||||
|
@ -127,6 +128,9 @@ void sub_800B594(void);
|
|||
u32 sub_800BEC0(void);
|
||||
void sub_800E700(void);
|
||||
void sub_800EDD4(void);
|
||||
bool32 sub_800F7E4(void);
|
||||
void sub_800F804(void);
|
||||
void Rfu_set_zero(void);
|
||||
|
||||
// .rodata
|
||||
|
||||
|
@ -641,3 +645,57 @@ void sub_8009D90(u16 command)
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8009F18(void)
|
||||
{
|
||||
if (gLinkVSyncDisabled)
|
||||
{
|
||||
sub_800F804();
|
||||
}
|
||||
gUnknown_03003140 = sub_8009F70;
|
||||
}
|
||||
|
||||
bool32 sub_8009F3C(void)
|
||||
{
|
||||
if (gLinkVSyncDisabled)
|
||||
{
|
||||
return sub_800F7E4();
|
||||
}
|
||||
if (gUnknown_03003140 == sub_8009F70)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void sub_8009F70(void)
|
||||
{
|
||||
if (gReceivedRemoteLinkPlayers == TRUE)
|
||||
{
|
||||
sub_8009D90(0xcafe);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8009F8C(void)
|
||||
{
|
||||
if (gLinkVSyncDisabled)
|
||||
{
|
||||
Rfu_set_zero();
|
||||
}
|
||||
else
|
||||
{
|
||||
gUnknown_03003140 = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8009FAC(void)
|
||||
{
|
||||
if (gLinkVSyncDisabled)
|
||||
{
|
||||
Rfu_set_zero();
|
||||
}
|
||||
else
|
||||
{
|
||||
gUnknown_03003140 = NULL;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue