DirectoryBlob: fix data alignment for GC/Triforce and skip Triforce DIMM memory range

The 0x8000 alignment in DirectoryBlob is needed for Wii disc group encryption,
but for GC/Triforce it inflates file offsets unnecessarily. Use 0x20 alignment
for Triforce (matching original disc layout) while keeping 0x8000 for GC due
to DTK audio streaming requirements.

On Triforce games with many files, the inflated offsets can land in the
AMMediaboard DIMM memory range (0x1F000000-0x1F800000). Reads from that
region return SRAM data instead of disc data, causing the game to hang.

Skip the DIMM range when assigning per-file data offsets if any portion of
the file would overlap [0x1F000000, 0x1F800000).
This commit is contained in:
naari3 committed 2026-04-25 19:48:00 +09:00
1 parent 6871428a81
commit e013d95053
2 files changed
+13 -3

No files matched your search

+1
View File
@@ -231,6 +231,7 @@ private:
std::string m_root_directory;
bool m_is_wii = false;
bool m_is_triforce = false;
// GameCube has no shift, Wii has 2 bit shift
u32 m_address_shift = 0;