From f0c2d9f24645ce5129ab02f35c18454156465cd5 Mon Sep 17 00:00:00 2001 From: shibbo Date: Wed, 30 Oct 2024 17:40:17 -0400 Subject: [PATCH] `ARC`, `DSP` and some `NAND` --- config/RMGK01/splits.txt | 7 ++++--- config/RMGK01/symbols.txt | 2 +- configure.py | 16 ++++++++-------- libs/RVL_SDK/include/revolution/dsp.h | 4 ++-- src/RVL_SDK/arc/arc.c | 4 ++-- src/RVL_SDK/dsp/dsp_task.c | 6 +++--- 6 files changed, 20 insertions(+), 19 deletions(-) diff --git a/config/RMGK01/splits.txt b/config/RMGK01/splits.txt index 84e2a2a4c..3f1ec0a4a 100644 --- a/config/RMGK01/splits.txt +++ b/config/RMGK01/splits.txt @@ -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: @@ -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: diff --git a/config/RMGK01/symbols.txt b/config/RMGK01/symbols.txt index 3d349bbf9..670ac2d25 100644 --- a/config/RMGK01/symbols.txt +++ b/config/RMGK01/symbols.txt @@ -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 diff --git a/configure.py b/configure.py index 92c5c79ba..5d2dc1221 100644 --- a/configure.py +++ b/configure.py @@ -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") ] ), @@ -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") ] ), @@ -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"), ] diff --git a/libs/RVL_SDK/include/revolution/dsp.h b/libs/RVL_SDK/include/revolution/dsp.h index add392e54..ba941defe 100644 --- a/libs/RVL_SDK/include/revolution/dsp.h +++ b/libs/RVL_SDK/include/revolution/dsp.h @@ -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); @@ -43,4 +43,4 @@ void DSPInit(void); } #endif -#endif // DSP_H \ No newline at end of file +#endif // DSP_H diff --git a/src/RVL_SDK/arc/arc.c b/src/RVL_SDK/arc/arc.c index 3d4788208..ab37a0c17 100644 --- a/src/RVL_SDK/arc/arc.c +++ b/src/RVL_SDK/arc/arc.c @@ -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); } @@ -313,4 +313,4 @@ BOOL ARCReadDir(ARCDir* dir, ARCDirEntry* dirent) { BOOL ARCCloseDir(ARCDir* dir) { return TRUE; -} \ No newline at end of file +} diff --git a/src/RVL_SDK/dsp/dsp_task.c b/src/RVL_SDK/dsp/dsp_task.c index a5d9abd3a..eb1c63ee3 100644 --- a/src/RVL_SDK/dsp/dsp_task.c +++ b/src/RVL_SDK/dsp/dsp_task.c @@ -2,7 +2,7 @@ #include #define WAIT_FOR_MAIL \ - while (DSPCheckMailTDSP()) { } + while (DSPCheckMailToDSP()) { } DSPTaskInfo* __DSP_curr_task; DSPTaskInfo* __DSP_first_task; @@ -61,7 +61,7 @@ void __DSP_boot_task(DSPTaskInfo *pTask) { volatile u32 mail; while (!DSPCheckMailFromDSP()) { } - mail = DSPRealMailFromDSP(); + mail = DSPReadMailFromDSP(); DSPSendMailToDSP(0x80F3A001); WAIT_FOR_MAIL @@ -115,4 +115,4 @@ void __DSP_remove_task(DSPTaskInfo *pTask) { pTask->prev->next = pTask->next; pTask->next->prev = pTask->prev; } -} \ No newline at end of file +}