From 190b78549e0fa1a801786e73d914185e1fbca2a6 Mon Sep 17 00:00:00 2001 From: Derek Hensley Date: Mon, 11 Sep 2023 17:38:31 -0700 Subject: Non libultra Boot Cleanup (#1370) * reorganize * math64 * rcp_utils * osSyncPrintfUnused * comment spacing --- src/boot/O2/rcp_utils.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/boot/O2/rcp_utils.c (limited to 'src/boot/O2/rcp_utils.c') diff --git a/src/boot/O2/rcp_utils.c b/src/boot/O2/rcp_utils.c new file mode 100644 index 000000000..f587fad21 --- /dev/null +++ b/src/boot/O2/rcp_utils.c @@ -0,0 +1,23 @@ +#include "ultra64.h" + +void RcpUtils_PrintRegisterStatus(void) { + u32 spStatus = __osSpGetStatus(); + u32 dpStatus = osDpGetStatus(); + + if (spStatus) { + // stubbed debug prints + } + + if (dpStatus) { + // stubbed debug prints + } +} + +void RcpUtils_Reset(void) { + RcpUtils_PrintRegisterStatus(); + // Flush the RDP pipeline and freeze clock counter + osDpSetStatus(DPC_SET_FREEZE | DPC_SET_FLUSH); + // Halt the RSP, disable interrupt on break and set "task done" signal + __osSpSetStatus(SP_SET_HALT | SP_SET_TASKDONE | SP_CLR_INTR_BREAK); + RcpUtils_PrintRegisterStatus(); +} -- cgit v1.2.3