match linker & some funcs (#572)

* name audio.c and board/audio.c

* fix audio, complete board/basic_space, battle

* revert changes that broke build

* completely finish New and NewMore.cp, for some reason NewMore fails checksum

* finally match NewMore.cp

* match NMWException.cpp

* match mem_TRK

* match TRK with correct linker, uses Revo's notify func
This commit is contained in:
CreateSource 2025-03-15 12:30:27 -04:00 committed by GitHub
parent eb11f9c23f
commit 705ebb8727
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 20 additions and 13 deletions

View file

@ -4,6 +4,19 @@
#include "TRK_MINNOW_DOLPHIN/ppc/Generic/targimpl.h"
#include "PowerPC_EABI_Support/MetroTRK/trk.h"
inline DSError TRKDoNotifyStopped_Inline(TRKBuffer* msg, MessageCommandID cmd) {
DSError err;
if (msg->position >= 0x880) {
err = DS_MessageBufferOverflow;
} else {
msg->data[msg->position++] = cmd;
msg->length+=1;
err = 0;
}
return err;
}
DSError TRKDoNotifyStopped(MessageCommandID cmd)
{
DSError err;
@ -13,13 +26,7 @@ DSError TRKDoNotifyStopped(MessageCommandID cmd)
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;
}
err = TRKDoNotifyStopped_Inline(msg, cmd);
if (err == DS_NoError) {
if (cmd == DSMSG_NotifyStopped) {