From cd6333746011c05a88119278b0c403ed41d6ca3c Mon Sep 17 00:00:00 2001 From: izzy2lost Date: Tue, 12 Aug 2025 22:43:08 -0400 Subject: [PATCH 1/3] 32 bit fixes --- include/sf64audio_provisional.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/sf64audio_provisional.h b/include/sf64audio_provisional.h index 4259928b..5c27e733 100644 --- a/include/sf64audio_provisional.h +++ b/include/sf64audio_provisional.h @@ -847,12 +847,12 @@ typedef struct { typedef struct { /* 0x00 */ s16 numEntries; /* 0x02 */ s16 unkMediumParam; - /* 0x04 */ uintptr_t romAddr; + /* 0x04 */ u64 romAddr; /* 0x08 */ char pad[8]; } AudioTableBase; typedef struct { - /* 0x00 */ uintptr_t romAddr; + /* 0x00 */ u64 romAddr; /* 0x04 */ u32 size; /* 0x08 */ s8 medium; /* 0x09 */ s8 cachePolicy; From 7194399076c84d8cb5354f8a1bcc3e07679c53f0 Mon Sep 17 00:00:00 2001 From: izzy2lost Date: Tue, 12 Aug 2025 22:45:22 -0400 Subject: [PATCH 2/3] another 32 bit fix --- src/port/resource/importers/audio/AudioTableFactory.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/port/resource/importers/audio/AudioTableFactory.cpp b/src/port/resource/importers/audio/AudioTableFactory.cpp index 7833e8bc..62b30827 100644 --- a/src/port/resource/importers/audio/AudioTableFactory.cpp +++ b/src/port/resource/importers/audio/AudioTableFactory.cpp @@ -26,8 +26,8 @@ std::shared_ptr ResourceFactoryBinaryAudioTableV0::ReadResource int16_t sd3 = reader->ReadInt16(); table->mEntries.push_back({ - (uintptr_t) crc, - size, medium, policy, sd1, sd2, sd3 + crc, size, medium, + policy, sd1, sd2, sd3 }); } From f826f7881e17b90a361e56207b0c60cc5cb8c9c5 Mon Sep 17 00:00:00 2001 From: izzy2lost Date: Tue, 12 Aug 2025 22:47:34 -0400 Subject: [PATCH 3/3] last of the 32 bit fixes --- src/port/resource/type/audio/AudioTable.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/port/resource/type/audio/AudioTable.h b/src/port/resource/type/audio/AudioTable.h index 42fe8e29..30af3661 100644 --- a/src/port/resource/type/audio/AudioTable.h +++ b/src/port/resource/type/audio/AudioTable.h @@ -7,12 +7,12 @@ namespace SF64 { struct AudioTableBase { /* 0x00 */ int16_t numEntries; /* 0x02 */ int16_t unkMediumParam; - /* 0x04 */ uintptr_t romAddr; + /* 0x04 */ uint64_t romAddr; /* 0x08 */ char pad[8]; }; struct AudioTableEntry { - /* 0x00 */ uintptr_t romAddr; + /* 0x04 */ uint64_t romAddr; /* 0x04 */ uint32_t size; /* 0x08 */ int8_t medium; /* 0x09 */ int8_t cachePolicy; @@ -38,4 +38,4 @@ class AudioTable : public Ship::Resource { AudioTableData mTable; std::vector mEntries; }; -} \ No newline at end of file +}