mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 19:47:35 +01:00
sub_800E87C, remaining data in link_rfu
This commit is contained in:
parent
21619096da
commit
dc0d544119
@ -5,17 +5,6 @@
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_800E87C
|
||||
sub_800E87C: @ 800E87C
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldr r1, =gUnknown_082ED6A5
|
||||
adds r0, r1
|
||||
ldrb r0, [r0]
|
||||
bx lr
|
||||
.pool
|
||||
thumb_func_end sub_800E87C
|
||||
|
||||
thumb_func_start sub_800E88C
|
||||
sub_800E88C: @ 800E88C
|
||||
push {r4-r7,lr}
|
||||
|
120
data/link_rfu.s
120
data/link_rfu.s
@ -1,120 +0,0 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.section .rodata
|
||||
|
||||
.align 2
|
||||
gUnknown_082ED608:: @ 82ED608
|
||||
.byte 0x04, 0x20, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00
|
||||
.byte 0x14, 0x2b, 0x02, 0x02, 0x22, 0x2b, 0x02, 0x02
|
||||
.byte 0x01, 0x00, 0x58, 0x02, 0x2c, 0x01, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_082ED620:: @ 82ED620
|
||||
.byte 0x00, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_082ED628:: @ 82ED628
|
||||
.4byte 0x00000000, 0x00000001, 0x00000003, 0x00000007
|
||||
.4byte 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f
|
||||
.4byte 0x000000ff, 0x000001ff, 0x000003ff, 0x000007ff
|
||||
.4byte 0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff
|
||||
.4byte 0x0000ffff, 0x0001ffff, 0x0003ffff, 0x0007ffff
|
||||
.4byte 0x000fffff, 0x001fffff, 0x003fffff, 0x007fffff
|
||||
.4byte 0x00ffffff
|
||||
|
||||
gUnknown_082ED68C:: @ 82ED68C
|
||||
.byte 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02
|
||||
.byte 0x03
|
||||
|
||||
gUnknown_082ED695:: @ 82ED695
|
||||
.byte 0x00, 0x01, 0x01, 0x02, 0x01, 0x02, 0x02, 0x03
|
||||
.byte 0x01, 0x02, 0x02, 0x03, 0x02, 0x03, 0x03, 0x04
|
||||
|
||||
gUnknown_082ED6A5:: @ 82ED6A5
|
||||
.byte 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00
|
||||
.byte 0x03, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00
|
||||
.byte 0x00, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_082ED6B8:: @ 82ED6B8
|
||||
.4byte gBlockSendBuffer
|
||||
.4byte 0x000000c8
|
||||
.4byte gBlockSendBuffer
|
||||
.4byte 0x000000c8
|
||||
.4byte gBlockSendBuffer
|
||||
.4byte 0x00000064
|
||||
.4byte gBlockSendBuffer
|
||||
.4byte 0x000000dc
|
||||
.4byte gBlockSendBuffer
|
||||
.4byte 0x00000028
|
||||
|
||||
.align 2
|
||||
gUnknown_082ED6E0:: @ 82ED6E0
|
||||
.2byte 0x0002, 0x7f7d, 0x0000, 0xffff
|
||||
|
||||
.ascii "RFU WAIT"
|
||||
.space 7
|
||||
|
||||
.ascii "RFU BOOT"
|
||||
.space 7
|
||||
|
||||
.ascii "RFU ERROR"
|
||||
.space 6
|
||||
|
||||
.ascii "RFU RESET"
|
||||
.space 6
|
||||
|
||||
.ascii "RFU CONFIG"
|
||||
.space 5
|
||||
|
||||
.ascii "RFU START"
|
||||
.space 6
|
||||
|
||||
.ascii "RFU SC POLL"
|
||||
.space 4
|
||||
|
||||
.ascii "RFU SP POLL"
|
||||
.space 4
|
||||
|
||||
.ascii "RFU START"
|
||||
.space 6
|
||||
|
||||
.ascii "RFU SEND ERR"
|
||||
.space 3
|
||||
|
||||
.ascii "RFU CP POLL"
|
||||
.space 4
|
||||
|
||||
.ascii " "
|
||||
.space 2
|
||||
|
||||
.ascii "RECOVER START "
|
||||
.space 2
|
||||
|
||||
.ascii "DISSCONECT "
|
||||
.space 2
|
||||
|
||||
.ascii "RECOVER SUUSES"
|
||||
.space 2
|
||||
|
||||
.ascii "RECOVER FAILED"
|
||||
.space 2
|
||||
|
||||
.align 2
|
||||
gUnknown_082ED7E0:: @ 82ED7E0
|
||||
.4byte sub_801084C
|
||||
.4byte sub_8010AAC
|
||||
.4byte sub_8010D0C
|
||||
|
||||
.align 2
|
||||
gUnknown_082ED7EC:: @ 82ED7EC
|
||||
.ascii "PokemonSioInfo"
|
||||
|
||||
.align 2
|
||||
gUnknown_082ED7FC:: @ 82ED7FC
|
||||
.ascii "LINK LOSS DISCONNECT!"
|
||||
|
||||
.align 2
|
||||
gUnknown_082ED814:: @ 82ED814
|
||||
.ascii "LINK LOSS RECOVERY NOW"
|
@ -174,6 +174,8 @@ extern struct RfuUnk1* gUnknown_03007870[4];
|
||||
extern void* sub_82E53F4;
|
||||
extern void rfu_STC_clearAPIVariables(void);
|
||||
|
||||
struct UnkLinkRfuStruct_02022B14;
|
||||
|
||||
void STWI_init_all(struct RfuIntrStruct *interruptStruct, IntrFunc *interrupt, bool8 copyInterruptToRam);
|
||||
void rfu_REQ_stopMode(void);
|
||||
void rfu_waitREQComplete(void);
|
||||
@ -186,7 +188,7 @@ void rfu_REQBN_watchLink(u16 a0, u8 *a1, u8 *a2, u8 *a3);
|
||||
bool16 rfu_syncVBlank(void);
|
||||
void rfu_REQ_reset(void);
|
||||
void rfu_REQ_configSystem(u16, u8, u8);
|
||||
void rfu_REQ_configGameData(u8, u16, u32, u32);
|
||||
void rfu_REQ_configGameData(u8, u16, struct UnkLinkRfuStruct_02022B14 *, u8 *);
|
||||
void rfu_REQ_startSearchChild(void);
|
||||
void rfu_REQ_pollSearchChild(void);
|
||||
void rfu_REQ_endSearchChild(void);
|
||||
|
@ -32,8 +32,8 @@ struct UnkLinkRfuStruct_02022B2C
|
||||
u16 unk_02;
|
||||
u8 unk_04;
|
||||
u16 unk_06;
|
||||
u32 unk_08;
|
||||
u32 unk_0c;
|
||||
struct UnkLinkRfuStruct_02022B14 *unk_08;
|
||||
u8 *unk_0c;
|
||||
u8 unk_10;
|
||||
u8 unk_11;
|
||||
u16 unk_12;
|
||||
@ -75,7 +75,7 @@ struct UnkRfuStruct_1 {
|
||||
// aligned
|
||||
/* 0x032 */ u16 unk_32;
|
||||
/* 0x034 */ u16 unk_34[4];
|
||||
/* 0x03c */ struct UnkLinkRfuStruct_02022B2C *unk_3c;
|
||||
/* 0x03c */ const struct UnkLinkRfuStruct_02022B2C *unk_3c;
|
||||
/* 0x040 */ void (*unk_40)(u8, u8);
|
||||
/* 0x044 */ void (*unk_44)(u16);
|
||||
/* 0x048 */ u8 filler_48[8];
|
||||
|
@ -332,7 +332,6 @@ SECTIONS {
|
||||
src/string_util.o(.rodata);
|
||||
src/link.o(.rodata);
|
||||
src/link_rfu.o(.rodata);
|
||||
data/link_rfu.o(.rodata);
|
||||
data/rom_8011DC0.o(.rodata);
|
||||
src/rtc.o(.rodata);
|
||||
data/main_menu.o(.rodata);
|
||||
|
102
src/link_rfu.c
102
src/link_rfu.c
@ -54,6 +54,8 @@ void sub_800FCC4(struct UnkRfuStruct_2_Sub_6c *data);
|
||||
bool32 sub_8010454(u16 a0);
|
||||
void sub_8010750(void);
|
||||
void sub_801084C(u8 taskId);
|
||||
void sub_8010AAC(u8 taskId);
|
||||
void sub_8010D0C(u8 taskId);
|
||||
u8 sub_8012224(void);
|
||||
|
||||
// .rodata
|
||||
@ -190,7 +192,98 @@ static const struct SpriteTemplate sWirelessStatusIndicatorSpriteTemplate = {
|
||||
SpriteCallbackDummy
|
||||
};
|
||||
|
||||
extern const u16 gUnknown_082ED6E0[4];
|
||||
const struct UnkLinkRfuStruct_02022B2C gUnknown_082ED608 = {
|
||||
0x04, 0x20, 0x00, 0x00, 0x02,
|
||||
&gUnknown_02022B14,
|
||||
gUnknown_02022B22,
|
||||
0x01, 0x00, 0x258, 0x12c
|
||||
};
|
||||
const u8 gUnknown_082ED620[] = {
|
||||
0, 3, 2, 1, 0
|
||||
};
|
||||
const u32 gUnknown_082ED628[] = {
|
||||
0x000000,
|
||||
0x000001,
|
||||
0x000003,
|
||||
0x000007,
|
||||
0x00000f,
|
||||
0x00001f,
|
||||
0x00003f,
|
||||
0x00007f,
|
||||
0x0000ff,
|
||||
0x0001ff,
|
||||
0x0003ff,
|
||||
0x0007ff,
|
||||
0x000fff,
|
||||
0x001fff,
|
||||
0x003fff,
|
||||
0x007fff,
|
||||
0x00ffff,
|
||||
0x01ffff,
|
||||
0x03ffff,
|
||||
0x07ffff,
|
||||
0x0fffff,
|
||||
0x1fffff,
|
||||
0x3fffff,
|
||||
0x7fffff,
|
||||
0xffffff
|
||||
};
|
||||
const u8 gUnknown_082ED68C[] = {
|
||||
0, 0, 1,
|
||||
1, 2, 2,
|
||||
2, 2, 3
|
||||
};
|
||||
const u8 gUnknown_082ED695[] = {
|
||||
0, 1, 1, 2,
|
||||
1, 2, 2, 3,
|
||||
1, 2, 2, 3,
|
||||
2, 3, 3, 4
|
||||
};
|
||||
const u8 gUnknown_082ED6A5[] = {
|
||||
0, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0
|
||||
};
|
||||
const struct {
|
||||
u8 *buffer;
|
||||
u16 size;
|
||||
} gUnknown_082ED6B8[] = {
|
||||
{ gBlockSendBuffer, 200 },
|
||||
{ gBlockSendBuffer, 200 },
|
||||
{ gBlockSendBuffer, 100 },
|
||||
{ gBlockSendBuffer, 220 },
|
||||
{ gBlockSendBuffer, 40 }
|
||||
};
|
||||
const u16 gUnknown_082ED6E0[] = {
|
||||
0x0002, 0x7f7d, 0x0000, 0xffff
|
||||
};
|
||||
|
||||
const char sUnref_082ED6E8[][15] = {
|
||||
"RFU WAIT",
|
||||
"RFU BOOT",
|
||||
"RFU ERROR",
|
||||
"RFU RESET",
|
||||
"RFU CONFIG",
|
||||
"RFU START",
|
||||
"RFU SC POLL",
|
||||
"RFU SP POLL",
|
||||
"RFU START",
|
||||
"RFU SEND ERR",
|
||||
"RFU CP POLL"
|
||||
};
|
||||
const char sUnref_082ED6E9[][16] = {
|
||||
" ",
|
||||
"RECOVER START ",
|
||||
"DISSCONECT ",
|
||||
"RECOVER SUUSES",
|
||||
"RECOVER FAILED"
|
||||
};
|
||||
const TaskFunc gUnknown_082ED7E0[] = {
|
||||
sub_801084C,
|
||||
sub_8010AAC,
|
||||
sub_8010D0C
|
||||
};
|
||||
const char gUnknown_082ED7EC[] = "PokemonSioInfo";
|
||||
const char gUnknown_082ED7FC[] = "LINK LOSS DISCONNECT!";
|
||||
const char gUnknown_082ED814[] = "LINK LOSS RECOVERY NOW";
|
||||
|
||||
// .text
|
||||
|
||||
@ -257,7 +350,7 @@ void sub_800BFA0(void)
|
||||
gUnknown_03004140.unk_06 = -1;
|
||||
}
|
||||
|
||||
void sub_800BFCC(struct UnkLinkRfuStruct_02022B2C *unk0)
|
||||
void sub_800BFCC(const struct UnkLinkRfuStruct_02022B2C *unk0)
|
||||
{
|
||||
sub_800C000();
|
||||
gUnknown_03004140.unk_04 = 1;
|
||||
@ -2425,3 +2518,8 @@ void sub_800E748(u8 taskId)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
u8 sub_800E87C(u8 idx)
|
||||
{
|
||||
return gUnknown_082ED6A5[idx];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user