1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-28 19:25:27 +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);
Gfx* GfxPrint_Close(GfxPrint* this);
s32 GfxPrint_Printf(GfxPrint* this, const char* fmt, ...);
void func_800FBCE0();
void func_800FBFD8(void);
void RcpUtils_PrintRegisterStatus();
void RcpUtils_Reset(void);
void* Overlay_AllocateAndLoad(u32 vRomStart, u32 vRomEnd, void* vRamStart, void* vRamEnd);
void MtxConv_F2L(Mtx* m1, MtxF* 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/logseverity.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/mtxuty-cvt.o"
include "build/src/code/relocation.o"

View file

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

View file

@ -7,7 +7,7 @@
if (x & DPC_STATUS_##name) \
osSyncPrintf(#name " ")
void func_800FBCE0() {
void RcpUtils_PrintRegisterStatus() {
u32 spStatus = __osSpGetStatus();
u32 dpStatus = osDpGetStatus();
@ -44,9 +44,9 @@ void func_800FBCE0() {
osSyncPrintf("\n");
}
void func_800FBFD8() {
func_800FBCE0();
void RcpUtils_Reset() {
RcpUtils_PrintRegisterStatus();
osDpSetStatus(DPC_SET_FREEZE | DPC_SET_FLUSH);
__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);
} else if (OS_CYCLES_TO_USEC(now - sRSPGFXStartTime) > 1000000 ||
OS_CYCLES_TO_USEC(now - sRDPStartTime) > 1000000) {
func_800FBFD8();
RcpUtils_Reset();
if (sc->curRSPTask != NULL) {
LOG_TIME("(((u64)(now - graph_rsp_start_time)*(1000000LL/15625LL))/((62500000LL*3/4)/15625LL))",
OS_CYCLES_TO_USEC(now - sRSPGFXStartTime), "../sched.c", 427);