From 34508976cdc8570ab11f944be03168ac2f9fc7ee Mon Sep 17 00:00:00 2001 From: Ryan Myers Date: Sat, 5 Apr 2025 16:00:13 -0400 Subject: [PATCH] Match audioline_init (#497) * Fix some AVOID_UB stuff, and some small documenting. * Fix m2ctx.py and add NON_EQUIV func_80045C48 * Minor issue cleanups * Clean up audioline_ambient_create match * Match func_80008040 as audioline_init, fix the generate ctx script, and some small warning stuff. * Minor work on func_80008174 so it can be NON_EQUIVALENT again * redefine asm abs * Hackishly fix the ctx file when generated. * Use some more constants and got rid of some start: auto stuff which is not recommended in splat anymore for BSS * Do some documenting, and slightly better matches using JFG source. * Formatting * Clean up some more audio stuff * Further cleanup and naming of things --- generate_ctx.sh | 17 ++- include/PR/libaudio.h | 30 +++- include/libc/math.h | 6 +- include/save_layout.h | 4 +- libultra/src/audio/mips1/csplayer.c | 4 +- src/audio.c | 26 ++-- src/audio_spatial.c | 125 ++++++++------- src/audio_spatial.h | 2 +- src/audio_vehicle.c | 8 +- src/audio_vehicle.h | 13 +- src/audiosfx.c | 84 +++++++---- src/audiosfx.h | 24 +-- src/font.c | 2 +- src/hasm/obj_animate.s | 2 +- src/math_util.h | 2 +- src/memory.c | 2 - src/menu.c | 10 +- src/printf.c | 7 +- src/racer.c | 218 +++++++++++++++++++++++++++ src/save_data.h | 12 +- src/thread3_main.c | 2 +- tools/m2ctx.py | 3 +- tools/python/m2ctx.py | 16 +- ver/splat/dkr.jpn.v79.yaml | 114 +++++++------- ver/splat/dkr.pal.v77.yaml | 114 +++++++------- ver/splat/dkr.pal.v80.yaml | 114 +++++++------- ver/splat/dkr.us.v77.yaml | 114 +++++++------- ver/splat/dkr.us.v80.yaml | 114 +++++++------- ver/symbols/symbol_addrs.jpn.v79.txt | 2 +- ver/symbols/symbol_addrs.pal.v77.txt | 2 +- ver/symbols/symbol_addrs.pal.v80.txt | 2 +- ver/symbols/symbol_addrs.us.v77.txt | 2 +- ver/symbols/symbol_addrs.us.v80.txt | 2 +- 33 files changed, 735 insertions(+), 464 deletions(-) diff --git a/generate_ctx.sh b/generate_ctx.sh index c960a3c4..6b089eff 100755 --- a/generate_ctx.sh +++ b/generate_ctx.sh @@ -1,4 +1,17 @@ #!/bin/bash -find include/ src/ -type f -name "*.h" | sed -e 's/.*/#include "\0"/' > ctx_includes.c -.venv/bin/python3 tools/m2ctx.py ctx_includes.c +if [ $# -eq 0 ]; then + .venv/bin/python3 tools/python/m2ctx.py +else + find include/ src/ libultra/ -type f -name "*.h" | sed -e 's/.*/#include "\0"/' > ctx_includes.c + .venv/bin/python3 tools/m2ctx.py ctx_includes.c +fi + +#Forcefully fix issues in the ctx.c file in the hackiest way for now. These defines mess things up. +sed -i "/TT_COURSES$/d" ctx.c +sed -i "/SAVE_COURSES$/d" ctx.c + +sed -i 's/ u32 courseTime\[COURSE_RECORD_TOTAL\];/ u32 courseTime[47];/' ctx.c +sed -i 's/ HudElement entry\[HUD_ELEMENT_COUNT\];/ HudElement entry[59];/' ctx.c +sed -i 's/ void \*entry\[HUD_ELEMENT_COUNT\];/ void \*entry\[59\];/' ctx.c + \ No newline at end of file diff --git a/include/PR/libaudio.h b/include/PR/libaudio.h index d6a0465b..0e35affb 100644 --- a/include/PR/libaudio.h +++ b/include/PR/libaudio.h @@ -486,6 +486,7 @@ enum AL_MIDIstatus { enum AL_MIDIctrl { AL_MIDI_VOLUME_CTRL = 0x07, + AL_MIDI_UNK_8 = 0x08, AL_MIDI_PAN_CTRL = 0x0A, AL_MIDI_PRIORITY_CTRL = 0x10, /* use general purpose controller for priority */ AL_MIDI_FX_CTRL_0 = 0x14, @@ -591,6 +592,28 @@ typedef struct { u8 chan; } ALOscEvent; +typedef struct ALSoundState { + /* 0x00 */ struct ALSoundState *next; + /* 0x04 */ struct ALSoundState *prev; + /* 0x08 */ struct ALSoundState *unk8; + /* 0x0C */ ALVoice voice; + /* 0x28 */ ALSound *sound; /* sound referenced here */ + /* 0x2C */ s16 priority; + /* 0x30 */ f32 pitch; /* current playback pitch */ + /* 0x34 */ u8 pad34[0x2]; + /* 0x34 */ u8 soundPriority; + /* 0x38 */ s16 vol; /* volume - combined with volume from bank */ + /* 0x3A */ ALPan pan; /* pan - 0 = left, 127 = right */ + /* 0x3C */ u8 fxMix; /* wet/dry mix - 0 = dry, 127 = wet */ + /* 0x3C */ u8 pad3C[2]; + /* 0x3E */ u8 flags; + /* 0x3F */ u8 soundState; + } ALSoundState; + +typedef struct { + ALSoundState *soundState; +} ALSoundEvent; + typedef struct { s16 type; union { @@ -601,10 +624,11 @@ typedef struct { ALVolumeEvent vol; ALSeqpLoopEvent loop; ALSeqpVolEvent spvol; - ALSeqpPriorityEvent sppriority; - ALSeqpSeqEvent spseq; - ALSeqpBankEvent spbank; + ALSeqpPriorityEvent sppriority; + ALSeqpSeqEvent spseq; + ALSeqpBankEvent spbank; ALOscEvent osc; + ALSoundEvent sndpevent; } msg; } ALEvent; diff --git a/include/libc/math.h b/include/libc/math.h index 1c53de6b..40376f71 100644 --- a/include/libc/math.h +++ b/include/libc/math.h @@ -3,8 +3,8 @@ #define M_PI 3.14159265358979323846 -f32 sinf(f32 x); //official name: fsin -f32 cosf(f32 x); -f32 sqrtf(f32 x); +float sinf(float x); //official name: fsin +float cosf(float x); +float sqrtf(float x); #endif diff --git a/include/save_layout.h b/include/save_layout.h index ed478829..6f09dacf 100644 --- a/include/save_layout.h +++ b/include/save_layout.h @@ -4,14 +4,14 @@ #include "types.h" #include "structs.h" #include "macros.h" -#include "save_layout.h" -#include "src/save_data.h" #include "PR/os_cont.h" /** * File contains the struct and macro definitions for the save layout for DKR. */ +#define NUMBER_OF_SAVE_FILES 3 + #define TT_COURSES \ unsigned courseAL : 1; \ unsigned courseFC : 1; \ diff --git a/libultra/src/audio/mips1/csplayer.c b/libultra/src/audio/mips1/csplayer.c index 3466b104..e0229a3b 100644 --- a/libultra/src/audio/mips1/csplayer.c +++ b/libultra/src/audio/mips1/csplayer.c @@ -711,7 +711,7 @@ void __CSPHandleMIDIMsg(ALCSPlayer_Custom *seqp, ALEvent *event) } } break; - case (8): + case (AL_MIDI_UNK_8): seqp->chanState[chan].fade = byte2; seqp->chanState[chan].vol = (seqp->chanState[chan].unk11 * seqp->chanState[chan].fade) / 127.0f; @@ -770,7 +770,7 @@ void __CSPHandleMIDIMsg(ALCSPlayer_Custom *seqp, ALEvent *event) alSynSetFXMix(seqp->drvr, &vs->voice, byte2); } break; - case (0x5F): + case (AL_MIDI_UNK_5F): seqp->unk36 = byte2; for (i = 0; i < seqp->maxChannels; i++) { diff --git a/src/audio.c b/src/audio.c index d2aafc1e..6f2e3c8e 100644 --- a/src/audio.c +++ b/src/audio.c @@ -13,8 +13,8 @@ /************ .data ************/ -ALCSPlayer *gMusicPlayer = NULL; -ALCSPlayer *gJinglePlayer = NULL; +ALCSPlayer *gMusicPlayer = NULL; // Official Name: tuneSeqPlayer +ALCSPlayer *gJinglePlayer = NULL; // Official Name: ambientSeqPlayer u8 gMusicBaseVolume = 127; u8 sfxRelativeVolume = 127; u8 gCanPlayMusic = TRUE; @@ -77,7 +77,7 @@ SoundMask *gRacerSoundMask; * Afterwards, set up the audio thread and start it. */ void audio_init(OSSched *sc) { - s32 iCnt; + s32 i; ALSynConfig synth_config; s32 *addrPtr; u32 seqfSize; @@ -116,14 +116,14 @@ void audio_init(OSSched *sc) { alSeqFileNew(gSequenceTable, get_rom_offset_of_asset(ASSET_AUDIO, addrPtr[ASSET_AUDIO_4])); gSeqLengthTable = (u32 *) mempool_alloc_safe((gSequenceTable->seqCount) * 4, COLOUR_TAG_CYAN); - for (iCnt = 0; iCnt < gSequenceTable->seqCount; iCnt++) { - pad = (u32) (gSequenceTable + 8 + iCnt * 8); // Fakematch - gSeqLengthTable[iCnt] = gSequenceTable->seqArray[iCnt].len; - if (gSeqLengthTable[iCnt] & 1) { - gSeqLengthTable[iCnt]++; + for (i = 0; i < gSequenceTable->seqCount; i++) { + pad = (u32) (gSequenceTable + 8 + i * 8); // Fakematch + gSeqLengthTable[i] = gSequenceTable->seqArray[i].len; + if (gSeqLengthTable[i] & 1) { + gSeqLengthTable[i]++; } - if (seqLength < gSeqLengthTable[iCnt]) { - seqLength = gSeqLengthTable[iCnt]; + if (seqLength < gSeqLengthTable[i]) { + seqLength = gSeqLengthTable[i]; } } @@ -131,8 +131,8 @@ void audio_init(OSSched *sc) { synth_config.maxPVoices = 40; synth_config.maxUpdates = 96; synth_config.dmaproc = NULL; - synth_config.fxType[0] = 6; - synth_config.fxType[1] = 2; + synth_config.fxType[0] = AL_FX_CUSTOM; + synth_config.fxType[1] = AL_FX_BIGROOM; synth_config.outputRate = 0; synth_config.heap = &gALHeap; amCreateAudioMgr(&synth_config, 12, sc); @@ -650,6 +650,7 @@ u8 music_can_play(void) { /** * Stops the currently playing jingle. + * Official Name: amAmbientStop */ void music_jingle_stop(void) { if (music_jingle_playing() == SEQUENCE_NONE) { @@ -757,6 +758,7 @@ void music_jingle_play(u8 seqID) { /** * If there's a jingle playing, return that, otherwise, return 0. + * Official Name: amDittyPlaying */ u32 music_jingle_playing(void) { if (gCurrentJingleID && gCanPlayJingle && (gJinglePlayer->state == AL_PLAYING)) { diff --git a/src/audio_spatial.c b/src/audio_spatial.c index efac3a07..26802a84 100644 --- a/src/audio_spatial.c +++ b/src/audio_spatial.c @@ -38,36 +38,32 @@ extern s8 gAudioLinesOff; extern SoundData *D_80119C40; extern unk80119C58 D_80119C58[]; extern unk8011A6D8 D_8011A6D8[]; +extern SoundMask *gSoundMaskHeap; + +#define SOUND_MASK_HEAP_COUNT 40 /*******************************/ -#ifdef NON_EQUIVALENT -// audioline_init -void func_80008040(void) { - s32 var_v0; +void audioline_init(void) { + s32 i; sound_table_properties(&D_80119C40, NULL, NULL); - gSoundMaskHeap = mempool_alloc_safe(0x5A0, COLOUR_TAG_CYAN); - gSoundMaskHeapFree = mempool_alloc_safe(0xA0, COLOUR_TAG_CYAN); - gSoundMaskHeapUsed = mempool_alloc_safe(0xA0, COLOUR_TAG_CYAN); + gSoundMaskHeap = mempool_alloc_safe(sizeof(SoundMask) * SOUND_MASK_HEAP_COUNT, COLOUR_TAG_CYAN); + gSoundMaskHeapFree = mempool_alloc_safe(sizeof(uintptr_t) * SOUND_MASK_HEAP_COUNT, COLOUR_TAG_CYAN); + gSoundMaskHeapUsed = mempool_alloc_safe(sizeof(uintptr_t) * SOUND_MASK_HEAP_COUNT, COLOUR_TAG_CYAN); gUsedMasks = 0; - for (var_v0 = 0; var_v0 < 7; var_v0++) { - D_80119C58[var_v0].unk4 = NULL; + for (i = 0; i < 7; i++) { + D_80119C58[i].unk178 = NULL; } - for (var_v0 = 0; var_v0 < 10; var_v0++) { - gSoundMaskHeap[var_v0]->unk18 = 0; - gSoundMaskHeap[var_v0]->unk3C = 0; - gSoundMaskHeap[var_v0]->unk60 = 0; - gSoundMaskHeap[var_v0]->unk84 = 0; + for (i = 0; i < SOUND_MASK_HEAP_COUNT; i++) { + gSoundMaskHeap[i].unk18 = 0; } func_80008174(); } -#else -#pragma GLOBAL_ASM("asm/nonmatchings/audio_spatial/func_80008040.s") -#endif /** * Stop any playing jingles, then block audio lines from playing anymore. + * Official Name: amAmbientPause */ void audioline_off(void) { music_jingle_stop(); @@ -76,6 +72,7 @@ void audioline_off(void) { /** * Allow audio lines to play jingles. + * Official Name: amAmbientRestart */ void audioline_on(void) { gAudioLinesOff = FALSE; @@ -83,22 +80,26 @@ void audioline_on(void) { #ifdef NON_EQUIVALENT extern f32 D_80119C60[672]; -extern f32 D_8011A6E0[336]; //[7][48]; +extern f32 D_8011A6E0[7][48]; extern unk8011A6D8 **D_8011A6DC; +extern unk80119C58 **D_80119C5C; +// extern void sound_stop(u8 *arg0); // audioline_reset void func_80008174(void) { s32 i; s32 j; + u8 *sound; - for (gFreeMasks = 0; gFreeMasks < 40; gFreeMasks++) { - gSoundMaskHeapFree[gFreeMasks] = (SoundMask *) gSoundMaskHeap[gFreeMasks]; + for (gFreeMasks = 0; gFreeMasks < SOUND_MASK_HEAP_COUNT; gFreeMasks++) { + gSoundMaskHeapFree[gFreeMasks] = &gSoundMaskHeap[gFreeMasks]; } gFreeMasks--; for (i = 0; i < gUsedMasks; i++) { + sound = (u8 *) gSoundMaskHeapUsed[i]->unk18; gSoundMaskHeapUsed[i]->unk12 = 0; - if (gSoundMaskHeapUsed[i]->unk18 != NULL) { - sound_stop(gSoundMaskHeapUsed[i]->unk18); + if (sound != NULL) { + sound_stop(sound); } } gUsedMasks = 0; @@ -114,19 +115,20 @@ void func_80008174(void) { D_80119C58[i].unk178 = 0; } D_80119C58[i].unk17C = -1; + D_80119C5C[i]->unk0.unk0_01 = -100000.0f; - D_80119C60[i] = -100000.0; + D_80119C60[i] = -100000.0f; } for (i = 0; i < ARRAY_COUNT(D_8011A6E0); i++) { D_8011A6D8[i].unkB8 = -1; D_8011A6D8[i].unk0.unk0_01 = 0.0f; D_8011A6D8[i].unkBC = 0.0f; - D_8011A6DC[i]->unk0.unk0_01 = -100000.0; - D_8011A6E0[i] = -100000.0; - // for (j = 0; j < ARRAY_COUNT(D_8011A6E0[0]); j++) { - // D_8011A6E0[i][j] = -100000.0; - // } + D_8011A6DC[i]->unk0.unk0_01 = -100000.0f; + D_8011A6E0[i][0] = -100000.0f; + for (j = 0; j < ARRAY_COUNT(D_8011A6E0[0]); j++) { + D_8011A6E0[i][j] = -100000.0f; + } } gAudioLinesOff = 0; @@ -136,26 +138,30 @@ void func_80008174(void) { #endif // audioline_ambient +// Official Name: amPlayAudioMap #pragma GLOBAL_ASM("asm/nonmatchings/audio_spatial/func_80008438.s") -s32 func_800090C0(f32 arg0, f32 arg1, s32 arg2) { +/** + * Official Name: amCalcSfxStereo + */ +s32 func_800090C0(f32 x, f32 z, s32 yRot) { s32 temp_v1; s32 ret; f32 sp1C; - sp1C = sqrtf((arg0 * arg0) + (arg1 * arg1)); - temp_v1 = 0xFFFF - arctan2_f(arg0, arg1); + sp1C = sqrtf((x * x) + (z * z)); + temp_v1 = 0xFFFF - arctan2_f(x, z); - if (temp_v1 < arg2) { + if (temp_v1 < yRot) { if (sp1C <= 1.0f) { - ret = 64 - ((sins_s16(arg2 - temp_v1) / 1024) * (sp1C * 1)); + ret = 64 - ((sins_s16(yRot - temp_v1) / 1024) * (sp1C * 1)); } else { - ret = 64 - (sins_2(arg2 - temp_v1) / 1024); + ret = 64 - (sins_2(yRot - temp_v1) / 1024); } } else if (sp1C <= 1.0f) { - ret = (sins_s16(temp_v1 - arg2) / 1024) * (sp1C * 1) + 64; + ret = (sins_s16(temp_v1 - yRot) / 1024) * (sp1C * 1) + 64; } else { - ret = (sins_2(temp_v1 - arg2) / 1024) + 64; + ret = (sins_2(temp_v1 - yRot) / 1024) + 64; } if (get_filtered_cheats() & CHEAT_MIRRORED_TRACKS) { @@ -241,10 +247,13 @@ void update_spatial_audio_position(SoundMask *arg0, f32 x, f32 y, f32 z) { arg0->pos.z = z; } -void func_800096F8(SoundMask *arg0) { +/** + * Official Name: amSndStopXYZ + */ +void func_800096F8(SoundMask *soundMask) { s32 i; - for (i = 0; i < 40; i++) { - if (arg0 == gSoundMaskHeapUsed[i]) { + for (i = 0; i < SOUND_MASK_HEAP_COUNT; i++) { + if (soundMask == gSoundMaskHeapUsed[i]) { func_8000A2E8(i); break; } @@ -258,7 +267,7 @@ void func_8000974C(u16 soundBite, f32 x, f32 y, f32 z, u8 arg4, u8 arg5, u8 volu if (soundMask != NULL) { func_800245B4(soundBite | 0xE000); } - if (gUsedMasks == 40) { + if (gUsedMasks == SOUND_MASK_HEAP_COUNT) { if (soundMask != NULL) { *soundMask = NULL; } @@ -287,27 +296,27 @@ void func_8000974C(u16 soundBite, f32 x, f32 y, f32 z, u8 arg4, u8 arg5, u8 volu void audioline_ambient_create(u8 arg0, u16 soundId, f32 x, f32 y, f32 z, u8 arg5, u8 arg6, u8 arg7, u8 arg8, u16 arg9, u8 argA, u8 lineID, u8 argC) { - Vec3f *temp_a0; unk80119C58 *temp_v1; + f32 *temp_a0; - if ((lineID < 7) && (argC < 30)) { + if (lineID < 7 && argC < 30) { temp_v1 = &D_80119C58[lineID]; - temp_a0 = (Vec3f *) (((u32 *) &temp_v1->unk4) + argC * 3); // This can't be right... - temp_a0->x = x; - temp_a0->y = y; - temp_a0->z = z; + temp_a0 = &temp_v1->unk4[argC * 3]; + temp_a0[0] = x; + temp_a0[1] = y; + temp_a0[2] = z; if (argC == 0) { - (&D_80119C58[lineID])->soundID = soundId; - (&D_80119C58[lineID])->unk0.unk0_02 = arg0; - (&D_80119C58[lineID])->unk170 = arg9; - (&D_80119C58[lineID])->unk17D = argA; - (&D_80119C58[lineID])->unk174 = arg6; - (&D_80119C58[lineID])->unk175 = arg5; - (&D_80119C58[lineID])->unk176 = arg7; - (&D_80119C58[lineID])->unk17E = arg8; + temp_v1->soundID = soundId; + temp_v1->unk0.unk0_02 = arg0; + temp_v1->unk170 = arg9; + temp_v1->unk17D = argA; + temp_v1->unk174 = arg6; + temp_v1->unk175 = arg5; + temp_v1->unk176 = arg7; + temp_v1->unk17E = arg8; } - if ((&D_80119C58[lineID])->unk17C < argC) { - (&D_80119C58[lineID])->unk17C = argC; + if (temp_v1->unk17C < argC) { + temp_v1->unk17C = argC; } } } @@ -537,7 +546,7 @@ void debug_render_line(Gfx **dList, Vertex **verts, Triangle **tris, floatXYZVal temp_verts[3].a = 255; temp_verts += 4; - temp_tris[0].flags = 0x40; // 0x40 = Draw backface. + temp_tris[0].flags = BACKFACE_DRAW; temp_tris[0].vi0 = 2; temp_tris[0].vi1 = 1; temp_tris[0].vi2 = 0; @@ -547,7 +556,7 @@ void debug_render_line(Gfx **dList, Vertex **verts, Triangle **tris, floatXYZVal temp_tris[0].uv1.v = 0; temp_tris[0].uv2.u = 1; temp_tris[0].uv2.v = 0; - temp_tris[1].flags = 0x40; + temp_tris[1].flags = BACKFACE_DRAW; temp_tris[1].vi0 = 3; temp_tris[1].vi1 = 2; temp_tris[1].vi2 = 1; diff --git a/src/audio_spatial.h b/src/audio_spatial.h index 23d54701..77d7d931 100644 --- a/src/audio_spatial.h +++ b/src/audio_spatial.h @@ -66,11 +66,11 @@ void debug_render_line(Gfx **dList, Vertex **verts, Triangle **tris, floatXYZVal void func_80006BFC(Object *obj, ObjectSegment *segment, Object *obj2, s32 updateRate); void update_spatial_audio_position(SoundMask *arg0, f32 x, f32 y, f32 z); s32 func_80009AB4(u8 arg0); +void audioline_init(void); s32 audioline_distance(f32 inX, f32 inY, f32 inZ, floatXYZVals *floatXYZ, f32 *outX, f32 *outY, f32 *outZ); void func_80009968(f32, f32, f32, u8, u8, u8); // Non Matching void func_80008174(void); // Non Matching -void func_80008040(void); // Non Matching void func_80008438(Object **arg0, s32 numRacers, s32 updateRate); // Non Matching void func_80006FC8(Object **objs, s32 numRacers, ObjectSegment *segment, u8 arg3, s32 updateRate); // Non Matching diff --git a/src/audio_vehicle.c b/src/audio_vehicle.c index 5e0e7fc1..47a5c589 100644 --- a/src/audio_vehicle.c +++ b/src/audio_vehicle.c @@ -27,7 +27,7 @@ VehicleSoundData *gRacerSound; Object_Racer *gSoundRacerObj; SoundData *D_80119C40; // This should be in audio_spatial? SoundMask **gSoundMaskHeapUsed; -unk80119C48 **gSoundMaskHeap; // 0x24 struct size - 0x5A0 total size - should be 40 elements +SoundMask **gSoundMaskHeap; // 0x24 struct size - 0x5A0 total size - should be 40 elements u8 gFreeMasks; SoundMask **gSoundMaskHeapFree; s32 D_80119C54; // Padding? @@ -748,7 +748,7 @@ void func_80006FC8(Object **objs, s32 numRacers, ObjectSegment *segment, u8 arg3 objs[loopCount1]->segment.trans.z_position); sound_event_update((s32) gRacerSound->unk50, 8, temp_s3 << 8); sound_event_update((s32) gRacerSound->unk50, 16, *((u32 *) &sp8C)); - func_80004604(gRacerSound->unk50, 80); + func_80004604((ALSoundState *) gRacerSound->unk50, 80); sound_event_update((s32) gRacerSound->unk50, 4, gRacerSound->unk91[0]); } } else if (gRacerSound->unk50 != NULL) { @@ -785,7 +785,7 @@ void func_80006FC8(Object **objs, s32 numRacers, ObjectSegment *segment, u8 arg3 objs[loopCount1]->segment.trans.y_position, objs[loopCount1]->segment.trans.z_position); sound_event_update((s32) gRacerSound->unk48[loopCount2], 8, temp_s3 << 8); sound_event_update((s32) gRacerSound->unk48[loopCount2], 16, *((u32 *) &sp8C)); - func_80004604(gRacerSound->unk48[loopCount2], 80); + func_80004604((ALSoundState *) gRacerSound->unk48[loopCount2], 80); if (arg3 != 1) { gRacerSound->unk91[0] = 64; } @@ -930,7 +930,7 @@ void func_80006FC8(Object **objs, s32 numRacers, ObjectSegment *segment, u8 arg3 temp->unk91[0] = 64; } sound_event_update((s32) temp->unk48[0], 4, temp->unk91[0]); - func_80004604(temp->unk48[0], 70); + func_80004604((ALSoundState *) temp->unk48[0], 70); } } } diff --git a/src/audio_vehicle.h b/src/audio_vehicle.h index 17801378..30415d09 100644 --- a/src/audio_vehicle.h +++ b/src/audio_vehicle.h @@ -5,22 +5,14 @@ #include "structs.h" #include "audio.h" -/* Size: 0x90 / 144 bytes */ -typedef struct unk80119C48 { - s32 unk18; - s32 unk3C; - s32 unk60; - s32 unk84; -} unk80119C48; - /* Size: 0x180 / 384 bytes */ typedef struct unk80119C58 { union { /* 0x00 */ f32 unk0_01; /* 0x00 */ u8 unk0_02; + /* 0x00 */ s32 unk0_03; } unk0; - /* 0x004 */ Vec3f *unk4; - /* 0x008 */ u8 pad9[0x164]; + /* 0x004 */ f32 unk4[30 * 3]; // Should be a Vec3f, but that just doesn't match /* 0x16C */ s32 soundID; /* 0x170 */ s32 unk170; /* 0x174 */ u8 unk174; @@ -133,7 +125,6 @@ extern u8 gVehicleSounds; extern s32 D_800DC6D8; extern s32 D_800DC6DC; extern u16 gUsedMasks; -extern unk80119C48 **gSoundMaskHeap; extern SoundMask **gSoundMaskHeapUsed; extern SoundMask **gSoundMaskHeapFree; extern u8 gFreeMasks; diff --git a/src/audiosfx.c b/src/audiosfx.c index 34b145fb..28b0f4df 100644 --- a/src/audiosfx.c +++ b/src/audiosfx.c @@ -49,6 +49,7 @@ void set_sound_channel_count(s32 numChannels) { /** * Initialise a sound player and ready it for use with the sound event system. + * Official Name: gsSndpNew */ void alSndPNew(audioMgrConfig *c) { u32 i; @@ -121,7 +122,7 @@ ALMicroTime _sndpVoiceHandler(void *node) { #pragma GLOBAL_ASM("asm/nonmatchings/audiosfx/_handleEvent.s") void func_8000410C(ALSoundState *state) { - if (state->unk3E & 4) { + if (state->flags & AL_SNDP_PAN_EVT) { alSynStopVoice(gAlSndPlayerPtr->drvr, &state->voice); alSynFreeVoice(gAlSndPlayerPtr->drvr, &state->voice); } @@ -169,6 +170,9 @@ static void _removeEvents(ALEventQueue *evtq, ALSoundState *state, u16 eventType osSetIntMask(mask); } +/** + * Official Name: getSoundStateCounts + */ u16 func_800042CC(u16 *lastAllocListIndex, u16 *lastFreeListIndex) { OSIntMask mask; u16 freeListNextIndex; @@ -207,7 +211,7 @@ u16 func_800042CC(u16 *lastAllocListIndex, u16 *lastFreeListIndex) { // This function is full of names like next / prev that I made up based on other funcs. // It's in no way guaranteed to be correct. -// I"m really not even sure what it's supposed to be returning as a type. +// I'm really not even sure what it's supposed to be returning as a type. ALSound *func_80004384(UNUSED ALBank *arg0, ALSound *arg1) { s32 temp; ALKeyMap *temp_a2; @@ -260,17 +264,24 @@ ALSound *func_80004384(UNUSED ALBank *arg0, ALSound *arg1) { #pragma GLOBAL_ASM("asm/nonmatchings/audiosfx/func_80004520.s") -void func_80004604(u8 *arg0, u8 arg1) { - if (arg0) { - arg0[0x36] = arg1; +/** + * Official Name: gsSndpSetPriority + */ +void func_80004604(ALSoundState *sndp, u8 priority) { + if (sndp != NULL) { + sndp->soundPriority = priority; } } -UNUSED u8 func_8000461C(u8 *arg0) { - if (arg0) { - return arg0[0x3F]; +/** + * Official Name: gsSndpGetState + */ +UNUSED u8 func_8000461C(ALSoundState *sndp) { + if (sndp != NULL) { + return sndp->soundState; + } else { + return 0; } - return 0; } s32 func_80004638(ALBank *bnk, s16 sndIndx, SoundMask *soundMask) { @@ -285,48 +296,61 @@ s32 func_80004668(ALBank *bnk, s16 sndIndx, u8 arg2, SoundMask *soundMask) { #pragma GLOBAL_ASM("asm/nonmatchings/audiosfx/func_80004668.s") #endif -// input typing not right (some type of struct) -// 99% sure this function will clear the audio buffer associated with a given sound mask. -void sound_stop(u8 *arg0) { - ALEvent sp_18; - sp_18.type = 1024; - //((u32 *)(&sp_18))[1] = (u32)arg0; - sp_18.msg.osc.vs = (ALVoiceState *) arg0; // Not really a voice state, but not sure what else it is. - if (arg0) { - arg0[0x3e] &= ~(1 << 4); - alEvtqPostEvent(&(gAlSndPlayerPtr->evtq), &sp_18, 0); +/** + * input typing not right (some type of struct) + * 99% sure this function will clear the audio buffer associated with a given sound mask. + * Official Name: gsSndpStop + */ +void sound_stop(ALSoundState *sndp) { + ALEvent alEvent; + + alEvent.type = AL_SNDP_UNK_10_EVT; + alEvent.msg.sndpevent.soundState = sndp; + if (sndp != NULL) { + sndp->flags &= ~AL_SNDP_PITCH_EVT; + alEvtqPostEvent(&gAlSndPlayerPtr->evtq, &alEvent, 0); + } else { + // From JFG + // osSyncPrintf("WARNING: Attempt to stop NULL sound aborted\n"); } } void func_800048D8(u8 event) { - u32 intMask; + OSIntMask mask; ALEvent evt; ALSoundState *queue; - intMask = osSetIntMask(OS_IM_NONE); + mask = osSetIntMask(OS_IM_NONE); queue = D_800DC6B0.next; while (queue != NULL) { evt.type = AL_SNDP_UNK_10_EVT; - evt.msg.end.ticks = (s32) queue; // TODO: find the correct value for this. - if ((queue->unk3E & event) == event) { - queue->unk3E &= ~AL_SNDP_PITCH_EVT; + evt.msg.sndpevent.soundState = queue; + if ((queue->flags & event) == event) { + evt.msg.sndpevent.soundState->flags &= ~AL_SNDP_PITCH_EVT; alEvtqPostEvent(&gAlSndPlayerPtr->evtq, &evt, 0); } - queue = (ALSoundState *) queue->next; + queue = queue->next; } - osSetIntMask(intMask); + osSetIntMask(mask); } +/** + * Official Name: gsSndpStopAll + */ UNUSED void func_80004998(void) { func_800048D8(AL_SNDP_PLAY_EVT); } +/** + * Official Name: gsSndpStopAllRetrigger + */ UNUSED void func_800049B8(void) { func_800048D8(AL_SNDP_PLAY_EVT | AL_SNDP_PITCH_EVT); } /** * Stops all sounds from playing. + * Official Name: gsSndpStopAllLooped */ void sound_stop_all(void) { func_800048D8(AL_SNDP_PLAY_EVT | AL_SNDP_STOP_EVT); @@ -334,14 +358,18 @@ void sound_stop_all(void) { /** * Send a message to the sound player to update an existing property of the sound entry. + * Official Name: gsSndpSetParam */ void sound_event_update(s32 soundMask, s16 type, u32 volume) { ALEvent2 sndEvt; sndEvt.snd_event.type = type; sndEvt.snd_event.state = (void *) soundMask; sndEvt.snd_event.param = volume; - if (soundMask) { - alEvtqPostEvent(&(gAlSndPlayerPtr->evtq), (ALEvent *) &sndEvt, 0); + if (soundMask != NULL) { + alEvtqPostEvent(&gAlSndPlayerPtr->evtq, (ALEvent *) &sndEvt, 0); + } else { + // From JFG + // osSyncPrintf("WARNING: Attempt to modify NULL sound aborted\n"); } } diff --git a/src/audiosfx.h b/src/audiosfx.h index 2621d4d8..c9278b69 100644 --- a/src/audiosfx.h +++ b/src/audiosfx.h @@ -28,21 +28,13 @@ typedef struct ALUnkStruct { /* 0x08 */ struct ALSoundState *unk8; } ALUnkStruct; -typedef struct ALSoundState { - /* 0x00 */ struct ALSoundState *next; - /* 0x04 */ struct ALSoundState *prev; - /* 0x08 */ struct ALSoundState *unk8; - /* 0x0C */ ALVoice voice; - /* 0x28 */ ALSound *sound; /* sound referenced here */ - /* 0x2C */ s16 priority; - /* 0x30 */ f32 pitch; /* current playback pitch */ - /* 0x34 */ s32 state; /* play state for this sound */ - /* 0x38 */ s16 vol; /* volume - combined with volume from bank */ - /* 0x3A */ ALPan pan; /* pan - 0 = left, 127 = right */ - /* 0x3C */ u8 fxMix; /* wet/dry mix - 0 = dry, 127 = wet */ - /* 0x3C */ u8 pad3C[2]; - /* 0x3E */ u8 unk3E; -} ALSoundState; +// typedef struct { +// u8 pad[0x36]; +// u8 priority; +// u8 pad37[0x7]; +// u8 flags; +// u8 state; +// } AlMsgUnk400Type_Unk0; typedef struct unk80004384 { /* 0x00 */ struct ALSoundState *next; @@ -167,7 +159,7 @@ void alSndPNew(audioMgrConfig *c); ALMicroTime _sndpVoiceHandler(void *node); void func_8000410C(ALSoundState *state); u16 func_800042CC(u16 *lastAllocListIndex, u16 *lastFreeListIndex); -void func_80004604(u8 *arg0, u8 arg1); +void func_80004604(ALSoundState *sndp, u8 priority); s32 func_80004638(ALBank *bnk, s16 sndIndx, SoundMask *soundMask); void sound_stop_all(void); void sound_event_update(s32 soundMask, s16 type, u32 volume); diff --git a/src/font.c b/src/font.c index e20f5931..4eea2a23 100644 --- a/src/font.c +++ b/src/font.c @@ -513,7 +513,7 @@ void render_text_string(Gfx **dList, DialogueBoxBackground *box, char *text, Ali } } #else -void render_text_string(Gfx **dList, DialogueBoxBackground *box, char *text, enum AlignmentFlags alignmentFlags, +void render_text_string(Gfx **dList, DialogueBoxBackground *box, char *text, AlignmentFlags alignmentFlags, f32 scisScale) { s32 jpTexS; s32 prevFont; diff --git a/src/hasm/obj_animate.s b/src/hasm/obj_animate.s index b84937f2..319021f3 100644 --- a/src/hasm/obj_animate.s +++ b/src/hasm/obj_animate.s @@ -380,4 +380,4 @@ leaf obj_animate /* 62E80 80062280 8FB10004 */ lw $s1, 0x4($sp) /* 62E84 80062284 03E00008 */ jr $ra /* 62E88 80062288 27BD0008 */ addiu $sp, $sp, 0x8 -.end obj_animate \ No newline at end of file +.end obj_animate diff --git a/src/math_util.h b/src/math_util.h index 2cbf3899..490d5ff8 100644 --- a/src/math_util.h +++ b/src/math_util.h @@ -38,7 +38,7 @@ void load_rng_seed(void); s32 get_rng_seed(void); s32 get_random_number_from_range(s32, s32); void f32_matrix_to_s32_matrix(Matrix *input, MatrixS *output); -void guMtxXFMF(Matrix mf, float x, float y, float z, float *ox, float *oy, float *oz); +void guMtxXFMF(float mf[4][4], float x, float y, float z, float *ox, float *oy, float *oz); void f32_matrix_dot(Matrix *mat1, Matrix *mat2, Matrix *output); void f32_matrix_mult(Matrix *mat1, Matrix *mat2, Matrix *output); void f32_matrix_to_s16_matrix(Matrix *input, MatrixS *output); diff --git a/src/memory.c b/src/memory.c index 6af1a234..614fb05d 100644 --- a/src/memory.c +++ b/src/memory.c @@ -639,9 +639,7 @@ UNUSED s32 find_active_pool_slot_colours(void) { stubbed_printf("Unable to record %d slots, colours overflowed table.\n", numOverflows); } numOverflows = slotColour; -#ifdef AVOID_UB return 0; -#endif } /** diff --git a/src/menu.c b/src/menu.c index b2b5332c..c7661253 100644 --- a/src/menu.c +++ b/src/menu.c @@ -1217,10 +1217,11 @@ s16 gTrackSelectPreviewObjectIndices[36] = { 0x0004, 0x0000, 0x0001, 0x0002, 0x0 0x001C, 0x001D, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x001E, 0x001F, 0x0020, 0x0021, 0x0022, 0x0023, 0x002C, 0x002D, #if VERSION >= VERSION_79 - 0x002E, 0x002F, 0x0030, 0x0031, 0x0040, 0x0041, 0x0043, 0x0069, 0xFFFF }; + 0x002E, 0x002F, 0x0030, 0x0031, 0x0040, 0x0041, 0x0043, 0x0069, 0xFFFF #else - 0x002E, 0x002F, 0x0030, 0x0031, 0x0040, 0x0041, 0x0043, 0x005E, 0xFFFF }; + 0x002E, 0x002F, 0x0030, 0x0031, 0x0040, 0x0041, 0x0043, 0x005E, 0xFFFF #endif +}; s16 gTrackSelectPreviewImageIndices[8] = { 0x07, 0x00, 0x01, 0x02, 0x03, 0x0B, 0x0C, -1 }; @@ -1413,10 +1414,11 @@ s32 gIndexOfCurInputCharacter = 0; s16 gAdvTrackInitObjectIndices[18] = { 0x0004, 0x0000, 0x0001, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, #if VERSION >= VERSION_79 - 0x001E, 0x001F, 0x0020, 0x0021, 0x0022, 0x0023, 0x0030, 0x0069, -1 }; + 0x001E, 0x001F, 0x0020, 0x0021, 0x0022, 0x0023, 0x0030, 0x0069, -1 #else - 0x001E, 0x001F, 0x0020, 0x0021, 0x0022, 0x0023, 0x0030, 0x005E, -1 }; + 0x001E, 0x001F, 0x0020, 0x0021, 0x0022, 0x0023, 0x0030, 0x005E, -1 #endif +}; s16 gAdvTrackInitImageIndices[6] = { 7, 0, 1, 2, 3, -1 }; diff --git a/src/printf.c b/src/printf.c index 0a565afd..4133572b 100644 --- a/src/printf.c +++ b/src/printf.c @@ -197,13 +197,12 @@ void func_800B4A08(s32 setting) { /* Official name: sprintf */ UNUSED int sprintf(char *s, const char *format, ...) { + s32 ret; va_list args; va_start(args, format); - vsprintf(s, format, args); + ret = vsprintf(s, format, args); va_end(args); -#ifdef AVOID_UB - return 0; -#endif + return ret; } // Official Name: vsprintf diff --git a/src/racer.c b/src/racer.c index 909708cf..c1fe8597 100644 --- a/src/racer.c +++ b/src/racer.c @@ -675,7 +675,225 @@ void func_80045128(Object **racerObjs) { } #pragma GLOBAL_ASM("asm/nonmatchings/racer/func_800452A0.s") + +#ifdef NON_EQUIVALENT +void func_80045C48(Object *obj, Object_Racer *racer, s32 updateRate) { + s32 overrideMagnitude; + f32 x; + f32 y; + f32 z; + f32 xDerivative; + f32 yDerivative; + f32 zDerivative; + CheckpointNode *checkpoint; + f32 splineX[5]; + f32 splineY[5]; + f32 splineZ[5]; + f32 temp_f0; + f32 temp_f0_3; + f32 temp_f20_2; + f32 magnitude; + s16 temp_a1; + s16 temp_s0; + s16 temp_t5; + s16 temp_v0_3; + s16 temp_v0_5; + s32 temp_a0; + s32 temp_s0_2; + s32 splineEnd; + s32 var_a0; + s32 var_a0_2; + s32 splinePos; + s32 i; + s32 var_v0; + s32 var_v1_2; + s32 var_v1_4; + + gCurrentRacerInput = 0; + gCurrentButtonsPressed = 0; + gCurrentButtonsReleased = 0; + gCurrentStickX = 0; + gCurrentStickY = 0; + splineEnd = get_checkpoint_count(); + if (splineEnd == 0) { + gCurrentStickX = 25; + return; + } + overrideMagnitude = FALSE; + magnitude = 1.0 - racer->checkpoint_distance; + splinePos = racer->checkpoint - 2; + if (magnitude < 0.0) { + magnitude = 0.0f; + } + if (magnitude > 1.0) { + magnitude = 1.0f; + } + if (splinePos < 0) { + splinePos += splineEnd; + } + if (splinePos >= splineEnd) { + splinePos -= splineEnd; + } + for (i = 0; i < 5; i++) { + checkpoint = find_next_checkpoint_node(splinePos, racer->unk1C8); + splineX[i] = checkpoint->x; + splineY[i] = checkpoint->y; + splineZ[i] = checkpoint->z; + splinePos++; + if (racer->unk1C9 == 0) { + checkpoint[i + 1].unk24 = (f32) checkpoint->unk2E[racer->unk1CA]; + checkpoint[i + 2].unk24 = (f32) checkpoint->unk32[racer->unk1CA]; + //(sp + i)->unk74 = (f32) checkpoint->unk2E[racer->unk1CA]; + //(sp + i)->unk64 = (f32) checkpoint->unk32[racer->unk1CA]; + splineX[i] += checkpoint->scale * checkpoint->rotationZFrac * (f32) checkpoint->unk2E[racer->unk1CA]; + splineY[i] += checkpoint->scale * (f32) checkpoint->unk32[racer->unk1CA]; + splineZ[i] += checkpoint->scale * -checkpoint->rotationXFrac * (f32) checkpoint->unk2E[racer->unk1CA]; + } + if (splinePos == splineEnd) { + splinePos = 0; + } + } + if (racer->unk1C9 == 0) { + racer->unk1BA = magnitude; //(s16) (s32) (((sp7C - sp78) * var_f20) + sp78); + racer->unk1BC = magnitude; //(s16) (s32) (((sp6C - sp68) * var_f20) + sp68); + } + xDerivative = func_8002277C(splineX, 0, magnitude); + yDerivative = func_8002277C(splineY, 0, magnitude); + zDerivative = func_8002277C(splineZ, 0, magnitude); + temp_f0 = sqrtf((xDerivative * xDerivative) + (yDerivative * yDerivative) + (zDerivative * zDerivative)); + if (temp_f0 != 0.0f) { + temp_f0 = 100.0f / temp_f0; + xDerivative *= temp_f0; + yDerivative *= temp_f0; + zDerivative *= temp_f0; + } + temp_s0 = arctan2_f(xDerivative, zDerivative) - 0x8000; + temp_v0_3 = arctan2_f(yDerivative, 100.0f); + racer->unk1C2 = racer->unk1BE; + temp_a1 = temp_v0_3 & 0xFFFF; + temp_t5 = racer->unk1C0; + racer->unk1BE = temp_s0; + racer->unk1C0 = temp_a1; + racer->unk1C4 = temp_t5; + var_a0 = temp_s0 - (racer->unk1C2 & 0xFFFF); + if (var_a0 > 0x8000) { + var_a0 -= 0xFFFF; + } + if (var_a0 < -0x8000) { + var_a0 += 0xFFFF; + } + var_v1_2 = temp_a1 - (racer->unk1C4 & 0xFFFF); + if (var_v1_2 > 0x8000) { + var_v1_2 -= 0xFFFF; + } + if (var_v1_2 < -0x8000) { + var_v1_2 += 0xFFFF; + } + gCurrentStickX = -(var_a0 >> 3); + gCurrentStickY = -(var_v1_2 >> 3); + var_a0_2 = temp_s0 - (racer->steerVisualRotation & 0xFFFF); + if (var_a0_2 > 0x8000) { + var_a0_2 -= 0xFFFF; + } + if (var_a0_2 < -0x8000) { + var_a0_2 += 0xFFFF; + } + if (var_a0_2 > 0x3000 || var_a0_2 < -0x3000) { + overrideMagnitude = TRUE; + } + magnitude = 1.0 - racer->checkpoint_distance; + splinePos = racer->checkpoint - 2; + if (magnitude < 0.0) { + magnitude = 0.0f; + } + if (magnitude > 1.0) { + magnitude = 1.0f; + } + if (overrideMagnitude) { + magnitude = 1.0f; + } + if (racer->unk1C9 != 0) { + if (splinePos < 0) { + splinePos += splineEnd; + } + if (splinePos >= splineEnd) { + splinePos -= splineEnd; + } + for (i = 0; i < 5; i++) { + checkpoint = find_next_checkpoint_node(splinePos, racer->unk1C8); + splineX[i] = (checkpoint->x + (checkpoint->scale * checkpoint->rotationZFrac * racer->unk1BA)); + splineY[i] = (checkpoint->y + (checkpoint->scale * racer->unk1BC)); + splineZ[i] = (checkpoint->z + (checkpoint->scale * -checkpoint->rotationXFrac * racer->unk1BA)); + splinePos++; + if (splinePos == splineEnd) { + splinePos = 0; + } + } + } + x = cubic_spline_interpolation(splineX, 0, magnitude, &xDerivative); + y = cubic_spline_interpolation(splineY, 0, magnitude, &yDerivative); + z = cubic_spline_interpolation(splineZ, 0, magnitude, &zDerivative); + temp_f0_3 = sqrtf((xDerivative * xDerivative) + (yDerivative * yDerivative) + (zDerivative * zDerivative)); + if (temp_f0_3 != 0.0f) { + temp_f20_2 = 500.0f / temp_f0_3; + xDerivative *= temp_f20_2; + yDerivative *= temp_f20_2; + zDerivative *= temp_f20_2; + } + xDerivative = (x + xDerivative) - obj->segment.trans.x_position; + yDerivative = (y + yDerivative) - obj->segment.trans.y_position; + zDerivative = (z + zDerivative) - obj->segment.trans.z_position; + temp_s0_2 = (arctan2_f(xDerivative, zDerivative) - 0x8000) & 0xFFFF; + temp_v0_5 = arctan2_f(yDerivative, 500.0f); + temp_a0 = temp_s0_2 - (racer->steerVisualRotation & 0xFFFF); + if (temp_a0 > 0x8000) { + temp_a0 -= 0xFFFF; + } + if (temp_a0 < -0x8000) { + temp_a0 += 0xFFFF; + } + temp_a0 = -temp_a0; + var_v1_4 = (temp_v0_5 & 0xFFFF) - (obj->segment.trans.rotation.x_rotation & 0xFFFF); + if (var_v1_4 > 0x8000) { + var_v1_4 -= 0xFFFF; + } + var_v0 = 5; + if (var_v1_4 < -0x8000) { + var_v1_4 += 0xFFFF; + } + var_v1_4 = -var_v1_4; + if (racer->vehicleID == VEHICLE_PLANE) { + var_v0 = 6; + } + if (racer->vehicleID == VEHICLE_HOVERCRAFT && racer->unk1D4 == 0) { + racer->steerVisualRotation = racer->steerVisualRotation - (temp_a0 >> 1); + } + switch (racer->vehicleID) { + case VEHICLE_LOOPDELOOP: + gCurrentStickY = 0; + break; + case VEHICLE_HOVERCRAFT: + gCurrentStickY = 0; + gCurrentStickX += temp_a0 >> var_v0; + break; + case VEHICLE_TRICKY: + gCurrentStickX += temp_a0 >> (var_v0 + 0x1F); + gCurrentStickY = 0; + break; + case VEHICLE_SMOKEY: + gCurrentStickX += temp_a0 >> (var_v0 - 1); + gCurrentStickY += var_v1_4 >> (var_v0 - 1); + break; + default: + gCurrentStickX += temp_a0 >> var_v0; + gCurrentStickY += var_v1_4 >> var_v0; + break; + } + func_80042D20(obj, racer, updateRate); +} +#else #pragma GLOBAL_ASM("asm/nonmatchings/racer/func_80045C48.s") +#endif void func_80046524(s32 updateRate, f32 updateRateF, Object *obj, Object_Racer *racer) { s32 objectMoved; diff --git a/src/save_data.h b/src/save_data.h index cb6bc935..2a5b8cf2 100644 --- a/src/save_data.h +++ b/src/save_data.h @@ -3,8 +3,11 @@ #include "types.h" #include "structs.h" +#include "save_layout.h" #include "PR/os_pfs.h" #include "PR/os_cont.h" +#include "PR/os_libc.h" +#include "libc/string.h" #include "common.h" #define GAMD 0x47414D44 // 'GAMD' ASCII - Game Data? @@ -22,8 +25,6 @@ // This is RARE's unique code #define COMPANY_CODE 0x3459 -#define NUMBER_OF_SAVE_FILES 3 - #define MAX_CPAK_FILES 16 #if REGION == REGION_JP @@ -117,13 +118,6 @@ typedef struct unk80075000 { unk80075000_body data[1]; } unk80075000; -extern s8 *gPakFileList; -extern u8 gN64FontCodes[68]; -extern s32 gRumbleKillTimer; -extern OSPfs pfs[MAXCONTROLLERS]; -extern int bcmp(const void *, const void *, int); -size_t strlen(const char *str); - u8 input_get_id(s32 controllerIndex); void rumble_init(u8 canRumble); s32 rumble_exists(s16 controllerIndex); diff --git a/src/thread3_main.c b/src/thread3_main.c index 1982f16b..5010467e 100644 --- a/src/thread3_main.c +++ b/src/thread3_main.c @@ -212,7 +212,7 @@ void init_game(void) { init_PI_mesg_queue(); gfxtask_init(&gMainSched); audio_init(&gMainSched); - func_80008040(); // Should be very similar to allocate_object_model_pools + audioline_init(); sControllerStatus = input_init(); tex_init_textures(); allocate_object_model_pools(); diff --git a/tools/m2ctx.py b/tools/m2ctx.py index fe87572d..b8ac63da 100644 --- a/tools/m2ctx.py +++ b/tools/m2ctx.py @@ -32,11 +32,12 @@ CPP_FLAGS = [ "-DTARGET_N64", "-D_FINALROM", "-DNDEBUG", - "-DVERSION_us_v1", + "-DVERSION_us_v77", "-DANTI_TAMPER", "-D BUILD_VERSION_STRING=\"2.0G\"", "-DM2CTX", "-D__sgi", + "-DCIC_ID=6103", "-U__GNUC__", ] diff --git a/tools/python/m2ctx.py b/tools/python/m2ctx.py index 4c287113..612f8188 100644 --- a/tools/python/m2ctx.py +++ b/tools/python/m2ctx.py @@ -7,16 +7,16 @@ from pathlib import Path script_dir = os.path.dirname(os.path.realpath(__file__)) root_dir = script_dir + "/../../" src_dir = root_dir + "src/" -lib_dir = root_dir + "lib/" +lib_dir = root_dir + "libultra/" -VERSION = "us_1.0" +VERSION = "us.v77" -ignoreFiles = ["include/sys/regdef.h"] +ignoreFiles = ["include/sys/regdef.h", "include/regdef.h", "src/hasm/collision.c", "src/hasm/math_util.c", "src/stacks.c"] search_folders = ["include/", "src/"] # Needed for StereoPanMode -includeFiles = ['lib/src/audio/synstartvoiceparam.h'] +includeFiles = ['libultra/src/audio/synstartvoiceparam.h'] hack_directives_into_singleline = ['DRAW_TABLE_ENTRY', 'DRAW_TABLE_GROUP'] @@ -308,7 +308,7 @@ def get_symbols_from_section_text(sectionText): # Get all the variable symbols of a filename from the dkr.map file. def get_variable_symbols_from_map(filename, mapText): - sectionSearch = "build/" + VERSION + "/" + filename[:-2] + ".o" + sectionSearch = "build/" + filename[:-2] + ".c.o" bssSectionText = get_map_section_text(mapText, sectionSearch + "(.bss)") dataSectionText = get_map_section_text(mapText, sectionSearch + "(.data)") @@ -348,7 +348,7 @@ def collect_variables(filename, filetext, mapText, data): # Loads the dkr.map file from the build folder. def load_map(): try: - return open(root_dir + "/build/" + VERSION + "/dkr.map", "r").read() + return open(root_dir + "/build/dkr." + VERSION + ".map", "r").read() except FileNotFoundError: print("Error: dkr.map could not be found. Please build the rom first, then run this script.") exit() @@ -468,7 +468,7 @@ def write_output_variables(variables): # Preprocess everything, since mips2c doesn't like the preprocessor. def preprocess_all(directivesText): open("__temp.c", "w").write(directivesText) - cpp_command = ["gcc", "-E", "-P", "-undef", "-D_LANGUAGE_C", "-D__sgi", "-DNON_MATCHING", "-D_Static_assert(x, y)=", "-D__attribute__(x)=", "__temp.c"] + cpp_command = ["gcc", "-E", "-P", "-undef", "-DBUILD_VERSION=4", "-DVERSION_us_v77", "-D_LANGUAGE_C", "-D__sgi", "-DNON_MATCHING", "-D_Static_assert(x, y)=", "-D__attribute__(x)=", "__temp.c"] out = subprocess.check_output(cpp_command, cwd=root_dir, encoding="utf-8") os.remove("__temp.c") return out @@ -476,7 +476,7 @@ def preprocess_all(directivesText): # Preprocess everything but the #defines. def preprocess_directives(directivesText): open("__temp.c", "w").write(directivesText) - cpp_command = ["gcc", "-E", "-P", "-fdirectives-only", "-undef", "-D_LANGUAGE_C", "-D__sgi", "-DNON_MATCHING", "-D_Static_assert(x, y)=", "-D__attribute__(x)=", "__temp.c"] + cpp_command = ["gcc", "-E", "-P", "-fdirectives-only", "-undef", "-DBUILD_VERSION=4", "-DVERSION_us_v77", "-D_LANGUAGE_C", "-D__sgi", "-DNON_MATCHING", "-D_Static_assert(x, y)=", "-D__attribute__(x)=", "__temp.c"] out = subprocess.check_output(cpp_command, cwd=root_dir, encoding="utf-8") os.remove("__temp.c") return out diff --git a/ver/splat/dkr.jpn.v79.yaml b/ver/splat/dkr.jpn.v79.yaml index ab39c87d..362a8cde 100644 --- a/ver/splat/dkr.jpn.v79.yaml +++ b/ver/splat/dkr.jpn.v79.yaml @@ -382,63 +382,63 @@ segments: - { start: 0xECA10, type: databin, name: data_f3ddkr_fifo, linker_section_order: .rodata } - { start: 0xED210, type: databin, name: data_f3ddkr_xbus, linker_section_order: .rodata } - { start: 0xEDA10, type: databin, name: data_unknown_2, linker_section_order: .rodata } - - { start: auto, type: .bss, vram: 0x800ED9D0, name: audio } - - { start: auto, type: .bss, vram: 0x80117A00, name: audiomgr } - - { start: auto, type: .bss, vram: 0x8011B640, name: audiosfx } - - { start: auto, type: .bss, vram: 0x8011B6A0, name: audio_vehicle } - - { start: auto, type: .bss, vram: 0x8011C690, name: objects } - - { start: auto, type: .bss, vram: 0x8011CB10, name: tracks } - - { start: auto, type: .bss, vram: 0x8011EF30, name: lights } - - { start: auto, type: .bss, vram: 0x8011EF40, name: object_functions } - - { start: auto, type: .bss, vram: 0x8011EF60, name: racer } - - { start: auto, type: .bss, vram: 0x8011F030, name: vehicle_tricky } - - { start: auto, type: .bss, vram: 0x8011F040, name: vehicle_bluey } - - { start: auto, type: .bss, vram: 0x8011F050, name: vehicle_smokey } - - { start: auto, type: .bss, vram: 0x8011F060, name: vehicle_bubbler } - - { start: auto, type: .bss, vram: 0x8011F070, name: vehicle_wizpig } - - { start: auto, type: .bss, vram: 0x8011F080, name: vehicle_rocket } - - { start: auto, type: .bss, vram: 0x8011F090, name: object_models } - - { start: auto, type: .bss, vram: 0x8011F0C0, name: main } - - { start: auto, type: .bss, vram: 0x80121530, name: hasm/entrypoint } - - { start: auto, type: .bss, vram: 0x80122530, name: camera } - - { start: auto, type: .bss, vram: 0x80122B50, name: joypad } - - { start: auto, type: .bss, vram: 0x80122BD0, name: game } - - { start: auto, type: .bss, vram: 0x80122C60, name: thread3_main } - - { start: auto, type: .bss, vram: 0x80124FF0, name: memory } - - { start: auto, type: .bss, vram: 0x80125840, name: ../libultra/src/io/motor } - - { start: auto, type: .bss, vram: 0x80125A80, name: save_data } - - { start: auto, type: .bss, vram: 0x80125C70, name: asset_loading } - - { start: auto, type: .bss, vram: 0x80125D30, name: rcp_dkr } - - { start: auto, type: .bss, vram: 0x80127BA0, name: ../libultra/src/sc/sched } - - { start: auto, type: .bss, vram: 0x80127C00, name: video } - - { start: auto, type: .bss, vram: 0x80127DB0, name: textures_sprites } - - { start: auto, type: .bss, vram: 0x80127E20, name: menu } - - { start: auto, type: .bss, vram: 0x80128780, name: game_ui } - - { start: auto, type: .bss, vram: 0x80128C60, name: os_yield_data } - - { start: auto, type: .bss, vram: 0x80129660, name: weather } - - { start: auto, type: .bss, vram: 0x80129730, name: particles } - - { start: auto, type: .bss, vram: 0x80129750, name: printf } - - { start: auto, type: .bss, vram: 0x8012A090, name: thread0_epc } - - { start: auto, type: .bss, vram: 0x8012B560, name: stacks } - - { start: auto, type: .bss, vram: 0x8012BA70, name: waves } - - { start: auto, type: .bss, vram: 0x8012C1E0, name: fade_transition } - - { start: auto, type: .bss, vram: 0x8012C230, name: game_text } - - { start: auto, type: .bss, vram: 0x8012C290, name: font } - - { start: auto, type: .bss, vram: 0x8012C2E0, name: ../libultra/src/io/pimgr } - - { start: auto, type: .bss, vram: 0x8012C5B0, name: gzip } - - { start: auto, type: .bss, vram: 0x8012C5C0, name: ../libultra/src/io/leointerrupt } - - { start: auto, type: .bss, vram: 0x8012C5D0, name: thread30_bgload } - - { start: auto, type: .bss, vram: 0x8012E7A0, name: ../libultra/src/os/initialize } - - { start: auto, type: .bss, vram: 0x8012E7B0, name: ../libultra/src/os/seteventmesg } - - { start: auto, type: .bss, vram: 0x8012E830, name: ../libultra/src/io/controller } - - { start: auto, type: .bss, vram: 0x8012E8C0, name: ../libultra/src/io/pfsisplug } - - { start: auto, type: .bss, vram: 0x8012E900, name: ../libultra/src/io/siacs } - - { start: auto, type: .bss, vram: 0x8012E920, name: ../libultra/src/io/conteepread } - - { start: auto, type: .bss, vram: 0x8012E960, name: ../libultra/src/io/vimgr } - - { start: auto, type: .bss, vram: 0x8012EC80, name: ../libultra/src/io/sptask } - - { start: auto, type: .bss, vram: 0x8012ECC0, name: ../libultra/src/io/piacs } - - { start: auto, type: .bss, vram: 0x8012ECE0, name: ../libultra/src/os/timerintr } - - { start: auto, type: .bss, vram: 0x8012ED20, name: ../libultra/src/os/exceptasm } + - { type: .bss, vram: 0x800ED9D0, name: audio } + - { type: .bss, vram: 0x80117A00, name: audiomgr } + - { type: .bss, vram: 0x8011B640, name: audiosfx } + - { type: .bss, vram: 0x8011B6A0, name: audio_vehicle } + - { type: .bss, vram: 0x8011C690, name: objects } + - { type: .bss, vram: 0x8011CB10, name: tracks } + - { type: .bss, vram: 0x8011EF30, name: lights } + - { type: .bss, vram: 0x8011EF40, name: object_functions } + - { type: .bss, vram: 0x8011EF60, name: racer } + - { type: .bss, vram: 0x8011F030, name: vehicle_tricky } + - { type: .bss, vram: 0x8011F040, name: vehicle_bluey } + - { type: .bss, vram: 0x8011F050, name: vehicle_smokey } + - { type: .bss, vram: 0x8011F060, name: vehicle_bubbler } + - { type: .bss, vram: 0x8011F070, name: vehicle_wizpig } + - { type: .bss, vram: 0x8011F080, name: vehicle_rocket } + - { type: .bss, vram: 0x8011F090, name: object_models } + - { type: .bss, vram: 0x8011F0C0, name: main } + - { type: .bss, vram: 0x80121530, name: hasm/entrypoint } + - { type: .bss, vram: 0x80122530, name: camera } + - { type: .bss, vram: 0x80122B50, name: joypad } + - { type: .bss, vram: 0x80122BD0, name: game } + - { type: .bss, vram: 0x80122C60, name: thread3_main } + - { type: .bss, vram: 0x80124FF0, name: memory } + - { type: .bss, vram: 0x80125840, name: ../libultra/src/io/motor } + - { type: .bss, vram: 0x80125A80, name: save_data } + - { type: .bss, vram: 0x80125C70, name: asset_loading } + - { type: .bss, vram: 0x80125D30, name: rcp_dkr } + - { type: .bss, vram: 0x80127BA0, name: ../libultra/src/sc/sched } + - { type: .bss, vram: 0x80127C00, name: video } + - { type: .bss, vram: 0x80127DB0, name: textures_sprites } + - { type: .bss, vram: 0x80127E20, name: menu } + - { type: .bss, vram: 0x80128780, name: game_ui } + - { type: .bss, vram: 0x80128C60, name: os_yield_data } + - { type: .bss, vram: 0x80129660, name: weather } + - { type: .bss, vram: 0x80129730, name: particles } + - { type: .bss, vram: 0x80129750, name: printf } + - { type: .bss, vram: 0x8012A090, name: thread0_epc } + - { type: .bss, vram: 0x8012B560, name: stacks } + - { type: .bss, vram: 0x8012BA70, name: waves } + - { type: .bss, vram: 0x8012C1E0, name: fade_transition } + - { type: .bss, vram: 0x8012C230, name: game_text } + - { type: .bss, vram: 0x8012C290, name: font } + - { type: .bss, vram: 0x8012C2E0, name: ../libultra/src/io/pimgr } + - { type: .bss, vram: 0x8012C5B0, name: gzip } + - { type: .bss, vram: 0x8012C5C0, name: ../libultra/src/io/leointerrupt } + - { type: .bss, vram: 0x8012C5D0, name: thread30_bgload } + - { type: .bss, vram: 0x8012E7A0, name: ../libultra/src/os/initialize } + - { type: .bss, vram: 0x8012E7B0, name: ../libultra/src/os/seteventmesg } + - { type: .bss, vram: 0x8012E830, name: ../libultra/src/io/controller } + - { type: .bss, vram: 0x8012E8C0, name: ../libultra/src/io/pfsisplug } + - { type: .bss, vram: 0x8012E900, name: ../libultra/src/io/siacs } + - { type: .bss, vram: 0x8012E920, name: ../libultra/src/io/conteepread } + - { type: .bss, vram: 0x8012E960, name: ../libultra/src/io/vimgr } + - { type: .bss, vram: 0x8012EC80, name: ../libultra/src/io/sptask } + - { type: .bss, vram: 0x8012ECC0, name: ../libultra/src/io/piacs } + - { type: .bss, vram: 0x8012ECE0, name: ../libultra/src/os/timerintr } + - { type: .bss, vram: 0x8012ED20, name: ../libultra/src/os/exceptasm } - name: assets type: bin diff --git a/ver/splat/dkr.pal.v77.yaml b/ver/splat/dkr.pal.v77.yaml index 040f1da5..1af3a87f 100644 --- a/ver/splat/dkr.pal.v77.yaml +++ b/ver/splat/dkr.pal.v77.yaml @@ -382,63 +382,63 @@ segments: - { start: 0xEB030, type: databin, name: data_f3ddkr_fifo, linker_section_order: .rodata } - { start: 0xEB830, type: databin, name: data_f3ddkr_xbus, linker_section_order: .rodata } - { start: 0xEC030, type: databin, name: data_unknown_2, linker_section_order: .rodata } - - { start: auto, type: .bss, vram: 0x800EBFF0, name: audio } - - { start: auto, type: .bss, vram: 0x80116020, name: audiomgr } - - { start: auto, type: .bss, vram: 0x80119C60, name: audiosfx } - - { start: auto, type: .bss, vram: 0x80119CC0, name: audio_vehicle } - - { start: auto, type: .bss, vram: 0x8011ACB0, name: objects } - - { start: auto, type: .bss, vram: 0x8011B130, name: tracks } - - { start: auto, type: .bss, vram: 0x8011D550, name: lights } - - { start: auto, type: .bss, vram: 0x8011D560, name: object_functions } - - { start: auto, type: .bss, vram: 0x8011D580, name: racer } - - { start: auto, type: .bss, vram: 0x8011D650, name: vehicle_tricky } - - { start: auto, type: .bss, vram: 0x8011D660, name: vehicle_bluey } - - { start: auto, type: .bss, vram: 0x8011D670, name: vehicle_smokey } - - { start: auto, type: .bss, vram: 0x8011D680, name: vehicle_bubbler } - - { start: auto, type: .bss, vram: 0x8011D690, name: vehicle_wizpig } - - { start: auto, type: .bss, vram: 0x8011D6A0, name: vehicle_rocket } - - { start: auto, type: .bss, vram: 0x8011D6B0, name: object_models } - - { start: auto, type: .bss, vram: 0x8011D7E0, name: main } - - { start: auto, type: .bss, vram: 0x8011FB50, name: hasm/entrypoint } - - { start: auto, type: .bss, vram: 0x80120B50, name: camera } - - { start: auto, type: .bss, vram: 0x80121170, name: joypad } - - { start: auto, type: .bss, vram: 0x801211F0, name: game } - - { start: auto, type: .bss, vram: 0x80121280, name: thread3_main } - - { start: auto, type: .bss, vram: 0x80123610, name: memory } - - { start: auto, type: .bss, vram: 0x80123E60, name: ../libultra/src/io/motor } - - { start: auto, type: .bss, vram: 0x801240A0, name: save_data } - - { start: auto, type: .bss, vram: 0x80124290, name: asset_loading } - - { start: auto, type: .bss, vram: 0x80124330, name: rcp_dkr } - - { start: auto, type: .bss, vram: 0x801261A0, name: ../libultra/src/sc/sched } - - { start: auto, type: .bss, vram: 0x80126200, name: video } - - { start: auto, type: .bss, vram: 0x801263B0, name: textures_sprites } - - { start: auto, type: .bss, vram: 0x80126420, name: menu } - - { start: auto, type: .bss, vram: 0x80126D60, name: game_ui } - - { start: auto, type: .bss, vram: 0x80127240, name: os_yield_data } - - { start: auto, type: .bss, vram: 0x80127C40, name: weather } - - { start: auto, type: .bss, vram: 0x80127D10, name: particles } - - { start: auto, type: .bss, vram: 0x80127D30, name: printf } - - { start: auto, type: .bss, vram: 0x80128670, name: thread0_epc } - - { start: auto, type: .bss, vram: 0x80129B40, name: stacks } - - { start: auto, type: .bss, vram: 0x8012A050, name: waves } - - { start: auto, type: .bss, vram: 0x8012A7C0, name: fade_transition } - - { start: auto, type: .bss, vram: 0x8012A810, name: game_text } - - { start: auto, type: .bss, vram: 0x8012A870, name: font } - - { start: auto, type: .bss, vram: 0x8012A890, name: ../libultra/src/io/pimgr } - - { start: auto, type: .bss, vram: 0x8012AB60, name: gzip } - - { start: auto, type: .bss, vram: 0x8012AB70, name: ../libultra/src/io/leointerrupt } - - { start: auto, type: .bss, vram: 0x8012AB80, name: thread30_bgload } - - { start: auto, type: .bss, vram: 0x8012CD50, name: ../libultra/src/os/initialize } - - { start: auto, type: .bss, vram: 0x8012CD60, name: ../libultra/src/os/seteventmesg } - - { start: auto, type: .bss, vram: 0x8012CDE0, name: ../libultra/src/io/controller } - - { start: auto, type: .bss, vram: 0x8012CE70, name: ../libultra/src/io/pfsisplug } - - { start: auto, type: .bss, vram: 0x8012CEB0, name: ../libultra/src/io/siacs } - - { start: auto, type: .bss, vram: 0x8012CED0, name: ../libultra/src/io/conteepread } - - { start: auto, type: .bss, vram: 0x8012CF10, name: ../libultra/src/io/vimgr } - - { start: auto, type: .bss, vram: 0x8012D230, name: ../libultra/src/io/sptask } - - { start: auto, type: .bss, vram: 0x8012D270, name: ../libultra/src/io/piacs } - - { start: auto, type: .bss, vram: 0x8012D290, name: ../libultra/src/os/timerintr } - - { start: auto, type: .bss, vram: 0x8012D2D0, name: ../libultra/src/os/exceptasm } + - { type: .bss, vram: 0x800EBFF0, name: audio } + - { type: .bss, vram: 0x80116020, name: audiomgr } + - { type: .bss, vram: 0x80119C60, name: audiosfx } + - { type: .bss, vram: 0x80119CC0, name: audio_vehicle } + - { type: .bss, vram: 0x8011ACB0, name: objects } + - { type: .bss, vram: 0x8011B130, name: tracks } + - { type: .bss, vram: 0x8011D550, name: lights } + - { type: .bss, vram: 0x8011D560, name: object_functions } + - { type: .bss, vram: 0x8011D580, name: racer } + - { type: .bss, vram: 0x8011D650, name: vehicle_tricky } + - { type: .bss, vram: 0x8011D660, name: vehicle_bluey } + - { type: .bss, vram: 0x8011D670, name: vehicle_smokey } + - { type: .bss, vram: 0x8011D680, name: vehicle_bubbler } + - { type: .bss, vram: 0x8011D690, name: vehicle_wizpig } + - { type: .bss, vram: 0x8011D6A0, name: vehicle_rocket } + - { type: .bss, vram: 0x8011D6B0, name: object_models } + - { type: .bss, vram: 0x8011D7E0, name: main } + - { type: .bss, vram: 0x8011FB50, name: hasm/entrypoint } + - { type: .bss, vram: 0x80120B50, name: camera } + - { type: .bss, vram: 0x80121170, name: joypad } + - { type: .bss, vram: 0x801211F0, name: game } + - { type: .bss, vram: 0x80121280, name: thread3_main } + - { type: .bss, vram: 0x80123610, name: memory } + - { type: .bss, vram: 0x80123E60, name: ../libultra/src/io/motor } + - { type: .bss, vram: 0x801240A0, name: save_data } + - { type: .bss, vram: 0x80124290, name: asset_loading } + - { type: .bss, vram: 0x80124330, name: rcp_dkr } + - { type: .bss, vram: 0x801261A0, name: ../libultra/src/sc/sched } + - { type: .bss, vram: 0x80126200, name: video } + - { type: .bss, vram: 0x801263B0, name: textures_sprites } + - { type: .bss, vram: 0x80126420, name: menu } + - { type: .bss, vram: 0x80126D60, name: game_ui } + - { type: .bss, vram: 0x80127240, name: os_yield_data } + - { type: .bss, vram: 0x80127C40, name: weather } + - { type: .bss, vram: 0x80127D10, name: particles } + - { type: .bss, vram: 0x80127D30, name: printf } + - { type: .bss, vram: 0x80128670, name: thread0_epc } + - { type: .bss, vram: 0x80129B40, name: stacks } + - { type: .bss, vram: 0x8012A050, name: waves } + - { type: .bss, vram: 0x8012A7C0, name: fade_transition } + - { type: .bss, vram: 0x8012A810, name: game_text } + - { type: .bss, vram: 0x8012A870, name: font } + - { type: .bss, vram: 0x8012A890, name: ../libultra/src/io/pimgr } + - { type: .bss, vram: 0x8012AB60, name: gzip } + - { type: .bss, vram: 0x8012AB70, name: ../libultra/src/io/leointerrupt } + - { type: .bss, vram: 0x8012AB80, name: thread30_bgload } + - { type: .bss, vram: 0x8012CD50, name: ../libultra/src/os/initialize } + - { type: .bss, vram: 0x8012CD60, name: ../libultra/src/os/seteventmesg } + - { type: .bss, vram: 0x8012CDE0, name: ../libultra/src/io/controller } + - { type: .bss, vram: 0x8012CE70, name: ../libultra/src/io/pfsisplug } + - { type: .bss, vram: 0x8012CEB0, name: ../libultra/src/io/siacs } + - { type: .bss, vram: 0x8012CED0, name: ../libultra/src/io/conteepread } + - { type: .bss, vram: 0x8012CF10, name: ../libultra/src/io/vimgr } + - { type: .bss, vram: 0x8012D230, name: ../libultra/src/io/sptask } + - { type: .bss, vram: 0x8012D270, name: ../libultra/src/io/piacs } + - { type: .bss, vram: 0x8012D290, name: ../libultra/src/os/timerintr } + - { type: .bss, vram: 0x8012D2D0, name: ../libultra/src/os/exceptasm } - name: assets type: bin diff --git a/ver/splat/dkr.pal.v80.yaml b/ver/splat/dkr.pal.v80.yaml index b486253d..e65afe58 100644 --- a/ver/splat/dkr.pal.v80.yaml +++ b/ver/splat/dkr.pal.v80.yaml @@ -382,63 +382,63 @@ segments: - { start: 0xEB5B0, type: databin, name: data_f3ddkr_fifo, linker_section_order: .rodata } - { start: 0xEBDB0, type: databin, name: data_f3ddkr_xbus, linker_section_order: .rodata } - { start: 0xEC5B0, type: databin, name: data_unknown_2, linker_section_order: .rodata } - - { start: auto, type: .bss, vram: 0x800EC570, name: audio } - - { start: auto, type: .bss, vram: 0x801165A0, name: audiomgr } - - { start: auto, type: .bss, vram: 0x8011A1E0, name: audiosfx } - - { start: auto, type: .bss, vram: 0x8011A240, name: audio_vehicle } - - { start: auto, type: .bss, vram: 0x8011B230, name: objects } - - { start: auto, type: .bss, vram: 0x8011B6B0, name: tracks } - - { start: auto, type: .bss, vram: 0x8011DAD0, name: lights } - - { start: auto, type: .bss, vram: 0x8011DAE0, name: object_functions } - - { start: auto, type: .bss, vram: 0x8011DB00, name: racer } - - { start: auto, type: .bss, vram: 0x8011DBD0, name: vehicle_tricky } - - { start: auto, type: .bss, vram: 0x8011DBE0, name: vehicle_bluey } - - { start: auto, type: .bss, vram: 0x8011DBF0, name: vehicle_smokey } - - { start: auto, type: .bss, vram: 0x8011DC00, name: vehicle_bubbler } - - { start: auto, type: .bss, vram: 0x8011DC10, name: vehicle_wizpig } - - { start: auto, type: .bss, vram: 0x8011DC20, name: vehicle_rocket } - - { start: auto, type: .bss, vram: 0x8011DC30, name: object_models } - - { start: auto, type: .bss, vram: 0x8011DD60, name: main } - - { start: auto, type: .bss, vram: 0x801200D0, name: hasm/entrypoint } - - { start: auto, type: .bss, vram: 0x801210D0, name: camera } - - { start: auto, type: .bss, vram: 0x801216F0, name: joypad } - - { start: auto, type: .bss, vram: 0x80121770, name: game } - - { start: auto, type: .bss, vram: 0x80121800, name: thread3_main } - - { start: auto, type: .bss, vram: 0x80123B90, name: memory } - - { start: auto, type: .bss, vram: 0x801243E0, name: ../libultra/src/io/motor } - - { start: auto, type: .bss, vram: 0x80124620, name: save_data } - - { start: auto, type: .bss, vram: 0x80124810, name: asset_loading } - - { start: auto, type: .bss, vram: 0x801248D0, name: rcp_dkr } - - { start: auto, type: .bss, vram: 0x80126740, name: ../libultra/src/sc/sched } - - { start: auto, type: .bss, vram: 0x801267A0, name: video } - - { start: auto, type: .bss, vram: 0x80126950, name: textures_sprites } - - { start: auto, type: .bss, vram: 0x801269C0, name: menu } - - { start: auto, type: .bss, vram: 0x80127320, name: game_ui } - - { start: auto, type: .bss, vram: 0x80127800, name: os_yield_data } - - { start: auto, type: .bss, vram: 0x80128200, name: weather } - - { start: auto, type: .bss, vram: 0x801282D0, name: particles } - - { start: auto, type: .bss, vram: 0x801282F0, name: printf } - - { start: auto, type: .bss, vram: 0x80128C30, name: thread0_epc } - - { start: auto, type: .bss, vram: 0x8012A100, name: stacks } - - { start: auto, type: .bss, vram: 0x8012A610, name: waves } - - { start: auto, type: .bss, vram: 0x8012AD80, name: fade_transition } - - { start: auto, type: .bss, vram: 0x8012ADD0, name: game_text } - - { start: auto, type: .bss, vram: 0x8012AE30, name: font } - - { start: auto, type: .bss, vram: 0x8012AE50, name: ../libultra/src/io/pimgr } - - { start: auto, type: .bss, vram: 0x8012B120, name: gzip } - - { start: auto, type: .bss, vram: 0x8012B130, name: ../libultra/src/io/leointerrupt } - - { start: auto, type: .bss, vram: 0x8012B140, name: thread30_bgload } - - { start: auto, type: .bss, vram: 0x8012D310, name: ../libultra/src/os/initialize } - - { start: auto, type: .bss, vram: 0x8012D320, name: ../libultra/src/os/seteventmesg } - - { start: auto, type: .bss, vram: 0x8012D3A0, name: ../libultra/src/io/controller } - - { start: auto, type: .bss, vram: 0x8012D430, name: ../libultra/src/io/pfsisplug } - - { start: auto, type: .bss, vram: 0x8012D470, name: ../libultra/src/io/siacs } - - { start: auto, type: .bss, vram: 0x8012D490, name: ../libultra/src/io/conteepread } - - { start: auto, type: .bss, vram: 0x8012D4D0, name: ../libultra/src/io/vimgr } - - { start: auto, type: .bss, vram: 0x8012D7F0, name: ../libultra/src/io/sptask } - - { start: auto, type: .bss, vram: 0x8012D830, name: ../libultra/src/io/piacs } - - { start: auto, type: .bss, vram: 0x8012D850, name: ../libultra/src/os/timerintr } - - { start: auto, type: .bss, vram: 0x8012D890, name: ../libultra/src/os/exceptasm } + - { type: .bss, vram: 0x800EC570, name: audio } + - { type: .bss, vram: 0x801165A0, name: audiomgr } + - { type: .bss, vram: 0x8011A1E0, name: audiosfx } + - { type: .bss, vram: 0x8011A240, name: audio_vehicle } + - { type: .bss, vram: 0x8011B230, name: objects } + - { type: .bss, vram: 0x8011B6B0, name: tracks } + - { type: .bss, vram: 0x8011DAD0, name: lights } + - { type: .bss, vram: 0x8011DAE0, name: object_functions } + - { type: .bss, vram: 0x8011DB00, name: racer } + - { type: .bss, vram: 0x8011DBD0, name: vehicle_tricky } + - { type: .bss, vram: 0x8011DBE0, name: vehicle_bluey } + - { type: .bss, vram: 0x8011DBF0, name: vehicle_smokey } + - { type: .bss, vram: 0x8011DC00, name: vehicle_bubbler } + - { type: .bss, vram: 0x8011DC10, name: vehicle_wizpig } + - { type: .bss, vram: 0x8011DC20, name: vehicle_rocket } + - { type: .bss, vram: 0x8011DC30, name: object_models } + - { type: .bss, vram: 0x8011DD60, name: main } + - { type: .bss, vram: 0x801200D0, name: hasm/entrypoint } + - { type: .bss, vram: 0x801210D0, name: camera } + - { type: .bss, vram: 0x801216F0, name: joypad } + - { type: .bss, vram: 0x80121770, name: game } + - { type: .bss, vram: 0x80121800, name: thread3_main } + - { type: .bss, vram: 0x80123B90, name: memory } + - { type: .bss, vram: 0x801243E0, name: ../libultra/src/io/motor } + - { type: .bss, vram: 0x80124620, name: save_data } + - { type: .bss, vram: 0x80124810, name: asset_loading } + - { type: .bss, vram: 0x801248D0, name: rcp_dkr } + - { type: .bss, vram: 0x80126740, name: ../libultra/src/sc/sched } + - { type: .bss, vram: 0x801267A0, name: video } + - { type: .bss, vram: 0x80126950, name: textures_sprites } + - { type: .bss, vram: 0x801269C0, name: menu } + - { type: .bss, vram: 0x80127320, name: game_ui } + - { type: .bss, vram: 0x80127800, name: os_yield_data } + - { type: .bss, vram: 0x80128200, name: weather } + - { type: .bss, vram: 0x801282D0, name: particles } + - { type: .bss, vram: 0x801282F0, name: printf } + - { type: .bss, vram: 0x80128C30, name: thread0_epc } + - { type: .bss, vram: 0x8012A100, name: stacks } + - { type: .bss, vram: 0x8012A610, name: waves } + - { type: .bss, vram: 0x8012AD80, name: fade_transition } + - { type: .bss, vram: 0x8012ADD0, name: game_text } + - { type: .bss, vram: 0x8012AE30, name: font } + - { type: .bss, vram: 0x8012AE50, name: ../libultra/src/io/pimgr } + - { type: .bss, vram: 0x8012B120, name: gzip } + - { type: .bss, vram: 0x8012B130, name: ../libultra/src/io/leointerrupt } + - { type: .bss, vram: 0x8012B140, name: thread30_bgload } + - { type: .bss, vram: 0x8012D310, name: ../libultra/src/os/initialize } + - { type: .bss, vram: 0x8012D320, name: ../libultra/src/os/seteventmesg } + - { type: .bss, vram: 0x8012D3A0, name: ../libultra/src/io/controller } + - { type: .bss, vram: 0x8012D430, name: ../libultra/src/io/pfsisplug } + - { type: .bss, vram: 0x8012D470, name: ../libultra/src/io/siacs } + - { type: .bss, vram: 0x8012D490, name: ../libultra/src/io/conteepread } + - { type: .bss, vram: 0x8012D4D0, name: ../libultra/src/io/vimgr } + - { type: .bss, vram: 0x8012D7F0, name: ../libultra/src/io/sptask } + - { type: .bss, vram: 0x8012D830, name: ../libultra/src/io/piacs } + - { type: .bss, vram: 0x8012D850, name: ../libultra/src/os/timerintr } + - { type: .bss, vram: 0x8012D890, name: ../libultra/src/os/exceptasm } - name: assets type: bin diff --git a/ver/splat/dkr.us.v77.yaml b/ver/splat/dkr.us.v77.yaml index e04a12cc..2694dc1d 100644 --- a/ver/splat/dkr.us.v77.yaml +++ b/ver/splat/dkr.us.v77.yaml @@ -382,63 +382,63 @@ segments: - { start: 0xEAFA0, type: databin, name: data_f3ddkr_fifo, linker_section_order: .rodata } - { start: 0xEB7A0, type: databin, name: data_f3ddkr_xbus, linker_section_order: .rodata } - { start: 0xEBFA0, type: databin, name: data_unknown_2, linker_section_order: .rodata } - - { start: auto, type: .bss, vram: 0x800EBF60, name: audio } - - { start: auto, type: .bss, vram: 0x80115F90, name: audiomgr } - - { start: auto, type: .bss, vram: 0x80119BD0, name: audiosfx } - - { start: auto, type: .bss, vram: 0x80119C30, name: audio_vehicle } - - { start: auto, type: .bss, vram: 0x8011AC20, name: objects } - - { start: auto, type: .bss, vram: 0x8011B0A0, name: tracks } - - { start: auto, type: .bss, vram: 0x8011D4C0, name: lights } - - { start: auto, type: .bss, vram: 0x8011D4D0, name: object_functions } - - { start: auto, type: .bss, vram: 0x8011D4F0, name: racer } - - { start: auto, type: .bss, vram: 0x8011D5C0, name: vehicle_tricky } - - { start: auto, type: .bss, vram: 0x8011D5D0, name: vehicle_bluey } - - { start: auto, type: .bss, vram: 0x8011D5E0, name: vehicle_smokey } - - { start: auto, type: .bss, vram: 0x8011D5F0, name: vehicle_bubbler } - - { start: auto, type: .bss, vram: 0x8011D600, name: vehicle_wizpig } - - { start: auto, type: .bss, vram: 0x8011D610, name: vehicle_rocket } - - { start: auto, type: .bss, vram: 0x8011D620, name: object_models } - - { start: auto, type: .bss, vram: 0x8011D750, name: main } - - { start: auto, type: .bss, vram: 0x8011FAC0, name: hasm/entrypoint } - - { start: auto, type: .bss, vram: 0x80120AC0, name: camera } - - { start: auto, type: .bss, vram: 0x801210E0, name: joypad } - - { start: auto, type: .bss, vram: 0x80121160, name: game } - - { start: auto, type: .bss, vram: 0x801211F0, name: thread3_main } - - { start: auto, type: .bss, vram: 0x80123580, name: memory } - - { start: auto, type: .bss, vram: 0x80123DD0, name: ../libultra/src/io/motor } - - { start: auto, type: .bss, vram: 0x80124010, name: save_data } - - { start: auto, type: .bss, vram: 0x80124200, name: asset_loading } - - { start: auto, type: .bss, vram: 0x801242A0, name: rcp_dkr } - - { start: auto, type: .bss, vram: 0x80126110, name: ../libultra/src/sc/sched } - - { start: auto, type: .bss, vram: 0x80126170, name: video } - - { start: auto, type: .bss, vram: 0x80126320, name: textures_sprites } - - { start: auto, type: .bss, vram: 0x80126390, name: menu } - - { start: auto, type: .bss, vram: 0x80126CD0, name: game_ui } - - { start: auto, type: .bss, vram: 0x801271B0, name: os_yield_data } - - { start: auto, type: .bss, vram: 0x80127BB0, name: weather } - - { start: auto, type: .bss, vram: 0x80127C80, name: particles } - - { start: auto, type: .bss, vram: 0x80127CA0, name: printf } - - { start: auto, type: .bss, vram: 0x801285E0, name: thread0_epc } - - { start: auto, type: .bss, vram: 0x80129AB0, name: stacks } - - { start: auto, type: .bss, vram: 0x80129FC0, name: waves } - - { start: auto, type: .bss, vram: 0x8012A730, name: fade_transition } - - { start: auto, type: .bss, vram: 0x8012A780, name: game_text } - - { start: auto, type: .bss, vram: 0x8012A7E0, name: font } - - { start: auto, type: .bss, vram: 0x8012A800, name: ../libultra/src/io/pimgr } - - { start: auto, type: .bss, vram: 0x8012AAD0, name: gzip } - - { start: auto, type: .bss, vram: 0x8012AAE0, name: ../libultra/src/io/leointerrupt } - - { start: auto, type: .bss, vram: 0x8012AAF0, name: thread30_bgload } - - { start: auto, type: .bss, vram: 0x8012CCC0, name: ../libultra/src/os/initialize } - - { start: auto, type: .bss, vram: 0x8012CCD0, name: ../libultra/src/os/seteventmesg } - - { start: auto, type: .bss, vram: 0x8012CD50, name: ../libultra/src/io/controller } - - { start: auto, type: .bss, vram: 0x8012CDE0, name: ../libultra/src/io/pfsisplug } - - { start: auto, type: .bss, vram: 0x8012CE20, name: ../libultra/src/io/siacs } - - { start: auto, type: .bss, vram: 0x8012CE40, name: ../libultra/src/io/conteepread } - - { start: auto, type: .bss, vram: 0x8012CE80, name: ../libultra/src/io/vimgr } - - { start: auto, type: .bss, vram: 0x8012D1A0, name: ../libultra/src/io/sptask } - - { start: auto, type: .bss, vram: 0x8012D1E0, name: ../libultra/src/io/piacs } - - { start: auto, type: .bss, vram: 0x8012D200, name: ../libultra/src/os/timerintr } - - { start: auto, type: .bss, vram: 0x8012D240, name: ../libultra/src/os/exceptasm } + - { type: .bss, vram: 0x800EBF60, name: audio } + - { type: .bss, vram: 0x80115F90, name: audiomgr } + - { type: .bss, vram: 0x80119BD0, name: audiosfx } + - { type: .bss, vram: 0x80119C30, name: audio_vehicle } + - { type: .bss, vram: 0x8011AC20, name: objects } + - { type: .bss, vram: 0x8011B0A0, name: tracks } + - { type: .bss, vram: 0x8011D4C0, name: lights } + - { type: .bss, vram: 0x8011D4D0, name: object_functions } + - { type: .bss, vram: 0x8011D4F0, name: racer } + - { type: .bss, vram: 0x8011D5C0, name: vehicle_tricky } + - { type: .bss, vram: 0x8011D5D0, name: vehicle_bluey } + - { type: .bss, vram: 0x8011D5E0, name: vehicle_smokey } + - { type: .bss, vram: 0x8011D5F0, name: vehicle_bubbler } + - { type: .bss, vram: 0x8011D600, name: vehicle_wizpig } + - { type: .bss, vram: 0x8011D610, name: vehicle_rocket } + - { type: .bss, vram: 0x8011D620, name: object_models } + - { type: .bss, vram: 0x8011D750, name: main } + - { type: .bss, vram: 0x8011FAC0, name: hasm/entrypoint } + - { type: .bss, vram: 0x80120AC0, name: camera } + - { type: .bss, vram: 0x801210E0, name: joypad } + - { type: .bss, vram: 0x80121160, name: game } + - { type: .bss, vram: 0x801211F0, name: thread3_main } + - { type: .bss, vram: 0x80123580, name: memory } + - { type: .bss, vram: 0x80123DD0, name: ../libultra/src/io/motor } + - { type: .bss, vram: 0x80124010, name: save_data } + - { type: .bss, vram: 0x80124200, name: asset_loading } + - { type: .bss, vram: 0x801242A0, name: rcp_dkr } + - { type: .bss, vram: 0x80126110, name: ../libultra/src/sc/sched } + - { type: .bss, vram: 0x80126170, name: video } + - { type: .bss, vram: 0x80126320, name: textures_sprites } + - { type: .bss, vram: 0x80126390, name: menu } + - { type: .bss, vram: 0x80126CD0, name: game_ui } + - { type: .bss, vram: 0x801271B0, name: os_yield_data } + - { type: .bss, vram: 0x80127BB0, name: weather } + - { type: .bss, vram: 0x80127C80, name: particles } + - { type: .bss, vram: 0x80127CA0, name: printf } + - { type: .bss, vram: 0x801285E0, name: thread0_epc } + - { type: .bss, vram: 0x80129AB0, name: stacks } + - { type: .bss, vram: 0x80129FC0, name: waves } + - { type: .bss, vram: 0x8012A730, name: fade_transition } + - { type: .bss, vram: 0x8012A780, name: game_text } + - { type: .bss, vram: 0x8012A7E0, name: font } + - { type: .bss, vram: 0x8012A800, name: ../libultra/src/io/pimgr } + - { type: .bss, vram: 0x8012AAD0, name: gzip } + - { type: .bss, vram: 0x8012AAE0, name: ../libultra/src/io/leointerrupt } + - { type: .bss, vram: 0x8012AAF0, name: thread30_bgload } + - { type: .bss, vram: 0x8012CCC0, name: ../libultra/src/os/initialize } + - { type: .bss, vram: 0x8012CCD0, name: ../libultra/src/os/seteventmesg } + - { type: .bss, vram: 0x8012CD50, name: ../libultra/src/io/controller } + - { type: .bss, vram: 0x8012CDE0, name: ../libultra/src/io/pfsisplug } + - { type: .bss, vram: 0x8012CE20, name: ../libultra/src/io/siacs } + - { type: .bss, vram: 0x8012CE40, name: ../libultra/src/io/conteepread } + - { type: .bss, vram: 0x8012CE80, name: ../libultra/src/io/vimgr } + - { type: .bss, vram: 0x8012D1A0, name: ../libultra/src/io/sptask } + - { type: .bss, vram: 0x8012D1E0, name: ../libultra/src/io/piacs } + - { type: .bss, vram: 0x8012D200, name: ../libultra/src/os/timerintr } + - { type: .bss, vram: 0x8012D240, name: ../libultra/src/os/exceptasm } - name: assets type: bin diff --git a/ver/splat/dkr.us.v80.yaml b/ver/splat/dkr.us.v80.yaml index 1a4e8f13..6af5df9b 100644 --- a/ver/splat/dkr.us.v80.yaml +++ b/ver/splat/dkr.us.v80.yaml @@ -382,63 +382,63 @@ segments: - { start: 0xEB520, type: databin, name: data_f3ddkr_fifo, linker_section_order: .rodata } - { start: 0xEBD20, type: databin, name: data_f3ddkr_xbus, linker_section_order: .rodata } - { start: 0xEC520, type: databin, name: data_unknown_2, linker_section_order: .rodata } - - { start: auto, type: .bss, vram: 0x800EC4E0, name: audio } - - { start: auto, type: .bss, vram: 0x80116510, name: audiomgr } - - { start: auto, type: .bss, vram: 0x8011A150, name: audiosfx } - - { start: auto, type: .bss, vram: 0x8011A1B0, name: audio_vehicle } - - { start: auto, type: .bss, vram: 0x8011B1A0, name: objects } - - { start: auto, type: .bss, vram: 0x8011B620, name: tracks } - - { start: auto, type: .bss, vram: 0x8011DA40, name: lights } - - { start: auto, type: .bss, vram: 0x8011DA50, name: object_functions } - - { start: auto, type: .bss, vram: 0x8011DA70, name: racer } - - { start: auto, type: .bss, vram: 0x8011DB40, name: vehicle_tricky } - - { start: auto, type: .bss, vram: 0x8011DB50, name: vehicle_bluey } - - { start: auto, type: .bss, vram: 0x8011DB60, name: vehicle_smokey } - - { start: auto, type: .bss, vram: 0x8011DB70, name: vehicle_bubbler } - - { start: auto, type: .bss, vram: 0x8011DB80, name: vehicle_wizpig } - - { start: auto, type: .bss, vram: 0x8011DB90, name: vehicle_rocket } - - { start: auto, type: .bss, vram: 0x8011DBA0, name: object_models } - - { start: auto, type: .bss, vram: 0x8011DCD0, name: main } - - { start: auto, type: .bss, vram: 0x80120040, name: hasm/entrypoint } - - { start: auto, type: .bss, vram: 0x80121040, name: camera } - - { start: auto, type: .bss, vram: 0x80121660, name: joypad } - - { start: auto, type: .bss, vram: 0x801216E0, name: game } - - { start: auto, type: .bss, vram: 0x80121770, name: thread3_main } - - { start: auto, type: .bss, vram: 0x80123B00, name: memory } - - { start: auto, type: .bss, vram: 0x80124350, name: ../libultra/src/io/motor } - - { start: auto, type: .bss, vram: 0x80124590, name: save_data } - - { start: auto, type: .bss, vram: 0x80124780, name: asset_loading } - - { start: auto, type: .bss, vram: 0x80124840, name: rcp_dkr } - - { start: auto, type: .bss, vram: 0x801266B0, name: ../libultra/src/sc/sched } - - { start: auto, type: .bss, vram: 0x80126710, name: video } - - { start: auto, type: .bss, vram: 0x801268C0, name: textures_sprites } - - { start: auto, type: .bss, vram: 0x80126930, name: menu } - - { start: auto, type: .bss, vram: 0x80127290, name: game_ui } - - { start: auto, type: .bss, vram: 0x80127770, name: os_yield_data } - - { start: auto, type: .bss, vram: 0x80128170, name: weather } - - { start: auto, type: .bss, vram: 0x80128240, name: particles } - - { start: auto, type: .bss, vram: 0x80128260, name: printf } - - { start: auto, type: .bss, vram: 0x80128BA0, name: thread0_epc } - - { start: auto, type: .bss, vram: 0x8012A070, name: stacks } - - { start: auto, type: .bss, vram: 0x8012A580, name: waves } - - { start: auto, type: .bss, vram: 0x8012ACF0, name: fade_transition } - - { start: auto, type: .bss, vram: 0x8012AD40, name: game_text } - - { start: auto, type: .bss, vram: 0x8012ADA0, name: font } - - { start: auto, type: .bss, vram: 0x8012ADC0, name: ../libultra/src/io/pimgr } - - { start: auto, type: .bss, vram: 0x8012B090, name: gzip } - - { start: auto, type: .bss, vram: 0x8012B0A0, name: ../libultra/src/io/leointerrupt } - - { start: auto, type: .bss, vram: 0x8012B0B0, name: thread30_bgload } - - { start: auto, type: .bss, vram: 0x8012D280, name: ../libultra/src/os/initialize } - - { start: auto, type: .bss, vram: 0x8012D290, name: ../libultra/src/os/seteventmesg } - - { start: auto, type: .bss, vram: 0x8012D310, name: ../libultra/src/io/controller } - - { start: auto, type: .bss, vram: 0x8012D3A0, name: ../libultra/src/io/pfsisplug } - - { start: auto, type: .bss, vram: 0x8012D3E0, name: ../libultra/src/io/siacs } - - { start: auto, type: .bss, vram: 0x8012D400, name: ../libultra/src/io/conteepread } - - { start: auto, type: .bss, vram: 0x8012D440, name: ../libultra/src/io/vimgr } - - { start: auto, type: .bss, vram: 0x8012D760, name: ../libultra/src/io/sptask } - - { start: auto, type: .bss, vram: 0x8012D7A0, name: ../libultra/src/io/piacs } - - { start: auto, type: .bss, vram: 0x8012D7C0, name: ../libultra/src/os/timerintr } - - { start: auto, type: .bss, vram: 0x8012D800, name: ../libultra/src/os/exceptasm } + - { type: .bss, vram: 0x800EC4E0, name: audio } + - { type: .bss, vram: 0x80116510, name: audiomgr } + - { type: .bss, vram: 0x8011A150, name: audiosfx } + - { type: .bss, vram: 0x8011A1B0, name: audio_vehicle } + - { type: .bss, vram: 0x8011B1A0, name: objects } + - { type: .bss, vram: 0x8011B620, name: tracks } + - { type: .bss, vram: 0x8011DA40, name: lights } + - { type: .bss, vram: 0x8011DA50, name: object_functions } + - { type: .bss, vram: 0x8011DA70, name: racer } + - { type: .bss, vram: 0x8011DB40, name: vehicle_tricky } + - { type: .bss, vram: 0x8011DB50, name: vehicle_bluey } + - { type: .bss, vram: 0x8011DB60, name: vehicle_smokey } + - { type: .bss, vram: 0x8011DB70, name: vehicle_bubbler } + - { type: .bss, vram: 0x8011DB80, name: vehicle_wizpig } + - { type: .bss, vram: 0x8011DB90, name: vehicle_rocket } + - { type: .bss, vram: 0x8011DBA0, name: object_models } + - { type: .bss, vram: 0x8011DCD0, name: main } + - { type: .bss, vram: 0x80120040, name: hasm/entrypoint } + - { type: .bss, vram: 0x80121040, name: camera } + - { type: .bss, vram: 0x80121660, name: joypad } + - { type: .bss, vram: 0x801216E0, name: game } + - { type: .bss, vram: 0x80121770, name: thread3_main } + - { type: .bss, vram: 0x80123B00, name: memory } + - { type: .bss, vram: 0x80124350, name: ../libultra/src/io/motor } + - { type: .bss, vram: 0x80124590, name: save_data } + - { type: .bss, vram: 0x80124780, name: asset_loading } + - { type: .bss, vram: 0x80124840, name: rcp_dkr } + - { type: .bss, vram: 0x801266B0, name: ../libultra/src/sc/sched } + - { type: .bss, vram: 0x80126710, name: video } + - { type: .bss, vram: 0x801268C0, name: textures_sprites } + - { type: .bss, vram: 0x80126930, name: menu } + - { type: .bss, vram: 0x80127290, name: game_ui } + - { type: .bss, vram: 0x80127770, name: os_yield_data } + - { type: .bss, vram: 0x80128170, name: weather } + - { type: .bss, vram: 0x80128240, name: particles } + - { type: .bss, vram: 0x80128260, name: printf } + - { type: .bss, vram: 0x80128BA0, name: thread0_epc } + - { type: .bss, vram: 0x8012A070, name: stacks } + - { type: .bss, vram: 0x8012A580, name: waves } + - { type: .bss, vram: 0x8012ACF0, name: fade_transition } + - { type: .bss, vram: 0x8012AD40, name: game_text } + - { type: .bss, vram: 0x8012ADA0, name: font } + - { type: .bss, vram: 0x8012ADC0, name: ../libultra/src/io/pimgr } + - { type: .bss, vram: 0x8012B090, name: gzip } + - { type: .bss, vram: 0x8012B0A0, name: ../libultra/src/io/leointerrupt } + - { type: .bss, vram: 0x8012B0B0, name: thread30_bgload } + - { type: .bss, vram: 0x8012D280, name: ../libultra/src/os/initialize } + - { type: .bss, vram: 0x8012D290, name: ../libultra/src/os/seteventmesg } + - { type: .bss, vram: 0x8012D310, name: ../libultra/src/io/controller } + - { type: .bss, vram: 0x8012D3A0, name: ../libultra/src/io/pfsisplug } + - { type: .bss, vram: 0x8012D3E0, name: ../libultra/src/io/siacs } + - { type: .bss, vram: 0x8012D400, name: ../libultra/src/io/conteepread } + - { type: .bss, vram: 0x8012D440, name: ../libultra/src/io/vimgr } + - { type: .bss, vram: 0x8012D760, name: ../libultra/src/io/sptask } + - { type: .bss, vram: 0x8012D7A0, name: ../libultra/src/io/piacs } + - { type: .bss, vram: 0x8012D7C0, name: ../libultra/src/os/timerintr } + - { type: .bss, vram: 0x8012D800, name: ../libultra/src/os/exceptasm } - name: assets type: bin diff --git a/ver/symbols/symbol_addrs.jpn.v79.txt b/ver/symbols/symbol_addrs.jpn.v79.txt index bcb4bbb0..27fc2623 100644 --- a/ver/symbols/symbol_addrs.jpn.v79.txt +++ b/ver/symbols/symbol_addrs.jpn.v79.txt @@ -133,7 +133,7 @@ sound_vehicle_check = 0x80007F94; func_80007FA4 = 0x80007FA4; // audio_spatial.c .text -func_80008040 = 0x80008040; +audioline_init = 0x80008040; audioline_off = 0x80008140; audioline_on = 0x80008168; func_80008174 = 0x80008174; diff --git a/ver/symbols/symbol_addrs.pal.v77.txt b/ver/symbols/symbol_addrs.pal.v77.txt index bf4a7e32..fb2974c7 100644 --- a/ver/symbols/symbol_addrs.pal.v77.txt +++ b/ver/symbols/symbol_addrs.pal.v77.txt @@ -133,7 +133,7 @@ sound_vehicle_check = 0x80007F94; func_80007FA4 = 0x80007FA4; // audio_spatial.c .text -func_80008040 = 0x80008040; +audioline_init = 0x80008040; audioline_off = 0x80008140; audioline_on = 0x80008168; func_80008174 = 0x80008174; diff --git a/ver/symbols/symbol_addrs.pal.v80.txt b/ver/symbols/symbol_addrs.pal.v80.txt index 6574a516..8eecd6df 100644 --- a/ver/symbols/symbol_addrs.pal.v80.txt +++ b/ver/symbols/symbol_addrs.pal.v80.txt @@ -133,7 +133,7 @@ sound_vehicle_check = 0x80007F94; func_80007FA4 = 0x80007FA4; // audio_spatial.c .text -func_80008040 = 0x80008040; +audioline_init = 0x80008040; audioline_off = 0x80008140; audioline_on = 0x80008168; func_80008174 = 0x80008174; diff --git a/ver/symbols/symbol_addrs.us.v77.txt b/ver/symbols/symbol_addrs.us.v77.txt index bbbe2811..91d76ffd 100644 --- a/ver/symbols/symbol_addrs.us.v77.txt +++ b/ver/symbols/symbol_addrs.us.v77.txt @@ -133,7 +133,7 @@ sound_vehicle_check = 0x80007F94; func_80007FA4 = 0x80007FA4; // audio_spatial.c .text -func_80008040 = 0x80008040; +audioline_init = 0x80008040; audioline_off = 0x80008140; audioline_on = 0x80008168; func_80008174 = 0x80008174; diff --git a/ver/symbols/symbol_addrs.us.v80.txt b/ver/symbols/symbol_addrs.us.v80.txt index f2aa4303..f3b4056a 100644 --- a/ver/symbols/symbol_addrs.us.v80.txt +++ b/ver/symbols/symbol_addrs.us.v80.txt @@ -133,7 +133,7 @@ sound_vehicle_check = 0x80007F94; func_80007FA4 = 0x80007FA4; // audio_spatial.c .text -func_80008040 = 0x80008040; +audioline_init = 0x80008040; audioline_off = 0x80008140; audioline_on = 0x80008168; func_80008174 = 0x80008174;