resolve data sections

This commit is contained in:
jiangzhengwenjz 2020-01-16 07:28:23 +08:00 committed by huderlem
parent 46b00b11d4
commit aa631825fc
10 changed files with 18 additions and 51 deletions

View File

@ -3,4 +3,3 @@ gRfuSlotStatusNI
gRfuLinkStatus
gRfuStatic
gRfuFixed
gRfuSIO32Id

View File

@ -0,0 +1 @@
gRfuSIO32Id

View File

@ -1,17 +0,0 @@
.section .rodata
llsf_struct:: @ 89A3220
.byte 2, 14, 0, 10, 9, 5, 7, 2
.byte 0, 15, 1, 3, 3, 0, 31, 0
.byte 3, 22, 18, 14, 13, 9, 11, 3
.byte 15, 15, 1, 3, 3, 0, 0x7f, 0
.asciz "RFU_V1026"
.align 2
str_checkMbootLL:: @ 89A324C
.asciz "RFU-MBOOT"
.align 2
Sio32ConnectionData:: @ 89A3258
.asciz "NINTENDOSio32ID_030820"

View File

@ -5,7 +5,6 @@
#include "main.h"
/* TODOs:
* - split files
* - documentation
* - decompile librfu_intr.s once arm support is back again
(for internal structs not documented in SDK)

View File

@ -1235,7 +1235,8 @@ SECTIONS {
src/agb_flash_mx.o(.rodata);
src/agb_flash_le.o(.rodata);
src/siirtc.o(.rodata);
data/librfu_rodata.o(.rodata);
src/librfu_rfu.o(.rodata);
src/librfu_sio32id.o(.rodata);
*libgcc.a:_divdi3.o(.rodata);
*libgcc.a:_udivdi3.o(.rodata);
*libc.a(.rodata);

View File

@ -70,7 +70,7 @@ SECTIONS {
src/librfu_intr.o(.text);
asm/librfu_intr.o(.text);
src/librfu_rfu.o(.text);
asm/librfu.o(.text);
src/librfu_sio32id.o(.text);
*libagbsyscall.a:*.o(.text*);
*libgcc.a:*.o(.text*);
*libc.a:*.o(.text*);
@ -100,7 +100,8 @@ SECTIONS {
src/agb_flash_mx.o(.rodata);
src/agb_flash_le.o(.rodata);
src/siirtc.o(.rodata);
data/librfu_rodata.o(.rodata);
src/librfu_rfu.o(.rodata);
src/librfu_sio32id.o(.rodata);
*libgcc.a:*.o(.rodata*);
*libc.a:*.o(.rodata*);
*libc.a:*.o(.data*);

View File

@ -1,9 +0,0 @@
#include "global.h"
#include "librfu.h"
struct RfuSlotStatusUNI* gRfuSlotStatusUNI[4];
struct RfuSlotStatusNI* gRfuSlotStatusNI[4];
struct RfuLinkStatus *gRfuLinkStatus;
struct RfuStatic *gRfuStatic;
struct RfuFixed* gRfuFixed;
struct RfuSIO32Id gRfuSIO32Id;

View File

@ -67,13 +67,13 @@ static void rfu_STC_NI_receive_Sender(u8, u8, const struct RfuLocalStruct *, __a
static void rfu_STC_NI_initSlot_asRecvDataEntity(u8, struct NIComm *);
static void rfu_STC_NI_initSlot_asRecvControllData(u8, struct NIComm *);
//struct RfuSlotStatusUNI *gRfuSlotStatusUNI[RFU_CHILD_MAX];
//struct RfuSlotStatusNI *gRfuSlotStatusNI[RFU_CHILD_MAX];
//struct RfuLinkStatus *gRfuLinkStatus;
//struct RfuStatic *gRfuStatic;
//struct RfuFixed *gRfuFixed;
struct RfuSlotStatusUNI *gRfuSlotStatusUNI[RFU_CHILD_MAX];
struct RfuSlotStatusNI *gRfuSlotStatusNI[RFU_CHILD_MAX];
struct RfuLinkStatus *gRfuLinkStatus;
struct RfuStatic *gRfuStatic;
struct RfuFixed *gRfuFixed;
/*static const struct LLSFStruct llsf_struct[2] = {
static const struct LLSFStruct llsf_struct[2] = {
{
2, 14, 0, 10, 9, 5, 7, 2,
0, 15, 1, 3, 3, 0x1f
@ -83,16 +83,9 @@ static void rfu_STC_NI_initSlot_asRecvControllData(u8, struct NIComm *);
}
};
#ifdef EMERALD
static const char lib_ver[] = "RFU_V1026";
#else
static const char lib_ver[] = "RFU_V1024";
#endif
static const char str_checkMbootLL[] = "RFU-MBOOT";
*/
extern const struct LLSFStruct llsf_struct[2];
extern const char str_checkMbootLL[];// = "RFU-MBOOT";
u16 rfu_initializeAPI(struct RfuAPIBuffer *APIBuffer, u16 buffByteSize, IntrFunc *sioIntrTable_p, bool8 copyInterruptToRam)
{
@ -2031,6 +2024,7 @@ static void rfu_STC_NI_receive_Sender(u8 r0, u8 r10, const struct RfuLocalStruct
}
}
_081E30AE:
;
}
else if (r12->state == SLOT_STATE_SEND_LAST)
{

View File

@ -4,13 +4,10 @@ static void Sio32IDIntr(void);
static void Sio32IDInit(void);
static s32 Sio32IDMain(void);
//struct RfuSIO32Id gRfuSIO32Id;
struct RfuSIO32Id gRfuSIO32Id;
//static const u16 Sio32ConnectionData[] = { 0x494e, 0x544e, 0x4e45, 0x4f44 }; // NINTENDO
//static const char Sio32IDLib_Var[] = "Sio32ID_030820";
extern const u16 Sio32ConnectionData[];
extern const char Sio32IDLib_Var[];
static const u16 Sio32ConnectionData[] = { 0x494e, 0x544e, 0x4e45, 0x4f44 }; // NINTENDO
static const char Sio32IDLib_Var[] = "Sio32ID_030820";
s32 AgbRFU_checkID(u8 r5)
{

View File

@ -77,4 +77,5 @@ gReservedSpritePaletteCount:
.include "m4a.o"
.include "agb_flash.o"
.include "librfu_stwi.o"
.include "librfu.o"
.include "librfu_rfu.o"
.include "librfu_sio32id.o"