Skip to content

Commit

Permalink
Match AudioSynth_ProcessNote! (#279)
Browse files Browse the repository at this point in the history
* team faces

* fix audio table data in jp version

* audio docs

* Match! AudioSynth_ProcessNote

* .
  • Loading branch information
sonicdcer authored Nov 10, 2024
1 parent f9ec3bb commit 976fb57
Show file tree
Hide file tree
Showing 26 changed files with 1,438 additions and 994 deletions.
36 changes: 18 additions & 18 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,21 @@ f7475fb11e7e6830f82883412638e8390791ab87:
- include/sf64event.h
- include/sf64player.h

d064229a32cc05ab85e2381ce07744eb3ffaf530:
name: Star Fox 64 (JP) (V1.0)
path: assets/yaml/jp/rev0
config:
gbi: F3DEX
sort: OFFSET
output:
binary: starship.otr
code: src/assets
headers: include/assets
modding: src/assets
enums:
- include/sf64object.h
- include/sf64level.h
- include/sf64mesg.h
- include/sf64audio_external.h
- include/sf64event.h
- include/sf64player.h
# d064229a32cc05ab85e2381ce07744eb3ffaf530:
# name: Star Fox 64 (JP) (V1.0)
# path: assets/yaml/jp/rev0
# config:
# gbi: F3DEX
# sort: OFFSET
# output:
# binary: starship.otr
# code: src/assets
# headers: include/assets
# modding: src/assets
# enums:
# - include/sf64object.h
# - include/sf64level.h
# - include/sf64mesg.h
# - include/sf64audio_external.h
# - include/sf64event.h
# - include/sf64player.h
4 changes: 4 additions & 0 deletions include/macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@

#define TIME_IN_SECONDS(x) (x * 30);

#define CLAMP(x, min, max) ((x) < (min) ? (min) : (x) > (max) ? (max) : (x))
#define CLAMP_MAX(x, max) ((x) > (max) ? (max) : (x))
#define CLAMP_MIN(x, min) ((x) < (min) ? (min) : (x))

#define RAND_FLOAT(max) (Rand_ZeroOne()*(max))
#define RAND_INT(max) ((s32)(Rand_ZeroOne()*(max)))
#define RAND_FLOAT_CENTERED(width) ((Rand_ZeroOne()-0.5f)*(width))
Expand Down
6 changes: 3 additions & 3 deletions include/prevent_context_reordering.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef PREVENT_CONTEXT_REORDERING_H
#define PREVENT_CONTEXT_REORDERING_H

// extern int Dummyhalf;
extern int Dummyhalf;
// struct Dummy0 {int x;};
// struct Dummy1 {int x;};
// struct Dummy2 {int x;};
Expand All @@ -17,8 +17,8 @@
// struct Dummy12 {int x;};
// struct Dummy13 {int x;};
// struct Dummy14 {int x;};
struct Dummy15 {int x;};
struct Dummy16 {int x;};
// struct Dummy15 {int x;};
// struct Dummy16 {int x;};
struct Dummy17 {int x;};
struct Dummy18 {int x;};
struct Dummy19 {int x;};
Expand Down
50 changes: 25 additions & 25 deletions include/sf64audio_provisional.h
Original file line number Diff line number Diff line change
Expand Up @@ -1021,14 +1021,14 @@ typedef struct {

// audio_synthesis
void func_80008780(f32*, s32, f32*);
Acmd* func_80009B64(Acmd* aList, s32* cmdCount, s16* aiBufStart, s32 aiBufLen);
Acmd* AudioSynth_Update(Acmd* aList, s32* cmdCount, s16* aiBufStart, s32 aiBufLen);

// audio_effects
void func_800135A8(SequencePlayer* seqplayer);
void func_80013A18(Note* note);
void func_80013A84(Note* note);
void func_80013B6C(AdsrState* adsr, EnvelopePoint* envelope, s16* arg2);
f32 func_80013B90(AdsrState* adsr);
void Audio_SequencePlayerProcessSound(SequencePlayer* seqplayer);
void Audio_NoteVibratoUpdate(Note* note);
void Audio_NoteVibratoInit(Note* note);
void Audio_AdsrInit(AdsrState* adsr, EnvelopePoint* envelope, s16* arg2);
f32 Audio_AdsrUpdate(AdsrState* adsr);

// audio_heap
void AudioHeap_DiscardFont(s32 fontId);
Expand Down Expand Up @@ -1058,29 +1058,29 @@ void AudioLoad_DiscardSeqFonts(s32 seqId);
s32 AudioLoad_SlowLoadSample(s32 fontId, u8 instId, s8* status);

// audio_playback
TunedSample* func_80011D10(Instrument* instrument, s32 arg1);
TunedSample* Audio_GetInstrumentTunedSample(Instrument* instrument, s32 semitone);
Instrument* Audio_GetInstrument(s32, s32);
Drum* Audio_GetDrum(s32, s32);
void func_80011F4C(Note* note);
void func_80011FA8(void);
void func_8001266C(SequenceLayer* layer);
void func_800127B0(Note* note, SequenceLayer* layer);
void func_80012864(NotePool* pool);
void func_800128B4(void);
void func_80012964(NotePool* pool);
void func_80012AC4(NotePool* pool, s32);
void func_80012C40(Note* note);
Note* func_8001301C(SequenceLayer* layer);
void func_800132E8(void);
void Audio_NoteDisable(Note* note);
void Audio_ProcessNotes(void);
void Audio_SeqLayerNoteDecay(SequenceLayer* layer);
void Audio_InitSyntheticWave(Note* note, SequenceLayer* layer);
void Audio_InitNoteLists(NotePool* pool);
void Audio_InitNoteFreeList(void);
void Audio_NotePoolClear(NotePool* pool);
void Audio_NotePoolFill(NotePool* pool, s32);
void Audio_AudioListRemove(Note* note);
Note* Audio_AllocNote(SequenceLayer* layer);
void Audio_NoteInitAll(void);

// audio_seqplayer
void func_8001415C(SequenceChannel* channel);
void func_800144E4(SequencePlayer* seqPlayer);
void func_800145BC(AudioListItem* list, AudioListItem* item);
void* func_800145FC(AudioListItem* list);
void func_8001678C(s32 arg0);
void func_80016804(s32 arg0);
void func_800168BC(void);
void AudioSeq_SequenceChannelDisable(SequenceChannel* channel);
void AudioSeq_SequencePlayerDisable(SequencePlayer* seqPlayer);
void AudioSeq_AudioListPushBack(AudioListItem* list, AudioListItem* item);
void* AudioSeq_AudioListPopBack(AudioListItem* list);
void AudioSeq_ProcessSequences(s32 arg0);
void AudioSeq_ResetSequencePlayer(s32 arg0);
void AudioSeq_InitSequencePlayers(void);

// audio_thread
void AudioThread_ScheduleProcessCmds(void);
Expand Down
10 changes: 10 additions & 0 deletions include/sf64object.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@
#define HITBOX_SHADOW 300000.0f
#define HITBOX_WHOOSH 400000.0f

#define TEAM_FACE (14)

typedef enum ActorCSTeamFace {
/* 0 */ FACE_NONE,
/* 1 */ FACE_FOX,
/* 2 */ FACE_FALCO,
/* 3 */ FACE_SLIPPY,
/* 4 */ FACE_PEPPY
} ActorCSTeamFace;

typedef struct {
/* 0x0 */ f32 offset;
/* 0x4 */ f32 size;
Expand Down
4 changes: 2 additions & 2 deletions linker_scripts/jp/rev0/symbol_addrs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1603,8 +1603,8 @@ func_800C01D4 = 0x800C01D4;
func_800C02E4 = 0x800C02E4;
D_800C0760 = 0x800C0760;
D_800C07B0 = 0x800C07B0;
D_800C0BE0 = 0x800C0BE0;
D_800C0E00 = 0x800C0E00;
gSoundFontTableInit = 0x800C0BE0;
gSeqFontTableInit = 0x800C0E00;
D_800C1720 = 0x800C1720;
D_800C1730 = 0x800C1730;
D_800C1770 = 0x800C1770;
Expand Down
130 changes: 65 additions & 65 deletions linker_scripts/us/rev1/symbol_addrs_audio.txt
Original file line number Diff line number Diff line change
Expand Up @@ -233,15 +233,15 @@ func_800098DC = 0x800098DC;
func_80009984 = 0x80009984;
func_80009A2C = 0x80009A2C;
func_80009AAC = 0x80009AAC;
func_80009B64 = 0x80009B64;
AudioSynth_Update = 0x80009B64;
func_80009D78 = 0x80009D78;
func_8000A128 = 0x8000A128;
func_8000A25C = 0x8000A25C;
func_8000A700 = 0x8000A700;
func_8000B3F0 = 0x8000B3F0;
AudioSynth_ProcessNote = 0x8000A700;
AudioSynth_LoadWaveSamples = 0x8000B3F0;
func_8000B480 = 0x8000B480;
func_8000B51C = 0x8000B51C;
func_8000B98C = 0x8000B98C;
AudioSynth_ApplyHaasEffect = 0x8000B98C;



Expand Down Expand Up @@ -332,72 +332,72 @@ AudioLoad_GetSamplesForFont = 0x80011758;



func_80011890 = 0x80011890;
func_80011C58 = 0x80011C58;
func_80011D10 = 0x80011D10;
Audio_InitNoteSub = 0x80011890;
Audio_NoteSetResamplingRate = 0x80011C58;
Audio_GetInstrumentTunedSample = 0x80011D10;
Audio_GetInstrument = 0x80011D4C;
Audio_GetDrum = 0x80011DFC;
func_80011EB8 = 0x80011EB8;
func_80011F4C = 0x80011F4C;
func_80011FA8 = 0x80011FA8;
func_80012438 = 0x80012438;
func_8001266C = 0x8001266C;
func_8001268C = 0x8001268C;
func_800126AC = 0x800126AC;
func_800127B0 = 0x800127B0;
func_80012854 = 0x80012854;
func_80012864 = 0x80012864;
func_800128B4 = 0x800128B4;
func_80012964 = 0x80012964;
func_80012AC4 = 0x80012AC4;
func_80012C00 = 0x80012C00;
func_80012C40 = 0x80012C40;
func_80012C6C = 0x80012C6C;
func_80012CEC = 0x80012CEC;
Audio_NoteInit = 0x80011EB8;
Audio_NoteDisable = 0x80011F4C;
Audio_ProcessNotes = 0x80011FA8;
Audio_SeqLayerDecayRelease = 0x80012438;
Audio_SeqLayerNoteDecay = 0x8001266C;
Audio_SeqLayerNoteRelease = 0x8001268C;
Audio_BuildSyntheticWave = 0x800126AC;
Audio_InitSyntheticWave = 0x800127B0;
Audio_InitNoteList = 0x80012854;
Audio_InitNoteLists = 0x80012864;
Audio_InitNoteFreeList = 0x800128B4;
Audio_NotePoolClear = 0x80012964;
Audio_NotePoolFill = 0x80012AC4;
Audio_AudioListPushFront = 0x80012C00;
Audio_AudioListRemove = 0x80012C40;
Audio_FindNodeWithPrioLessThan = 0x80012C6C;
Audio_NoteInitForLayer = 0x80012CEC;
func_80012E28 = 0x80012E28;
func_80012E5C = 0x80012E5C;
func_80012E88 = 0x80012E88;
func_80012ED4 = 0x80012ED4;
func_80012F24 = 0x80012F24;
func_8001301C = 0x8001301C;
func_800132E8 = 0x800132E8;
Audio_NoteReleaseAndTakeOwnership = 0x80012E5C;
Audio_AllocNoteFromDisabled = 0x80012E88;
Audio_AllocNoteFromDecaying = 0x80012ED4;
Audio_AllocNoteFromActive = 0x80012F24;
Audio_AllocNote = 0x8001301C;
Audio_NoteInitAll = 0x800132E8;
func_80013400 = 0x80013400;
func_800135A8 = 0x800135A8;
func_80013708 = 0x80013708;
Audio_SequencePlayerProcessSound = 0x800135A8;
Audio_GetPortamentoFreqScale = 0x80013708;
func_800137DC = 0x800137DC;
func_80013820 = 0x80013820;
func_80013A18 = 0x80013A18;
func_80013A84 = 0x80013A84;
func_80013B6C = 0x80013B6C;
func_80013B90 = 0x80013B90;



func_80013EA0 = 0x80013EA0;
func_80013FC4 = 0x80013FC4;
func_800140D0 = 0x800140D0;
func_8001410C = 0x8001410C;
func_8001415C = 0x8001415C;
func_800141C8 = 0x800141C8;
func_80014244 = 0x80014244;
func_80014370 = 0x80014370;
func_80014440 = 0x80014440;
func_800144E4 = 0x800144E4;
func_800145BC = 0x800145BC;
func_800145FC = 0x800145FC;
func_8001463C = 0x8001463C;
func_800146C0 = 0x800146C0;
func_800146D4 = 0x800146D4;
func_80014704 = 0x80014704;
func_80014748 = 0x80014748;
func_800152C0 = 0x800152C0;
func_80015330 = 0x80015330;
func_800153C4 = 0x800153C4;
func_800153E8 = 0x800153E8;
func_80015FD4 = 0x80015FD4;
func_8001678C = 0x8001678C;
func_80016804 = 0x80016804;
func_800168BC = 0x800168BC;
Audio_GetVibratoFreqScale = 0x80013820;
Audio_NoteVibratoUpdate = 0x80013A18;
Audio_NoteVibratoInit = 0x80013A84;
Audio_AdsrInit = 0x80013B6C;
Audio_AdsrUpdate = 0x80013B90;



AudioSeq_InitSequenceChannel = 0x80013EA0;
AudioSeq_SeqChannelSetLayer = 0x80013FC4;
AudioSeq_SeqLayerDisable = 0x800140D0;
AudioSeq_SeqLayerFree = 0x8001410C;
AudioSeq_SequenceChannelDisable = 0x8001415C;
AudioSeq_RequestFreeSeqChannel = 0x800141C8;
AudioSeq_SequencePlayerSetupChannels = 0x80014244;
AudioSeq_SequencePlayerDisableChannels = 0x80014370;
AudioSeq_SequenceChannelEnable = 0x80014440;
AudioSeq_SequencePlayerDisable = 0x800144E4;
AudioSeq_AudioListPushBack = 0x800145BC;
AudioSeq_AudioListPopBack = 0x800145FC;
AudioSeq_InitLayerFreelist = 0x8001463C;
AudioSeq_ScriptReadU8 = 0x800146C0;
AudioSeq_ScriptReadS16 = 0x800146D4;
AudioSeq_ScriptReadCompressedU16 = 0x80014704;
AudioSeq_SeqLayerProcessScript = 0x80014748;
AudioSeq_GetInstrument = 0x800152C0;
AudioSeq_SetInstrument = 0x80015330;
AudioSeq_SequenceChannelSetVolume = 0x800153C4;
AudioSeq_SequenceChannelProcessScript = 0x800153E8;
AudioSeq_SequencePlayerProcessSequence = 0x80015FD4;
AudioSeq_ProcessSequences = 0x8001678C;
AudioSeq_ResetSequencePlayer = 0x80016804;
AudioSeq_InitSequencePlayers = 0x800168BC;



Expand Down
Loading

0 comments on commit 976fb57

Please sign in to comment.