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

@ -0,0 +1,40 @@
#include "TRK_MINNOW_DOLPHIN/MetroTRK/Portable/notify.h"
#include "TRK_MINNOW_DOLPHIN/MetroTRK/Portable/msgbuf.h"
#include "TRK_MINNOW_DOLPHIN/MetroTRK/Portable/support.h"
#include "TRK_MINNOW_DOLPHIN/ppc/Generic/targimpl.h"
#include "PowerPC_EABI_Support/MetroTRK/trk.h"
DSError TRKDoNotifyStopped(MessageCommandID cmd)
{
DSError err;
int reqIdx;
int bufIdx;
TRKBuffer* msg;
err = TRKGetFreeBuffer(&bufIdx, &msg);
if (err == DS_NoError) {
if (msg->position >= 0x880) {
err = DS_MessageBufferOverflow;
} else {
msg->data[msg->position++] = cmd;
++msg->length;
err = 0;
}
if (err == DS_NoError) {
if (cmd == DSMSG_NotifyStopped) {
TRKTargetAddStopInfo(msg);
} else {
TRKTargetAddExceptionInfo(msg);
}
}
err = TRKRequestSend(msg, &reqIdx, 2, 3, 1);
if (err == DS_NoError) {
TRKReleaseBuffer(reqIdx);
}
TRKReleaseBuffer(bufIdx);
}
return err;
}