Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions docs/Adding-Symbols.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,20 @@ obj_fallCA1_tex_rgb_ia8 = 0x06013118; // allow_duplicated:True
obj_fallCA1_tex_rgb_ia8 = 0x060140A8; // allow_duplicated:True
```

### `use_non_matching_label`

Tells spimdisasm to add the non matching label to a symbol.

This can be used to keep handwritten assembly extracted by splat without counting against the total matching progress.

Defaults to `True`.

**Example:**

```ini
dummy_func = 0x80200060; // use_non_matching_label:False
```

### `filename`

Allows specifying a different filename than the default (the symbol's name) when writing the symbol to its own file.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dependencies = [

[project.optional-dependencies]
mips = [
"spimdisasm>=1.39.0,<2.0.0", # This value should be keep in sync with the version listed on disassembler/spimdisasm_disassembler.py
"spimdisasm>=1.40.0,<2.0.0", # This value should be keep in sync with the version listed on disassembler/spimdisasm_disassembler.py
"rabbitizer>=1.12.0,<2.0.0",
"pygfxd>=1.0.5",
"n64img>=0.3.3",
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ tqdm==4.67.1
intervaltree==3.1.0
colorama==0.4.6
# This value should be keep in sync with the version listed on disassembler/spimdisasm_disassembler.py and pyproject.toml
spimdisasm>=1.39.0
spimdisasm>=1.40.0
rabbitizer>=1.10.0
pygfxd>=1.0.5
n64img>=0.1.4
Expand Down
2 changes: 1 addition & 1 deletion src/splat/disassembler/spimdisasm_disassembler.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class SpimdisasmDisassembler(disassembler.Disassembler):
# This value should be kept in sync with the version listed on requirements.txt and pyproject.toml
SPIMDISASM_MIN = (1, 39, 0)
SPIMDISASM_MIN = (1, 40, 0)

def configure(self):
# Configure spimdisasm
Expand Down
8 changes: 8 additions & 0 deletions src/splat/util/symbols.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,8 @@ def get_seg_for_rom(rom: int) -> Optional["Segment"]:
if attr_name == "allow_duplicated":
sym.allow_duplicated = True
continue
if attr_name == "use_non_matching_label":
sym.use_non_matching_label = tf_val

if ignore_sym:
if sym.given_size is None or sym.given_size == 0:
Expand Down Expand Up @@ -546,6 +548,8 @@ def add_symbol_to_spim_segment(
context_sym.visibility = sym.given_visibility
if sym.given_align:
context_sym.setAlignment(sym.given_align)
if sym.use_non_matching_label is not None:
context_sym.useNonMatchingLabel = sym.use_non_matching_label

return context_sym

Expand Down Expand Up @@ -596,6 +600,8 @@ def add_symbol_to_spim_section(
context_sym.visibility = sym.given_visibility
if sym.given_align:
context_sym.setAlignment(sym.given_align)
if sym.use_non_matching_label is not None:
context_sym.useNonMatchingLabel = sym.use_non_matching_label

return context_sym

Expand Down Expand Up @@ -702,6 +708,8 @@ class Symbol:

given_align: Optional[int] = None

use_non_matching_label: Optional[bool] = None

_generated_default_name: Optional[str] = None
_last_type: Optional[str] = None

Expand Down