1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-05 15:34:41 +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

@ -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);