through sub_800EDBC

This commit is contained in:
PikalaxALT 2017-12-07 20:21:30 -05:00
parent 6441ba7832
commit abc3869eca
4 changed files with 56 additions and 101 deletions

View File

@ -5,97 +5,6 @@
.text
thumb_func_start sub_800ED10
sub_800ED10: @ 800ED10
push {lr}
ldr r3, =gUnknown_082ED6E0
movs r0, 0x1
movs r1, 0
movs r2, 0xF0
bl sub_800C054
pop {r0}
bx r0
.pool
thumb_func_end sub_800ED10
thumb_func_start sub_800ED28
sub_800ED28: @ 800ED28
push {lr}
movs r0, 0
bl sub_800C27C
pop {r0}
bx r0
thumb_func_end sub_800ED28
thumb_func_start sub_800ED34
sub_800ED34: @ 800ED34
push {r4,lr}
ldr r0, =gUnknown_03005000
movs r2, 0
movs r1, 0xD
adds r0, 0x59
_0800ED3E:
strb r2, [r0]
subs r0, 0x1
subs r1, 0x1
cmp r1, 0
bge _0800ED3E
bl rfu_REQ_recvData
bl rfu_waitREQComplete
ldr r1, =gUnknown_03007870
ldr r3, =gUnknown_03005000
ldr r0, =0x00000c3e
adds r4, r3, r0
ldrb r0, [r4]
lsls r0, 2
adds r0, r1
ldr r0, [r0]
ldrb r0, [r0, 0x12]
cmp r0, 0
beq _0800ED9A
movs r2, 0xCD
lsls r2, 4
adds r1, r3, r2
ldrb r0, [r1]
adds r0, 0x1
ldrb r2, [r1]
strb r0, [r1]
movs r1, 0x92
lsls r1, 1
adds r0, r3, r1
ldr r2, =0x00000c3f
adds r1, r3, r2
bl sub_800D7D8
ldr r1, =gUnknown_02022B44
ldrh r0, [r1, 0x6]
adds r0, 0x1
strh r0, [r1, 0x6]
bl sub_800F048
ldrb r0, [r4]
bl rfu_UNI_readySendData
ldrb r0, [r4]
bl rfu_UNI_clearRecvNewDataFlag
_0800ED9A:
movs r0, 0x1
bl rfu_REQ_sendData_wrapper
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end sub_800ED34
thumb_func_start sub_800EDBC
sub_800EDBC: @ 800EDBC
ldr r0, =gUnknown_03005000
ldr r1, =0x00000cdb
adds r0, r1
ldrb r1, [r0]
movs r1, 0x1
strb r1, [r0]
bx lr
.pool
thumb_func_end sub_800EDBC
thumb_func_start sub_800EDD4
sub_800EDD4: @ 800EDD4
push {r4-r6,lr}

View File

@ -108,7 +108,8 @@ struct RfuUnk1
u16 unk_0;
u8 unk_2;
u8 unk_3;
u8 fill_4[0x10];
u8 fill_4[14];
u8 unk_12;
u32 unk_14;
u32 unk_18;
struct RfuIntrStruct unk_1c;
@ -217,3 +218,6 @@ u16 rfu_initializeAPI(u32 *unk0, u16 unk1, IntrFunc *interrupt, bool8 copyInterr
void rfu_setTimerInterrupt(u8 which, IntrFunc *intr);
void rfu_setRecvBuffer(u8 a0, u8 a1, void *a2, size_t a3);
bool16 rfu_UNI_setSendData(u8 flag, void *ptr, u8 size);
void rfu_REQ_recvData(void);
void rfu_UNI_readySendData(u8 a0);
void rfu_UNI_clearRecvNewDataFlag(u8 a0);

View File

@ -42,7 +42,9 @@ struct UnkLinkRfuStruct_02022B2C
struct UnkLinkRfuStruct_02022B44
{
u8 fill_00[15];
u8 fill_00[6];
u16 unk_06;
u8 fill_08[7];
u8 unk_0f;
u8 fill_10[0xcc];
};
@ -155,8 +157,10 @@ struct UnkRfuStruct_2 {
/* 0xc3f */ u8 unk_c3f[70];
/* 0xc85 */ u8 filler_c85[2];
/* 0xc87 */ u8 unk_c87[70];
/* 0xccb */ u8 filler_ccb[13];
/* 0xccb */ u8 unk_cda;
/* 0xccb */ u8 filler_ccd[3];
/* 0xcd0 */ vu8 unk_cd0;
/* 0xcd1 */ u8 filler_cd1[9];
/* 0xcda */ u8 unk_cda;
/* 0xcdb */ vu8 unk_cdb;
/* 0xcdc */ u8 filler_cdc[2];
/* 0xcde */ u8 unk_cde[4];

View File

@ -48,10 +48,11 @@ static void sub_800D434(void);
static void sub_800D610(void);
void sub_800D630(void);
bool8 sub_800DAC8(struct UnkRfuStruct_2_Sub_c1c *q1, u8 *q2);
void sub_800EDBC(u16 a0);
void sub_800EAB4(void);
void sub_800EAFC(void);
void sub_800ED34(u16 a0);
static void sub_800EAB4(void);
static void sub_800EAFC(void);
void sub_800ED34(u16 unused);
static void sub_800EDBC(u16 unused);
void sub_800F048(void);
struct UnkLinkRfuStruct_02022B14 *sub_800F7DC(void);
void sub_800FCC4(struct UnkRfuStruct_2_Sub_6c *data);
bool32 sub_8010454(u16 a0);
@ -2629,7 +2630,7 @@ void sub_800E94C(u8 taskId)
}
}
void sub_800EAB4(void)
static void sub_800EAB4(void)
{
u8 i;
u8 r5 = gUnknown_03004140.unk_00;
@ -2644,7 +2645,7 @@ void sub_800EAB4(void)
}
}
void sub_800EAFC(void)
static void sub_800EAFC(void)
{
u8 r5 = gUnknown_03004140.unk_00;
rfu_UNI_setSendData(r5, gUnknown_03005000.unk_c87, 70);
@ -2714,3 +2715,40 @@ void sub_800EB44(u8 taskId)
break;
}
}
void sub_800ED10(void)
{
sub_800C054(1, 0, 240, gUnknown_082ED6E0);
}
void sub_800ED28(void)
{
sub_800C27C(FALSE);
}
void sub_800ED34(u16 unused)
{
int i;
for (i = 0; i < 14; i++)
{
gUnknown_03005000.unk_4c[0][i] = 0;
}
rfu_REQ_recvData();
rfu_waitREQComplete();
if (gUnknown_03007870[gUnknown_03005000.unk_c3e]->unk_12)
{
gUnknown_03005000.unk_cd0++;
sub_800D7D8(&gUnknown_03005000.unk_124, gUnknown_03005000.unk_c3f);
gUnknown_02022B44.unk_06++;
sub_800F048();
rfu_UNI_readySendData(gUnknown_03005000.unk_c3e);
rfu_UNI_clearRecvNewDataFlag(gUnknown_03005000.unk_c3e);
}
rfu_REQ_sendData_wrapper(1);
}
static void sub_800EDBC(u16 unused)
{
gUnknown_03005000.unk_cdb = 1;
}