266 Commits

Author SHA1 Message Date
f4a67ee619 Version v1.6.1 v1.6.1 2025-06-04 22:04:30 -06:00
Robin Avery
d92a892c2b
Relax string size requirement for auto symbols (#102) 2025-06-04 20:01:39 -07:00
cadmic
5e33fea49f
Allow specifying replacement bytes in dtk extab clean (#103)
* Allow specifying replacement bytes in dtk extab clean

* Simplify extab padding replacement

* Reword log message

* clippy has bad taste

* Don't specify revision number for cwextab

---------

Co-authored-by: Amber Brault <celestialamber1@gmail.com>
2025-06-04 20:01:05 -07:00
9cafb77d3f Add dtk extab clean & config.yml clean_extab
It was discovered that certain extab actions contain
uninitalized data from the compiler. This provides
a way to zero out uninitialized data in DOL or object
files. Usage: `dtk extab clean input.dol output.dol`

A `clean_extab` setting was added to config.yml, so
projects can link the cleaned objects and target the
cleaned DOL hash.
v1.6.0
2025-06-01 20:23:07 -06:00
Dávid Balatoni
20e877c9ec
Some ProDG improvements (#101) 2025-06-01 16:43:13 -06:00
88d0e6b789 cargo clippy --fix 2025-06-01 16:42:00 -06:00
f212b35d28 Fix BSS symbol data check in add_padding_symbols 2025-06-01 16:40:40 -06:00
9c681557f5 Write ldscript_template path to ouput depfile 2025-05-30 19:18:46 -06:00
5505120148 Fix padding symbols on REL section boundaries
Regression introduced in 6819a8b
v1.5.1
2025-05-11 22:15:02 -06:00
c1cbdd56d1 Version v1.5.0 v1.5.0 2025-05-07 23:01:09 -06:00
robojumper
97302e5127
dtk dol apply: skip updating anonymous symbols by default (#97)
* Add --relaxed flag to dtk dol apply to skip updating anonymous symbols

* Invert --relaxed switch -> --full
2025-05-07 21:02:15 -06:00
Rainchus
18987ed330
add shiftjis as possible data type for symbols (#95)
* add shiftjis as possible data type for symbols

* usage of anyhow:bail! -> bail!

* revise output of sjis strings

* rename shiftjis internally, symbols now uses sjis instead of shiftjis

* remove sjis decoding error check as the output is a comment

* run cargo fmt
2025-04-16 23:59:21 -06:00
dbalatoni13
614d4f2efc
Add new options to rel make (#94) 2025-03-31 17:15:16 -06:00
ddd9dbb0ba clippy fixes 2025-03-21 16:14:44 -06:00
a064ddfd68 Quick & dirty ALF support in elf2dol 2025-03-21 16:13:04 -06:00
bb18a4b253 Auto-split and padding symbol fixes
A few issues were causing linker errors:
- Auto-splits could contain symbols that have a
higher alignment than the split itself. Detect
this and create a new auto-split at these symbols.
- The analyzer can miss objects in between other
objects if there are no direct relocations to them.
In these cases, non-zero data could just get totally
lost. Detect and create symbols for these.
v1.4.1
2025-02-04 23:45:07 -07:00
7e15810af1 Version 1.4.0 v1.4.0 2025-01-27 19:37:48 -07:00
51a7fbd85b Add WAD support to object_base
This allows WAD projects to use the auto-extraction
feature: decomp-toolkit will extract all `object`s
from a disc file or WAD file that exists in the
configured `object_base`.
2025-01-27 19:33:44 -07:00
a6c7001a52 Remove elf split command
This command was an early experiment and only worked
correctly on one game. The project system has long
superseded it. ELFs are better supported by
generating a project config via `elf config` and
using the DOL as the object target.

Closes #1
Closes #4
Closes #21
2025-01-27 19:11:40 -07:00
f270e9c53d clippy fix 2025-01-27 19:09:19 -07:00
b9642321a1 dol diff: Conditionally warn on symbol size mismatch
When a symbol's data matches but the size differs
due to padding bytes, print a warning and continue.

Resolves #35
2025-01-27 18:56:24 -07:00
e55ade10ec Ignore globalized symbols in dol diff
Resolves #61
2025-01-27 18:36:19 -07:00
6c3887c7e6 Improve split cyclic dependency errors
When a link order is unresolvable, decomp-toolkit
now prints out all of the TUs in a cycle, easing
debugging.

Example:
```
Cyclic dependency encountered while resolving link order: Dolphin/os/__start.c -> Dolphin/os/__ppc_eabi_init.cpp -> Dolphin/pad/PadClamp.c -> Dolphin/pad/pad.c
```

Thanks @simonlindholm for the toposort impl.
2025-01-27 18:06:25 -07:00
9a6348ec49 Set alignment for floats/doubles in analyzer
Resolves #60
2025-01-27 18:06:25 -07:00
589e59a620 Warn rather than fail on .note.split/.comment reading 2025-01-27 18:06:25 -07:00
6819a8bd5f Improve logic for generating padding symbols 2025-01-27 17:54:06 -07:00
a22e878258 Treat a branch to the start of a func as a tail call
Resolves #74
2025-01-27 17:54:06 -07:00
93000b28bd Check for conflicting splits with different file extensions
Resolves #81
2025-01-27 17:54:06 -07:00
0c6eff42cf Don't emit split alignment warnings for auto-splits
Resolves #84
2025-01-27 17:54:06 -07:00
04b60d319c vfs ls: Fix column sizing with Unicode chars 2025-01-27 17:54:06 -07:00
d1b35c4d18 clippy & cargo-deny fixes 2025-01-27 17:03:12 -07:00
NWPlayer123
8fb56c2fa4
Update Errors (#87)
Co-authored-by: NWPlayer123 <NWPlayer123@users.noreply.github.com>
2025-01-24 23:07:20 -07:00
91aa36c120 Clean up VFS error handling v1.3.0 2024-11-07 09:00:52 -07:00
9fc56d847f Add rename field to extract configuration
Allows renaming, for example, local statics from `test$1234`
to `test` for inclusion in the source function.
2024-11-07 08:44:24 -07:00
1cc38ad621 Add WAD support to VFS & wad commands 2024-11-07 08:43:20 -07:00
146c4d2f8c Add header_type and custom_type to extract config
Extract configuration is now emitted in the output config, so
tooling can load and perform their own tasks on extracted assets
without having to parse YAML.

`header_type`:
- `symbol` (default): Emit a full symbol declaration.
- `raw`: Emit raw array data (for wrapping in your own declaration)
- `none`: Don't emit a header at all. (For custom processing)

`custom_type`/`custom_data`: Passed through to the output config
as-is for custom tasks.
v1.2.0
2024-10-28 17:44:07 -06:00
f984bc3fb2 Cleanup find_object_base & better error handling 2024-10-18 00:41:17 -06:00
cadmic
8823c2225e
Follow symlinks when looking for disc images (#78) v1.1.4 2024-10-18 00:37:54 -06:00
fa5068fd6d Fix ELF relocation processing
Another bug caused by object removing ELF null section / symbol
from their iterators.
2024-10-18 00:24:34 -06:00
3ada073da1 Update dependencies 2024-10-18 00:19:06 -06:00
5c7560bcea Fix address analysis with negative add operands
Resolves #76
2024-10-14 09:40:46 -06:00
8d8d801b2f A couple process_elf fixes 2024-10-13 14:15:13 -06:00
bee4570a4c Always check for extracted files in object resolution
Fixes an issue where extracted files would not be found after
removing the disc image from the orig dir.
v1.1.3
2024-10-13 13:36:01 -06:00
18bd608fe8 Extract files from disc image to object_base by default
When `extract_objects` is enabled, objects will be extracted once
from a disc image into `object_base`, and then used directly from
`object_base` going forward.

This allows users to delete the disc image from their `orig` dir
once the initial build completes.
v1.1.2
2024-10-13 00:53:45 -06:00
1a9736f8d9 ci: Add Rust workspace cache 2024-10-12 23:32:51 -06:00
4fe2608e07 Make selfile relative to object_base 2024-10-12 23:31:41 -06:00
601c8e1a5e ci: Setup python venv for cargo-zigbuild v1.1.1 2024-10-10 22:37:55 -06:00
2e524e6806 Use typed-path in place of std Path/PathBuf
This allows handling path conversions in a more structured way,
as well as avoiding needless UTF-8 checks. All argument inputs
use `Utf8NativePathBuf`, while all config entries use
`Utf8UnixPathBuf`, ensuring that we deserialize/serialize using
forward slashes. We can omit `.display()` and lossy UTF-8
conversions since all paths are known valid UTF-8.
2024-10-04 23:38:15 -06:00
64d0491256 Remove unused metroidbuildinfo command 2024-10-04 21:08:34 -06:00
4611a4b501 Vendor nintendo-lz crate to fix issues & avoid old deps 2024-10-04 21:02:04 -06:00