Import gx, PadClamp, rest of mtx, TRK 2.6 and MSL (#525)

* Match mtx and Padclamp.c

* Match the rest of GX

* Import TRK 2.6

* Import MSL headers and files

* Merge some MSL headers into ours
This commit is contained in:
dbalatoni13 2025-01-12 15:11:23 +01:00 committed by GitHub
parent a79294aac0
commit cdb1d1fc37
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
113 changed files with 11219 additions and 394 deletions

View file

@ -6,15 +6,15 @@
#include <dolphin/gx/GXPriv.h>
static OSThread *__GXCurrentThread;
static struct __GXFifoObj* CPUFifo;
static struct __GXFifoObj* GPFifo;
static OSThread* __GXCurrentThread;
static GXBool CPGPLinked;
static BOOL GXOverflowSuspendInProgress;
static GXBreakPtCallback BreakPointCB;
static u32 __GXOverflowCount;
struct __GXFifoObj *CPUFifo;
struct __GXFifoObj *GPFifo;
void *__GXCurrentBP;
void* __GXCurrentBP;
static void __GXFifoReadEnable(void);
static void __GXFifoReadDisable(void);
@ -38,10 +38,10 @@ static void GXUnderflowHandler(s16 interrupt, OSContext *context)
{
ASSERTLINE(0x1A3, GXOverflowSuspendInProgress);
OSResumeThread(__GXCurrentThread);
GXOverflowSuspendInProgress = FALSE;
__GXWriteFifoIntReset(1U, 1U);
__GXWriteFifoIntEnable(1U, 0U);
OSResumeThread(__GXCurrentThread);
GXOverflowSuspendInProgress = FALSE;
__GXWriteFifoIntReset(1U, 1U);
__GXWriteFifoIntEnable(1U, 0U);
}
#define SOME_SET_REG_MACRO(reg, size, shift, val) \
@ -51,17 +51,17 @@ static void GXUnderflowHandler(s16 interrupt, OSContext *context)
static void GXBreakPointHandler(s16 interrupt, OSContext *context)
{
OSContext exceptionContext;
OSContext exceptionContext;
SOME_SET_REG_MACRO(gx->cpEnable, 1, 5, 0);
GX_SET_CP_REG(1, gx->cpEnable);
if (BreakPointCB != NULL) {
OSClearContext(&exceptionContext);
OSSetCurrentContext(&exceptionContext);
BreakPointCB();
OSClearContext(&exceptionContext);
OSSetCurrentContext(context);
}
gx->cpEnable = gx->cpEnable & 0xFFFFFFDF;
__cpReg[1] = gx->cpEnable;
if (BreakPointCB != NULL) {
OSClearContext(&exceptionContext);
OSSetCurrentContext(&exceptionContext);
BreakPointCB();
OSClearContext(&exceptionContext);
OSSetCurrentContext(context);
}
}
static void GXCPInterruptHandler(s16 interrupt, OSContext *context)