Skip to content

Commit

Permalink
Stop using legacy asm macro by default (#388)
Browse files Browse the repository at this point in the history
* Stop using legacy asm macro by default

* fix test
  • Loading branch information
ethteck authored Jul 31, 2024
1 parent 5812a1e commit ebc01d9
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 11 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# splat Release Notes

### 0.25.0
* Changed the default value of `use_legacy_include_asm` to false

### 0.24.7
* splat no longer creates unnecessary directories for asm

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The brackets corresponds to the optional dependencies to install while installin
If you use a `requirements.txt` file in your repository, then you can add this library with the following line:

```txt
splat64[mips]>=0.24.7,<1.0.0
splat64[mips]>=0.25.0,<1.0.0
```

### Optional dependencies
Expand Down
10 changes: 6 additions & 4 deletions docs/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ Same as `symbol_name_format` but for symbols with no rom address

Determines whether to detect and hint to the user about likely file splits when disassembling.

This setting can also be set on a per segment basis, if you'd like to enable or disable detection for specific segments. This could be useful when you are confident you identified all subsegments in a segment, yet `splat` still hints that subsegments could be split.
This setting can also be set on a per segment basis, if you'd like to enable or disable detection for specific segments. This could be useful when you are confident you identified all subsegments in a segment, yet `splat` still hints that subsegments could be split.

### pair_rodata_to_text

Expand Down Expand Up @@ -670,12 +670,14 @@ Append the type of an image to its file extension. For example, when enabled, a
## Compiler-specific options

### use_legacy_include_asm
If `True`, generate c files using the longer `INCLUDE_ASM` macro. This is defaulted to `True` to by-default support projects using the longer macro.
If `True`, generate c files using the longer old `INCLUDE_ASM` macro. The non-legacy `INCLUDE_ASM` macro is highly recommended, and the legacy version is only supported for compatibility reasons.

For more information on these macros, see [macros](https://github.com/ethteck/splat/wiki/General-Workflow#macros).

#### Usage
```yaml
use_legacy_include_asm: False
use_legacy_include_asm: True
```

#### Default
`True`
`False`
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "splat64"
# Should be synced with src/splat/__init__.py
version = "0.24.7"
version = "0.25.0"
description = "A binary splitting tool to assist with decompilation and modding projects"
readme = "README.md"
license = {file = "LICENSE"}
Expand Down
2 changes: 1 addition & 1 deletion src/splat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
__package_name__ = __name__

# Should be synced with pyproject.toml
__version__ = "0.24.7"
__version__ = "0.25.0"
__author__ = "ethteck"

from . import util as util
Expand Down
2 changes: 1 addition & 1 deletion src/splat/util/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ def parse_endianness() -> Literal["big", "little"]:
ique_symbols=p.parse_opt("ique_symbols", bool, False),
hardware_regs=p.parse_opt("hardware_regs", bool, False),
image_type_in_extension=p.parse_opt("image_type_in_extension", bool, False),
use_legacy_include_asm=p.parse_opt("use_legacy_include_asm", bool, True),
use_legacy_include_asm=p.parse_opt("use_legacy_include_asm", bool, False),
disasm_unknown=p.parse_opt("disasm_unknown", bool, False),
detect_redundant_function_end=p.parse_opt(
"detect_redundant_function_end", bool, True
Expand Down
6 changes: 3 additions & 3 deletions test/basic_app/expected/src/main.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "common.h"

INCLUDE_RODATA(const s32, "main", D_80000510);
INCLUDE_RODATA("test/basic_app/split/asm/nonmatchings/main", D_80000510);

INCLUDE_ASM(const s32, "main", func_80000400);
INCLUDE_ASM("test/basic_app/split/asm/nonmatchings/main", func_80000400);

INCLUDE_ASM(const s32, "main", func_800004A0);
INCLUDE_ASM("test/basic_app/split/asm/nonmatchings/main", func_800004A0);

0 comments on commit ebc01d9

Please sign in to comment.