mirror of
https://github.com/zeldaret/tww.git
synced 2026-07-10 14:23:50 -04:00
@@ -0,0 +1,16 @@
|
||||
#ifndef JASBANK_H
|
||||
#define JASBANK_H
|
||||
|
||||
#include "dolphin/types.h"
|
||||
|
||||
class JKRHeap;
|
||||
|
||||
namespace JASystem {
|
||||
namespace TBank {
|
||||
JKRHeap* getCurrentHeap();
|
||||
|
||||
extern JKRHeap* sCurrentHeap;
|
||||
};
|
||||
}
|
||||
|
||||
#endif /* JASBANK_H */
|
||||
@@ -0,0 +1,22 @@
|
||||
#ifndef JASCALC_H
|
||||
#define JASCALC_H
|
||||
|
||||
#include "dolphin/types.h"
|
||||
|
||||
namespace JASystem {
|
||||
namespace Calc {
|
||||
void initSinfT();
|
||||
f32 sinfT(f32);
|
||||
f32 sinfDolby2(f32);
|
||||
void imixcopy(const s16*, const s16*, s16*, s32);
|
||||
void bcopyfast(const u32*, u32*, u32);
|
||||
void bcopy(const void*, void*, u32);
|
||||
void bzerofast(void*, u32);
|
||||
void bzero(void*, u32);
|
||||
|
||||
extern f32* JASC_SINTABLE;
|
||||
extern f32* JASC_DOL2TABLE;
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* JASCALC_H */
|
||||
@@ -0,0 +1,139 @@
|
||||
#ifndef JASDSPINTERFACE_H
|
||||
#define JASDSPINTERFACE_H
|
||||
|
||||
#include "dolphin/types.h"
|
||||
|
||||
namespace JASystem {
|
||||
namespace Driver {
|
||||
struct Wave_ {
|
||||
/* 0x00 */ u8 field_0x0;
|
||||
/* 0x01 */ u8 field_0x1;
|
||||
/* 0x02 */ u8 field_0x2[0x10 - 0x2];
|
||||
/* 0x10 */ int field_0x10;
|
||||
/* 0x14 */ int field_0x14;
|
||||
/* 0x18 */ int field_0x18;
|
||||
/* 0x1C */ int field_0x1c;
|
||||
/* 0x20 */ short field_0x20;
|
||||
/* 0x22 */ short field_0x22;
|
||||
};
|
||||
}
|
||||
namespace DSPInterface {
|
||||
struct FxlineConfig_ {
|
||||
/* 0x00 */ u8 field_0x0;
|
||||
/* 0x02 */ u16 field_0x2;
|
||||
/* 0x04 */ short field_0x4;
|
||||
/* 0x06 */ u16 field_0x6;
|
||||
/* 0x08 */ short field_0x8;
|
||||
/* 0x0C */ int field_0xc;
|
||||
/* 0x10 */ short field_0x10[8];
|
||||
};
|
||||
|
||||
class FXBuffer {
|
||||
public:
|
||||
bool setFXLine(s16* param_1, FxlineConfig_* param_2);
|
||||
|
||||
/* 0x00 */ short field_0x0;
|
||||
/* 0x02 */ short field_0x2;
|
||||
/* 0x04 */ s16* field_0x4;
|
||||
/* 0x08 */ short field_0x8;
|
||||
/* 0x0A */ short field_0xa;
|
||||
/* 0x0C */ short field_0xc;
|
||||
/* 0x0E */ short field_0xe;
|
||||
/* 0x10 */ short field_0x10[8];
|
||||
};
|
||||
|
||||
class DSPBuffer {
|
||||
public:
|
||||
void allocInit();
|
||||
void playStart();
|
||||
void setWaveInfo(Driver::Wave_* param_1, u32 param_2, u32 param_3);
|
||||
void setOscInfo(u32 param_1);
|
||||
void initAutoMixer();
|
||||
void setAutoMixer(u16 param_1, u8 param_2, u8 param_3, u8 param_4, u8 param_5);
|
||||
void setPitch(u16 param_1);
|
||||
void setMixerInitDelayMax(u8 param_1);
|
||||
void setMixerInitVolume(u8 param_1, s16 param_2, u8 param_3);
|
||||
void setMixerVolume(u8 param_1, s16 param_2, u8 param_3);
|
||||
void setMixerVolumeOnly(u8 param_1, short param_2);
|
||||
void setPauseFlag(u8 param_1);
|
||||
void flushChannel();
|
||||
void initFilter();
|
||||
void setFilterMode(u16 param_1);
|
||||
void setIIRFilterParam(s16* param_1);
|
||||
void setFIR8FilterParam(s16* param_1);
|
||||
void setDistFilter(s16 param_1);
|
||||
void setBusConnect(u8 param_1, u8 param_2);
|
||||
|
||||
/* 0x00 */ u16 field_0x0;
|
||||
/* 0x02 */ u16 field_0x2;
|
||||
/* 0x04 */ u16 field_0x4;
|
||||
/* 0x06 */ u8 field0x6[0x8 - 0x6];
|
||||
/* 0x08 */ u16 field_0x8;
|
||||
/* 0x0A */ u8 field_0xa[0xc - 0xa];
|
||||
/* 0x0C */ u16 field_0xc;
|
||||
/* 0x0E */ u16 field_0xe;
|
||||
/* 0x10 */ u16 field_0x10[1][4];
|
||||
/* 0x18 */ u8 field_0x18[0x50 - 0x18];
|
||||
/* 0x50 */ u16 field_0x50;
|
||||
/* 0x52 */ u16 field_0x52;
|
||||
/* 0x54 */ short field_0x54;
|
||||
/* 0x56 */ u16 field_0x56;
|
||||
/* 0x58 */ u16 field_0x58;
|
||||
/* 0x5A */ u8 field_0x5a[0x60 - 0x5a];
|
||||
/* 0x60 */ short field_0x60;
|
||||
/* 0x62 */ u8 field_0x62[0x64 - 0x62];
|
||||
/* 0x64 */ short field_0x64;
|
||||
/* 0x66 */ short field_0x66;
|
||||
/* 0x68 */ int field_0x68;
|
||||
/* 0x6C */ int field_0x6c;
|
||||
/* 0x70 */ u8 field_0x70[0x74 - 0x70];
|
||||
/* 0x74 */ int field_0x74;
|
||||
/* 0x78 */ short field_0x78[4];
|
||||
/* 0x80 */ short field_0x80[20];
|
||||
/* 0xA8 */ short field_0xa8[4];
|
||||
/* 0xB8 */ short field_0xb0[16];
|
||||
/* 0xD0 */ u8 field_0xd0[0x100 - 0xd0];
|
||||
/* 0x100 */ u16 field_0x100;
|
||||
/* 0x102 */ u16 field_0x102;
|
||||
/* 0x104 */ short field_0x104;
|
||||
/* 0x106 */ short field_0x106;
|
||||
/* 0x108 */ short field_0x108;
|
||||
/* 0x10A */ u16 field_0x10a;
|
||||
/* 0x10C */ int field_0x10c;
|
||||
/* 0x110 */ int field_0x110;
|
||||
/* 0x114 */ int field_0x114;
|
||||
/* 0x118 */ int field_0x118;
|
||||
/* 0x11C */ int field_0x11c;
|
||||
/* 0x120 */ short field_0x120[8];
|
||||
/* 0x130 */ u8 field_0x130[0x148 - 0x130];
|
||||
/* 0x148 */ short field_0x148[4];
|
||||
/* 0x150 */ short field_0x150;
|
||||
/* 0x152 */ u8 field_0x152[0x180 - 0x152];
|
||||
};
|
||||
|
||||
|
||||
void setDSPMixerLevel(float param_1);
|
||||
DSPBuffer* getDSPHandle(u8 param_1);
|
||||
void setFilterTable(short* param_1, short* param_2, u32 param_3);
|
||||
void flushBuffer();
|
||||
void invalChannelAll();
|
||||
void clearBuffer();
|
||||
void setupBuffer();
|
||||
void initBuffer();
|
||||
FXBuffer* getFXHandle(u8 param_1);
|
||||
|
||||
extern u16 SEND_TABLE[12];
|
||||
extern u32 DOLBY2_DELAY_BUF[];
|
||||
extern u16 JAS_DSP_PREFIX;
|
||||
extern DSPBuffer* CH_BUF;
|
||||
extern FXBuffer* FX_BUF;
|
||||
extern float sDSPVolume;
|
||||
|
||||
extern u32 DSPADPCM_FILTER[];
|
||||
extern u32 DSPRES_FILTER[];
|
||||
};
|
||||
}
|
||||
|
||||
u16 DSP_CreateMap2(u32 param_1);
|
||||
|
||||
#endif /* JASDSPINTERFACE_H */
|
||||
@@ -0,0 +1,59 @@
|
||||
#ifndef JASHEAPCTRL_H
|
||||
#define JASHEAPCTRL_H
|
||||
|
||||
#include "JSystem/JSupport/JSUList.h"
|
||||
#include "dolphin/os/OSMutex.h"
|
||||
|
||||
namespace JASystem {
|
||||
namespace Kernel {
|
||||
class TDisposer {
|
||||
public:
|
||||
virtual void onDispose() {}
|
||||
};
|
||||
|
||||
class THeap {
|
||||
public:
|
||||
enum Type {
|
||||
Type0,
|
||||
Type1,
|
||||
};
|
||||
|
||||
THeap(TDisposer*);
|
||||
void initRootHeap(void*, u32, Type);
|
||||
bool alloc(THeap*, u32);
|
||||
bool free();
|
||||
void insertChild(THeap* param_1, THeap* param_2, void* param_3, u32 param_4, bool param_5);
|
||||
JASystem::Kernel::THeap* getTailHeap();
|
||||
u32 getTailOffset();
|
||||
u32 getCurOffset();
|
||||
|
||||
bool isAllocated() { return mBase; }
|
||||
|
||||
/* 0x00 */ JSUTree<THeap> mTree;
|
||||
/* 0x1C */ OSMutex mMutex;
|
||||
/* 0x34 */ TDisposer* mDisposer;
|
||||
/* 0x38 */ Type mType;
|
||||
/* 0x3C */ u8* mBase;
|
||||
/* 0x40 */ u32 mSize;
|
||||
/* 0x44 */ THeap* field_0x44;
|
||||
};
|
||||
|
||||
class TSolidHeap {
|
||||
public:
|
||||
TSolidHeap();
|
||||
~TSolidHeap() {}
|
||||
int alloc(long param_1);
|
||||
void freeAll();
|
||||
void init(u8* param_1, long param_2);
|
||||
int getRemain();
|
||||
|
||||
/* 0x00 */ u32 field_0x0;
|
||||
/* 0x04 */ int field_0x4;
|
||||
/* 0x08 */ int field_0x8;
|
||||
/* 0x0C */ int field_0xc;
|
||||
/* 0x10 */ int field_0x10;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* JASHEAPCTRL_H */
|
||||
@@ -0,0 +1,27 @@
|
||||
#ifndef JASSYSTEMHEAP_H
|
||||
#define JASSYSTEMHEAP_H
|
||||
|
||||
#include "dolphin/types.h"
|
||||
|
||||
class JKRSolidHeap;
|
||||
|
||||
extern JKRSolidHeap* JASDram;
|
||||
|
||||
namespace JASystem {
|
||||
namespace Kernel {
|
||||
class TSolidHeap;
|
||||
|
||||
void sysDramSetup(JKRSolidHeap*);
|
||||
void* allocFromSysDram(u32);
|
||||
void sysAramSetup(u32);
|
||||
void allocFromSysAramFull(u32*);
|
||||
|
||||
extern TSolidHeap audioAramHeap;
|
||||
extern u32 audioDramSize;
|
||||
extern u32 audioAramSize;
|
||||
extern int audioAramTop;
|
||||
extern int CARD_SECURITY_BUFFER;
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* JASSYSTEMHEAP_H */
|
||||
@@ -0,0 +1,26 @@
|
||||
#ifndef JASTRACKINTERRUPT_H
|
||||
#define JASTRACKINTERRUPT_H
|
||||
|
||||
#include "dolphin/types.h"
|
||||
|
||||
namespace JASystem {
|
||||
class TIntrMgr {
|
||||
public:
|
||||
void init();
|
||||
void request(u32);
|
||||
void setIntr(u32, void*);
|
||||
void resetInter(u32);
|
||||
void* checkIntr();
|
||||
void timerProcess();
|
||||
|
||||
/* 0x00 */ u8 field_0x0;
|
||||
/* 0x01 */ u8 field_0x1;
|
||||
/* 0x02 */ u8 field_0x2;
|
||||
/* 0x03 */ u8 field_0x3;
|
||||
/* 0x04 */ u32 field_0x4;
|
||||
/* 0x08 */ u32 field_0x8;
|
||||
/* 0x0C */ void* field_0xc[8];
|
||||
};
|
||||
}
|
||||
|
||||
#endif /* JASTRACKINTERRUPT_H */
|
||||
@@ -0,0 +1,21 @@
|
||||
#ifndef JASTRACKPORT_H
|
||||
#define JASTRACKPORT_H
|
||||
|
||||
#include "dolphin/types.h"
|
||||
|
||||
namespace JASystem {
|
||||
class TTrackPort {
|
||||
public:
|
||||
void init();
|
||||
u16 readImport(int);
|
||||
u16 readExport(int);
|
||||
void writeImport(int, u16);
|
||||
void writeExport(int, u16);
|
||||
|
||||
/* 0x00 */ u8 field_0x0[16];
|
||||
/* 0x10 */ u8 field_0x10[16];
|
||||
/* 0x20 */ u16 field_0x20[16];
|
||||
};
|
||||
}
|
||||
|
||||
#endif /* JASTRACKPORT_H */
|
||||
@@ -0,0 +1,15 @@
|
||||
#ifndef DSPPROC_H
|
||||
#define DSPPROC_H
|
||||
|
||||
#include "dolphin/types.h"
|
||||
|
||||
void DSPReleaseHalt2(u32);
|
||||
void DSPReleaseHalt();
|
||||
void setup_callback(u16);
|
||||
void DsetupTable(u32, u32, u32, u32, u32);
|
||||
void DsetMixerLevel(f32);
|
||||
void DsyncFrame(u32, u32, u32);
|
||||
void dummy_callback(u16);
|
||||
void DsetDolbyDelay(u32, u16);
|
||||
|
||||
#endif /* DSPPROC_H */
|
||||
@@ -0,0 +1,13 @@
|
||||
#ifndef DSPTASK_H
|
||||
#define DSPTASK_H
|
||||
|
||||
#include "dolphin/dsp.h"
|
||||
|
||||
void DspHandShake(void*);
|
||||
void DspBoot(DSPCallback);
|
||||
int DSPSendCommands2(u32*, u32, void (*)(u16));
|
||||
void DspInitWork();
|
||||
int DspStartWork(u32, void (*)(u16));
|
||||
void DspFinishWork(u16);
|
||||
|
||||
#endif /* DSPTASK_H */
|
||||
@@ -0,0 +1,8 @@
|
||||
#ifndef OSDSP_H
|
||||
#define OSDSP_H
|
||||
|
||||
#include "dolphin/dsp.h"
|
||||
|
||||
void DSPAddPriorTask(STRUCT_DSP_TASK*);
|
||||
|
||||
#endif /* OSDSP_H */
|
||||
@@ -0,0 +1,17 @@
|
||||
#ifndef OSDSP_TASK_H
|
||||
#define OSDSP_TASK_H
|
||||
|
||||
#include "dolphin/types.h"
|
||||
|
||||
typedef struct STRUCT_DSP_TASK DSPTaskInfo;
|
||||
typedef struct OSContext OSContext;
|
||||
|
||||
extern DSPTaskInfo* DSP_prior_task;
|
||||
|
||||
extern "C" void __DSPHandler(int, OSContext*);
|
||||
void DsyncFrame2(u32, u32, u32);
|
||||
void Dsp_Update_Request();
|
||||
bool Dsp_Running_Check();
|
||||
void Dsp_Running_Start();
|
||||
|
||||
#endif /* OSDSP_TASK_H */
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "dolphin/os/OSAlloc.h"
|
||||
|
||||
class JKRStdHeap : public JKRHeap {
|
||||
public:
|
||||
static JKRStdHeap* create(u32, JKRHeap*, bool);
|
||||
void do_destroy();
|
||||
JKRStdHeap(void*, u32, JKRHeap*, bool);
|
||||
@@ -31,4 +32,4 @@ class JKRStdHeap : public JKRHeap {
|
||||
OSHeapHandle mHeapHandle;
|
||||
};
|
||||
|
||||
#endif /* JKRSTDHEAP_H */
|
||||
#endif /* JKRSTDHEAP_H */
|
||||
|
||||
@@ -212,7 +212,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
T& operator*() { return *this->getObject(); }
|
||||
T* operator*() { return this->getObject(); }
|
||||
|
||||
T* operator->() { return this->getObject(); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user