1
0
mirror of https://github.com/zeldaret/oot.git synced 2024-09-21 04:24:43 +00:00

Document RCP functions (#1087)

* Document RCP functions

* Rename functions according to convention

* Rename file and functions to RcpUtils
This commit is contained in:
hatal175 2022-01-24 01:04:50 +02:00 committed by GitHub
parent 4b4099e84c
commit f344fe648b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 9 deletions

View File

@ -2123,8 +2123,8 @@ void GfxPrint_Destroy(GfxPrint* this);
void GfxPrint_Open(GfxPrint* this, Gfx* dList); void GfxPrint_Open(GfxPrint* this, Gfx* dList);
Gfx* GfxPrint_Close(GfxPrint* this); Gfx* GfxPrint_Close(GfxPrint* this);
s32 GfxPrint_Printf(GfxPrint* this, const char* fmt, ...); s32 GfxPrint_Printf(GfxPrint* this, const char* fmt, ...);
void func_800FBCE0(); void RcpUtils_PrintRegisterStatus();
void func_800FBFD8(void); void RcpUtils_Reset(void);
void* Overlay_AllocateAndLoad(u32 vRomStart, u32 vRomEnd, void* vRamStart, void* vRamEnd); void* Overlay_AllocateAndLoad(u32 vRomStart, u32 vRomEnd, void* vRamStart, void* vRamEnd);
void MtxConv_F2L(Mtx* m1, MtxF* m2); void MtxConv_F2L(Mtx* m1, MtxF* m2);
void MtxConv_L2F(MtxF* m1, Mtx* m2); void MtxConv_L2F(MtxF* m1, Mtx* m2);

2
spec
View File

@ -425,7 +425,7 @@ beginseg
include "build/src/code/audio_init_params.o" include "build/src/code/audio_init_params.o"
include "build/src/code/logseverity.o" include "build/src/code/logseverity.o"
include "build/src/code/gfxprint.o" include "build/src/code/gfxprint.o"
include "build/src/code/code_800FBCE0.o" include "build/src/code/rcp_utils.o"
include "build/src/code/loadfragment2.o" include "build/src/code/loadfragment2.o"
include "build/src/code/mtxuty-cvt.o" include "build/src/code/mtxuty-cvt.o"
include "build/src/code/relocation.o" include "build/src/code/relocation.o"

View File

@ -111,6 +111,6 @@ void Main(void* arg) {
osSyncPrintf("mainproc 後始末\n"); // "Cleanup" osSyncPrintf("mainproc 後始末\n"); // "Cleanup"
osDestroyThread(&sGraphThread); osDestroyThread(&sGraphThread);
func_800FBFD8(); RcpUtils_Reset();
osSyncPrintf("mainproc 実行終了\n"); // "End of execution" osSyncPrintf("mainproc 実行終了\n"); // "End of execution"
} }

View File

@ -7,7 +7,7 @@
if (x & DPC_STATUS_##name) \ if (x & DPC_STATUS_##name) \
osSyncPrintf(#name " ") osSyncPrintf(#name " ")
void func_800FBCE0() { void RcpUtils_PrintRegisterStatus() {
u32 spStatus = __osSpGetStatus(); u32 spStatus = __osSpGetStatus();
u32 dpStatus = osDpGetStatus(); u32 dpStatus = osDpGetStatus();
@ -44,9 +44,9 @@ void func_800FBCE0() {
osSyncPrintf("\n"); osSyncPrintf("\n");
} }
void func_800FBFD8() { void RcpUtils_Reset() {
func_800FBCE0(); RcpUtils_PrintRegisterStatus();
osDpSetStatus(DPC_SET_FREEZE | DPC_SET_FLUSH); osDpSetStatus(DPC_SET_FREEZE | DPC_SET_FLUSH);
__osSpSetStatus(SP_SET_HALT | SP_SET_SIG2 | SP_CLR_INTR_BREAK); __osSpSetStatus(SP_SET_HALT | SP_SET_SIG2 | SP_CLR_INTR_BREAK);
func_800FBCE0(); RcpUtils_PrintRegisterStatus();
} }

View File

@ -78,7 +78,7 @@ void Sched_HandleReset(SchedContext* sc) {
OS_CYCLES_TO_USEC(now - sRSPAudioStartTime), "../sched.c", 421); OS_CYCLES_TO_USEC(now - sRSPAudioStartTime), "../sched.c", 421);
} else if (OS_CYCLES_TO_USEC(now - sRSPGFXStartTime) > 1000000 || } else if (OS_CYCLES_TO_USEC(now - sRSPGFXStartTime) > 1000000 ||
OS_CYCLES_TO_USEC(now - sRDPStartTime) > 1000000) { OS_CYCLES_TO_USEC(now - sRDPStartTime) > 1000000) {
func_800FBFD8(); RcpUtils_Reset();
if (sc->curRSPTask != NULL) { if (sc->curRSPTask != NULL) {
LOG_TIME("(((u64)(now - graph_rsp_start_time)*(1000000LL/15625LL))/((62500000LL*3/4)/15625LL))", LOG_TIME("(((u64)(now - graph_rsp_start_time)*(1000000LL/15625LL))/((62500000LL*3/4)/15625LL))",
OS_CYCLES_TO_USEC(now - sRSPGFXStartTime), "../sched.c", 427); OS_CYCLES_TO_USEC(now - sRSPGFXStartTime), "../sched.c", 427);