sub_800BF4C

This commit is contained in:
PikalaxALT 2017-11-17 08:33:25 -05:00
parent 8377b00662
commit a054b244ab
4 changed files with 22 additions and 36 deletions

View File

@ -7,42 +7,6 @@
// RFU; bss indicates that no file boundary exists here
thumb_func_start sub_800BF4C
sub_800BF4C: @ 800BF4C
push {r4-r6,lr}
sub sp, 0x4
adds r5, r0, 0
adds r6, r1, 0
cmp r5, 0
beq _0800BF94
mov r1, sp
movs r0, 0
strh r0, [r1]
ldr r4, =gUnknown_03004140
ldr r2, =0x01000024
mov r0, sp
adds r1, r4, 0
bl CpuSet
movs r0, 0xFF
strb r0, [r4, 0x6]
str r5, [r4, 0x40]
str r6, [r4, 0x44]
ldr r0, =sub_800CEB0
bl rfu_setMSCCallback
ldr r0, =sub_800C7B4
bl rfu_setREQCallback
movs r0, 0
b _0800BF96
.pool
_0800BF94:
movs r0, 0x4
_0800BF96:
add sp, 0x4
pop {r4-r6}
pop {r1}
bx r1
thumb_func_end sub_800BF4C
thumb_func_start sub_800BFA0
sub_800BFA0: @ 800BFA0
push {r4,lr}

View File

@ -147,3 +147,5 @@ void rfu_REQ_stopMode(void);
void rfu_waitREQComplete(void);
u32 rfu_REQBN_softReset_and_checkID(void);
void rfu_REQ_sendData(u8);
void rfu_setMSCCallback(void (*func)(u16));
void rfu_setREQCallback(void (*func)(u16, u16));

View File

@ -15,6 +15,9 @@ struct UnkRfuStruct_1 {
u8 unk_08;
u8 filler_09[4];
u8 unk_0d;
u8 filler_0e[0x32];
void (*unk_40)(u8);
void (*unk_44)(void);
};
// Exported RAM declarations

View File

@ -170,6 +170,8 @@ static void StopTimer(void);
static void SendRecvDone(void);
void sub_800D610(void);
void sub_800CEB0(u16 unk0);
void sub_800C7B4(u16 unk0, u16 unk1);
// .rodata
@ -2485,3 +2487,18 @@ void rfu_REQ_sendData_wrapper(u8 r2)
}
rfu_REQ_sendData(r2);
}
int sub_800BF4C(void (*func1)(u8), void (*func2)(void))
{
if (func1 == NULL)
{
return 4;
}
CpuFill16(0, &gUnknown_03004140, sizeof(gUnknown_03004140));
gUnknown_03004140.unk_06 = -1;
gUnknown_03004140.unk_40 = func1;
gUnknown_03004140.unk_44 = func2;
rfu_setMSCCallback(sub_800CEB0);
rfu_setREQCallback(sub_800C7B4);
return 0;
}