From bc8945eb3af5ce46aac0fcddec386c603b20f1a6 Mon Sep 17 00:00:00 2001 From: Dragorn421 Date: Fri, 27 Sep 2024 05:58:43 +0200 Subject: [PATCH] [headers] Move libultra protos to ultra64.h (as a temporary measure) (#2234) * [headers] Move libultra protos to ultra64.h (as a temporary measure) * format ultra64.h * bss * bss * bss --- include/functions.h | 183 -------------------- include/ultra64.h | 181 +++++++++++++++++++ src/boot/z_std_dma.c | 2 +- src/code/main.c | 2 +- src/code/sys_math3d.c | 2 +- src/code/z_camera.c | 2 +- src/code/z_kaleido_scope_call.c | 5 +- src/code/z_kankyo.c | 7 +- src/overlays/actors/ovl_Boss_Va/z_boss_va.c | 3 +- src/overlays/actors/ovl_Fishing/z_fishing.c | 2 +- 10 files changed, 194 insertions(+), 195 deletions(-) diff --git a/include/functions.h b/include/functions.h index 1cc6278cab..e3216f105c 100644 --- a/include/functions.h +++ b/include/functions.h @@ -33,89 +33,6 @@ void LogUtils_LogThreadId(const char* name, int line); #endif void LogUtils_HungupThread(const char* name, int line); void LogUtils_ResetHungup(void); -void __osPiCreateAccessQueue(void); -void __osPiGetAccess(void); -void __osPiRelAccess(void); -s32 osSendMesg(OSMesgQueue* mq, OSMesg msg, s32 flag); -void osStopThread(OSThread* thread); -void osViExtendVStart(u32 value); -s32 osRecvMesg(OSMesgQueue* mq, OSMesg* msg, s32 flag); -#if PLATFORM_N64 -void osInitialize(void); -#else -#define osInitialize() \ -{ \ - __osInitialize_common(); \ - __osInitialize_autodetect(); \ -} -#endif -void __osInitialize_common(void); -void __osInitialize_autodetect(void); -void __osEnqueueAndYield(OSThread**); -void __osEnqueueThread(OSThread**, OSThread*); -OSThread* __osPopThread(OSThread**); -void __osDispatchThread(void); -void __osCleanupThread(void); -void __osDequeueThread(OSThread** queue, OSThread* thread); -void osDestroyThread(OSThread* thread); -void osCreateThread(OSThread* thread, OSId id, void (*entry)(void*), void* arg, void* sp, OSPri pri); -void __osSetSR(u32); -u32 __osGetSR(void); -void osWritebackDCache(void* vaddr, s32 nbytes); -void* osViGetNextFramebuffer(void); -void osCreatePiManager(OSPri pri, OSMesgQueue* cmdQueue, OSMesg* cmdBuf, s32 cmdMsgCnt); -void __osDevMgrMain(void* arg); -s32 __osPiRawStartDma(s32 dir, u32 cartAddr, void* dramAddr, size_t size); -u32 osVirtualToPhysical(void* vaddr); -void osViBlack(u8 active); -s32 __osSiRawReadIo(void* devAddr, u32* dst); -OSId osGetThreadId(OSThread* thread); -void osViSetMode(OSViMode* mode); -u32 __osProbeTLB(void*); -u32 osGetMemSize(void); -void osSetEventMesg(OSEvent e, OSMesgQueue* mq, OSMesg msg); -void osUnmapTLBAll(void); -s32 osEPiStartDma(OSPiHandle* handle, OSIoMesg* mb, s32 direction); -void osInvalICache(void* vaddr, s32 nbytes); -void osCreateMesgQueue(OSMesgQueue* mq, OSMesg* msg, s32 count); -void osInvalDCache(void* vaddr, s32 nbytes); -s32 __osSiDeviceBusy(void); -s32 osJamMesg(OSMesgQueue* mq, OSMesg msg, s32 flag); -void osSetThreadPri(OSThread* thread, OSPri pri); -OSPri osGetThreadPri(OSThread* thread); -s32 __osEPiRawReadIo(OSPiHandle* handle, u32 devAddr, u32* data); -void osViSwapBuffer(void* frameBufPtr); -s32 __osEPiRawStartDma(OSPiHandle* handle, s32 direction, u32 cartAddr, void* dramAddr, size_t size); -OSTime osGetTime(void); -void osSetTime(OSTime time); -void __osTimerServicesInit(void); -void __osTimerInterrupt(void); -void __osSetTimerIntr(OSTime time); -OSTime __osInsertTimer(OSTimer* timer); -u32 osGetCount(void); -void __osSetCompare(u32); -s32 __osDisableInt(void); -void __osRestoreInt(s32); -void __osViInit(void); -void __osViSwapContext(void); -OSMesgQueue* osPiGetCmdQueue(void); -s32 osEPiReadIo(OSPiHandle* handle, u32 devAddr, u32* data); -void osViSetSpecialFeatures(u32 func); -OSPiHandle* osCartRomInit(void); -void __osSetFpcCsr(u32); -u32 __osGetFpcCsr(void); -s32 osEPiWriteIo(OSPiHandle* handle, u32 devAddr, u32 data); -void osMapTLBRdb(void); -void osYieldThread(void); -u32 __osGetCause(void); -s32 __osEPiRawWriteIo(OSPiHandle* handle, u32 devAddr, u32 data); -s32 __osSiRawWriteIo(void* devAddr, u32 val); -void osCreateViManager(OSPri pri); -OSViContext* __osViGetCurrentContext(void); -void osStartThread(OSThread* thread); -void osViSetYScale(f32 scale); -void osViSetXScale(f32 value); -void __osSetWatchLo(u32); EnItem00* Item_DropCollectible(PlayState* play, Vec3f* spawnPos, s16 params); EnItem00* Item_DropCollectible2(PlayState* play, Vec3f* spawnPos, s16 params); @@ -840,106 +757,6 @@ s8 PadUtils_GetRelY(Input* input); void PadUtils_UpdateRelXY(Input* input); s32 PadSetup_Init(OSMesgQueue* mq, u8* outMask, OSContStatus* status); -s32 osPfsFreeBlocks(OSPfs* pfs, s32* leftoverBytes); -void guScale(Mtx* m, f32 x, f32 y, f32 z); -OSTask* _VirtualToPhysicalTask(OSTask* intp); -void osSpTaskLoad(OSTask* intp); -void osSpTaskStartGo(OSTask* tp); -void __osSiCreateAccessQueue(void); -void __osSiGetAccess(void); -void __osSiRelAccess(void); -s32 osContInit(OSMesgQueue* mq, u8* ctlBitfield, OSContStatus* status); -void __osContGetInitData(u8* ctlBitfield, OSContStatus* data); -void __osPackRequestData(u8 poll); -s32 osContStartReadData(OSMesgQueue* mq); -void osContGetReadData(OSContPad* contData); -void __osPackReadData(void); -void guPerspectiveF(f32 mf[4][4], u16* perspNorm, f32 fovy, f32 aspect, f32 near, f32 far, f32 scale); -void guPerspective(Mtx* m, u16* perspNorm, f32 fovy, f32 aspect, f32 near, f32 far, f32 scale); -s32 __osSpRawStartDma(s32 direction, void* devAddr, void* dramAddr, u32 size); -s32 __osSiRawStartDma(s32 dir, void* addr); -void osSpTaskYield(void); -s32 __osPfsGetNextPage(OSPfs* pfs, u8* bank, __OSInode* inode, __OSInodeUnit* page); -s32 osPfsReadWriteFile(OSPfs* pfs, s32 fileNo, u8 flag, s32 offset, s32 size, u8* data); -s32 __osPfsGetStatus(OSMesgQueue* queue, s32 channel); -void __osPfsRequestOneChannel(s32 channel, u8 cmd); -void __osPfsGetOneChannelData(s32 channel, OSContStatus* contData); -void guMtxIdentF(f32 mf[4][4]); -void guLookAtF(f32 mf[4][4], f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, f32 xUp, f32 yUp, f32 zUp); -void guLookAt(Mtx*, f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, f32 xUp, f32 yUp, f32 zUp); -s32 osPfsAllocateFile(OSPfs* pfs, u16 companyCode, u32 gameCode, u8* gameName, u8* extName, s32 fileSize, s32* fileNo); -s32 __osPfsDeclearPage(OSPfs* pfs, __OSInode* inode, s32 fileSizeInPages, s32* startPage, u8 bank, s32* decleared, - s32* finalPage); -s32 osStopTimer(OSTimer* timer); -u16 __osSumcalc(u8* ptr, s32 length); -s32 __osIdCheckSum(u16* ptr, u16* checkSum, u16* idSum); -s32 __osRepairPackId(OSPfs* pfs, __OSPackId* badid, __OSPackId* newid); -s32 __osCheckPackId(OSPfs* pfs, __OSPackId* check); -s32 __osGetId(OSPfs* pfs); -s32 __osCheckId(OSPfs* pfs); -s32 __osPfsRWInode(OSPfs* pfs, __OSInode* inode, u8 flag, u8 bank); -void guMtxL2F(f32 mf[4][4], Mtx* m); -s32 osPfsFindFile(OSPfs* pfs, u16 companyCode, u32 gameCode, u8* gameName, u8* extName, s32* fileNo); -s32 osAfterPreNMI(void); -s32 osContStartQuery(OSMesgQueue* mq); -void osContGetQuery(OSContStatus* data); -void guLookAtHiliteF(f32 mf[4][4], LookAt* l, Hilite* h, f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, - f32 xUp, f32 yUp, f32 zUp, f32 xl1, f32 yl1, f32 zl1, f32 xl2, f32 yl2, f32 zl2, s32 hiliteWidth, - s32 hiliteHeight); -void guLookAtHilite(Mtx* m, LookAt* l, Hilite* h, f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, f32 xUp, - f32 yUp, f32 zUp, f32 xl1, f32 yl1, f32 zl1, f32 xl2, f32 yl2, f32 zl2, s32 hiliteWidth, - s32 hiliteHeight); -u32 __osSpDeviceBusy(void); -void guMtxIdent(Mtx*); -void guPositionF(f32 mf[4][4], f32 rot, f32 pitch, f32 yaw, f32 scale, f32 x, f32 y, f32 z); -void guPosition(Mtx*, f32, f32, f32, f32, f32, f32, f32); -OSYieldResult osSpTaskYielded(OSTask* task); -void guRotateF(f32 m[4][4], f32 a, f32 x, f32 y, f32 z); -void guRotate(Mtx*, f32 a, f32 x, f32 y, f32 z); -s32 osAiSetFrequency(u32 frequency); -OSThread* __osGetActiveQueue(void); -void guNormalize(f32* x, f32* y, f32* z); -u32 osDpGetStatus(void); -void osDpSetStatus(u32 status); -s32 osPfsDeleteFile(OSPfs* pfs, u16 companyCode, u32 gameCode, u8* gameName, u8* extName); -s32 __osPfsReleasePages(OSPfs* pfs, __OSInode* inode, u8 initialPage, u8 bank, __OSInodeUnit* finalPage); -void guOrthoF(f32[4][4], f32, f32, f32, f32, f32, f32, f32); -void guOrtho(Mtx*, f32, f32, f32, f32, f32, f32, f32); -void osViSetEvent(OSMesgQueue* mq, OSMesg msg, u32 retraceCount); -s32 osPfsIsPlug(OSMesgQueue* mq, u8* pattern); -void __osPfsRequestData(u8 cmd); -void __osPfsGetInitData(u8* pattern, OSContStatus* contData); -void guS2DInitBg(uObjBg* bg); -s32 __osPfsSelectBank(OSPfs* pfs, u8 bank); -s32 osContSetCh(u8 ch); -s32 osPfsFileState(OSPfs* pfs, s32 fileNo, OSPfsState* state); -s32 osPfsInitPak(OSMesgQueue* queue, OSPfs* pfs, s32 channel); -s32 __osPfsCheckRamArea(OSPfs* pfs); -s32 osPfsChecker(OSPfs* pfs); -s32 func_80105788(OSPfs* pfs, __OSInodeCache* cache); -s32 func_80105A60(OSPfs* pfs, __OSInodeUnit fpage, __OSInodeCache* cache); -u32 osAiGetLength(void); -void guTranslate(Mtx* m, f32 x, f32 y, f32 z); -s32 __osContRamWrite(OSMesgQueue* mq, s32 channel, u16 address, u8* buffer, s32 force); -s32 __osContRamRead(OSMesgQueue* ctrlrqueue, s32 channel, u16 addr, u8* data); -u8 __osContAddressCrc(u16 addr); -u8 __osContDataCrc(u8* data); -s32 osSetTimer(OSTimer* timer, OSTime countdown, OSTime interval, OSMesgQueue* mq, OSMesg msg); -u32 __osSpGetStatus(void); -void __osSpSetStatus(u32 status); -void osWritebackDCacheAll(void); -OSThread* __osGetCurrFaultedThread(void); -void guMtxF2L(f32 mf[4][4], Mtx* m); -// ? __d_to_ll(?); -// ? __f_to_ll(?); -// ? __d_to_ull(?); -// ? __f_to_ull(?); -// ? __ll_to_d(?); -// ? __ll_to_f(?); -// ? __ull_to_d(?); -// ? __ull_to_f(?); -void* osViGetCurrentFramebuffer(void); -s32 __osSpSetPc(void* pc); f32 absf(f32); void Regs_InitData(PlayState* play); diff --git a/include/ultra64.h b/include/ultra64.h index ed88bcb0f6..e1f9a7c9b9 100644 --- a/include/ultra64.h +++ b/include/ultra64.h @@ -32,4 +32,185 @@ #include "ultra64/R4300.h" #include "ultra64/ucode.h" +union uObjBg; + +void __osPiCreateAccessQueue(void); +void __osPiGetAccess(void); +void __osPiRelAccess(void); +s32 osSendMesg(OSMesgQueue* mq, OSMesg msg, s32 flag); +void osStopThread(OSThread* thread); +void osViExtendVStart(u32 value); +s32 osRecvMesg(OSMesgQueue* mq, OSMesg* msg, s32 flag); + +#if PLATFORM_N64 +void osInitialize(void); +#else +#define osInitialize() \ + { \ + __osInitialize_common(); \ + __osInitialize_autodetect(); \ + } +#endif + +void __osInitialize_common(void); +void __osInitialize_autodetect(void); +void __osEnqueueAndYield(OSThread**); +void __osEnqueueThread(OSThread**, OSThread*); +OSThread* __osPopThread(OSThread**); +void __osDispatchThread(void); +void __osCleanupThread(void); +void __osDequeueThread(OSThread** queue, OSThread* thread); +void osDestroyThread(OSThread* thread); +void osCreateThread(OSThread* thread, OSId id, void (*entry)(void*), void* arg, void* sp, OSPri pri); +void __osSetSR(u32); +u32 __osGetSR(void); +void osWritebackDCache(void* vaddr, s32 nbytes); +void* osViGetNextFramebuffer(void); +void osCreatePiManager(OSPri pri, OSMesgQueue* cmdQueue, OSMesg* cmdBuf, s32 cmdMsgCnt); +void __osDevMgrMain(void* arg); +s32 __osPiRawStartDma(s32 dir, u32 cartAddr, void* dramAddr, size_t size); +u32 osVirtualToPhysical(void* vaddr); +void osViBlack(u8 active); +s32 __osSiRawReadIo(void* devAddr, u32* dst); +OSId osGetThreadId(OSThread* thread); +void osViSetMode(OSViMode* mode); +u32 __osProbeTLB(void*); +u32 osGetMemSize(void); +void osSetEventMesg(OSEvent e, OSMesgQueue* mq, OSMesg msg); +void osUnmapTLBAll(void); +s32 osEPiStartDma(OSPiHandle* handle, OSIoMesg* mb, s32 direction); +void osInvalICache(void* vaddr, s32 nbytes); +void osCreateMesgQueue(OSMesgQueue* mq, OSMesg* msg, s32 count); +void osInvalDCache(void* vaddr, s32 nbytes); +s32 __osSiDeviceBusy(void); +s32 osJamMesg(OSMesgQueue* mq, OSMesg msg, s32 flag); +void osSetThreadPri(OSThread* thread, OSPri pri); +OSPri osGetThreadPri(OSThread* thread); +s32 __osEPiRawReadIo(OSPiHandle* handle, u32 devAddr, u32* data); +void osViSwapBuffer(void* frameBufPtr); +s32 __osEPiRawStartDma(OSPiHandle* handle, s32 direction, u32 cartAddr, void* dramAddr, size_t size); +OSTime osGetTime(void); +void osSetTime(OSTime time); +void __osTimerServicesInit(void); +void __osTimerInterrupt(void); +void __osSetTimerIntr(OSTime time); +OSTime __osInsertTimer(OSTimer* timer); +u32 osGetCount(void); +void __osSetCompare(u32); +s32 __osDisableInt(void); +void __osRestoreInt(s32); +void __osViInit(void); +void __osViSwapContext(void); +OSMesgQueue* osPiGetCmdQueue(void); +s32 osEPiReadIo(OSPiHandle* handle, u32 devAddr, u32* data); +void osViSetSpecialFeatures(u32 func); +OSPiHandle* osCartRomInit(void); +void __osSetFpcCsr(u32); +u32 __osGetFpcCsr(void); +s32 osEPiWriteIo(OSPiHandle* handle, u32 devAddr, u32 data); +void osMapTLBRdb(void); +void osYieldThread(void); +u32 __osGetCause(void); +s32 __osEPiRawWriteIo(OSPiHandle* handle, u32 devAddr, u32 data); +s32 __osSiRawWriteIo(void* devAddr, u32 val); +void osCreateViManager(OSPri pri); +OSViContext* __osViGetCurrentContext(void); +void osStartThread(OSThread* thread); +void osViSetYScale(f32 scale); +void osViSetXScale(f32 value); +void __osSetWatchLo(u32); + +s32 osPfsFreeBlocks(OSPfs* pfs, s32* leftoverBytes); +void guScale(Mtx* m, f32 x, f32 y, f32 z); +OSTask* _VirtualToPhysicalTask(OSTask* intp); +void osSpTaskLoad(OSTask* intp); +void osSpTaskStartGo(OSTask* tp); +void __osSiCreateAccessQueue(void); +void __osSiGetAccess(void); +void __osSiRelAccess(void); +s32 osContInit(OSMesgQueue* mq, u8* ctlBitfield, OSContStatus* status); +void __osContGetInitData(u8* ctlBitfield, OSContStatus* data); +void __osPackRequestData(u8 poll); +s32 osContStartReadData(OSMesgQueue* mq); +void osContGetReadData(OSContPad* contData); +void __osPackReadData(void); +void guPerspectiveF(f32 mf[4][4], u16* perspNorm, f32 fovy, f32 aspect, f32 near, f32 far, f32 scale); +void guPerspective(Mtx* m, u16* perspNorm, f32 fovy, f32 aspect, f32 near, f32 far, f32 scale); +s32 __osSpRawStartDma(s32 direction, void* devAddr, void* dramAddr, u32 size); +s32 __osSiRawStartDma(s32 dir, void* addr); +void osSpTaskYield(void); +s32 __osPfsGetNextPage(OSPfs* pfs, u8* bank, __OSInode* inode, __OSInodeUnit* page); +s32 osPfsReadWriteFile(OSPfs* pfs, s32 fileNo, u8 flag, s32 offset, s32 size, u8* data); +s32 __osPfsGetStatus(OSMesgQueue* queue, s32 channel); +void __osPfsRequestOneChannel(s32 channel, u8 cmd); +void __osPfsGetOneChannelData(s32 channel, OSContStatus* contData); +void guMtxIdentF(f32 mf[4][4]); +void guLookAtF(f32 mf[4][4], f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, f32 xUp, f32 yUp, f32 zUp); +void guLookAt(Mtx*, f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, f32 xUp, f32 yUp, f32 zUp); +s32 osPfsAllocateFile(OSPfs* pfs, u16 companyCode, u32 gameCode, u8* gameName, u8* extName, s32 fileSize, s32* fileNo); +s32 __osPfsDeclearPage(OSPfs* pfs, __OSInode* inode, s32 fileSizeInPages, s32* startPage, u8 bank, s32* decleared, + s32* finalPage); +s32 osStopTimer(OSTimer* timer); +u16 __osSumcalc(u8* ptr, s32 length); +s32 __osIdCheckSum(u16* ptr, u16* checkSum, u16* idSum); +s32 __osRepairPackId(OSPfs* pfs, __OSPackId* badid, __OSPackId* newid); +s32 __osCheckPackId(OSPfs* pfs, __OSPackId* check); +s32 __osGetId(OSPfs* pfs); +s32 __osCheckId(OSPfs* pfs); +s32 __osPfsRWInode(OSPfs* pfs, __OSInode* inode, u8 flag, u8 bank); +void guMtxL2F(f32 mf[4][4], Mtx* m); +s32 osPfsFindFile(OSPfs* pfs, u16 companyCode, u32 gameCode, u8* gameName, u8* extName, s32* fileNo); +s32 osAfterPreNMI(void); +s32 osContStartQuery(OSMesgQueue* mq); +void osContGetQuery(OSContStatus* data); +void guLookAtHiliteF(f32 mf[4][4], LookAt* l, Hilite* h, f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, + f32 xUp, f32 yUp, f32 zUp, f32 xl1, f32 yl1, f32 zl1, f32 xl2, f32 yl2, f32 zl2, s32 hiliteWidth, + s32 hiliteHeight); +void guLookAtHilite(Mtx* m, LookAt* l, Hilite* h, f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, f32 xUp, + f32 yUp, f32 zUp, f32 xl1, f32 yl1, f32 zl1, f32 xl2, f32 yl2, f32 zl2, s32 hiliteWidth, + s32 hiliteHeight); +u32 __osSpDeviceBusy(void); +void guMtxIdent(Mtx*); +void guPositionF(f32 mf[4][4], f32 rot, f32 pitch, f32 yaw, f32 scale, f32 x, f32 y, f32 z); +void guPosition(Mtx*, f32, f32, f32, f32, f32, f32, f32); +OSYieldResult osSpTaskYielded(OSTask* task); +void guRotateF(f32 m[4][4], f32 a, f32 x, f32 y, f32 z); +void guRotate(Mtx*, f32 a, f32 x, f32 y, f32 z); +s32 osAiSetFrequency(u32 frequency); +OSThread* __osGetActiveQueue(void); +void guNormalize(f32* x, f32* y, f32* z); +u32 osDpGetStatus(void); +void osDpSetStatus(u32 status); +s32 osPfsDeleteFile(OSPfs* pfs, u16 companyCode, u32 gameCode, u8* gameName, u8* extName); +s32 __osPfsReleasePages(OSPfs* pfs, __OSInode* inode, u8 initialPage, u8 bank, __OSInodeUnit* finalPage); +void guOrthoF(f32[4][4], f32, f32, f32, f32, f32, f32, f32); +void guOrtho(Mtx*, f32, f32, f32, f32, f32, f32, f32); +void osViSetEvent(OSMesgQueue* mq, OSMesg msg, u32 retraceCount); +s32 osPfsIsPlug(OSMesgQueue* mq, u8* pattern); +void __osPfsRequestData(u8 cmd); +void __osPfsGetInitData(u8* pattern, OSContStatus* contData); +void guS2DInitBg(union uObjBg* bg); +s32 __osPfsSelectBank(OSPfs* pfs, u8 bank); +s32 osContSetCh(u8 ch); +s32 osPfsFileState(OSPfs* pfs, s32 fileNo, OSPfsState* state); +s32 osPfsInitPak(OSMesgQueue* queue, OSPfs* pfs, s32 channel); +s32 __osPfsCheckRamArea(OSPfs* pfs); +s32 osPfsChecker(OSPfs* pfs); +s32 func_80105788(OSPfs* pfs, __OSInodeCache* cache); +s32 func_80105A60(OSPfs* pfs, __OSInodeUnit fpage, __OSInodeCache* cache); +u32 osAiGetLength(void); +void guTranslate(Mtx* m, f32 x, f32 y, f32 z); +s32 __osContRamWrite(OSMesgQueue* mq, s32 channel, u16 address, u8* buffer, s32 force); +s32 __osContRamRead(OSMesgQueue* ctrlrqueue, s32 channel, u16 addr, u8* data); +u8 __osContAddressCrc(u16 addr); +u8 __osContDataCrc(u8* data); +s32 osSetTimer(OSTimer* timer, OSTime countdown, OSTime interval, OSMesgQueue* mq, OSMesg msg); +u32 __osSpGetStatus(void); +void __osSpSetStatus(u32 status); +void osWritebackDCacheAll(void); +OSThread* __osGetCurrFaultedThread(void); +void guMtxF2L(f32 mf[4][4], Mtx* m); +void* osViGetCurrentFramebuffer(void); +s32 __osSpSetPc(void* pc); + #endif diff --git a/src/boot/z_std_dma.c b/src/boot/z_std_dma.c index 55e04ca848..9e533b4262 100644 --- a/src/boot/z_std_dma.c +++ b/src/boot/z_std_dma.c @@ -27,7 +27,7 @@ #endif #pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \ - "ntsc-1.2:100" + "ntsc-1.2:98" StackEntry sDmaMgrStackInfo; OSMesgQueue sDmaMgrMsgQueue; diff --git a/src/code/main.c b/src/code/main.c index 22816c230c..85c629a898 100644 --- a/src/code/main.c +++ b/src/code/main.c @@ -22,7 +22,7 @@ extern struct IrqMgr gIrqMgr; #include "n64dd.h" #endif -#pragma increment_block_number "gc-eu:160 gc-eu-mq:160 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" \ +#pragma increment_block_number "gc-eu:160 gc-eu-mq:160 gc-jp:160 gc-jp-ce:160 gc-jp-mq:160 gc-us:160 gc-us-mq:160" \ "ntsc-1.2:158" extern u8 _buffersSegmentEnd[]; diff --git a/src/code/sys_math3d.c b/src/code/sys_math3d.c index c0ebcea868..eefc4a9de2 100644 --- a/src/code/sys_math3d.c +++ b/src/code/sys_math3d.c @@ -5,7 +5,7 @@ #include "macros.h" #include "sys_math3d.h" -#pragma increment_block_number "gc-eu:106 gc-eu-mq:106 gc-jp:106 gc-jp-ce:106 gc-jp-mq:106 gc-us:106 gc-us-mq:106" \ +#pragma increment_block_number "gc-eu:104 gc-eu-mq:104 gc-jp:104 gc-jp-ce:104 gc-jp-mq:104 gc-us:104 gc-us-mq:104" \ "ntsc-1.2:79" s32 Math3D_LineVsLineClosestTwoPoints(Vec3f* lineAPointA, Vec3f* lineAPointB, Vec3f* lineBPointA, Vec3f* lineBPointB, diff --git a/src/code/z_camera.c b/src/code/z_camera.c index 8653390223..3309732164 100644 --- a/src/code/z_camera.c +++ b/src/code/z_camera.c @@ -3638,7 +3638,7 @@ s32 Camera_KeepOn3(Camera* camera) { } #pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \ - "ntsc-1.2:102" + "ntsc-1.2:100" s32 Camera_KeepOn4(Camera* camera) { static Vec3f D_8015BD50; diff --git a/src/code/z_kaleido_scope_call.c b/src/code/z_kaleido_scope_call.c index e97c8a8cf0..6be6d15f58 100644 --- a/src/code/z_kaleido_scope_call.c +++ b/src/code/z_kaleido_scope_call.c @@ -1,9 +1,8 @@ +#pragma increment_block_number "gc-eu:224 gc-eu-mq:224 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ntsc-1.2:0" + #include "global.h" #include "terminal.h" -#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \ - "ntsc-1.2:128" - void (*sKaleidoScopeUpdateFunc)(PlayState* play); void (*sKaleidoScopeDrawFunc)(PlayState* play); f32 gBossMarkScale; diff --git a/src/code/z_kankyo.c b/src/code/z_kankyo.c index ab69972d29..315b32eabb 100644 --- a/src/code/z_kankyo.c +++ b/src/code/z_kankyo.c @@ -1,3 +1,6 @@ +#pragma increment_block_number "gc-eu:248 gc-eu-mq:248 gc-jp:240 gc-jp-ce:240 gc-jp-mq:240 gc-us:240 gc-us-mq:240" \ + "ntsc-1.2:0" + #include "global.h" #include "ultra64.h" #include "terminal.h" @@ -7,8 +10,6 @@ #include "assets/objects/gameplay_keep/gameplay_keep.h" #include "assets/objects/gameplay_field_keep/gameplay_field_keep.h" -#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ntsc-1.2:0" - typedef enum LightningBoltState { /* 0x00 */ LIGHTNING_BOLT_START, /* 0x01 */ LIGHTNING_BOLT_WAIT, @@ -212,7 +213,7 @@ s16 sLightningFlashAlpha; s16 sSunDepthTestX; s16 sSunDepthTestY; -#pragma increment_block_number "gc-eu:239 gc-eu-mq:239 gc-jp:216 gc-jp-ce:216 gc-jp-mq:216 gc-us:216 gc-us-mq:216" \ +#pragma increment_block_number "gc-eu:240 gc-eu-mq:240 gc-jp:224 gc-jp-ce:224 gc-jp-mq:224 gc-us:224 gc-us-mq:224" \ "ntsc-1.2:216" LightNode* sNGameOverLightNode; diff --git a/src/overlays/actors/ovl_Boss_Va/z_boss_va.c b/src/overlays/actors/ovl_Boss_Va/z_boss_va.c index c073b21212..5fc0865c51 100644 --- a/src/overlays/actors/ovl_Boss_Va/z_boss_va.c +++ b/src/overlays/actors/ovl_Boss_Va/z_boss_va.c @@ -9,7 +9,8 @@ #include "overlays/actors/ovl_En_Boom/z_en_boom.h" #include "assets/objects/gameplay_keep/gameplay_keep.h" -#pragma increment_block_number "gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128 ntsc-1.2:128" +#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \ + "ntsc-1.2:128" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_5) diff --git a/src/overlays/actors/ovl_Fishing/z_fishing.c b/src/overlays/actors/ovl_Fishing/z_fishing.c index 9ef31ae687..8f4b37817d 100644 --- a/src/overlays/actors/ovl_Fishing/z_fishing.c +++ b/src/overlays/actors/ovl_Fishing/z_fishing.c @@ -16,7 +16,7 @@ #include "cic6105.h" #endif -#pragma increment_block_number "gc-eu:123 gc-eu-mq:123 gc-jp:125 gc-jp-ce:125 gc-jp-mq:125 gc-us:125 gc-us-mq:125" +#pragma increment_block_number "gc-eu:121 gc-eu-mq:121 gc-jp:123 gc-jp-ce:123 gc-jp-mq:123 gc-us:123 gc-us-mq:123" #define FLAGS ACTOR_FLAG_4