Skip to content

Commit

Permalink
ARC, DSP and some NAND
Browse files Browse the repository at this point in the history
  • Loading branch information
shibbo committed Oct 30, 2024
1 parent ac39ba1 commit f0c2d9f
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 19 deletions.
7 changes: 4 additions & 3 deletions config/RMGK01/splits.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10449,11 +10449,12 @@ RVL_SDK/si/SIBios.c:

RVL_SDK/si/SISamplingRate.c:
.text start:0x804B3750 end:0x804B3830
.data start:0x805FD210 end:0x805FD260
.data start:0x805FD210 end:0x805FD248
.sbss start:0x806B7790 end:0x806B7798

RVL_SDK/db/db.c:
.text start:0x804B3830 end:0x804B3918
.data start:0x805FD248 end:0x805FD260
.sbss start:0x806B7798 end:0x806B77A0

RVL_SDK/vi/vi.c:
Expand Down Expand Up @@ -10666,12 +10667,12 @@ RVL_SDK/dsp/dsp_task.c:

RVL_SDK/nand/nand.c:
.text start:0x804CCCB4 end:0x804CDE08
.sdata start:0x806B2BC0 end:0x806B2BD0
.sdata start:0x806B2BC0 end:0x806B2BC8

RVL_SDK/nand/NANDOpenClose.c:
.text start:0x804CDE08 end:0x804CEC2C
.data start:0x80600608 end:0x80600620
.sdata start:0x806B2BD0 end:0x806B2BD8
.sdata start:0x806B2BC8 end:0x806B2BD8
.sbss start:0x806B7A58 end:0x806B7A60

RVL_SDK/nand/NANDCore.c:
Expand Down
2 changes: 1 addition & 1 deletion config/RMGK01/symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39720,7 +39720,7 @@ fn_80498620 = .text:0x80498620; // type:function size:0x2C
fn_80498660 = .text:0x80498660; // type:function size:0x74
fn_804986E0 = .text:0x804986E0; // type:function size:0x7C
fn_80498760 = .text:0x80498760; // type:function size:0x7C
fn_804987E0 = .text:0x804987E0; // type:function size:0x35C
__DSPHandler = .text:0x804987E0; // type:function size:0x35C
fn_80498B40 = .text:0x80498B40; // type:function size:0x7C
fn_80498BC0 = .text:0x80498BC0; // type:function size:0x58
fn_80498C20 = .text:0x80498C20; // type:function size:0x78
Expand Down
16 changes: 8 additions & 8 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -2278,7 +2278,7 @@ def JSysLib(lib_name: str, objects: List[Object]) -> Dict[str, Any]:
SDKLib(
"arc",
[
Object(NonMatching, "RVL_SDK/arc/arc.c")
Object(Matching, "RVL_SDK/arc/arc.c")
]
),

Expand Down Expand Up @@ -2385,16 +2385,16 @@ def JSysLib(lib_name: str, objects: List[Object]) -> Dict[str, Any]:
SDKLib(
"db",
[
Object(NonMatching, "RVL_SDK/db/db.c")
Object(Matching, "RVL_SDK/db/db.c")
]
),

SDKLib(
"dsp",
[
Object(NonMatching, "RVL_SDK/dsp/dsp.c"),
Object(NonMatching, "RVL_SDK/dsp/dsp_debug.c"),
Object(NonMatching, "RVL_SDK/dsp/dsp_task.c")
Object(Matching, "RVL_SDK/dsp/dsp.c"),
Object(Matching, "RVL_SDK/dsp/dsp_debug.c"),
Object(Matching, "RVL_SDK/dsp/dsp_task.c")
]
),

Expand Down Expand Up @@ -2517,10 +2517,10 @@ def JSysLib(lib_name: str, objects: List[Object]) -> Dict[str, Any]:
SDKLib(
"nand",
[
Object(NonMatching, "RVL_SDK/nand/nand.c"),
Object(NonMatching, "RVL_SDK/nand/NANDOpenClose.c"),
Object(Matching, "RVL_SDK/nand/nand.c"),
Object(Matching, "RVL_SDK/nand/NANDOpenClose.c"),
Object(NonMatching, "RVL_SDK/nand/NANDCore.c"),
Object(NonMatching, "RVL_SDK/nand/NANDSecret.c"),
Object(Matching, "RVL_SDK/nand/NANDSecret.c"),
Object(NonMatching, "RVL_SDK/nand/NANDCheck.c"),
Object(NonMatching, "RVL_SDK/nand/NANDLogging.c"),
]
Expand Down
4 changes: 2 additions & 2 deletions libs/RVL_SDK/include/revolution/dsp.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ typedef struct DSPTaskStruct {

u32 DSPCheckMailToDSP(void);
u32 DSPCheckMailFromDSP(void);
u32 DSPRealMailFromDSP(void);
u32 DSPReadMailFromDSP(void);
void DSPSendMailToDSP(u32);
void DSPAssertInt(void);
void DSPInit(void);
Expand All @@ -43,4 +43,4 @@ void DSPInit(void);
}
#endif

#endif // DSP_H
#endif // DSP_H
4 changes: 2 additions & 2 deletions src/RVL_SDK/arc/arc.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ static BOOL ARCConvertEntrynumToPath(ARCHandle* handle, s32 entrynum, char* path
return TRUE;
}

BOOL ARCGetCurrentDir(ARCHandle* handle, char* path, u32 maxlen) {
static BOOL ARCGetCurrentDir(ARCHandle* handle, char* path, u32 maxlen) {
return ARCConvertEntrynumToPath(handle, (s32)handle->currDir, path, maxlen);
}

Expand Down Expand Up @@ -313,4 +313,4 @@ BOOL ARCReadDir(ARCDir* dir, ARCDirEntry* dirent) {

BOOL ARCCloseDir(ARCDir* dir) {
return TRUE;
}
}
6 changes: 3 additions & 3 deletions src/RVL_SDK/dsp/dsp_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include <revolution/dsp/dsp_debug.h>

#define WAIT_FOR_MAIL \
while (DSPCheckMailTDSP()) { }
while (DSPCheckMailToDSP()) { }

DSPTaskInfo* __DSP_curr_task;
DSPTaskInfo* __DSP_first_task;
Expand Down Expand Up @@ -61,7 +61,7 @@ void __DSP_boot_task(DSPTaskInfo *pTask) {
volatile u32 mail;

while (!DSPCheckMailFromDSP()) { }
mail = DSPRealMailFromDSP();
mail = DSPReadMailFromDSP();

DSPSendMailToDSP(0x80F3A001);
WAIT_FOR_MAIL
Expand Down Expand Up @@ -115,4 +115,4 @@ void __DSP_remove_task(DSPTaskInfo *pTask) {
pTask->prev->next = pTask->next;
pTask->next->prev = pTask->prev;
}
}
}

0 comments on commit f0c2d9f

Please sign in to comment.