libultra voice OK (#1264)

* Import all libultra voice code

* Libultra voice cleanup

* more cleanup

* more cleanup/docs

* cleanup variables.h

* File:

* PR review 1

* adjust comment

* more review

* More (p)

* SWRITEFORMAT

* consistent spacing

* fix bss

---------

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
Co-authored-by: angie <angheloalf95@gmail.com>
This commit is contained in:
engineer124
2023-06-10 10:31:05 -04:00
committed by GitHub
co-authored by Derek Hensley angie
parent 8672dc0a57
commit 47be99fb0c
31 changed files with 1170 additions and 99 deletions
-17
View File
@@ -157,7 +157,6 @@ void osStopThread(OSThread* t);
s32 osRecvMesg(OSMesgQueue* mq, OSMesg* msg, s32 flags);
OSIntMask osSetIntMask(OSIntMask im);
// OSIntMask osGetIntMask(void);
// void osVoiceSetWord(void);
void guScale(Mtx* mtx, f32 x, f32 y, f32 z);
f32 sinf(f32 __x);
s16 sins(u16 x);
@@ -186,7 +185,6 @@ void __osDispatchThread(void);
void __osCleanupThread(void);
void __osDequeueThread(OSThread** queue, OSThread* t);
void osDestroyThread(OSThread* t);
// void __osVoiceCheckResult(void);
void bzero(void* begin, s32 length);
void __osSiCreateAccessQueue(void);
@@ -199,7 +197,6 @@ void osCreateThread(OSThread* t, OSId id, void* entry, void* arg, void* sp, OSPr
s32 osContStartReadData(OSMesgQueue* mq);
void osContGetReadData(OSContPad* data);
void __osPackReadData(void);
// void osVoiceGetReadData(void);
uintptr_t osVirtualToPhysical(void* virtualAddress);
u32 __osGetSR(void);
void __osSetSR(u32 value);
@@ -258,11 +255,8 @@ void guLookAtHiliteF(float mf[4][4], LookAt* l, Hilite* h, f32 xEye, f32 yEye, f
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);
s32 _Printf(PrintCallback pfn, void* arg, const char* fmt, va_list ap);
void _Putfld(_Pft* px, va_list* pap, u8 code, u8* ac);
// void osVoiceClearDictionary(void);
void osUnmapTLBAll(void);
s32 osEPiStartDma(OSPiHandle* pihandle, OSIoMesg* mb, s32 direction);
// void __osVoiceContRead2(void);
u8 __osVoiceContDataCrc(u8* data, size_t numBytes);
const char* strchr(const char* s, s32 c);
size_t strlen(const char* s);
void* memcpy(void* s1, const void* s2, size_t n);
@@ -273,7 +267,6 @@ void __osTimerServicesInit(void);
void __osTimerInterrupt(void);
void __osSetTimerIntr(OSTime tim);
OSTime __osInsertTimer(OSTimer* t);
// void __osVoiceContRead36(void);
s32 __osSpDeviceBusy(void);
s32 __osSiDeviceBusy(void);
void guMtxIdent(Mtx* mtx);
@@ -291,12 +284,9 @@ OSTime osGetTime(void);
void guRotateF(float m[4][4], f32 a, f32 x, f32 y, f32 z);
void guRotate(Mtx* m, f32 a, f32 x, f32 y, f32 z);
void __osSetGlobalIntMask(u32 mask);
s32 osVoiceInit(OSMesgQueue* mq, OSVoiceHandle* handle, s32 channel);
s32 __osContChannelReset(OSMesgQueue* mq, s32 channel);
// void __osVoiceSetADConverter(void);
s32 osAiSetFrequency(u32 frequency);
s32 __osContRamRead(OSMesgQueue* ctrlrqueue, s32 channel, u16 addr, u8* buffer);
// void __osVoiceContWrite20(void);
u8 __osContAddressCrc(u16 addr);
u8 __osContDataCrc(u8* data);
OSThread* __osGetActiveQueue(void);
@@ -321,12 +311,10 @@ s32 osEPiReadIo(OSPiHandle* handle, uintptr_t devAddr, u32* data);
void osViSetSpecialFeatures(u32 func);
s16 coss(u16 x);
void osSetTime(OSTime ticks);
// void osVoiceStopReadData(void);
void osViSetEvent(OSMesgQueue* mq, OSMesg m, u32 retraceCount);
s32 osPfsIsPlug(OSMesgQueue* mq, u8* pattern);
// void __osPfsRequestData(void);
// void __osPfsGetInitData(void);
s32 __osVoiceGetStatus(OSMesgQueue* mq, s32 port, u8* status);
OSPiHandle* osCartRomInit(void);
// void guS2DInitBg(void);
s32 __osPfsSelectBank(OSPfs* pfs, u8 bank);
@@ -360,7 +348,6 @@ void osCreateViManager(OSPri pri);
__OSViContext* __osViGetCurrentContext(void);
void osWritebackDCacheAll(void);
OSThread* __osGetCurrFaultedThread(void);
// void osVoiceMaskDictionary(void);
void guMtxF2L(float mf[4][4], Mtx* m);
void osStartThread(OSThread* t);
void osViSetYScale(f32 value);
@@ -373,12 +360,8 @@ double __ll_to_d(long long s);
float __ll_to_f(long long s);
double __ull_to_d(unsigned long long u);
float __ull_to_f(unsigned long long u);
// void osVoiceCheckWord(void);
// void osVoiceControlGain(void);
// void osVoiceStartReadData(void);
u32* osViGetCurrentFramebuffer(void);
s32 __osSpSetPc(void* pc);
// void __osVoiceContWrite4(void);
void __osGetHWIntrRoutine(s32 idx, OSMesgQueue** outQueue, OSMesg* outMsg);
void __osSetHWIntrRoutine(s32 idx, OSMesgQueue* queue, OSMesg msg);
u32 __osGetWatchLo(void);