mirror of
https://github.com/zeldaret/tww.git
synced 2026-09-07 19:10:43 -04:00
@@ -0,0 +1,30 @@
|
||||
#ifndef JASAICTRL_H
|
||||
#define JASAICTRL_H
|
||||
|
||||
#include "dolphin/types.h"
|
||||
|
||||
namespace JASystem {
|
||||
namespace Kernel {
|
||||
void init();
|
||||
void initSystem();
|
||||
void registerMixCallback(s16* (*)(s32), u8);
|
||||
void vframeWork();
|
||||
void updateDac();
|
||||
void mixMonoTrack(s16*, s32, s16* (*)(s32));
|
||||
void mixMonoTrackWide(s16*, s32, s16* (*)(s32));
|
||||
void mixExtraTrack(s16*, s32, s16* (*)(s32));
|
||||
void mixInterleaveTrack(s16*, s32, s16* (*)(s32));
|
||||
|
||||
extern s16* dac[3];
|
||||
extern int JASUniversalDacCounter;
|
||||
extern s16* lastRspMadep;
|
||||
extern s16* useRspMadep;
|
||||
extern int vframeWorkRunning;
|
||||
extern void (*dacCallbackFunc)(s16*, u32);
|
||||
extern int JASVframeCounter;
|
||||
extern s16* (*extMixCallback)(s32);
|
||||
extern u8 extMixMode;
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* JASAICTRL_H */
|
||||
@@ -0,0 +1,30 @@
|
||||
#ifndef JASAUDIOTHREAD_H
|
||||
#define JASAUDIOTHREAD_H
|
||||
|
||||
#include <dolphin/os/OSMessage.h>
|
||||
#include <dolphin/os/OSThread.h>
|
||||
|
||||
class JKRSolidHeap;
|
||||
|
||||
namespace JASystem {
|
||||
namespace TAudioThread {
|
||||
void syncAudio();
|
||||
void* audioproc(void*);
|
||||
void syncDSP(void*);
|
||||
void setPriority(u8, u8);
|
||||
void start(JKRSolidHeap*, u32, u32);
|
||||
|
||||
extern OSThread sAudioThread;
|
||||
extern u8 saAudioStack[4096];
|
||||
extern OSMessageQueue sAudioprocMQ;
|
||||
extern OSMessage saAudioMsgBuf[16];
|
||||
extern u32 sAudioprocMQInit;
|
||||
extern int sbIsPrioritySet;
|
||||
extern s32 sDSPPrio;
|
||||
extern s32 sDVDPrio;
|
||||
extern vs32 snIntCount;
|
||||
extern int sbIsDSPBoot;
|
||||
};
|
||||
}
|
||||
|
||||
#endif /* JASAUDIOTHREAD_H */
|
||||
@@ -0,0 +1,27 @@
|
||||
#ifndef JASCALLBACK_H
|
||||
#define JASCALLBACK_H
|
||||
|
||||
#include "dolphin/types.h"
|
||||
|
||||
namespace JASystem {
|
||||
namespace Kernel {
|
||||
void resetCallback();
|
||||
int checkCallback(s32 (*)(void*), void*);
|
||||
int registerDspCallback(s32 (*)(void*), void*);
|
||||
int registerSubFrameCallback(s32 (*)(void*), void*);
|
||||
void aiCallback();
|
||||
void subframeCallback();
|
||||
|
||||
struct unk_callList {
|
||||
/* 0x00 */ s32 (*field_0x0)(void*);
|
||||
/* 0x04 */ void* field_0x4;
|
||||
/* 0x08 */ u32 field_0x8;
|
||||
};
|
||||
|
||||
extern u32 maxCallbacksUser;
|
||||
extern unk_callList* callList;
|
||||
extern bool callbackInit;
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* JASCALLBACK_H */
|
||||
@@ -0,0 +1,38 @@
|
||||
#ifndef JASCMDSTACK_H
|
||||
#define JASCMDSTACK_H
|
||||
|
||||
#include "dolphin/types.h"
|
||||
|
||||
namespace JASystem {
|
||||
namespace Kernel {
|
||||
class TPortArgs;
|
||||
class TPortCmd;
|
||||
class TPortHead {
|
||||
public:
|
||||
/* 0x00 */ TPortCmd* field_0x0;
|
||||
/* 0x04 */ TPortCmd* field_0x4;
|
||||
};
|
||||
|
||||
class TPortCmd {
|
||||
public:
|
||||
TPortCmd();
|
||||
bool addPortCmdOnce();
|
||||
bool setPortCmd(void (*)(TPortArgs*), TPortArgs*);
|
||||
bool addPortCmd(TPortHead*);
|
||||
|
||||
/* 0x00 */ TPortHead* field_0x0;
|
||||
/* 0x04 */ TPortCmd* field_0x4;
|
||||
/* 0x08 */ void (*field_0x8)(TPortArgs*);
|
||||
/* 0x0C */ TPortArgs* field_0xc;
|
||||
};
|
||||
|
||||
void portCmdProcOnce(TPortHead*);
|
||||
void portCmdProcStay(TPortHead*);
|
||||
void portHeadInit(TPortHead*);
|
||||
void portCmdInit();
|
||||
TPortCmd* getPortCmd(TPortHead*);
|
||||
s32 portCmdMain(void*);
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* JASCMDSTACK_H */
|
||||
@@ -0,0 +1,24 @@
|
||||
#ifndef JASDSPBUF_H
|
||||
#define JASDSPBUF_H
|
||||
|
||||
#include "dolphin/types.h"
|
||||
|
||||
namespace JASystem {
|
||||
namespace TDSP_DACBuffer {
|
||||
void init();
|
||||
void updateDSP();
|
||||
s16* mixDSP(s32);
|
||||
void finishDSPFrame();
|
||||
|
||||
extern u8 numDSPBuf;
|
||||
extern int isInit;
|
||||
extern s16** dsp_buf;
|
||||
extern u8 writeBuffer;
|
||||
extern u8 readBuffer;
|
||||
extern u8 dspStatus;
|
||||
extern int dacSyncCounter;
|
||||
extern void (*callback)(s16*, u32);
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* JASDSPBUF_H */
|
||||
@@ -0,0 +1,69 @@
|
||||
#ifndef JASDSPCHANNEL_H
|
||||
#define JASDSPCHANNEL_H
|
||||
|
||||
#include "dolphin/os/OSTime.h"
|
||||
|
||||
namespace JASystem {
|
||||
namespace DSPInterface {
|
||||
class DSPBuffer;
|
||||
}
|
||||
|
||||
extern OSTick history[];
|
||||
extern f32 DSP_LIMIT_RATIO;
|
||||
extern OSTick old_time;
|
||||
|
||||
class TDSPChannel {
|
||||
public:
|
||||
void init(u8);
|
||||
int allocate(u32);
|
||||
void free();
|
||||
bool forceStop();
|
||||
void forceDelete();
|
||||
void play();
|
||||
void stop();
|
||||
static void initAll();
|
||||
static TDSPChannel* alloc(u32, u32);
|
||||
static int free(TDSPChannel*, u32);
|
||||
static TDSPChannel* getLower();
|
||||
static TDSPChannel* getLowerActive();
|
||||
static bool breakLower(u8);
|
||||
static bool breakLowerActive(u8);
|
||||
static void updateAll();
|
||||
void onUpdate(u32);
|
||||
static int getNumBreak();
|
||||
~TDSPChannel();
|
||||
TDSPChannel();
|
||||
|
||||
u8 getNumber() { return mNumber; }
|
||||
// TODO: inlines
|
||||
void checkSign(u32);
|
||||
void isFree();
|
||||
void getPriority();
|
||||
void getStatus();
|
||||
void getCBInterval();
|
||||
void decCBInterval();
|
||||
void getPriorityTime();
|
||||
void setCBInterval(u16);
|
||||
void setPriorityTime(u16);
|
||||
void setPriority(u8);
|
||||
void getLogicalChannel();
|
||||
void forceStop(TDSPChannel*);
|
||||
void release(TDSPChannel*, u32);
|
||||
|
||||
/* 0x00 */ u8 mNumber;
|
||||
/* 0x01 */ u8 field_0x1;
|
||||
/* 0x02 */ u8 field_0x2;
|
||||
/* 0x03 */ u8 field_0x3;
|
||||
/* 0x04 */ short field_0x4;
|
||||
/* 0x06 */ short field_0x6;
|
||||
/* 0x08 */ int field_0x8;
|
||||
/* 0x0C */ DSPInterface::DSPBuffer* field_0xc;
|
||||
/* 0x10 */ void* mCallback;
|
||||
|
||||
static int smnFree;
|
||||
static TDSPChannel* DSPCH;
|
||||
static int smnUse;
|
||||
};
|
||||
}
|
||||
|
||||
#endif /* JASDSPCHANNEL_H */
|
||||
@@ -0,0 +1,31 @@
|
||||
#ifndef JASDSPDRIVERIF_H
|
||||
#define JASDSPDRIVERIF_H
|
||||
|
||||
#include "dolphin/types.h"
|
||||
|
||||
namespace JASystem {
|
||||
namespace Driver {
|
||||
struct PanMatrix_ {
|
||||
/* 0x00 */ f32 field_0x0;
|
||||
/* 0x04 */ f32 field_0x4;
|
||||
/* 0x08 */ f32 field_0x8;
|
||||
};
|
||||
|
||||
void init();
|
||||
void setMixerLevel(f32, f32);
|
||||
u16 getChannelLevel();
|
||||
u16 getAutoLevel();
|
||||
void setOutputMode(u32);
|
||||
u32 getOutputMode();
|
||||
u8 getUpdateInterval();
|
||||
|
||||
extern u16 MAX_MIXERLEVEL;
|
||||
extern u16 MAX_AUTOMIXERLEVEL;
|
||||
extern u32 JAS_SYSTEM_OUTPUT_MODE;
|
||||
extern u8 JAS_UPDATE_INTERVAL;
|
||||
|
||||
extern int C5BASE_PITCHTABLE;
|
||||
};
|
||||
}
|
||||
|
||||
#endif /* JASDSPDRIVERIF_H */
|
||||
@@ -0,0 +1,44 @@
|
||||
#ifndef JASDVDTHREAD_H
|
||||
#define JASDVDTHREAD_H
|
||||
|
||||
#include "JSystem/JKernel/JKRThread.h"
|
||||
|
||||
class JASTaskThread : public JKRThread {
|
||||
public:
|
||||
class TCallStack {
|
||||
public:
|
||||
TCallStack(u32);
|
||||
~TCallStack();
|
||||
|
||||
/* 0x00 */ s32 (*field_0x0)(void*);
|
||||
/* 0x04 */ u8* argspace;
|
||||
};
|
||||
|
||||
JASTaskThread(u32 param_1, int param_2, s32 param_3) : JKRThread(param_1, param_2, param_3) {
|
||||
field_0x70 = 0;
|
||||
OSInitThreadQueue(&field_0x68);
|
||||
}
|
||||
~JASTaskThread();
|
||||
bool sendCmdMsg(s32 (*)(void*), void*, u32);
|
||||
void* run();
|
||||
void pause(bool);
|
||||
|
||||
/* 0x68 */ OSThreadQueue field_0x68;
|
||||
/* 0x70 */ u8 field_0x70;
|
||||
};
|
||||
|
||||
namespace JASystem {
|
||||
namespace Dvd {
|
||||
bool createThread(int, int, u32);
|
||||
void resumeThread();
|
||||
void sendCmdMsg(s32 (*)(void*), void*, u32);
|
||||
int checkPassDvdT(u32, u32*, void (*)(u32));
|
||||
u32 checkFile(char*);
|
||||
void unpauseDvdT();
|
||||
int dvdThreadCheckBack(void*);
|
||||
|
||||
extern JASTaskThread* sThread;
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* JASDVDTHREAD_H */
|
||||
@@ -0,0 +1,12 @@
|
||||
#ifndef JASKERNELDEBUG_H
|
||||
#define JASKERNELDEBUG_H
|
||||
|
||||
#include "dolphin/types.h"
|
||||
|
||||
namespace JASystem {
|
||||
namespace Kernel {
|
||||
void stackInit(u64*, u32);
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* JASKERNELDEBUG_H */
|
||||
@@ -0,0 +1,13 @@
|
||||
#ifndef JASPROBE_H
|
||||
#define JASPROBE_H
|
||||
|
||||
#include "dolphin/types.h"
|
||||
|
||||
namespace JASystem {
|
||||
namespace Kernel {
|
||||
void probeStart(s32, char*);
|
||||
void probeFinish(s32);
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* JASPROBE_H */
|
||||
@@ -0,0 +1,17 @@
|
||||
#ifndef JASRATE_H
|
||||
#define JASRATE_H
|
||||
|
||||
#include "dolphin/types.h"
|
||||
|
||||
namespace JASystem {
|
||||
namespace Kernel {
|
||||
extern f32 gDacRate;
|
||||
extern u32 gSubFrames;
|
||||
extern int gFrameSamples;
|
||||
extern u32 gDacSize;
|
||||
extern int gOutputRate;
|
||||
extern int gAiSetting;
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* JASRATE_H */
|
||||
Reference in New Issue
Block a user