librfu issues
This commit is contained in:
@@ -90,13 +90,8 @@
|
|||||||
|
|
||||||
#define RFU_MBOOT_DOWNLOADER_SERIAL_NO 0x0000 // The game serial number of the multi-boot downloader (programs that boot without a Game Pak)
|
#define RFU_MBOOT_DOWNLOADER_SERIAL_NO 0x0000 // The game serial number of the multi-boot downloader (programs that boot without a Game Pak)
|
||||||
|
|
||||||
#if LIBRFU_VERSION >= 1028
|
|
||||||
#define RFU_API_BUFF_SIZE_RAM 0x0e8c // Necessary size for buffer specified by rfu_initializeAPI (fast communication version that operates the library SIO interrupt routines in RAM)
|
|
||||||
#define RFU_API_BUFF_SIZE_ROM 0x052c // Necessary size for buffer specified by rfu_initializeAPI (fast communication version that operates the library SIO interrupt routines in ROM)
|
|
||||||
#else
|
|
||||||
#define RFU_API_BUFF_SIZE_RAM 0x0e64 // Necessary size for buffer specified by rfu_initializeAPI (fast communication version that operates the library SIO interrupt routines in RAM)
|
#define RFU_API_BUFF_SIZE_RAM 0x0e64 // Necessary size for buffer specified by rfu_initializeAPI (fast communication version that operates the library SIO interrupt routines in RAM)
|
||||||
#define RFU_API_BUFF_SIZE_ROM 0x0504 // Necessary size for buffer specified by rfu_initializeAPI (fast communication version that operates the library SIO interrupt routines in ROM)
|
#define RFU_API_BUFF_SIZE_ROM 0x0504 // Necessary size for buffer specified by rfu_initializeAPI (fast communication version that operates the library SIO interrupt routines in ROM)
|
||||||
#endif
|
|
||||||
|
|
||||||
#define RFU_CHILD_MAX 4 // Maximum number of slaves that can be connected to one parent device
|
#define RFU_CHILD_MAX 4 // Maximum number of slaves that can be connected to one parent device
|
||||||
|
|
||||||
|
|||||||
+3
-6
@@ -110,7 +110,7 @@ static const struct LLSFStruct llsf_struct[2] = {
|
|||||||
|
|
||||||
#define xstr(s) str(s)
|
#define xstr(s) str(s)
|
||||||
#define str(s) #s
|
#define str(s) #s
|
||||||
const char version_string[] = "RFU_V" xstr(LIBRFU_VERSION);
|
static const char version_string[] = "RFU_V" xstr(LIBRFU_VERSION);
|
||||||
|
|
||||||
static const char str_checkMbootLL[] = "RFU-MBOOT";
|
static const char str_checkMbootLL[] = "RFU-MBOOT";
|
||||||
|
|
||||||
@@ -154,16 +154,13 @@ u16 rfu_initializeAPI(u32 *APIBuffer, u16 buffByteSize, IntrFunc *sioIntrTable_p
|
|||||||
gRfuStatic = (void *)APIBuffer + 0xb4; // + sizeof(*gRfuLinkStatus)
|
gRfuStatic = (void *)APIBuffer + 0xb4; // + sizeof(*gRfuLinkStatus)
|
||||||
gRfuFixed = (void *)APIBuffer + 0xdc; // + sizeof(*gRfuStatic)
|
gRfuFixed = (void *)APIBuffer + 0xdc; // + sizeof(*gRfuStatic)
|
||||||
gRfuSlotStatusNI[0] = (void *)APIBuffer + 0x1bc; // + sizeof(*gRfuFixed)
|
gRfuSlotStatusNI[0] = (void *)APIBuffer + 0x1bc; // + sizeof(*gRfuFixed)
|
||||||
gRfuSlotStatusUNI[0] = (void *)APIBuffer + 0x37c; // + sizeof(*gRfuSlotStatusNI[0])
|
gRfuSlotStatusUNI[0] = (void *)APIBuffer + 0x37c; // + sizeof(*gRfuSlotStatusNI[0]) * RFU_CHILD_MAX
|
||||||
for (i = 1; i < RFU_CHILD_MAX; ++i)
|
for (i = 1; i < RFU_CHILD_MAX; ++i)
|
||||||
{
|
{
|
||||||
gRfuSlotStatusNI[i] = &gRfuSlotStatusNI[i - 1][1];
|
gRfuSlotStatusNI[i] = &gRfuSlotStatusNI[i - 1][1];
|
||||||
gRfuSlotStatusUNI[i] = &gRfuSlotStatusUNI[i - 1][1];
|
gRfuSlotStatusUNI[i] = &gRfuSlotStatusUNI[i - 1][1];
|
||||||
}
|
}
|
||||||
// TODO: Is it possible to fix the following 2 statements?
|
// remaining space in API buffer is used for `struct RfuIntrStruct`.
|
||||||
// It's equivalent to:
|
|
||||||
// gRfuFixed->STWIBuffer = &APIBuffer->intr;
|
|
||||||
// STWI_init_all(&APIBuffer->intr, sioIntrTable_p, copyInterruptToRam);
|
|
||||||
gRfuFixed->STWIBuffer = (struct RfuIntrStruct *)&gRfuSlotStatusUNI[3][1];
|
gRfuFixed->STWIBuffer = (struct RfuIntrStruct *)&gRfuSlotStatusUNI[3][1];
|
||||||
STWI_init_all((struct RfuIntrStruct *)&gRfuSlotStatusUNI[3][1], sioIntrTable_p, copyInterruptToRam);
|
STWI_init_all((struct RfuIntrStruct *)&gRfuSlotStatusUNI[3][1], sioIntrTable_p, copyInterruptToRam);
|
||||||
rfu_STC_clearAPIVariables();
|
rfu_STC_clearAPIVariables();
|
||||||
|
|||||||
Reference in New Issue
Block a user