Skip to content

Releases: encounter/decomp-toolkit

v1.1.0

04 Oct 05:13
Compare
Choose a tag to compare

What's Changed

  • Added: Automatically check for invalid extab relocations by @CelestialAmber in #75
  • Added: Decode extab entries as comment in assembly output (281b0f7)
  • Added: Load objects from disc image & vfs module (f91c2a1)

Revamps support for container paths and centralizes logic into a VFS (virtual file system) module.
The new VFS architecture supports disc images and any level of nesting.

For example, the following command now works:
dtk dol info 'Interactive Multi-Game Demo Disc - July 2002 (USA).rvz:files/zz_StarFox051702_e3.tgc:files/default.dol'
This opens a TGC file inside an RVZ disc image, then reads default.dol in the FST.

Another example:
dtk rel info 'Legend of Zelda, The - The Wind Waker (USA).rvz:files/RELS.arc:mmem/f_pc_profile_lst.rel'
This opens a RARC archive inside an RVZ disc image, loads the Yaz0-compressed REL and decompresses it on the fly.

This all operates in memory with minimal overhead, with no need to extract temporary files.

Supported container formats:

  • Disc images (ISO/GCM, WIA/RVZ, WBFS, CISO, NFS, GCZ, TGC)
  • RARC/SZS and U8 (.arc)

Supported compression formats:

  • Yaz0 (SZS)
  • Yay0 (SZP)
  • NLZSS (.lz)

Projects now can utilize a new configuration key object_base:

object: orig/GZLE01/sys/main.dol
modules:
- object: orig/GZLE01/files/RELS.arc:rels/mmem/f_pc_profile_lst.rel

becomes

object_base: orig/GZLE01
object: sys/main.dol
modules:
- object: files/RELS.arc:mmem/f_pc_profile_lst.rel

When loading the objects, decomp-toolkit will automatically check the object_base directory for any disc images. (They can be named anything, but must be in the folder root.) If one is found, all objects will be fetched from the disc image itself, rather than having to extract the files manually.


Two new commands were added: vfs ls and vfs cp.
These commands are very barebones currently, but allow listing directory contents and extracting files from decomp-toolkit's vfs representation:

❯ dtk vfs ls disc.rvz:
files
sys

❯ dtk vfs ls disc.rvz:sys
boot.bin
bi2.bin
apploader.bin
fst.bin
main.dol

❯ dtk vfs cp disc.rvz:sys/main.dol .

Full Changelog: v1.0.0...v1.1.0

v1.0.0

29 Sep 19:52
Compare
Choose a tag to compare

What's Changed

decomp-toolkit has reached v1.0.0! 🎉 While this release contains mostly iterative updates, dozens of projects are successfully using decomp-toolkit. It's time for a stable version number.

Notably, projects using the prebuilt binaries should upgrade for improved overall performance. (See below)

  • Added: map config for generating symbols/splits (cfcd146)
    • Useful for extracting information from map files that aren't fully well-formed, such as ones from existing decompilation projects.
  • Added: Better support for SMG/TP maps (68f4552)
    • These post-processed maps have a lot of issues. This adds a few workarounds to the map parser to make it easier (though still not fully automatic) to parse these into symbols/splits.
  • Changed: dol diff: Loosen @ symbol match criteria (d4f695f)
  • Changed: Use mimalloc for prebuilt dtk binaries. In particular, this improves dtk dol split performance with the prebuilt binaries by ~2x compared to builds using musl's built-in malloc. (c106123)

Full Changelog: v0.9.6...v1.0.0

v0.9.6

05 Sep 06:32
Compare
Choose a tag to compare

What's Changed

  • Fixed: REL v1, v2 alignment regression (9dfdbb9)
    • Alignment after section data and before relocations / import table is exclusive to REL v3.

Full Changelog: v0.9.5...v0.9.6

v0.9.5

05 Sep 02:28
Compare
Choose a tag to compare

What's Changed

  • Fixed: Fix .note.split warnings for older mwld versions (d9817f6)
    • Prior to mwld GC 3.0a3, the linker doesn't support ELF .note sections properly. With GC 2.7, it crashes if the section type is SHT_NOTE. This adjusts the .note.split section type based on mw_comment_version to be compatible with every linker version.
  • Added: Add TGC disc support (c403931)
  • Added: PureVirtual/Virtual Block2 DWARF attributes by @1superchip in #70

Full Changelog: v0.9.4...v0.9.5

v0.9.4

12 Aug 02:53
Compare
Choose a tag to compare

What's Changed

Add split order attribute for manual reordering (b6a29fa)

Example in splits.txt:

file1.cpp: order:0
  ...

file2.cpp: order:1
  ...

file3.cpp: order:2
  ...

This ensures that file2.cpp is always anchored in between 1 and 3 when resolving the final link order.

Full Changelog: v0.9.3...v0.9.4

v0.9.3

07 Aug 03:24
da6a514
Compare
Choose a tag to compare

What's Changed

  • Added: elf2dol: Support section name denylist by @riidefi in #64
  • Added: RSO: make command by @InusualZ in #67
  • Added: Support generating RELs with non-sequential module IDs (c484952)
  • Fixed: Properly locate ProDG .bss sections by @ieee802dot11ac in #63

Full Changelog: v0.9.2...v0.9.3

v0.9.2

10 Jun 23:48
Compare
Choose a tag to compare

What's Changed

  • Added: Update orthrus-ncompress (9c12efa)
    • Significantly faster (and still matching) Yay0/Yaz0 compression.
  • Added: Improve REL relocation error handling (e359ea1)
  • Fixed: Writing empty v3 RELs (#59)
  • Fixed: Match original "exec" for REL sections (761a940)
  • Fixed: Create gap symbols at the end of sections (af3bcf5)

Full Changelog: v0.9.1...v0.9.2

v0.9.1

10 Jun 06:52
Compare
Choose a tag to compare

What's Changed

  • Added: Detect _savevr/_restvr + check in RELs
  • Fixed: Ignore invalid instructions (#55)
  • Fixed: Partially revert "Rework section alignment handling (4ea4ec8)
  • Fixed: REL alignment after section data (b44aa78)

Full Changelog: v0.9.0...v0.9.1

v0.9.0

04 Jun 02:45
Compare
Choose a tag to compare

What's Changed

  • Added: Support address in config symbol references (#58)
    • Example: symbol_name!.data:0x1234, supported in extract and add_relocations in config.yml
  • Added: Instruction disassembly in dol diff (#28)
    image
  • Added: SN GCC DWARF improvements (#46)
  • Added: Add U8 (newer .arc) support (46cf0be)
    • Added: u8 list, u8 extract and support for U8 archive paths in config.yml (e.g. orig/SOUE01/files/rels.arc:rels/d_a_asura_bulletNP.rel)
  • Fixed: Fix addic/addic. handling in relocation tracker (#57)
  • Fixed: Change REL "invalid relocation" to warning (#53)
  • Fixed: Check for existing function when analyzing bl (partially #56)

Full Changelog: v0.8.3...v0.9.0

v0.8.3

20 May 05:14
Compare
Choose a tag to compare

Support block_relocations and add_relocations in config.yml. This allows more granular control over generated relocations.

Also optimizes relocation address validity checks, leading to ~20% faster relocation analysis.

Config example:

block_relocations:
# Block any relocation pointing to this address.
- target: .data:0x80130140
# Block any relocation originating from this address.
- source: .text:0x80047160
  # (optional) End address to make it a range.
  end: .text:0x800471A8

add_relocations:
# Inserts or overwrites a relocation.
# From: `subi r3, r3, 0x7657`
# To: `li r3, mesWInsert-0x1@sda21`
- source: .text:0x800473F4
  type: sda21
  target: mesWInsert
  addend: -1

Full Changelog: v0.8.2...v0.8.3