From a4c0a6bbd99415a0bfb8b3faa90f63b014226d8c Mon Sep 17 00:00:00 2001 From: robojumper Date: Sun, 25 May 2025 22:49:45 +0200 Subject: [PATCH] snd_MemorySoundArchive OK --- config/SOUE01/splits.txt | 1 + config/SOUE01/symbols.txt | 23 +++++++++++------------ configure.py | 7 ++++--- src/nw4r/snd/snd_MemorySoundArchive.cpp | 2 +- 4 files changed, 17 insertions(+), 16 deletions(-) diff --git a/config/SOUE01/splits.txt b/config/SOUE01/splits.txt index 228a46de..328dbb5d 100644 --- a/config/SOUE01/splits.txt +++ b/config/SOUE01/splits.txt @@ -2965,6 +2965,7 @@ nw4r/snd/snd_Lfo.cpp: nw4r/snd/snd_MemorySoundArchive.cpp: .text start:0x8046DF10 end:0x8046E3B0 align:16 + .data start:0x8056DC98 end:0x8056DD18 nw4r/snd/snd_MidiSeqPlayer.cpp: .text start:0x8046E3B0 end:0x8046E458 align:16 diff --git a/config/SOUE01/symbols.txt b/config/SOUE01/symbols.txt index 023b855d..5746ec6b 100644 --- a/config/SOUE01/symbols.txt +++ b/config/SOUE01/symbols.txt @@ -25271,16 +25271,15 @@ OpenExtStream__Q34nw4r3snd18MemorySoundArchiveCFPviPCcUlUl = .text:0x8046E210; / detail_GetRequiredStreamBufferSize__Q34nw4r3snd18MemorySoundArchiveCFv = .text:0x8046E220; // type:function size:0x8 Close__Q44nw4r3snd18MemorySoundArchive16MemoryFileStreamFv = .text:0x8046E230; // type:function size:0x14 Read__Q44nw4r3snd18MemorySoundArchive16MemoryFileStreamFPvUl = .text:0x8046E250; // type:function size:0x58 -Seek__Q44nw4r3snd18MemorySoundArchive16MemoryFileStreamFlUl = .text:0x8046E2B0; // type:function size:0x44 -fn_8046E2F4 = .text:0x8046E2F4; // type:function size:0x4 -GetSize__Q44nw4r3snd18MemorySoundArchive16MemoryFileStreamCFv = .text:0x8046E300; // type:function size:0x8 -Tell__Q44nw4r3snd18MemorySoundArchive16MemoryFileStreamCFv = .text:0x8046E310; // type:function size:0x8 -CanWrite__Q44nw4r3snd18MemorySoundArchive16MemoryFileStreamCFv = .text:0x8046E320; // type:function size:0x8 -CanRead__Q44nw4r3snd18MemorySoundArchive16MemoryFileStreamCFv = .text:0x8046E330; // type:function size:0x8 -CanAsync__Q44nw4r3snd18MemorySoundArchive16MemoryFileStreamCFv = .text:0x8046E340; // type:function size:0x8 -CanCancel__Q44nw4r3snd18MemorySoundArchive16MemoryFileStreamCFv = .text:0x8046E350; // type:function size:0x8 -CanSeek__Q44nw4r3snd18MemorySoundArchive16MemoryFileStreamCFv = .text:0x8046E360; // type:function size:0x8 -__dt__Q44nw4r3snd18MemorySoundArchive16MemoryFileStreamFv = .text:0x8046E370; // type:function size:0x40 +Seek__Q44nw4r3snd18MemorySoundArchive16MemoryFileStreamFlUl = .text:0x8046E2B0; // type:function size:0x48 +GetSize__Q44nw4r3snd18MemorySoundArchive16MemoryFileStreamCFv = .text:0x8046E300; // type:function size:0x8 scope:weak +Tell__Q44nw4r3snd18MemorySoundArchive16MemoryFileStreamCFv = .text:0x8046E310; // type:function size:0x8 scope:weak +CanWrite__Q44nw4r3snd18MemorySoundArchive16MemoryFileStreamCFv = .text:0x8046E320; // type:function size:0x8 scope:weak +CanRead__Q44nw4r3snd18MemorySoundArchive16MemoryFileStreamCFv = .text:0x8046E330; // type:function size:0x8 scope:weak +CanAsync__Q44nw4r3snd18MemorySoundArchive16MemoryFileStreamCFv = .text:0x8046E340; // type:function size:0x8 scope:weak +CanCancel__Q44nw4r3snd18MemorySoundArchive16MemoryFileStreamCFv = .text:0x8046E350; // type:function size:0x8 scope:weak +CanSeek__Q44nw4r3snd18MemorySoundArchive16MemoryFileStreamCFv = .text:0x8046E360; // type:function size:0x8 scope:weak +__dt__Q44nw4r3snd18MemorySoundArchive16MemoryFileStreamFv = .text:0x8046E370; // type:function size:0x40 scope:weak OnUpdateFrameSoundThread__Q44nw4r3snd6detail9SeqPlayerFv = .text:0x8046E3B0; // type:function size:0x4 OnShutdownSoundThread__Q44nw4r3snd6detail9SeqPlayerFv = .text:0x8046E3C0; // type:function size:0x10 InvalidateWaveData__Q44nw4r3snd6detail9SeqPlayerFPCvPCv = .text:0x8046E3D0; // type:function size:0x4 @@ -38594,8 +38593,8 @@ __vt__Q44nw4r3snd6detail15BiquadFilterLpf = .data:0x8056DBD8; // type:object siz __vt__Q44nw4r3snd15DvdSoundArchive13DvdFileStream = .data:0x8056DBE8; // type:object size:0x64 __vt__Q34nw4r3snd15DvdSoundArchive = .data:0x8056DC50; // type:object size:0x20 lbl_8056DC70 = .data:0x8056DC70; // type:object size:0x28 -lbl_8056DC98 = .data:0x8056DC98; // type:object size:0x60 -lbl_8056DCF8 = .data:0x8056DCF8; // type:object size:0x20 +__vt__Q44nw4r3snd18MemorySoundArchive16MemoryFileStream = .data:0x8056DC98; // type:object size:0x5C +__vt__Q34nw4r3snd18MemorySoundArchive = .data:0x8056DCF8; // type:object size:0x20 lbl_8056DD18 = .data:0x8056DD18; // type:object size:0x28 jumptable_8056DD40 = .data:0x8056DD40; // type:object size:0x1F4 scope:local lbl_8056DF38 = .data:0x8056DF38; // type:object size:0x10 diff --git a/configure.py b/configure.py index 45fd316a..18f06a95 100644 --- a/configure.py +++ b/configure.py @@ -313,10 +313,10 @@ def EGGLib(lib_name, objects): } -def nw4rLib(lib_name, objects, extra_cflags=[]): +def nw4rLib(lib_name, objects, extra_cflags=[], mw_version=None): return { "lib": lib_name, - "mw_version": "Wii/1.3", # most seem to be around 1.2, snd is 1.6 + "mw_version": mw_version or "Wii/1.3", # most seem to be around 1.2, snd is 1.6 "cflags": cflags_nw4r + extra_cflags, "progress_category": "nw4r", "host": False, @@ -1038,7 +1038,7 @@ config.libs = [ Object(NonMatching, "nw4r/snd/snd_FxReverbStdDpl2.cpp"), Object(Matching, "nw4r/snd/snd_InstancePool.cpp"), Object(Matching, "nw4r/snd/snd_Lfo.cpp"), - Object(NonMatching, "nw4r/snd/snd_MemorySoundArchive.cpp"), + Object(Matching, "nw4r/snd/snd_MemorySoundArchive.cpp"), Object(NonMatching, "nw4r/snd/snd_MidiSeqPlayer.cpp"), Object(NonMatching, "nw4r/snd/snd_MmlParser.cpp"), Object(NonMatching, "nw4r/snd/snd_MmlSeqTrack.cpp"), @@ -1087,6 +1087,7 @@ config.libs = [ Object(NonMatching, "nw4r/snd/snd_WsdPlayer.cpp"), Object(NonMatching, "nw4r/snd/snd_adpcm.cpp"), ], + mw_version="Wii/1.6", ), nw4rLib( "lyt", diff --git a/src/nw4r/snd/snd_MemorySoundArchive.cpp b/src/nw4r/snd/snd_MemorySoundArchive.cpp index 5faa944c..45dbe9ab 100644 --- a/src/nw4r/snd/snd_MemorySoundArchive.cpp +++ b/src/nw4r/snd/snd_MemorySoundArchive.cpp @@ -176,7 +176,7 @@ void MemorySoundArchive::MemoryFileStream::Seek(s32 offset, u32 origin) default: NW4RPanicMessage_Line(234, "Unsupported Seek origin"); - break; + return; } }