mirror of https://github.com/PrimeDecomp/prime.git
Various fixes and matches
This commit is contained in:
parent
a5c3f5a97c
commit
f75b37e773
|
@ -3,8 +3,8 @@
|
|||
{
|
||||
"name": "Linux",
|
||||
"includePath": [
|
||||
"${workspaceFolder}/include",
|
||||
"${workspaceFolder}/libc"
|
||||
"${workspaceFolder}/include/**",
|
||||
"${workspaceFolder}/libc/**"
|
||||
],
|
||||
"cStandard": "c99",
|
||||
"cppStandard": "c++98",
|
||||
|
@ -21,4 +21,4 @@
|
|||
}
|
||||
],
|
||||
"version": 4
|
||||
}
|
||||
}
|
|
@ -59,7 +59,8 @@
|
|||
"osfont.h": "c",
|
||||
"arq.h": "c",
|
||||
"string.h": "c",
|
||||
"hw_regs.h": "c"
|
||||
"hw_regs.h": "c",
|
||||
"synth.h": "c"
|
||||
},
|
||||
"files.autoSave": "onFocusChange",
|
||||
"files.insertFinalNewline": true,
|
||||
|
|
|
@ -925,7 +925,7 @@ LIBS = [
|
|||
"cflags": "$cflags_musyx -DMUSY_VERSION_MAJOR=1 -DMUSY_VERSION_MINOR=5 -DMUSY_VERSION_PATCH=4",
|
||||
"host": False,
|
||||
"objects": [
|
||||
"musyx/runtime/seq",
|
||||
["musyx/runtime/seq", False],
|
||||
["musyx/runtime/synth", False],
|
||||
["musyx/runtime/seq_api", True],
|
||||
["musyx/runtime/snd_synthapi", True, {"add_to_all": False}],
|
||||
|
@ -1034,6 +1034,7 @@ LIBS = [
|
|||
{
|
||||
"lib": "gba",
|
||||
"mw_version": "1.2.5e",
|
||||
#"cflags" : "-proc gecko -Cpp_exceptions off -fp hard -nodefaults -nosyspath -i include -i libc -g -sym on -D_DEBUG=1 -enum int -use_lmw_stmw on",
|
||||
"cflags": "$cflags_base",
|
||||
"host": False,
|
||||
"objects": [
|
||||
|
@ -1043,7 +1044,7 @@ LIBS = [
|
|||
["Dolphin/GBA/GBARead", True],
|
||||
["Dolphin/GBA/GBAWrite", True],
|
||||
["Dolphin/GBA/GBAXfer", True],
|
||||
"Dolphin/GBA/GBAKey",
|
||||
["Dolphin/GBA/GBAKey", True],
|
||||
],
|
||||
},
|
||||
]
|
||||
|
|
|
@ -13,7 +13,7 @@ extern "C" {
|
|||
|
||||
typedef void (*GBATransferCallback)(s32 chan);
|
||||
|
||||
typedef struct GBASecParams {
|
||||
typedef struct GBASecParam {
|
||||
u8 readbuf[4];
|
||||
s32 paletteColor;
|
||||
s32 paletteSpeed;
|
||||
|
@ -23,7 +23,7 @@ typedef struct GBASecParams {
|
|||
u32 keyA;
|
||||
s32 keyB;
|
||||
u8 _padding1[24];
|
||||
} GBASecParams;
|
||||
} GBASecParam;
|
||||
|
||||
typedef struct GBABootInfo {
|
||||
s32 paletteColor;
|
||||
|
@ -61,7 +61,7 @@ typedef struct GBAControl {
|
|||
GBATransferCallback proc;
|
||||
GBABootInfo bootInfo;
|
||||
DSPTaskInfo task;
|
||||
GBASecParams* param;
|
||||
GBASecParam* param;
|
||||
} GBAControl;
|
||||
|
||||
extern GBAControl __GBA[4];
|
||||
|
|
|
@ -29,12 +29,21 @@ u32 __OSCoreClock AT_ADDRESS(OS_BASE_CACHED | 0x00FC); // sync with OSLoMem.h
|
|||
#define OS_CORE_CLOCK __OSCoreClock
|
||||
#define OS_TIMER_CLOCK (OS_BUS_CLOCK / 4)
|
||||
|
||||
#ifndef _DEBUG
|
||||
#define OSPhysicalToCached(paddr) ((void*)((u32)(paddr) + OS_BASE_CACHED))
|
||||
#define OSPhysicalToUncached(paddr) ((void*)((u32)(paddr) + OS_BASE_UNCACHED))
|
||||
#define OSCachedToPhysical(caddr) ((u32)((u8*)(caddr)-OS_BASE_CACHED))
|
||||
#define OSUncachedToPhysical(ucaddr) ((u32)((u8*)(ucaddr)-OS_BASE_UNCACHED))
|
||||
#define OSCachedToUncached(caddr) ((void*)((u8*)(caddr) + (OS_BASE_UNCACHED - OS_BASE_CACHED)))
|
||||
#define OSUncachedToCached(ucaddr) ((void*)((u8*)(ucaddr) - (OS_BASE_UNCACHED - OS_BASE_CACHED)))
|
||||
#else
|
||||
u32 OSPhysicalToCached(void* paddr);
|
||||
u32 OSPhysicalToUncached(void* paddr);
|
||||
u32 OSCachedToPhysical(void* caddr);
|
||||
u32 OSUncachedToPhysical(void* ucaddr);
|
||||
u32 OSCachedToUncached(void* caddr);
|
||||
u32 OSUncachedToCached(void* ucaddr);
|
||||
#endif
|
||||
|
||||
#define OSTicksToCycles(ticks) (((ticks) * ((OS_CORE_CLOCK * 2) / OS_TIMER_CLOCK)) / 2)
|
||||
#define OSTicksToSeconds(ticks) ((ticks) / OS_TIMER_CLOCK)
|
||||
|
|
|
@ -1,30 +1,25 @@
|
|||
#ifndef _MUSYX_ASSERT
|
||||
#define _MUSYX_ASSERT
|
||||
#include "musyx/version.h"
|
||||
|
||||
extern void OSPanic(const char* file, int line, const char* msg, ...);
|
||||
extern void OSReport(const char* msg, ...);
|
||||
|
||||
static inline unsigned __SOME_ASSERT_DERP1() {
|
||||
return 0;
|
||||
}
|
||||
static inline unsigned __SOME_ASSERT_DERP1() { return 0; }
|
||||
|
||||
static inline unsigned __SOME_ASSERT_DERP2() {
|
||||
return __SOME_ASSERT_DERP1();
|
||||
}
|
||||
static inline unsigned __SOME_ASSERT_DERP2() { return __SOME_ASSERT_DERP1(); }
|
||||
|
||||
static inline void __SOME_ASSERT_DERP() {
|
||||
__SOME_ASSERT_DERP2() != 0;
|
||||
}
|
||||
static inline void __SOME_ASSERT_DERP() { __SOME_ASSERT_DERP2() != 0; }
|
||||
|
||||
#ifndef ASSERT
|
||||
#ifdef _DEBUG
|
||||
#define MUSY_ASSERT(cond) \
|
||||
do { \
|
||||
if (!(cond)) { \
|
||||
OSPanic(__FILE__, __LINE__, "Failed assertion " #cond); \
|
||||
} \
|
||||
__SOME_ASSERT_DERP(); \
|
||||
} while(0)
|
||||
#define MUSY_ASSERT(cond) \
|
||||
do { \
|
||||
if (!(cond)) { \
|
||||
OSPanic(__FILE__, __LINE__, "Failed assertion " #cond); \
|
||||
} \
|
||||
__SOME_ASSERT_DERP(); \
|
||||
} while (0)
|
||||
#else
|
||||
#define MUSY_ASSERT(cond)
|
||||
#endif
|
||||
|
@ -32,12 +27,27 @@ static inline void __SOME_ASSERT_DERP() {
|
|||
|
||||
#ifndef MUSY_ASSERT_MSG
|
||||
#ifdef _DEBUG
|
||||
#define MUSY_ASSERT_MSG(cond, msg) \
|
||||
do { \
|
||||
if (!(cond)) { \
|
||||
OSPanic(__FILE__, __LINE__, msg); \
|
||||
} \
|
||||
} while(0)
|
||||
#if MUSY_VERSION >= MUSY_VERSION_CHECK(2, 0, 0)
|
||||
#define MUSY_ASSERT_MSG(cond, msg) \
|
||||
do { \
|
||||
s32 tmp = 1; \
|
||||
s32 tmp2; \
|
||||
if (!(cond)) { \
|
||||
OSPanic(__FILE__, __LINE__, msg); \
|
||||
tmp2 = 0; \
|
||||
if (tmp2 == 0) { \
|
||||
tmp = 0; \
|
||||
} \
|
||||
} \
|
||||
} while (0)
|
||||
#else
|
||||
#define MUSY_ASSERT_MSG(cond, msg) \
|
||||
do { \
|
||||
if (!(cond)) { \
|
||||
OSPanic(__FILE__, __LINE__, msg); \
|
||||
} \
|
||||
} while (0)
|
||||
#endif
|
||||
#else
|
||||
#define MUSY_ASSERT_MSG(cond, msg)
|
||||
#endif
|
||||
|
@ -46,9 +56,17 @@ static inline void __SOME_ASSERT_DERP() {
|
|||
#ifndef MUSY_DEBUG
|
||||
#ifdef _DEBUG
|
||||
#define MUSY_DEBUG OSReport
|
||||
#else
|
||||
#else
|
||||
#define MUSY_DEBUG
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef MUSY_FATAL
|
||||
#ifdef _DEBUG
|
||||
#define MUSY_FATAL(msg) OSPanic(__FILE__, __LINE__, msg)
|
||||
#else
|
||||
#define MUSY_FATAL
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif // _MUSYX_ASSERT
|
||||
|
|
|
@ -39,6 +39,10 @@ typedef signed long bool;
|
|||
|
||||
#define SYNTH_MAX_VOICES 64
|
||||
|
||||
typedef struct SND_ADPCMSTREAM_INFO {
|
||||
s16 coefTab[8][2]; // Table of coef. pairs
|
||||
} SND_ADPCMSTREAM_INFO;
|
||||
|
||||
typedef u32 SND_SEQID;
|
||||
typedef u32 SND_VOICEID;
|
||||
typedef u32 SND_STREAMID;
|
||||
|
@ -65,6 +69,13 @@ typedef struct SND_SEQVOLDEF {
|
|||
u8 volGroup;
|
||||
} SND_SEQVOLDEF;
|
||||
|
||||
#define SND_PLAYPARA_DEFAULT 0x00000000
|
||||
#define SND_PLAYPARA_TRACKMUTE 0x00000001
|
||||
#define SND_PLAYPARA_SPEED 0x00000002
|
||||
#define SND_PLAYPARA_VOLUME 0x00000004
|
||||
#define SND_PLAYPARA_SEQVOLDEF 0x00000008
|
||||
#define SND_PLAYPARA_PAUSE 0x00000010
|
||||
|
||||
typedef struct SND_PLAYPARA {
|
||||
u32 flags;
|
||||
u32 trackMute[2];
|
||||
|
@ -310,6 +321,37 @@ bool sndAuxCallbackPrepareChorus(SND_AUX_CHORUS* ch);
|
|||
bool sndAuxCallbackShutdownChorus(SND_AUX_CHORUS* ch);
|
||||
bool sndAuxCallbackUpdateSettingsChorus(SND_AUX_CHORUS* ch);
|
||||
|
||||
#define SND_CROSSFADE_STOP 0 // Stop old song after fadedown
|
||||
#define SND_CROSSFADE_PAUSE 1 // Pause old song after fadedown
|
||||
#define SND_CROSSFADE_CONTINUE 2 // Continue previously paused song as new one
|
||||
#define SND_CROSSFADE_START 0 // Start new song (no continue)
|
||||
#define SND_CROSSFADE_SYNC 4 // Crossfade should start syncronized by sync-controller (104)
|
||||
#define SND_CROSSFADE_PAUSENEW 8 // Pause new song before even starting it
|
||||
#define SND_CROSSFADE_TRACKMUTE 16 // Use trackmute informtion
|
||||
#define SND_CROSSFADE_SPEED 32 // Use speed informtion
|
||||
#define SND_CROSSFADE_MUTE 64 // Old song continues playing & gets muted after fade down
|
||||
#define SND_CROSSFADE_MUTENEW 128 // Mute new song after starting it
|
||||
|
||||
#define SND_CROSSFADE_DEFAULT 0
|
||||
|
||||
typedef struct SND_CROSSFADE {
|
||||
SND_SEQID seqId1;
|
||||
u16 time1;
|
||||
|
||||
SND_SEQID seqId2;
|
||||
u16 time2;
|
||||
void* arr2;
|
||||
SND_GROUPID gid2;
|
||||
SND_SONGID sid2;
|
||||
u8 vol2;
|
||||
u8 studio2;
|
||||
|
||||
u32 trackMute2[2];
|
||||
u16 speed2;
|
||||
|
||||
u8 flags;
|
||||
} SND_CROSSFADE;
|
||||
|
||||
typedef struct SND_PROFILE_DATA {
|
||||
unsigned long loadStores;
|
||||
unsigned long missCycles;
|
||||
|
|
|
@ -10,10 +10,10 @@ extern "C" {
|
|||
|
||||
typedef struct SND_STUDIO_INPUT {
|
||||
// total size: 0x4
|
||||
unsigned char vol; // offset 0x0, size 0x1
|
||||
unsigned char volA; // offset 0x1, size 0x1
|
||||
unsigned char volB; // offset 0x2, size 0x1
|
||||
unsigned char srcStudio; // offset 0x3, size 0x1
|
||||
u8 vol; // offset 0x0, size 0x1
|
||||
u8 volA; // offset 0x1, size 0x1
|
||||
u8 volB; // offset 0x2, size 0x1
|
||||
u8 srcStudio; // offset 0x3, size 0x1
|
||||
} SND_STUDIO_INPUT;
|
||||
|
||||
typedef struct SYNTH_VOICELIST {
|
||||
|
@ -28,8 +28,8 @@ extern SYNTH_VOICELIST voicePrioSortVoices[64];
|
|||
|
||||
typedef struct SYNTH_ROOTLIST {
|
||||
// total size: 0x4
|
||||
unsigned short next; // offset 0x0, size 0x2
|
||||
unsigned short prev; // offset 0x2, size 0x2
|
||||
u16 next; // offset 0x0, size 0x2
|
||||
u16 prev; // offset 0x2, size 0x2
|
||||
} SYNTH_ROOTLIST;
|
||||
|
||||
extern SYNTH_ROOTLIST voicePrioSortRootList[256];
|
||||
|
@ -73,117 +73,117 @@ typedef struct ADSR_VARS {
|
|||
|
||||
typedef struct _PBMIX {
|
||||
// total size: 0x24
|
||||
unsigned short vL; // offset 0x0, size 0x2
|
||||
unsigned short vDeltaL; // offset 0x2, size 0x2
|
||||
unsigned short vR; // offset 0x4, size 0x2
|
||||
unsigned short vDeltaR; // offset 0x6, size 0x2
|
||||
unsigned short vAuxAL; // offset 0x8, size 0x2
|
||||
unsigned short vDeltaAuxAL; // offset 0xA, size 0x2
|
||||
unsigned short vAuxAR; // offset 0xC, size 0x2
|
||||
unsigned short vDeltaAuxAR; // offset 0xE, size 0x2
|
||||
unsigned short vAuxBL; // offset 0x10, size 0x2
|
||||
unsigned short vDeltaAuxBL; // offset 0x12, size 0x2
|
||||
unsigned short vAuxBR; // offset 0x14, size 0x2
|
||||
unsigned short vDeltaAuxBR; // offset 0x16, size 0x2
|
||||
unsigned short vAuxBS; // offset 0x18, size 0x2
|
||||
unsigned short vDeltaAuxBS; // offset 0x1A, size 0x2
|
||||
unsigned short vS; // offset 0x1C, size 0x2
|
||||
unsigned short vDeltaS; // offset 0x1E, size 0x2
|
||||
unsigned short vAuxAS; // offset 0x20, size 0x2
|
||||
unsigned short vDeltaAuxAS; // offset 0x22, size 0x2
|
||||
u16 vL; // offset 0x0, size 0x2
|
||||
u16 vDeltaL; // offset 0x2, size 0x2
|
||||
u16 vR; // offset 0x4, size 0x2
|
||||
u16 vDeltaR; // offset 0x6, size 0x2
|
||||
u16 vAuxAL; // offset 0x8, size 0x2
|
||||
u16 vDeltaAuxAL; // offset 0xA, size 0x2
|
||||
u16 vAuxAR; // offset 0xC, size 0x2
|
||||
u16 vDeltaAuxAR; // offset 0xE, size 0x2
|
||||
u16 vAuxBL; // offset 0x10, size 0x2
|
||||
u16 vDeltaAuxBL; // offset 0x12, size 0x2
|
||||
u16 vAuxBR; // offset 0x14, size 0x2
|
||||
u16 vDeltaAuxBR; // offset 0x16, size 0x2
|
||||
u16 vAuxBS; // offset 0x18, size 0x2
|
||||
u16 vDeltaAuxBS; // offset 0x1A, size 0x2
|
||||
u16 vS; // offset 0x1C, size 0x2
|
||||
u16 vDeltaS; // offset 0x1E, size 0x2
|
||||
u16 vAuxAS; // offset 0x20, size 0x2
|
||||
u16 vDeltaAuxAS; // offset 0x22, size 0x2
|
||||
} _PBMIX;
|
||||
|
||||
typedef struct _PBITD {
|
||||
// total size: 0xE
|
||||
unsigned short flag; // offset 0x0, size 0x2
|
||||
unsigned short bufferHi; // offset 0x2, size 0x2
|
||||
unsigned short bufferLo; // offset 0x4, size 0x2
|
||||
unsigned short shiftL; // offset 0x6, size 0x2
|
||||
unsigned short shiftR; // offset 0x8, size 0x2
|
||||
unsigned short targetShiftL; // offset 0xA, size 0x2
|
||||
unsigned short targetShiftR; // offset 0xC, size 0x2
|
||||
u16 flag; // offset 0x0, size 0x2
|
||||
u16 bufferHi; // offset 0x2, size 0x2
|
||||
u16 bufferLo; // offset 0x4, size 0x2
|
||||
u16 shiftL; // offset 0x6, size 0x2
|
||||
u16 shiftR; // offset 0x8, size 0x2
|
||||
u16 targetShiftL; // offset 0xA, size 0x2
|
||||
u16 targetShiftR; // offset 0xC, size 0x2
|
||||
} _PBITD;
|
||||
|
||||
typedef struct _PBUPDATE {
|
||||
// total size: 0xE
|
||||
unsigned short updNum[5]; // offset 0x0, size 0xA
|
||||
unsigned short dataHi; // offset 0xA, size 0x2
|
||||
unsigned short dataLo; // offset 0xC, size 0x2
|
||||
u16 updNum[5]; // offset 0x0, size 0xA
|
||||
u16 dataHi; // offset 0xA, size 0x2
|
||||
u16 dataLo; // offset 0xC, size 0x2
|
||||
} _PBUPDATE;
|
||||
|
||||
typedef struct _PBDPOP {
|
||||
// total size: 0x12
|
||||
unsigned short aL; // offset 0x0, size 0x2
|
||||
unsigned short aAuxAL; // offset 0x2, size 0x2
|
||||
unsigned short aAuxBL; // offset 0x4, size 0x2
|
||||
unsigned short aR; // offset 0x6, size 0x2
|
||||
unsigned short aAuxAR; // offset 0x8, size 0x2
|
||||
unsigned short aAuxBR; // offset 0xA, size 0x2
|
||||
unsigned short aS; // offset 0xC, size 0x2
|
||||
unsigned short aAuxAS; // offset 0xE, size 0x2
|
||||
unsigned short aAuxBS; // offset 0x10, size 0x2
|
||||
u16 aL; // offset 0x0, size 0x2
|
||||
u16 aAuxAL; // offset 0x2, size 0x2
|
||||
u16 aAuxBL; // offset 0x4, size 0x2
|
||||
u16 aR; // offset 0x6, size 0x2
|
||||
u16 aAuxAR; // offset 0x8, size 0x2
|
||||
u16 aAuxBR; // offset 0xA, size 0x2
|
||||
u16 aS; // offset 0xC, size 0x2
|
||||
u16 aAuxAS; // offset 0xE, size 0x2
|
||||
u16 aAuxBS; // offset 0x10, size 0x2
|
||||
} _PBDPOP;
|
||||
|
||||
typedef struct _PBVE {
|
||||
// total size: 0x4
|
||||
unsigned short currentVolume; // offset 0x0, size 0x2
|
||||
unsigned short currentDelta; // offset 0x2, size 0x2
|
||||
u16 currentVolume; // offset 0x0, size 0x2
|
||||
u16 currentDelta; // offset 0x2, size 0x2
|
||||
} _PBVE;
|
||||
|
||||
typedef struct _PBFIR {
|
||||
// total size: 0x6
|
||||
unsigned short numCoefs; // offset 0x0, size 0x2
|
||||
unsigned short coefsHi; // offset 0x2, size 0x2
|
||||
unsigned short coefsLo; // offset 0x4, size 0x2
|
||||
u16 numCoefs; // offset 0x0, size 0x2
|
||||
u16 coefsHi; // offset 0x2, size 0x2
|
||||
u16 coefsLo; // offset 0x4, size 0x2
|
||||
} _PBFIR;
|
||||
|
||||
typedef struct _PBADDR {
|
||||
// total size: 0x10
|
||||
unsigned short loopFlag; // offset 0x0, size 0x2
|
||||
unsigned short format; // offset 0x2, size 0x2
|
||||
unsigned short loopAddressHi; // offset 0x4, size 0x2
|
||||
unsigned short loopAddressLo; // offset 0x6, size 0x2
|
||||
unsigned short endAddressHi; // offset 0x8, size 0x2
|
||||
unsigned short endAddressLo; // offset 0xA, size 0x2
|
||||
unsigned short currentAddressHi; // offset 0xC, size 0x2
|
||||
unsigned short currentAddressLo; // offset 0xE, size 0x2
|
||||
u16 loopFlag; // offset 0x0, size 0x2
|
||||
u16 format; // offset 0x2, size 0x2
|
||||
u16 loopAddressHi; // offset 0x4, size 0x2
|
||||
u16 loopAddressLo; // offset 0x6, size 0x2
|
||||
u16 endAddressHi; // offset 0x8, size 0x2
|
||||
u16 endAddressLo; // offset 0xA, size 0x2
|
||||
u16 currentAddressHi; // offset 0xC, size 0x2
|
||||
u16 currentAddressLo; // offset 0xE, size 0x2
|
||||
} _PBADDR;
|
||||
|
||||
typedef struct _PBADPCM {
|
||||
// total size: 0x28
|
||||
unsigned short a[8][2]; // offset 0x0, size 0x20
|
||||
unsigned short gain; // offset 0x20, size 0x2
|
||||
unsigned short pred_scale; // offset 0x22, size 0x2
|
||||
unsigned short yn1; // offset 0x24, size 0x2
|
||||
unsigned short yn2; // offset 0x26, size 0x2
|
||||
u16 a[8][2]; // offset 0x0, size 0x20
|
||||
u16 gain; // offset 0x20, size 0x2
|
||||
u16 pred_scale; // offset 0x22, size 0x2
|
||||
u16 yn1; // offset 0x24, size 0x2
|
||||
u16 yn2; // offset 0x26, size 0x2
|
||||
} _PDADPCM;
|
||||
|
||||
typedef struct _PBSRC {
|
||||
// total size: 0xE
|
||||
unsigned short ratioHi; // offset 0x0, size 0x2
|
||||
unsigned short ratioLo; // offset 0x2, size 0x2
|
||||
unsigned short currentAddressFrac; // offset 0x4, size 0x2
|
||||
unsigned short last_samples[4]; // offset 0x6, size 0x8
|
||||
u16 ratioHi; // offset 0x0, size 0x2
|
||||
u16 ratioLo; // offset 0x2, size 0x2
|
||||
u16 currentAddressFrac; // offset 0x4, size 0x2
|
||||
u16 last_samples[4]; // offset 0x6, size 0x8
|
||||
} _PBSRC;
|
||||
|
||||
typedef struct _PBADPCMLOOP {
|
||||
// total size: 0x6
|
||||
unsigned short loop_pred_scale; // offset 0x0, size 0x2
|
||||
unsigned short loop_yn1; // offset 0x2, size 0x2
|
||||
unsigned short loop_yn2; // offset 0x4, size 0x2
|
||||
u16 loop_pred_scale; // offset 0x0, size 0x2
|
||||
u16 loop_yn1; // offset 0x2, size 0x2
|
||||
u16 loop_yn2; // offset 0x4, size 0x2
|
||||
} _PBADPCMLOOP;
|
||||
|
||||
typedef struct _PB {
|
||||
// total size: 0xBC
|
||||
unsigned short nextHi; // offset 0x0, size 0x2
|
||||
unsigned short nextLo; // offset 0x2, size 0x2
|
||||
unsigned short currHi; // offset 0x4, size 0x2
|
||||
unsigned short currLo; // offset 0x6, size 0x2
|
||||
unsigned short srcSelect; // offset 0x8, size 0x2
|
||||
unsigned short coefSelect; // offset 0xA, size 0x2
|
||||
unsigned short mixerCtrl; // offset 0xC, size 0x2
|
||||
unsigned short state; // offset 0xE, size 0x2
|
||||
unsigned short loopType; // offset 0x10, size 0x2
|
||||
u16 nextHi; // offset 0x0, size 0x2
|
||||
u16 nextLo; // offset 0x2, size 0x2
|
||||
u16 currHi; // offset 0x4, size 0x2
|
||||
u16 currLo; // offset 0x6, size 0x2
|
||||
u16 srcSelect; // offset 0x8, size 0x2
|
||||
u16 coefSelect; // offset 0xA, size 0x2
|
||||
u16 mixerCtrl; // offset 0xC, size 0x2
|
||||
u16 state; // offset 0xE, size 0x2
|
||||
u16 loopType; // offset 0x10, size 0x2
|
||||
struct _PBMIX mix; // offset 0x12, size 0x24
|
||||
struct _PBITD itd; // offset 0x36, size 0xE
|
||||
struct _PBUPDATE update; // offset 0x44, size 0xE
|
||||
|
@ -194,7 +194,7 @@ typedef struct _PB {
|
|||
struct _PBADPCM adpcm; // offset 0x7E, size 0x28
|
||||
struct _PBSRC src; // offset 0xA6, size 0xE
|
||||
struct _PBADPCMLOOP adpcmLoop; // offset 0xB4, size 0x6
|
||||
unsigned short streamLoopCnt; // offset 0xBA, size 0x2
|
||||
u16 streamLoopCnt; // offset 0xBA, size 0x2
|
||||
} _PB;
|
||||
|
||||
typedef struct SAMPLE_INFO {
|
||||
|
@ -211,81 +211,81 @@ typedef struct SAMPLE_INFO {
|
|||
|
||||
typedef struct GROUP_DATA {
|
||||
// total size: 0x28
|
||||
unsigned long nextOff; // offset 0x0, size 0x4
|
||||
unsigned short id; // offset 0x4, size 0x2
|
||||
unsigned short type; // offset 0x6, size 0x2
|
||||
unsigned long macroOff; // offset 0x8, size 0x4
|
||||
unsigned long sampleOff; // offset 0xC, size 0x4
|
||||
unsigned long curveOff; // offset 0x10, size 0x4
|
||||
unsigned long keymapOff; // offset 0x14, size 0x4
|
||||
unsigned long layerOff; // offset 0x18, size 0x4
|
||||
u32 nextOff; // offset 0x0, size 0x4
|
||||
u16 id; // offset 0x4, size 0x2
|
||||
u16 type; // offset 0x6, size 0x2
|
||||
u32 macroOff; // offset 0x8, size 0x4
|
||||
u32 sampleOff; // offset 0xC, size 0x4
|
||||
u32 curveOff; // offset 0x10, size 0x4
|
||||
u32 keymapOff; // offset 0x14, size 0x4
|
||||
u32 layerOff; // offset 0x18, size 0x4
|
||||
union {
|
||||
struct fx {
|
||||
// total size: 0x4
|
||||
unsigned long tableOff; // offset 0x0, size 0x4
|
||||
u32 tableOff; // offset 0x0, size 0x4
|
||||
} fx;
|
||||
struct song {
|
||||
// total size: 0xC
|
||||
unsigned long normpageOff; // offset 0x0, size 0x4
|
||||
unsigned long drumpageOff; // offset 0x4, size 0x4
|
||||
unsigned long midiSetupOff; // offset 0x8, size 0x4
|
||||
u32 normpageOff; // offset 0x0, size 0x4
|
||||
u32 drumpageOff; // offset 0x4, size 0x4
|
||||
u32 midiSetupOff; // offset 0x8, size 0x4
|
||||
} song;
|
||||
} data; // offset 0x1C, size 0xC
|
||||
} GROUP_DATA;
|
||||
|
||||
typedef struct SAMPLE_HEADER {
|
||||
// total size: 0x10
|
||||
unsigned long info; // offset 0x0, size 0x4
|
||||
unsigned long length; // offset 0x4, size 0x4
|
||||
unsigned long loopOffset; // offset 0x8, size 0x4
|
||||
unsigned long loopLength; // offset 0xC, size 0x4
|
||||
u32 info; // offset 0x0, size 0x4
|
||||
u32 length; // offset 0x4, size 0x4
|
||||
u32 loopOffset; // offset 0x8, size 0x4
|
||||
u32 loopLength; // offset 0xC, size 0x4
|
||||
} SAMPLE_HEADER;
|
||||
|
||||
typedef struct SDIR_DATA {
|
||||
// total size: 0x20
|
||||
unsigned short id; // offset 0x0, size 0x2
|
||||
unsigned short ref_cnt; // offset 0x2, size 0x2
|
||||
unsigned long offset; // offset 0x4, size 0x4
|
||||
u16 id; // offset 0x0, size 0x2
|
||||
u16 ref_cnt; // offset 0x2, size 0x2
|
||||
u32 offset; // offset 0x4, size 0x4
|
||||
void* addr; // offset 0x8, size 0x4
|
||||
struct SAMPLE_HEADER header; // offset 0xC, size 0x10
|
||||
unsigned long extraData; // offset 0x1C, size 0x4
|
||||
u32 extraData; // offset 0x1C, size 0x4
|
||||
} SDIR_DATA;
|
||||
|
||||
typedef struct SDIR_TAB {
|
||||
// total size: 0xC
|
||||
struct SDIR_DATA* data; // offset 0x0, size 0x4
|
||||
void* base; // offset 0x4, size 0x4
|
||||
unsigned short numSmp; // offset 0x8, size 0x2
|
||||
unsigned short res; // offset 0xA, size 0x2
|
||||
u16 numSmp; // offset 0x8, size 0x2
|
||||
u16 res; // offset 0xA, size 0x2
|
||||
} SDIR_TAB;
|
||||
|
||||
typedef struct DATA_TAB {
|
||||
// total size: 0x8
|
||||
void* data; // offset 0x0, size 0x4
|
||||
unsigned short id; // offset 0x4, size 0x2
|
||||
unsigned short refCount; // offset 0x6, size 0x2
|
||||
void* data; // offset 0x0, size 0x4
|
||||
u16 id; // offset 0x4, size 0x2
|
||||
u16 refCount; // offset 0x6, size 0x2
|
||||
} DATA_TAB;
|
||||
|
||||
typedef struct LAYER_TAB {
|
||||
// total size: 0xC
|
||||
void* data; // offset 0x0, size 0x4
|
||||
unsigned short id; // offset 0x4, size 0x2
|
||||
unsigned short num; // offset 0x6, size 0x2
|
||||
unsigned short refCount; // offset 0x8, size 0x2
|
||||
unsigned short reserved; // offset 0xA, size 0x2
|
||||
void* data; // offset 0x0, size 0x4
|
||||
u16 id; // offset 0x4, size 0x2
|
||||
u16 num; // offset 0x6, size 0x2
|
||||
u16 refCount; // offset 0x8, size 0x2
|
||||
u16 reserved; // offset 0xA, size 0x2
|
||||
} LAYER_TAB;
|
||||
|
||||
typedef struct MAC_MAINTAB {
|
||||
// total size: 0x4
|
||||
unsigned short num; // offset 0x0, size 0x2
|
||||
unsigned short subTabIndex; // offset 0x2, size 0x2
|
||||
u16 num; // offset 0x0, size 0x2
|
||||
u16 subTabIndex; // offset 0x2, size 0x2
|
||||
} MAC_MAINTAB;
|
||||
|
||||
typedef struct MAC_SUBTAB {
|
||||
// total size: 0x8
|
||||
void* data; // offset 0x0, size 0x4
|
||||
unsigned short id; // offset 0x4, size 0x2
|
||||
unsigned short refCount; // offset 0x6, size 0x2
|
||||
void* data; // offset 0x0, size 0x4
|
||||
u16 id; // offset 0x4, size 0x2
|
||||
u16 refCount; // offset 0x6, size 0x2
|
||||
} MAC_SUBTAB;
|
||||
|
||||
typedef struct GSTACK {
|
||||
|
@ -414,19 +414,19 @@ typedef struct SYNTH_LFO {
|
|||
|
||||
typedef struct SYNTHMasterFader {
|
||||
// total size: 0x30
|
||||
float volume; // offset 0x0, size 0x4
|
||||
float target; // offset 0x4, size 0x4
|
||||
float start; // offset 0x8, size 0x4
|
||||
float time; // offset 0xC, size 0x4
|
||||
float deltaTime; // offset 0x10, size 0x4
|
||||
float pauseVol; // offset 0x14, size 0x4
|
||||
float pauseTarget; // offset 0x18, size 0x4
|
||||
float pauseStart; // offset 0x1C, size 0x4
|
||||
float pauseTime; // offset 0x20, size 0x4
|
||||
float pauseDeltaTime; // offset 0x24, size 0x4
|
||||
unsigned long seqId; // offset 0x28, size 0x4
|
||||
unsigned char seqMode; // offset 0x2C, size 0x1
|
||||
unsigned char type; // offset 0x2D, size 0x1
|
||||
float volume; // offset 0x0, size 0x4
|
||||
float target; // offset 0x4, size 0x4
|
||||
float start; // offset 0x8, size 0x4
|
||||
float time; // offset 0xC, size 0x4
|
||||
float deltaTime; // offset 0x10, size 0x4
|
||||
float pauseVol; // offset 0x14, size 0x4
|
||||
float pauseTarget; // offset 0x18, size 0x4
|
||||
float pauseStart; // offset 0x1C, size 0x4
|
||||
float pauseTime; // offset 0x20, size 0x4
|
||||
float pauseDeltaTime; // offset 0x24, size 0x4
|
||||
u32 seqId; // offset 0x28, size 0x4
|
||||
u8 seqMode; // offset 0x2C, size 0x1
|
||||
u8 type; // offset 0x2D, size 0x1
|
||||
} SYNTHMasterFader;
|
||||
|
||||
typedef struct CTRL_SOURCE {
|
||||
|
@ -443,40 +443,40 @@ typedef struct CTRL_DEST {
|
|||
|
||||
typedef struct SND_VIRTUALSAMPLE_INFO {
|
||||
// total size: 0x14
|
||||
unsigned short smpID; // offset 0x0, size 0x2
|
||||
unsigned short instID; // offset 0x2, size 0x2
|
||||
u16 smpID; // offset 0x0, size 0x2
|
||||
u16 instID; // offset 0x2, size 0x2
|
||||
union vsData {
|
||||
struct vsUpdate {
|
||||
// total size: 0x10
|
||||
unsigned long off1; // offset 0x0, size 0x4
|
||||
unsigned long len1; // offset 0x4, size 0x4
|
||||
unsigned long off2; // offset 0x8, size 0x4
|
||||
unsigned long len2; // offset 0xC, size 0x4
|
||||
u32 off1; // offset 0x0, size 0x4
|
||||
u32 len1; // offset 0x4, size 0x4
|
||||
u32 off2; // offset 0x8, size 0x4
|
||||
u32 len2; // offset 0xC, size 0x4
|
||||
} update;
|
||||
} data;
|
||||
} SND_VIRTUALSAMPLE_INFO;
|
||||
|
||||
typedef struct VS_BUFFER {
|
||||
// total size: 0x24
|
||||
unsigned char state; // offset 0x0, size 0x1
|
||||
unsigned char hwId; // offset 0x1, size 0x1
|
||||
unsigned char smpType; // offset 0x2, size 0x1
|
||||
unsigned char voice; // offset 0x3, size 0x1
|
||||
unsigned long last; // offset 0x4, size 0x4
|
||||
unsigned long finalGoodSamples; // offset 0x8, size 0x4
|
||||
unsigned long finalLast; // offset 0xC, size 0x4
|
||||
SND_VIRTUALSAMPLE_INFO info; // offset 0x10, size 0x14
|
||||
u8 state; // offset 0x0, size 0x1
|
||||
u8 hwId; // offset 0x1, size 0x1
|
||||
u8 smpType; // offset 0x2, size 0x1
|
||||
u8 voice; // offset 0x3, size 0x1
|
||||
u32 last; // offset 0x4, size 0x4
|
||||
u32 finalGoodSamples; // offset 0x8, size 0x4
|
||||
u32 finalLast; // offset 0xC, size 0x4
|
||||
SND_VIRTUALSAMPLE_INFO info; // offset 0x10, size 0x14
|
||||
} VS_BUFFER;
|
||||
|
||||
typedef struct _VS {
|
||||
// total size: 0x950
|
||||
unsigned char numBuffers; // offset 0x0, size 0x1
|
||||
unsigned long bufferLength; // offset 0x4, size 0x4
|
||||
u8 numBuffers; // offset 0x0, size 0x1
|
||||
u32 bufferLength; // offset 0x4, size 0x4
|
||||
VS_BUFFER streamBuffer[64]; // offset 0x8, size 0x900
|
||||
unsigned char voices[64]; // offset 0x908, size 0x40
|
||||
unsigned short nextInstID; // offset 0x948, size 0x2
|
||||
unsigned long (*callback)(unsigned char,
|
||||
struct SND_VIRTUALSAMPLE_INFO*); // offset 0x94C, size 0x4
|
||||
u8 voices[64]; // offset 0x908, size 0x40
|
||||
u16 nextInstID; // offset 0x948, size 0x2
|
||||
u32 (*callback)(u8,
|
||||
struct SND_VIRTUALSAMPLE_INFO*); // offset 0x94C, size 0x4
|
||||
} VS;
|
||||
|
||||
extern VS vs;
|
||||
|
@ -611,46 +611,46 @@ typedef struct SYNTH_VOICE {
|
|||
|
||||
typedef struct synthITDInfo {
|
||||
// total size: 0x2
|
||||
unsigned char music; // offset 0x0, size 0x1
|
||||
unsigned char sfx; // offset 0x1, size 0x1
|
||||
u8 music; // offset 0x0, size 0x1
|
||||
u8 sfx; // offset 0x1, size 0x1
|
||||
} synthITDInfo;
|
||||
|
||||
#pragma pop
|
||||
|
||||
typedef struct LAYER {
|
||||
// total size: 0xC
|
||||
unsigned short id; // offset 0x0, size 0x2
|
||||
unsigned char keyLow; // offset 0x2, size 0x1
|
||||
unsigned char keyHigh; // offset 0x3, size 0x1
|
||||
signed char transpose; // offset 0x4, size 0x1
|
||||
unsigned char volume; // offset 0x5, size 0x1
|
||||
signed short prioOffset; // offset 0x6, size 0x2
|
||||
unsigned char panning; // offset 0x8, size 0x1
|
||||
unsigned char reserved[3]; // offset 0x9, size 0x3
|
||||
u16 id; // offset 0x0, size 0x2
|
||||
u8 keyLow; // offset 0x2, size 0x1
|
||||
u8 keyHigh; // offset 0x3, size 0x1
|
||||
s8 transpose; // offset 0x4, size 0x1
|
||||
u8 volume; // offset 0x5, size 0x1
|
||||
s16 prioOffset; // offset 0x6, size 0x2
|
||||
u8 panning; // offset 0x8, size 0x1
|
||||
u8 reserved[3]; // offset 0x9, size 0x3
|
||||
} LAYER;
|
||||
|
||||
typedef struct KEYMAP {
|
||||
// total size: 0x8
|
||||
unsigned short id; // offset 0x0, size 0x2
|
||||
signed char transpose; // offset 0x2, size 0x1
|
||||
unsigned char panning; // offset 0x3, size 0x1
|
||||
signed short prioOffset; // offset 0x4, size 0x2
|
||||
unsigned char reserved[2]; // offset 0x6, size 0x2
|
||||
u16 id; // offset 0x0, size 0x2
|
||||
s8 transpose; // offset 0x2, size 0x1
|
||||
u8 panning; // offset 0x3, size 0x1
|
||||
s16 prioOffset; // offset 0x4, size 0x2
|
||||
u8 reserved[2]; // offset 0x6, size 0x2
|
||||
} KEYMAP;
|
||||
|
||||
typedef struct MEM_DATA {
|
||||
// total size: 0x408
|
||||
unsigned long nextOff; // offset 0x0, size 0x4
|
||||
unsigned short id; // offset 0x4, size 0x2
|
||||
unsigned short reserved; // offset 0x6, size 0x2
|
||||
u32 nextOff; // offset 0x0, size 0x4
|
||||
u16 id; // offset 0x4, size 0x2
|
||||
u16 reserved; // offset 0x6, size 0x2
|
||||
union {
|
||||
struct {
|
||||
// total size: 0x10
|
||||
unsigned long num; // offset 0x0, size 0x4
|
||||
LAYER entry[1]; // offset 0x4, size 0xC
|
||||
u32 num; // offset 0x0, size 0x4
|
||||
LAYER entry[1]; // offset 0x4, size 0xC
|
||||
} layer;
|
||||
KEYMAP map[128];
|
||||
unsigned char tab[1];
|
||||
u8 tab[1];
|
||||
MSTEP cmd[1][2];
|
||||
} data; // offset 0x8, size 0x400
|
||||
} MEM_DATA;
|
||||
|
@ -694,33 +694,33 @@ typedef struct SAL_PANINFO {
|
|||
|
||||
typedef struct _SPB {
|
||||
// total size: 0x36
|
||||
unsigned short dpopLHi; // offset 0x0, size 0x2
|
||||
unsigned short dpopLLo; // offset 0x2, size 0x2
|
||||
unsigned short dpopLDelta; // offset 0x4, size 0x2
|
||||
unsigned short dpopRHi; // offset 0x6, size 0x2
|
||||
unsigned short dpopRLo; // offset 0x8, size 0x2
|
||||
unsigned short dpopRDelta; // offset 0xA, size 0x2
|
||||
unsigned short dpopSHi; // offset 0xC, size 0x2
|
||||
unsigned short dpopSLo; // offset 0xE, size 0x2
|
||||
unsigned short dpopSDelta; // offset 0x10, size 0x2
|
||||
unsigned short dpopALHi; // offset 0x12, size 0x2
|
||||
unsigned short dpopALLo; // offset 0x14, size 0x2
|
||||
unsigned short dpopALDelta; // offset 0x16, size 0x2
|
||||
unsigned short dpopARHi; // offset 0x18, size 0x2
|
||||
unsigned short dpopARLo; // offset 0x1A, size 0x2
|
||||
unsigned short dpopARDelta; // offset 0x1C, size 0x2
|
||||
unsigned short dpopASHi; // offset 0x1E, size 0x2
|
||||
unsigned short dpopASLo; // offset 0x20, size 0x2
|
||||
unsigned short dpopASDelta; // offset 0x22, size 0x2
|
||||
unsigned short dpopBLHi; // offset 0x24, size 0x2
|
||||
unsigned short dpopBLLo; // offset 0x26, size 0x2
|
||||
unsigned short dpopBLDelta; // offset 0x28, size 0x2
|
||||
unsigned short dpopBRHi; // offset 0x2A, size 0x2
|
||||
unsigned short dpopBRLo; // offset 0x2C, size 0x2
|
||||
unsigned short dpopBRDelta; // offset 0x2E, size 0x2
|
||||
unsigned short dpopBSHi; // offset 0x30, size 0x2
|
||||
unsigned short dpopBSLo; // offset 0x32, size 0x2
|
||||
unsigned short dpopBSDelta; // offset 0x34, size 0x2
|
||||
u16 dpopLHi; // offset 0x0, size 0x2
|
||||
u16 dpopLLo; // offset 0x2, size 0x2
|
||||
u16 dpopLDelta; // offset 0x4, size 0x2
|
||||
u16 dpopRHi; // offset 0x6, size 0x2
|
||||
u16 dpopRLo; // offset 0x8, size 0x2
|
||||
u16 dpopRDelta; // offset 0xA, size 0x2
|
||||
u16 dpopSHi; // offset 0xC, size 0x2
|
||||
u16 dpopSLo; // offset 0xE, size 0x2
|
||||
u16 dpopSDelta; // offset 0x10, size 0x2
|
||||
u16 dpopALHi; // offset 0x12, size 0x2
|
||||
u16 dpopALLo; // offset 0x14, size 0x2
|
||||
u16 dpopALDelta; // offset 0x16, size 0x2
|
||||
u16 dpopARHi; // offset 0x18, size 0x2
|
||||
u16 dpopARLo; // offset 0x1A, size 0x2
|
||||
u16 dpopARDelta; // offset 0x1C, size 0x2
|
||||
u16 dpopASHi; // offset 0x1E, size 0x2
|
||||
u16 dpopASLo; // offset 0x20, size 0x2
|
||||
u16 dpopASDelta; // offset 0x22, size 0x2
|
||||
u16 dpopBLHi; // offset 0x24, size 0x2
|
||||
u16 dpopBLLo; // offset 0x26, size 0x2
|
||||
u16 dpopBLDelta; // offset 0x28, size 0x2
|
||||
u16 dpopBRHi; // offset 0x2A, size 0x2
|
||||
u16 dpopBRLo; // offset 0x2C, size 0x2
|
||||
u16 dpopBRDelta; // offset 0x2E, size 0x2
|
||||
u16 dpopBSHi; // offset 0x30, size 0x2
|
||||
u16 dpopBSLo; // offset 0x32, size 0x2
|
||||
u16 dpopBSDelta; // offset 0x34, size 0x2
|
||||
} _SPB;
|
||||
|
||||
typedef struct DSPhostDPop {
|
||||
|
@ -738,10 +738,10 @@ typedef struct DSPhostDPop {
|
|||
|
||||
typedef struct DSPinput {
|
||||
// total size: 0xC
|
||||
unsigned char studio; // offset 0x0, size 0x1
|
||||
unsigned short vol; // offset 0x2, size 0x2
|
||||
unsigned short volA; // offset 0x4, size 0x2
|
||||
unsigned short volB; // offset 0x6, size 0x2
|
||||
u8 studio; // offset 0x0, size 0x1
|
||||
u16 vol; // offset 0x2, size 0x2
|
||||
u16 volA; // offset 0x4, size 0x2
|
||||
u16 volB; // offset 0x6, size 0x2
|
||||
struct SND_STUDIO_INPUT* desc; // offset 0x8, size 0x4
|
||||
} DSPinput;
|
||||
|
||||
|
@ -754,9 +754,9 @@ typedef struct DSPstudioinfo {
|
|||
long* auxB[3]; // offset 0x3C, size 0xC
|
||||
struct DSPvoice* voiceRoot; // offset 0x48, size 0x4
|
||||
struct DSPvoice* alienVoiceRoot; // offset 0x4C, size 0x4
|
||||
unsigned char state; // offset 0x50, size 0x1
|
||||
unsigned char isMaster; // offset 0x51, size 0x1
|
||||
unsigned char numInputs; // offset 0x52, size 0x1
|
||||
u8 state; // offset 0x50, size 0x1
|
||||
u8 isMaster; // offset 0x51, size 0x1
|
||||
u8 numInputs; // offset 0x52, size 0x1
|
||||
SND_STUDIO_TYPE type; // offset 0x54, size 0x4
|
||||
struct DSPinput in[7]; // offset 0x58, size 0x54
|
||||
SND_AUX_CALLBACK auxAHandler; // offset 0xAC, size 0x4
|
||||
|
@ -774,50 +774,50 @@ typedef s32 (*SND_COMPARE)(void*, void*);
|
|||
|
||||
typedef struct CHANNEL_DEFAULTS {
|
||||
// total size: 0x1
|
||||
unsigned char pbRange; // offset 0x0, size 0x1
|
||||
u8 pbRange; // offset 0x0, size 0x1
|
||||
} CHANNEL_DEFAULTS;
|
||||
typedef struct FX_TAB {
|
||||
// total size: 0xA
|
||||
unsigned short id; // offset 0x0, size 0x2
|
||||
unsigned short macro; // offset 0x2, size 0x2
|
||||
unsigned char maxVoices; // offset 0x4, size 0x1
|
||||
unsigned char priority; // offset 0x5, size 0x1
|
||||
unsigned char volume; // offset 0x6, size 0x1
|
||||
unsigned char panning; // offset 0x7, size 0x1
|
||||
unsigned char key; // offset 0x8, size 0x1
|
||||
unsigned char vGroup; // offset 0x9, size 0x1
|
||||
u16 id; // offset 0x0, size 0x2
|
||||
u16 macro; // offset 0x2, size 0x2
|
||||
u8 maxVoices; // offset 0x4, size 0x1
|
||||
u8 priority; // offset 0x5, size 0x1
|
||||
u8 volume; // offset 0x6, size 0x1
|
||||
u8 panning; // offset 0x7, size 0x1
|
||||
u8 key; // offset 0x8, size 0x1
|
||||
u8 vGroup; // offset 0x9, size 0x1
|
||||
} FX_TAB;
|
||||
|
||||
typedef struct FX_DATA {
|
||||
// total size: 0xE
|
||||
unsigned short num; // offset 0x0, size 0x2
|
||||
unsigned short reserverd; // offset 0x2, size 0x2
|
||||
struct FX_TAB fx[1]; // offset 0x4, size 0xA
|
||||
u16 num; // offset 0x0, size 0x2
|
||||
u16 reserverd; // offset 0x2, size 0x2
|
||||
struct FX_TAB fx[1]; // offset 0x4, size 0xA
|
||||
} FX_DATA;
|
||||
|
||||
typedef struct FX_GROUP {
|
||||
// total size: 0x8
|
||||
unsigned short gid; // offset 0x0, size 0x2
|
||||
unsigned short fxNum; // offset 0x2, size 0x2
|
||||
u16 gid; // offset 0x0, size 0x2
|
||||
u16 fxNum; // offset 0x2, size 0x2
|
||||
struct FX_TAB* fxTab; // offset 0x4, size 0x4
|
||||
} FX_GROUP;
|
||||
|
||||
typedef struct PAGE {
|
||||
// total size: 0x6
|
||||
unsigned short macro; // offset 0x0, size 0x2
|
||||
unsigned char prio; // offset 0x2, size 0x1
|
||||
unsigned char maxVoices; // offset 0x3, size 0x1
|
||||
unsigned char index; // offset 0x4, size 0x1
|
||||
unsigned char reserved; // offset 0x5, size 0x1
|
||||
u16 macro; // offset 0x0, size 0x2
|
||||
u8 prio; // offset 0x2, size 0x1
|
||||
u8 maxVoices; // offset 0x3, size 0x1
|
||||
u8 index; // offset 0x4, size 0x1
|
||||
u8 reserved; // offset 0x5, size 0x1
|
||||
} PAGE;
|
||||
|
||||
typedef struct MIDI_CHANNEL_SETUP {
|
||||
// total size: 0x5
|
||||
unsigned char program; // offset 0x0, size 0x1
|
||||
unsigned char volume; // offset 0x1, size 0x1
|
||||
unsigned char panning; // offset 0x2, size 0x1
|
||||
unsigned char reverb; // offset 0x3, size 0x1
|
||||
unsigned char chorus; // offset 0x4, size 0x1
|
||||
u8 program; // offset 0x0, size 0x1
|
||||
u8 volume; // offset 0x1, size 0x1
|
||||
u8 panning; // offset 0x2, size 0x1
|
||||
u8 reverb; // offset 0x3, size 0x1
|
||||
u8 chorus; // offset 0x4, size 0x1
|
||||
} MIDI_CHANNEL_SETUP;
|
||||
|
||||
typedef struct MIDISETUP {
|
||||
|
@ -832,19 +832,19 @@ typedef struct ADSR_INFO {
|
|||
union ai_data {
|
||||
struct {
|
||||
// total size: 0x14
|
||||
long atime; // offset 0x0, size 0x4
|
||||
long dtime; // offset 0x4, size 0x4
|
||||
unsigned short slevel; // offset 0x8, size 0x2
|
||||
unsigned short rtime; // offset 0xA, size 0x2
|
||||
long ascale; // offset 0xC, size 0x4
|
||||
long dscale; // offset 0x10, size 0x4
|
||||
long atime; // offset 0x0, size 0x4
|
||||
long dtime; // offset 0x4, size 0x4
|
||||
u16 slevel; // offset 0x8, size 0x2
|
||||
u16 rtime; // offset 0xA, size 0x2
|
||||
long ascale; // offset 0xC, size 0x4
|
||||
long dscale; // offset 0x10, size 0x4
|
||||
} dls;
|
||||
struct {
|
||||
// total size: 0x8
|
||||
unsigned short atime; // offset 0x0, size 0x2
|
||||
unsigned short dtime; // offset 0x2, size 0x2
|
||||
unsigned short slevel; // offset 0x4, size 0x2
|
||||
unsigned short rtime; // offset 0x6, size 0x2
|
||||
u16 atime; // offset 0x0, size 0x2
|
||||
u16 dtime; // offset 0x2, size 0x2
|
||||
u16 slevel; // offset 0x4, size 0x2
|
||||
u16 rtime; // offset 0x6, size 0x2
|
||||
} linear;
|
||||
} data; // offset 0x0, size 0x14
|
||||
} ADSR_INFO;
|
||||
|
@ -870,22 +870,25 @@ FX_TAB* dataGetFX(u16 fid);
|
|||
s32 hwInit(u32* frq, u16 numVoices, u16 numStudios, u32 flags); /* extern */
|
||||
void hwInitSamplePlayback(u32 v, u16 smpID, void* newsmp, u32 set_defadsr, u32 prio,
|
||||
u32 callbackUserValue, u32 setSRC, u8 itdMode);
|
||||
void hwSetVolume(u32 v, u8 table, float vol, u32 pan, u32 span, float auxa, float auxb);
|
||||
void hwSetPitch(u32 v, u16 speed);
|
||||
void hwEnableIrq();
|
||||
void hwDisableIrq();
|
||||
void* hwTransAddr(void* samples);
|
||||
|
||||
void seqInit(); /* extern */
|
||||
unsigned long seqStartPlay(PAGE* norm, PAGE* drum, MIDISETUP* midiSetup, u32* song,
|
||||
SND_PLAYPARA* para, u8 studio, u16 sgid);
|
||||
unsigned long seqGetPrivateId(unsigned long seqId);
|
||||
u32 seqStartPlay(PAGE* norm, PAGE* drum, MIDISETUP* midiSetup, u32* song, SND_PLAYPARA* para,
|
||||
u8 studio, u16 sgid);
|
||||
u32 seqGetPrivateId(u32 seqId);
|
||||
void streamInit(); /* extern */
|
||||
void vsInit(); /* extern */
|
||||
void hwExit();
|
||||
void dataExit();
|
||||
void s3dInit(s32); /* extern */
|
||||
void s3dKillEmitterByFXID(FX_TAB* fxTab, unsigned long num);
|
||||
void s3dKillEmitterByFXID(FX_TAB* fxTab, u32 num);
|
||||
void s3dExit();
|
||||
void synthInit(u32, u8); /* extern */
|
||||
void synthSetBpm(u32 pbm, u8 set, u8 section);
|
||||
void synthFXCloneMidiSetup(SYNTH_VOICE* dest, SYNTH_VOICE* src);
|
||||
void synthSetMusicVolumeType(u8 vGroup, u8 type);
|
||||
|
||||
|
@ -895,7 +898,7 @@ extern u8 voiceMusicRunning;
|
|||
extern u8 voiceFxRunning;
|
||||
extern u8 voiceListInsert;
|
||||
extern u8 voiceListRoot;
|
||||
void voiceSetPriority(struct SYNTH_VOICE* svoice, unsigned char prio);
|
||||
void voiceSetPriority(struct SYNTH_VOICE* svoice, u8 prio);
|
||||
u32 voiceIsLastStarted(struct SYNTH_VOICE* svoice);
|
||||
s32 voiceKillSound(u32 voiceid);
|
||||
|
||||
|
@ -909,13 +912,19 @@ void* sndBSearch(void* key, void* base, s32 num, s32 len, SND_COMPARE cmp);
|
|||
void sndConvertMs(u32* time);
|
||||
void sndConvertTicks(u32* out, SYNTH_VOICE* svoice);
|
||||
u32 sndConvert2Ms(u32 time);
|
||||
void hwActivateStudio(unsigned char studio, unsigned long isMaster, SND_STUDIO_TYPE type);
|
||||
u32 sndStreamAllocLength(u32 num, u32 flags);
|
||||
void sndStreamFree(u32 stid);
|
||||
u32 sndStreamActivate(u32 stid);
|
||||
void sndStreamDeactivate(u32 stid);
|
||||
|
||||
void hwActivateStudio(u8 studio, u32 isMaster, SND_STUDIO_TYPE type);
|
||||
void hwDeactivateStudio(u8);
|
||||
void hwSetPriority(unsigned long v, unsigned long prio);
|
||||
void hwSetPriority(u32 v, u32 prio);
|
||||
u32 hwIsActive(u32);
|
||||
u32 hwGlobalActivity();
|
||||
void hwSetAUXProcessingCallbacks(unsigned char studio, SND_AUX_CALLBACK auxA, void* userA,
|
||||
void hwSetAUXProcessingCallbacks(u8 studio, SND_AUX_CALLBACK auxA, void* userA,
|
||||
SND_AUX_CALLBACK auxB, void* userB);
|
||||
u8 hwInitStream(u32 len);
|
||||
s16 varGet(SYNTH_VOICE* svoice, u32 ctrl, u8 index);
|
||||
|
||||
u32 sndGetPitch(u8 key, u32 sInfo);
|
||||
|
@ -944,7 +953,7 @@ void salInitHRTFBuffer();
|
|||
void salActivateVoice(DSPvoice* dsp_vptr, u8 studio);
|
||||
void salDeactivateVoice(DSPvoice* dsp_vptr);
|
||||
void salActivateStudio(u8 studio, u32 isMaster, SND_STUDIO_TYPE type);
|
||||
void salDeactivateStudio(unsigned char studio);
|
||||
void salDeactivateStudio(u8 studio);
|
||||
void salActivateVoice(DSPvoice* dsp_vptr, u8 studio);
|
||||
void salCalcVolume(u8 voltab_index, SAL_VOLINFO* vi, float vol, u32 pan, u32 span, float auxa,
|
||||
float auxb, u32 itd, u32 dpl2);
|
||||
|
@ -959,38 +968,75 @@ extern u8 salNumVoices;
|
|||
/* Stream */
|
||||
typedef s32 (*SND_STREAM_UPDATE_CALLBACK)(void* buffer1, u32 len1, void* buffer2, u32 len2,
|
||||
void* user);
|
||||
typedef struct SND_STREAM_INFO {
|
||||
u32 x0_;
|
||||
u32 x4_;
|
||||
u32 x8_;
|
||||
u8 xc_;
|
||||
char data2[0x10 - 0xd];
|
||||
SND_STREAM_UPDATE_CALLBACK updateCb;
|
||||
char data3[0x4C - 0x14];
|
||||
SND_VOICEID voiceId;
|
||||
void* user;
|
||||
char data4[0x64 - 0x54];
|
||||
} SND_STREAM_INFO;
|
||||
typedef struct SNDADPCMinfo {
|
||||
// total size: 0x28
|
||||
u16 numCoef; // offset 0x0, size 0x2
|
||||
u8 initialPS; // offset 0x2, size 0x1
|
||||
u8 loopPS; // offset 0x3, size 0x1
|
||||
s16 loopY0; // offset 0x4, size 0x2
|
||||
s16 loopY1; // offset 0x6, size 0x2
|
||||
s16 coefTab[8][2]; // offset 0x8, size 0x20
|
||||
} SNDADPCMinfo;
|
||||
|
||||
typedef struct STREAM_INFO {
|
||||
#if MUSY_VERSION >= MUSY_VERSION_CHECK(1, 5, 4)
|
||||
u32 nextStreamHandle;
|
||||
#endif
|
||||
u32 stid;
|
||||
u32 flags;
|
||||
u8 state;
|
||||
u8 type;
|
||||
#if MUSY_VERSION >= MUSY_VERSION_CHECK(1, 5, 4)
|
||||
u8 hwStreamHandle;
|
||||
u8 lastPSFromBuffer;
|
||||
#endif
|
||||
SND_STREAM_UPDATE_CALLBACK updateFunction;
|
||||
s16* buffer;
|
||||
u32 size;
|
||||
u32 bytes;
|
||||
u32 last;
|
||||
SNDADPCMinfo adpcmInfo;
|
||||
volatile SND_VOICEID voice;
|
||||
u32 user;
|
||||
u32 frq;
|
||||
u8 prio;
|
||||
u8 vol;
|
||||
u8 pan;
|
||||
u8 span;
|
||||
u8 auxa;
|
||||
u8 auxb;
|
||||
|
||||
#if MUSY_VERSION >= MUSY_VERSION_CHECK(1, 5, 4)
|
||||
u8 orgPan;
|
||||
u8 orgSPan;
|
||||
#endif
|
||||
|
||||
u8 studio;
|
||||
/* These were moved to near the start of the structure in later versions */
|
||||
#if MUSY_VERSION <= MUSY_VERSION_CHECK(1, 5, 3)
|
||||
u8 hwStreamHandle;
|
||||
u32 nextStreamHandle;
|
||||
#endif
|
||||
} STREAM_INFO;
|
||||
|
||||
void streamOutputModeChanged();
|
||||
u8 inpTranslateExCtrl(unsigned char ctrl);
|
||||
u8 inpTranslateExCtrl(u8 ctrl);
|
||||
void inpSetGlobalMIDIDirtyFlag(u8 chan, u8 midiSet, s32 flag);
|
||||
void inpAddCtrl(struct CTRL_DEST* dest, unsigned char ctrl, long scale, unsigned char comb,
|
||||
unsigned long isVar);
|
||||
void inpSetExCtrl(SYNTH_VOICE* svoice, unsigned char ctrl, signed short v);
|
||||
CHANNEL_DEFAULTS* inpGetChannelDefaults(unsigned char midi, unsigned char midiSet);
|
||||
void inpAddCtrl(struct CTRL_DEST* dest, u8 ctrl, long scale, u8 comb, u32 isVar);
|
||||
void inpSetExCtrl(SYNTH_VOICE* svoice, u8 ctrl, s16 v);
|
||||
CHANNEL_DEFAULTS* inpGetChannelDefaults(u8 midi, u8 midiSet);
|
||||
extern CTRL_DEST inpAuxA[8][4];
|
||||
extern CTRL_DEST inpAuxB[8][4];
|
||||
void inpSetMidiLastNote(u8 midi, u8 midiSet, u8 key);
|
||||
u8 inpGetMidiLastNote(u8 midi, u8 midiSet);
|
||||
unsigned short inpGetExCtrl(SYNTH_VOICE* svoice, unsigned char ctrl);
|
||||
unsigned short inpGetMidiCtrl(unsigned char ctrl, unsigned char channel, unsigned char set);
|
||||
void inpSetMidiLastNote(unsigned char midi, unsigned char midiSet, unsigned char key);
|
||||
u16 inpGetExCtrl(SYNTH_VOICE* svoice, u8 ctrl);
|
||||
u16 inpGetMidiCtrl(u8 ctrl, u8 channel, u8 set);
|
||||
void inpSetMidiLastNote(u8 midi, u8 midiSet, u8 key);
|
||||
u16 inpGetModulation(SYNTH_VOICE* svoice);
|
||||
/* TODO: Figure out what `unk` is */
|
||||
void hwSetSRCType(u32 v, u8 salSRCType);
|
||||
void hwSetITDMode(u32 v, u8 mode);
|
||||
void hwSetPolyPhaseFilter(unsigned long v, unsigned char salCoefSel);
|
||||
void hwSetPolyPhaseFilter(u32 v, u8 salCoefSel);
|
||||
bool hwAddInput(u8 studio, SND_STUDIO_INPUT* in_desc);
|
||||
bool hwRemoveInput(u8 studio, SND_STUDIO_INPUT* in_desc);
|
||||
void hwChangeStudio(u32 v, u8 studio);
|
||||
|
@ -1005,19 +1051,15 @@ extern u8 dspScale2IndexTab[1024];
|
|||
|
||||
typedef void* (*ARAMUploadCallback)(u32, u32);
|
||||
|
||||
u32 aramGetStreamBufferAddress(unsigned char id, unsigned long* len);
|
||||
void aramUploadData(void* mram, unsigned long aram, unsigned long len, unsigned long highPrio,
|
||||
void (*callback)(unsigned long), unsigned long user);
|
||||
u32 aramGetStreamBufferAddress(u8 id, u32* len);
|
||||
void aramUploadData(void* mram, u32 aram, u32 len, u32 highPrio, void (*callback)(u32), u32 user);
|
||||
void aramFreeStreamBuffer(u8 id);
|
||||
void* aramStoreData(void* src, unsigned long len);
|
||||
void aramRemoveData(void* aram, unsigned long len);
|
||||
|
||||
unsigned long macStart(unsigned short macid, unsigned char priority, unsigned char maxVoices,
|
||||
unsigned short allocId, unsigned char key, unsigned char vol,
|
||||
unsigned char panning, unsigned char midi, unsigned char midiSet,
|
||||
unsigned char section, unsigned short step, unsigned short trackid,
|
||||
unsigned char new_vid, unsigned char vGroup, unsigned char studio,
|
||||
unsigned long itd);
|
||||
void* aramStoreData(void* src, u32 len);
|
||||
void aramRemoveData(void* aram, u32 len);
|
||||
u8 aramAllocateStreamBuffer(u32 len);
|
||||
u32 macStart(u16 macid, u8 priority, u8 maxVoices, u16 allocId, u8 key, u8 vol, u8 panning, u8 midi,
|
||||
u8 midiSet, u8 section, u16 step, u16 trackid, u8 new_vid, u8 vGroup, u8 studio,
|
||||
u32 itd);
|
||||
void macMakeInactive(SYNTH_VOICE* svoice, MAC_STATE);
|
||||
|
||||
void sndProfUpdateMisc(SND_PROFILE_INFO* info);
|
||||
|
|
|
@ -7,6 +7,160 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct ARR {
|
||||
// total size: 0x58
|
||||
unsigned long tTab; // offset 0x0, size 0x4
|
||||
unsigned long pTab; // offset 0x4, size 0x4
|
||||
unsigned long tmTab; // offset 0x8, size 0x4
|
||||
unsigned long mTrack; // offset 0xC, size 0x4
|
||||
unsigned long info; // offset 0x10, size 0x4
|
||||
unsigned long loopPoint[16]; // offset 0x14, size 0x40
|
||||
unsigned long tsTab; // offset 0x54, size 0x4
|
||||
} ARR;
|
||||
|
||||
typedef struct TENTRY {
|
||||
// total size: 0xC
|
||||
u32 time; // offset 0x0, size 0x4
|
||||
u8 prgChange; // offset 0x4, size 0x1
|
||||
u8 velocity; // offset 0x5, size 0x1
|
||||
u8 res[2]; // offset 0x6, size 0x2
|
||||
u16 pattern; // offset 0x8, size 0x2
|
||||
s8 transpose; // offset 0xA, size 0x1
|
||||
s8 velocityAdd; // offset 0xB, size 0x1
|
||||
} TENTRY;
|
||||
|
||||
typedef struct TRACK {
|
||||
// total size: 0x8
|
||||
struct TENTRY* base; // offset 0x0, size 0x4
|
||||
struct TENTRY* addr; // offset 0x4, size 0x4
|
||||
} TRACK;
|
||||
|
||||
typedef struct NOTE {
|
||||
// total size: 0x14
|
||||
struct NOTE* next; // offset 0x0, size 0x4
|
||||
struct NOTE* prev; // offset 0x4, size 0x4
|
||||
u32 id; // offset 0x8, size 0x4
|
||||
s32 endTime; // offset 0xC, size 0x4
|
||||
u8 section; // offset 0x10, size 0x1
|
||||
u8 timeIndex; // offset 0x11, size 0x1
|
||||
u8 reserved[2]; // offset 0x12, size 0x2
|
||||
} NOTE;
|
||||
|
||||
typedef struct NOTE_DATA {
|
||||
// total size: 0x6
|
||||
u16 time; // offset 0x0, size 0x2
|
||||
u8 key; // offset 0x2, size 0x1
|
||||
u8 velocity; // offset 0x3, size 0x1
|
||||
u16 length; // offset 0x4, size 0x2
|
||||
} NOTE_DATA;
|
||||
|
||||
typedef struct PRG_STATE {
|
||||
// total size: 0x4
|
||||
u16 macId; // offset 0x0, size 0x2
|
||||
u8 priority; // offset 0x2, size 0x1
|
||||
u8 maxVoices; // offset 0x3, size 0x1
|
||||
} PRG_STATE;
|
||||
|
||||
typedef struct SEQ_STREAM {
|
||||
// total size: 0xC
|
||||
u8* nextAddr; // offset 0x0, size 0x4
|
||||
u16 value; // offset 0x4, size 0x2
|
||||
s16 nextDelta; // offset 0x6, size 0x2
|
||||
u32 nextTime; // offset 0x8, size 0x4
|
||||
} SEQ_STREAM;
|
||||
|
||||
typedef struct CPAT {
|
||||
// total size: 0x2C
|
||||
u32 lTime; // offset 0x0, size 0x4
|
||||
u32 baseTime; // offset 0x4, size 0x4
|
||||
NOTE_DATA* addr; // offset 0x8, size 0x4
|
||||
TENTRY* patternInfo; // offset 0xC, size 0x4
|
||||
SEQ_STREAM pitchBend; // offset 0x10, size 0xC
|
||||
SEQ_STREAM modulation; // offset 0x1C, size 0xC
|
||||
u8 midi; // offset 0x28, size 0x1
|
||||
} CPAT;
|
||||
|
||||
typedef struct SEQ_EVENT {
|
||||
// total size: 0x18
|
||||
struct SEQ_EVENT* next; // offset 0x0, size 0x4
|
||||
struct SEQ_EVENT* prev; // offset 0x4, size 0x4
|
||||
u32 time; // offset 0x8, size 0x4
|
||||
union evInfo {
|
||||
TENTRY* trackAddr;
|
||||
struct {
|
||||
// total size: 0x8
|
||||
NOTE_DATA* addr; // offset 0x0, size 0x4
|
||||
CPAT* base; // offset 0x4, size 0x4
|
||||
} pattern;
|
||||
} info; // offset 0xC, size 0x8
|
||||
u8 type; // offset 0x14, size 0x1
|
||||
u8 trackId; // offset 0x15, size 0x1
|
||||
} SEQ_EVENT;
|
||||
|
||||
typedef struct MTRACK_DATA {
|
||||
// total size: 0x8
|
||||
u32 time; // offset 0x0, size 0x4
|
||||
u32 bpm; // offset 0x4, size 0x4
|
||||
} MTRACK_DATA;
|
||||
|
||||
typedef struct MTRACK {
|
||||
// total size: 0x8
|
||||
MTRACK_DATA* base; // offset 0x0, size 0x4
|
||||
MTRACK_DATA* addr; // offset 0x4, size 0x4
|
||||
} MTRACK;
|
||||
|
||||
typedef struct TICKS {
|
||||
// total size: 0x8
|
||||
u32 low; // offset 0x0, size 0x4
|
||||
long high; // offset 0x4, size 0x4
|
||||
} TICKS;
|
||||
|
||||
typedef struct SEQ_SECTION {
|
||||
// total size: 0x38
|
||||
struct MTRACK mTrack; // offset 0x0, size 0x8
|
||||
u32 bpm; // offset 0x8, size 0x4
|
||||
TICKS tickDelta[2]; // offset 0xC, size 0x10
|
||||
SEQ_EVENT* globalEventRoot; // offset 0x1C, size 0x4
|
||||
TICKS time[2]; // offset 0x20, size 0x10
|
||||
u8 timeIndex; // offset 0x30, size 0x1
|
||||
u16 speed; // offset 0x32, size 0x2
|
||||
u16 loopCnt; // offset 0x34, size 0x2
|
||||
u8 loopDisable; // offset 0x36, size 0x1
|
||||
} SEQ_SECTION;
|
||||
|
||||
typedef struct SEQ_INSTANCE {
|
||||
// total size: 0x1868
|
||||
struct SEQ_INSTANCE* next; // offset 0x0, size 0x4
|
||||
struct SEQ_INSTANCE* prev; // offset 0x4, size 0x4
|
||||
u8 state; // offset 0x8, size 0x1
|
||||
u8 index; // offset 0x9, size 0x1
|
||||
u16 groupID; // offset 0xA, size 0x2
|
||||
u32 publicId; // offset 0xC, size 0x4
|
||||
PAGE* normtab; // offset 0x10, size 0x4
|
||||
u8 normTrans[128]; // offset 0x14, size 0x80
|
||||
PAGE* drumtab; // offset 0x94, size 0x4
|
||||
u8 drumTrans[128]; // offset 0x98, size 0x80
|
||||
ARR* arrbase; // offset 0x118, size 0x4
|
||||
u32 trackMute[2]; // offset 0x11C, size 0x8
|
||||
TRACK track[64]; // offset 0x124, size 0x200
|
||||
u8 trackVolGroup[64]; // offset 0x324, size 0x40
|
||||
CPAT pattern[64]; // offset 0x364, size 0xB00
|
||||
NOTE* noteUsed[2]; // offset 0xE64, size 0x8
|
||||
NOTE* noteKeyOff; // offset 0xE6C, size 0x4
|
||||
PRG_STATE prgState[16]; // offset 0xE70, size 0x40
|
||||
u8 defVGroup; // offset 0xEB0, size 0x1
|
||||
SND_CROSSFADE syncCrossInfo; // offset 0xEB4, size 0x28
|
||||
u32* syncSeqIdPtr; // offset 0xEDC, size 0x4
|
||||
u8 syncActive; // offset 0xEE0, size 0x1
|
||||
u8 defStudio; // offset 0xEE1, size 0x1
|
||||
u8 keyOffCheck; // offset 0xEE2, size 0x1
|
||||
SEQ_EVENT event[64]; // offset 0xEE4, size 0x600
|
||||
u8* trackSectionTab; // offset 0x14E4, size 0x4
|
||||
SEQ_SECTION section[16]; // offset 0x14E8, size 0x380
|
||||
} SEQ_INSTANCE;
|
||||
|
||||
extern u8 synthTrackVolume[64];
|
||||
extern SEQ_INSTANCE seqInstance[8];
|
||||
extern u16 seqMIDIPriority[8][16];
|
||||
|
||||
void sndSeqStop(s32 unk);
|
||||
|
@ -14,6 +168,7 @@ void sndSeqSpeed(s32 unk1, s32 unk2);
|
|||
void sndSeqContinue(s32 unk);
|
||||
void sndSeqMute(s32 unk1, s32 unk2, s32 unk3);
|
||||
void sndSeqVolume(s32 unk1, s32 unk2, s32 unk3, s32 unk4);
|
||||
void seqStop(unsigned long seqId);
|
||||
u16 seqGetMIDIPriority(s32 unk1, s32 unk2);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -23,7 +23,8 @@ bool synthFXSetCtrl(SND_VOICEID vid, u8 ctrl, u8 value);
|
|||
bool synthFXSetCtrl14(SND_VOICEID vid, u8 ctrl, u16 value);
|
||||
bool synthSendKeyOff(SND_VOICEID vid);
|
||||
SND_VOICEID synthFXStart(SND_FXID fid, u8 vol, u8 pan, u8 studio, u8);
|
||||
void synthVolume(u8 volume, u16 time, u8 volgroup2, s32, s32);
|
||||
void synthVolume(unsigned char volume, unsigned short time, unsigned char vGroup,
|
||||
unsigned char seqMode, unsigned long seqId);
|
||||
|
||||
/* TODO: Move this where it belongs */
|
||||
void hwSetAUXProcessingCallbacks(u8 studio, SND_AUX_CALLBACK auxA, void* userA,
|
||||
|
|
|
@ -88,6 +88,7 @@ double ldexp(double x, int exp);
|
|||
double copysign(double x, double y);
|
||||
|
||||
double floor(double x);
|
||||
float floorf(float x) { return floor(x); }
|
||||
|
||||
double fabs(double x);
|
||||
double pow(double x, double y);
|
||||
|
|
|
@ -1,17 +1,54 @@
|
|||
/*
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
*/
|
||||
#include "dolphin/GBAPriv.h"
|
||||
|
||||
|