Clean up hardcoded symbols (#139)

* heapsort

* suff
This commit is contained in:
petrie911 2024-02-20 12:01:42 -06:00 committed by GitHub
parent 389ad0cd35
commit 05747b1b52
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
15 changed files with 1471 additions and 279 deletions

View File

@ -479,11 +479,10 @@ $(ROM): $(ELF)
$(V)$(OBJCOPY) -O binary $< $@
# Link
$(ELF): $(LIBULTRA_O) $(O_FILES) $(LD_SCRIPT) $(BUILD_DIR)/linker_scripts/$(VERSION)/hardware_regs.ld $(BUILD_DIR)/linker_scripts/$(VERSION)/undefined_syms.ld $(BUILD_DIR)/linker_scripts/$(VERSION)/pif_syms.ld $(BUILD_DIR)/linker_scripts/$(VERSION)/auto/undefined_syms_auto.ld $(BUILD_DIR)/linker_scripts/$(VERSION)/auto/undefined_funcs_auto.ld
$(ELF): $(LIBULTRA_O) $(O_FILES) $(LD_SCRIPT) $(BUILD_DIR)/linker_scripts/$(VERSION)/hardware_regs.ld $(BUILD_DIR)/linker_scripts/$(VERSION)/undefined_syms.ld $(BUILD_DIR)/linker_scripts/$(VERSION)/pif_syms.ld
$(call print,Linking:,$<,$@)
$(V)$(LD) $(LDFLAGS) -T $(LD_SCRIPT) \
-T $(BUILD_DIR)/linker_scripts/$(VERSION)/hardware_regs.ld -T $(BUILD_DIR)/linker_scripts/$(VERSION)/undefined_syms.ld -T $(BUILD_DIR)/linker_scripts/$(VERSION)/pif_syms.ld \
-T $(BUILD_DIR)/linker_scripts/$(VERSION)/auto/undefined_syms_auto.ld -T $(BUILD_DIR)/linker_scripts/$(VERSION)/auto/undefined_funcs_auto.ld \
-Map $(LD_MAP) -o $@
# PreProcessor

View File

@ -1024,4 +1024,201 @@ typedef struct {
/* 0x08 */ u32 permanentPoolSize;
} AudioHeapInitSizes; // size = 0xC
typedef struct {
/* 0x00 */ u8 priority;
/* 0x01 */ u8 waveId;
/* 0x02 */ u8 harmonicIndex; // the harmonic index for the synthetic wave contained in gWaveSamples (also matches
// the base 2 logarithm of the harmonic order)
/* 0x03 */ u8 fontId;
/* 0x04 */ u8 unk_04;
/* 0x05 */ u8 stereoHeadsetEffects;
/* 0x06 */ s16 adsrVolScaleUnused;
/* 0x08 */ f32 portamentoFreqScale;
/* 0x0C */ f32 vibratoFreqScale;
/* 0x10 */ SequenceLayer* prevParentLayer;
/* 0x14 */ SequenceLayer* parentLayer;
/* 0x18 */ SequenceLayer* wantedParentLayer;
/* 0x1C */ NoteAttributes attributes;
/* 0x40 */ AdsrState adsr;
/* 0x60 */ Portamento portamento;
/* 0x6C */ VibratoState vibratoState;
} NotePlaybackState_Short; // size = 0x70
typedef struct {
struct {
/* 0x00 */ volatile u8 enabled : 1;
/* 0x00 */ u8 needsInit : 1;
/* 0x00 */ u8 finished : 1; // ?
/* 0x00 */ u8 unused : 1;
/* 0x00 */ u8 stereoStrongRight : 1;
/* 0x00 */ u8 stereoStrongLeft : 1;
/* 0x00 */ u8 stereoHeadsetEffects : 1;
/* 0x00 */ u8 usesHeadsetPanEffects : 1; // ?
} bitField0;
struct {
/* 0x01 */ u8 reverbIndex : 3;
/* 0x01 */ u8 bookOffset : 2;
/* 0x01 */ u8 isSyntheticWave : 1;
/* 0x01 */ u8 hasTwoParts : 1;
/* 0x01 */ u8 useHaasEffect : 1;
} bitField1;
/* 0x02 */ u8 pad2[0xE];
} NoteSubEu_Short; // size = 0x20
typedef struct Note_C0 {
/* 0x00 */ AudioListItem listItem;
/* 0x10 */ NoteSynthesisState synthesisState;
/* 0x30 */ NotePlaybackState_Short playbackState;
/* 0xA0 */ char padA0[0x10];
/* 0xB0 */ NoteSubEu_Short noteSubEu;
} Note_C0;
typedef struct {
/* 0x000 */ u8 enabled : 1;
/* 0x000 */ u8 finished : 1;
/* 0x000 */ u8 muted : 1;
/* 0x000 */ u8 seqDmaInProgress : 1;
/* 0x000 */ u8 fontDmaInProgress : 1;
/* 0x000 */ u8 recalculateVolume : 1;
/* 0x000 */ u8 stopScript : 1;
/* 0x000 */ u8 applyBend : 1;
/* 0x001 */ u8 state;
/* 0x002 */ u8 noteAllocPolicy;
/* 0x003 */ u8 muteBehavior;
/* 0x004 */ u8 seqId;
/* 0x005 */ u8 defaultFont;
/* 0x006 */ u8 unk_06[1];
/* 0x007 */ s8 playerIdx;
/* 0x008 */ u16 tempo; // seqTicks per minute
/* 0x00A */ u16 tempoAcc; // tempo accumulation, used in a discretized algorithm to apply tempo.
/* 0x00C */ u16 tempoChange; // Used to adjust the tempo without altering the base tempo.
/* 0x00E */ s16 transposition;
/* 0x010 */ u16 delay;
/* 0x012 */ u16 fadeTimer; // in ticks
/* 0x014 */ u16 fadeTimerUnkEu;
/* 0x018 */ u8* seqData;
/* 0x01C */ f32 fadeVolume;
/* 0x020 */ f32 fadeVelocity;
/* 0x024 */ f32 volume;
/* 0x028 */ f32 muteVolumeScale;
/* 0x02C */ f32 fadeVolumeScale;
/* 0x030 */ f32 appliedFadeVolume;
/* 0x034 */ f32 bend;
/* 0x038 */ struct SequenceChannel* channels[16];
/* 0x078 */ SeqScriptState scriptState;
/* 0x094 */ u8* shortNoteVelocityTable;
/* 0x098 */ u8* shortNoteGateTimeTable;
/* 0x09C */ NotePool notePool;
/* 0x0DC */ s32 skipTicks;
/* 0x0E0 */ u32 scriptCounter;
/* 0x0E4 */ char
padE4[0x68]; // unused struct members for sequence/sound font dma management, according to sm64 decomp
} SequencePlayer_14C; // size = 0x160
typedef struct {
AudioAllocPool pool;
AudioCacheEntry entry[32];
} PermanentCache; // size = 0x190
extern s16 D_800C7C2C;
extern s32 D_800C7C30;
extern AudioSpec D_800C76B8[];
extern SynthesisReverb D_8014BA50[4];
// D_8014C1A0
extern u16 D_8014C1B0;
extern s8 D_8014C1B3;
extern s16 D_8014C1B4;
extern NoteSubEu* D_8014C1B8;
extern AudioAllocPool D_8014C1C0;
extern AudioAllocPool D_8014C1D0;
extern AudioAllocPool D_8014C1E0;
// 0x20
extern AudioAllocPool D_8014C210;
extern AudioAllocPool D_8014C220;
extern AudioAllocPool D_8014C230;
extern AudioCache D_8014C240; // seqCache
extern AudioCache D_8014C410; // fontCache
extern AudioCache D_8014C5E0; // sampleBankCache
extern PermanentCache D_8014C7B0;
extern AudioSampleCache D_8014C940;
extern AudioSampleCache D_8014CE58;
extern s32 D_8014CE60;
extern s32 D_8014D368;
extern AudioSessionPoolSplit D_8014D370;
extern AudioCommonPoolSplit D_8014D380;
extern AudioCommonPoolSplit D_8014D388;
extern AudioCommonPoolSplit D_8014D398;
extern u8 D_8014D3A8[64];
extern u8 D_8014D3E8[64];
extern u8 D_8014D428[256];
extern volatile u8 D_8014D528;
extern u8 D_8014D529;
extern s32 D_8014D52C;
// 0x1000 gap
extern Note_C0* D_8014E530;
extern SequencePlayer_14C D_8014E538[4];
extern UNK_TYPE D_801530C0;
extern AudioPreloadReq D_80153300[];
extern s32 D_80153D04;
extern s32 D_80155A48;
extern AudioTable* D_80155C60;
extern SoundFont* D_80155C70;
extern AudioBufferParameters D_80155C78;
// D_80155C98
extern s32 D_80155C9C;
extern s32 D_80155CA0;
extern u16 D_80155CA4;
extern s32 D_80155CB4;
extern void* D_80155CB8[2];
extern UNK_TYPE D_80155CC0;
extern f32 D_80155D68;
extern s32 D_80155D6C;
extern u16* D_80155D70[];
extern u16 D_80155D7C[];
void AudioHeap_ResetLoadStatus(void);
void AudioHeap_DiscardFont(s32 fontId);
void AudioHeap_DiscardSequence(s32 seqId);
void* AudioHeap_AllocZeroed(AudioAllocPool* pool, u32 size);
void* AudioHeap_Alloc(AudioAllocPool* pool, u32 size);
void AudioHeap_InitPool(AudioAllocPool* pool, void* ramAddr, u32 size);
void AudioHeap_InitPersistentCache(AudioPersistentCache* persistent);
void AudioHeap_InitTemporaryCache(AudioTemporaryCache* temporary);
void AudioHeap_ResetPool(AudioAllocPool* pool);
void func_8000BFE8(s32 arg0);
void func_8000C044(AudioSessionPoolSplit* split);
void func_8000C0C0(AudioCommonPoolSplit* split);
void func_8000C13C(AudioCommonPoolSplit* split);
void func_8000C1F8(AudioCommonPoolSplit* split);
void* AudioHeap_AllocCached(s32 tableType, s32 size, s32 cache, s32 id);
s32 AudioHeap_SearchCaches(s32 tableType, s32 cache, s32 id);
void* AudioHeap_SearchRegularCaches(s32 tableType, s32 cache, s32 id);
void func_8000CAF4(f32 p, f32 q, u16* out);
void func_8000CEC8(void);
void func_8000D08C(void);
s32 func_8000D104(void);
void func_8000D4A8(void);
void* AudioHeap_SearchPermanentCache(s32 tableType, s32 id);
u8* func_8000DB64(s32 arg0, s32 arg1, u32 arg2);
void* AudioHeap_AllocTemporarySampleCache(s32 size, s32 fontId, s32 sampleAddr, s8 medium);
void* AudioHeap_AllocPersistentSampleCache(s32 size, s32 fontId, s32 sampleAddr, s8 medium);
void* AudioHeap_AllocPersistentSampleCache_2(u32 size, s32 fontId, s32 sampleAddr, s8 medium);
void func_8000DCD4(u32 arg0, u32 arg1);
SampleCacheEntry* AudioHeap_AllocTemporarySampleCacheEntry(s32 arg0);
void func_8000DFFC(SampleCacheEntry* entry);
void func_8000E1C4(SampleCacheEntry* entry, Sample* sample);
SampleCacheEntry* AudioHeap_AllocPersistentSampleCacheEntry(u32 arg0);
void func_8000E290(void);
void func_8000E8E0(s32);
void func_800128B4(void);
void func_800132E8(void);
void func_80011F4C(Note_C0*);
Instrument* func_80011D4C(s32, s32);
Drum* func_80011DFC(s32, s32);
void func_80012C40(Note_C0*);
void func_800145BC(UNK_TYPE*, Note_C0*);
void func_800144E4(SequencePlayer_14C*);
#endif

View File

@ -119,7 +119,7 @@ extern OverlayInit sOvli4_Katina[1]; // i4
extern OverlayInit sOvli5_Macbeth[2]; // E6A810
extern OverlayInit sOvli1_Training[1]; // fox_i1
extern OverlayInit sOvli2_Versus[2]; // fox_i2
extern OverlayInit sunused_Overlay[1]; // EFFA40
extern OverlayInit sUnused_Overlay[1]; // EFFA40
DECLARE_SEGMENT(makerom);
DECLARE_SEGMENT(main);

View File

@ -4,8 +4,6 @@
#include "libultra/ultra64.h"
#include "sf64math.h"
#define UNK_TYPE s32
typedef struct {
/* 0x00 */ u8 unk_00;
/* 0x02 */ u16 unk_02;

View File

@ -17,6 +17,8 @@
#include "sf64save.h"
#include "buffers.h"
#define UNK_TYPE s32
typedef s32 (*CompareFunc)(void*, void*);
s32 Lib_vsPrintf(char* dst, const char* fmt, va_list args);

View File

@ -1,3 +1,4 @@
// various hallucinated symbols
D_1 = 0x1; //ignore:true
D_80120000 = 0x80120000;//ignore:true
D_80130001 = 0x80130001;//ignore:true
@ -22,12 +23,35 @@ D_80000014 = 0x80000014;//ignore:true
D_80000018 = 0x80000018;//ignore:true
D_8000001C = 0x8000001C;//ignore:true
D_80000024 = 0x80000024;//ignore:true
D_801D0001 = 0x801D0001;//ignore:true
D_80180001 = 0x80180001;//ignore:true
D_7FFFFFFE = 0x7FFFFFFE;//ignore:true
// constant for K1 access
D_A0000000 = 0xA0000000;//ignore:true
// hardcoded addresses in libultra
D_BFF00000 = 0xBFF00000;//ignore:true
D_BFF08000 = 0xBFF08000;//ignore:true
D_BFF08004 = 0xBFF08004;//ignore:true
// RDB regs used only in exceptasm
D_C0000000 = 0xC0000000;//ignore:true
D_C0000008 = 0xC0000008;//ignore:true
D_C000000C = 0xC000000C;//ignore:true
D_80151650 = 0x80151650; //ignore:true
dma_table_ROM_START = 0xDE480; //defined:true
audio_seq_ROM_START = 0xDEA20; //defined:true
audio_bank_ROM_START = 0x119710; //defined:true
audio_table_ROM_START = 0x137730; //defined:true
ast_radio_ROM_START = 0xDE5D50; //defined:true
ast_radio_ROM_END = 0xDF4260; //defined:true
D_800C90F0 = 0x800C90F0;
D_800C45E0 = 0x800C45E0;
D_80151650 = 0x80151650; //ignore:true
D_801615D0 = 0x801615D0;//size:0xC
D_801615E0 = 0x801615E0;//size:0xC
D_800CFF80 = 0x800CFF80;//size:0x10
@ -98,7 +122,15 @@ Save_Checksum = 0x800C2FB0;
Save_Write = 0x800C3084;
Save_Read = 0x800C3194;
sunused_Overlay = 0x800CBD3C;
sUnused_Overlay = 0x800CBD3C;
// hardcoded address used in sys_rdram
D_A0300000 = 0xA0300000;
//hardware addresses. should probably be in hardware_regs
D_A4000000 = 0xA4000000;
D_A5000508 = 0xA5000508;
D_A5000510 = 0xA5000510;
D_800CFA54 = 0x800CFA54;

View File

@ -4,6 +4,7 @@ aspMainTextStart = 0x80000520;//name_end:aspMainTextEnd
gspF3DEX_fifoTextStart = 0x80001410;//name_end:gspF3DEX_fifoTextEnd
gspF3DEX_fifoDataStart = 0x800C3DD0; //name_end:gspF3DEX_fifoDataEnd
aspMainDataStart = 0x800C32E0; //name_end:aspMainDataEnd
altIPL3Start = 0x8001EFC0;
// sys_joybus
gControllerHold = 0x800DD880; // size:0x18
@ -130,11 +131,12 @@ gDmaTable = 0x80178A70; //size:0x5A0
D_80178A70 = 0x80178A78; //ignore:true
// buffers
gDramStack = 0x80281000; //size:0x400
gOSYieldData = 0x80281400; //size:0xC00
gZBuffer = 0x80282000; //size:0x25800
gTaskOutputBuffer = 0x802A7800; //size:0x30000 name_end:gTaskOutputBufferEnd
gAudioDataBuffer = 0x802D7800; //size:0xB0000
gTextureRenderBuffer = 0x80387800; //size:0x7880
gFillBuffer = 0x8038F080; //size:0x780
gFrameBuffers = 0x8038F800; //size:0x70800
gDramStack = 0x80281000; //size:0x400 segment:fox_buffers defined:true
gOSYieldData = 0x80281400; //size:0xC00 segment:fox_buffers defined:true
gZBuffer = 0x80282000; //size:0x25800 segment:fox_buffers defined:true
gTaskOutputBuffer = 0x802A7800; //size:0x30000 name_end:gTaskOutputBufferEnd segment:fox_buffers defined:true
gAudioDataBuffer = 0x802D7800; //size:0xB0000 segment:fox_buffers defined:true
gTextureRenderBuffer = 0x80387800; //size:0x7880 segment:fox_buffers defined:true
gFillBuffer = 0x8038F080; //size:0x780 segment:fox_buffers defined:true
gFrameBuffers = 0x8038F800; //size:0x70800 segment:fox_buffers defined:true
D_8038F300 = 0x8038F300; //ignore:true

View File

@ -53,6 +53,7 @@ D_menu_801AEE6C = 0x801AEE6C; // type:s32 size:0x58 force_migration:True segment
D_menu_801AF25C = 0x801AF25C; // type:f32 size:0x18 force_migration:True segment:ovl_menu
D_menu_801AF274 = 0x801AF274; // type:f32 size:0x18 force_migration:True segment:ovl_menu
func_i3_801A7930 = 0x801A7930;//segment:ovl_i3
func_i3_80187754 = 0x80187754;//segment:ovl_i3
func_i3_801932AC = 0x801932AC;//segment:ovl_i3
func_i3_8019B1F0 = 0x8019B1F0;//segment:ovl_i3
@ -120,6 +121,7 @@ D_i4_801A03C0 = 0x801A03C0;//segment:ovl_i4
D_i4_8019EE80 = 0x8019EE80;//segment:ovl_i4
D_i4_801A03DC = 0x801A03DC;//segment:ovl_i4
func_i5_801A55D4 = 0x801A55D4;//segment:ovl_i5
func_i5_8018E3B0 = 0x8018E3B0;//segment:ovl_i5
func_i5_8018B720 = 0x8018B720;//segment:ovl_i5
func_i5_801990DC = 0x801990DC;//segment:ovl_i5
@ -146,18 +148,21 @@ D_i5_801B7584 = 0x801B7584;//segment:ovl_i5
D_i5_801B7608 = 0x801B7608;//segment:ovl_i5
D_i5_801B769C = 0x801B769C;//segment:ovl_i5
D_i5_801BA1E8 = 0x801BA1E8;//segment:ovl_i5
D_i5_801BE250 = 0x801BE250;//segment:ovl_i5 size:0xA0
D_i5_801BE250 = 0x801BE250;//segment:ovl_i5 size:0x20
D_i5_801BE2F0 = 0x801BE2F0;//segment:ovl_i5 size:0x12
D_i5_801B8198 = 0x801B8198;//size:0x210 segment:ovl_i5
D_i5_801B83A8 = 0x801B83A8;//size:0x814 type:f32 segment:ovl_i5
D_i5_801BA708 = 0x801BA708;//size:0xC type:Vec3f segment:ovl_i5
D_i5_801BAA50 = 0x801BAA50;//size:0x26 type:s16 segment:ovl_i5
D_i5_801BAA50 = 0x801BAA50;//size:0x28 type:s16 segment:ovl_i5
D_i5_801BBEE0 = 0x801BBEE0;//segment:ovl_i5
D_i5_801BBF00 = 0x801BBF00;//size:0xA78 segment:ovl_i5
D_i5_801BE748 = 0x801BE748;//size:0x3600 type:Vtx segment:ovl_i5
D_i5_801C62D8 = 0x801C62D8;//size:0xC type:Vec3f segment:ovl_i5
D_i5_801C65B8 = 0x801C65B8;//size:0x870 segment:ovl_i5
D_i5_801C6E28 = 0x801C6E28;//size:0x34 type:s32 segment:ovl_i5
D_i5_801B8138 = 0x801B8138;//size:0x14 segment:ovl_i5
D_i5_801B814C = 0x801B814C;//size:0x14 segment:ovl_i5
D_i5_801B7630 = 0x801B7630;//size:0x24 segment:ovl_i5
func_i6_801888F4 = 0x801888F4; //segment:ovl_i6
func_i6_80197CC4 = 0x80197CC4; //segment:ovl_i6

File diff suppressed because it is too large Load Diff

View File

@ -790,7 +790,7 @@ OverlayInit sOvli2_Versus[2] = {
/* 0xF */ NO_SEGMENT } },
};
OverlayInit sunused_Overlay[1] = {
OverlayInit sUnused_Overlay[1] = {
{ OVERLAY_OFFSETS(ovl_unused),
{ /* 0x1 */ NO_SEGMENT,
/* 0x2 */ NO_SEGMENT,

View File

@ -1,191 +1,6 @@
#include "global.h"
#include "sys.h"
#include "sf64audio_provisional.h"
typedef struct {
/* 0x00 */ s32 unk_00;
/* 0x04 */ s32 unk_04;
/* 0x08 */ s32 unk_08;
/* 0x0C */ s32 unk_0C;
/* 0x10 */ s32 unk_10;
/* 0x14 */ s32 unk_14;
/* 0x18 */ char pad_18[0x6];
/* 0x1E */ s16 unk_1E;
/* 0x20 */ s32 unk_20;
/* 0x24 */ char pad24[0x6];
/* 0x2A */ s16 unk_2A;
} UnkStruct_func_8000BFA8;
typedef struct {
/* 0x00 */ char pad00;
/* 0x01 */ s8 unk_01;
/* 0x02 */ s8 unk_02;
/* 0x03 */ char pad[0x5];
/* 0x08 */ s32 unk_08;
/* 0x08 */ s32 unk_0C;
} UnkStruct_8000E1C4_1;
typedef struct {
/* 0x00 */ u8 unk_00;
/* 0x04 */ s32 unk_04;
} UnkStruct_8000E1C4_2;
typedef struct {
/* 0x00 */ u8 priority;
/* 0x01 */ u8 waveId;
/* 0x02 */ u8 harmonicIndex; // the harmonic index for the synthetic wave contained in gWaveSamples (also matches
// the base 2 logarithm of the harmonic order)
/* 0x03 */ u8 fontId;
/* 0x04 */ u8 unk_04;
/* 0x05 */ u8 stereoHeadsetEffects;
/* 0x06 */ s16 adsrVolScaleUnused;
/* 0x08 */ f32 portamentoFreqScale;
/* 0x0C */ f32 vibratoFreqScale;
/* 0x10 */ SequenceLayer* prevParentLayer;
/* 0x14 */ SequenceLayer* parentLayer;
/* 0x18 */ SequenceLayer* wantedParentLayer;
/* 0x1C */ NoteAttributes attributes;
/* 0x40 */ AdsrState adsr;
/* 0x60 */ Portamento portamento;
/* 0x6C */ VibratoState vibratoState;
} NotePlaybackState_Short; // size = 0x70
typedef struct {
struct {
/* 0x00 */ volatile u8 enabled : 1;
/* 0x00 */ u8 needsInit : 1;
/* 0x00 */ u8 finished : 1; // ?
/* 0x00 */ u8 unused : 1;
/* 0x00 */ u8 stereoStrongRight : 1;
/* 0x00 */ u8 stereoStrongLeft : 1;
/* 0x00 */ u8 stereoHeadsetEffects : 1;
/* 0x00 */ u8 usesHeadsetPanEffects : 1; // ?
} bitField0;
struct {
/* 0x01 */ u8 reverbIndex : 3;
/* 0x01 */ u8 bookOffset : 2;
/* 0x01 */ u8 isSyntheticWave : 1;
/* 0x01 */ u8 hasTwoParts : 1;
/* 0x01 */ u8 useHaasEffect : 1;
} bitField1;
/* 0x02 */ u8 pad2[0xE];
} NoteSubEu_Short; // size = 0x20
typedef struct Note_C0 {
/* 0x00 */ AudioListItem listItem;
/* 0x10 */ NoteSynthesisState synthesisState;
/* 0x30 */ NotePlaybackState_Short playbackState;
/* 0xA0 */ char padA0[0x10];
/* 0xB0 */ NoteSubEu_Short noteSubEu;
} Note_C0;
typedef struct {
/* 0x000 */ u8 enabled : 1;
/* 0x000 */ u8 finished : 1;
/* 0x000 */ u8 muted : 1;
/* 0x000 */ u8 seqDmaInProgress : 1;
/* 0x000 */ u8 fontDmaInProgress : 1;
/* 0x000 */ u8 recalculateVolume : 1;
/* 0x000 */ u8 stopScript : 1;
/* 0x000 */ u8 applyBend : 1;
/* 0x001 */ u8 state;
/* 0x002 */ u8 noteAllocPolicy;
/* 0x003 */ u8 muteBehavior;
/* 0x004 */ u8 seqId;
/* 0x005 */ u8 defaultFont;
/* 0x006 */ u8 unk_06[1];
/* 0x007 */ s8 playerIdx;
/* 0x008 */ u16 tempo; // seqTicks per minute
/* 0x00A */ u16 tempoAcc; // tempo accumulation, used in a discretized algorithm to apply tempo.
/* 0x00C */ u16 tempoChange; // Used to adjust the tempo without altering the base tempo.
/* 0x00E */ s16 transposition;
/* 0x010 */ u16 delay;
/* 0x012 */ u16 fadeTimer; // in ticks
/* 0x014 */ u16 fadeTimerUnkEu;
/* 0x018 */ u8* seqData;
/* 0x01C */ f32 fadeVolume;
/* 0x020 */ f32 fadeVelocity;
/* 0x024 */ f32 volume;
/* 0x028 */ f32 muteVolumeScale;
/* 0x02C */ f32 fadeVolumeScale;
/* 0x030 */ f32 appliedFadeVolume;
/* 0x034 */ f32 bend;
/* 0x038 */ struct SequenceChannel* channels[16];
/* 0x078 */ SeqScriptState scriptState;
/* 0x094 */ u8* shortNoteVelocityTable;
/* 0x098 */ u8* shortNoteGateTimeTable;
/* 0x09C */ NotePool notePool;
/* 0x0DC */ s32 skipTicks;
/* 0x0E0 */ u32 scriptCounter;
/* 0x0E4 */ char
padE4[0x68]; // unused struct members for sequence/sound font dma management, according to sm64 decomp
} SequencePlayer_14C; // size = 0x160
typedef struct {
char pad0[0x1D4];
} UnkStruct_1D4;
typedef struct {
AudioAllocPool pool;
AudioCacheEntry entry[32];
} PermanentCache; // size = 0x190
extern s16 D_800C7C2C;
extern s32 D_800C7C30;
extern AudioSpec D_800C76B8[];
extern SynthesisReverb D_8014BA50[4];
// D_8014C1A0
extern u16 D_8014C1B0;
extern s8 D_8014C1B3;
extern s16 D_8014C1B4;
extern NoteSubEu* D_8014C1B8;
extern AudioAllocPool D_8014C1C0;
extern AudioAllocPool D_8014C1D0;
extern AudioAllocPool D_8014C1E0;
// 0x20
extern AudioAllocPool D_8014C210;
extern AudioAllocPool D_8014C220;
extern AudioAllocPool D_8014C230;
extern AudioCache D_8014C240; // seqCache
extern AudioCache D_8014C410; // fontCache
extern AudioCache D_8014C5E0; // sampleBankCache
extern PermanentCache D_8014C7B0;
extern AudioSampleCache D_8014C940;
extern AudioSampleCache D_8014CE58;
extern s32 D_8014CE60;
extern s32 D_8014D368;
extern AudioSessionPoolSplit D_8014D370;
extern AudioCommonPoolSplit D_8014D380;
extern AudioCommonPoolSplit D_8014D388;
extern AudioCommonPoolSplit D_8014D398;
extern u8 D_8014D3A8[64];
extern u8 D_8014D3E8[64];
extern u8 D_8014D428[256];
extern volatile u8 D_8014D528;
extern u8 D_8014D529;
extern s32 D_8014D52C;
// 0x1000 gap
extern Note_C0* D_8014E530;
extern SequencePlayer_14C D_8014E538[4];
extern UNK_TYPE D_801530C0;
extern AudioPreloadReq D_80153300[];
extern s32 D_80153D04;
extern s32 D_80155A48;
extern AudioTable* D_80155C60;
extern SoundFont* D_80155C70;
extern AudioBufferParameters D_80155C78;
// D_80155C98
extern s32 D_80155C9C;
extern s32 D_80155CA0;
extern u16 D_80155CA4;
extern s32 D_80155CB4;
extern void* D_80155CB8[2];
extern UNK_TYPE D_80155CC0;
extern f32 D_80155D68;
extern s32 D_80155D6C;
extern u16* D_80155D70[];
extern u16 D_80155D7C[];
void func_8000DFFC(SampleCacheEntry* entry);
void func_8000D4A8(void);
void func_8000E290(void);
@ -196,16 +11,6 @@ void* AudioHeap_SearchRegularCaches(s32 tableType, s32 cache, s32 id);
void* AudioHeap_SearchPermanentCache(s32 tableType, s32 id);
SampleCacheEntry* AudioHeap_AllocPersistentSampleCacheEntry(u32);
void func_8000E8E0(s32);
void func_800128B4(void);
void func_800132E8(void);
void func_80011F4C(Note_C0*);
Instrument* func_80011D4C(s32, s32);
Drum* func_80011DFC(s32, s32);
void func_80012C40(Note_C0*);
void func_800145BC(UNK_TYPE*, Note_C0*);
void func_800144E4(SequencePlayer_14C*);
void AudioHeap_ResetLoadStatus(void) {
s32 i;

View File

@ -1,4 +1,6 @@
#include "global.h"
#include "sys.h"
#include "sf64dma.h"
#include "sf64audio_provisional.h"
#pragma GLOBAL_ASM("asm/us/nonmatchings/main/sys_audio_F0A0/func_8000E4A0.s")

View File

@ -10,143 +10,179 @@
type: bin
start: 0x137730
- name: ast_common #1
- name: ast_common
exclusive_ram_id: segment_01
type: bin
start: 0x873CB0
- name: ast_bg_space #2
- name: ast_bg_space
exclusive_ram_id: segment_02
type: bin
start: 0x8A68C0
- name: ast_bg_planet #2
- name: ast_bg_planet
exclusive_ram_id: segment_02
type: bin
start: 0x8AE0A0
- name: ast_arwing #3
- name: ast_arwing
exclusive_ram_id: segment_03
type: bin
start: 0x8BFC00
- name: ast_landmaster #3
- name: ast_landmaster
exclusive_ram_id: segment_03
type: bin
start: 0x8D99F0
- name: ast_blue_marine #3
- name: ast_blue_marine
exclusive_ram_id: segment_03
type: bin
start: 0x8E1F80
- name: ast_vs_player #3
- name: ast_vs_player
exclusive_ram_id: segment_03
type: bin
start: 0x8E92D0
- name: ast_enmy_planet #4
- name: ast_enmy_planet
exclusive_ram_id: segment_04
type: bin
start: 0x918430
- name: ast_enmy_space #4
- name: ast_enmy_space
exclusive_ram_id: segment_04
type: bin
start: 0x922730
- name: ast_great_fox #E
- name: ast_great_fox
exclusive_ram_id: segment_0E
type: bin
start: 0x92EC40
- name: ast_star_wolf #F
- name: ast_star_wolf
exclusive_ram_id: segment_0F
type: bin
start: 0x940AD0
- name: ast_allies #D
- name: ast_allies
exclusive_ram_id: segment_0D
type: bin
start: 0x955270
- name: ast_corneria #6
- name: ast_corneria
exclusive_ram_id: segment_06
type: bin
start: 0x961CE0
- name: ast_meteo #6
- name: ast_meteo
exclusive_ram_id: segment_06
type: bin
start: 0x9A1460
- name: ast_titania #6
- name: ast_titania
exclusive_ram_id: segment_06
type: bin
start: 0x9D2FD0
- name: ast_7_ti_2 #7
- name: ast_7_ti_2
exclusive_ram_id: segment_07
type: bin
start: 0x9DD390
- name: ast_8_ti #8
- name: ast_8_ti
exclusive_ram_id: segment_08
type: bin
start: 0x9EB5E0
- name: ast_9_ti #9
- name: ast_9_ti
exclusive_ram_id: segment_09
type: bin
start: 0x9F4880
- name: ast_A_ti #A
- name: ast_A_ti
exclusive_ram_id: segment_0A
type: bin
start: 0xA049A0
- name: ast_7_ti_1 #7
- name: ast_7_ti_1
exclusive_ram_id: segment_07
type: bin
start: 0xA0E340
- name: ast_sector_x #6
- name: ast_sector_x
exclusive_ram_id: segment_06
type: bin
start: 0xA1D0F0
- name: ast_sector_z #6
- name: ast_sector_z
exclusive_ram_id: segment_06
type: bin
start: 0xA4FBB0
- name: ast_aquas #6
- name: ast_aquas
exclusive_ram_id: segment_06
type: bin
start: 0xA58F60
- name: ast_area_6 #6
- name: ast_area_6
exclusive_ram_id: segment_06
type: bin
start: 0xA8B470
- name: ast_venom_1 #6
- name: ast_venom_1
exclusive_ram_id: segment_06
type: bin
start: 0xAB4000
- name: ast_venom_2 #6
- name: ast_venom_2
exclusive_ram_id: segment_06
type: bin
start: 0xACF960
- name: ast_ve1_boss #6, #9
- name: ast_ve1_boss
exclusive_ram_id: segment_06,
exclusive_ram_id: segment_09
type: bin
start: 0xAE60A0
- name: ast_bolse #6
- name: ast_bolse
exclusive_ram_id: segment_06
type: bin
start: 0xB0AA00
- name: ast_fortuna #6
- name: ast_fortuna
exclusive_ram_id: segment_06
type: bin
start: 0xB1CA50
- name: ast_sector_y #6
- name: ast_sector_y
exclusive_ram_id: segment_06
type: bin
start: 0xB2CA50
- name: ast_solar #6
- name: ast_solar
exclusive_ram_id: segment_06
type: bin
start: 0xB612E0
- name: ast_zoness #6
- name: ast_zoness
exclusive_ram_id: segment_06
type: bin
start: 0xB84560
- name: ast_katina #6
- name: ast_katina
exclusive_ram_id: segment_06
type: bin
start: 0xBB11D0
- name: ast_macbeth #6
- name: ast_macbeth
exclusive_ram_id: segment_06
type: bin
start: 0xBC23D0
- name: ast_warp_zone #7
- name: ast_warp_zone
exclusive_ram_id: segment_07
type: code
dir: assets
start: 0xBFA740
@ -154,35 +190,43 @@
subsegments:
- [0xBFA740, .data, ast_warp_zone/ast_warp_zone]
- name: ast_title #6
- name: ast_title
exclusive_ram_id: segment_06
type: bin
start: 0xBFC510
- name: ast_menu #6
- name: ast_menu
exclusive_ram_id: segment_06
type: bin
start: 0xC48F40
- name: ast_option #8
- name: ast_option
exclusive_ram_id: segment_08
type: bin
start: 0xCA9DE0
- name: ast_versus #7
- name: ast_versus
exclusive_ram_id: segment_07
type: bin
start: 0xCBFE70
- name: ast_font #5
- name: ast_font
exclusive_ram_id: segment_05
type: bin
start: 0xCD2410
- name: ast_font_3d #9
- name: ast_font_3d
exclusive_ram_id: segment_09
type: bin
start: 0xCDDCA0
- name: ast_andross #C
- name: ast_andross
exclusive_ram_id: segment_0C
type: bin
start: 0xCE9E70
- name: ast_logo #F
- name: ast_logo
exclusive_ram_id: segment_0F
type: code
dir: assets
start: 0xD25100
@ -190,23 +234,28 @@
subsegments:
- [0xD25100, .data, ast_logo/ast_logo]
- name: ast_ending #7
- name: ast_ending
exclusive_ram_id: segment_07
type: bin
start: 0xD27600
- name: ast_ending_award_front #8
- name: ast_ending_award_front
exclusive_ram_id: segment_08
type: bin
start: 0xD43400
- name: ast_ending_award_back #8
- name: ast_ending_award_back
exclusive_ram_id: segment_08
type: bin
start: 0xD68480
- name: ast_reward #8
- name: ast_reward
exclusive_ram_id: segment_08
type: bin
start: 0xD91F10
- name: ast_training #6
- name: ast_training
exclusive_ram_id: segment_06
type: bin
start: 0xDDC010

View File

@ -3,7 +3,7 @@
start: 0x0
subsegments:
- {start: 0x0, type: header, name: header}
- {start: 0x40, type: bin, name: ipl3}
- {start: 0x40, type: textbin, name: ipl3}
- {start: 0x1000, type: asm, vram: 0x80000400, name: entry}
- name: main
@ -41,6 +41,7 @@
- [0x1FA60, c, sys_1FA60] # May be blanked out osDriveRomInit
- [0x1FA70, hasm, sys_mio0]
- [0x1FB10, hasm, sys_rdramcheck]
- [0x1FBC0, textbin, sys_alt_ipl3]
- [0x205E0, c, sys_sprintf]
- [0x206B0, c, sys_math64]
- [0x20A60, hasm, sys_fp_text]

View File

@ -1,11 +1,11 @@
- name: ovl_i1
exclusive_ram_id: overlay
type: code
dir: overlays/ovl_i1
start: 0xDF4260
vram: 0x80187520
follows_vram: ast_radio
bss_size: 0xA10
exclusive_ram_id: overlay
symbol_name_format: i1_$VRAM
subsegments:
- [0xDF4260, c, fox_i1]
@ -26,13 +26,13 @@
- { type: .bss, vram: 0x8019B7F0, name: fox_ve1 }
- name: ovl_i2
exclusive_ram_id: overlay
type: code
dir: overlays/ovl_i2
start: 0xE08400
vram: 0x80187520
follows_vram: ast_radio
bss_size: 0x40
exclusive_ram_id: overlay
symbol_name_format: i2_$VRAM
subsegments:
- [0xE08400, c, fox_i2]
@ -47,13 +47,13 @@
- { type: .bss, vram: 0x80195D80, name: fox_sx }
- name: ovl_i3
exclusive_ram_id: overlay
type: code
dir: overlays/ovl_i3
start: 0xE16C50
vram: 0x80187520
follows_vram: ast_radio
bss_size: 0x2220
exclusive_ram_id: overlay
symbol_name_format: i3_$VRAM
subsegments:
- [0xE16C50, c, fox_i3]
@ -77,13 +77,13 @@
- { type: .bss, vram: 0x801C27C0, name: fox_aq }
- name: ovl_i4
exclusive_ram_id: overlay
type: code
dir: overlays/ovl_i4
start: 0xE51970
vram: 0x80187520
follows_vram: ast_radio
bss_size: 0x1B0
exclusive_ram_id: overlay
symbol_name_format: i4_$VRAM
subsegments:
- [0xE51970, c, fox_i4]
@ -107,13 +107,13 @@
- { type: .bss, vram: 0x801A0560, name: fox_sz }
- name: ovl_i5
exclusive_ram_id: overlay
type: code
dir: overlays/ovl_i5
start: 0xE6A810
vram: 0x80187520
follows_vram: ast_radio
bss_size: 0xAF80
exclusive_ram_id: overlay
symbol_name_format: i5_$VRAM
subsegments:
- [0xE6A810, c, fox_i5]
@ -137,13 +137,13 @@
- { type: .bss, vram: 0x801BE740, name: fox_ground }
- name: ovl_i6
exclusive_ram_id: overlay
type: code
dir: overlays/ovl_i6
start: 0xE9F1D0
vram: 0x80187520
follows_vram: ast_radio
bss_size: 0x520
exclusive_ram_id: overlay
symbol_name_format: i6_$VRAM
subsegments:
- [0xE9F1D0, c, fox_i6]
@ -166,13 +166,13 @@
- { type: .bss, vram: 0x801A8440, name: fox_sy }
- name: ovl_menu
exclusive_ram_id: overlay
type: code
dir: overlays/ovl_menu
start: 0xEBFBE0
vram: 0x80187520
follows_vram: ast_radio
bss_size: 0x17590
exclusive_ram_id: overlay
symbol_name_format: menu_$VRAM
subsegments:
- [0xEBFBE0, c, fox_i_menu]
@ -193,13 +193,13 @@
- { type: .bss, vram: 0x801B9410, name: fox_map }
- name: ovl_ending
exclusive_ram_id: overlay
type: code
dir: overlays/ovl_ending
start: 0xEF0260
vram: 0x80187520
follows_vram: ast_radio
bss_size: 0x2710
exclusive_ram_id: overlay
symbol_name_format: ending_$VRAM
subsegments:
- [0xEF0260, c, fox_end1]
@ -212,13 +212,13 @@
- { type: .bss, vram: 0x80198590, name: fox_end2 }
- name: ovl_unused
exclusive_ram_id: overlay
type: code
dir: overlays/ovl_unused
start: 0xEFFA40
vram: 0x80187520
follows_vram: ast_radio
bss_size: 0x10
exclusive_ram_id: overlay
symbol_name_format: unused_$VRAM
subsegments:
- [0xEFFA40, c, fox_unused]
@ -226,13 +226,13 @@
- { start: 0xEFFAE0, type: .bss, vram: 0x801875C0, name: fox_unused }
- name: fox_buffers
exclusive_ram_id: buffer
type: code
dir: main
start: 0xEFFB74
start: 0xEFFAE0
vram: 0x80281000
bss_size: 0x17F000
exclusive_ram_id: buffer
subsegments:
- { start: 0xEFFB74, type: .bss, vram: 0x80281000, name: fox_buffers }
- { start: 0xEFFAE0, type: .bss, vram: 0x80281000, name: fox_buffers }
- [0xEFFB74]
- [0xEFFAE0]