diff options
| author | Tyler McGavran <tyler.taggerung@gmail.com> | 2023-09-14 00:36:27 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-13 22:36:27 -0600 |
| commit | 86c86c8bcde1ec47f74e45afafc8b9eb8ed4acec (patch) | |
| tree | 338fe76c01a82486c923f787952e83e3f1de6d4c /src/audio/internal.h | |
| parent | 4ee09e005ff4b1cdccfcbbc61da87ac9391e50c2 (diff) | |
Lots of matches in the audio code (#417)
* Lots of audio matches
Fully matched heap.c, lots of load.c and some stuff in seqplayer.c
Matched heap.c's BSS segement and moved some BSS stuff out of
load.c into data.c, since that where it appears to belong
according to SM64.
Signed-off-by: Taggerung <tyler.taggerung@email.com>
Diffstat (limited to 'src/audio/internal.h')
| -rw-r--r-- | src/audio/internal.h | 37 |
1 files changed, 35 insertions, 2 deletions
diff --git a/src/audio/internal.h b/src/audio/internal.h index a9aaa4628..a8b4da076 100644 --- a/src/audio/internal.h +++ b/src/audio/internal.h @@ -512,8 +512,10 @@ struct AudioSessionSettingsEU { /* 0x0E */ u16 unk3; // always 0 /* 0x10 */ u32 persistentSeqMem; /* 0x14 */ u32 persistentBankMem; - /* 0x18, 0x1C */ u32 temporarySeqMem; - /* 0x1C, 0x20 */ u32 temporaryBankMem; + /* 0x18 */ u32 unk_18; + /* 0x1C */ u32 temporarySeqMem; + /* 0x20 */ u32 temporaryBankMem; + /* 0x24 */ u32 unk_24; }; // 0x30 on shindou struct AudioSessionSettings { @@ -545,6 +547,17 @@ struct AudioBufferParametersEU { /*0x1C*/ f32 unkUpdatesPerFrameScaled; // 3.0f / (1280.0f * updatesPerFrame) }; +/** + * This definition comes from SM64. For reasons not fully understood + * eu_process_audio_cmd does not match properly if this definition + * is used. + * We're either: + * Missing a compiler -D for IS_BIG_ENDIAN + * or + * The version of that function in MK64 is significantly different + * from its SM64 counterpart + * Or we just have a poor understanding of this part of the system. + struct EuAudioCmd { union { #if IS_BIG_ENDIAN @@ -583,5 +596,25 @@ struct EuAudioCmd { #endif } u2; }; +**/ + +struct EuAudioCmd { + union { + struct { + u8 op; + u8 arg1; + u8 arg2; + u8 arg3; + } s; + s32 first; + } u; + union { + s32 as_s32; + u32 as_u32; + f32 as_f32; + u8 as_u8; + s8 as_s8; + } u2; +}; #endif // AUDIO_INTERNAL_H |
