diff options
| author | Tharo <17233964+Thar0@users.noreply.github.com> | 2024-12-14 00:26:36 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-13 19:26:36 -0500 |
| commit | df5d4cb4673bc74d1e2f4d11cf6f5fe8376cd1df (patch) | |
| tree | 296aba161061ee785f27ba49c641d0b1f49315d6 /src | |
| parent | 4b20d8269b42b2892ef494afd0b6ccba78ba6c00 (diff) | |
[Audio 10/10] Loose ends (#2337)
* Introduce afile_sizes, generate headers of sizes for soundfonts and sequences
* Initial tools/audio README
* Versioning for samplebank extraction
* Clean up the disassemble_sequence.py runnable interface
* Add static assertions for maximum bank sizes
* Boost optimization for audio tools
* Samplebank XML doc
* Soundfont XML doc
* More docs in sampleconv for vadpcm
* Various tools fixes/cleanup
* VADPCM doc
* Try to fix md formatting
* VADPCM doc can come later
* Fix merge with PR 9
* Fix blobs from MM
* Try to fix bss
* Try fix bss round 2
* Fix sampleconv memset bug
* Suggested documentation tweaks
Diffstat (limited to 'src')
| -rw-r--r-- | src/audio/session_config.c | 14 | ||||
| -rw-r--r-- | src/boot/z_std_dma.c | 2 | ||||
| -rw-r--r-- | src/code/fault_gc.c | 4 | ||||
| -rw-r--r-- | src/code/graph.c | 4 | ||||
| -rw-r--r-- | src/code/main.c | 2 | ||||
| -rw-r--r-- | src/code/z_bgcheck.c | 2 | ||||
| -rw-r--r-- | src/code/z_camera.c | 2 | ||||
| -rw-r--r-- | src/code/z_collision_check.c | 2 | ||||
| -rw-r--r-- | src/code/z_debug.c | 4 | ||||
| -rw-r--r-- | src/code/z_demo.c | 6 | ||||
| -rw-r--r-- | src/code/z_kankyo.c | 4 | ||||
| -rw-r--r-- | src/code/z_message.c | 2 | ||||
| -rw-r--r-- | src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c | 2 | ||||
| -rw-r--r-- | src/overlays/actors/ovl_Fishing/z_fishing.c | 4 | ||||
| -rw-r--r-- | src/overlays/actors/ovl_player_actor/z_player.c | 6 |
15 files changed, 30 insertions, 30 deletions
diff --git a/src/audio/session_config.c b/src/audio/session_config.c index 8c2824eee..27771515a 100644 --- a/src/audio/session_config.c +++ b/src/audio/session_config.c @@ -1,4 +1,8 @@ #include "global.h" +#include "assets/audio/sequence_sizes.h" +#include "assets/audio/soundfont_sizes.h" +#define SFX_SEQ_SIZE Sequence_0_SIZE +#define SFX_SOUNDFONTS_SIZE (Soundfont_0_SIZE + Soundfont_1_SIZE) AudioContext gAudioCtx; AudioCustomUpdateFunction gAudioCustomUpdateFunction; @@ -9,19 +13,13 @@ const TempoData gTempoData = { SEQTICKS_PER_BEAT, // seqTicksPerBeat }; -// TODO: Extract from table? -#define NUM_SOUNDFONTS 38 -#define SFX_SEQ_SIZE 0x6A90 -#define SFX_SOUNDFONT_1_SIZE 0x3AA0 -#define SFX_SOUNDFONT_2_SIZE 0x17B0 - // Sizes of everything on the init pool #define AI_BUFFERS_SIZE (AIBUF_SIZE * ARRAY_COUNT(gAudioCtx.aiBuffers)) #define SOUNDFONT_LIST_SIZE (NUM_SOUNDFONTS * sizeof(SoundFont)) #if OOT_VERSION < PAL_1_0 || PLATFORM_GC -#define PERMANENT_POOL_SIZE (SFX_SEQ_SIZE + SFX_SOUNDFONT_1_SIZE + SFX_SOUNDFONT_2_SIZE) +#define PERMANENT_POOL_SIZE (SFX_SEQ_SIZE + SFX_SOUNDFONTS_SIZE) #else -#define PERMANENT_POOL_SIZE (SFX_SEQ_SIZE + SFX_SOUNDFONT_1_SIZE + SFX_SOUNDFONT_2_SIZE + 0x10) +#define PERMANENT_POOL_SIZE (SFX_SEQ_SIZE + SFX_SOUNDFONTS_SIZE + 0x10) #endif const AudioHeapInitSizes gAudioHeapInitSizes = { diff --git a/src/boot/z_std_dma.c b/src/boot/z_std_dma.c index 72d04dce1..350c98e02 100644 --- a/src/boot/z_std_dma.c +++ b/src/boot/z_std_dma.c @@ -27,7 +27,7 @@ #endif #pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \ - "ntsc-1.2:88 pal-1.0:86 pal-1.1:86" + "ntsc-1.2:82 pal-1.0:80 pal-1.1:80" StackEntry sDmaMgrStackInfo; OSMesgQueue sDmaMgrMsgQueue; diff --git a/src/code/fault_gc.c b/src/code/fault_gc.c index 13dfb670a..af6932159 100644 --- a/src/code/fault_gc.c +++ b/src/code/fault_gc.c @@ -42,8 +42,8 @@ */ #if PLATFORM_GC -#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-eu-mq-dbg:176 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192" \ - "gc-us-mq:192" +#pragma increment_block_number "gc-eu:160 gc-eu-mq:160 gc-eu-mq-dbg:160 gc-jp:176 gc-jp-ce:176 gc-jp-mq:176 gc-us:176" \ + "gc-us-mq:176" #include "global.h" #include "alloca.h" diff --git a/src/code/graph.c b/src/code/graph.c index 56765ae5a..2564d83dd 100644 --- a/src/code/graph.c +++ b/src/code/graph.c @@ -7,8 +7,8 @@ #define GFXPOOL_HEAD_MAGIC 0x1234 #define GFXPOOL_TAIL_MAGIC 0x5678 -#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \ - "ntsc-1.0:160 ntsc-1.1:160 ntsc-1.2:160 pal-1.0:160 pal-1.1:160" +#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ntsc-1.0:160" \ + "ntsc-1.1:160 ntsc-1.2:160 pal-1.0:160 pal-1.1:160" /** * The time at which the previous `Graph_Update` ended. diff --git a/src/code/main.c b/src/code/main.c index d11630a0a..8ad00b52b 100644 --- a/src/code/main.c +++ b/src/code/main.c @@ -24,7 +24,7 @@ extern struct IrqMgr gIrqMgr; #endif #pragma increment_block_number "gc-eu:160 gc-eu-mq:160 gc-jp:160 gc-jp-ce:160 gc-jp-mq:160 gc-us:160 gc-us-mq:160" \ - "ntsc-1.0:148 ntsc-1.1:148 ntsc-1.2:148 pal-1.0:146 pal-1.1:146" + "ntsc-1.0:141 ntsc-1.1:141 ntsc-1.2:141 pal-1.0:139 pal-1.1:139" extern u8 _buffersSegmentEnd[]; diff --git a/src/code/z_bgcheck.c b/src/code/z_bgcheck.c index 129900bdb..bb1b3a71f 100644 --- a/src/code/z_bgcheck.c +++ b/src/code/z_bgcheck.c @@ -1,7 +1,7 @@ #include "global.h" #include "terminal.h" -#pragma increment_block_number "ntsc-1.0:136 ntsc-1.1:136 ntsc-1.2:136" +#pragma increment_block_number "ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128" u16 DynaSSNodeList_GetNextNodeIdx(DynaSSNodeList* nodeList); void BgCheck_GetStaticLookupIndicesFromPos(CollisionContext* colCtx, Vec3f* pos, Vec3i* sector); diff --git a/src/code/z_camera.c b/src/code/z_camera.c index 1ddc538dc..d5c97c109 100644 --- a/src/code/z_camera.c +++ b/src/code/z_camera.c @@ -3639,7 +3639,7 @@ s32 Camera_KeepOn3(Camera* camera) { } #pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \ - "ntsc-1.0:90 ntsc-1.1:90 ntsc-1.2:90 pal-1.0:88 pal-1.1:88" + "ntsc-1.0:83 ntsc-1.1:83 ntsc-1.2:83 pal-1.0:81 pal-1.1:81" s32 Camera_KeepOn4(Camera* camera) { static Vec3f D_8015BD50; diff --git a/src/code/z_collision_check.c b/src/code/z_collision_check.c index 7904809bf..0567fd15a 100644 --- a/src/code/z_collision_check.c +++ b/src/code/z_collision_check.c @@ -16,7 +16,7 @@ #include "z_lib.h" #pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \ - "ntsc-1.0:104 ntsc-1.1:104 ntsc-1.2:104 pal-1.0:104 pal-1.1:104" + "ntsc-1.0:96 ntsc-1.1:96 ntsc-1.2:96 pal-1.0:96 pal-1.1:96" typedef s32 (*ColChkResetFunc)(PlayState*, Collider*); typedef void (*ColChkApplyFunc)(PlayState*, CollisionCheckContext*, Collider*); diff --git a/src/code/z_debug.c b/src/code/z_debug.c index d83dc2337..d94e79e83 100644 --- a/src/code/z_debug.c +++ b/src/code/z_debug.c @@ -12,8 +12,8 @@ typedef struct InputCombo { /* 0x2 */ u16 press; } InputCombo; // size = 0x4 -#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" \ - "ntsc-1.0:192 ntsc-1.1:192 ntsc-1.2:192 pal-1.0:192 pal-1.1:192" +#pragma increment_block_number "gc-eu:160 gc-eu-mq:160 gc-jp:160 gc-jp-ce:160 gc-jp-mq:160 gc-us:160 gc-us-mq:160" \ + "ntsc-1.0:160 ntsc-1.1:160 ntsc-1.2:160 pal-1.0:160 pal-1.1:160" RegEditor* gRegEditor; diff --git a/src/code/z_demo.c b/src/code/z_demo.c index 89726c6a2..1e2725830 100644 --- a/src/code/z_demo.c +++ b/src/code/z_demo.c @@ -1,3 +1,5 @@ +#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \ + "ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:128 pal-1.1:128" #include "global.h" #include "quake.h" #include "z64camera.h" @@ -124,8 +126,8 @@ u16 gCamAtSplinePointsAppliedFrame; u16 gCamEyePointAppliedFrame; u16 gCamAtPointAppliedFrame; -#pragma increment_block_number "gc-eu:186 gc-eu-mq:176 gc-jp:188 gc-jp-ce:188 gc-jp-mq:176 gc-us:188 gc-us-mq:176" \ - "ntsc-1.0:80 ntsc-1.1:80 ntsc-1.2:80 pal-1.0:80 pal-1.1:80" +#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:188 gc-jp-ce:188 gc-jp-mq:0 gc-us:188 gc-us-mq:0" \ + "ntsc-1.0:128 ntsc-1.1:80 ntsc-1.2:80 pal-1.0:80 pal-1.1:80" // Cam ID to return to when a scripted cutscene is finished s16 sReturnToCamId; diff --git a/src/code/z_kankyo.c b/src/code/z_kankyo.c index 4d92cc82b..2980933cd 100644 --- a/src/code/z_kankyo.c +++ b/src/code/z_kankyo.c @@ -1,5 +1,5 @@ -#pragma increment_block_number "gc-eu:244 gc-eu-mq:244 gc-jp:224 gc-jp-ce:224 gc-jp-mq:224 gc-us:224 gc-us-mq:224" \ - "ntsc-1.0:224 ntsc-1.1:224 ntsc-1.2:224 pal-1.0:248 pal-1.1:248" +#pragma increment_block_number "gc-eu:232 gc-eu-mq:232 gc-jp:212 gc-jp-ce:212 gc-jp-mq:212 gc-us:212 gc-us-mq:212" \ + "ntsc-1.0:224 ntsc-1.1:224 ntsc-1.2:224 pal-1.0:240 pal-1.1:240" #include "global.h" #include "ultra64.h" diff --git a/src/code/z_message.c b/src/code/z_message.c index 368a53723..35e30abda 100644 --- a/src/code/z_message.c +++ b/src/code/z_message.c @@ -8,7 +8,7 @@ #endif #pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \ - "ntsc-1.0:96 ntsc-1.1:96 ntsc-1.2:112 pal-1.0:128 pal-1.1:128" + "ntsc-1.0:96 ntsc-1.1:96 ntsc-1.2:96 pal-1.0:128 pal-1.1:128" #if !PLATFORM_GC #define OCARINA_BUTTON_A_PRIM_1_R 80 diff --git a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c index 8d1f8e6ca..a1253dbae 100644 --- a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c +++ b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c @@ -7,7 +7,7 @@ #include "assets/objects/object_toki_objects/object_toki_objects.h" #pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \ - "ntsc-1.2:128" + "ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128" #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED) diff --git a/src/overlays/actors/ovl_Fishing/z_fishing.c b/src/overlays/actors/ovl_Fishing/z_fishing.c index 6a7dc3ad5..ebb4a4578 100644 --- a/src/overlays/actors/ovl_Fishing/z_fishing.c +++ b/src/overlays/actors/ovl_Fishing/z_fishing.c @@ -35,8 +35,8 @@ #include "cic6105.h" #endif -#pragma increment_block_number "gc-eu:177 gc-eu-mq:177 gc-jp:177 gc-jp-ce:177 gc-jp-mq:177 gc-us:177 gc-us-mq:177" \ - "ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:128 pal-1.1:128" +#pragma increment_block_number "gc-eu:170 gc-eu-mq:170 gc-jp:170 gc-jp-ce:170 gc-jp-mq:170 gc-us:170 gc-us-mq:170" \ + "ntsc-1.0:121 ntsc-1.1:121 ntsc-1.2:121 pal-1.0:121 pal-1.1:121" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_player_actor/z_player.c b/src/overlays/actors/ovl_player_actor/z_player.c index 8ce71a848..8b6b32638 100644 --- a/src/overlays/actors/ovl_player_actor/z_player.c +++ b/src/overlays/actors/ovl_player_actor/z_player.c @@ -332,21 +332,21 @@ void Player_Action_CsAction(Player* this, PlayState* play); // .bss part 1 #pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \ - "ntsc-1.0:64 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:128 pal-1.1:128" + "ntsc-1.0:64 ntsc-1.1:64 ntsc-1.2:64 pal-1.0:128 pal-1.1:128" static s32 D_80858AA0; // TODO: There's probably a way to match BSS ordering with less padding by spreading the variables out and moving // data around. It would be easier if we had more options for controlling BSS ordering in debug. #pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" \ - "ntsc-1.0:192 ntsc-1.1:128 ntsc-1.2:192 pal-1.0:192 pal-1.1:192" + "ntsc-1.0:192 ntsc-1.1:192 ntsc-1.2:192 pal-1.0:192 pal-1.1:192" static s32 sSavedCurrentMask; static Vec3f sInteractWallCheckResult; static Input* sControlInput; #pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:160 gc-jp-ce:160 gc-jp-mq:160 gc-us:160 gc-us-mq:160" \ - "ntsc-1.0:128 ntsc-1.1:192 ntsc-1.2:128 pal-1.0:128 pal-1.1:128" + "ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:128 pal-1.1:128" // .data |
